/*
 * billing/module.css: the Billing overview, plans, a plan's page and
 * unbilled time. Theme tokens only; --mustard is the accent (acid on
 * Plasmodium, olive on Oat), --brick what is late.
 */

.bl-eyebrow{font-size:10.5px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--ink-soft);margin:0 0 8px;}
.bl-num{color:var(--mustard);margin-right:8px;}
.bl-late{color:var(--brick);}
.bl-dim{color:var(--text-muted);}
.bl-tag{font-size:10px;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;color:var(--text-muted);}
.bl-tag.active{color:var(--mustard);}
.bl-tag.paused{color:var(--ink-soft);}

.bl-headline{font-family:var(--font-display);font-weight:300;letter-spacing:-0.02em;}
.bl-tabs{margin:4px 0 14px;}

.bl-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:6px 0 18px;}
@media (max-width:900px){ .bl-kpis{grid-template-columns:repeat(2,minmax(0,1fr));} }
.bl-kpi{border-top:1px solid var(--line);padding-top:10px;min-width:0;}
.bl-kpi-label{font-size:10.5px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--ink-soft);}
.bl-kpi-value{font-family:var(--font-display);font-size:30px;font-weight:300;letter-spacing:-0.03em;line-height:1.15;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.bl-kpi-value.accent{color:var(--mustard);}

.bl-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:18px;}
@media (max-width:900px){ .bl-grid{grid-template-columns:1fr;} }

.bl-chart{width:100%;height:auto;display:block;}
.bl-chart .bl-bar-carried{fill:var(--line-strong);}
.bl-chart .bl-bar-new{fill:var(--mustard);}
.bl-chart .bl-bar-expansion{fill:var(--mustard);opacity:0.55;}
.bl-chart .bl-bar-down{fill:var(--brick);opacity:0.8;}
.bl-chart .bl-axis{stroke:var(--line);stroke-width:1;}
.bl-chart .bl-label{fill:var(--text-muted);font-size:10px;}
.bl-chart .bl-hit{fill:transparent;cursor:pointer;}
.bl-chart .bl-hit:hover,.bl-chart .bl-hit.on{fill:var(--line);opacity:0.35;}
/* The bars let the pointer through to the month band behind them. */
.bl-chart rect:not(.bl-hit),.bl-chart text{pointer-events:none;}
.bl-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:11px;color:var(--text-muted);margin:6px 0 2px;}
.bl-legend i{display:inline-block;width:8px;height:8px;margin-right:5px;vertical-align:0;}
.bl-legend .carried{background:var(--line-strong);}
.bl-legend .new{background:var(--mustard);}
.bl-legend .expansion{background:var(--mustard);opacity:0.55;}
.bl-legend .down{background:var(--brick);opacity:0.8;}
.bl-note{font-size:12.5px;color:var(--ink-soft);min-height:18px;border-top:1px solid var(--line);padding-top:8px;margin-top:6px;}

.bl-line{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:8px 0;border-top:1px solid var(--line);font-size:13px;}
.bl-line > div:last-child{text-align:right;white-space:nowrap;}
.bl-age{display:grid;grid-template-columns:90px minmax(0,1fr) 90px;gap:10px;align-items:center;padding:7px 0;border-top:1px solid var(--line);font-size:13px;}
.bl-age-bar{height:4px;background:var(--subtle-bg);}
.bl-age-bar > div{height:4px;background:var(--ink-soft);}
.bl-age.late .bl-age-bar > div{background:var(--brick);}
.bl-age > div:last-child{text-align:right;}

.row.billing-plans{grid-template-columns:minmax(0,1.4fr) minmax(0,1.3fr) minmax(0,0.7fr) minmax(0,0.8fr) 110px;}
.row.billing-entries{grid-template-columns:28px 80px minmax(0,1fr) 70px 110px;align-items:center;}
.row.billing-entries input[type=checkbox]{margin:0;}

.bl-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:4px;}
.bl-actions{display:flex;gap:6px;flex-wrap:wrap;}
.bl-status{font-size:13px;color:var(--ink-soft);margin:2px 0 14px;}
.bl-schedule{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:6px;}
@media (max-width:760px){ .bl-schedule{grid-template-columns:1fr;} }
.bl-schedule > div{border-top:1px solid var(--line);padding-top:8px;}

.bl-month{display:flex;justify-content:space-between;align-items:baseline;margin:14px 0 2px;font-size:10.5px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--ink-soft);}
.bl-client{border-top:1px solid var(--line-strong);padding-top:12px;margin-top:10px;}
.bl-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line-strong);padding-top:12px;margin-top:16px;}

.bl-form-line{display:grid;grid-template-columns:minmax(0,1fr) 116px 96px 96px 70px auto;gap:6px;margin-bottom:6px;align-items:center;}
@media (max-width:760px){ .bl-form-line{grid-template-columns:1fr 1fr;} }
.bl-form-line label{font-size:11px;color:var(--text-muted);display:flex;gap:4px;align-items:center;}

/* Area 5a: a plan's page reads like the others (its client, proposal and
   system as a lede, Edit and the rest as text links, Start billing the
   button); in the two Physare themes the chart is the ink, its hairlines and
   the one accent, with the late color kept for money that left. */
.bl-lede{margin:0;font-size:17px;color:var(--ink-soft);}
.bl-head{align-items:center;margin-bottom:10px;}
.bl-actions{align-items:center;gap:10px 22px;}
.bl-kpi-sm{font-size:22px !important;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-kpi-label{font-size:11.52px;color:var(--text-muted);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-kpi-value{font-size:30.4px;letter-spacing:-0.015em;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-kpis{gap:20px 24px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-grid{gap:0 48px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-tag{font-size:11.52px;letter-spacing:0.12em;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.bl-line, .bl-age){font-size:14.4px;padding:10px 0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.bl-age-bar, .bl-age-bar > div){height:2px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-age-bar{background:var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-age-bar > div{background:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-chart .bl-bar-expansion{fill:var(--ink);opacity:1;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-legend .expansion{background:var(--ink);opacity:1;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-chart .bl-bar-down, html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-legend .down{opacity:1;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-legend{font-size:12.5px;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-note{font-size:14.4px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-month{font-size:11.52px;color:var(--text-muted);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .bl-chart .bl-label{font-size:11px;fill:var(--ink-soft);}
