:root {
  /* ClanClean: deep green #167a41, lime #a3c551, ink #1c2b22 */
  --bg: #f6faf7;
  --card: #ffffff;
  --ink: #1c2b22;
  --muted: #5a6a60;
  --faint: #a9b5ad;
  --line: #dde6df;
  --brand: #167a41;
  --brand-dark: #0f5c30;
  --accent: #a3c551;
  --btn-ink: #ffffff;
  --alt: #1c2b22;
  --field: #ffffff;
  --field-line: #c2cec6;
  --focus: #a3c551;
  --shadow: rgba(22, 122, 65, .14);
  --good: #167a41;
  --good-bg: #e3f4e9;
  --good-line: #b5e2c6;
  --good-ink: #0f5b34;
  --warn: #8f5a00;
  --warn-bg: #fdf0d3;
  --warn-line: #f1d592;
  --warn-ink: #6b4400;
  --bad: #b3261e;
  --bad-bg: #fde7e5;
  --info: #2457a6;
  --info-bg: #e3edfb;
  --grey-bg: #ebf0ec;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --on-accent: #13210a;
  --c-late: #e0a530;
  --c-leave: #5b8def;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1e25;
  --card: #152a31;
  --ink: #e7efe9;
  --muted: #9db0a5;
  --faint: #58727c;
  --line: #27404a;
  --brand: #a3c551;
  --brand-dark: #bcd97c;
  --accent: #a3c551;
  --btn-ink: #13210a;
  --alt: #41606c;
  --field: #0f2229;
  --field-line: #3a5560;
  --focus: #7be0a5;
  --shadow: rgba(0, 0, 0, .35);
  --good: #7be0a5;
  --good-bg: #143a2a;
  --good-line: #1f5a3f;
  --good-ink: #a8ecc4;
  --warn: #f2c56b;
  --warn-bg: #40300d;
  --warn-line: #6b5216;
  --warn-ink: #f6d590;
  --bad: #ff9d94;
  --bad-bg: #4a1f1c;
  --info: #9cc2ff;
  --info-bg: #1c3152;
  --grey-bg: #1d343c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--brand-dark); }
h1 { font-size: 1.5rem; margin: 1.4rem 0 1rem; line-height: 1.25; }
h1 .muted { font-size: .95rem; font-weight: 400; margin-left: .4rem; }
h2 { font-size: 1.05rem; margin: 0 0 .7rem; }
h2 .muted { font-weight: 400; }
h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: .9rem 0 .15rem; }
p { margin: 0 0 .7rem; }
small { font-size: .82em; }
.muted { color: var(--muted); }
.nogap { margin: .3rem 0 0; }
.right { text-align: right; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-bottom: 60px; }

/* top bar */
.topbar { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 6px; }
.brand { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span, .auth h1 span { color: var(--brand); }
.who { display: flex; align-items: center; gap: 14px; font-size: .88rem; white-space: nowrap; }
.who form { margin: 0; }
.who-name { background: var(--ink); color: var(--bg); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .8rem; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-top: 4px; padding-bottom: 10px; }
.tabs a {
  padding: 6px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem;
  border: 1px solid var(--line); border-radius: 999px; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* cards and blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; margin: 0 0 16px; }
.narrow { max-width: 560px; }
.split { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.split form { margin: 0; }
.times { font-size: 1.02rem; }
.done { color: var(--good); font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 0 0 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; }
.stat b { display: block; font: 600 1.7rem/1.1 var(--mono); letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.good b { color: var(--good); }
.stat.warn b { color: var(--warn); }
.stat.bad b { color: var(--bad); }

/* flash messages */
.flash { padding: 10px 14px; border-radius: 8px; margin: 14px 0; border: 1px solid; }
.flash-ok { background: var(--good-bg); border-color: var(--good-line); color: var(--good-ink); }
.flash-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }

/* buttons */
.btn {
  display: inline-block; background: var(--brand); color: var(--btn-ink); border: 1px solid var(--brand);
  padding: 9px 18px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.alt { background: var(--alt); border-color: var(--alt); color: #fff; }
.btn.ghost, .btn.ghost:hover { color: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--brand-dark); border-color: var(--line); }
.btn.ghost:hover { background: var(--grey-bg); }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn.big { padding: 14px 34px; font-size: 1.1rem; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-dark); text-decoration: underline; cursor: pointer; }
.linkbtn.danger { color: var(--bad); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* forms */
.form label { display: block; font-weight: 600; margin: 0 0 12px; }
.form label small, .radio small { font-weight: 400; color: var(--muted); margin-left: 4px; }
input[type=text], input:not([type]), input[type=password], input[type=url], input[type=number],
input[type=date], input[type=month], input[type=time], select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit; color: var(--ink);
  border: 1px solid var(--field-line); border-radius: 8px; background: var(--field);
}
textarea { resize: vertical; }
.form label.radio, label.radio { display: flex; align-items: baseline; gap: 8px; font-weight: 500; flex-wrap: wrap; }
label.radio.inline { display: inline-flex; margin-right: 14px; }
label.radio input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 14px; padding: 10px 12px 2px; }
legend { font-weight: 600; padding: 0 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1 1 150px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin: 0 0 16px; }
.filters label { font-weight: 600; font-size: .85rem; }
.filters input, .filters select { width: auto; min-width: 140px; }

/* sign-in screens */
body.bare main.wrap { max-width: 420px; padding-top: 8vh; }
.auth h1 { text-align: center; font-size: 1.5rem; margin-bottom: 1.2rem; }

/* tables */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.dim td { color: var(--muted); }
td form { margin: 0; }

/* status badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.b-present { background: var(--good-bg); color: var(--good); }
.b-late, .b-half_day { background: var(--warn-bg); color: var(--warn); }
.b-unlinked { background: var(--grey-bg); color: var(--muted); }
.b-absent { background: var(--bad-bg); color: var(--bad); }
.b-leave { background: var(--info-bg); color: var(--info); }
.b-off, .b-holiday, .b-none { background: var(--grey-bg); color: var(--muted); }
.b-pending { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--field-line); }

/* month grid */
table.grid th, table.grid td { padding: 5px 3px; text-align: center; font-size: .8rem; }
table.grid th small { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; }
table.grid th.offday { color: var(--faint); }
table.grid th.is-today { color: var(--brand-dark); box-shadow: inset 0 -3px 0 var(--accent); }
table.grid .sticky { position: sticky; left: 0; background: var(--card); text-align: left; padding: 5px 12px 5px 4px; white-space: nowrap; font-size: .9rem; z-index: 1; }
table.grid td.tot { font-weight: 700; padding: 5px 8px; }
table.grid td a { text-decoration: none; }
.c { display: inline-block; min-width: 24px; height: 24px; line-height: 24px; border-radius: 6px; font-size: .74rem; font-weight: 700; text-align: center; }
.c-present { background: var(--good-bg); color: var(--good); }
.c-late, .c-half_day { background: var(--warn-bg); color: var(--warn); }
.c-absent { background: var(--bad-bg); color: var(--bad); }
.c-leave { background: var(--info-bg); color: var(--info); }
.c-off, .c-holiday { background: var(--grey-bg); color: var(--muted); }
.c-pending { box-shadow: inset 0 0 0 1px var(--field-line); color: var(--muted); }
.legend { color: var(--muted); font-size: .85rem; line-height: 2.1; }
.legend .c { margin-left: 10px; }
.legend .c:first-child { margin-left: 0; }

/* reports and day history */
.report { padding: 16px 18px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.report p { margin: 0; overflow-wrap: anywhere; }
.day { margin: 0 0 18px; }
.day-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.day-head .edit { margin-left: auto; font-size: .88rem; }

/* quick links */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 20px; }
.link { display: block; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 18px; padding: 14px 16px; text-decoration: none; color: var(--ink); height: 100%; }
.link:hover { border-color: var(--brand); box-shadow: 0 2px 8px var(--shadow); }
.link strong { display: block; font-size: 1.02rem; }
.link span { display: block; color: var(--muted); font-size: .88rem; }
.link small { display: block; color: var(--brand-dark); margin-top: 6px; overflow-wrap: anywhere; }
.link-wrap { display: flex; flex-direction: column; }
.link-wrap .link { height: auto; flex: 1; }
.link-tools { display: flex; gap: 14px; font-size: .85rem; padding: 6px 4px 0; }
.link-tools form { margin: 0; }

@media (max-width: 640px) {
  .who-name { display: none; }
  h1 .muted { display: block; margin: 2px 0 0; }
  .card { padding: 14px; }
  .btn.big { width: 100%; }
  .split form { width: 100%; }
}

/* light / dark switch */
.theme-form { margin: 0; }
.theme-btn {
  background: transparent; color: var(--ink); border: 1px solid var(--field-line); border-radius: 999px;
  padding: 4px 12px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.theme-btn:hover { background: var(--grey-bg); }
.theme-corner { position: fixed; top: 14px; right: 16px; }

/* ---------- dashboard tiles ---------- */
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.section-title { margin: 26px 4px 12px; }
.bento { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 18px; grid-auto-flow: dense; }
.tile {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 20px;
}
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tile-head h3 { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.tile p { margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap;
}
a.chip:hover { color: var(--ink); border-color: var(--field-line); }
.chip.tint { border-color: transparent; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-dark); margin-left: auto; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.tiny { font-size: 10.5px; }
.ink { color: var(--ink); }
.empty { color: var(--muted); margin: auto 0; padding: 24px 0; }
.push { margin-top: auto; padding-top: 22px; }
.push-top { margin-top: auto; align-self: flex-start; }

.hero-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 20px; }
.hello { font-size: clamp(26px, 3.4vw, 34px); font-weight: 600; line-height: 1.1; letter-spacing: -.03em; margin-bottom: 4px !important; }
.hello span { color: var(--brand); }
.hero-num { text-align: right; margin-left: auto; flex-shrink: 0; }
.hero-top > div:first-child { min-width: 0; flex: 1 1 200px; }
.hero-num .label { justify-content: flex-end; }
.big { font-size: clamp(34px, 4vw, 40px); font-weight: 600; line-height: 1; letter-spacing: -.04em; }
.big small, .mid small, .huge small { font-size: .5em; color: var(--muted); letter-spacing: 0; }
.mid { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.mid.soft { color: var(--muted); }
.hero-num .sub { font-size: 12px; color: var(--brand-dark); margin-top: 6px; }
.strip { display: flex; align-items: flex-end; gap: 3px; height: 76px; flex: none; margin-top: auto; padding-top: 24px; box-sizing: content-box; }
.strip .bar {
  flex: 1; border-radius: 4px; background: var(--brand); opacity: .55; transform-origin: bottom;
  animation: grow .9s cubic-bezier(.22, 1, .36, 1) both; transition: opacity .2s;
}
.strip .bar.off { background: var(--faint); opacity: .3; }
.strip .bar.now { opacity: 1; }
.strip:hover .bar { opacity: .25; }
.strip .bar:hover { opacity: 1; }
.strip-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--muted); }
@keyframes grow { from { transform: scaleY(.06); } to { transform: scaleY(1); } }
@keyframes growx { from { transform: scaleX(.06); } to { transform: scaleX(1); } }

.seg { display: flex; gap: 4px; height: 36px; margin-top: 14px; }
.seg span { flex-basis: 0; border-radius: 8px; min-width: 10px; animation: growx .8s cubic-bezier(.22, 1, .36, 1) both; transform-origin: left; }
.s-present { background: var(--brand); }
.s-late { background: var(--c-late); }
.s-leave { background: var(--c-leave); }
.s-pending, .s-none { background: var(--faint); }
.legend-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 12px; }
.legend-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.legend-list li span { display: flex; align-items: center; gap: 8px; }
.legend-list b { color: var(--muted); font-weight: 500; }

.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.accent .tile-head h3 { color: inherit; font-weight: 600; opacity: .75; }
.accent .chip { border-color: transparent; background: rgba(19, 33, 10, .12); color: inherit; }
.accent .chip .dot { width: 6px; height: 6px; }
.huge { font-size: 52px; font-weight: 600; line-height: 1; letter-spacing: -.05em; margin-top: 6px !important; }
.accent .huge small { color: inherit; font-size: 22px; }
.accent .sub { font-size: 12px; font-weight: 500; opacity: .7; margin-top: 4px; }
.inset { background: rgba(19, 33, 10, .1); border-radius: 16px; padding: 12px; margin-top: 20px; }
.inset-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }
.inset-row span { opacity: .7; }
.meter { height: 6px; border-radius: 999px; background: rgba(19, 33, 10, .14); margin-top: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--on-accent); }
.plain { list-style: none; margin: 12px 0 0; padding: 0; font-size: 12px; }
.plain li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; }
.accent .plain span { opacity: .75; }
.mini { display: flex; align-items: flex-end; gap: 4px; height: 48px; }
.mini span { flex: 1; border-radius: 4px; background: var(--on-accent); }
.accent .tiny { opacity: .6; margin-top: 6px; }
.solid-btn {
  display: block; text-align: center; margin-top: 16px; padding: 12px; border-radius: 16px;
  background: var(--on-accent); color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none;
}
.solid-btn:active { transform: scale(.98); }

.chart-legend { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 32px; }
.ln { display: inline-block; width: 16px; height: 3px; border-radius: 3px; background: var(--brand); }
.ln.dash { height: 0; background: none; border-top: 2px dashed var(--muted); }
.chart { position: relative; flex: 1; min-height: 220px; margin-top: 16px; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gridline { stroke: var(--line); stroke-dasharray: 1 5; }
.g0 { stop-color: var(--brand); stop-opacity: .28; }
.g1 { stop-color: var(--brand); stop-opacity: 0; }
.area { animation: fade .9s ease .4s both; }
.line1 { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; animation: draw 1.3s cubic-bezier(.22, 1, .36, 1) both; }
.line2 { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 5; }
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.plain.rows { margin-top: 0; font-size: 13px; }
.plain.rows li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.plain.rows li:last-child { border-bottom: 0; }
.plain.rows a { text-decoration: none; font-weight: 500; }
.plain.rows a:hover { text-decoration: underline; }
a.go { display: flex; justify-content: space-between; width: 100%; color: var(--ink); }
a.go i { font-style: normal; color: var(--muted); }
a.go:hover i { color: var(--brand); }

.kv { margin: 0; }
.kv div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.kv + .chip { margin-top: 14px; }

.t-staff th, .t-staff td { padding: 9px 8px; }
.feed { list-style: none; margin: -4px -8px; padding: 0; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; animation: rise .5s cubic-bezier(.22, 1, .36, 1) both; }
.feed li:hover { background: var(--grey-bg); }
.feed li.muted { animation: none; }
.feed .ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--grey-bg); flex-shrink: 0; }
.feed .grow { flex: 1; min-width: 0; }
.feed .grow p { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .end { text-align: right; font-size: 13px; }
.feed .end .tiny { color: var(--muted); font-weight: 600; }
.feed .end .tag-late { color: var(--warn); }
.feed .end .tag-on-time { color: var(--brand-dark); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (min-width: 640px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .t-hero, .t-chart, .t-staff, .t-activity, .t-sales, .w2, .w4 { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(4, 1fr); }
  .t-sales { grid-column: 1 / 5; }
  .t-hero { grid-column: 1 / 3; }
  .t-split { grid-column: 3; }
  .t-reports { grid-column: 4; grid-row: span 2; }
  .t-chart { grid-column: 1 / 3; grid-row: span 2; }
  .t-attn { grid-column: 3; }
  .t-links { grid-column: 3; }
  .t-month { grid-column: 4; }
  .t-staff { grid-column: 1 / 3; }
  .t-activity { grid-column: 3 / 5; }
  .w4 { grid-column: span 4; }
  .h2 { grid-row: span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .strip .bar, .seg span, .track span, .area, .line1, .feed li { animation: none; }
}
.strip-foot span { white-space: nowrap; }
.strip-foot .ink { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- CRM page ---------- */
.crm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.crm-head + .bento { margin-top: 0; }
.crm-updated { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .85rem; }
.huge.money { font-size: clamp(30px, 3.2vw, 40px); }
.kv dd.bad { color: var(--bad); }
.pills { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.pills a { border-radius: 999px; padding: 3px 11px; font: 600 11px var(--mono); color: var(--muted); text-decoration: none; }
.pills a.on { background: var(--ink); color: var(--bg); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars-top { display: flex; justify-content: space-between; font-size: 12px; }
.track { height: 6px; border-radius: 999px; background: var(--grey-bg); margin-top: 5px; overflow: hidden; }
.track span { display: block; height: 100%; border-radius: 999px; background: var(--brand); animation: growx .9s cubic-bezier(.22, 1, .36, 1) both; transform-origin: left; }
.track span.bad { background: var(--bad); }
td .track { max-width: 220px; }
.feed .ico.tiny { font-weight: 700; color: var(--muted); }
.feed .grow .tiny { font-weight: 400; }
.tile.slim { gap: 4px; }
.tile.slim .tile-head { margin-bottom: 6px; }
code { font-family: var(--mono); font-size: .9em; background: var(--grey-bg); padding: 1px 5px; border-radius: 5px; }

/* sales strip on the dashboard */
.t-sales { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px 36px; padding: 16px 20px; }
.t-sales .cell .label { margin-bottom: 2px; }
.t-sales .chip { margin-left: auto; }

/* ---------- Accounts page ---------- */
.pos { color: var(--good); }
.neg { color: var(--bad); }
.chip.tint.neg { background: var(--bad-bg); color: var(--bad); }
.seg.tall { height: 44px; margin-top: auto; padding-top: 24px; box-sizing: content-box; }
.legend-list.three { grid-template-columns: 1fr; }
.plain.stack li { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain.stack li:last-child { border-bottom: 0; }
.plain.stack .tiny { margin-top: 3px; line-height: 1.5; }
.kv dt small { display: block; }
.kv .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 600; }
.ln.exp { background: var(--c-late); }
.cols { display: flex; align-items: stretch; gap: 10px; flex: 1; min-height: 240px; margin-top: 18px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.col-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 160px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.col-bars span { width: min(26px, 38%); border-radius: 6px 6px 0 0; animation: grow .9s cubic-bezier(.22, 1, .36, 1) both; transform-origin: bottom; }
.b-sales { background: var(--brand); }
.b-exp { background: var(--c-late); }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
.t-sales .chips { margin-left: auto; display: flex; gap: 6px; }
@media (min-width: 640px) { .legend-list.three { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { .col-bars span { animation: none; } }
.tile p.note { margin-top: 10px; }

/* attendance day view */
.tabs.sub { margin: 0 0 14px; padding: 0; }
small.place { display: inline-block; max-width: 240px; }
table.grid th.daylink a { color: inherit; text-decoration: none; }
table.grid th.daylink a:hover { text-decoration: underline; }
