/* ============================================================
   Proven Path Academy — V4 App shell styles
   (login, sign-up, dashboards, booking, admin)
   ============================================================ */

#root { min-height: 100vh; }

/* ---------- Auth / marketing split screen ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside {
  background: var(--brand-ink); color: #fff; padding: 48px 52px;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.auth-aside::after {
  content:""; position:absolute; inset:0;
  background: radial-gradient(800px 400px at 80% 110%, rgba(143,217,191,.16), transparent 60%);
  pointer-events:none;
}
.auth-aside .logo-text strong { color: #fff; }
.auth-aside .logo-text span { color: rgba(255,255,255,.6); }
.auth-aside .logo-mark { background: var(--brand-2); }
.auth-aside h2 { color:#fff; font-size: 34px; margin-top: auto; max-width: 16ch; }
.auth-aside .a-lede { color: rgba(255,255,255,.78); margin-top: 18px; max-width: 38ch; font-size: 16.5px; }
.auth-points { display:flex; flex-direction:column; gap:14px; margin-top: 30px; }
.auth-points .ap { display:flex; gap:13px; align-items:flex-start; }
.auth-points .ap svg { width:22px; height:22px; color:#8fd9bf; flex:none; margin-top:1px; }
.auth-points .ap b { display:block; font-family:var(--font-display); font-size:15.5px; }
.auth-points .ap small { color: rgba(255,255,255,.7); font-size:13.5px; }

.auth-main { display:flex; align-items:center; justify-content:center; padding: 40px 28px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 30px; }
.auth-card .sub { color: var(--muted); margin-top: 8px; }

.role-toggle { display:grid; grid-template-columns:1fr 1fr; gap:8px; background:var(--surface-2); padding:6px; border-radius:14px; margin: 24px 0; }
.role-toggle button {
  border:0; background:transparent; padding:11px 8px; border-radius:10px;
  font-family:var(--font-display); font-weight:600; font-size:14.5px; color:var(--muted);
  display:flex; flex-direction:column; align-items:center; gap:3px; transition:all .15s; line-height:1.25;
}
.role-toggle button span { line-height:1.2; }
.role-toggle button small { font-weight:500; font-size:11.5px; line-height:1.2; }
.role-toggle button.active { background:#fff; color:var(--brand-ink); box-shadow:var(--shadow-sm); }

.form-stack { display:flex; flex-direction:column; gap:16px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.auth-foot { margin-top:20px; text-align:center; color:var(--muted); font-size:14.5px; }
.auth-foot a, .link-btn { color:var(--brand); font-weight:600; cursor:pointer; background:none; border:0; font-size:inherit; font-family:inherit; }
.secure-note { display:flex; align-items:center; gap:8px; justify-content:center; color:var(--faint); font-size:12.5px; margin-top:18px; }
.secure-note svg { width:14px; height:14px; }
.back-home { display:inline-flex; align-items:center; gap:7px; color:rgba(255,255,255,.8); font-family:var(--font-display); font-weight:500; font-size:14px; }
.back-home svg { width:16px; height:16px; }

@media (max-width: 860px){ .auth-wrap { grid-template-columns:1fr; } .auth-aside { display:none; } }

/* ---------- App layout (sidebar + topbar) ---------- */
.app { display:grid; grid-template-columns: 256px 1fr; min-height:100vh; }
.sidebar {
  background:var(--surface); border-right:1px solid var(--line);
  padding:20px 16px; display:flex; flex-direction:column; gap:6px;
  position:sticky; top:0; height:100vh;
}
.sidebar .logo { padding: 6px 8px 18px; }
.side-link {
  display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:11px;
  font-family:var(--font-display); font-weight:600; font-size:14.5px; color:var(--ink-soft);
  border:0; background:none; width:100%; text-align:left; cursor:pointer; transition:all .14s;
}
.side-link svg { width:19px; height:19px; flex:none; color:var(--muted); }
.side-link:hover { background:var(--surface-2); }
.side-link.active { background:var(--brand-wash); color:var(--brand-ink); }
.side-link.active svg { color:var(--brand); }
.side-link .badge { margin-left:auto; background:var(--danger); color:#fff; font-size:11px; font-weight:700; min-width:19px; height:19px; border-radius:99px; display:grid; place-items:center; padding:0 5px; }
.side-foot { margin-top:auto; }
.side-user { display:flex; align-items:center; gap:11px; padding:10px 8px; border-top:1px solid var(--line); margin-top:10px; }
.side-user .av { width:36px; height:36px; border-radius:50%; background:var(--brand); color:#fff; display:grid; place-items:center; font-family:var(--font-display); font-weight:700; font-size:14px; flex:none; }
.side-user b { font-family:var(--font-display); font-size:14px; display:block; line-height:1.1; }
.side-user small { color:var(--muted); font-size:12px; }

.main { min-width:0; display:flex; flex-direction:column; }
.topbar {
  display:flex; align-items:center; gap:16px; padding:18px 30px;
  border-bottom:1px solid var(--line); background:rgba(250,248,242,.85);
  backdrop-filter:blur(10px); position:sticky; top:0; z-index:20;
}
.topbar h1 { font-size:22px; }
.topbar .spacer { flex:1; }
.content { padding: 30px; max-width: 1080px; width:100%; }

/* Mobile nav */
.mobile-bar { display:none; }
@media (max-width: 880px){
  .app { grid-template-columns:1fr; }
  .sidebar { display:none; }
  .mobile-bar {
    display:flex; position:sticky; bottom:0; z-index:40;
    background:var(--surface); border-top:1px solid var(--line);
    padding:8px; gap:4px; justify-content:space-around;
  }
  .mobile-bar button { border:0; background:none; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:10.5px; color:var(--muted); font-family:var(--font-display); font-weight:600; padding:6px 10px; border-radius:10px; flex:1; position:relative; }
  .mobile-bar button svg { width:21px; height:21px; }
  .mobile-bar button.active { color:var(--brand); }
  .mobile-bar .badge { position:absolute; top:2px; right:18px; background:var(--danger); color:#fff; font-size:9px; min-width:15px; height:15px; border-radius:99px; display:grid; place-items:center; }
  .content { padding:20px 16px; }
  .topbar { padding:14px 16px; }
}

/* ---------- Generic content blocks ---------- */
.page-head { margin-bottom:24px; }
.page-head h2 { font-size:26px; }
.page-head p { color:var(--muted); margin-top:6px; }

.grid-cards { display:grid; gap:18px; }
.cols-2 { grid-template-columns:repeat(2,1fr); }
.cols-3 { grid-template-columns:repeat(3,1fr); }
@media (max-width:760px){ .cols-2,.cols-3 { grid-template-columns:1fr; } }

.stat-card { padding:20px 22px; }
.stat-card .label { color:var(--muted); font-size:13.5px; font-family:var(--font-display); font-weight:600; }
.stat-card .val { font-family:var(--font-display); font-weight:800; font-size:34px; letter-spacing:-0.03em; margin-top:6px; line-height:1; }
.stat-card .val.brand { color:var(--brand); }
.stat-card .val.gold { color:var(--gold); }
.stat-card .sub { color:var(--faint); font-size:13px; margin-top:8px; }

/* Expert cards */
.expert-card { padding:22px; display:flex; flex-direction:column; transition:transform .15s, box-shadow .15s; }
.expert-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); }
.expert-top { display:flex; gap:14px; align-items:center; }
.av-lg { width:54px; height:54px; border-radius:14px; background:var(--brand-wash); color:var(--brand); display:grid; place-items:center; font-family:var(--font-display); font-weight:700; font-size:19px; flex:none; }
.expert-card h3 { font-size:18px; }
.expert-card .role { color:var(--muted); font-size:13.5px; }
.tag-row { display:flex; flex-wrap:wrap; gap:7px; margin:14px 0; }
.tag { font-size:12.5px; font-family:var(--font-display); font-weight:600; background:var(--surface-2); color:var(--ink-soft); padding:5px 10px; border-radius:8px; }
.links-row { display:flex; gap:9px; }
.links-row a { width:32px; height:32px; border-radius:9px; border:1px solid var(--line); display:grid; place-items:center; color:var(--ink-soft); transition:all .14s; }
.links-row a:hover { border-color:var(--brand); color:var(--brand); }
.links-row svg { width:16px; height:16px; }
.expert-foot { margin-top:auto; padding-top:16px; border-top:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:10px; }
.avail-dot { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--brand); font-weight:600; font-family:var(--font-display); }
.avail-dot::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--brand-2); }

/* List rows / bookings */
.row-card { padding:18px 20px; display:flex; align-items:center; gap:16px; }
.row-card + .row-card { margin-top:12px; }
.row-card .av { width:44px; height:44px; border-radius:11px; background:var(--brand-wash); color:var(--brand); display:grid; place-items:center; font-family:var(--font-display); font-weight:700; flex:none; }
.row-main { flex:1; min-width:0; }
.row-main b { font-family:var(--font-display); font-size:15.5px; }
.row-main .meta { color:var(--muted); font-size:13.5px; margin-top:2px; display:flex; gap:10px; flex-wrap:wrap; }
.row-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* Modal */
.modal-scrim { position:fixed; inset:0; background:rgba(13,28,23,.45); backdrop-filter:blur(3px); display:flex; align-items:center; justify-content:center; padding:20px; z-index:100; animation:fade .18s ease; }
@keyframes fade { from{opacity:0} to{opacity:1} }
.modal { background:var(--surface); border-radius:var(--r-xl); width:100%; max-width:540px; max-height:92vh; overflow:auto; box-shadow:var(--shadow-lg); animation:pop .2s ease; }
@keyframes pop { from{opacity:0; transform:translateY(12px) scale(.98)} to{opacity:1; transform:none} }
.modal-head { padding:24px 26px 0; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.modal-head h3 { font-size:22px; }
.modal-head .x { width:34px; height:34px; border-radius:10px; border:1px solid var(--line); background:none; display:grid; place-items:center; color:var(--muted); flex:none; }
.modal-head .x:hover { border-color:var(--ink); color:var(--ink); }
.modal-body { padding:20px 26px; }
.modal-foot { padding:18px 26px; border-top:1px solid var(--line); display:flex; gap:10px; justify-content:flex-end; background:var(--surface-2); border-radius:0 0 var(--r-xl) var(--r-xl); }

/* duration / time chips */
.choice-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.choice {
  border:1.5px solid var(--line-strong); background:var(--surface); border-radius:12px;
  padding:14px 8px; text-align:center; cursor:pointer; transition:all .14s; font-family:var(--font-display);
}
.choice:hover { border-color:var(--brand); }
.choice.sel { border-color:var(--brand); background:var(--brand-wash); }
.choice b { display:block; font-size:18px; }
.choice small { color:var(--muted); font-size:12px; }
.choice.sel small { color:var(--brand); }
.choice.disabled { opacity:.4; pointer-events:none; }
@media (max-width:520px){ .choice-grid { grid-template-columns:repeat(2,1fr); } .form-row { grid-template-columns:1fr; } }

.time-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.time-chip { border:1.5px solid var(--line-strong); background:var(--surface); border-radius:10px; padding:11px 8px; text-align:center; cursor:pointer; font-size:14px; font-family:var(--font-display); font-weight:600; transition:all .14s; }
.time-chip:hover { border-color:var(--brand); }
.time-chip.sel { border-color:var(--brand); background:var(--brand); color:#fff; }

/* day/time pref toggles */
.pref-grid { display:flex; flex-wrap:wrap; gap:8px; }
.pref-toggle { border:1.5px solid var(--line-strong); background:var(--surface); border-radius:999px; padding:8px 15px; font-family:var(--font-display); font-weight:600; font-size:13.5px; cursor:pointer; transition:all .14s; color:var(--ink-soft); }
.pref-toggle.on { border-color:var(--brand); background:var(--brand-wash); color:var(--brand-ink); }

/* confirmation / calendar invite */
.invite {
  border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; box-shadow:var(--shadow-md);
}
.invite-head { background:var(--brand-ink); color:#fff; padding:20px 24px; }
.invite-head .tt { font-family:var(--font-display); font-weight:700; font-size:19px; }
.invite-head .dt { color:rgba(255,255,255,.8); font-size:14px; margin-top:4px; }
.invite-body { padding:22px 24px; display:flex; flex-direction:column; gap:14px; }
.invite-row { display:flex; gap:13px; align-items:flex-start; }
.invite-row svg { width:19px; height:19px; color:var(--brand); flex:none; margin-top:2px; }
.invite-row b { font-family:var(--font-display); font-size:14.5px; display:block; }
.invite-row small { color:var(--muted); }
.platform-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:6px; }
.platform-btn { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--line-strong); border-radius:10px; padding:9px 13px; font-family:var(--font-display); font-weight:600; font-size:13.5px; background:var(--surface); }
.platform-btn .ic { width:20px; height:20px; border-radius:5px; display:grid; place-items:center; color:#fff; font-size:11px; font-weight:800; }

/* Table (admin) */
.table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:var(--r-lg); background:var(--surface); }
table.tbl { width:100%; border-collapse:collapse; min-width:720px; }
.tbl th { text-align:left; font-family:var(--font-display); font-weight:600; font-size:12.5px; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); padding:14px 16px; border-bottom:1px solid var(--line); background:var(--surface-2); }
.tbl td { padding:14px 16px; border-bottom:1px solid var(--line); font-size:14.5px; vertical-align:middle; }
.tbl tr:last-child td { border-bottom:0; }
.tbl tr:hover td { background:var(--surface-2); }
.tbl .u { display:flex; align-items:center; gap:11px; }
.tbl .u .av { width:34px; height:34px; border-radius:9px; background:var(--brand-wash); color:var(--brand); display:grid; place-items:center; font-family:var(--font-display); font-weight:700; font-size:13px; }
.icon-btn { width:32px; height:32px; border-radius:8px; border:1px solid var(--line); background:var(--surface); display:grid; place-items:center; color:var(--muted); cursor:pointer; }
.icon-btn:hover { border-color:var(--ink); color:var(--ink); }
.icon-btn.danger:hover { border-color:var(--danger); color:var(--danger); }

/* toast */
.toast-wrap { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); z-index:200; display:flex; flex-direction:column; gap:8px; align-items:center; }
.toast { background:var(--ink); color:#fff; padding:13px 20px; border-radius:12px; font-family:var(--font-display); font-weight:600; font-size:14.5px; box-shadow:var(--shadow-lg); display:flex; align-items:center; gap:10px; animation:pop .2s ease; }
.toast svg { width:18px; height:18px; color:#8fd9bf; }

/* segmented (dashboard sub-tabs) */
.seg { display:inline-flex; background:var(--surface-2); padding:5px; border-radius:12px; gap:4px; margin-bottom:22px; flex-wrap:wrap; }
.seg button { border:0; background:none; padding:9px 16px; border-radius:9px; font-family:var(--font-display); font-weight:600; font-size:14px; color:var(--muted); cursor:pointer; }
.seg button.active { background:#fff; color:var(--brand-ink); box-shadow:var(--shadow-sm); }

.empty { text-align:center; padding:50px 20px; color:var(--muted); }
.empty svg { width:44px; height:44px; color:var(--line-strong); margin-bottom:14px; }

/* helper */
.flex { display:flex; } .between { justify-content:space-between; } .ai-center { align-items:center; } .ai-start { align-items:flex-start; }
.gap8 { gap:8px; } .gap12 { gap:12px; } .gap16 { gap:16px; } .wrap { flex-wrap:wrap; }
.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}
.fw { flex:1; } .nowrap{white-space:nowrap;}
