/* ============================================================
   Crewed — Design System
   Palette: plum #584052 · seafoam #8ec5bf · amber #fbbc66 · coral #f87c50
   ============================================================ */

:root {
  --plum: #584052;
  --plum-deep: #46333f;
  --plum-ink: #3a2a35;
  --seafoam: #8ec5bf;
  --seafoam-dark: #5fa49d;
  --seafoam-deep: #3f7f78;
  --seafoam-tint: #e6f2f0;
  --amber: #fbbc66;
  --amber-deep: #b27425;
  --amber-tint: #fef0db;
  --coral: #f87c50;
  --coral-dark: #e5602f;
  --coral-tint: #fee7dd;

  --bg: #f7f4f1;
  --card: #ffffff;
  --ink: #2e2630;
  --muted: #7d7283;
  --line: #e9e2e6;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(58, 42, 53, 0.06), 0 8px 24px rgba(58, 42, 53, 0.07);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--plum-ink);
  margin: 0 0 .5rem;
  letter-spacing: -0.01em;
}

a { color: var(--coral-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- App shell ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--plum) 0%, var(--plum-deep) 100%);
  color: #efe7ec;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  color: #fff;
  padding: 4px 12px 18px;
  display: block;
}
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--coral); }

.sidebar nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #d8cbd4;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: .92rem;
  transition: background .15s, color .15s;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: rgba(248, 124, 80, 0.18); color: #fff; }
.sidebar nav a.active svg { stroke: var(--coral); }
.sidebar nav svg { width: 18px; height: 18px; stroke: #b9a8b3; flex-shrink: 0; }

.nav-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.3);
  padding: 14px 12px 4px;
}

.settings-nav {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.settings-nav a {
  padding: 8px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.settings-nav a:hover { color: var(--text); background: var(--line); }
.settings-nav a.active { color: var(--text); border-bottom-color: var(--coral); }

.sidebar-user {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 12px 4px;
  font-size: .85rem;
}
.sidebar-user .who { color: #fff; font-weight: 600; }
.sidebar-user .role-tag { color: var(--seafoam); text-transform: capitalize; font-size: .78rem; }
.sidebar-user a { color: #d8cbd4; font-size: .82rem; }

.main { flex: 1; min-width: 0; padding: 28px 36px 56px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.topbar h1 { font-size: 1.55rem; margin: 0; }
.topbar .sub { color: var(--muted); font-size: .9rem; margin-top: 2px; }

/* ---------- Cards / layout ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.card h2 { font-size: 1.05rem; margin-bottom: 14px; }
.card .card-note { color: var(--muted); font-size: .85rem; margin-top: -8px; margin-bottom: 14px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--coral);
}
.stat.seafoam::before { background: var(--seafoam); }
.stat.amber::before { background: var(--amber); }
.stat.plum::before { background: var(--plum); }
.stat .num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--plum-ink); line-height: 1.1; }
.stat .label { color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--coral-dark); text-decoration: none; }
.btn:active { transform: scale(.98); }

.btn-soft { background: var(--seafoam-tint); color: var(--seafoam-deep); }
.btn-soft:hover { background: #d4e9e6; }
.btn-ghost { background: transparent; color: var(--plum); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: #f1ebef; }
.btn-danger { background: transparent; color: var(--coral-dark); box-shadow: inset 0 0 0 1.5px var(--coral-tint); }
.btn-danger:hover { background: var(--coral-tint); }
.btn-sm { padding: 6px 14px; font-size: .82rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Forms ---------- */

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--plum-ink);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--seafoam-dark);
  box-shadow: 0 0 0 3px rgba(142, 197, 191, 0.25);
}
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.field .hint strong { color: var(--seafoam-deep); }

.form-row { display: flex; gap: 14px; }
.form-row .field { flex: 1; }

.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.inline-form input { width: 90px; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: .88rem; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .85rem;
  cursor: pointer;
  user-select: none;
}
.checks label:has(input:checked) {
  background: var(--seafoam-tint);
  border-color: var(--seafoam-dark);
  color: var(--seafoam-deep);
  font-weight: 600;
}
.checks input { accent-color: var(--seafoam-dark); }

/* ---------- Tables ---------- */

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1.5px solid var(--line);
}
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #faf7f5; }
.table .actions { text-align: right; white-space: nowrap; }
.table .strong { font-weight: 600; color: var(--plum-ink); }

/* ---------- Badges & chips ---------- */

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-open { background: var(--seafoam-tint); color: var(--seafoam-deep); }
.badge-filled { background: #ece4ea; color: var(--plum); }
.badge-confirmed { background: var(--seafoam-dark); color: #fff; }
.badge-requested, .badge-pending, .badge-submitted { background: var(--amber-tint); color: var(--amber-deep); }
.badge-approved { background: var(--seafoam-tint); color: var(--seafoam-deep); }
.badge-cancelled, .badge-declined, .badge-disabled { background: #efeaed; color: var(--muted); }
.badge-active { background: var(--seafoam-tint); color: var(--seafoam-deep); }

.chip {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--plum);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: .76rem;
  font-weight: 500;
  margin: 1px 2px 1px 0;
}
.chip-warn { background: var(--amber-tint); border-color: var(--amber); color: var(--amber-deep); }
.chip-approved { background: var(--seafoam-tint); border-color: var(--seafoam-dark); color: var(--seafoam-deep); }
.chip-declined { background: var(--coral-tint); border-color: var(--coral); color: var(--coral-dark); }
.chip-pending { background: var(--amber-tint); border-color: var(--amber); color: var(--amber-deep); }

/* ---------- Profile picture styles ---------- */
.profile-pic-container {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}
.profile-pic-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-pic-placeholder {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
}

.rate { font-family: var(--font-display); font-weight: 700; color: var(--plum-ink); }
.rate small { color: var(--muted); font-weight: 400; font-family: var(--font-body); }

/* ---------- Flash messages ---------- */

.flashes { position: fixed; top: 18px; right: 18px; z-index: 50; max-width: 380px; }
.flash {
  background: var(--plum-ink);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 8px;
  font-size: .88rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--seafoam);
  animation: slidein .25s ease;
}
.flash-error { border-left-color: var(--coral); }
.flash-warning { border-left-color: var(--amber); }
@keyframes slidein { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ---------- Empty states ---------- */

.empty {
  text-align: center;
  padding: 38px 20px;
  color: var(--muted);
}
.empty .mark {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--seafoam-tint);
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--seafoam-deep);
  font-size: 1.2rem;
}
.empty p { margin: 0 0 12px; }

/* ---------- Onboarding checklist ---------- */

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.steps li:last-child { border-bottom: none; }
.steps .tick {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--bg);
  border: 1.5px solid var(--line);
  color: var(--muted);
}
.steps li.done .tick { background: var(--seafoam); border-color: var(--seafoam); color: #fff; }
.steps li.done span { color: var(--muted); text-decoration: line-through; }

/* ---------- Shift cards (employee browse) ---------- */

.shift-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}
.shift-card .date-block {
  width: 58px;
  text-align: center;
  background: var(--plum);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  flex-shrink: 0;
}
.shift-card .date-block .mon { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--amber); }
.shift-card .date-block .day { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; line-height: 1.1; }
.shift-card .body { flex: 1; min-width: 0; }
.shift-card .title { font-family: var(--font-display); font-weight: 600; color: var(--plum-ink); font-size: 1rem; }
.shift-card .meta { color: var(--muted); font-size: .84rem; margin-top: 2px; }
.shift-card .pay { text-align: right; flex-shrink: 0; }
.shift-card .pay .rate { font-size: 1.15rem; }
.shift-card.dim { opacity: .65; }

.section-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 26px 0 10px;
}
.section-label:first-child { margin-top: 0; }

/* ---------- Public / landing ---------- */

.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 6vw, 72px);
}
.public-nav .brand { padding: 0; font-size: 1.5rem; color: var(--plum-ink); }
.public-nav .links { display: flex; gap: 12px; align-items: center; }

.hero {
  padding: clamp(40px, 8vw, 96px) clamp(20px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: var(--coral); }
.hero .lede { color: var(--muted); font-size: 1.08rem; max-width: 480px; margin-bottom: 28px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-art { position: relative; min-height: 320px; }
.mock-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  width: 290px;
  position: absolute;
}
.mock-card .mc-row { display: flex; justify-content: space-between; align-items: center; }
.mock-card .mc-title { font-family: var(--font-display); font-weight: 600; color: var(--plum-ink); }
.mock-card .mc-sub { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.mock-1 { top: 8%; left: 4%; z-index: 2; }
.mock-2 { top: 46%; left: 26%; z-index: 3; }
.hero-blob {
  position: absolute;
  inset: -4% -8%;
  background:
    radial-gradient(38% 44% at 72% 24%, rgba(142, 197, 191, .5), transparent 70%),
    radial-gradient(42% 48% at 28% 76%, rgba(251, 188, 102, .45), transparent 70%),
    radial-gradient(34% 38% at 80% 80%, rgba(248, 124, 80, .35), transparent 70%);
  border-radius: 50%;
  filter: blur(6px);
  z-index: 1;
}

.feature-band {
  background: var(--plum);
  color: #e8dde4;
  padding: clamp(44px, 7vw, 80px) clamp(20px, 6vw, 72px);
}
.feature-band .inner { max-width: 1180px; margin: 0 auto; }
.feature-band h2 { color: #fff; font-size: 1.7rem; margin-bottom: 28px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: 22px;
}
.feature .dot-row { display: flex; gap: 5px; margin-bottom: 14px; }
.feature .dot-row span { width: 10px; height: 10px; border-radius: 50%; }
.feature h3 { color: #fff; font-size: 1.02rem; }
.feature p { font-size: .88rem; color: #cdbcc7; margin: 0; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  padding: 30px 16px;
}

/* ---------- Auth pages ---------- */

body.auth {
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(142, 197, 191, .25), transparent 60%),
    radial-gradient(50% 70% at 10% 90%, rgba(251, 188, 102, .22), transparent 60%),
    var(--bg);
}
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.auth-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 34px 36px;
  width: 100%;
  max-width: 430px;
}
.auth-card .brand { color: var(--plum-ink); padding: 0 0 6px; font-size: 1.6rem; text-align: center; display: block; }
.auth-card h1 { font-size: 1.22rem; text-align: center; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: .88rem; margin: 0 0 22px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: .87rem; color: var(--muted); }

/* ---------- Calendar (client shifts) ---------- */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-head h2 { margin: 0; font-size: 1.15rem; }

.cal {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
}
.cal th {
  text-align: center;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 6px;
}
.cal td {
  vertical-align: top;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 7px 8px;
  height: 92px;
  box-shadow: var(--shadow);
}
.cal td.other { background: transparent; box-shadow: none; }
.cal td.today-cell { outline: 2px solid var(--seafoam-dark); outline-offset: -2px; }
.cal .daynum { font-family: var(--font-display); font-weight: 600; font-size: .85rem; color: var(--plum-ink); }
.cal td.other .daynum { color: var(--line); }
.cal .today-pill { background: var(--seafoam-dark); color: #fff; border-radius: 999px; padding: 1px 8px; }

a.loc-chip {
  display: block;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: .73rem;
  font-weight: 600;
  margin-top: 5px;
  background: var(--seafoam-tint);
  color: var(--seafoam-deep);
  line-height: 1.3;
}
a.loc-chip:hover { text-decoration: none; filter: brightness(.96); }
a.loc-chip.needs { background: var(--amber-tint); color: var(--amber-deep); }
a.loc-chip .sub { display: block; font-weight: 400; opacity: .85; }

/* ---------- Detail rows (parking / check-in) ---------- */

.detail-row { display: flex; gap: 10px; padding: 6px 0; font-size: .9rem; align-items: baseline; }
.detail-row .k {
  flex-shrink: 0;
  width: 110px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.detail-row .v { color: var(--ink); }
.detail-row .v.unset { color: var(--muted); font-style: italic; }

/* ---------- Notifications ---------- */

.nav-badge {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  padding: 1px 7px;
  margin-left: 4px;
}

.msg {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 12px;
  border-left: 4px solid var(--line);
}
.msg.new { border-left-color: var(--coral); }
.msg .msg-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.msg .msg-from { font-weight: 600; color: var(--plum-ink); font-size: .92rem; }
.msg .msg-when { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.msg .msg-context { color: var(--seafoam-deep); font-size: .8rem; margin-bottom: 6px; }
.msg .msg-body { font-size: .92rem; white-space: pre-line; }

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 14px;
  }
  .brand { padding: 0 10px 0 0; font-size: 1.2rem; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .sidebar nav a { padding: 7px 11px; font-size: .84rem; }
  .sidebar nav svg { display: none; }
  .sidebar-user { border-top: none; padding: 0 0 0 10px; display: flex; gap: 10px; align-items: baseline; }
  .main { padding: 20px 16px 48px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .features { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
  .table { display: block; overflow-x: auto; }
  .cal { min-width: 640px; }
  .cal-scroll { overflow-x: auto; }
}

/* ---------- Accordions & View Toggles for Grouped Shifts ---------- */

.toggle-pill-group {
  display: inline-flex;
  background: var(--line);
  padding: 4px;
  border-radius: 999px;
  gap: 2px;
}

.toggle-pill-item {
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toggle-pill-item:hover {
  color: var(--plum-ink);
  text-decoration: none;
}

.toggle-pill-item.active {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 2px 4px rgba(248, 124, 80, 0.2);
}

.accordion-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.accordion-item:hover {
  border-color: var(--seafoam-dark);
  box-shadow: 0 4px 12px rgba(95, 164, 157, 0.08);
}

.accordion-item > details > summary {
  padding: 16px 20px;
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--plum-ink);
  user-select: none;
  outline: none;
  background: var(--card);
  transition: background 0.15s ease;
}

.accordion-item > details > summary::-webkit-details-marker {
  display: none;
}

.accordion-item > details > summary:hover {
  background: var(--bg);
}

.accordion-item > details[open] > summary {
  border-bottom: 1px solid var(--line);
}

.accordion-item .summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-item .summary-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-item .arrow {
  font-size: 0.8rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.accordion-item > details[open] > summary .arrow {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 20px;
  background: #fff;
}

/* Sub-accordions for dates */
.sub-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-accordion-item {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.sub-accordion-item > details > summary {
  padding: 12px 16px;
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--plum);
  user-select: none;
  outline: none;
  background: var(--bg);
  transition: background 0.15s ease;
}

.sub-accordion-item > details > summary::-webkit-details-marker {
  display: none;
}

.sub-accordion-item > details > summary:hover {
  background: var(--coral-tint);
}

.sub-accordion-item > details[open] > summary {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.sub-accordion-item > details[open] > .sub-accordion-content {
  background: var(--card);
  padding: 16px;
}

.sub-accordion-item .arrow-sub {
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.sub-accordion-item > details[open] > summary .arrow-sub {
  transform: rotate(180deg);
}

/* ---------- Page Tabs ---------- */
.page-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar { display: none; }

.page-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.page-tab-btn:hover { color: var(--plum-ink); }
.page-tab-btn.active { color: var(--coral-dark); border-bottom-color: var(--coral); }

.page-tab-panel { display: none; }
.page-tab-panel.active { display: block; }

