
/* Sashay HQ styles (staff command center). */
:root {
  --indigo: #2E2B7C; --indigo-2: #3A3690; --indigo-soft: #5A5799; --muted: #8A87AD;
  --teal: #6DCFBE; --teal-l: #E3F6F2; --pink: #F27AC3; --hot: #EC4FA6; --hot-l: #FCE7F3;
  --orange: #F4A04E; --orange-l: #FDF0E2; --lav: #B98CEB; --lav-l: #F1E8FC; --red: #E2546B; --red-l: #FDE8EC; --green: #2FAE7E; --green-l: #E2F6EE;
  --off: #F6F5FB; --line: #ECEAF6; --card: #fff;
  --grad: linear-gradient(120deg, #6DCFBE, #F27AC3, #F4A04E, #B98CEB, #6DCFBE);
  --font: "Outfit", system-ui, sans-serif; --script: "Yellowtail", cursive;
  --r: 20px; --side: 236px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--off); color: var(--indigo); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; text-transform: lowercase; }
a { color: inherit; }
@keyframes g-flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes breathe { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--indigo); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.wordmark { font-family: var(--script); font-size: 34px; line-height: 1; display: inline-flex; align-items: baseline; gap: 3px; }
.wordmark svg { width: 26px; height: 20px; position: relative; top: 2px; }
.wordmark .spark { fill: currentColor; } .wordmark .wave { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.hq-pill { font-size: 11px; font-weight: 900; letter-spacing: .14em; padding: 4px 9px; border-radius: 999px; color: var(--indigo); background: var(--grad); background-size: 300% 300%; animation: g-flow 9s ease-in-out infinite; }
.nav-h { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); padding: 14px 12px 6px; }
.nav button { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: none; color: rgba(255,255,255,.78); padding: 9px 12px; border-radius: 12px; font-weight: 600; font-size: 14.5px; text-align: left; }
.nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav button.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 800; box-shadow: inset 3px 0 0 var(--pink); }
.nav .ico { width: 22px; text-align: center; font-size: 16px; }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--hot); color: #fff; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 10px; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--grad); background-size: 300% 300%; color: var(--indigo); flex: none; }
.side-foot small { display: block; color: rgba(255,255,255,.55); font-size: 12px; }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 16px 32px; background: rgba(246,245,251,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 26px; font-weight: 900; }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; width: 340px; padding: 9px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.search input { border: 0; outline: 0; font: inherit; color: var(--indigo); width: 100%; background: none; }
.kbd { font-size: 11px; font-weight: 800; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 12.5px; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.dot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: breathe 1.6s ease-out infinite; }
.dot.hot { background: var(--hot); }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--indigo-soft); }
.seg button.on { background: var(--indigo); color: #fff; }
.content { padding: 26px 32px 60px; display: grid; gap: 18px; max-width: 1480px; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 20px; box-shadow: 0 1px 0 var(--line), 0 12px 30px -22px rgba(46,43,124,.35); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h2 { font-size: 17px; font-weight: 800; }
.card-h .sub { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.card-h .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.link { border: 0; background: none; color: var(--hot); font-weight: 800; font-size: 13px; padding: 0; }
.grid { display: grid; gap: 18px; }
.g-kpi { grid-template-columns: repeat(5, 1fr); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-1 { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1250px) { .g-kpi { grid-template-columns: repeat(3, 1fr); } .g-2-1 { grid-template-columns: 1fr; } }

/* KPI */
.kpi { position: relative; overflow: hidden; }
.kpi .lab { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 30px; font-weight: 900; letter-spacing: -.03em; margin-top: 6px; line-height: 1.05; }
.kpi .delta { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.up { color: var(--green); background: var(--green-l); } .down { color: var(--red); background: var(--red-l); }
.kpi svg.spark { position: absolute; right: 14px; bottom: 14px; width: 92px; height: 34px; }
.kpi.hero { color: var(--indigo); background: var(--grad); background-size: 300% 300%; animation: g-flow 12s ease-in-out infinite; }
.kpi.hero .lab { color: rgba(46,43,124,.7); }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; max-height: 452px; overflow: auto; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); animation: slidein .4s ease-out; }
.feed li:last-child { border-bottom: 0; }
.emo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--off); flex: none; }
.feed .who { font-weight: 700; } .feed .meta { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.feed .amt { margin-left: auto; font-weight: 900; font-size: 16px; }
.feed .amt.big { color: var(--hot); }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 0 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); font-weight: 600; vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: #FBFAFE; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pname { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.pname .emo { width: 32px; height: 32px; font-size: 16px; border-radius: 10px; }
.pname small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.c-live { background: var(--hot-l); color: #B5287B; } .c-ok { background: var(--green-l); color: #1F7F5B; } .c-wait { background: var(--orange-l); color: #A9611B; }
.c-new { background: var(--lav-l); color: #6C3FB0; } .c-done { background: #EEEDF5; color: var(--indigo-soft); } .c-bad { background: var(--red-l); color: #B53048; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.fbtn { border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 12.5px; color: var(--indigo-soft); }
.fbtn.on { background: var(--indigo); color: #fff; border-color: var(--indigo); }

/* bars / charts */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; font-weight: 700; }
.bar-row .track { height: 12px; border-radius: 999px; background: var(--off); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 999px; background: var(--grad); background-size: 300% 100%; }
.bar-row .v { text-align: right; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: 230px; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; color: var(--indigo-soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* alerts */
.alerts { display: grid; gap: 10px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--off); }
.alert .emo { width: 34px; height: 34px; font-size: 17px; background: #fff; }
.alert b { display: block; } .alert span { color: var(--indigo-soft); font-size: 12.5px; font-weight: 600; }
.alert .act { margin-left: auto; align-self: center; }
.btn { border: 0; border-radius: 11px; padding: 8px 14px; font-weight: 800; font-size: 13px; background: var(--indigo); color: #fff; white-space: nowrap; }
.btn.ghost { background: #fff; color: var(--indigo); box-shadow: inset 0 0 0 1px var(--line); }
.btn.pink { background: var(--hot); } .btn.danger { background: var(--red); }
.btn.grad { color: var(--indigo); background: var(--grad); background-size: 300% 300%; animation: g-flow 9s ease-in-out infinite; }

/* funnel */
.funnel { display: grid; gap: 12px; }
.fstep { display: grid; grid-template-columns: 200px 1fr 120px; gap: 16px; align-items: center; }
.fstep .lbl b { display: block; font-size: 15px; } .fstep .lbl span { color: var(--muted); font-size: 12px; font-weight: 600; }
.fstep .fb { height: 42px; border-radius: 12px; background: var(--grad); background-size: 300% 100%; display: flex; align-items: center; padding: 0 14px; font-weight: 900; color: var(--indigo); min-width: 60px; }
.fstep .drop { font-size: 12.5px; font-weight: 800; color: var(--red); text-align: right; }
.fstep .drop.ok { color: var(--green); }

/* kanban (CRM) */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 14px; overflow-x: auto; }
.col { background: #EFEDF8; border-radius: 18px; padding: 12px; min-height: 300px; }
.col-h { display: flex; align-items: center; gap: 8px; font-weight: 800; padding: 2px 4px 10px; text-transform: lowercase; }
.col-h .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.kc { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: 0 6px 14px -12px rgba(46,43,124,.5); cursor: pointer; }
.kc b { display: block; } .kc .meta { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.kc .tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.kc .due { margin-top: 8px; font-size: 12px; font-weight: 800; color: #A9611B; }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(31,29,43,.32); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--off); z-index: 21; box-shadow: -30px 0 60px -30px rgba(46,43,124,.45); display: flex; flex-direction: column; animation: dslide .25s ease-out; }
@keyframes dslide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.d-head { padding: 22px 24px 18px; color: var(--indigo); background: var(--grad); background-size: 300% 300%; animation: g-flow 12s ease-in-out infinite; }
.d-head .x { float: right; border: 0; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.6); font-weight: 800; }
.d-head h2 { font-size: 26px; font-weight: 900; margin-top: 4px; }
.d-head .meta { font-weight: 700; opacity: .8; }
.d-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; padding: 12px 0; border-radius: 16px; background: rgba(255,255,255,.5); }
.d-stats div { text-align: center; } .d-stats b { display: block; font-size: 18px; font-weight: 900; } .d-stats span { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.d-body { padding: 18px 24px 30px; overflow: auto; display: grid; gap: 14px; align-content: start; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.tl li { position: relative; padding: 0 0 14px 14px; }
.tl li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--pink); }
.tl b { display: block; } .tl span { color: var(--muted); font-size: 12px; font-weight: 600; }
.note { width: 100%; min-height: 70px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; color: var(--indigo); resize: vertical; }

/* confirm modal */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(31,29,43,.4); }
.modal .box { width: min(440px, 92vw); background: #fff; border-radius: 22px; padding: 24px; text-align: center; box-shadow: 0 30px 60px -20px rgba(46,43,124,.5); }
.modal h3 { font-size: 22px; font-weight: 900; margin: 6px 0 8px; } .modal p { color: var(--indigo-soft); font-weight: 600; }
.modal .row { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }

/* heatmap */
.heat { display: grid; grid-template-columns: 40px repeat(12, 1fr); gap: 4px; font-size: 11px; font-weight: 700; color: var(--muted); }
.heat div.c { height: 26px; border-radius: 6px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; background: var(--indigo); color: #fff; padding: 12px 16px; border-radius: 14px; font-weight: 700; box-shadow: 0 20px 40px -20px rgba(46,43,124,.6); animation: slidein .3s; }

/* login */
.login { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(900px 500px at 20% 10%, rgba(109,207,190,.35), transparent 60%), radial-gradient(800px 500px at 90% 90%, rgba(242,122,195,.35), transparent 60%), var(--indigo); }
.login .box { width: 400px; background: #fff; border-radius: 26px; padding: 34px 30px; text-align: center; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); }
.login .wordmark { color: var(--indigo); font-size: 52px; }
.login input { width: 100%; margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); font: 700 16px var(--font); color: var(--indigo); text-align: center; letter-spacing: .02em; }
.login .code { letter-spacing: .6em; font-size: 22px; }
.login .btn { width: 100%; margin-top: 12px; padding: 14px; font-size: 15px; border-radius: 14px; }
.login small { display: block; margin-top: 14px; color: var(--muted); font-weight: 600; }
.mock-banner { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; background: #fff; border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--indigo-soft); box-shadow: 0 10px 30px -18px rgba(46,43,124,.5); }
.mock-banner button { border: 0; background: none; color: var(--hot); font-weight: 800; }

/* real app additions */
.empty { color: var(--muted); font-weight: 700; text-align: center; padding: 26px 10px; }
.env-switch button.on.test { background: var(--orange); }
.sandbox-bar { background: var(--orange-l); color: #A9611B; font-weight: 800; font-size: 12.5px; text-align: center; padding: 6px; }
.lerr { color: var(--red); font-weight: 700; margin-top: 10px; min-height: 1.2em; }
.soon { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--lav-l); color: #6C3FB0; }
.tl .when { color: var(--muted); font-size: 12px; font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
