/* ==========================================================================
   Staff portal: sign-in screens, navigation, dashboard pages and dialogs.
   Builds on styles.css (colours, type, buttons, fields) and keeps the same
   light look as the website: ivory and white with the one azure accent.
   ========================================================================== */

.staff-page { background: var(--bg); }
.portal-loading { display: grid; place-items: center; gap: 12px; min-height: 100vh; padding: 24px; color: var(--muted); font-weight: 600; }

.btn-xs { padding: 0.38rem 0.75rem; font-size: 0.8rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a5301f; box-shadow: 0 12px 24px -12px rgb(192 57 43 / 0.55); }
.code-block { display: block; padding: 10px 12px; border-radius: 10px; background: var(--tint); word-break: break-all; }

/* The clinic name beside the logo (sign-in screens and the sidebar) */
.brand-text { display: grid; line-height: 1; }
.brand-text .logo-name { color: var(--ink); }

/* Sign-in screens ----------------------------------------------------------- */

.auth { display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 100vh; }
.auth-brand {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 48px clamp(24px, 5vw, 72px);
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: linear-gradient(160deg, var(--accent-faint), var(--tint) 55%, var(--bg));
  color: var(--ink-soft);
}
/* Two soft glows drift slowly behind the copy */
.auth-brand::before,
.auth-brand::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(50px);
  animation: drift-a 18s ease-in-out infinite alternate;
}
.auth-brand::before { top: -180px; right: -140px; width: 500px; height: 500px; background: radial-gradient(circle, rgb(58 111 216 / 0.2), transparent 65%); }
.auth-brand::after { bottom: -220px; left: -160px; width: 540px; height: 540px; background: radial-gradient(circle, rgb(255 255 255 / 0.95), transparent 65%); animation-name: drift-b; }
.auth-logo { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; animation: fade-in 0.9s var(--ease) both; }
.auth-logo .logo-mark { width: 46px; height: 46px; }
.auth-copy { animation: rise 1s var(--ease-out) 0.1s both; }
.auth-copy h1 { margin: 0 0 0.35em; color: var(--ink); font-size: clamp(2.8rem, 5vw, 4.6rem); line-height: 1; }
.auth-copy p:last-child { max-width: 30em; margin: 0; font-size: 1.08rem; }
.auth-points { display: grid; gap: 14px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; animation: slide-in-left 0.8s var(--ease-out) both; }
.auth-points li:nth-child(1) { animation-delay: 0.25s; }
.auth-points li:nth-child(2) { animation-delay: 0.35s; }
.auth-points li:nth-child(3) { animation-delay: 0.45s; }
.auth-points .icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.auth-main { display: grid; place-items: center; padding: 48px 24px; background: var(--surface); }
.auth-card { display: grid; gap: 18px; width: min(420px, 100%); animation: rise 0.7s var(--ease-out) both; }
.auth-card h2 { margin: 0; font-family: var(--font-display); font-size: 2.5rem; }
.auth-card > p { margin: 0; }
.auth-error:empty { display: none; }
.auth-error .alert { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--muted); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.back-link:hover { color: var(--accent-strong); }

.password-field { position: relative; }
.password-field input { padding-right: 3rem; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}
.password-toggle:hover { background: var(--tint); color: var(--ink); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { gap: 24px; padding: 28px 20px 32px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-copy h1 { font-size: 2.6rem; }
  .auth-points { display: none; }
  .auth-main { align-items: start; padding: 32px 20px 48px; }
}

/* Portal layout ---------------------------------------------------------------- */

.portal {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
  /* Keeps the frosted sidebar column (and its bright edge) going however long the page is */
  background: linear-gradient(to right, var(--glass-strong) 251px, var(--glass-border) 251px 252px, transparent 252px);
}
.portal-side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 24px 14px;
  color: var(--ink-soft);
}
.portal-brand { display: flex; align-items: center; gap: 0.65rem; padding: 0 8px; text-decoration: none; }
.portal-brand .logo-mark { width: 36px; height: 36px; }
.portal-brand .logo-name { font-size: 1.18rem; }
.portal-brand .logo-sub { font-size: 0.56rem; letter-spacing: 0.2em; }
.portal-nav { display: grid; gap: 4px; }
.portal-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.portal-nav a:hover { background: var(--tint); color: var(--ink); transform: translateX(3px); }
.portal-nav a.active { background: var(--accent-soft); color: var(--accent-strong); }
.portal-nav a.active::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.nav-count {
  min-width: 22px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  line-height: 22px;
  text-align: center;
  animation: pop 0.5s var(--ease-out);
}
.portal-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); }
.portal-user .avatar { width: 40px; height: 40px; font-size: 0.85rem; --c: var(--accent); box-shadow: none; }
.portal-user-text { min-width: 0; }
.portal-user-text strong { display: block; overflow: hidden; color: var(--ink); font-size: 0.9rem; text-overflow: ellipsis; white-space: nowrap; }
.portal-user-text span { color: var(--muted); font-size: 0.78rem; }
.portal-user .icon-btn { margin-left: auto; }
.portal-main { min-width: 0; padding: 36px clamp(16px, 3vw, 44px) 72px; outline: none; }
.view { animation: rise 0.55s var(--ease-out) both; }

@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; background: none; }
  .portal-side {
    z-index: 30;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    height: auto;
    padding: 10px 12px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    background: rgb(255 255 255 / 0.92);
    backdrop-filter: blur(12px);
  }
  .portal-brand { padding: 0; }
  .portal-brand .brand-text, .portal-nav a span, .portal-user-text, .portal-user .avatar { display: none; }
  .portal-nav { display: flex; gap: 2px; }
  .portal-nav a { padding: 10px; }
  .portal-nav a:hover { transform: none; }
  .portal-nav a.active::before { display: none; }
  .portal-nav .nav-count { position: absolute; top: 2px; right: 0; min-width: 18px; padding: 0 5px; font-size: 0.68rem; line-height: 18px; }
  .portal-user { margin: 0 0 0 auto; padding: 0; border: 0; background: none; }
  .portal-main { padding-top: 24px; }
}

/* Page headers, stats and blocks ------------------------------------------------- */

.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.view-head h1 { margin: 0; font-size: clamp(2.4rem, 4vw, 3.3rem); line-height: 1; }
.view-kicker { margin: 0 0 8px; color: var(--accent); font-family: var(--font-label); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  display: grid;
  gap: 4px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  animation: rise 0.6s var(--ease-out) both;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card:nth-child(2) { animation-delay: 0.06s; }
.stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-card:nth-child(4) { animation-delay: 0.18s; }
.stat-label { color: var(--muted); font-family: var(--font-label); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
/* Dashboard figures use Jost's clear numerals: Bodoni's 1 reads too much like an I at a glance */
.stat-value { font-family: var(--font-label); font-size: 2.7rem; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
.stat-note { color: var(--muted); font-size: 0.85rem; }
.stat-card.highlight {
  position: relative;
  overflow: hidden;
  border-color: var(--accent-soft);
  background: linear-gradient(150deg, var(--accent-faint), var(--surface) 70%);
}
.stat-card.highlight::after {
  content: '';
  position: absolute;
  top: -70px;
  right: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(58 111 216 / 0.16), transparent 70%);
  animation: glow-breathe 6s ease-in-out infinite alternate;
}
.stat-card.highlight .stat-label { color: var(--accent-strong); }
.stat-card.highlight .stat-value { color: var(--accent); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.block { padding: 24px; border: 1px solid var(--glass-border); border-radius: 26px; background: var(--glass-strong); box-shadow: var(--shadow-sm); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.block-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.65rem; }
.count-pill { padding: 0.15rem 0.65rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.85rem; font-weight: 800; }
.empty-block { display: grid; justify-items: center; gap: 4px; padding: 32px 16px; border: 1.5px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; }
.empty-block .icon { width: 40px; height: 40px; margin-bottom: 6px; padding: 9px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.empty-block strong { color: var(--ink); }
@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: 1fr; }
}

/* Request cards and today's list ---------------------------------------------------- */

.request-list { display: grid; gap: 12px; }
.request-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg);
  animation: slide-in-left 0.6s var(--ease-out) both;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.request-card:hover { border-color: var(--accent-soft); box-shadow: var(--shadow-sm); }
.request-card:nth-child(2) { animation-delay: 0.06s; }
.request-card:nth-child(3) { animation-delay: 0.12s; }
.request-card:nth-child(4) { animation-delay: 0.18s; }
.date-chip {
  display: grid;
  place-items: center;
  align-content: center;
  width: 64px;
  height: 76px;
  border: 1px solid var(--accent-soft);
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}
.date-chip strong { color: var(--accent); font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; letter-spacing: 0; line-height: 1.05; }
.request-when { margin: 0; color: var(--accent-strong); font-size: 0.88rem; font-weight: 700; }
.request-card h3 { margin: 2px 0 6px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.request-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; color: var(--ink-soft); font-size: 0.86rem; }
.request-meta a { display: inline-flex; align-items: center; gap: 0.3rem; text-decoration: none; }
.request-meta a:hover { color: var(--accent-strong); text-decoration: underline; }
.request-meta .icon { width: 1em; height: 1em; color: var(--muted); }
.request-note { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent); border-radius: 4px 12px 12px 4px; background: var(--surface); color: var(--ink-soft); font-size: 0.9rem; }
.request-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.request-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.request-age { color: var(--muted); font-size: 0.8rem; }
@media (max-width: 520px) {
  .request-card { grid-template-columns: 1fr; }
  .date-chip { grid-auto-flow: column; gap: 8px; width: auto; height: auto; padding: 8px 14px; justify-content: start; }
}

.who-chip {
  --c: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.12rem 0.6rem 0.12rem 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 10%, #fff);
  color: color-mix(in srgb, var(--c) 70%, var(--ink));
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.who-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.today-list { display: grid; gap: 4px; }
.today-item {
  display: grid;
  grid-template-columns: 74px 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s, transform 0.3s var(--ease);
}
.today-item:hover { background: var(--tint); transform: translateX(3px); }
.today-time { font-size: 0.9rem; font-weight: 700; }
.today-bar { align-self: stretch; min-height: 36px; border-radius: 4px; background: var(--c); }
.today-item.is-pending .today-bar { background: repeating-linear-gradient(180deg, var(--c) 0 5px, transparent 5px 9px); }
.today-text { display: grid; min-width: 0; }
.today-text span { overflow: hidden; color: var(--muted); font-size: 0.85rem; text-overflow: ellipsis; white-space: nowrap; }

/* Status badges ------------------------------------------------------------------------ */

.status { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.status.pending { background: var(--amber-soft); color: var(--amber); }
.status.confirmed { background: var(--accent-soft); color: var(--accent-strong); }
.status.declined { background: var(--danger-soft); color: var(--danger); }
.status.cancelled { background: #eef0f4; color: var(--muted); }
.mail-state { font-size: 0.82rem; font-weight: 700; }
.mail-state.saved { color: var(--amber); }
.mail-state.sent { color: var(--accent-strong); }
.mail-state.failed { color: var(--danger); }

/* Filters and tables ----------------------------------------------------------------- */

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.filters .field { min-width: 160px; }
.filters .field.grow { flex: 1; min-width: 220px; }
.filters input, .filters select, .compact-select { height: 44px; padding: 0 0.8rem; }
.compact-select { min-width: 200px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.compact-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th {
  background: var(--tint);
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color 0.2s; animation: fade-in 0.5s ease both; }
.data-table tbody tr:hover { background: var(--accent-faint); }
.data-table tr.is-declined td, .data-table tr.is-cancelled td, .data-table tr.is-inactive td { color: var(--muted); }
.cell-sub { margin-top: 2px; color: var(--muted); font-size: 0.82rem; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.table-count { margin: 10px 4px 0; color: var(--muted); font-size: 0.85rem; }
.person { display: flex; align-items: center; gap: 12px; }
.person .avatar { width: 40px; height: 40px; font-size: 0.82rem; }
.you { padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 0.7rem; font-weight: 800; }

/* Schedule ------------------------------------------------------------------------------ */

.schedule-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.week-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.week-label { margin: 0 0 0 8px; font-family: var(--font-display); font-size: 1.6rem; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 16px; color: var(--ink-soft); font-size: 0.85rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.legend .legend-requested { border: 1.5px dashed var(--muted); background: repeating-linear-gradient(135deg, var(--tint) 0 3px, #fff 3px 6px); }
.schedule-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.schedule { min-width: 880px; }
.schedule-head { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.schedule-head > div { display: grid; justify-items: center; padding: 12px 6px; color: var(--muted); font-family: var(--font-label); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.schedule-head strong { color: var(--ink); font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; letter-spacing: 0; line-height: 1.1; text-transform: none; }
.schedule-head .is-today strong {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.schedule-body { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); height: calc(var(--hours) * var(--hour-px)); }
.schedule-times { position: relative; }
.schedule-times span { position: absolute; right: 10px; margin-top: 4px; color: var(--muted); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.schedule-day {
  position: relative;
  border-left: 1px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% var(--hour-px);
}
.schedule-day.is-today { background-color: var(--accent-faint); }
.event {
  --c: var(--accent);
  position: absolute;
  left: calc(var(--lane) * (100% / var(--lanes)) + 3px);
  width: calc(100% / var(--lanes) - 6px);
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  overflow: hidden;
  border: 0;
  border-left: 3px solid var(--c);
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 13%, #fff);
  color: var(--ink);
  font-size: 0.74rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.3s var(--ease-out);
  animation: fade-in 0.5s ease both;
}
.event:hover { z-index: 2; box-shadow: var(--shadow); transform: translateY(-1px); }
.event strong { overflow: hidden; font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.event span { overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.event .event-time { color: color-mix(in srgb, var(--c) 70%, var(--ink)); font-weight: 700; }
.event.is-medium .event-service { display: none; }
.event.is-short { flex-direction: row; align-items: center; gap: 6px; padding-block: 0; }
.event.is-short .event-service { display: none; }
.event.is-short .event-time { flex: none; }
.event.is-pending {
  border-left-style: dashed;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, #fff) 0 7px, #fff 7px 14px);
  outline: 1.5px dashed color-mix(in srgb, var(--c) 55%, transparent);
  outline-offset: -1.5px;
}
.now-line { position: absolute; left: 0; right: 0; z-index: 3; height: 2px; background: var(--danger); pointer-events: none; }
.now-line::before { content: ''; position: absolute; top: -4px; left: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.schedule-empty { margin: 0; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

/* Emails, team and account ----------------------------------------------------------- */

.notice {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid #f1dfbf;
  border-radius: 20px;
  background: var(--amber-soft);
  animation: rise 0.5s var(--ease-out) both;
}
.notice > .icon { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--surface); color: var(--amber); }
.notice strong { display: block; margin-bottom: 2px; }
.notice p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.email-body { max-height: 50vh; margin: 0; padding: 18px; overflow: auto; border-radius: 16px; background: var(--bg); font-family: var(--font); font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; }

.role-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.role-guide div { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font-size: 0.88rem; }
.role-guide span { color: var(--muted); }
@media (max-width: 760px) {
  .role-guide { grid-template-columns: 1fr; }
}

.secret { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--accent-soft); border-radius: 14px; background: var(--accent-faint); }
.secret code { color: var(--accent-strong); font-size: 1.3rem; font-weight: 700; letter-spacing: 0.05em; }

.account-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.profile { display: grid; justify-items: start; gap: 6px; }
.profile h2 { margin: 10px 0 0; font-family: var(--font-display); font-size: 1.9rem; }
.profile .muted { margin: 0 0 12px; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.password-form { display: grid; gap: 16px; max-width: 460px; }
.password-form .btn { justify-self: start; }
#password-error:empty { display: none; }
#password-error .alert { margin: 0; }
@media (max-width: 900px) {
  .account-grid { grid-template-columns: 1fr; }
}

/* Dialogs and toasts --------------------------------------------------------------------- */

.modal {
  width: min(540px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px -24px rgb(37 45 60 / 0.35);
}
.modal-wide { width: min(640px, calc(100% - 32px)); }
.modal::backdrop { background: rgb(244 247 252 / 0.7); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in 0.45s var(--ease-out); }
.modal-inner { display: flex; flex-direction: column; max-height: inherit; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.8rem; }
.modal-body { display: grid; gap: 16px; padding: 18px 24px; overflow-y: auto; }
.modal-body p { margin: 0; }
.modal-error { padding: 0 24px; }
.modal-error .alert { margin: 0 0 12px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 4px 24px 22px; }
.booking-brief { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--tint); font-size: 0.92rem; }
.booking-brief span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-soft); }
.detail-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.detail-list { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.detail-list dt { color: var(--muted); font-family: var(--font-label); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.detail-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.detail-list a { color: var(--accent-strong); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.detail-actions .btn { margin-top: 12px; }
@media (max-width: 520px) {
  .detail-list { grid-template-columns: 1fr; gap: 2px; }
  .detail-list dd { margin-bottom: 10px; }
}

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 400px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: toast-in 0.5s var(--ease-out);
  transition: opacity 0.35s, transform 0.35s var(--ease);
}
.toast .icon { margin-top: 1px; color: var(--accent); }
.toast-error { border-left-color: var(--danger); }
.toast-error .icon { color: var(--danger); }
.toast.leaving { opacity: 0; transform: translateX(24px); }

@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(32px); } }
@keyframes drift-a { to { transform: translate(-60px, 50px) scale(1.08); } }
@keyframes drift-b { to { transform: translate(70px, -40px) scale(1.05); } }

@media (prefers-reduced-motion: reduce) {
  .auth-brand::before, .auth-brand::after, .stat-card.highlight::after { animation: none; }
}
