:root {
  --bg: #eef4ff;
  --bg-strong: #dbe7ff;
  --surface: rgba(255, 255, 255, 0.58);
  --surface-strong: rgba(255, 255, 255, 0.78);
  --surface-dark: rgba(38, 52, 103, 0.12);
  --text: #21304f;
  --text-soft: #5f6f99;
  --border: rgba(255, 255, 255, 0.52);
  --shadow-lg: 0 28px 60px rgba(70, 88, 164, 0.18);
  --shadow-md: 0 18px 35px rgba(70, 88, 164, 0.12);
  --shadow-sm: 0 12px 20px rgba(70, 88, 164, 0.1);
  --focus: 0 0 0 3px rgba(93, 132, 255, 0.18), 0 18px 35px rgba(70, 88, 164, 0.18);
  --primary: #4f7cff;
  --primary-2: #6772ff;
  --secondary: #8c61ff;
  --accent-pink: #ff78b2;
  --accent-cyan: #58d5ff;
  --accent-green: #4ddb98;
  --accent-gold: #ffbf69;
  --danger: #ff6c8c;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max-width: 1680px;
  --motion-fast: 0.25s ease;
  --motion-medium: 0.4s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.58), rgba(233, 241, 255, 0.66)),
    url("https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=2200&q=80")
      center/cover fixed,
    radial-gradient(circle at top left, rgba(88, 213, 255, 0.28), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(140, 97, 255, 0.24), transparent 26%),
    radial-gradient(circle at 80% 75%, rgba(255, 120, 178, 0.18), transparent 25%),
    linear-gradient(180deg, #f7faff 0%, #edf3ff 48%, #e8f0ff 100%);
  overflow-x: hidden;
}

body.high-contrast {
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-dark: rgba(0, 0, 0, 0.06);
  --text: #101828;
  --text-soft: #25324a;
  --border: rgba(17, 24, 39, 0.16);
  --shadow-lg: 0 0 0 2px rgba(16, 24, 40, 0.16);
  --focus: 0 0 0 3px rgba(0, 0, 0, 0.2), 0 0 0 6px rgba(255, 215, 0, 0.2);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
.glass-panel,
.stat-card,
.highlight-pill,
.appointment-card {
  transition:
    transform var(--motion-fast),
    box-shadow var(--motion-fast),
    border-color var(--motion-fast),
    background var(--motion-fast),
    opacity var(--motion-fast);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
}

.hero-backdrop {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 20% 20%, rgba(103, 114, 255, 0.1), transparent 25%),
    linear-gradient(rgba(24, 37, 74, 0.18), rgba(24, 37, 74, 0.08));
  pointer-events: none;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.55;
  pointer-events: none;
  animation: floatBlob 11s ease-in-out infinite;
}

.ambient-one {
  width: 320px;
  height: 320px;
  top: 6%;
  left: -70px;
  background: radial-gradient(circle, rgba(88, 213, 255, 0.32), transparent 66%);
}

.ambient-two {
  width: 280px;
  height: 280px;
  top: 56%;
  right: -40px;
  background: radial-gradient(circle, rgba(140, 97, 255, 0.26), transparent 66%);
  animation-delay: -4s;
}

.ambient-three {
  width: 220px;
  height: 220px;
  bottom: 8%;
  left: 40%;
  background: radial-gradient(circle, rgba(255, 120, 178, 0.22), transparent 66%);
  animation-delay: -7s;
}

.app {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 0.75rem), var(--max-width));
  margin: 0 auto;
  padding: 1rem 0 4rem;
  animation: pageIn 0.7s ease both;
}

.glass-panel {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.topbar,
.hero,
.panel,
.stat-card,
.highlight-pill {
  border-radius: var(--radius-xl);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  position: sticky;
  top: 0.75rem;
  z-index: 30;
}

.topbar-left,
.topbar-actions,
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.46));
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent-pink));
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 16px 30px rgba(103, 114, 255, 0.3);
  transform: translateZ(0);
}

.brand h1,
.brand h2,
.hero h2,
.section-head h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-btn,
.icon-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.profile-btn:hover,
.icon-btn:hover,
.stat-card:hover,
.highlight-pill:hover,
.appointment-card:hover,
.panel:hover {
  transform: translateY(-4px);
}

.profile-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
}

.profile-btn img,
.avatar-rail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex-direction: column;
  justify-content: center;
  gap: 0.24rem;
  padding: 0 0.8rem;
}

.menu-toggle span,
.drawer-header .icon-btn span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.drawer-header .icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  position: relative;
}

.drawer-header .icon-btn span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.drawer-header .icon-btn span:last-child {
  transform: rotate(-45deg) translate(-5px, 5px);
}

.contrast-toggle {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.contrast-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-pill {
  width: 56px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(103, 114, 255, 0.25), rgba(255, 120, 178, 0.28));
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.07);
}

.toggle-pill::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  transition: transform var(--motion-fast);
}

.contrast-toggle input:checked + .toggle-pill::after {
  transform: translateX(26px);
}

.hero {
  margin-top: 1rem;
  padding: 2rem;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.66), rgba(240, 245, 255, 0.74)),
    url("https://images.unsplash.com/photo-1497366412874-3415097a27e7?auto=format&fit=crop&w=1800&q=80")
      center/cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(103, 114, 255, 0.14), transparent 48%),
    radial-gradient(circle at top right, rgba(255, 120, 178, 0.16), transparent 28%);
  pointer-events: none;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 700px;
  color: #16233d;
}

.hero .eyebrow {
  color: #42577f;
}

.hero h2 {
  font-size: clamp(2.15rem, 4vw, 4.2rem);
  line-height: 1.18;
  margin-bottom: 0.85rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p:last-of-type {
  color: #354b76;
  max-width: 60ch;
  font-size: 1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.35rem;
}

.hero-cta,
.hero-secondary {
  text-decoration: none;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.hero-tags span,
.drawer-nav a {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-sm);
}

.hero-visual {
  min-width: 300px;
  width: 26rem;
  min-height: 26rem;
  position: relative;
  padding: 1.1rem;
  display: flex;
  aspect-ratio: 1 / 1;
  border-radius: 4rem;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1400&q=80")
      center/cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-md);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 20%, rgba(88, 213, 255, 0.24), transparent 13%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(16, 36, 84, 0.2));
  pointer-events: none;
}

.hero-floating-card {
  position: relative;
  z-index: 1;
  width: min(290px, 100%);
  padding: 1rem 1.05rem;
  border-radius: 24px;
  transform: translateY(0);
  animation: floatCard 6.5s ease-in-out infinite;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
}

.hero-floating-card strong {
  display: block;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.hero-floating-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.float-badge {
  position: absolute;
  z-index: 1;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-weight: 600;
  animation: drift 7s ease-in-out infinite;
}

.float-badge--one {
  top: 18px;
  right: 18px;
}

.float-badge--two {
  bottom: 22px;
  left: -16px;
  animation-delay: -3s;
}

.mini-orb {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  filter: blur(0.4px);
  opacity: 0.9;
  animation: orbDrift 8s ease-in-out infinite;
}

.mini-orb--one {
  width: 24px;
  height: 24px;
  top: 16%;
  left: 10%;
  background: linear-gradient(135deg, var(--accent-cyan), white);
}

.mini-orb--two {
  width: 16px;
  height: 16px;
  top: 58%;
  right: 14%;
  background: linear-gradient(135deg, var(--accent-pink), white);
  animation-delay: -2s;
}

.mini-orb--three {
  width: 20px;
  height: 20px;
  bottom: 10%;
  right: 5%;
  background: linear-gradient(135deg, var(--secondary), white);
  animation-delay: -4s;
}

.highlights-row,
.stats-grid,
.content-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.highlights-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.highlight-pill {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.1rem;
}

.highlight-pill span:first-child {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.2rem;
  background: linear-gradient(135deg, rgba(103, 114, 255, 0.16), rgba(255, 120, 178, 0.18));
}

.highlight-pill p {
  margin: 0.2rem 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  padding: 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 164px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  opacity: 0.24;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent 60%);
}

.stat-card--violet {
  background: linear-gradient(
    135deg,
    rgba(113, 108, 255, 0.2),
    rgba(88, 213, 255, 0.18),
    rgba(255, 255, 255, 0.45)
  );
}

.stat-card--blue {
  background: linear-gradient(
    135deg,
    rgba(79, 124, 255, 0.2),
    rgba(88, 213, 255, 0.16),
    rgba(255, 255, 255, 0.45)
  );
}

.stat-card--peach {
  background: linear-gradient(
    135deg,
    rgba(255, 120, 178, 0.18),
    rgba(255, 191, 105, 0.16),
    rgba(255, 255, 255, 0.45)
  );
}

.stat-card p,
.stat-card span {
  margin: 0;
}

.stat-card strong {
  display: block;
  font-size: 2.3rem;
  margin: 0.3rem 0;
}

.stat-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--primary-2);
  box-shadow: var(--shadow-sm);
}

.stat-icon svg {
  width: 28px;
  height: 28px;
}

.progress-track {
  width: 100%;
  height: 8px;
  margin-top: 0.85rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}

.progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.75s ease;
}

.progress-bar--violet {
  background: linear-gradient(90deg, var(--secondary), var(--accent-cyan));
}

.progress-bar--blue {
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
}

.progress-bar--peach {
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-gold));
}

.content-grid {
  grid-template-columns: 1.7fr 1fr;
  align-items: start;
}

.content-grid + section {
  margin-top: 2rem;
}

.panel {
  padding: 1.5rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.title-icon {
  display: inline-flex;
  margin-right: 0.45rem;
}

.collapse-btn,
.btn-secondary,
.action-btn {
  border: 1px solid rgba(100, 114, 173, 0.14);
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
  padding: 0.78rem 1rem;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.collapse-btn:hover,
.btn-secondary:hover,
.action-btn:hover {
  transform: translateY(-2px);
}

.form-grid,
.filter-grid {
  display: grid;
  gap: 1rem;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 0.6rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field span {
  font-size: 0.95rem;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(100, 114, 173, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  padding: 1rem 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8795ba;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(103, 114, 255, 0.26);
}

.field input.error-field,
.field select.error-field {
  border-color: var(--danger);
}

.error {
  color: #d94a72;
  min-height: 1rem;
  font-size: 0.85rem;
}

.upload-field {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(100, 114, 173, 0.12);
  background: rgba(255, 255, 255, 0.56);
}

.upload-preview {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-sm);
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-copy {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.upload-copy input[type="file"] {
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px dashed rgba(103, 114, 255, 0.24);
  background: rgba(255, 255, 255, 0.62);
}

.upload-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.btn-inline {
  justify-self: start;
}

.form-actions {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  border: 0;
  cursor: pointer;
  padding: 0.96rem 1.35rem;
  border-radius: 16px;
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent-pink));
  background-size: 200% 200%;
  animation: pulseGradient 8s ease infinite;
  box-shadow: 0 16px 35px rgba(103, 114, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 42px rgba(103, 114, 255, 0.34);
}

.btn-primary:active,
.btn-secondary:active,
.action-btn:active {
  transform: scale(0.98);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 650ms linear;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.filter-stack {
  display: grid;
  gap: 1rem;
}

.panel--side {
  min-height: 100%;
}

.avatar-rail {
  display: flex;
  margin-top: 1.5rem;
}

.avatar-rail img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  margin-right: -0.85rem;
  box-shadow: var(--shadow-sm);
}

.table-wrap {
  overflow-x: auto;
}

.appointments-table {
  width: 100%;
  border-collapse: collapse;
}

.appointments-table th,
.appointments-table td {
  padding: 1.1rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid rgba(100, 114, 173, 0.1);
}

.appointments-table th {
  color: var(--text-soft);
  font-weight: 600;
}

.appointments-table th:last-child {
  text-align: center;
}

.appointments-table td:last-child {
  text-align: right;
}

.appointments-table tbody tr {
  transition:
    background var(--motion-fast),
    transform var(--motion-fast);
}

.appointments-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.5);
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
}

.subline {
  display: block;
  color: var(--text-soft);
  font-size: 0.88rem;
  margin-top: 0.18rem;
}

.meta-line {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  font-size: 0.84rem;
  text-transform: capitalize;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.badge-booked {
  background: rgba(88, 213, 255, 0.18);
  color: #0f7aa2;
}

.badge-confirmed {
  background: rgba(77, 219, 152, 0.18);
  color: #197a52;
}

.badge-completed {
  background: rgba(255, 191, 105, 0.2);
  color: #9e650d;
}

.badge-cancelled {
  background: rgba(255, 108, 140, 0.18);
  color: #a32445;
}

.action-group {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.mobile-cards {
  display: none;
  gap: 0.9rem;
}

.appointment-card {
  padding: 1.1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-md);
}

.appointment-card-head,
.appointment-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.appointment-card p {
  margin: 0.28rem 0 0;
  color: var(--text-soft);
}

.collapsible-body[hidden] {
  display: none;
}

.mobile-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(86vw, 320px);
  padding: 1rem;
  background: rgba(247, 250, 255, 0.96);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-lg);
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  z-index: 40;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 59, 107, 0.18);
  z-index: 35;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-nav {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.drawer-nav a {
  color: var(--text);
  text-decoration: none;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity var(--motion-fast),
    transform var(--motion-fast);
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes pulseGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -16px, 0) scale(1.05);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes orbDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -8px, 0);
  }
}

@media (max-width: 980px) {
  .highlights-row,
  .stats-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-copy,
  .hero-visual {
    max-width: none;
  }

  .hero-visual {
    min-width: 0;
    width: 24rem;
    min-height: 24rem;
    aspect-ratio: 16 / 10;
    background-position: center;
  }
}

@media (max-width: 760px) {
  .app {
    width: min(calc(100% - 0.6rem), var(--max-width));
    padding-top: 0.6rem;
  }

  .topbar {
    border-radius: 22px;
    padding: 0.9rem 1rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .topbar-badge,
  .contrast-toggle span:first-child,
  .appointments-table,
  .ambient {
    display: none;
  }

  .hero {
    padding: 1.4rem;
    min-height: auto;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero-actions,
  .hero-tags,
  .form-actions,
  .appointment-card-foot,
  .appointment-card-head,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-visual {
    min-width: 0;
    width: 40rem;
    min-height: 10rem;
    aspect-ratio: 16 / 11;
    padding: 0.85rem;
    border-radius: 2.25rem;
  }

  .float-badge {
    position: static;
    display: inline-flex;
    margin-bottom: 0.75rem;
    align-self: flex-start;
    font-size: 0.95rem;
  }

  .hero-floating-card {
    width: min(260px, calc(100% - 0.4rem));
    padding: 0.9rem 0.95rem;
    border-radius: 20px;
  }

  .hero-floating-card p {
    line-height: 1.45;
  }

  .form-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .upload-field {
    flex-direction: column;
    align-items: stretch;
  }

  .mobile-cards {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
