:root {
  --ink:#171714; --ink-2:#24231f; --paper:#f4f1e9; --surface:#fffefa; --surface-2:#ebe7dc;
  --line:#d9d4c8; --muted:#757168; --faint:#a8a298; --red:#e84c34; --red-dark:#b93222;
  --lime:#d9ff59; --gold:#caa65d; --green:#208766; --blue:#3578e5; --amber:#d99119;
  --violet:#7957cf; --shadow:0 18px 50px rgba(40,35,25,.09); --radius:18px;
  --sidebar:252px; --topbar:82px;
}

* { box-sizing:border-box; }
html { color-scheme:light; background:var(--paper); scroll-behavior:smooth; }
body { margin:0; color:var(--ink); background:var(--paper); font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:14px; line-height:1.45; -webkit-font-smoothing:antialiased; }
button,input,select,textarea { font:inherit; }
button,a,select { -webkit-tap-highlight-color:transparent; }
button { color:inherit; }
a { color:inherit; text-decoration:none; }
[hidden] { display:none !important; }
:focus-visible { outline:3px solid rgba(53,120,229,.28); outline-offset:2px; }

.boot-screen { min-height:100vh; display:flex; align-items:center; justify-content:center; gap:14px; background:var(--ink); color:#fff; }
.boot-screen .boot-mark { width:44px; height:44px; border-radius:12px; display:grid; place-items:center; background:var(--red); box-shadow:0 0 0 9px rgba(232,76,52,.1); }
.boot-mark span { font-weight:900; font-size:11px; letter-spacing:-.3px; }
.boot-screen strong,.boot-screen small { display:block; }
.boot-screen strong { letter-spacing:1.5px; }
.boot-screen small { margin-top:3px; color:#99958d; }

.login-screen { min-height:100vh; display:grid; grid-template-columns:minmax(0,1.3fr) minmax(360px,.7fr); background:#fff; }
.login-visual { padding:46px; display:flex; flex-direction:column; justify-content:space-between; min-height:100vh; color:#fff; background:radial-gradient(circle at 72% 20%,rgba(232,76,52,.42),transparent 28%),radial-gradient(circle at 15% 88%,rgba(202,166,93,.15),transparent 30%),linear-gradient(145deg,#12120f,#211b16 70%,#13120f); }
.brand-lockup { display:flex; gap:10px; align-items:center; letter-spacing:1.4px; }
.brand-cube { width:34px; height:34px; border-radius:9px; background:var(--red); color:white; display:grid; place-items:center; font-size:9px; font-weight:900; letter-spacing:-.2px; }
.login-copy { max-width:720px; }
.login-copy h1 { font-size:clamp(46px,6.4vw,88px); line-height:.91; letter-spacing:-5px; margin:12px 0 24px; }
.login-copy>p:last-child { font-size:18px; max-width:520px; color:#beb8ae; }
.login-cities { color:#8f8a82; letter-spacing:4px; font-size:11px; }
.login-card { width:min(440px,80%); margin:auto; }
.login-card h2 { font-size:34px; letter-spacing:-1.5px; margin:7px 0 5px; }
.login-card>label { display:grid; gap:7px; font-weight:700; margin:20px 0; }
.login-card input { border:1px solid var(--line); border-radius:12px; padding:13px 14px; background:#fff; }
.login-card>small { display:block; text-align:center; color:var(--muted); margin-top:14px; }
.form-error { min-height:20px; color:var(--red-dark); }
.password-hint { margin:-10px 0 14px; color:var(--muted); font-size:11px; }
.invite-visual { background:radial-gradient(circle at 74% 26%,rgba(217,255,89,.16),transparent 25%),radial-gradient(circle at 12% 85%,rgba(232,76,52,.27),transparent 31%),linear-gradient(145deg,#11110f,#29231d 75%,#11110f); }
.login-card .button.wide + .button.wide { margin-top:9px; }

.app-shell { min-height:100vh; display:grid; grid-template-columns:var(--sidebar) minmax(0,1fr); }
.sidebar { position:fixed; inset:0 auto 0 0; z-index:30; width:var(--sidebar); color:#f6f2e9; background:var(--ink); display:flex; flex-direction:column; padding:22px 14px 14px; overflow-y:auto; }
.sidebar-head { display:flex; justify-content:space-between; align-items:center; padding:0 6px; }
.sidebar-close { display:none !important; }
.tour-signature { margin:24px 6px 18px; padding:15px 14px; border:1px solid #393832; border-radius:14px; background:linear-gradient(145deg,#24231f,#191916); position:relative; overflow:hidden; }
.tour-signature::after { content:""; position:absolute; width:70px; height:70px; border:16px solid rgba(232,76,52,.13); border-radius:50%; right:-26px; top:-30px; }
.tour-signature span,.tour-signature small,.tour-signature strong { display:block; position:relative; z-index:1; }
.tour-signature span { font-size:10px; color:var(--red); font-weight:900; letter-spacing:1px; }
.tour-signature strong { margin-top:4px; font-size:14px; }
.tour-signature small { color:#8e8b84; font-size:9px; letter-spacing:1.1px; }
.main-nav { flex:1; }
.main-nav p { margin:17px 12px 7px; color:#74716a; font-size:9px; font-weight:900; letter-spacing:1.3px; }
.main-nav a { min-height:41px; padding:9px 11px; display:grid; grid-template-columns:23px minmax(0,1fr) auto; align-items:center; gap:8px; border-radius:11px; color:#aaa69f; font-size:13px; font-weight:650; transition:.16s ease; }
.main-nav a:hover { background:#23231f; color:#fff; }
.main-nav a.active { color:#fff; background:#2c2b26; box-shadow:inset 3px 0 var(--red); }
.nav-icon { width:22px; text-align:center; color:#77736b; font-size:17px; font-family:ui-monospace,monospace; }
.main-nav a.active .nav-icon { color:var(--lime); }
.main-nav em { min-width:19px; height:19px; padding:0 5px; border-radius:10px; display:grid; place-items:center; color:#fff; background:var(--red); font-size:9px; font-style:normal; }
.sidebar-status { margin-top:18px; padding:12px; border:1px solid #34332e; border-radius:12px; background:#1d1d1a; }
.sidebar-status>div:first-child { display:flex; gap:7px; align-items:center; font-size:11px; }
.sidebar-status small { display:block; color:#77746e; font-size:9px; margin-top:3px; }
.live-dot { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px rgba(32,135,102,.13); }
.mini-progress { height:3px; margin-top:10px; background:#35342f; border-radius:5px; overflow:hidden; }
.mini-progress span { display:block; height:100%; width:18%; background:linear-gradient(90deg,var(--red),var(--gold)); }
.account-card { margin-top:9px; padding:10px 8px; width:100%; border:0; border-radius:12px; background:transparent; color:#fff; display:grid; grid-template-columns:34px minmax(0,1fr) auto; text-align:left; align-items:center; gap:9px; cursor:pointer; }
.account-card:hover { background:#23231f; }
.account-card strong,.account-card small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.account-card strong { font-size:11px; }
.account-card small { font-size:9px; color:#77746e; }
.avatar { width:34px; height:34px; border-radius:11px; display:grid; place-items:center; color:var(--ink); background:var(--lime); font-weight:900; font-size:10px; }

.workspace-shell { grid-column:2; min-width:0; }
.topbar { height:var(--topbar); position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:13px 28px; background:rgba(244,241,233,.92); border-bottom:1px solid rgba(217,212,200,.8); backdrop-filter:blur(14px); }
.topbar-title { display:flex; align-items:center; gap:12px; min-width:0; }
.topbar-title h1 { margin:1px 0 0; font-size:23px; line-height:1; letter-spacing:-.7px; }
.eyebrow { margin:0; color:var(--red); font-size:9px; font-weight:900; letter-spacing:1.4px; text-transform:uppercase; }
.topbar-actions { display:flex; align-items:center; gap:9px; }
.mobile-menu { display:none !important; }
.search-trigger { height:42px; width:220px; padding:0 10px; border:1px solid var(--line); border-radius:12px; display:flex; align-items:center; gap:8px; color:var(--muted); background:rgba(255,255,255,.55); cursor:pointer; }
.search-trigger span:nth-child(2) { flex:1; text-align:left; }
kbd { padding:2px 5px; border:1px solid var(--line); border-bottom-width:2px; border-radius:5px; color:#807b72; background:#fff; font-size:9px; font-family:inherit; }
.city-filter { height:42px; min-width:146px; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:7px; padding:0 9px; border:1px solid var(--line); border-radius:12px; color:var(--muted); background:rgba(255,255,255,.55); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.5px; }
.city-filter select { min-width:0; border:0; outline:0; color:var(--ink); background:transparent; text-transform:none; font-weight:700; }
.button,.icon-button { border:0; border-radius:11px; cursor:pointer; transition:.16s ease; }
.button { min-height:42px; padding:0 15px; display:inline-flex; align-items:center; justify-content:center; gap:6px; font-size:12px; font-weight:850; }
.button.primary { color:#fff; background:var(--red); box-shadow:0 8px 18px rgba(232,76,52,.2); }
.button.primary:hover { background:var(--red-dark); transform:translateY(-1px); }
.button.dark { color:#fff; background:var(--ink); }
.button.ghost { color:var(--ink); border:1px solid var(--line); background:#fff; }
.button.soft { background:var(--surface-2); }
.button.small { min-height:34px; padding:0 11px; font-size:11px; }
.button.wide { width:100%; }
.button[disabled] { opacity:.45; cursor:not-allowed; transform:none; }
.icon-button { width:42px; height:42px; display:grid; place-items:center; border:1px solid var(--line); background:rgba(255,255,255,.55); font-size:16px; }
.notification-button { position:relative; }
.notification-button span { position:absolute; width:7px; height:7px; border-radius:50%; background:var(--red); right:8px; top:7px; color:transparent; }
.baseline-strip { min-height:34px; padding:7px 28px; display:flex; align-items:center; gap:10px; color:#6d6659; background:#eae3d4; border-bottom:1px solid #ddd3c0; font-size:10px; }
.baseline-label { color:#fff; background:var(--ink); border-radius:5px; padding:3px 6px; font-weight:900; letter-spacing:.7px; }
.baseline-strip button { border:0; background:transparent; color:var(--ink); font-size:10px; font-weight:850; text-decoration:underline; cursor:pointer; }
.baseline-actions { margin-left:auto; display:flex; align-items:center; gap:12px; flex:0 0 auto; }
.sync-button { display:inline-flex; align-items:center; gap:6px; text-decoration:none!important; }
.sync-button i { width:7px; height:7px; border-radius:50%; background:#72916b; box-shadow:0 0 0 3px rgba(114,145,107,.14); }
.sync-button.checking i { background:#b98b38; animation:sync-pulse 1s ease infinite; }
.sync-button.pending i { background:#e84c34; box-shadow:0 0 0 3px rgba(232,76,52,.14); }
.sync-button.offline i { background:#77746e; box-shadow:none; }
@keyframes sync-pulse { 50% { opacity:.35; transform:scale(.78); } }
.view { width:min(1680px,100%); margin:0 auto; padding:26px 28px 60px; }

.page-head { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:20px; }
.page-head h2 { margin:2px 0 0; font-size:28px; line-height:1.04; letter-spacing:-1.2px; }
.page-head p { margin:7px 0 0; color:var(--muted); max-width:720px; }
.head-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.segmented { display:inline-flex; padding:3px; border:1px solid var(--line); border-radius:11px; background:#fff; }
.segmented button { min-height:31px; padding:0 10px; border:0; border-radius:8px; background:transparent; color:var(--muted); font-size:10px; font-weight:850; cursor:pointer; }
.segmented button.active { color:#fff; background:var(--ink); }

.hero-command { position:relative; min-height:224px; margin-bottom:16px; padding:28px; display:grid; grid-template-columns:minmax(0,1.3fr) minmax(310px,.7fr); gap:25px; border-radius:24px; overflow:hidden; color:#fff; background:radial-gradient(circle at 90% 10%,rgba(232,76,52,.45),transparent 31%),linear-gradient(135deg,#171714,#272018 70%,#171714); box-shadow:var(--shadow); }
.hero-command::after { content:""; position:absolute; width:260px; height:260px; border:50px solid rgba(217,255,89,.035); border-radius:50%; right:18%; bottom:-210px; }
.hero-command>div { position:relative; z-index:1; }
.hero-command h2 { margin:8px 0 12px; font-size:clamp(32px,4vw,57px); line-height:.95; letter-spacing:-2.8px; }
.hero-command .hero-dek { color:#bcb7ad; max-width:670px; font-size:14px; }
.hero-meta { display:flex; gap:18px; margin-top:23px; }
.hero-meta>div { padding-right:18px; border-right:1px solid #403d37; }
.hero-meta>div:last-child { border-right:0; }
.hero-meta span,.hero-meta strong { display:block; }
.hero-meta span { color:#858078; font-size:9px; text-transform:uppercase; letter-spacing:.9px; }
.hero-meta strong { margin-top:3px; font-size:13px; }
.hero-focus { align-self:stretch; padding:20px; border:1px solid rgba(255,255,255,.11); border-radius:18px; background:rgba(255,255,255,.055); backdrop-filter:blur(8px); }
.hero-focus>span { color:var(--lime); font-size:9px; font-weight:900; letter-spacing:1px; }
.hero-focus h3 { margin:10px 0 7px; font-size:21px; letter-spacing:-.6px; }
.hero-focus p { color:#aaa59c; }
.hero-focus .button { margin-top:12px; color:var(--ink); background:var(--lime); box-shadow:none; }

.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.metric-card { min-height:124px; padding:18px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:0 4px 20px rgba(40,35,25,.025); }
.metric-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.metric-label { color:var(--muted); font-size:10px; font-weight:850; letter-spacing:.55px; text-transform:uppercase; }
.metric-icon { width:28px; height:28px; border-radius:8px; display:grid; place-items:center; color:var(--red-dark); background:#fce5df; font-size:13px; }
.metric-value { display:block; margin-top:13px; font-size:28px; line-height:1; letter-spacing:-1.4px; }
.metric-note { display:block; margin-top:7px; color:var(--muted); font-size:10px; }
.metric-note strong { color:var(--ink); }
.metric-card.critical { color:#fff; background:var(--red); border-color:var(--red); }
.metric-card.critical .metric-label,.metric-card.critical .metric-note { color:rgba(255,255,255,.76); }
.metric-card.critical .metric-icon { color:#fff; background:rgba(255,255,255,.13); }

.grid-main { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(310px,.55fr); gap:16px; align-items:start; }
.grid-equal { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
.stack { display:grid; gap:16px; }
.panel { border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:0 6px 24px rgba(40,35,25,.035); overflow:hidden; }
.panel-head { min-height:58px; padding:14px 17px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); }
.panel-head h3 { margin:0; font-size:14px; letter-spacing:-.2px; }
.panel-head p { margin:2px 0 0; color:var(--muted); font-size:10px; }
.panel-head-actions { display:flex; align-items:center; gap:7px; }
.panel-body { padding:17px; }
.panel-foot { padding:10px 17px; border-top:1px solid var(--line); background:#faf8f2; }
.text-link { border:0; background:transparent; color:var(--red-dark); font-weight:850; font-size:10px; cursor:pointer; }

.data-table-wrap { width:100%; overflow:auto; }
.data-table { width:100%; border-collapse:collapse; white-space:nowrap; font-size:11px; }
.data-table th { padding:10px 13px; text-align:left; color:var(--muted); background:#faf8f2; border-bottom:1px solid var(--line); font-size:8px; text-transform:uppercase; letter-spacing:.7px; }
.data-table td { padding:11px 13px; border-bottom:1px solid #ebe7dd; vertical-align:middle; }
.data-table tr:last-child td { border-bottom:0; }
.data-table tbody tr:hover { background:#fbfaf6; }
.row-title { font-weight:820; }
.row-sub { display:block; margin-top:2px; color:var(--muted); font-size:9px; }
.row-action { border:0; padding:0; color:inherit; background:transparent; text-align:left; cursor:pointer; }

.chip { display:inline-flex; align-self:flex-start; align-items:center; gap:5px; min-height:22px; padding:3px 7px; border-radius:999px; background:#ece9e1; color:#5f5b54; font-size:8px; font-weight:900; letter-spacing:.25px; text-transform:uppercase; white-space:nowrap; }
.chip::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; opacity:.65; }
.chip.p0,.chip.blocked,.chip.at-risk,.chip.stale { color:#af301f; background:#fde5df; }
.chip.p1,.chip.waiting,.chip.next,.chip.review { color:#8a6213; background:#f7ebcb; }
.chip.in-progress,.chip.scheduled { color:#275da9; background:#e1ebfb; }
.chip.complete,.chip.done,.chip.approved,.chip.healthy,.chip.validated { color:#17674e; background:#dceee7; }
.chip.tbc,.chip.unvalidated,.chip.backlog { color:#655f56; background:#eae7df; }
.chip.p2,.chip.p3 { color:#5e586f; background:#e9e5f2; }
.chip.no-dot::before { display:none; }
.priority-mark { width:25px; height:25px; display:grid; place-items:center; border-radius:8px; color:#fff; background:var(--red); font-size:8px; font-weight:950; }
.priority-mark.p1 { color:#75530e; background:#f3d88d; }
.priority-mark.p2 { color:#4b4362; background:#ddd5f0; }
.priority-mark.p3 { color:#5c5952; background:#dedbd4; }

.progress { height:7px; border-radius:10px; overflow:hidden; background:#ebe7de; }
.progress>span { display:block; height:100%; border-radius:10px; background:var(--green); transition:width .25s ease; }
.progress.warning>span { background:var(--amber); }
.progress.danger>span { background:var(--red); }
.progress.dark>span { background:var(--ink); }
.sales-city-list { display:grid; gap:13px; }
.sales-city { display:grid; grid-template-columns:120px minmax(130px,1fr) 82px 90px; gap:12px; align-items:center; }
.sales-city button { border:0; background:transparent; text-align:left; cursor:pointer; padding:0; }
.sales-city strong,.sales-city small { display:block; }
.sales-city small { color:var(--muted); font-size:9px; }
.sales-city .sales-number { text-align:right; }
.sales-city .sales-number strong { font-size:12px; }

.attention-list,.agenda-list,.activity-list { display:grid; }
.attention-item,.agenda-item,.activity-item { width:100%; padding:12px 0; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:start; border:0; border-bottom:1px solid #e7e3d9; background:transparent; text-align:left; }
button.attention-item,button.agenda-item { cursor:pointer; }
.attention-item:last-child,.agenda-item:last-child,.activity-item:last-child { border-bottom:0; }
.attention-item h4,.agenda-item h4 { margin:0 0 3px; font-size:11px; }
.attention-item p,.agenda-item p,.activity-item p { margin:0; color:var(--muted); font-size:9px; }
.due-block { min-width:42px; text-align:right; color:var(--muted); font-size:9px; }
.due-block strong { display:block; color:var(--ink); font-size:11px; }
.agenda-date { width:43px; min-height:43px; display:grid; place-items:center; align-content:center; border-radius:11px; background:var(--ink); color:#fff; line-height:1; }
.agenda-date strong { font-size:15px; }
.agenda-date span { margin-top:3px; color:var(--lime); font-size:7px; font-weight:900; text-transform:uppercase; }

.readiness-compact { display:grid; grid-template-columns:repeat(8,minmax(86px,1fr)); gap:8px; padding:16px; overflow:auto; }
.readiness-stop { min-width:86px; border:1px solid var(--line); border-radius:13px; padding:11px; cursor:pointer; background:#fff; }
.readiness-stop:hover { border-color:#9f998c; }
.readiness-stop strong,.readiness-stop small { display:block; }
.readiness-stop small { color:var(--muted); font-size:8px; }
.readiness-score { margin:9px 0 7px; font-size:21px; letter-spacing:-1px; }

.toolbar { margin-bottom:14px; padding:10px; display:flex; align-items:center; gap:9px; flex-wrap:wrap; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.toolbar .spacer { flex:1; }
.filter-control { min-height:36px; display:flex; align-items:center; gap:6px; padding:0 9px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--muted); font-size:9px; font-weight:800; text-transform:uppercase; }
.filter-control select,.filter-control input { max-width:155px; border:0; outline:0; background:transparent; color:var(--ink); text-transform:none; font-size:11px; font-weight:700; }

.kanban { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(245px,1fr); gap:12px; overflow-x:auto; padding-bottom:12px; align-items:start; }
.kanban-column { min-width:245px; border:1px solid var(--line); border-radius:16px; background:#ebe7dd; overflow:hidden; }
.kanban-column.drag-over { outline:2px solid var(--red); outline-offset:-2px; }
.kanban-head { padding:12px 13px; display:flex; align-items:center; justify-content:space-between; }
.kanban-head strong { font-size:10px; text-transform:uppercase; letter-spacing:.6px; }
.kanban-head span { min-width:22px; height:22px; padding:0 6px; display:grid; place-items:center; border-radius:12px; color:var(--muted); background:#fff; font-size:9px; }
.kanban-cards { min-height:140px; padding:0 8px 8px; display:grid; gap:8px; align-content:start; }
.task-card { padding:12px; border:1px solid #ded9cd; border-radius:12px; background:var(--surface); box-shadow:0 4px 12px rgba(40,35,25,.035); cursor:pointer; }
.task-card:hover { border-color:#aaa398; transform:translateY(-1px); }
.task-card.dragging { opacity:.45; }
.task-card-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.dept-dot { width:7px; height:7px; border-radius:50%; display:inline-block; }
.task-card h4 { margin:9px 0 11px; font-size:12px; line-height:1.35; }
.task-meta { display:flex; align-items:center; justify-content:space-between; gap:7px; color:var(--muted); font-size:8px; }
.task-meta span { display:flex; align-items:center; gap:4px; }
.task-meta .late { color:var(--red-dark); font-weight:850; }

.calendar-shell { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:16px; }
.calendar-card { border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); overflow:hidden; }
.calendar-toolbar { padding:13px 15px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); }
.calendar-toolbar h3 { margin:0; font-size:16px; text-transform:capitalize; }
.calendar-nav { display:flex; gap:6px; }
.calendar-nav button { width:31px; height:31px; border:1px solid var(--line); border-radius:9px; background:#fff; cursor:pointer; }
.calendar-weekdays,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-weekdays div { padding:8px; text-align:center; color:var(--muted); background:#faf8f3; border-bottom:1px solid var(--line); font-size:8px; font-weight:900; text-transform:uppercase; }
.calendar-day { min-height:116px; padding:7px; border-right:1px solid #e7e3d9; border-bottom:1px solid #e7e3d9; background:#fff; }
.calendar-day:nth-child(7n) { border-right:0; }
.calendar-day.outside { background:#f7f5ef; color:#aaa59c; }
.calendar-day.today { box-shadow:inset 0 0 0 2px var(--red); }
.calendar-day-number { width:24px; height:24px; display:grid; place-items:center; border-radius:8px; font-size:10px; font-weight:850; }
.calendar-day.today .calendar-day-number { color:#fff; background:var(--red); }
.calendar-events { display:grid; gap:3px; margin-top:4px; }
.calendar-event { max-width:100%; padding:4px 5px; border:0; border-left:3px solid var(--blue); border-radius:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; color:#34312d; background:#e9eef8; font-size:7px; font-weight:750; cursor:pointer; }
.calendar-event.show { color:#fff; background:var(--ink); border-left-color:var(--lime); }
.calendar-event.task { background:#f5e8df; border-left-color:var(--red); }
.calendar-event.meeting { background:#e8e2f4; border-left-color:var(--violet); }
.calendar-more { color:var(--muted); font-size:7px; }

.city-rail { display:flex; gap:8px; padding-bottom:10px; margin-bottom:12px; overflow:auto; }
.city-tab { min-width:132px; padding:12px; border:1px solid var(--line); border-radius:13px; background:var(--surface); text-align:left; cursor:pointer; }
.city-tab.active { color:#fff; background:var(--ink); border-color:var(--ink); }
.city-tab strong,.city-tab small { display:block; }
.city-tab small { margin-top:3px; color:var(--muted); font-size:8px; }
.city-tab.active small { color:#918d85; }
.show-hero { margin-bottom:16px; padding:24px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; border:1px solid var(--line); border-radius:22px; background:var(--surface); overflow:hidden; position:relative; }
.show-hero::after { content:attr(data-code); position:absolute; right:20px; bottom:-30px; color:#f1eee6; font-size:120px; font-weight:950; letter-spacing:-10px; z-index:0; }
.show-hero>div { position:relative; z-index:1; }
.show-hero h2 { margin:4px 0 5px; font-size:38px; line-height:1; letter-spacing:-2px; }
.show-hero p { margin:0; color:var(--muted); }
.show-score { min-width:138px; text-align:right; }
.show-score strong { display:block; font-size:42px; line-height:1; letter-spacing:-2px; }
.show-score span { font-size:8px; color:var(--muted); text-transform:uppercase; letter-spacing:.7px; }
.capacity-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.capacity-stat { padding:14px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.capacity-stat span,.capacity-stat strong,.capacity-stat small { display:block; }
.capacity-stat span { color:var(--muted); font-size:8px; font-weight:850; text-transform:uppercase; letter-spacing:.5px; }
.capacity-stat strong { margin-top:7px; font-size:22px; letter-spacing:-.8px; }
.capacity-stat small { color:var(--muted); font-size:8px; }
.capacity-visual { margin-top:13px; }
.capacity-legend { margin-top:6px; display:flex; justify-content:space-between; color:var(--muted); font-size:8px; }
.gate-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.gate-card { padding:12px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.gate-card.critical { border-top:3px solid var(--red); }
.gate-card label { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:8px; font-weight:850; text-transform:uppercase; }
.gate-card select { width:100%; margin-top:9px; padding:8px; border:1px solid var(--line); border-radius:8px; background:#fff; font-size:9px; font-weight:750; }
.gate-card small { display:block; margin-top:7px; color:var(--muted); font-size:7px; }

.campaign-grid,.department-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.campaign-card,.department-card { padding:16px; border:1px solid var(--line); border-radius:15px; background:var(--surface); }
.campaign-card-head,.department-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.campaign-card h4,.department-card h4 { margin:5px 0 2px; font-size:13px; }
.campaign-card p,.department-card p { margin:0; color:var(--muted); font-size:9px; }
.campaign-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin-top:14px; }
.campaign-metrics div { padding:8px; border-radius:9px; background:#f1eee6; }
.campaign-metrics span,.campaign-metrics strong { display:block; }
.campaign-metrics span { color:var(--muted); font-size:7px; text-transform:uppercase; }
.campaign-metrics strong { margin-top:3px; font-size:11px; }
.integration-list { display:grid; gap:8px; }
.integration-card { padding:11px 12px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; border:1px solid var(--line); border-radius:11px; }
.integration-card strong,.integration-card small { display:block; }
.integration-card small { margin-top:2px; color:var(--muted); font-size:8px; }

.department-card { position:relative; overflow:hidden; cursor:pointer; }
.department-card::after { content:""; position:absolute; width:62px; height:62px; border-radius:50%; right:-24px; top:-27px; background:var(--dept-color,#ddd); opacity:.13; }
.department-kpis { display:flex; gap:15px; margin-top:15px; }
.department-kpis span,.department-kpis strong { display:block; }
.department-kpis span { color:var(--muted); font-size:7px; text-transform:uppercase; }
.department-kpis strong { margin-top:2px; font-size:18px; }
.gate-matrix { border-collapse:separate; border-spacing:4px; width:100%; min-width:840px; font-size:9px; }
.gate-matrix th { color:var(--muted); font-size:7px; text-transform:uppercase; }
.gate-matrix th,.gate-matrix td { padding:6px; text-align:center; }
.gate-matrix th:first-child,.gate-matrix td:first-child { text-align:left; font-weight:850; position:sticky; left:0; background:var(--surface); z-index:1; }
.gate-cell { width:62px; border-radius:8px; font-size:7px; font-weight:900; }
.gate-cell.good { color:#17674e; background:#dceee7; }
.gate-cell.warn { color:#8a6213; background:#f7ebcb; }
.gate-cell.bad { color:#af301f; background:#fde5df; }
.gate-cell.neutral { color:#655f56; background:#eae7df; }

.empty-state { min-height:270px; padding:35px; display:grid; place-items:center; text-align:center; }
.empty-state>div { max-width:500px; }
.empty-icon { width:58px; height:58px; margin:0 auto 15px; border-radius:18px; display:grid; place-items:center; color:var(--red); background:#f7e3dd; font-size:25px; }
.empty-state h3 { margin:0 0 7px; font-size:20px; letter-spacing:-.5px; }
.empty-state p { color:var(--muted); }

.risk-card,.decision-card { padding:14px 0; border-bottom:1px solid var(--line); }
.decision-card-button { width:100%; border-left:0; border-right:0; border-top:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.decision-card-button:hover h4 { text-decoration:underline; }
.risk-card:last-child,.decision-card:last-child { border-bottom:0; }
.risk-card-top,.decision-card-top { display:flex; justify-content:space-between; gap:12px; align-items:start; }
.risk-card h4,.decision-card h4 { margin:0 0 5px; font-size:12px; }
.risk-card p,.decision-card p { margin:0; color:var(--muted); font-size:9px; }
.risk-control { margin-top:8px; padding:8px 10px; border-radius:8px; background:#f1eee6; font-size:9px; }
.team-list { display:grid; gap:8px; }
.team-person { padding:10px; display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:center; gap:10px; border:1px solid var(--line); border-radius:11px; }
.team-person strong,.team-person small { display:block; }
.team-person small { color:var(--muted); font-size:8px; }
.team-person-button { width:100%; grid-template-columns:36px minmax(0,1fr) auto auto; color:inherit; background:#fff; text-align:left; cursor:pointer; }
.team-person-button:hover { border-color:#b7b0a3; background:#faf8f3; }
.team-chevron { color:var(--muted); font-size:14px; }

.modal { width:min(720px,calc(100vw - 28px)); max-height:min(880px,calc(100vh - 28px)); padding:0; border:0; border-radius:22px; background:transparent; box-shadow:0 30px 90px rgba(0,0,0,.28); }
.modal::backdrop { background:rgba(18,18,15,.68); backdrop-filter:blur(4px); }
.modal-frame { position:relative; max-height:calc(100vh - 28px); padding:24px; overflow:auto; border-radius:22px; background:var(--surface); }
.modal-close { position:absolute; right:16px; top:14px; z-index:2; width:34px; height:34px; border:1px solid var(--line); border-radius:10px; background:#fff; cursor:pointer; font-size:20px; }
.modal-head { margin:0 42px 20px 0; }
.modal-head h2 { margin:5px 0; font-size:24px; letter-spacing:-.8px; }
.modal-head p { margin:0; color:var(--muted); }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.field { display:grid; gap:6px; }
.field.full { grid-column:1/-1; }
.field>span { color:var(--muted); font-size:8px; font-weight:900; text-transform:uppercase; letter-spacing:.6px; }
.field input,.field select,.field textarea { width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; outline:0; background:#fff; color:var(--ink); }
.field textarea { min-height:92px; resize:vertical; }
.field input:focus,.field select:focus,.field textarea:focus { border-color:#8b857a; box-shadow:0 0 0 3px rgba(53,120,229,.1); }
.field>small { color:var(--muted); font-size:9px; line-height:1.45; }
.checkbox-field { grid-template-columns:auto 1fr; align-content:center; align-items:center; }
.checkbox-field input { width:auto; margin:0; }
.checkbox-field>span { color:var(--ink); font-size:10px; letter-spacing:0; text-transform:none; }
.document-cell { display:flex; align-items:center; gap:10px; min-width:220px; }
.document-cell .row-action { flex:1; min-width:0; }
.access-fieldset { min-width:0; margin:2px 0 0; padding:0; border:0; }
.access-fieldset legend { margin:0 0 7px; color:var(--muted); font-size:8px; font-weight:900; text-transform:uppercase; letter-spacing:.6px; }
.access-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.access-option { min-width:0; padding:10px; display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:9px; border:1px solid var(--line); border-radius:11px; background:#fff; cursor:pointer; }
.access-option:hover { border-color:#aaa397; }
.access-option.selected { border-color:#393832; background:#f1eee6; box-shadow:inset 3px 0 0 var(--red); }
.access-option.disabled { opacity:.48; cursor:not-allowed; box-shadow:none; }
.access-option input { width:16px; height:16px; margin:1px 0 0; accent-color:var(--red); }
.access-option strong,.access-option small { display:block; }
.access-option strong { font-size:10px; }
.access-option small { margin-top:2px; color:var(--muted); font-size:8px; }
.invite-result { display:grid; gap:14px; }
.copy-field { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.copy-field input { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:10px; }
.user-access-actions .spacer { flex:1; }
.document-list { display:grid; gap:8px; }
.document-item { padding:10px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; color:inherit; border:1px solid var(--line); border-radius:11px; text-decoration:none; }
.document-item:hover { border-color:#aaa397; background:#faf8f3; }
.document-item strong,.document-item small { display:block; }
.document-item small { margin-top:2px; color:var(--muted); font-size:8px; }
.document-link { color:inherit; text-decoration:none; }
.sales-city-label strong,.sales-city-label small { display:block; }
.department-card:not([data-action]) { cursor:default; }
.form-actions { margin-top:19px; display:flex; justify-content:flex-end; gap:8px; border-top:1px solid var(--line); padding-top:16px; }
.modal-fieldset { border:0; margin:0; min-width:0; padding:0; }
.modal-fieldset:disabled { opacity:.82; }
.task-discussion { border-top:1px solid var(--line); margin-top:24px; padding-top:24px; }
.section-mini-head,.comment-meta { align-items:center; display:flex; justify-content:space-between; }
.section-mini-head h3 { font-size:19px; margin:4px 0 0; }
.comment-count { align-items:center; background:var(--ink); border-radius:999px; color:#fff; display:inline-flex; font-size:12px; font-weight:800; height:28px; justify-content:center; min-width:28px; padding:0 8px; }
.comment-thread { display:grid; gap:12px; margin-top:16px; }
.comment-item { align-items:flex-start; background:var(--surface-2); border:1px solid var(--line); border-radius:16px; display:grid; gap:11px; grid-template-columns:32px minmax(0,1fr); padding:13px; }
.avatar.small { font-size:10px; height:32px; width:32px; }
.comment-meta { gap:12px; }
.comment-meta time { color:var(--muted); font-size:11px; }
.comment-item p { line-height:1.5; margin:5px 0 0; white-space:pre-wrap; }
.comment-compose { align-items:end; display:grid; gap:10px; grid-template-columns:minmax(0,1fr) auto; margin-top:16px; }
.comment-compose textarea { min-height:76px; }
.quick-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.quick-option { min-height:105px; padding:15px; border:1px solid var(--line); border-radius:14px; background:#fff; text-align:left; cursor:pointer; }
.quick-option:hover { border-color:var(--red); transform:translateY(-1px); }
.quick-option span { display:block; color:var(--red); font-size:20px; }
.quick-option strong { display:block; margin-top:8px; }
.quick-option small { color:var(--muted); }
.search-input { width:100%; padding:14px 15px; border:1px solid var(--line); border-radius:12px; font-size:16px; outline:0; }
.search-results { display:grid; gap:4px; margin-top:12px; }
.search-result { padding:11px; display:grid; grid-template-columns:70px minmax(0,1fr); gap:10px; border:0; border-radius:10px; background:#f4f1e9; text-align:left; cursor:pointer; }
.search-result:hover { background:#ebe6da; }
.search-result span { color:var(--muted); font-size:8px; text-transform:uppercase; font-weight:900; }
.search-result strong { font-size:11px; }
.toast-region { position:fixed; right:20px; bottom:20px; z-index:90; display:grid; gap:8px; pointer-events:none; }
.toast { width:min(360px,calc(100vw - 40px)); padding:12px 14px; display:grid; grid-template-columns:auto 1fr; gap:9px; color:#fff; background:var(--ink); border-radius:12px; box-shadow:0 16px 40px rgba(0,0,0,.22); animation:toast-in .2s ease; }
.toast.error { background:#9d2b1f; }
.toast strong,.toast small { display:block; }
.toast small { color:rgba(255,255,255,.7); }
@keyframes toast-in { from { transform:translateY(10px); opacity:0; } }

.skeleton { position:relative; overflow:hidden; color:transparent !important; background:#e8e4db !important; }
.skeleton::after { content:""; position:absolute; inset:0; transform:translateX(-100%); background:linear-gradient(90deg,transparent,rgba(255,255,255,.6),transparent); animation:shimmer 1.4s infinite; }
@keyframes shimmer { to { transform:translateX(100%); } }
.muted { color:var(--muted); }
.small-text { font-size:9px; }
.danger-text { color:var(--red-dark) !important; }
.success-text { color:var(--green) !important; }
.nowrap { white-space:nowrap; }
.mobile-scrim { display:none; }

@media (max-width:1280px) {
  :root { --sidebar:226px; }
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .campaign-grid,.department-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .search-trigger { width:43px; justify-content:center; }
  .search-trigger span:nth-child(2),.search-trigger kbd { display:none; }
}

@media (max-width:1020px) {
  .app-shell { display:block; }
  .workspace-shell { width:100%; }
  .sidebar { transform:translateX(-105%); transition:transform .22s ease; box-shadow:20px 0 60px rgba(0,0,0,.22); }
  .sidebar.open { transform:translateX(0); }
  .sidebar-close,.mobile-menu { display:grid !important; }
  .sidebar-close { color:#fff; border-color:#3c3a35; background:#22221e; }
  .mobile-scrim { position:fixed; inset:0; z-index:25; background:rgba(0,0,0,.42); }
  .mobile-scrim.show { display:block; }
  .grid-main,.calendar-shell { grid-template-columns:1fr; }
  .hero-command { grid-template-columns:1fr; }
  .hero-focus { min-height:0; }
  .readiness-compact { grid-template-columns:repeat(8,105px); }
}

@media (max-width:720px) {
  :root { --topbar:72px; }
  .topbar { padding:10px 14px; }
  .topbar-title h1 { font-size:18px; }
  .topbar-actions .city-filter,.notification-button { display:none; }
  .topbar-actions .button.primary { width:42px; padding:0; font-size:0; }
  .topbar-actions .button.primary span { font-size:17px; }
  .baseline-strip { padding:7px 14px; }
  .baseline-strip #baselineMessage { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .baseline-actions { gap:7px; }
  .baseline-actions>button:last-child { display:none; }
  .view { padding:18px 14px 45px; }
  .page-head { align-items:start; flex-direction:column; }
  .page-head h2 { font-size:24px; }
  .hero-command { min-height:0; padding:21px; }
  .hero-command h2 { font-size:36px; }
  .hero-meta { flex-wrap:wrap; }
  .metric-grid,.grid-equal,.campaign-grid,.department-grid,.capacity-grid,.gate-grid { grid-template-columns:1fr; }
  .sales-city { grid-template-columns:90px minmax(100px,1fr) 72px; }
  .sales-city .sales-number:last-child { display:none; }
  .calendar-day { min-height:76px; padding:4px; }
  .calendar-event { font-size:0; width:7px; height:7px; border:0; border-radius:50%; padding:0; display:inline-block; margin-right:2px; background:var(--blue); }
  .calendar-event.show { background:var(--ink); }
  .calendar-event.task { background:var(--red); }
  .calendar-events { display:block; }
  .calendar-weekdays div { font-size:7px; }
  .show-hero { grid-template-columns:1fr; }
  .show-score { text-align:left; }
  .form-grid,.quick-grid { grid-template-columns:1fr; }
  .access-grid { grid-template-columns:1fr; }
  .copy-field { grid-template-columns:1fr; }
  .comment-compose { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .modal-frame { padding:20px 15px; }
  .toolbar { align-items:stretch; }
  .filter-control { flex:1; }
  .login-screen { grid-template-columns:1fr; }
  .login-visual { display:none; }
  .login-card { width:min(420px,calc(100% - 32px)); }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; transition-duration:.01ms !important; }
}
