/* ============================================================
   Pilates Studio — Design System "Studio Bloom"
   Warm, elegant, wellness-first
   Fonts: DM Serif Display (headings) + DM Sans (body)
   ============================================================ */

:root {
  /* ── WARM NEUTRALS ───────────────────────────────────── */
  --cream:       hsl(42 33% 97%);     /* page background */
  --linen:       hsl(38 26% 93%);     /* subtle section bg */
  --warm-bg:     hsl(36 22% 89%);     /* input backgrounds */
  --parchment:   hsl(35 18% 83%);     /* subtle border tint */

  /* ── ROSE (primary accent) ───────────────────────────── */
  --rose:        hsl(348 44% 68%);
  --rose-light:  hsl(348 52% 92%);
  --rose-deep:   hsl(348 42% 54%);
  --rose-glow:   hsl(348 44% 68% / 0.18);
  --rose-subtle: hsl(348 44% 68% / 0.08);

  /* ── SAGE GREEN (success / health) ──────────────────── */
  --sage:        hsl(148 26% 46%);
  --sage-light:  hsl(148 30% 91%);
  --sage-glow:   hsl(148 26% 46% / 0.14);

  /* ── LAVENDER (secondary accent) ─────────────────────── */
  --lavender:       hsl(258 36% 65%);
  --lavender-light: hsl(258 36% 93%);

  /* ── TERRACOTTA (warm accent) ────────────────────────── */
  --terra:       hsl(18 50% 61%);
  --terra-light: hsl(18 50% 92%);

  /* ── SKY (info) ──────────────────────────────────────── */
  --sky:         hsl(200 55% 52%);
  --sky-light:   hsl(200 55% 91%);

  /* ── TEXT ────────────────────────────────────────────── */
  --text-1: hsl(25 22% 14%);
  --text-2: hsl(25 12% 40%);
  --text-3: hsl(25  9% 60%);

  /* ── BORDERS ─────────────────────────────────────────── */
  --border:       hsl(35 20% 86%);
  --border-hover: hsl(35 20% 72%);

  /* ── SEMANTIC ────────────────────────────────────────── */
  --warn:      hsl(36 82% 54%);
  --warn-bg:   hsl(36 82% 54% / 0.10);
  --danger:    hsl(358 56% 58%);
  --danger-bg: hsl(358 56% 58% / 0.09);

  /* ── LEVEL COLORS ────────────────────────────────────── */
  --level-basic:    hsl(220 26% 54%);
  --level-beginner: var(--sage);
  --level-int1:     var(--sky);
  --level-int2:     var(--lavender);
  --level-advanced: var(--terra);

  /* ── LAYOUT ──────────────────────────────────────────── */
  --radius:    14px;
  --radius-sm:  9px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* ── TYPOGRAPHY ──────────────────────────────────────── */
  --font:         'DM Sans', 'Inter', system-ui, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* ── SHADOWS (warm-tinted, no cold grays) ────────────── */
  --shadow-xs: 0 1px 3px hsl(25 20% 14% / 0.05),
               0 1px 2px hsl(25 20% 14% / 0.04);
  --shadow:    0 3px 14px hsl(25 20% 14% / 0.07),
               0 1px 4px  hsl(25 20% 14% / 0.05);
  --shadow-md: 0 8px 28px hsl(25 20% 14% / 0.09),
               0 2px 8px  hsl(25 20% 14% / 0.06);
  --shadow-lg: 0 20px 55px hsl(25 20% 14% / 0.12),
               0 4px 16px  hsl(25 20% 14% / 0.07);
  --shadow-rose: 0 4px 20px var(--rose-glow);
}

/* ── RESET ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Subtle page texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, hsl(348 44% 68% / 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 80%, hsl(148 26% 46% / 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

a { color: var(--rose-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Page entrance animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pil-page {
  animation: fadeUp 0.35s ease both;
}

/* ── NAVIGATION ───────────────────────────────────────── */
.pil-nav {
  background: hsl(42 33% 97% / 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.pil-nav__brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--text-1);
  letter-spacing: -0.01em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pil-nav__brand::before {
  content: '🌸';
  font-size: 1rem;
  display: inline-block;
  animation: gentleSway 4s ease-in-out infinite;
}

@keyframes gentleSway {
  0%, 100% { transform: rotate(-5deg); }
  50%       { transform: rotate(5deg); }
}

.pil-nav__brand span {
  color: var(--rose);
}

.pil-nav__links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.pil-nav__link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.pil-nav__link:hover, .pil-nav__link.active {
  background: var(--rose-subtle);
  color: var(--rose-deep);
  text-decoration: none;
}

.pil-nav__link.active {
  font-weight: 600;
}

/* ── PAGE LAYOUT ──────────────────────────────────────── */
.pil-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 28px;
}

.pil-page--wide   { max-width: 1400px; }
.pil-page--narrow { max-width: 800px; }

/* ── HERO / PAGE HEADER ───────────────────────────────── */
.pil-hero {
  background: linear-gradient(135deg,
    hsl(348 52% 92%) 0%,
    hsl(42 33% 97%)  55%,
    hsl(148 30% 91%) 100%);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.pil-hero__greeting {
  font-size: 0.8125rem;
  color: var(--rose-deep);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pil-hero__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-1);
  line-height: 1.1;
}

.pil-hero__sub {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-top: 6px;
}

.pil-hero__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* ── STANDARD HEADER ──────────────────────────────────── */
.pil-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.pil-header__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.pil-header__sub {
  font-size: 0.875rem;
  color: var(--text-2);
  margin-top: 3px;
}

/* ── CARDS ────────────────────────────────────────────── */
.pil-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pil-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.pil-card--sm { padding: 16px; }
.pil-card--lg { padding: 32px; }

/* Disable hover lift for cards that shouldn't move */
.pil-card--static { transform: none !important; box-shadow: var(--shadow-xs) !important; }

.pil-card__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  margin-bottom: 16px;
}

/* ── GRID LAYOUTS ─────────────────────────────────────── */
.pil-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.pil-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pil-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

@media (max-width: 768px) {
  .pil-grid-2, .pil-grid-3 { grid-template-columns: 1fr; }
}

/* ── STAT BADGES ──────────────────────────────────────── */
.pil-stats-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pil-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  min-width: 90px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s, transform 0.2s;
}

.pil-stat:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.pil-stat__num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--rose-deep);
  line-height: 1;
  letter-spacing: -0.02em;
}

.pil-stat__label {
  font-size: 0.6875rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 5px;
  font-weight: 500;
}

/* ── BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font);
  letter-spacing: 0.01em;
}

.btn:active { transform: scale(0.97) !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: #fff;
  box-shadow: 0 2px 10px var(--rose-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, hsl(348 44% 72%) 0%, var(--rose) 100%);
  box-shadow: var(--shadow-rose);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--rose-subtle);
  color: var(--rose-deep);
  border-color: hsl(348 44% 68% / 0.3);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid hsl(358 56% 58% / 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-sm  { padding: 6px 13px; font-size: 0.8125rem; }
.btn-lg  { padding: 13px 26px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ── FORM ELEMENTS ────────────────────────────────────── */
.pil-input, .pil-select, .pil-textarea {
  width: 100%;
  background: hsl(38 26% 97%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-1);
  font-family: var(--font);
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.pil-input:focus, .pil-select:focus, .pil-textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-glow);
  background: #fff;
}

.pil-input::placeholder, .pil-textarea::placeholder {
  color: var(--text-3);
}

.pil-select option {
  background: #fff;
  color: var(--text-1);
}

.pil-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
}

.pil-textarea.mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.pil-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}

.pil-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pil-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .pil-field-row { grid-template-columns: 1fr; }
}

/* ── TABLE ────────────────────────────────────────────── */
.pil-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.pil-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pil-table th {
  background: var(--linen);
  padding: 12px 18px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.pil-table td {
  padding: 14px 18px;
  border-bottom: 1px solid hsl(35 20% 92%);
  color: var(--text-1);
  vertical-align: middle;
}

.pil-table tr:last-child td { border-bottom: none; }

.pil-table tr.clickable { cursor: pointer; }
.pil-table tr.clickable:hover td {
  background: hsl(348 52% 97%);
}

/* ── TABS ─────────────────────────────────────────────── */
.pil-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
}

.pil-tab {
  padding: 11px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
  white-space: nowrap;
}

.pil-tab:hover { color: var(--rose-deep); }

.pil-tab.active {
  color: var(--rose-deep);
  border-bottom-color: var(--rose);
  font-weight: 600;
}

.pil-tab-panel { display: none; }
.pil-tab-panel.active {
  display: block;
  animation: fadeUp 0.25s ease both;
}

/* ── BADGES ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Level badges */
.badge-basic     { background: hsl(220 30% 54% / 0.12); color: hsl(220 30% 40%); }
.badge-beginner  { background: var(--sage-light);        color: var(--sage); }
.badge-int1      { background: var(--sky-light);         color: var(--sky); }
.badge-int2      { background: var(--lavender-light);    color: var(--lavender); }
.badge-advanced  { background: var(--terra-light);       color: var(--terra); }
.badge-none      { background: var(--linen);             color: var(--text-3); }

/* Match confidence badges */
.badge-exact     { background: var(--sage-light);        color: var(--sage); }
.badge-alias     { background: var(--sky-light);         color: var(--sky); }
.badge-fuzzy     { background: var(--warn-bg);           color: var(--warn); }
.badge-unmatched { background: var(--danger-bg);         color: var(--danger); }

/* Appointment status badges */
.badge-scheduled  { background: var(--linen);            color: var(--text-2); }
.badge-completed  { background: var(--sage-light);       color: var(--sage); }
.badge-cancelled  { background: var(--danger-bg);        color: var(--danger); }
.badge-no_show    { background: var(--warn-bg);          color: var(--warn); }

/* Style badges */
.badge-classical    { background: var(--rose-light);      color: var(--rose-deep); }
.badge-contemporary { background: var(--lavender-light);  color: var(--lavender); }
.badge-mixed        { background: var(--terra-light);     color: var(--terra); }

/* Parse status */
.badge-confirmed { background: var(--sage-light);        color: var(--sage); }
.badge-pending   { background: var(--warn-bg);           color: var(--warn); }

/* ── LEVEL PILL ───────────────────────────────────────── */
.level-pill {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ── STAT BAR ─────────────────────────────────────────── */
.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.stat-bar-label {
  width: 104px;
  font-size: 0.8125rem;
  color: var(--text-2);
  flex-shrink: 0;
  font-weight: 500;
}

.stat-bar-track {
  flex: 1;
  height: 7px;
  background: var(--linen);
  border-radius: 4px;
  overflow: visible;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--rose-light) 0%, var(--rose) 100%);
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left;
}

/* Animated on load */
@keyframes barGrow {
  from { width: 0 !important; }
}

.stat-bar-fill { animation: barGrow 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }

.stat-bar-fill--initial {
  background: var(--parchment);
  position: absolute;
  top: 0;
}

.stat-bar-vals {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-2);
  width: 68px;
  text-align: right;
  flex-shrink: 0;
}

.stat-delta-up   { color: var(--sage); }
.stat-delta-same { color: var(--text-3); }
.stat-delta-down { color: var(--danger); }

/* ── SCHEDULE PARSE UI ────────────────────────────────── */
.parse-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .parse-results { grid-template-columns: 1fr; }
}

.parse-raw-text {
  background: var(--linen);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: 400px;
}

.appt-row {
  background: hsl(38 26% 97%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.appt-row:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-xs);
}

.appt-row__time {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rose-deep);
  min-width: 68px;
}

.appt-row__content { flex: 1; }

.appt-row__name {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 4px;
  color: var(--text-1);
}

.appt-row__matched {
  font-size: 0.8125rem;
  color: var(--text-2);
}

.appt-row__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

/* ── EXERCISE CHECKLIST ───────────────────────────────── */
.exercise-level-group {
  margin-bottom: 28px;
}

.exercise-level-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--border);
}

.exercise-level-heading h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-2);
}

.exercise-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.exercise-item:hover { background: var(--rose-subtle); }

.exercise-item.taught {
  background: var(--sage-glow);
}

.exercise-item__check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-hover);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 1px;
  font-size: 0.75rem;
}

.exercise-item.taught .exercise-item__check {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
  transform: scale(1.1);
}

.exercise-item__info  { flex: 1; min-width: 0; }

.exercise-item__name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-1);
}

.exercise-item__meta {
  font-size: 0.8125rem;
  color: var(--text-3);
  margin-top: 2px;
}

.exercise-item__date-taught {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sage);
  margin-top: 4px;
}

/* ── PROGRESSION REPORTS (timeline) ──────────────────── */
.prog-report {
  border-left: 3px solid var(--rose);
  padding: 18px 22px;
  background: hsl(38 26% 98%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--rose);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.prog-report:hover {
  box-shadow: var(--shadow-xs);
}

.prog-report__date {
  font-size: 0.8125rem;
  color: var(--text-3);
  margin-bottom: 8px;
  font-weight: 500;
}

.prog-report__notes {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-1);
  white-space: pre-wrap;
}

.prog-report__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* ── DASHBOARD LAYOUT ─────────────────────────────────── */
.dash-today-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .dash-today-grid { grid-template-columns: 1fr; }
}

/* ── SCHEDULE ITEMS ───────────────────────────────────── */
.today-schedule-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border-left: 3px solid var(--border);
  transition: background 0.15s, border-left-color 0.2s;
  cursor: pointer;
  margin-bottom: 2px;
}

.today-schedule-item:hover {
  background: hsl(348 52% 97%);
}

/* Status-coded left borders (CSS :has() — modern browsers) */
.today-schedule-item:has(.badge-completed)  { border-left-color: var(--sage); }
.today-schedule-item:has(.badge-cancelled)  { border-left-color: var(--danger); }
.today-schedule-item:has(.badge-no_show)    { border-left-color: var(--warn); }
.today-schedule-item:has(.badge-scheduled)  { border-left-color: var(--parchment); }

.today-schedule-item__time {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rose-deep);
  min-width: 60px;
}

.today-schedule-item__name {
  font-size: 0.9375rem;
  font-weight: 500;
  flex: 1;
  color: var(--text-1);
}

.today-schedule-item__status { flex-shrink: 0; }

/* ── CLIENT PROFILE HEADER ────────────────────────────── */
.client-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.client-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose) 0%, var(--lavender) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--rose-glow);
  position: relative;
}

/* Subtle ring */
.client-avatar::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid hsl(348 44% 68% / 0.25);
}

.client-header__info  { flex: 1; }

.client-header__name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-1);
}

.client-header__meta {
  font-size: 0.875rem;
  color: var(--text-2);
  margin-top: 5px;
}

/* ── MODAL ────────────────────────────────────────────── */
.pil-modal-backdrop {
  position: fixed;
  inset: 0;
  background: hsl(25 20% 14% / 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.pil-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.pil-modal {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pil-modal-backdrop.open .pil-modal {
  transform: scale(1) translateY(0);
}

.pil-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.pil-modal__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-1);
}

.pil-modal__close {
  background: var(--linen);
  border: none;
  color: var(--text-3);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}

.pil-modal__close:hover {
  background: var(--rose-light);
  color: var(--rose-deep);
}

.pil-modal__footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ── TOAST ────────────────────────────────────────────── */
.pil-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--text-1);
  color: hsl(42 33% 97%);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 300;
  box-shadow: var(--shadow-md);
  transform: translateY(12px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: 320px;
}

.pil-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.pil-toast.success { background: var(--sage);   color: #fff; }
.pil-toast.error   { background: var(--danger);  color: #fff; }
.pil-toast.warn    { background: var(--warn);    color: #fff; }

/* ── SEARCH BAR ───────────────────────────────────────── */
.pil-search { position: relative; }

.pil-search .pil-input { padding-left: 40px; }

.pil-search__icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  font-size: 0.875rem;
}

/* ── EMPTY STATE ──────────────────────────────────────── */
.pil-empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-3);
}

.pil-empty__icon {
  font-size: 3rem;
  margin-bottom: 14px;
  opacity: 0.6;
  display: block;
}

.pil-empty__text {
  font-size: 0.9375rem;
  color: var(--text-3);
  font-weight: 500;
}

/* ── DIVIDER ──────────────────────────────────────────── */
hr.pil-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ── LOADING SPINNER ──────────────────────────────────── */
.pil-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── HANDOFF BANNER ───────────────────────────────────── */
.handoff-banner {
  background: hsl(36 82% 54% / 0.07);
  border: 1px solid hsl(36 82% 54% / 0.22);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.875rem;
  color: hsl(30 60% 35%);
  margin-bottom: 22px;
  line-height: 1.55;
}

.handoff-banner strong {
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  color: hsl(30 60% 28%);
}

/* ── UPLOAD TAB SWITCHER ──────────────────────────────── */
.upload-tab-strip {
  display: flex;
  gap: 2px;
  margin-bottom: 22px;
  background: var(--linen);
  border-radius: var(--radius);
  padding: 4px;
  width: fit-content;
  border: 1px solid var(--border);
}

.upload-tab {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}

.upload-tab.active {
  background: #fff;
  color: var(--rose-deep);
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}

/* ── SIDEBAR STAT ITEMS (dashboard) ──────────────────── */
.sidebar-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: hsl(38 26% 97%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: box-shadow 0.2s;
}

.sidebar-stat:hover { box-shadow: var(--shadow-xs); }

.sidebar-stat__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--rose-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-stat__val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-1);
  line-height: 1;
  letter-spacing: -0.02em;
}

.sidebar-stat__label {
  font-size: 0.75rem;
  color: var(--text-3);
  font-weight: 500;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── INFO HINT BOX ────────────────────────────────────── */
.pil-hint {
  background: hsl(348 52% 96%);
  border: 1px solid hsl(348 44% 68% / 0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.8125rem;
  color: hsl(348 30% 40%);
  line-height: 1.6;
  margin-bottom: 14px;
}

.pil-hint strong { color: hsl(348 30% 32%); }

/* ── STUDIO CONFIRM MODAL ─────────────────────────────── */
.studio-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: hsl(25 22% 14% / 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: confirmFadeIn 0.2s ease both;
}

.studio-confirm-card {
  width: 90vw;
  max-width: 380px;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px 28px;
  text-align: center;
  animation: confirmSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.studio-confirm-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: inline-block;
  animation: gentleSway 3s ease-in-out infinite;
}

.studio-confirm-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-1);
  margin-bottom: 8px;
}

.studio-confirm-msg {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.studio-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.studio-confirm-actions .btn {
  min-width: 110px;
  padding: 10px 22px;
}

.studio-confirm-overlay.closing {
  animation: confirmFadeOut 0.18s ease both;
}

.studio-confirm-overlay.closing .studio-confirm-card {
  animation: confirmSlideDown 0.18s ease both;
}

@keyframes confirmFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes confirmFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes confirmSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes confirmSlideDown {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(12px) scale(0.97); }
}

/* ── STUDIO TOAST NOTIFICATION ────────────────────────── */
.studio-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-1);
  max-width: 340px;
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.studio-toast.toast-success { border-left: 4px solid var(--sage); }
.studio-toast.toast-error   { border-left: 4px solid var(--danger); }
.studio-toast.toast-warn    { border-left: 4px solid var(--warn); }

.studio-toast.closing {
  animation: toastOut 0.25s ease both;
}

.studio-toast-icon { font-size: 1.2rem; flex-shrink: 0; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
  .pil-nav { gap: 12px; padding: 0 12px; flex-wrap: nowrap; overflow-x: auto; }
  .pil-nav__links { gap: 2px; }
  .pil-nav__link { padding: 6px 10px; font-size: 0.8125rem; }
  .nav-user-name { display: none; }
  .nav-date { display: none; }
}

@media (max-width: 600px) {
  .pil-page { padding: 16px; }
  .pil-nav  { padding: 0 10px; gap: 8px; }
  .pil-nav__brand { font-size: 1.1rem; }
  .pil-nav__brand::before { font-size: 0.85rem; }
  .pil-hero { padding: 22px 20px; }
  .pil-hero__title { font-size: 1.5rem; }
  .pil-header { flex-direction: column; align-items: flex-start; }
  .pil-modal  { padding: 22px; border-radius: var(--radius-lg); }
  .pil-tabs   { overflow-x: auto; }
  .client-header { flex-direction: column; gap: 16px; }
  .pil-stats-row { gap: 8px; }
  .nav-signout { display: none; }
}
