/* ==========================================================================
   Ascencious Partner Portal — design system
   Dark luxury-wellness language shared with the app:
   bg #080a16→#0b0e1f, cards #121423, hairline borders rgba(255,255,255,.08),
   accent #6B5FD9→#8B8EFF, Playfair Display for display type, Inter for UI.
   ========================================================================== */

:root {
  --bg-0: #080a16;
  --bg-1: #0b0e1f;
  --card: #121423;
  --card-2: #171a32;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(200, 184, 255, 0.18);
  --text: #f5f7fa;
  --text-2: rgba(220, 215, 245, 0.78);
  --text-3: rgba(220, 215, 245, 0.52);
  --accent: #8b8eff;
  --accent-deep: #6b5fd9;
  --accent-soft: rgba(139, 142, 255, 0.14);
  --good: #6fd39c;
  --warn: #e8c37a;
  --bad: #e7536f;
  --radius: 18px;
  --radius-pill: 999px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(107, 95, 217, 0.16), transparent 60%),
    radial-gradient(900px 420px at 10% 110%, rgba(107, 95, 217, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-0) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 520px; margin: 0 auto; padding: 0 24px; }

main { padding-bottom: 96px; }

/* ---------- top nav ---------- */

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand img { height: 34px; width: auto; display: block; }
.nav-brand span {
  font-family: var(--serif); font-size: 19px; letter-spacing: 0.04em; color: var(--text);
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  color: var(--text-2); text-decoration: none; font-size: 14.5px; font-weight: 500;
  letter-spacing: 0.01em; transition: color 0.18s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { position: relative; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--accent-deep), var(--accent));
}

/* ---------- type ---------- */

h1, .display {
  font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em;
  font-size: clamp(34px, 5vw, 52px); line-height: 1.15;
}
h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.25; }
h3 { font-size: 17px; font-weight: 600; }
.lede { color: var(--text-2); font-size: 18px; max-width: 560px; }
.muted { color: var(--text-3); font-size: 14px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 12px;
  color: var(--accent); font-weight: 600;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; border-radius: var(--radius-pill);
  font-family: var(--sans); font-size: 15.5px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #1e1649, #2b2066 55%, #1e1649);
  border-color: var(--line-strong);
  box-shadow: 0 10px 32px rgba(107, 95, 217, 0.28);
}
.btn-primary:hover { box-shadow: 0 12px 40px rgba(139, 142, 255, 0.36); }
.btn-ghost {
  color: var(--text); background: transparent; border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(139, 142, 255, 0.08); }
.btn-block { width: 100%; }

/* ---------- cards ---------- */

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.card-inset { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }

/* ---------- forms ---------- */

.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  margin-bottom: 8px; letter-spacing: 0.02em;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 15px 18px; border-radius: 14px;
  background: var(--card-2); border: 1px solid var(--line);
  color: var(--text); font-family: var(--sans); font-size: 15.5px;
  outline: none; transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 110px; resize: vertical; }
.field .hint { color: var(--text-3); font-size: 12.5px; margin-top: 6px; }
.error { color: var(--bad); font-size: 13.5px; margin-top: 6px; }

/* ---------- landing sections ---------- */

.hero { padding: 84px 0 64px; text-align: center; }
.hero .lede { margin: 22px auto 36px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.section { padding: 44px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }

.step-num {
  font-family: var(--serif); font-size: 30px; color: var(--accent);
  line-height: 1; margin-bottom: 12px;
}

.split-note {
  display: inline-flex; align-items: baseline; gap: 10px;
  background: var(--accent-soft); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); padding: 10px 22px; margin-top: 8px;
}
.split-note strong { font-family: var(--serif); font-size: 22px; color: var(--text); }
.split-note span { color: var(--text-2); font-size: 14px; }

/* ---------- auth pages ---------- */

.auth-panel { margin-top: 48px; }
.auth-panel .card { padding: 36px; }
.auth-panel h1 { font-size: 32px; text-align: center; margin-bottom: 6px; }
.auth-panel .sub { text-align: center; color: var(--text-2); margin-bottom: 30px; font-size: 15px; }
.auth-alt { text-align: center; margin-top: 22px; color: var(--text-3); font-size: 14.5px; }
.auth-alt a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ---------- status chips ---------- */

.chip {
  display: inline-block; padding: 5px 14px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em;
}
.chip-pending { background: rgba(232, 195, 122, 0.14); color: var(--warn); border: 1px solid rgba(232, 195, 122, 0.3); }
.chip-good { background: rgba(111, 211, 156, 0.12); color: var(--good); border: 1px solid rgba(111, 211, 156, 0.28); }

/* ---------- workspace ---------- */

.page-title { font-size: clamp(26px, 3.5vw, 36px); margin-top: 8px; }

.toolbar {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap;
}

.flash {
  background: rgba(111, 211, 156, 0.10); border: 1px solid rgba(111, 211, 156, 0.28);
  color: var(--good); border-radius: 14px; padding: 13px 18px; margin-bottom: 20px;
  font-size: 14.5px;
}

.notice {
  background: var(--accent-soft); border: 1px solid var(--line-strong);
  border-radius: 14px; padding: 13px 18px; font-size: 14.5px; color: var(--text-2);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.notice-bad { background: rgba(231, 83, 111, 0.08); border-color: rgba(231, 83, 111, 0.28); }

.chip-bad { background: rgba(231, 83, 111, 0.12); color: var(--bad); border: 1px solid rgba(231, 83, 111, 0.3); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 20px 22px; }
.stat-label { color: var(--text-3); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.stat-value { font-family: var(--serif); font-size: 30px; margin-top: 6px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.see-all { color: var(--accent); text-decoration: none; font-size: 13.5px; font-weight: 600; }

.line-item {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.line-item:last-child { border-bottom: none; }
.li-title { font-weight: 600; font-size: 15px; }
.li-when { color: var(--text-2); font-size: 14px; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.btn-sm { padding: 9px 18px; font-size: 13.5px; }

.table-scroll { overflow-x: auto; margin-top: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th {
  text-align: left; color: var(--text-3); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 600; padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }

.avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line-strong); flex-shrink: 0;
}
.avatar-empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--serif); font-size: 26px;
}
.thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.file-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; margin-bottom: 8px; font-size: 14px;
}
.file-row .file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row-error { border-color: rgba(231, 83, 111, 0.4); }
.file-remove {
  background: none; border: none; color: var(--text-3); font-size: 20px; line-height: 1;
  cursor: pointer; padding: 2px 6px; border-radius: 8px;
}
.file-remove:hover { color: var(--bad); background: rgba(231, 83, 111, 0.08); }

.window-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.window-row:last-child { border-bottom: none; }
.window-row select, .window-row input[type="time"] {
  padding: 10px 14px; border-radius: 12px; background: var(--card-2);
  border: 1px solid var(--line); color: var(--text); font-family: var(--sans); font-size: 14.5px;
}
.window-row select { min-width: 140px; }

.dayoff-form { display: flex; gap: 10px; flex-wrap: wrap; }
.dayoff-form input {
  padding: 10px 14px; border-radius: 12px; background: var(--card-2);
  border: 1px solid var(--line); color: var(--text); font-family: var(--sans); font-size: 14.5px;
}
.dayoff-form input[type="text"] { flex: 1; min-width: 150px; }

.copy-row { display: flex; gap: 10px; }
.copy-row input {
  flex: 1; padding: 12px 16px; border-radius: 12px; background: var(--card-2);
  border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-family: var(--sans);
  min-width: 0;
}

@media (max-width: 900px) {
  .nav-links { gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
  .nav-links a { font-size: 13.5px; }
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line); padding: 30px 0 40px; margin-top: 60px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer, .footer a { color: var(--text-3); font-size: 13.5px; text-decoration: none; }
.footer a:hover { color: var(--text-2); }

/* ---------- availability calendar ---------- */
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cal-key-avail { background: rgba(111, 211, 156, 0.5); border: 1px solid rgba(111, 211, 156, 0.6); }
.cal-key-off { background: var(--card); border: 1px solid var(--line); }
.cal-key-booked { background: var(--accent); }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 16px; }
@media (max-width: 720px) { .cal-months { grid-template-columns: 1fr; } }
.cal-month-label { font-family: var(--serif); font-size: 17px; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--text-3); padding: 2px 0; }
.cal-form { margin: 0; display: block; }
.cal-cell {
  display: flex; flex-direction: column; min-height: 58px;
  border-radius: 9px; border: 1px solid var(--line); padding: 5px 6px;
  background: var(--card-2); text-align: left; width: 100%; color: var(--text);
  font-family: var(--sans); font-size: 13px;
}
button.cal-cell { cursor: pointer; transition: border-color 0.12s ease; }
.cal-cell .d { font-weight: 600; }
.cal-cell .h { font-size: 10.5px; color: var(--text-3); margin-top: 1px; line-height: 1.2; }
.cal-avail { background: rgba(111, 211, 156, 0.12); border-color: rgba(111, 211, 156, 0.28); }
.cal-avail:hover { border-color: var(--bad); }
.cal-off { background: var(--card); color: var(--text-3); }
.cal-off:hover { border-color: var(--good); }
.cal-closed { opacity: 0.45; }
.cal-past { opacity: 0.28; }
.cal-empty { background: transparent; border: none; min-height: 58px; }
.cal-booked { margin-top: auto; font-size: 10.5px; color: var(--accent); font-weight: 600; padding-top: 2px; }
