/* Shared design for Command Center pages (dashboard, executive). */
.cc { --cc-navy:#0A2A6E; --cc-navy-ink:#061F5E; --cc-orange:#D95E00; --cc-orange-ink:#A84700;
      --cc-card:var(--bg-card,#fff); --cc-ink:var(--text-primary,#1e293b); --cc-muted:var(--text-secondary,#475569);
      --cc-line:var(--border-color,#e2e8f0); --cc-soft:#F3F5F9;
      --cc-good:#067647; --cc-good-bg:#E3F5EA; --cc-warn:#9A4A06; --cc-warn-bg:#FEF0DC; --cc-bad:#B42318; --cc-bad-bg:#FDECEA;
      --cc-info:#0B4FA3; --cc-info-bg:#E8F1FD; --cc-purple:#5B36B0; --cc-purple-bg:#F1ECFC; --cc-sel:#EEF3FF; --cc-sel-line:#93AEE6;
      display:flex; flex-direction:column; gap:18px; color:var(--cc-ink); padding-bottom:32px; }
[data-theme="dark"] .cc { --cc-soft:#1e293b; --cc-good:#4ADE80; --cc-good-bg:rgba(34,197,94,.14); --cc-warn:#FBBF24; --cc-warn-bg:rgba(245,158,11,.14);
      --cc-bad:#F87171; --cc-bad-bg:rgba(239,68,68,.14); --cc-info:#93C5FD; --cc-info-bg:rgba(59,130,246,.16); --cc-purple:#C4B5FD; --cc-purple-bg:rgba(139,92,246,.16);
      --cc-sel:rgba(59,130,246,.14); --cc-sel-line:#3B82F6; --cc-navy:#3B5BBF; --cc-orange-ink:#FB923C; }
.cc a { text-decoration:none; color:inherit; }
.cc-card { background:var(--cc-card); border:1px solid var(--cc-line); border-radius:12px; padding:18px; }
.cc-h2 { margin:0; font-size:16px; font-weight:700; color:var(--cc-ink); }
.cc-muted { color:var(--cc-muted); }
.cc-mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }

/* header */
.cc-head { display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.cc-brand { display:flex; align-items:center; gap:14px; margin-right:auto; }
.cc-brand img { width:56px; height:56px; border-radius:10px; object-fit:cover; }
.cc-brand h1 { margin:0; font-size:22px; font-weight:700; }
.cc-brand .bar { display:block; width:42px; height:3px; background:var(--cc-orange); border-radius:2px; margin:4px 0; }
.cc-search { flex:1 1 320px; max-width:460px; display:flex; align-items:center; gap:8px; height:44px; padding:0 12px; background:var(--cc-card); border:1px solid var(--cc-line); border-radius:10px; }
.cc-search input { flex:1; min-width:0; border:0; outline:none; background:transparent; color:var(--cc-ink); font-size:14px; }
.cc-btn { height:44px; padding:0 16px; border-radius:10px; border:1px solid var(--cc-line); background:var(--cc-card); color:var(--cc-ink) !important; font-weight:600; font-size:14px; display:inline-flex; align-items:center; gap:8px; }
.cc-btn:hover { border-color:var(--cc-navy); }
.cc-btn.primary { background:var(--cc-navy); border-color:var(--cc-navy); color:#fff !important; }
.cc-btn.primary:hover { background:var(--cc-navy-ink); }
.cc-actions { display:flex; flex-wrap:wrap; gap:10px; }

/* kpis */
.cc-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; }
.cc-kpi { display:flex; flex-direction:column; gap:6px; padding:16px; background:var(--cc-card); border:1px solid var(--cc-line); border-radius:12px; transition:border-color .15s; }
.cc-kpi:hover { border-color:var(--cc-navy); }
.cc-kpi .l { font-size:12px; font-weight:600; color:var(--cc-muted); }
.cc-kpi .v { font-size:26px; font-weight:700; letter-spacing:-.01em; }
.cc-kpi .s { font-size:12px; color:var(--cc-muted); }
.cc-kpi .s.good { color:var(--cc-good); } .cc-kpi .s.bad { color:var(--cc-bad); }

/* pipeline */
.cc-pipe { display:flex; flex-wrap:wrap; gap:8px; }
.cc-stage { flex:1 1 118px; display:flex; flex-direction:column; gap:3px; padding:12px 14px; border-radius:10px; background:var(--cc-soft); border:1px solid transparent; transition:border-color .15s; }
.cc-stage:hover { border-color:var(--cc-navy); }
.cc-stage .l { font-size:12px; font-weight:600; color:var(--cc-muted); }
.cc-stage .c { font-size:22px; font-weight:700; }
.cc-stage .s { font-size:12px; color:var(--cc-muted); }
.cc-stage.warn { background:var(--cc-warn-bg); } .cc-stage.warn .l { color:var(--cc-warn); }
.cc-stage.bad { background:var(--cc-bad-bg); } .cc-stage.bad .l { color:var(--cc-bad); }
.cc-stage.good { background:var(--cc-good-bg); } .cc-stage.good .l { color:var(--cc-good); }

/* queue + 360 */
.cc-split { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start; }
.cc-queue { flex:999 1 520px; min-width:0; display:flex; flex-direction:column; gap:12px; }
.cc-tabs { display:flex; flex-wrap:wrap; gap:6px; }
.cc-tab { height:36px; padding:0 12px; border-radius:18px; border:1px solid var(--cc-line); background:var(--cc-card); color:var(--cc-ink); font-size:13px; font-weight:600; }
.cc-tab[aria-selected="true"] { background:var(--cc-navy); border-color:var(--cc-navy); color:#fff; }
.cc-list { display:flex; flex-direction:column; gap:6px; max-height:620px; overflow:auto; padding-right:2px; }
.cc-row { display:grid; grid-template-columns:minmax(150px,170px) minmax(0,1fr) minmax(90px,120px) auto; gap:12px; align-items:center; width:100%; text-align:left;
          min-height:56px; padding:10px 12px; border-radius:10px; border:1px solid var(--cc-line); background:var(--cc-card); color:var(--cc-ink); }
.cc-row:hover { border-color:var(--cc-sel-line); }
.cc-row[aria-pressed="true"] { background:var(--cc-sel); border-color:var(--cc-sel-line); }
.cc-row .t { font-weight:600; font-size:14px; }
.cc-row .m { font-size:12px; color:var(--cc-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cc-row .go { justify-self:end; font-size:13px; font-weight:600; color:var(--cc-navy); white-space:nowrap; }
[data-theme="dark"] .cc-row .go { color:#93C5FD; }
.cc-chip { display:inline-block; align-self:flex-start; font-size:11px; font-weight:700; padding:2px 8px; border-radius:10px; }
.cc-chip.customs { background:var(--cc-info-bg); color:var(--cc-info); }
.cc-chip.damage { background:var(--cc-warn-bg); color:var(--cc-warn); }
.cc-chip.billing { background:var(--cc-purple-bg); color:var(--cc-purple); }
.cc-chip.gate { background:var(--cc-good-bg); color:var(--cc-good); }
.cc-chip.ops { background:var(--cc-bad-bg); color:var(--cc-bad); }
.cc-empty { padding:28px; text-align:center; color:var(--cc-muted); border:1px dashed var(--cc-line); border-radius:10px; }
@media (max-width:720px){ .cc-row { grid-template-columns:1fr; } .cc-row .go { justify-self:start; } }

.cc-360 { flex:1 1 340px; min-width:0; display:flex; flex-direction:column; gap:14px; position:sticky; top:12px; }
.cc-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.cc-fact { padding:10px 12px; border-radius:10px; background:var(--cc-soft); display:flex; flex-direction:column; gap:2px; }
.cc-fact .k { font-size:12px; color:var(--cc-muted); } .cc-fact .v { font-weight:600; }
.cc-fact .v.warn { color:var(--cc-warn); } .cc-fact .v.bad { color:var(--cc-bad); }
.cc-step { display:flex; gap:12px; }
.cc-step .rail { display:flex; flex-direction:column; align-items:center; width:16px; }
.cc-step .dot { width:14px; height:14px; border-radius:7px; border:3px solid #B7C0CC; background:var(--cc-card); margin-top:3px; box-sizing:border-box; }
.cc-step .ln { flex:1; width:2px; min-height:14px; background:var(--cc-line); }
.cc-step:last-child .ln { background:transparent; }
.cc-step .body { display:flex; flex-direction:column; padding-bottom:10px; }
.cc-step .body b { font-weight:600; } .cc-step .body span { font-size:12px; color:var(--cc-muted); }
.cc-step.done .dot { border-color:#067647; background:#067647; } .cc-step.done .ln { background:#9AD3B4; }
.cc-step.current .dot { border-color:#2563EB; }
.cc-step.blocked .dot { border-color:#B42318; } .cc-step.blocked b { color:var(--cc-bad); }
.cc-step.todo b { color:var(--cc-muted); }
.cc-next { padding:12px; border-radius:10px; background:var(--cc-warn-bg); border:1px solid rgba(217,94,0,.35); display:flex; flex-direction:column; gap:4px; }
.cc-next b { font-size:12px; color:var(--cc-orange-ink); } .cc-next span { font-size:13px; }

/* bottom */
.cc-bottom { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:16px; }
.cc-blocks { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.cc-block { height:62px; border-radius:8px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:2px; }
.cc-block .n { font-size:12px; font-weight:600; } .cc-block .p { font-size:15px; font-weight:700; }
.cc-block.l1 { background:#E4EBF7; color:#061F5E; } .cc-block.l2 { background:#BFCDEA; color:#061F5E; }
.cc-block.l3 { background:#7F97CF; color:#061F5E; } .cc-block.l4 { background:#2E4C9A; color:#fff; } .cc-block.l5 { background:#061F5E; color:#fff; }
.cc-berth { display:flex; flex-direction:column; gap:6px; padding:12px; border-radius:10px; background:var(--cc-soft); }
.cc-berth .tag { font-size:12px; font-weight:600; padding:2px 8px; border-radius:6px; background:var(--cc-navy); color:#fff; }
.cc-berth .tag.free { background:transparent; color:var(--cc-muted); border:1px solid var(--cc-line); }
.cc-prog { height:6px; border-radius:3px; background:var(--cc-line); overflow:hidden; } .cc-prog div { height:6px; background:var(--cc-orange); }
.cc-feed { display:flex; gap:10px; align-items:flex-start; padding:7px 0; border-bottom:1px solid var(--cc-line); }
.cc-feed:last-child { border-bottom:0; }
.cc-feed .tm { font-size:12px; color:var(--cc-muted); width:46px; flex:none; padding-top:1px; }
.cc-feed .tx { font-size:13px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.cc-live { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--cc-good); }
.cc-live i { width:8px; height:8px; border-radius:4px; background:#12B76A; display:inline-block; }
.cc-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* ---- additions for the Executive Command Center ---- */
.cc-chips { display:flex; flex-wrap:wrap; gap:8px; }
.cc-chipbox { display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 12px; border-radius:17px; background:var(--cc-card); border:1px solid var(--cc-line); font-size:13px; }
.cc-chipbox .k { color:var(--cc-muted); } .cc-chipbox .v { font-weight:700; }
.cc-chipbox.bad .v { color:var(--cc-bad); } .cc-chipbox.warn .v { color:var(--cc-warn); } .cc-chipbox.good .v { color:var(--cc-good); }
.cc-risk { flex-direction:row !important; align-items:center; gap:14px !important; }
.cc-risk .ic { width:44px; height:44px; flex:none; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; background:var(--cc-soft); color:var(--cc-muted); }
.cc-risk.good .ic { background:var(--cc-good-bg); color:var(--cc-good); }
.cc-risk.warn .ic { background:var(--cc-warn-bg); color:var(--cc-warn); }
.cc-risk.bad .ic { background:var(--cc-bad-bg); color:var(--cc-bad); }
.cc-risk .txt { display:flex; flex-direction:column; gap:2px; min-width:0; }
.cc-wide { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:16px; }
@media (min-width:1100px){ .cc-wide.r21 { grid-template-columns:2fr 1fr; } }
.cc-cardhead { display:flex; align-items:baseline; gap:8px; }
.cc-cardhead .cc-h2 { margin-right:auto; }
.cc-cardhead a { font-size:13px; font-weight:600; color:var(--cc-navy); }
[data-theme="dark"] .cc-cardhead a { color:#93C5FD; }
.cc-barrow { display:grid; grid-template-columns:minmax(90px,140px) minmax(0,1fr) auto; gap:10px; align-items:center; font-size:13px; padding:5px 0; }
.cc-barrow .track { height:8px; border-radius:4px; background:var(--cc-soft); overflow:hidden; }
.cc-barrow .track div { height:8px; border-radius:4px; background:var(--cc-navy); }
.cc-barrow .track div.good { background:#12B76A; } .cc-barrow .track div.warn { background:#F79009; } .cc-barrow .track div.bad { background:#D92D20; }
.cc-barrow .val { font-weight:600; white-space:nowrap; }
.cc-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.cc-stat { padding:12px; border-radius:10px; background:var(--cc-soft); display:flex; flex-direction:column; gap:2px; }
.cc-stat .k { font-size:12px; color:var(--cc-muted); } .cc-stat .v { font-size:22px; font-weight:700; }
.cc-stat.good .v { color:var(--cc-good); } .cc-stat.warn .v { color:var(--cc-warn); } .cc-stat.bad .v { color:var(--cc-bad); }
.cc-alert { display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border-radius:10px; background:var(--cc-warn-bg); }
.cc-alert.bad { background:var(--cc-bad-bg); }
.cc-alert i { font-size:16px; color:var(--cc-warn); margin-top:1px; } .cc-alert.bad i { color:var(--cc-bad); }
.cc-alert .b { display:flex; flex-direction:column; gap:2px; min-width:0; }
.cc-alert .b b { font-size:13px; } .cc-alert .b span { font-size:12px; color:var(--cc-muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.cc-note { padding:12px; border-radius:10px; background:var(--cc-soft); display:flex; flex-direction:column; gap:2px; }
