/* Dashboard */
.dash-loading { display: grid; place-items: center; padding: 120px 0; }
.dash-greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dash-greet h2 { font-size: 24px; letter-spacing: -0.025em; margin-top: 6px; }

/* KPI cards */
.dash-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-height: 248px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-ico { width: 16px; height: 16px; color: var(--muted); }
.kpi-value { font-size: 34px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.kpi-pending { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1; }
.kpi-pending .kpi-value { color: var(--faint); }
.kpi-alert {
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border-radius: 9px;
  background: var(--amber-tint); color: #7A5212; font-size: 12.5px;
}
.kpi-alert .ico { vertical-align: -2px; }
.kpi-alert strong { font-weight: 600; }
.acct-list { display: flex; flex-direction: column; margin-top: auto; border-top: 1px solid var(--line); }
.acct { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.acct:last-child { border-bottom: 0; padding-bottom: 0; }
.acct .num { font-weight: 500; }
.strike { text-decoration: line-through; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }

.wf-bar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--sunken); }
.wf-bar span { height: 100%; }
.wf-rows { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.wf-rows > div { display: flex; align-items: center; gap: 8px; }
.wf-rows .num { font-weight: 500; color: var(--ink); }
.wf-total { padding-top: 5px; border-top: 1px dashed var(--line-2); font-weight: 600; color: var(--ink) !important; }

.ring-num { font: 600 22px var(--font); letter-spacing: -0.03em; fill: var(--ink); font-variant-numeric: tabular-nums; }
.conf-band { font-weight: 600; font-size: 15px; }
.conf-band.green { color: var(--green); } .conf-band.amber { color: var(--amber); } .conf-band.red { color: var(--red); }
.hz { display: flex; flex-direction: column; gap: 7px; margin-top: auto; }
.hz-row { display: grid; grid-template-columns: 104px 1fr 26px; align-items: center; gap: 10px; font-size: 12px; }
.hz-label { color: var(--ink-2); }
.hz-track { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.hz-track span { display: block; height: 100%; border-radius: 3px; }
.hz-num { text-align: right; font-weight: 500; }

/* Attention */
.dash-att { margin-top: 28px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sec-head h3 { font-size: 15px; }
.sec-head .link { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.att-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.att-col { padding: 6px 6px 8px; display: flex; flex-direction: column; }
.att-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px; }
.att-list { display: flex; flex-direction: column; gap: 2px; }
.att-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 10px 10px 12px; border-radius: 10px; transition: opacity .2s, background .12s; }
.att-item:hover { background: var(--surface-2); }
.att-title { font-size: 13px; font-weight: 500; line-height: 1.35; }
.att-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.att-meta .pill { height: 19px; font-size: 10.5px; }
.att-actions { display: flex; align-items: center; gap: 2px; flex: none; opacity: .85; }
.att-item:hover .att-actions { opacity: 1; }
.att-done { opacity: 0; }
.att-empty { display: flex; align-items: center; gap: 6px; padding: 14px 12px; }
.att-more { padding: 6px 12px 2px; text-decoration: none; }
.att-red .att-head { border-bottom: 2px solid var(--red-tint); }
.att-yellow .att-head { border-bottom: 2px solid var(--amber-tint); }
.att-green .att-head { border-bottom: 2px solid var(--green-tint); }

/* Lifecycle chart */
.dash-lc { margin-top: 28px; padding-bottom: 8px; }
.dash-lc-head { align-items: center; }
.dash-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 14px 20px 0; font-size: 12.5px; }
.legend-month { font-weight: 500; color: var(--ink) !important; padding-right: 6px; border-right: 1px solid var(--line); margin-right: 2px; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg-v { font-weight: 600; color: var(--ink); }
.lg-line { width: 14px; height: 2px; background: var(--lc-revenue); border-radius: 1px; position: relative; display: inline-block; flex: none; }
.lg-line::after { content: ''; position: absolute; left: 4px; top: -2.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--lc-revenue); box-shadow: 0 0 0 1.5px var(--surface); }
.dash-chart { position: relative; padding: 8px 12px 0 8px; }
.lc-svg { display: block; overflow: visible; }
.lc-svg .gridline { stroke: var(--line); stroke-width: 1; }
.lc-svg .axis { font: 500 11px var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
.lc-svg .axis-sel { fill: var(--ink); font-weight: 600; }
.lc-svg .bar.proj { opacity: .68; }
.lc-svg .sel-band { fill: var(--brand-tint); opacity: .7; }
.lc-svg .today-line { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: .5; }
.lc-svg .today-label { fill: var(--ink-2); font-size: 10.5px; }
.lc-svg .rev-line { fill: none; stroke: var(--lc-revenue); stroke-width: 2; stroke-linejoin: round; }
.lc-svg .rev-dot { fill: var(--lc-revenue); stroke: var(--surface); stroke-width: 2; }
.lc-svg .hit { fill: transparent; cursor: pointer; }
.lc-svg .hit.ref-hover { fill: rgba(11, 79, 53, .04); }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 190px; padding: 10px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); font-size: 12px;
}
.tip-title { font-weight: 600; margin-bottom: 6px; }
.tip-row { display: flex; align-items: center; gap: 7px; padding: 2px 0; }
.tip-row .num { font-weight: 500; }
.tip-net { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 5px; font-weight: 500; }

/* Month detail */
.dash-month { margin-top: 16px; transition: opacity .15s; }
.dash-month.loading { opacity: .55; }
.ms-title { font-size: 20px !important; margin-top: 2px; letter-spacing: -0.02em; }
.ms-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); margin: 16px 20px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ms-stat { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.ms-v { font-size: 20px; font-weight: 600; letter-spacing: -0.025em; }
.ms-move { padding: 14px 20px 0; font-size: 13.5px; color: var(--ink-2); }
.ms-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; padding: 16px 20px 20px; }
.ms-sub { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 0 8px; }
.ms-table th { background: var(--surface); padding: 8px 10px; }
.ms-table td { padding: 9px 10px; }
.ms-table th:first-child, .ms-table td:first-child { padding-left: 0; }
.ms-name { font-weight: 500; font-size: 13px; }
.mini-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.mini-bar span { height: 100%; min-width: 2px; }
.drv-list { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.drv { display: inline-flex; align-items: center; gap: 5px; max-width: 220px; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--sunken); font-size: 11.5px; }
.drv .num { font-size: 11px; }
.drv-warn { background: var(--amber-tint); color: #7A5212; }
.ms-more { margin-top: 6px; }
.ms-key { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.ms-key .swatch { margin-left: 8px; }
.ms-key .swatch:first-child { margin-left: 0; }
.in-list { display: flex; flex-direction: column; }
.in-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; margin: 0 -6px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.in-row:last-child { border-bottom: 0; }
.in-row .num { font-weight: 500; }

/* Confidence detail */
.dash-conf { margin-top: 28px; }
.conf-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; padding: 18px 20px 20px; }
.conf-left { display: flex; flex-direction: column; gap: 18px; }
.ev-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.ev-bar span { height: 100%; min-width: 3px; }
.ev-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 16px; }
.ev-item { padding: 6px 8px; margin: -6px -8px; border-radius: 8px; }
.ev-v { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.gap-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.gap-row:last-child { border-bottom: 0; }
.gap-v { font-weight: 600; color: #7A5212; }

/* Modals */
.link-brand { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.link-brand .qmark { color: #fff; }
.prep-track { width: 140px; height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.prep-track span { display: block; height: 100%; background: var(--brand-2); border-radius: 3px; }
.prep-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.prep-check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; color: #fff; }
.prep-row.ok .prep-check { background: var(--brand-2); border-color: var(--brand-2); }
.prep-notify { margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--brand-tint); align-items: flex-start; }
.prep-notify input { margin-top: 2px; }

@media (max-width: 1280px) {
  .conf-grid { grid-template-columns: 220px minmax(0, 1fr); }
  .conf-right { grid-column: 1 / -1; }
  .ms-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .dash-kpis, .att-grid { grid-template-columns: 1fr; }
  .kpi { min-height: 0; }
  .ms-stats { grid-template-columns: repeat(2, 1fr); }
}

/* inline checklist steps */
.prep-item { border-bottom: 1px solid var(--line); }
.prep-item .prep-row { border-bottom: 0; cursor: pointer; }
.prep-item.open .prep-row { padding-bottom: 8px; }
.prep-panel { margin: 0 0 14px 32px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); animation: msgIn .18s ease-out; }
.prep-panel .rsv { grid-template-columns: 1fr; gap: 12px; }
.prep-person .input { flex: 1; }

/* design pass, Nov 16 */
.kpi { min-height: 196px; position: relative; }
.kpi-value { font-size: 32px; }
.kpi .label.row { display: inline-flex; color: var(--ink-2); }
.kpi-alert { padding: 6px 6px 6px 10px; }
.kpi-alert .ico { flex: none; color: #A86410; }
.acct-list { border-top: 0; margin-top: 0; gap: 4px; }
.acct { border-bottom: 0; padding: 0; color: var(--ink-2); }
.acct .num { color: var(--ink); }
.wf-hover { position: relative; }
.wf-hover .ipop { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); width: 260px; background: var(--ink); color: #F2F2EE; font-size: 12px; line-height: 1.6; padding: 9px 11px; border-radius: 9px; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 60; box-shadow: var(--shadow-2); }
.wf-hover:hover .ipop { opacity: 1; }
.wf-hover .ipop b { color: #fff; }
.wf-bar { height: 8px; }
.kpi .link.xs { font-size: 12px; }
.kpi-soon { margin-top: auto; align-self: flex-start; color: var(--muted); font-weight: 500; }
.dash-att { margin-top: 20px; }
.dash-lc { margin-top: 20px; }
.rl-kids { display: none; }
.rl-pg.open .rl-kids { display: block; }
.acct-broken { color: var(--muted); }
