/* CMO theme — dark sidebar, orange accent, soft cards (loaded after app.css + mobile.css) */
:root{--brand:#f97316;--brand2:#fb923c;--bg:#f6f6f9;--line:#ececf2;--side:#141418;--side2:#22222a;--radius:16px}
body{background:var(--bg)}
.btn-primary{background:linear-gradient(90deg,#f97316,#fb923c);box-shadow:0 6px 18px rgba(249,115,22,.28)}
.link{color:#ea580c}

/* Sidebar */
.side{background:radial-gradient(120% 40% at 0% 100%,rgba(249,115,22,.38),transparent 60%),linear-gradient(180deg,#18181d 0%,#141418 100%);color:#c9c9d3;border-right:1px solid #22222a}
.side .brand{padding:20px 18px 18px;font-size:17px;line-height:1.2;gap:12px}
.side .brand .logo-img{width:46px;height:46px;border-radius:12px;box-shadow:0 6px 18px rgba(249,115,22,.35)}
.side nav{padding:4px 12px 40px}
.side .sec{color:#7d7d8c;font-size:10.5px;padding:18px 12px 6px}
.side a{padding:10px 12px;border-radius:11px;font-weight:600;font-size:14px;color:#d4d4dc;gap:12px}
.side a:hover{background:rgba(255,255,255,.06);color:#fff}
.side a.on{background:linear-gradient(90deg,#f97316,#fb923c);color:#fff;box-shadow:0 8px 20px rgba(249,115,22,.35)}
.side a .i{width:20px;height:20px;display:inline-grid;place-items:center;flex-shrink:0}
.side a .i .ico{width:19px;height:19px}

/* Top bar */
.top{background:rgba(255,255,255,.92);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);height:64px}
.avatar{background:linear-gradient(135deg,#f97316,#fb923c)}
.top .badge{background:#fff3e8;color:#c2410c}

/* Cards */
.card,.stat,.tbl-wrap,.int,.pcard{border:1px solid #eeeef3;box-shadow:0 1px 2px rgba(16,16,24,.03),0 8px 24px rgba(16,16,24,.04)}
.card,.stat{border-radius:16px}
.pill-tabs a.on{background:#f97316;border-color:#f97316}
.bar span,.chart .c span{background:linear-gradient(180deg,#fb923c,#f97316)}
input:focus,select:focus,textarea:focus{border-color:#f97316;box-shadow:0 0 0 3px rgba(249,115,22,.12)}

/* Dashboard header block */
.cmo{margin-bottom:18px}
.cmo-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.cmo-head h1{font-size:28px;font-weight:800;letter-spacing:-.01em}
.cmo-head p{color:#4b5068;margin-top:4px}
.cmo-date{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:9px 14px;font-weight:700;font-size:13.5px;box-shadow:0 4px 14px rgba(16,16,24,.04)}
.cmo-date .ico{width:17px;height:17px}
.cmo-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:16px}
.cmo-kpi{position:relative;display:flex;gap:12px;align-items:flex-start;background:#fff;border:1px solid #eeeef3;border-radius:18px;padding:16px 14px 14px;box-shadow:0 1px 2px rgba(16,16,24,.03),0 8px 24px rgba(16,16,24,.05);overflow:hidden;min-height:118px;transition:transform .15s,box-shadow .15s}
.cmo-kpi:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(16,16,24,.08)}
.cmo-ic{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;flex-shrink:0}
.cmo-ic .ico{width:22px;height:22px}
.cmo-kb{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}
.cmo-kb .l{font-size:13px;font-weight:600;color:#3f4458;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmo-kb .v{font-size:26px;font-weight:800;line-height:1.15;margin-top:2px;letter-spacing:-.01em}
.cmo-kb .d{font-size:12.5px;font-weight:700;margin-top:4px}
.cmo-kb .d.up{color:#16a34a}.cmo-kb .d.down{color:#dc2626}.cmo-kb .d.flat{color:#6b7390}
.cmo-spark{position:absolute;right:10px;bottom:12px;width:44%;height:42px;opacity:.95}
.cmo-row{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr) minmax(0,.95fr);gap:16px;align-items:stretch}
.cmo-card{background:#fff;border:1px solid #eeeef3;border-radius:18px;padding:18px;box-shadow:0 1px 2px rgba(16,16,24,.03),0 8px 24px rgba(16,16,24,.04)}
.cmo-ch{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px;flex-wrap:wrap}
.cmo-card h3{display:flex;align-items:center;gap:9px;font-size:16.5px;font-weight:800;margin:0}
.cmo-tic{color:#f97316;display:inline-grid}
.cmo-tic .ico{width:21px;height:21px}
.cmo-seg{font-size:12.5px;font-weight:700;background:#fff3e8;color:#c2410c;padding:6px 12px;border-radius:10px}
.cmo-chart{width:100%;height:auto;display:block}
.cmo-chart .ax{font-size:12px;fill:#6b7090;font-family:inherit}
.cmo-leg{display:flex;justify-content:center;gap:22px;font-size:13px;font-weight:600;margin-top:4px}
.cmo-leg span{display:inline-flex;align-items:center;gap:7px}
.cmo-leg .sq{width:12px;height:12px;border-radius:3px;background:#f97316}
.cmo-leg .ln{width:18px;height:3px;border-radius:3px;background:#f97316;position:relative}
.cmo-leg .ln::after{content:"";position:absolute;left:5px;top:-3.5px;width:8px;height:8px;border-radius:50%;background:#fff;border:2px solid #f97316;box-sizing:border-box}
.cmo-dwrap{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:center;margin-top:6px}
.cmo-donut{width:176px;height:176px;flex-shrink:0}
.cmo-donut .dn-v{font-size:26px;font-weight:800;fill:#141a2e;font-family:inherit}
.cmo-donut .dn-s{font-size:13px;fill:#4b5068;font-family:inherit}
.cmo-dl{list-style:none;flex:1;min-width:150px;margin:0;padding:0}
.cmo-dl li{display:flex;align-items:center;gap:10px;padding:6px 0;font-size:13.5px;font-weight:600}
.cmo-dl li i{width:11px;height:11px;border-radius:50%;flex-shrink:0}
.cmo-dl li span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmo-side{display:flex;flex-direction:column;gap:16px}
.cmo-ai{display:block;position:relative;overflow:hidden;border-radius:18px;padding:20px;color:#fff;background:radial-gradient(120% 120% at 100% 0%,#f97316 0%,#c2410c 38%,#3b1a0c 75%,#1c1410 100%);box-shadow:0 14px 34px rgba(194,65,12,.3)}
.cmo-ai::after{content:"";position:absolute;right:-30px;bottom:-30px;width:120px;height:120px;border-radius:50%;background:rgba(255,255,255,.08)}
.cmo-ai-ic{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;background:rgba(255,255,255,.15);color:#fed7aa;margin-bottom:10px}
.cmo-ai b{display:block;font-size:18px;font-weight:800}
.cmo-ai p{font-size:13.5px;opacity:.9;margin:6px 0 14px;line-height:1.5}
.cmo-ai-btn{display:inline-flex;align-items:center;gap:6px;background:#fff;color:#c2410c;font-weight:800;font-size:13.5px;padding:9px 16px;border-radius:11px}
.cmo-quick h3{margin-bottom:12px}
.cmo-qa{display:flex;flex-wrap:wrap;gap:8px}
.cmo-qa a{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border:1.5px solid #fed7aa;border-radius:11px;font-weight:700;font-size:13px;color:#9a3412;background:#fff}
.cmo-qa a .ico{width:16px;height:16px}
.cmo-qa a:hover{background:#fff7ed}
.cmo-qa a.pri{background:linear-gradient(90deg,#f97316,#fb923c);border-color:transparent;color:#fff}
/* old dashboard greeting replaced by .cmo */
.cmo + .head{display:none}

@media (max-width:1280px){
  .cmo-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .cmo-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .cmo-perf{grid-column:1/-1}
}
@media (max-width:800px){
  .cmo-head h1{font-size:22px}
  .cmo-date{display:none}
  .cmo-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .cmo-kpi{flex-direction:column;gap:8px;padding:12px;min-height:0}
  .cmo-ic{width:38px;height:38px}
  .cmo-ic .ico{width:19px;height:19px}
  .cmo-kb .v{font-size:21px}
  .cmo-kb .l{font-size:12px}
  .cmo-spark{width:46%;height:30px;top:14px;bottom:auto;right:10px}
  .cmo-row{grid-template-columns:1fr;gap:12px}
  .cmo-card{padding:14px}
  .cmo-donut{width:150px;height:150px}
}

/* Auth pages */
.auth-body{background:radial-gradient(70% 60% at 0% 100%,rgba(249,115,22,.35),transparent 60%),radial-gradient(50% 50% at 100% 0%,rgba(249,115,22,.18),transparent 60%),#101014}
.auth-card{border-radius:22px}
.auth-card .logo-img{width:42px;height:42px;border-radius:12px}
.auth-panel{display:inline-flex;align-items:center;gap:6px;background:#fff3e8;color:#c2410c;font-weight:800;font-size:12px;padding:5px 11px;border-radius:999px;margin-bottom:8px;text-transform:uppercase;letter-spacing:.04em}
.role-tabs a.on{color:#ea580c}

/* v2: KPI cards — icon + mini chart on top, text below (no overlap); Khushi lifted off the bottom edge */
.cmo-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.cmo-kpi{flex-direction:column;gap:10px;min-height:0;padding:14px}
.cmo-kb{width:100%}
.cmo-spark{top:16px;right:12px;bottom:auto;width:52%;height:38px}
@media (max-width:1100px){.cmo-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:800px){.cmo-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.cmo-spark{width:48%;height:30px;top:14px}}
@media (min-width:801px){html body #khushi{bottom:14px}}

/* v3: collapsible menu groups — click "Sales" to show its options */
.side .nsec{margin-top:2px}
.side .sec-t{display:flex;width:100%;justify-content:space-between;align-items:center;background:none;border:0;cursor:pointer;font-family:inherit;text-align:left;border-radius:10px;text-transform:none;letter-spacing:0;font-size:14px;font-weight:700;color:#e8e8ef;padding:11px 12px}
.side .sec-t:hover{background:rgba(255,255,255,.06);color:#fff}
.side .sec-t .chev{flex-shrink:0;opacity:.7;transition:transform .2s}
.side .nsec.open>.sec-t .chev{transform:rotate(180deg)}
.side .nsec.open>.sec-t{color:#fdba74}
.side .nsec-b{display:none;padding:2px 0 6px 10px;margin-left:12px;border-left:1px solid rgba(255,255,255,.08)}
.side .nsec.open>.nsec-b{display:block}
.side .nsec-b a{font-size:13.5px;padding:8px 10px}
