/* SIW look, version 2: calm, clean and a little luxurious.
   Loaded after styles.css and content.css, so it refines them without touching what pages do.
   One violet accent, warm-cool neutrals, generous space, crisp type, soft depth. */
:root {
  --accent: #6c4cff;
  --accent-2: #8f74ff;
  --accent-soft: #f1edff;
  --accent-text: #4a2fd4;
  --bg: #f6f5fb;
  --panel: #ffffff;
  --panel-2: #f7f6fc;
  --line: #ecebf3;
  --line-strong: #dfdce9;
  --text: #16132b;
  --muted: #625e78;
  --faint: #9d99b2;
  --ok: #12a150;
  --warn: #d97706;
  --danger: #e0444b;
  --danger-soft: #fdeeee;
  --radius: 16px;
  --shadow: 0 1px 1px rgba(22, 19, 43, .03), 0 2px 6px -2px rgba(22, 19, 43, .05), 0 14px 34px -18px rgba(76, 52, 180, .16);
  --shadow-hover: 0 1px 1px rgba(22, 19, 43, .04), 0 4px 10px -3px rgba(22, 19, 43, .07), 0 22px 44px -20px rgba(76, 52, 180, .24);
  --shadow-lg: 0 30px 60px -18px rgba(40, 24, 110, .32);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar: 252px;
}

/* ---------- type ---------- */
body {
  font-family: var(--font);
  font-size: 15px;
  letter-spacing: -.006em;
  font-feature-settings: "cv11", "ss01", "ss03";
  background:
    radial-gradient(900px 420px at 85% -120px, rgba(143, 116, 255, .13), transparent 70%),
    radial-gradient(700px 360px at 0% -160px, rgba(108, 76, 255, .07), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}
h1, h2, h3, .brand, .modal-head h2 { font-family: var(--font-display); }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.028em; line-height: 1.15; }
h2 { font-size: 16.5px; font-weight: 700; letter-spacing: -.012em; }
h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.page-head { margin-bottom: 26px; align-items: center; }
.page-head .grow p { margin-top: 6px; font-size: 15px; color: var(--muted); max-width: 62ch; }
.section-title { font-family: var(--font); font-size: 11.5px; font-weight: 700; letter-spacing: .09em; color: var(--faint); margin: 30px 0 12px; }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
/* big numbers read like an instrument panel */
.now-clock, .coach-big, .dash-val b, .big-sale-amount, .budget-sales, .board-val, .fan-total, .podium-val,
.week-winner-val, .clock-timer, .coach-stats b, .stat-num, .kpi b {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

/* ---------- frame: sidebar, bars ---------- */
.sidebar { background: rgba(255, 255, 255, .86); border-right: 1px solid var(--line); padding: 20px 14px; gap: 2px; }
.brand { font-size: 17px; font-weight: 800; letter-spacing: -.02em; padding: 2px 10px 20px; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 15px; background: linear-gradient(140deg, #8f74ff 0%, #6c4cff 55%, #5236e6 100%); box-shadow: 0 8px 18px -8px rgba(108, 76, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--faint); padding: 18px 12px 6px; }
.nav-item { padding: 9px 12px; border-radius: 11px; font-size: 14.5px; font-weight: 500; color: var(--muted); gap: 11px; transition: background .12s, color .12s; }
.nav-item .ic { color: var(--faint); transition: color .12s; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item:hover .ic { color: var(--muted); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; box-shadow: inset 0 0 0 1px rgba(108, 76, 255, .08); }
.nav-item.active .ic { color: var(--accent); }
.me-chip { border: 1px solid var(--line); background: var(--panel); margin-bottom: 4px; }
.me-chip:hover { border-color: var(--line-strong); background: var(--panel); }
.topbar { background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
.bottomnav { background: rgba(255, 255, 255, .98); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -18px rgba(22, 19, 43, .25); }
.bottomnav a { font-weight: 500; }
.bottomnav a.active { color: var(--accent); font-weight: 650; }
.page { padding: 36px 36px 72px; }
@media (max-width: 860px) { .page { padding: 22px 16px 96px; } h1 { font-size: 25px; } }
.searchbox { border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .9); box-shadow: 0 1px 2px rgba(22, 19, 43, .03); }

/* ---------- surfaces ---------- */
.card { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
a.card, .card[href], .coach-folder, .kb-card { transition: box-shadow .16s, border-color .16s, transform .16s; }
a.card:hover, .coach-folder:hover, .kb-card:hover { box-shadow: var(--shadow-hover); border-color: var(--line-strong); transform: translateY(-1px); }
.card-head { padding: 18px 20px 0; }
.card-head h2 { font-size: 15.5px; }
.card-pad { padding: 20px; }
.list-item { padding: 12px 20px; border-top: 1px solid var(--line); }
a.list-item { transition: background .12s; }
a.list-item:hover { background: var(--panel-2); }
.empty { padding: 44px 24px; }
.empty .ic { color: #c9c4dc; }
.notice { border-radius: 14px; padding: 13px 16px; }

/* ---------- controls ---------- */
.btn { border-radius: 11px; font-weight: 600; font-size: 14px; padding: 9px 15px; background: #fff; border: 1px solid var(--line-strong); box-shadow: 0 1px 2px rgba(22, 19, 43, .05); transition: background .12s, box-shadow .12s, border-color .12s, transform .06s, filter .12s; }
.btn:hover { background: #fbfaff; border-color: #d3cfe2; }
.btn.primary { color: #fff; border-color: transparent; background: linear-gradient(180deg, #7a5cff 0%, #6342f6 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 18px -8px rgba(99, 66, 246, .75); }
.btn.primary:hover { filter: brightness(1.06); background: linear-gradient(180deg, #7a5cff 0%, #6342f6 100%); }
.btn.danger-solid { color: #fff; border-color: transparent; background: linear-gradient(180deg, #ec5a60 0%, #d93a41 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 8px 18px -8px rgba(217, 58, 65, .6); }
.btn.danger-solid:hover { filter: brightness(1.05); }
.btn.ghost { box-shadow: none; border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.lg { padding: 13px 20px; font-size: 15px; border-radius: 13px; }
.btn.icon { padding: 8px; }
.input { border-radius: 11px; border: 1px solid var(--line-strong); background: #fff; padding: 10px 13px; transition: border-color .12s, box-shadow .12s; }
.input:hover { border-color: #d3cfe2; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(108, 76, 255, .13); outline: none; }
.field label { font-size: 13px; font-weight: 600; color: var(--text); }
.seg { background: #efedf6; border: 0; border-radius: 11px; padding: 3px; }
.seg button { border-radius: 8px; color: var(--muted); }
.seg button.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(22, 19, 43, .08), 0 2px 8px -4px rgba(22, 19, 43, .12); }
.chip { border: 1px solid var(--line-strong); background: #fff; color: var(--muted); font-weight: 600; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------- labels ---------- */
.pill { font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: #f1f0f6; color: var(--muted); letter-spacing: .005em; }
.pill.accent { background: var(--accent-soft); color: var(--accent-text); }
.pill.ok { background: #e7f6ed; color: #0f8a44; }
.pill.warn { background: #fdf1e2; color: #b45f06; }
.pill.danger { background: var(--danger-soft); color: #c4343b; }
.status-pill { font-size: 12px; font-weight: 650; padding: 4px 10px; }
.status-pill.s-working, .status-pill.s-online { background: #e7f6ed; color: #0f8a44; }
.status-pill.s-break { background: #fdf1e2; color: #b45f06; }
.badge { background: linear-gradient(180deg, #ef5a5f, #dc3b42); box-shadow: 0 2px 6px -2px rgba(220, 59, 66, .6); }

/* ---------- dialogs ---------- */
.modal { border-radius: 22px; border: 1px solid rgba(255, 255, 255, .6); box-shadow: var(--shadow-lg); }
.modal-head { padding: 20px 22px 8px; }
.modal-body { padding: 12px 22px 22px; }
.modal-foot { padding: 14px 22px 20px; border-top: 1px solid var(--line); }
.modal-backdrop { background: rgba(22, 16, 52, .42); }
.toast { border-radius: 13px; padding: 11px 18px; font-weight: 600; box-shadow: var(--shadow-lg); }

/* ---------- the chatter's home: the clock is the hero ---------- */
.home-clock {
  position: relative; overflow: hidden; padding: 30px 22px 22px;
  background:
    radial-gradient(520px 220px at 50% -60px, rgba(143, 116, 255, .16), transparent 70%),
    #fff;
}
.home-clock .now-clock { font-size: 72px; font-weight: 800; letter-spacing: -.045em; color: var(--text); }
.home-clock .now-date { font-size: 14px; color: var(--muted); margin-top: 2px; }
.clock-btn { border-radius: 14px; padding: 15px 18px; font-size: 16px; }
.clock-foot { color: var(--muted); }

/* ---------- scoreboard & numbers ---------- */
.board-dash { border-radius: 14px; border-color: var(--line); box-shadow: 0 1px 2px rgba(22, 19, 43, .03); }
.dash-label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.dash-val b { font-size: 18px; }
.budget-me { border-radius: 14px; background: linear-gradient(180deg, #faf9ff, #f5f3fd); border: 1px solid var(--line); }
.budget-sales { font-weight: 800; }
.rank-bar, .budget-bar { border-radius: 99px; }
.board-row.me { background: linear-gradient(90deg, rgba(108, 76, 255, .07), rgba(108, 76, 255, .02)); }
.board-more { border-radius: 12px; }

/* ---------- coaching & big sales ---------- */
.coach-folder { border-radius: 16px; }
.coach-day { border-radius: 16px; }
.coach-day > summary { padding: 16px 18px; }
.coach-intro { border-radius: 14px; background: linear-gradient(180deg, #faf9ff, #f3f0ff); border: 1px solid rgba(108, 76, 255, .1); }
.coach-intro.win { background: linear-gradient(180deg, #f6fdf8, #ecf8f0); border-color: rgba(18, 161, 80, .14); }
.coach-chat { border-radius: 14px; background: #fff; }
.chatview { border-color: #16132b; box-shadow: 0 18px 40px -18px rgba(22, 19, 43, .45); }
.big-sale-amount { font-weight: 800; }
.ppv-chip { background: #eef8f2; }
.fan-name { font-family: var(--font-display); letter-spacing: -.015em; }
.kb-card h3 { font-size: 15.5px; }

/* calm motion for people who prefer it */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
.coach-order[hidden], .ppv-list:empty, [data-found][hidden] { display: none !important; }

/* ---------- a sold PPV in the chat: blurred, with its price on top ---------- */
.ppv-cover { position: absolute; overflow: hidden; border-radius: 6px; z-index: 1; background: #1b1830; }
.ppv-cover > img { position: absolute; display: block; max-width: none; height: auto; filter: blur(16px) saturate(1.2) brightness(.8); transform: scale(1.04); }
.ppv-tag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 14px 9px; border-radius: 14px; background: rgba(12, 10, 24, .62); color: #fff; text-align: center; white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 24px rgba(0, 0, 0, .35); font-family: var(--font-display, inherit); }
.ppv-tag-n { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8ef0b4; }
.ppv-tag b { font-size: 20px; font-weight: 800; line-height: 1.1; }
.ppv-tag-sold { font-size: 10px; color: rgba(255, 255, 255, .7); }
.ppv-tag-sold::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; margin-right: 4px; vertical-align: 1px; }
@media (max-width: 520px) { .ppv-tag { padding: 6px 10px; } .ppv-tag b { font-size: 16px; } }

/* ---------- My month (a chatter's own calendar) ---------- */
.my-month .card-head { padding: 14px 16px 0; }
.my-month .board-nav { display: flex; align-items: center; gap: 4px; }
.my-month .board-nav b { min-width: 120px; text-align: center; font-size: 14px; }
.mm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; padding: 14px 16px 6px; }
.mm-stats > div { background: var(--panel-2, #f7f6fc); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.mm-stats span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.mm-stats b { font-family: var(--font-display, inherit); font-size: 20px; font-weight: 800; line-height: 1.3; }
.mm-stats i { font-style: normal; font-size: 11px; color: var(--faint); }
.mm-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 8px 16px 6px; }
.mm-wd { font-size: 11px; font-weight: 600; color: var(--faint); text-align: center; padding-bottom: 2px; }
.mm-cell { min-height: 58px; border-radius: 10px; border: 1px solid var(--line); padding: 5px 6px; display: flex; flex-direction: column; gap: 1px; font-size: 11px; background: #fff; overflow: hidden; }
.mm-cell.blank { border: 0; background: none; }
.mm-n { font-weight: 600; color: var(--muted); font-size: 11px; }
.mm-h { font-size: 12px; color: var(--text); }
.mm-s { color: #15803d; font-weight: 600; }
.mm-tag { font-size: 10px; font-weight: 700; }
.mm-cell.worked { background: linear-gradient(160deg, #f1edff, #e9e3ff); border-color: #d9d0ff; }
.mm-cell.off { background: #fff4e5; border-color: #fbd9a5; } .mm-cell.off .mm-tag { color: #b45309; }
.mm-cell.wish { background: #fffbeb; border-style: dashed; border-color: #f5d27a; } .mm-cell.wish .mm-tag { color: #a16207; }
.mm-cell.planned .mm-tag { color: var(--accent); }
.mm-cell.today { box-shadow: 0 0 0 2px var(--accent); }
.mm-legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 6px 16px 8px; }
.mm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; border: 1px solid var(--line); }
.mm-legend i.worked { background: #e9e3ff; } .mm-legend i.off { background: #fff4e5; } .mm-legend i.wish { background: #fffbeb; border-style: dashed; } .mm-legend i.planned { background: #fff; }
@media (max-width: 520px) { .mm-cell { min-height: 46px; padding: 3px 4px; } .mm-s { display: none; } .mm-h { font-size: 10px; } }

/* ---------- coach calendar ---------- */
.coach-cal { padding: 14px 16px 16px; margin-bottom: 14px; }
.cc-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }
.cc-head b { min-width: 150px; text-align: center; font-family: var(--font-display, inherit); font-size: 16px; }
.cc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cc-wd { font-size: 11px; font-weight: 600; color: var(--faint); text-align: center; }
.cc-cell { position: relative; min-height: 70px; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  font: inherit; text-align: left; color: var(--text); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; overflow: hidden; }
.cc-cell.blank { border: 0; background: none; cursor: default; }
.cc-cell:disabled { cursor: default; background: #fbfaff; color: var(--faint); }
.cc-cell.has:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(60, 40, 160, .35); border-color: #cfc4ff; }
.cc-cell.has { background: linear-gradient(165deg, #fff, #f5f2ff); }
.cc-cell.met { background: linear-gradient(165deg, #f3fcf6, #e6f8ec); border-color: #c9ecd5; }
.cc-cell.missed { background: linear-gradient(165deg, #fffaf0, #fff1d9); border-color: #f7d9a3; }
.cc-cell.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cc-cell.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 8px 20px -10px rgba(108, 76, 255, .6); }
.cc-n { font-size: 11px; font-weight: 700; color: var(--muted); }
.cc-money { font-size: 12px; font-weight: 800; }
.cc-cell.met .cc-money { color: #15803d; } .cc-cell.missed .cc-money { color: #b45309; }
.cc-info { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.cc-info em { font-style: normal; color: #b45309; font-weight: 600; }
.cc-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(108, 76, 255, .18); }
.cc-faces { display: flex; }
.cc-faces img, .cc-faces i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; margin-left: -5px; object-fit: cover; background: #ece8ff; color: var(--accent);
  font-style: normal; font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; }
.cc-faces > :first-child { margin-left: 0; }
.coach-daypanel { margin-bottom: 14px; } .coach-daypanel .card-head { padding: 14px 16px 6px; }
.coach-day-sum { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.coach-all { margin: 6px 0 14px; } .coach-all > summary { cursor: pointer; padding: 10px 2px; list-style: none; } .coach-all > summary::-webkit-details-marker { display: none; }
.coach-all > summary::before { content: '▸'; display: inline-block; margin-right: 6px; color: var(--faint); transition: transform .15s; } .coach-all[open] > summary::before { transform: rotate(90deg); }
@media (max-width: 560px) { .cc-cell { min-height: 54px; padding: 4px; border-radius: 9px; } .cc-info, .cc-faces { display: none; } .cc-money { font-size: 10px; } .coach-cal { padding: 10px; } .cc-grid { gap: 3px; } }
.coach-day > .coach-day-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }

/* ================= v2.1 polish ================= */
/* the menu always fits: it scrolls on its own when it's taller than the screen (on every page) */
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: transparent transparent; padding: 18px 12px 14px; }
.sidebar:hover { scrollbar-color: var(--line-strong) transparent; }
.sidebar::-webkit-scrollbar { width: 6px; } .sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 6px; } .sidebar:hover::-webkit-scrollbar-thumb { background: var(--line-strong); }
.sidebar > * { flex-shrink: 0; }
.sidebar .brand { padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.nav-label { padding: 14px 12px 4px; font-size: 10px; }
.nav-item { position: relative; padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sidebar .spacer { flex: 1 0 12px; }
.me-chip { margin-top: 8px; border-radius: 14px; }

/* page headings: calmer, clearer hierarchy */
.page-head { margin-bottom: 18px; align-items: flex-end; }
.page-head h1, .hello h1 { letter-spacing: -.025em; }
.page-head p.muted, .hello p.muted { margin-top: 4px; font-size: 14.5px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 22px 2px 10px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* cards: one consistent surface */
.card { border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(22, 19, 43, .04), 0 8px 24px -16px rgba(22, 19, 43, .14); }
.card-head h2 { font-size: 15.5px; letter-spacing: -.01em; }
.list-item { transition: background .12s; }
a.list-item:hover { background: #faf9ff; }

/* tables */
.table thead th { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 700; background: #fbfaff; }
.table tbody tr { transition: background .12s; } .table tbody tr:hover { background: #fbfaff; }

/* tabs as a calm segmented bar */
.tabs { gap: 2px; padding: 4px; background: #efedf7; border-radius: 13px; display: inline-flex; flex-wrap: wrap; border: 0; margin-bottom: 18px; }
.tabs a { padding: 7px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); border: 0; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(22, 19, 43, .12); }

/* pills a touch crisper */
.pill { font-weight: 650; letter-spacing: .01em; }

/* mobile: the menu is a drawer, it keeps its own scroll too */
@media (max-width: 900px) { .sidebar { height: 100dvh; } .nav-item.active::before { display: none; } }
