/* Cutting Edge Salon — website + salon app demo by Marshal Systems. Brand tokens live in :root (see research.md). */
:root {
  /* Cutting Edge brand (from cuttingedge.salon CSS): burgundy #7C0000, charcoal #3A3C3B, grey #575757, black + white, font Assistant */
  --ink: #141414; --ink-2: #474747; --ink-3: #85827F;
  --night: #0E0E0E; --night-2: #1C1B1B; --night-3: #3A3C3B;
  --brand: #7C0000; --brand-2: #A8201A; --brand-d: #5A0000; --brand-soft: #F6E7E6;
  --bg: #F4F3F1; --bg-2: #EAE8E5; --card: #FFFFFF; --line: #E4E1DD;
  --ok: #1E9A5C; --ok-bg: #E2F6EB; --warn: #B76A00; --warn-bg: #FFF1DC; --bad: #C8352B; --bad-bg: #FDE8E6; --info: #2563A8; --info-bg: #E5EFFA;
  --r: 18px; --r-lg: 24px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px -12px rgba(0,0,0,.18);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.06), 0 24px 48px -20px rgba(0,0,0,.4);
  --ease: cubic-bezier(.2,.8,.2,1); --spring: cubic-bezier(.2,1.4,.4,1);
  --head: 'Playfair Display', Georgia, serif; --body: Assistant, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side: 250px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 16px; overflow-x: clip; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--head); letter-spacing: -.005em; margin: 0; font-weight: 600; }
svg { flex: none; }
button > svg, a > svg { width: 20px; height: 20px; }
span > svg, label > svg, h4 > svg { width: 18px; height: 18px; }
.bk-opt > svg { color: var(--ink-3); }
.muted { color: var(--ink-3); } .small { font-size: 13px; } .tiny { font-size: 12px; } .b { font-weight: 700; }
.grow { flex: 1; min-width: 0; } .row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 10px; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hide { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.gold { color: var(--brand-d); }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--night) 0%, #0B0908 100%); color: #E9E1D8; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 14px; overflow-y: auto; z-index: 20; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 6px 8px 16px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 6px; }
.brand > div { display: flex; align-items: center; }
.brand-logo { width: 100%; max-width: 200px; height: auto; display: block; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); }
.brand b { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #fff; display: inline-block; background: var(--brand); border-radius: 6px; padding: 3px 8px; margin-right: 8px; }
.brand span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #C9A3A0; }
.nav-sec { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8F8178; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: #E2D9D0; font-weight: 500; transition: background .2s, color .2s; position: relative; }
.nav a svg { width: 20px; height: 20px; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: linear-gradient(90deg, rgba(124,0,0,.32), rgba(124,0,0,.06)); color: #fff; }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.nav a .badge { margin-left: auto; background: var(--brand-2); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.side .foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.side-btn { background: rgba(255,255,255,.07) !important; color: #fff !important; border-color: transparent !important; }
.demo-pill { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #D8CCC1; background: rgba(255,255,255,.06); border-radius: 12px; padding: 10px 12px; }
.demo-pill a { color: var(--brand-2); font-weight: 700; text-decoration: none; }
.demo-pill .dot, .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: ping 2s infinite; flex: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(244,243,241,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; height: 44px; color: var(--ink-3); cursor: text; transition: box-shadow .2s; }
.search:hover { box-shadow: var(--shadow); }
.search svg { width: 18px; height: 18px; }
.search kbd { white-space: nowrap; margin-left: auto; font: 600 11px var(--body); background: var(--bg-2); border-radius: 6px; padding: 3px 7px; color: var(--ink-3); }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; position: relative; color: var(--ink-2); transition: transform .15s, box-shadow .2s; flex: none; }
.iconbtn:hover { box-shadow: var(--shadow); } .iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn .dotn { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }
.roleswitch { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 6px 4px 12px; height: 44px; }
.roleswitch label { font-size: 12px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.roleswitch select { border: 0; background: var(--bg); border-radius: 10px; font-weight: 700; padding: 8px 10px; color: var(--ink); cursor: pointer; font-size: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(150deg, var(--brand-2), var(--brand-d)); flex: none; border: 0; cursor: pointer; }
.content { padding: 8px 28px 60px; max-width: 1400px; width: 100%; }

/* ---------- page header ---------- */
.ph { display: flex; align-items: flex-end; gap: 16px; margin: 14px 0 20px; flex-wrap: wrap; }
.ph h1 { font-size: 36px; line-height: 1.05; }
.ph .sub { color: var(--ink-3); margin-top: 6px; }
.ph .acts { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; } .crumb a { text-decoration: none; color: var(--brand-d); font-weight: 600; }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .15s var(--ease), box-shadow .2s, background .2s; }
.btn:hover { box-shadow: var(--shadow); } .btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: linear-gradient(135deg, var(--brand-2), var(--brand) 55%, var(--brand-d)); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -12px rgba(90,0,0,.95); }
.btn.primary:hover { box-shadow: 0 14px 28px -12px rgba(90,0,0,1); }
.btn.dark { background: var(--night); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.04); box-shadow: none; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 36px; padding: 0 12px; border-radius: 11px; font-size: 13px; }
.btn.lg { min-height: 54px; padding: 0 26px; font-size: 16px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.busy { pointer-events: none; color: transparent !important; position: relative; }
.btn.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(0,0,0,.15); border-top-color: var(--ink); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
.in { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 13px; padding: 10px 14px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.in:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(124,0,0,.18); }
textarea.in { min-height: 90px; resize: vertical; }
select.in { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238A817A' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.fgrid .full { grid-column: 1 / -1; }
.seg { display: inline-flex; background: var(--bg-2); padding: 4px; border-radius: 14px; gap: 4px; flex-wrap: wrap; max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; min-height: 36px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.toggle { position: relative; width: 50px; height: 30px; border-radius: 15px; background: #D8CEC4; border: 0; cursor: pointer; transition: background .25s; flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .3s var(--spring); }
.toggle.on { background: var(--ok); } .toggle.on::after { transform: translateX(20px); }
input[type=range] { width: 100%; accent-color: var(--brand); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand-d); }

/* ---------- cards, chips, tables ---------- */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px; border: 1px solid rgba(233,226,217,.7); min-width: 0; }
.card.flat { box-shadow: none; }
.card h3 { font-size: 21px; }
.card .ch { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card .ch .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card.dark { background: linear-gradient(150deg, var(--night-2), var(--night)); color: #EFE7DE; border-color: transparent; }
.card.dark h3 { color: #fff; } .card.dark .muted { color: #B6A99E; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.mt { margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.chip svg { width: 14px; height: 14px; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.bad { background: var(--bad-bg); color: var(--bad); } .chip.info { background: var(--info-bg); color: var(--info); } .chip.gold { background: var(--brand-soft); color: var(--brand-d); } .chip.dark { background: var(--night); color: #fff; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr[data-href] { cursor: pointer; } .tbl tbody tr[data-href]:hover { background: #FBF9F6; }
.tbl .r { text-align: right; }
.tblwrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.kpi { position: relative; overflow: hidden; }
.kpi .lab { font-size: 13px; color: var(--ink-3); font-weight: 600; padding-right: 46px; }
.kpi .val { font-family: var(--head); font-size: 38px; font-weight: 700; line-height: 1.1; margin-top: 6px; }
.kpi .delta { font-size: 13px; font-weight: 700; margin-top: 4px; }
.kpi .delta.up { color: var(--ok); } .kpi .delta.down { color: var(--bad); }
.kpi .spark { position: absolute; right: 14px; bottom: 14px; width: 100px; height: 38px; opacity: .9; }
.kpi .ico { position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-d); }
.kpi .ico svg { width: 22px; height: 22px; }
.empty { text-align: center; padding: 36px 20px; color: var(--ink-3); }
.empty svg { width: 50px; height: 50px; color: #D6CABE; margin-bottom: 10px; }
.bar-track { height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-2), var(--brand-d)); width: 0; transition: width 1.1s var(--ease); }
.bar-fill.ok { background: linear-gradient(90deg, #4CC98A, var(--ok)); } .bar-fill.warn { background: linear-gradient(90deg, #FFC15E, #E58A00); } .bar-fill.bad { background: linear-gradient(90deg, #F27A70, var(--bad)); }
.list-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.list-item:first-child { border-top: 0; }
.list-item[data-href] { cursor: pointer; }
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; background: var(--brand-d); overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 64px; height: 64px; font-size: 22px; } .av.sm { width: 32px; height: 32px; font-size: 12px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; font-weight: 500; }
.banner svg { width: 22px; height: 22px; flex: none; }
.banner.info { background: var(--info-bg); color: #1B4A80; } .banner.warn { background: var(--warn-bg); color: #8A5000; } .banner.bad { background: var(--bad-bg); color: #9B231B; } .banner.ok { background: var(--ok-bg); color: #126B40; } .banner.gold { background: var(--brand-soft); color: #6E5025; }
.pill-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 40px; transition: all .2s; }
.pill-tabs button.on { background: var(--night); color: #fff; border-color: var(--night); }

/* ---------- modal / drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,17,16,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .2s ease; }
.overlay.dover { background: rgba(20,17,16,.25); }
.overlay.out { animation: fadeout .2s ease forwards; }
.modal { background: #fff; border-radius: 26px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); width: 100%; max-width: 560px; max-height: calc(100dvh - 40px); display: flex; flex-direction: column; animation: pop .35s var(--spring); min-width: 0; }
.modal.wide { max-width: 980px; } .modal.mid { max-width: 760px; }
.overlay.out .modal { animation: popout .2s ease forwards; }
.modal .mh { display: flex; align-items: center; gap: 12px; padding: 20px 24px 6px; }
.modal .mh h2 { font-size: 26px; }
.modal .mh .x { margin-left: auto; }
.modal .mb { padding: 8px 24px 20px; overflow-y: auto; }
.modal .mf { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 24px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } } @keyframes fadeout { to { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.96); } } @keyframes popout { to { opacity: 0; transform: translateY(10px) scale(.98); } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; z-index: 101; box-shadow: -30px 0 60px -30px rgba(0,0,0,.4); display: flex; flex-direction: column; animation: slidein .35s var(--ease); }
.drawer.out { animation: slideout .25s ease forwards; }
.dr-title { font-size: 26px; }
.drawer .dbody { overflow-y: auto; flex: 1; padding: 0 20px 20px; }
@keyframes slidein { from { transform: translateX(100%); } } @keyframes slideout { to { transform: translateX(100%); } }
.docpaper { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px 34px; }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--night); color: #fff; padding: 12px 18px; border-radius: 16px; box-shadow: var(--shadow-lg); font-weight: 600; animation: toastin .45s var(--spring); max-width: 92vw; }
.toast svg { width: 20px; height: 20px; color: var(--brand-2); }
.toast.bad svg { color: #FF9A8F; }
.toast.out { animation: toastout .3s ease forwards; }
@keyframes toastin { from { opacity: 0; transform: translateY(20px) scale(.9); } } @keyframes toastout { to { opacity: 0; transform: translateY(10px); } }

/* ---------- notifications drawer ---------- */
.note-item { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.note-item:hover { background: #FBF9F6; }
.note-item.unread { background: #FBF5EA; }
.note-item .ni { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-d); flex: none; }
.note-item .ni svg { width: 20px; height: 20px; }

/* ---------- command palette ---------- */
.palette { max-width: 640px; }
.palette .pin { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.palette .pin input { flex: 1; border: 0; font-size: 17px; outline: 0; font-family: var(--body); min-width: 0; }
.palette .pres { max-height: 60vh; overflow-y: auto; padding: 8px; }
.palette .pr { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.palette .pr.sel, .palette .pr:hover { background: var(--brand-soft); }
.palette .pr .pi { width: 34px; height: 34px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; color: var(--brand-d); }
.palette .pr .pi svg { width: 18px; height: 18px; }
.palette .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); padding: 10px 12px 4px; font-weight: 700; }

/* ---------- tour ---------- */
.tour-ring { position: fixed; z-index: 150; border-radius: 16px; box-shadow: 0 0 0 4px var(--brand), 0 0 0 9999px rgba(20,17,16,.58); transition: all .45s var(--ease); pointer-events: none; }
.tour-tip { position: fixed; z-index: 151; background: #fff; border-radius: 20px; padding: 18px 20px; width: 360px; box-shadow: var(--shadow-lg); transition: all .45s var(--ease); }
.tour-tip h4 { font-size: 22px; margin-bottom: 6px; }
.tour-tip p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.45; }
.tour-count { letter-spacing: .08em; color: var(--brand-d) !important; }
.tour-tip.docked { border-radius: 22px; padding: 16px 18px; box-shadow: 0 -10px 40px -12px rgba(0,0,0,.45); }
.tour-tip.docked h4 { font-size: 20px; } .tour-tip.docked p { font-size: 14px; margin-bottom: 12px; }
.tour-tip.docked .btn.sm { min-height: 44px; padding: 0 16px; }

/* ---------- motion helpers ---------- */
.rise { animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.chart-bar { transform-origin: bottom; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleY(0); } }
.chart-line { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart-area { opacity: 0; animation: fadein 1s .5s ease forwards; }
@keyframes fadein { to { opacity: 1; } }
.donut-seg { transition: stroke-dasharray 1.2s var(--ease); }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.shimmer { background: linear-gradient(90deg, var(--bg-2) 0%, #F8F4EF 50%, var(--bg-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.pop-check { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 6px auto 14px; background: linear-gradient(135deg, #4CC98A, var(--ok)); color: #fff; animation: popin .6s var(--spring) both; box-shadow: 0 16px 30px -14px rgba(30,154,92,.9); }
.pop-check svg { width: 44px; height: 44px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: checkdraw .5s .35s ease forwards; }
@keyframes popin { from { transform: scale(0); } } @keyframes checkdraw { to { stroke-dashoffset: 0; } }

/* ---------- phone mockup (text message previews) ---------- */
.phone { width: 290px; max-width: 100%; margin: 0 auto; border-radius: 40px; background: #0E0D0C; padding: 12px; box-shadow: var(--shadow-lg); }
.phone .scr { background: #fff; border-radius: 30px; overflow: hidden; min-height: 420px; display: flex; flex-direction: column; }
.phone .sbar { display: flex; justify-content: space-between; padding: 10px 22px 4px; font-size: 12px; font-weight: 700; }
.phone .who { text-align: center; padding: 6px 0 10px; border-bottom: 1px solid #eee; font-size: 12px; color: #666; }
.phone .who .av { margin: 0 auto 4px; width: 40px; height: 40px; }
.phone .msgs { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; background: #fff; }
.bub { max-width: 82%; padding: 9px 13px; border-radius: 18px; font-size: 14px; line-height: 1.35; animation: rise .5s var(--ease) both; }
.bub.in { background: #ECECEE; color: #111; align-self: flex-start; border-bottom-left-radius: 6px; }
.bub.out { background: #2F7CF6; color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.bub-time { font-size: 11px; color: #999; text-align: center; margin: 4px 0; }

/* ---------- sign-in ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.login .art { position: relative; overflow: hidden; background: var(--night); }
.login .art .bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; transform: scale(1.06); animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.16) translate(-2%, -2%); } }
.login .art .over { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(20,17,16,.25), rgba(12,10,9,.93)); display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; color: #fff; }
.login .art h1 { font-size: 54px; line-height: 1; color: #fff; }
.login .art h1 em { font-style: italic; color: var(--brand-2); }
.login .form { display: grid; place-items: center; padding: 30px; }
.login .form .box { width: 100%; max-width: 420px; }
.rolecards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rolecard { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; text-align: left; background: #fff; cursor: pointer; transition: all .2s var(--ease); min-height: 72px; }
.rolecard b { display: block; font-size: 15px; } .rolecard span { font-size: 12px; color: var(--ink-3); }
.rolecard.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(124,0,0,.2); }

/* ---------- responsive ---------- */
.mob-nav { display: none; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-2-1, .g-1-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .side.open { transform: none; box-shadow: 30px 0 60px rgba(0,0,0,.4); }
  .mob-nav { display: grid; }
  .top { padding: 10px 14px; gap: 8px; } .content { padding: 4px 14px 90px; }
  .search kbd, .roleswitch label { display: none; }
  .search { flex: 0 0 44px; width: 44px; padding: 0; justify-content: center; }
  .search > span { display: none; }
  .roleswitch { padding: 4px; min-width: 0; flex: 1 1 auto; max-width: 180px; }
  .roleswitch select { width: 100%; min-width: 0; }
  .top > .grow { display: none; }
  .top .avatar { display: none; }
  .docpaper { padding: 18px 14px; overflow-x: auto; }
  .dochead > div:last-child { text-align: left !important; flex-basis: 100%; }
  .modal .mf > .muted { display: none; }
  .overlay { padding: 10px; } .modal .mb { padding: 8px 16px 18px; } .modal .mh { padding: 16px 16px 4px; } .modal .mf { padding: 12px 16px 16px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .g4.keep2, .g3.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph h1 { font-size: 29px; }
  .ph { flex-direction: column; align-items: stretch; gap: 12px; } .ph .acts { margin-left: 0; }
  .kpi .val { font-size: 32px; }
  .card { padding: 18px; }
  .login { grid-template-columns: 1fr; } .login .art h1 { font-size: 34px; } .login .art .over { position: relative; padding: 28px 22px 26px; } .login .art .over p { font-size: 15px !important; }
}
@media (max-width: 380px) { .g4.keep2 { grid-template-columns: minmax(0, 1fr); } .rolecards { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  body { background: #fff; }
  .side, .top, .toasts, .overlay .mh .x, .modal .mf, .no-print, .site-head, .demo-float { display: none !important; }
  .overlay { position: static; background: none; backdrop-filter: none; padding: 0; display: block; }
  .modal { box-shadow: none; max-height: none; max-width: none; border-radius: 0; }
  body:has(#modal) #app { display: none; }
}
