/* Application shell and dashboard look (navy sidebar, white top bar, tinted KPI cards). Loaded after app.css. */
:root {
  --navy: #0d2240; --navy-2: #13305a; --navy-ink: #c9d5e8; --navy-faint: #7f93b3; --blue: #1f6fe0; --blue-soft: #e8f0fd;
  --bg: #f3f6fb; --line: #e3e8ef; --radius: 12px;
  --t-green: #e9f7ef; --t-red: #fdeeee; --t-orange: #fff4e5; --t-blue: #eaf2fe; --t-purple: #f2eefe; --t-teal: #e6f6f5;
  --c-green: #1f9d55; --c-red: #d64545; --c-orange: #e8870e; --c-blue: #1f6fe0; --c-purple: #7a5af0; --c-teal: #12968a;
}
body { background: var(--bg); }
.ico { width: 18px; height: 18px; flex: none; vertical-align: middle; }

/* layout */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.shell.collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.shell.collapsed .sb-brand .sub, .shell.collapsed .sb-nav span, .shell.collapsed .sb-kids, .shell.collapsed .sb-status,
.shell.collapsed .sb-sec, .shell.collapsed .car { display: none; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.main { padding: 22px 26px 40px; max-width: none; width: 100%; }

/* sidebar */
.sb { background: linear-gradient(180deg, var(--navy) 0%, #0a1b33 100%); color: var(--navy-ink); position: sticky; top: 0; height: 100vh;
      overflow-y: auto; display: flex; flex-direction: column; padding: 18px 12px 12px; scrollbar-width: thin; scrollbar-color: #24406b transparent; }
.sb-brand { display: block; padding: 2px 10px 18px; color: #fff; }
.sb-brand:hover { text-decoration: none; }
.sb-brand .logo { display: block; font-size: 38px; font-weight: 700; letter-spacing: 1px; line-height: 1; }
.sb-brand .logo span { color: #3b8cff; }
.sb-brand .sub { display: block; margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--navy-ink); }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-sec { margin: 16px 10px 6px; font-size: 12px; color: var(--navy-faint); letter-spacing: .3px; }
.sb-link, .sb-grp > summary { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #e6edf8;
  cursor: pointer; list-style: none; font-size: 14px; }
.sb-grp > summary::-webkit-details-marker { display: none; }
.sb-link:hover, .sb-grp > summary:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sb-link.on, .sb-grp.on > summary { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(31,111,224,.35); }
.sb-link .ico, .sb-grp .ico { width: 19px; height: 19px; opacity: .95; }
.sb-grp .car { margin-left: auto; width: 15px; height: 15px; transition: transform .15s; opacity: .7; }
.sb-grp[open] .car { transform: rotate(180deg); }
.sb-kids { display: flex; flex-direction: column; padding: 4px 0 6px 43px; }
.sb-kids a { color: var(--navy-ink); padding: 6px 10px; border-radius: 6px; font-size: 13px; display: flex; justify-content: space-between; }
.sb-kids a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.sb-kids a.on { color: #fff; background: rgba(59,140,255,.18); }
.sb-kids .cnt { background: var(--c-orange); color: #fff; border-radius: 9px; font-size: 11px; padding: 0 6px; line-height: 17px; font-weight: 500; }
.sb-status { margin: 18px 4px 6px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; }
.sb-status .t { color: #fff; font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.sb-status .state { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 500; }
.sb-status .state i { width: 10px; height: 10px; border-radius: 50%; background: #2ecc71; }
.sb-status .state.ok { color: #4ade80; } .sb-status .state.bad { color: #ff8a8a; } .sb-status .state.bad i { background: #ff5c5c; }
.sb-status .srow { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; color: #fff; }
.sb-status .srow span { display: block; color: var(--navy-faint); font-size: 11.5px; }
.sb-status .srow .ico { width: 16px; height: 16px; margin-top: 2px; color: var(--navy-ink); }
.sb-ver { margin-top: auto; padding: 10px 10px 0; color: var(--navy-faint); font-size: 11.5px; }

/* top bar */
.tb { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 22px;
      background: #fff; border-bottom: 1px solid var(--line); }
.tb-burger { background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.tb-burger:hover { background: var(--bg); }
.tb-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: #f2f4f8; border: 1px solid #e6eaf0;
             border-radius: 10px; padding: 0 12px; height: 40px; color: var(--muted); }
.tb-search input { border: 0; background: transparent; outline: none; width: 100%; font: inherit; color: var(--ink); padding: 0; }
.tb-period, .tb-bell, .tb-user { position: relative; }
.tb-period { margin-left: auto; }
.tb-period > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.tb-period > summary::-webkit-details-marker { display: none; }
.tb-period > summary:hover, .tb-period[open] > summary { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.tb-period .txt { display: flex; flex-direction: column; line-height: 1.25; }
.tb-period .txt strong { font-weight: 500; font-size: 13.5px; } .tb-period .txt span { font-size: 12px; color: var(--muted); }
.tb-period .car { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.tb-period[open] .car { transform: rotate(180deg); }
.pp { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 640px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(15,23,42,.16); padding: 14px 16px 12px; }
.pp-g { margin-bottom: 12px; }
.pp-h { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.pp-bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pp-bar button { background: #fff; border: 0; border-right: 1px solid var(--line); padding: 8px 10px; text-align: left; cursor: pointer;
  font: inherit; display: flex; flex-direction: column; gap: 1px; transition: background .12s; }
.pp-bar button:last-child { border-right: 0; }
.pp-bar button span { font-size: 13px; font-weight: 500; color: var(--ink); }
.pp-bar button small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-bar button:hover { background: var(--blue-soft); }
.pp-bar button.on { background: var(--blue); } .pp-bar button.on span, .pp-bar button.on small { color: #fff; }
.pp-custom { border-top: 1px solid var(--line); padding-top: 10px; }
.pp-row { display: flex; gap: 10px; align-items: flex-end; }
.pp-row label { margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pp-row input { padding: 6px 8px; font-size: 13px; }
.pp-custom.on .pp-row input { border-color: var(--blue); background: var(--blue-soft); }
.pp-foot { margin-top: 10px; font-size: 11.5px; color: var(--faint); }
@media (max-width: 760px) { .pp { width: calc(100vw - 24px); right: -60px; } .pp-bar { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tb-bell > summary, .tb-user > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.tb-bell > summary::-webkit-details-marker, .tb-user > summary::-webkit-details-marker { display: none; }
.tb-bell > summary { padding: 8px; border-radius: 10px; position: relative; }
.tb-bell > summary:hover { background: var(--bg); }
.tb-bell .ico { width: 22px; height: 22px; }
.tb-bell b { position: absolute; top: 1px; right: 0; background: #e53935; color: #fff; font-size: 11px; border-radius: 10px; min-width: 18px;
             text-align: center; padding: 0 5px; line-height: 18px; border: 2px solid #fff; }
.tb-user .av { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 500; }
.tb-user .nm { display: flex; flex-direction: column; line-height: 1.25; }
.tb-user .nm strong { font-weight: 500; font-size: 13.5px; } .tb-user .nm span { font-size: 12px; color: var(--muted); }
.tb .menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px;
            box-shadow: 0 12px 32px rgba(15,23,42,.14); min-width: 300px; padding: 6px; z-index: 30; }
.tb .menu .mh { font-size: 12px; color: var(--muted); padding: 8px 10px 4px; }
.tb .menu .al { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; color: var(--ink); font-size: 13px;
                background: none; border: 0; width: 100%; text-align: left; cursor: pointer; font-family: inherit; }
.tb .menu .al:hover { background: var(--bg); text-decoration: none; }
.tb .menu .al i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--info); }
.tb .menu .al.warn i { background: var(--c-orange); } .tb .menu .al.bad i { background: var(--c-red); }
.tb .menu .al.none { color: var(--muted); cursor: default; }

@media (max-width: 1000px) { .tb-user .nm, .tb-period .txt span { display: none; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; } .sb { position: fixed; z-index: 40; width: 236px; transform: translateX(-100%); transition: transform .2s; }
  .shell.collapsed .sb { transform: none; } .shell.collapsed { grid-template-columns: 1fr; }
  .shell.collapsed .sb-brand .sub, .shell.collapsed .sb-nav span, .shell.collapsed .sb-kids, .shell.collapsed .sb-status, .shell.collapsed .sb-sec { display: revert; }
  .tb { padding: 0 12px; gap: 8px; } .tb-period { display: none; } .main { padding: 16px; }
}

/* cards: softer, rounder */
.card, .kpi, .fbar { border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-title h2, .card h2 { font-size: 17px; font-weight: 500; }

/* dashboard */
.dash-head { display: flex; justify-content: space-between; gap: 18px; align-items: stretch; flex-wrap: wrap; margin-bottom: 16px; }
.dash-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -.3px; margin: 4px 0 6px; }
.dash-head .tag { color: var(--muted); font-size: 15px; }
.dash-head .tag span { margin: 0 10px; color: #c3cad5; }
.focus { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px 12px 14px; display: flex; gap: 14px; align-items: center; }
.focus .tgt { width: 52px; height: 52px; color: var(--c-red); }
.focus h3 { margin: 0 0 6px; font-size: 13.5px; font-weight: 500; }
.focus ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: auto auto; gap: 3px 28px; font-size: 13px; color: #37465b; }
.focus li { display: flex; gap: 7px; align-items: center; }
.focus li .ico { width: 15px; height: 15px; color: var(--c-green); }
.kpi7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1350px) { .kpi7 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .kpi7 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kc { border-radius: var(--radius); padding: 14px 14px 12px; border: 1px solid transparent; position: relative; min-height: 132px; display: flex; flex-direction: column; }
.kc .top { display: flex; gap: 10px; align-items: center; }
.kc .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.kc .ic .ico { width: 20px; height: 20px; }
.kc .lb { font-size: 13.5px; color: #24324a; line-height: 1.2; }
.kc .lb small { font-size: 11px; color: var(--muted); }
.kc .v { font-size: 25px; font-weight: 700; margin: 8px 0 2px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.kc .d { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 2px; }
.kc .d .ico { width: 17px; height: 17px; stroke-width: 2.5; }
.kc .s { font-size: 12px; color: var(--muted); margin-top: auto; }
.kc.na .v { font-size: 15px; font-weight: 500; color: var(--muted); margin-top: 12px; }
.kc.green { background: var(--t-green); border-color: #d3eedd; } .kc.green .ic { background: var(--c-green); }
.kc.red { background: var(--t-red); border-color: #f7d9d9; } .kc.red .ic { background: var(--c-red); }
.kc.orange { background: var(--t-orange); border-color: #fbe3c4; } .kc.orange .ic { background: var(--c-orange); }
.kc.blue { background: var(--t-blue); border-color: #d6e5fc; } .kc.blue .ic { background: var(--c-blue); }
.kc.purple { background: var(--t-purple); border-color: #e2dafc; } .kc.purple .ic { background: var(--c-purple); }
.kc.grey { background: #f6f7f9; border-color: var(--line); } .kc.grey .ic { background: #9aa6b6; }
.up-good { color: var(--c-green); } .down-bad { color: var(--c-red); } .up-bad { color: var(--c-red); } .down-good { color: var(--c-green); }
.dgrid { display: grid; gap: 14px; margin-bottom: 14px; }
.dgrid.c3 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
.dgrid.c3b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1200px) { .dgrid.c3, .dgrid.c3b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 760px) { .dgrid.c3, .dgrid.c3b { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; }
.panel .ph { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.panel .ph h2 { margin: 0; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.panel .ph a.more { font-size: 12.5px; }
.panel .ph .unit { font-weight: 400; font-size: 14px; color: var(--muted); }
.chips3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.chip { border-radius: 8px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.chip strong { display: block; font-size: 15px; color: var(--c-red); font-weight: 600; }
.chip .ico { color: var(--c-red); width: 20px; height: 20px; }
.chip.red { background: var(--t-red); } .chip.orange { background: var(--t-orange); } .chip.orange strong, .chip.orange .ico { color: var(--c-orange); }
.na-box { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; padding: 6px 2px; }
.na-box .need { display: flex; gap: 8px; align-items: flex-start; background: #f7f9fc; border: 1px dashed #d5dce6; border-radius: 10px; padding: 10px 12px; }
.na-box .need .ico { color: var(--c-orange); margin-top: 1px; }
.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini > div { background: #f7f9fc; border-radius: 10px; padding: 10px; }
.mini span { display: block; font-size: 11.5px; color: var(--muted); }
.mini strong { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tw { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.dt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dt th { background: #f6f8fb; color: #3c4a5e; font-weight: 600; font-size: 12px; padding: 7px 6px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt td { padding: 7px 6px; border-bottom: 1px solid #edf0f4; white-space: nowrap; }
.dt tr:last-child td { border-bottom: 0; }
.dt .num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 6px; font-weight: 500; font-size: 12.5px; }
.pill.red { background: #fde4e4; color: #b42318; } .pill.orange { background: #feefd9; color: #a35a00; } .pill.green { background: #def5e6; color: #15703f; }
.pill.blue { background: #e3edfd; color: #1d5bbf; } .pill.grey { background: #eef1f5; color: #4a5568; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.green { background: var(--c-green); } .dot.orange { background: var(--c-orange); } .dot.red { background: var(--c-red); } .dot.grey { background: #b8c1cc; }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.st.red { background: #fde4e4; color: #b42318; } .st.orange { background: #feefd9; color: #a35a00; } .st.blue { background: #e3edfd; color: #1d5bbf; } .st.green { background: #def5e6; color: #15703f; }
.st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lnk { color: var(--blue); font-weight: 500; }
.legend { display: flex; gap: 16px; justify-content: center; font-size: 12px; color: #3c4a5e; margin-bottom: 2px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.line { height: 3px; border-radius: 2px; vertical-align: 3px; width: 16px; }
.prov-note { font-size: 12px; color: var(--muted); margin: -4px 0 14px; display: flex; gap: 6px; align-items: center; }
.prov-note .ico { width: 15px; height: 15px; color: var(--c-orange); }

/* printing: the page alone, without the sidebar and top bar */
@media print {
  .shell { display: block; min-height: 0; } .sb, .tb, .tb-search, .no-print { display: none !important; }
  .main-col { display: block; }
}

/* ---- conditional colour: green for the good side, red for the bad side, deeper with the size of the effect ---- */
:root { --pos: 22, 148, 84; --neg: 214, 48, 49; }
td.t-pos, td.t-neg { position: relative; font-weight: 500; }
td.t-pos { background: linear-gradient(90deg, rgba(var(--pos), calc(var(--i, .3) * .03)), rgba(var(--pos), calc(var(--i, .3) * .20))); color: #11613a; box-shadow: inset -3px 0 0 rgba(var(--pos), calc(var(--i, .3) * .85)); }
td.t-neg { background: linear-gradient(90deg, rgba(var(--neg), calc(var(--i, .3) * .03)), rgba(var(--neg), calc(var(--i, .3) * .20))); color: #a4262a; box-shadow: inset -3px 0 0 rgba(var(--neg), calc(var(--i, .3) * .85)); }
.delta.good, .delta.bad { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; }
.delta.good { background: linear-gradient(90deg, rgba(var(--pos), .06), rgba(var(--pos), .20)); color: #11613a; }
.delta.bad { background: linear-gradient(90deg, rgba(var(--neg), .06), rgba(var(--neg), .20)); color: #a4262a; }
.kpi.s-good { background: linear-gradient(180deg, rgba(var(--pos), .07), #fff 55%); border-top: 3px solid rgba(var(--pos), .75); }
.kpi.s-bad { background: linear-gradient(180deg, rgba(var(--neg), .08), #fff 55%); border-top: 3px solid rgba(var(--neg), .75); }
.kpi .value .cr, .kc .v .cr, .boss b .cr { display: inline-block; margin-left: 6px; font-size: .52em; font-weight: 500; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.up-good, .down-good { background: linear-gradient(90deg, rgba(var(--pos), .05), rgba(var(--pos), .16)); border-radius: 999px; padding: 0 6px; }
.up-bad, .down-bad { background: linear-gradient(90deg, rgba(var(--neg), .05), rgba(var(--neg), .16)); border-radius: 999px; padding: 0 6px; }
.pill.red { background: linear-gradient(90deg, rgba(var(--neg), .08), rgba(var(--neg), .22)); } .pill.green { background: linear-gradient(90deg, rgba(var(--pos), .08), rgba(var(--pos), .22)); }
.badge.bad { background: linear-gradient(90deg, rgba(var(--neg), .08), rgba(var(--neg), .20)); } .badge.ok { background: linear-gradient(90deg, rgba(var(--pos), .08), rgba(var(--pos), .20)); }
.sharebar { background: #e9eef5; } .sharebar i { background: linear-gradient(90deg, #5b9bf0, #2a78d6); }

.kc .v .cr { display: block; margin: 0; font-size: .5em; }
.tw { overflow-x: auto; }
.filter-banner { display: flex; gap: 8px; align-items: center; background: #fff7e6; border: 1px solid #f5d79a; color: #7a4b00; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: 13px; }
.filter-banner .ico { width: 15px; height: 15px; }
.filter-banner a { margin-left: auto; font-weight: 600; }
.shot-title { font-style: italic; text-align: center; font-size: 15px; padding: 8px 0 6px; color: var(--ink, #1c2733); background: #fff; }
#shot-area { background: #fff; border-radius: 8px; }
#shot-area .card { box-shadow: none; border: 0; }

/* depot scorecard (Collection SA Vs. MIO) */
.sc { grid-column: 1 / -1; }
.sc-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.sc-tools input[type=search] { min-width: 220px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; }
.sc-chk { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.sc-sp { flex: 1; }
.sc-toast { font-size: 12.5px; color: #11613a; opacity: 0; transition: opacity .2s; min-width: 160px; }
.sc-toast.show { opacity: 1; } .sc-toast.bad { color: #a4262a; }
.sc-card { background: linear-gradient(180deg, #ffffff, #fbfcff); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 10px; box-shadow: 0 1px 2px rgba(13,34,64,.04), 0 8px 24px rgba(13,34,64,.05); }
.sc-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.sc-head h2 { margin: 0 0 2px; font-size: 17px; letter-spacing: -.01em; }
.sc-head p { margin: 0; font-size: 12px; color: var(--muted); max-width: 760px; }
.sc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; white-space: nowrap; }
.chip b { font-size: 13px; margin-right: 3px; }
.chip.good { background: linear-gradient(90deg, rgba(var(--pos), .06), rgba(var(--pos), .16)); color: #11613a; border-color: rgba(var(--pos), .25); }
.chip.bad { background: linear-gradient(90deg, rgba(var(--neg), .05), rgba(var(--neg), .14)); color: #a4262a; border-color: rgba(var(--neg), .25); }
.sc-scroll { overflow-x: auto; }
.sc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.sc-table th { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: none; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #f7f9fc; position: sticky; top: 0; user-select: none; }
.sc-table th.asc::after { content: " ▲"; font-size: 9px; } .sc-table th.desc::after { content: " ▼"; font-size: 9px; }
.sc-table th small { font-weight: 400; margin-left: 4px; opacity: .7; }
.sc-table td { padding: 9px 10px; border-bottom: 1px solid #eef2f7; }
.sc-table .l { text-align: left; } .sc-table .r { text-align: center; }
.sc-table td.sc-bar, .sc-table th.sc-bar-h { text-align: center; } .sc-table td.sc-bar { white-space: nowrap; }
.sc-table tbody tr { transition: background .12s; }
.sc-table tbody tr:hover { background: #f1f6ff; }
.sc-table .sc-rk { width: 34px; color: var(--muted); text-align: center; font-size: 12px; }
.sc-dep { font-weight: 600; color: var(--navy); text-decoration: none; border-bottom: 1px dotted rgba(31,111,224,.5); }
.sc-dep:hover { color: var(--blue); }
.sc-bar { min-width: 210px; }
.sc-split { display: inline-flex; width: 130px; height: 9px; border-radius: 999px; overflow: hidden; background: #eef2f7; vertical-align: middle; margin-right: 8px; }
.sc-split i { display: block; height: 100%; } .sc-split .sa { background: linear-gradient(90deg, #2fb36b, #1f9d55); } .sc-split .mio { background: linear-gradient(90deg, #f3a1a1, #e5484d); }
.sc-pct { display: inline-block; min-width: 52px; text-align: center; }
.sc-pct.s-good { color: #11613a; } .sc-pct.s-mid { color: #a56300; } .sc-pct.s-low { color: #a4262a; }
.sc-d { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sc-d.up { background: linear-gradient(90deg, rgba(var(--pos), .08), rgba(var(--pos), .22)); color: #11613a; }
.sc-d.down { background: linear-gradient(90deg, rgba(var(--neg), .08), rgba(var(--neg), .22)); color: #a4262a; }
.sc-d.flat { background: #eef2f7; color: #55657a; }
.sc-r { display: inline-block; font-size: 12.5px; padding: 2px 10px; border-radius: 8px; }
.sc-r.up { background: rgba(var(--pos), .12); color: #11613a; } .sc-r.down { background: rgba(var(--neg), .12); color: #a4262a; }
.sc-r.flat { background: #eef2f7; color: #33445a; } .sc-r.none { color: var(--muted); font-style: italic; }
.sc-r.strong { font-weight: 700; }
.sc-table tfoot td { border-top: 2px solid #cfd8e6; border-bottom: 0; background: #f3f6fb; padding: 11px 10px; }
.sc-foot { font-size: 11px; color: var(--muted); padding: 8px 2px 4px; }

/* Digest Report */
.dg-bar { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; flex-wrap: wrap; }
.dg-pos { display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap; padding: 8px 14px; margin: 0 0 12px; background: #fff; border: 1px solid var(--line, #e3e8ef); border-radius: 10px; font-size: 13px; }
.dg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1200px) { .dg-grid { grid-template-columns: 1fr; } }
.dg-card { padding: 0; overflow: hidden; }
.dg-head { padding: 12px 14px 8px; border-bottom: 1px solid var(--line, #e3e8ef); background: #f8fafc; }
.dg-head h2 { margin: 0 0 8px; font-size: 15px; }
.dg-ctl { display: flex; gap: 6px; align-items: center; margin: 0 0 6px; flex-wrap: wrap; }
.dg-pos .cr { margin-left: 6px; font-size: .85em; font-weight: 400; color: var(--muted, #667); }
.dg-ctl { flex-wrap: nowrap; }
.dg-ctl input[type=date] { width: 138px; min-width: 0; padding: 4px 6px; border: 1px solid #cfd8e3; border-radius: 6px; background: #fff; font: inherit; }
.dg-body { padding: 8px 14px 14px; transition: opacity .15s; }
.dg-body.busy { opacity: .45; }
.dg-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.dg-t th { font-size: 11px; font-weight: 600; color: var(--muted, #667); text-align: right; padding: 4px 6px; }
.dg-t td { padding: 5px 6px; height: 30px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.dg-t td.lb { color: #334; }
.dg-t td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dg-t tr.sec td { height: 26px; padding-top: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #5b6b7e; border-bottom: 1px solid #d9e0e8; }
.dg-t td.t-good { color: #11613a; font-weight: 600; }
.dg-t td.t-bad { color: #a4262a; font-weight: 600; }
.dg-t .cr { display: block; margin: 0; font-size: 10.5px; color: var(--muted, #667); }
.dg-t td.lb { min-width: 110px; }
.dg-note { margin: 6px 0; padding: 6px 10px; font-size: 12px; background: #f4f7fb; border-left: 3px solid #9fb3c8; border-radius: 4px; color: #44546a; }
.dg-blink { margin: 6px 0; padding: 7px 10px; font-size: 12.5px; font-weight: 600; background: #fff4e5; border-left: 3px solid #f08a24; border-radius: 4px; color: #8a4b00; }
.blink { animation: dgblink 1.3s ease-in-out infinite; }
@keyframes dgblink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .blink { animation: none; } }
.dg-list { margin-top: 12px; }
.dg-list h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #5b6b7e; }
.dg-li { display: grid; grid-template-columns: 1fr auto 52px; gap: 8px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px dashed #e6ebf1; }
.dg-li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-li .am, .dg-li .sh { text-align: right; font-variant-numeric: tabular-nums; }
.dg-li .sh { color: var(--muted, #667); }
@media print { .dg-grid { grid-template-columns: repeat(3, 1fr); } .no-print { display: none !important; } }

/* OKR Scorecard */
.okr-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.okr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.okr-card { padding: 16px 18px; border-top: 4px solid #d6dce3; }
.okr-card.s-good { border-top-color: #2fb36b; }
.okr-card.s-bad { border-top-color: #e5484d; }
.okr-top { display: flex; justify-content: space-between; align-items: center; }
.okr-n { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5b6b7e; }
.okr-card h2 { margin: 6px 0 2px; font-size: 17px; }
.okr-obj { font-size: 12px; color: var(--muted, #667); min-height: 30px; }
.okr-val { font-size: 30px; font-weight: 700; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.okr-card.s-good .okr-val { color: #11613a; }
.okr-card.s-bad .okr-val { color: #a4262a; }
.okr-val .cr { font-size: .45em; font-weight: 500; margin-left: 8px; color: var(--muted, #667); }
.okr-tgt { font-size: 13px; margin-bottom: 10px; }
.okr-t { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 6px; }
.okr-t td { padding: 5px 0; border-bottom: 1px solid #eef1f5; }
.okr-t td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.okr-tgt .cr, .okr-t .cr { margin-left: 5px; font-size: .85em; color: var(--muted, #667); }

/* Customer monthly database */
.cm-bar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:8px 0 10px}
.cm-bar label{display:flex;flex-direction:column;gap:3px}
.cm-cov{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:4px 0 8px}
.cm-m{display:inline-flex;gap:3px;align-items:center;border:1px solid var(--line,#d6dce3);border-radius:6px;padding:2px 6px;background:#fff}
.cm-dot{width:9px;height:9px;border-radius:50%;border:1.5px solid #3a7;display:inline-block;background:transparent}
.cm-dot.s-full{background:#2a8a55;border-color:#2a8a55}
.cm-dot.s-partial{background:linear-gradient(90deg,#2a8a55 50%,transparent 50%);border-color:#2a8a55}
.cm-dot.s-unsplit{border-color:#b7791f;background:linear-gradient(90deg,#b7791f 50%,transparent 50%)}
.cm-dot.s-none{border-color:#b9c1cc}
.cm-wrap{max-height:70vh}
.cm-t th.cm-mh{text-align:center;border-left:2px solid #c9d1da}
.cm-t td.cm-s1,.cm-t th.cm-s1{position:sticky;left:0;background:#fff;z-index:2;min-width:96px}
.cm-t td.cm-s2,.cm-t th.cm-s2{position:sticky;left:96px;background:#fff;z-index:2;min-width:200px;white-space:nowrap}
.cm-good{color:#067647}.cm-bad{color:#b42318}

/* dashboard: target against achievement */
.okrb, .yoy { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 10px; min-width: 320px; flex: 1 1 340px; }
.okrb-h { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.okrb-h h3 { margin: 0; font-size: 13.5px; font-weight: 500; } .okrb-h a { font-size: 12.5px; }
.okrb-row { display: grid; grid-template-columns: 128px minmax(80px, 1fr) auto; gap: 10px; align-items: center; padding: 4px 0; font-size: 12.5px; }
.okrb-l { color: #37465b; }
.okrb-track { position: relative; height: 10px; background: #edf0f4; border-radius: 6px; overflow: visible; }
.okrb-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: #9aa6b6; }
.okrb-fill.s-good { background: var(--c-green, #1f9d55); } .okrb-fill.s-bad { background: var(--c-red, #e5484d); }
.okrb-pace { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #1f2933; border-radius: 1px; }
.okrb-v { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; } .okrb-v b { font-weight: 500; margin-right: 6px; }
.okrb-note { margin: 6px 0 0; font-size: 11.5px; color: var(--faint); }
.okrb-v .muted { margin-left: 2px; } .okrb-v .faint + .muted::before, .okrb-v b + .muted::before { content: "· "; }

/* dashboard: what stands out */
.dash-head { margin-bottom: 8px; }
.dash-trio { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; align-items: stretch; margin-bottom: 16px; }
.dash-trio > section { margin: 0; min-width: 0; max-width: none; flex: none; }
@media (max-width: 1250px) { .dash-trio { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .dash-trio { grid-template-columns: 1fr; } }
.ins-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 10px; }
.ins-box h2 { margin: 0 0 8px; font-size: 13.5px; font-weight: 500; }
.ins-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ins-box li { position: relative; padding: 2px 0 2px 14px; font-size: 13px; line-height: 1.45; color: #2c3a4d; }
.ins-box li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #9aa6b6; }
.ins-box li.good::before { background: var(--c-green, #1f9d55); } .ins-box li.bad::before { background: var(--c-red, #e5484d); } .ins-box li.warn::before { background: #f08a24; }
.ins-box li b { font-weight: 500; color: #111b2b; }
.ins-note { margin: 8px 0 0; font-size: 11.5px; color: var(--faint); }
.okrb-inc { color: var(--warn, #a86b12); font-size: 11.5px; margin-right: 4px; }

.yoy-sub { margin: -4px 0 8px; font-size: 11.5px; color: var(--faint); }
.yoy-m { padding: 6px 0 4px; border-top: 1px solid #eef0f3; } .yoy-m:first-of-type { border-top: 0; }
.yoy-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 4px; } .yoy-top b { font-weight: 500; }
.yoy-d { font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; } .yoy-d.good { color: #11613a; } .yoy-d.bad { color: #a4262a; } .yoy-d.info { color: #3d5f9e; }
.yoy-line { display: grid; grid-template-columns: 62px minmax(60px, 1fr) minmax(70px, auto); gap: 8px; align-items: center; font-size: 12.5px; padding: 2px 0; }
.yoy-line span { color: var(--muted); } .yoy-line em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.yoy-this, .yoy-last { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; } .yoy-this { background: #2f6b86; } .yoy-last { background: #b9c4d0; }
.yoy-note { font-size: 11.5px; color: var(--warn, #a86b12); margin: 2px 0 0 70px; }

/* v1.3.6 dashboard header panels */
.dash-trio .pnl { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 10px 24px -14px rgba(16,24,40,.18); overflow: hidden; display: flex; flex-direction: column; }
.pnl::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--pa, #12968a); }
.pnl-teal { --pa: #12968a; --pt: #e6f6f5; } .pnl-blue { --pa: #1f6fe0; --pt: #eaf2fe; } .pnl-purple { --pa: #7a5af0; --pt: #f2eefe; }
.pnl-h { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.pnl-h > div { flex: 1; min-width: 0; }
.pnl-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--pt); color: var(--pa); display: grid; place-items: center; flex: none; }
.pnl-ic .ico { width: 18px; height: 18px; }
.pnl-h h2 { margin: 0; font-size: 15px; font-weight: 600; color: #0f1b2d; line-height: 1.25; }
.pnl-sub { margin: 1px 0 0; font-size: 11.5px; color: var(--faint); line-height: 1.35; }
.pnl-link { font-size: 12px; white-space: nowrap; }
.pnl-note { margin: auto 0 0; padding-top: 10px; font-size: 11px; color: var(--faint); line-height: 1.4; }
.pnl-empty { font-size: 13px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; background: #eef1f5; color: #4a5566; white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { background: #e6f5ec; color: #0f6a3a; } .pill.bad { background: #fdeceb; color: #a4262a; }
.pill.warn { background: #fff1de; color: #8a5200; } .pill.info { background: #eaf0fb; color: #2f4f8f; }
/* insights */
.ins-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ins-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ins-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px;
  background: #f7f9fc; border-left: 3px solid #b9c4d0; font-size: 12.8px; line-height: 1.45; color: #2c3a4d; }
.ins-list li::before { display: none; }
.ins-list li.good { background: #f0faf4; border-left-color: #1f9d55; } .ins-list li.bad { background: #fff4f3; border-left-color: #d64545; }
.ins-list li.warn { background: #fff8ec; border-left-color: #e8870e; } .ins-list li.info { background: #f5f8fd; border-left-color: #6d8bc4; }
.ins-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #fff; color: #6d8bc4; }
.ins-ic .ico { width: 15px; height: 15px; }
.ins-list li.good .ins-ic { color: #1f9d55; } .ins-list li.bad .ins-ic { color: #d64545; } .ins-list li.warn .ins-ic { color: #e8870e; }
.ins-t b { font-weight: 600; color: #0f1b2d; }
/* year on year */
.yo-m { padding: 9px 0 9px; border-top: 1px solid #eef1f5; } .yo-m:first-of-type { border-top: 0; padding-top: 0; }
.yo-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.yo-l { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.yo-d { display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; background: #eef1f5; color: #4a5566; }
.yo-d .ico { width: 13px; height: 13px; } .yo-d.good { background: #e6f5ec; color: #0f6a3a; } .yo-d.bad { background: #fdeceb; color: #a4262a; }
.yo-d.info { background: #eaf0fb; color: #2f4f8f; } .yo-d.none { font-weight: 400; color: var(--faint); }
.yo-big { font-size: 19px; font-weight: 600; color: #0f1b2d; margin: 3px 0 6px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.yo-big .faint { font-size: 13px; font-weight: 400; }
.yo-bars { display: grid; gap: 5px; }
.yo-bar { display: grid; gap: 2px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.yo-bar .okrb-track { height: 8px; }
.yoy-this { background: linear-gradient(90deg, #1f6fe0, #4c93f0); } .yoy-last { background: #c5cfdb; }
.yoy .yoy-note { margin: 3px 0 0; }
/* OKR bars */
.ok-row { padding: 7px 0 8px; border-top: 1px solid #f0f2f6; } .ok-row:first-of-type { border-top: 0; padding-top: 0; }
.ok-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.ok-l { font-size: 12.8px; color: #2c3a4d; font-weight: 500; } .ok-v { font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; } .ok-v b { font-weight: 600; color: #0f1b2d; }
.ok-row .okrb-track { height: 10px; }
.ok-row .okrb-fill.s-good { background: linear-gradient(90deg, #1f9d55, #43c07a); } .ok-row .okrb-fill.s-bad { background: linear-gradient(90deg, #d64545, #ef7a7a); }
.ok-bot { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; gap: 8px; }
.ok-t { font-size: 11.5px; color: var(--faint); }
.ok-bot .pill { padding: 1px 8px; font-size: 11px; } .ok-bot .pill.none { color: var(--faint); }

/* "i" help marker: says which report is missing and which dates to upload */
.ni { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 6px; border-radius: 50%;
  background: #e8f0fb; color: #1f5fae; font: 600 10px/1 Georgia, serif; font-style: italic; cursor: help; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.ni:hover, .ni:focus { background: #1f5fae; color: #fff; outline: none; }
.ni .ni-tip { display: none; position: absolute; z-index: 60; top: 20px; left: -10px; width: 280px; padding: 9px 11px; border-radius: 9px; background: #fff; color: #1d2b3f;
  border: 1px solid #c9d6e6; box-shadow: 0 8px 24px -8px rgba(16,24,40,.3); font: 400 12px/1.45 inherit; font-style: normal; text-align: left; white-space: normal; }
.ni:hover .ni-tip, .ni:focus .ni-tip { display: block; }
th .ni .ni-tip { left: auto; right: -10px; }
