/* Gully Chaat HQ: owner dashboard. Sidebar on wide screens; bottom tabs on phones and tablets. */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #eceef2; --fg: #1c1b22; --muted: #646271; --line: #dddde4; --grid: #ebebf0;
  --accent: #a3165f; --accent-fg: #ffffff; --accent-soft: #fbe6f0;
  --good: #1f7a45; --good-soft: #def3e6; --warn: #b86e00; --warn-soft: #fff1d6; --bad: #c62828; --bad-soft: #fde7e6;
  --s1: #257de0; --s2: #f47230; --s3: #00b894; --s4: #f2a600; --s5: #ee7fac; --s6: #008a17; --s7: #6a4ce2; --s8: #ec4647;
  --bar: #257de0; --bar-2: #84b9f3;
  --shadow: 0 1px 2px rgba(30,20,40,.05), 0 3px 10px rgba(30,20,40,.05);
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #141318; --surface: #1e1d24; --surface-2: #2a2932; --fg: #f1f0f5; --muted: #a3a1af; --line: #34333d; --grid: #2a2932;
  --accent: #f06bb0; --accent-fg: #1a0b13; --accent-soft: #3a1a2b;
  --good: #5fd68f; --good-soft: #163322; --warn: #ffb84d; --warn-soft: #3a2b12; --bad: #ff7a70; --bad-soft: #3a1c1b;
  --s1: #338ced; --s2: #e76624; --s3: #00a888; --s4: #d28e05; --s5: #e24d8b; --s6: #0aac23; --s7: #9887ef; --s8: #eb6263;
  --bar: #338ced; --bar-2: #1757ac;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #141318; --surface: #1e1d24; --surface-2: #2a2932; --fg: #f1f0f5; --muted: #a3a1af; --line: #34333d; --grid: #2a2932;
  --accent: #f06bb0; --accent-fg: #1a0b13; --accent-soft: #3a1a2b;
  --good: #5fd68f; --good-soft: #163322; --warn: #ffb84d; --warn-soft: #3a2b12; --bad: #ff7a70; --bad-soft: #3a1c1b;
  --s1: #338ced; --s2: #e76624; --s3: #00a888; --s4: #d28e05; --s5: #e24d8b; --s6: #0aac23; --s7: #9887ef; --s8: #eb6263;
  --bar: #338ced; --bar-2: #1757ac;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ic { width: 20px; height: 20px; flex: none; }

/* ---------- Layout: sidebar on wide screens, bottom tabs on phones and tablets ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 12px; gap: 16px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; padding: 4px 12px 6px; }
.logo span { color: var(--accent); }
.nav { display: grid; gap: 3px; }
.nav button { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: none; text-align: left; font-weight: 600; font-size: 1rem; color: var(--muted); }
.nav button:hover { background: var(--surface-2); color: var(--fg); }
.nav button[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.badge { margin-left: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: .72rem; line-height: 1.6; padding: 0 7px; font-weight: 700; }
.side-foot { margin-top: auto; display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.side-link { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px; border: 0; background: none; text-align: left; color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none; border-radius: 12px; }
.side-link .ic { width: 18px; height: 18px; }
.side-link:hover { background: var(--surface-2); color: var(--fg); }
.main { min-width: 0; display: flex; flex-direction: column; }
.bar { display: flex; align-items: center; gap: 12px; padding: 22px 28px 4px; }
.bar-t { margin-right: auto; min-width: 0; }
.bar h1 { font-family: var(--display); font-size: 2rem; margin: 0; line-height: 1.1; }
.page-sub { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.more-btn { display: none; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.more-btn svg { width: 18px; height: 18px; }
.view { padding: 16px 28px 60px; display: grid; gap: 16px; align-content: start; max-width: 1080px; width: 100%; }
.tabs { display: none; }

@media (max-width: 999px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .more-btn { display: inline-flex; }
  .bar { padding: 16px 16px 2px; padding-top: max(16px, env(safe-area-inset-top)); }
  .bar h1 { font-size: 1.6rem; }
  .page-sub { font-size: .9rem; }
  .view { padding: 12px 16px calc(96px + env(safe-area-inset-bottom)); margin: 0 auto; }
  .tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0,0,0,.05); }
  .tabs button { position: relative; display: grid; justify-items: center; gap: 2px; min-height: 56px; padding: 6px 2px 4px; border: 0; background: none; border-radius: 12px; color: var(--muted); font-size: .74rem; font-weight: 700; }
  .tabs button .ic { width: 24px; height: 24px; }
  .tabs button[aria-current="page"] { color: var(--accent); }
  .tabs button[aria-current="page"] .ic { background: var(--accent-soft); border-radius: 99px; padding: 2px 12px; width: 48px; box-sizing: content-box; height: 22px; margin: -2px 0 0; }
  .tabs .badge { position: absolute; top: 2px; left: calc(50% + 8px); margin: 0; }
}
@media (min-width: 600px) and (max-width: 999px) { .view { max-width: 820px; padding-left: 24px; padding-right: 24px; } .bar { padding-left: 24px; padding-right: 24px; max-width: 820px; margin: 0 auto; width: 100%; } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card > h2, .card-h h2 { font-size: 1.12rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sub { color: var(--muted); font-size: .88rem; }
h3.sm { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }
.card-h + h3.sm { margin-top: 4px; }
.two { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
@media (max-width: 420px) { .card { padding: 16px; border-radius: 16px; } .two { grid-template-columns: 1fr; } }
.link { all: unset; cursor: pointer; color: var(--accent); font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: 2px; }
.link .ic { width: 16px; height: 16px; }
.link.inline { font-size: inherit; }
.link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Big action buttons on Home */
.bigs { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.big { display: flex; align-items: center; gap: 14px; text-align: left; min-height: 84px; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.big .ic { width: 26px; height: 26px; padding: 10px; box-sizing: content-box; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.big:first-child { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.big:first-child .ic { background: color-mix(in srgb, var(--accent-fg) 18%, transparent); color: var(--accent-fg); }
.big:first-child small { color: color-mix(in srgb, var(--accent-fg) 80%, transparent); }
.big b { display: block; font-size: 1.08rem; }
.big small { display: block; color: var(--muted); font-size: .86rem; font-weight: 500; }
.big:hover { filter: brightness(.98); }
@media (max-width: 760px) {
  .bigs { grid-template-columns: 1fr 1fr; }
  .big:first-child { grid-column: 1 / -1; min-height: 76px; }
  .big:not(:first-child) { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; padding: 14px; }
  .big:not(:first-child) .ic { width: 22px; height: 22px; padding: 8px; }
  .big:not(:first-child) b { font-size: 1rem; }
}

/* Number tiles */
.tiles, .trio { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; display: grid; gap: 2px; align-content: start; }
.trio .tile { box-shadow: none; background: var(--bg); border: 0; }
.tile .k { color: var(--muted); font-size: .88rem; font-weight: 600; }
.tile .v { font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.tile .d { font-size: .82rem; color: var(--muted); }
.tile .up { color: var(--good); font-weight: 700; } .tile .down { color: var(--bad); font-weight: 700; }
.tile.good .v { color: var(--good); } .tile.bad .v { color: var(--bad); } .tile.warn .v { color: var(--warn); }
.trio.small .tile .v { font-size: 1.2rem; }
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles .tile:first-child { grid-column: 1 / -1; }
  .tile .v { font-size: 1.45rem; }
  .tiles .tile:first-child .v { font-size: 1.9rem; }
  .trio { grid-template-columns: 1fr 1fr; }
  .trio .tile:last-child { grid-column: 1 / -1; }
  .trio.small { grid-template-columns: repeat(3, 1fr); } .trio.small .tile:last-child { grid-column: auto; }
}

/* Date choice */
.rangebar { display: grid; gap: 8px; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: none; font-weight: 700; font-size: .92rem; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.range-sel { display: none; }
@media (max-width: 600px) {
  .seg { display: none; }
  .range-sel { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 0 0 14px; box-shadow: var(--shadow); }
  .range-sel span { color: var(--muted); font-weight: 600; font-size: .92rem; }
  .range-sel select { flex: 1; min-height: 50px; border: 0; background: none; font-weight: 700; font-size: 1.05rem; padding: 0 10px; }
}
.custom { display: flex; gap: 10px; flex-wrap: wrap; }
.custom label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--muted); flex: 1 1 160px; }
.custom input { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; }

/* Column chart (divs) */
.cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(1px, .5vw, 5px); align-items: end; height: 150px; border-bottom: 1px solid var(--line); }
.colw { height: 100%; display: flex; align-items: flex-end; cursor: default; }
.col { width: 100%; background: var(--bar); border-radius: 4px 4px 0 0; min-height: 0; }
.col.now { background: var(--accent); }
.colw:hover .col { filter: brightness(1.12); }
.cols-x { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; margin-top: 6px; }
.cols-x.all span { flex: 1; text-align: center; }
.tip { position: fixed; z-index: 70; pointer-events: none; background: var(--fg); color: var(--bg); padding: 8px 10px; border-radius: 10px; font-size: .84rem; line-height: 1.4; max-width: 240px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.tip .row { display: flex; gap: 12px; justify-content: space-between; } .tip .row span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Horizontal bars */
.hbars { display: grid; gap: 4px; }
.hbar { display: grid; gap: 6px; padding: 8px 0; text-align: left; border: 0; background: none; width: 100%; border-radius: 10px; }
button.hbar { padding: 8px 8px; margin: 0 -8px; width: calc(100% + 16px); }
button.hbar:hover { background: var(--surface-2); }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.lbl-t { font-weight: 600; }
.lbl-s { color: var(--muted); font-size: .82rem; margin-left: 8px; }
.lbl-s.bad { color: var(--bad); font-weight: 700; }
.hbar .track { position: relative; height: 10px; background: var(--surface-2); border-radius: 99px; }
.hbar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--bar); min-width: 4px; }
.hbar .fill.over { background: var(--bad); }
.hbar .mark { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--fg); border-radius: 2px; }
.hbar .val { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.hbar .val small { color: var(--muted); font-weight: 500; margin-left: 6px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li + li { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 8px; margin: 0; border: 0; background: none; text-align: left; border-radius: 10px; }
.list:not(.plain) .li { cursor: pointer; }
button.li:not(:disabled):hover { background: var(--surface-2); }
button.li:disabled { cursor: default; opacity: 1; color: inherit; }
.list.plain .li { padding-left: 0; padding-right: 0; }
.li .dot, .dot { width: 10px; height: 10px; border-radius: 99px; flex: none; }
.li .l { flex: 1; min-width: 0; display: grid; gap: 1px; }
.li .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.li .s { color: var(--muted); font-size: .86rem; }
.li .s b { color: var(--fg); }
.li .r { display: grid; justify-items: end; gap: 3px; text-align: right; flex: none; max-width: 50%; }
.li .r .a { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.li .r.set { display: flex; align-items: center; gap: 6px; }
.muted-i { font-style: italic; }
.mini { list-style: none; margin: 0; padding: 0; display: grid; }
.mini li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .94rem; align-items: baseline; }
.mini li:first-child { border-top: 0; }
.mini .r { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini .r b { color: var(--fg); }
.empty-s { color: var(--muted); font-size: .95rem; padding: 4px 0; margin: 0; }
.allgood { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--good); font-weight: 700; }
.allgood .ic { background: var(--good-soft); border-radius: 99px; padding: 6px; box-sizing: content-box; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: .76rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.bad, .pill.low { background: var(--bad-soft); color: var(--bad); }
.pill.warn, .pill.medium { background: var(--warn-soft); color: var(--warn); }
.pill.good, .pill.high { background: var(--good-soft); color: var(--good); }
.more-btn-l { width: 100%; justify-content: center; margin-top: 10px; }

/* To-do list on Home */
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); border-left: 4px solid var(--accent); }
.todo li.warn { border-left-color: var(--bad); }
.todo .l { flex: 1; min-width: 0; display: grid; gap: 2px; }
.todo .s { color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; }
.todo .btn { flex: none; }

/* Buttons and inputs */
.btn { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--fg); white-space: nowrap; }
.btn .ic { width: 18px; height: 18px; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.danger-t { color: var(--bad); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.big-btn { min-height: 52px; font-size: 1.05rem; padding: 0 24px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.row-btns.center { justify-content: center; }
@media (max-width: 520px) { .row-btns .btn { flex: 1 1 100%; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.in, .toolbar input { min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 0 14px; }
.toolbar input[type="search"] { flex: 1 1 220px; min-width: 0; }
.foot-link { text-align: center; font-size: .9rem; color: var(--muted); margin: 0; }
details.fold > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.fold > summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); }
details.fold[open] > summary::after { content: "–"; }
details.fold[open] > summary { margin-bottom: 10px; }
details.fold > summary::-webkit-details-marker { display: none; }

/* Welcome */
.welcome h2 { font-family: var(--display); font-size: 1.5rem; }
.welcome p { color: var(--muted); margin: 6px 0 14px; }
.how-steps { margin: 0 0 14px; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.how-steps li { counter-increment: s; position: relative; padding-left: 40px; min-height: 28px; padding-top: 2px; }
.how-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; font-size: .9rem; }

/* ---------- Sheets (forms) ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10,8,14,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overscroll-behavior: contain; }
@media (max-width: 640px) { .scrim { padding: 0; align-items: flex-end; } .sheet { border-radius: 20px 20px 0 0; max-height: 94vh; padding-bottom: env(safe-area-inset-bottom); } }
.sheet-h { position: sticky; top: 0; z-index: 2; background: var(--bg); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.sheet-h h2 { font-family: var(--display); font-size: 1.45rem; margin: 0; line-height: 1.15; }
.x { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 0; background: var(--surface-2); font-size: 1.4rem; }
.form { display: grid; gap: 16px; padding: 18px 20px 20px; }
.form .row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: start; }
.f { display: grid; gap: 6px; min-width: 0; }
.f > label, .f > .lab { font-size: .95rem; font-weight: 700; color: var(--fg); }
.f .opt { font-weight: 500; color: var(--muted); }
.f input, .f select, .f textarea { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; font-size: 1rem; }
.f textarea { padding: 10px 14px; min-height: 80px; resize: vertical; }
.f input.big-in { min-height: 56px; font-size: 1.35rem; font-weight: 700; }
.hint { font-size: .85rem; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; flex-wrap: wrap; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.check .hint { font-weight: 500; }
details.more { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: var(--surface); }
details.more > summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 700; color: var(--accent); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; width: 22px; font-size: 1.2rem; }
details.more[open] > summary::before { content: "–"; }
details.more[open] { padding-bottom: 14px; display: grid; gap: 14px; }
details.more[open] > summary { margin-bottom: -4px; }
.pick { display: flex; gap: 8px; flex-wrap: wrap; }
.pick button { min-height: 46px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; }
.pick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.form .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 16px; }
.form .actions .left { margin-right: auto; }
@media (max-width: 520px) { .form .actions .btn.primary { flex: 1; } }
.err { color: var(--bad); font-weight: 600; font-size: .92rem; }
.calc { background: var(--surface); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.calc span { color: var(--muted); font-weight: 600; } .calc b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.menu { display: grid; padding: 8px 12px 16px; }
.menu-i { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 10px; border: 0; background: none; border-radius: 12px; font-weight: 600; font-size: 1.05rem; text-decoration: none; color: var(--fg); text-align: left; }
.menu-i + .menu-i { border-top: 1px solid var(--line); border-radius: 0; }
.menu-i .ic { color: var(--muted); }

/* ---------- Upload ---------- */
.stepn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; background: var(--accent); color: var(--accent-fg); font-size: .9rem; font-weight: 800; flex: none; }
.sources { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.source { text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; border-left: 6px solid var(--sw, var(--line)); min-height: 72px; }
.source[aria-pressed="true"] { border-color: var(--accent); border-left-color: var(--sw, var(--accent)); background: var(--accent-soft); }
.source b { font-size: 1rem; } .source span { color: var(--muted); font-size: .86rem; }
@media (max-width: 520px) { .sources { grid-template-columns: 1fr; } .source { min-height: 0; } }
.dropzone { border: 2px dashed var(--line); border-radius: 16px; padding: 26px 16px; text-align: center; background: var(--bg); display: grid; gap: 6px; justify-items: center; cursor: pointer; }
.dropzone .ic { width: 30px; height: 30px; color: var(--accent); }
.dropzone b { font-size: 1.05rem; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.found { font-size: 1.02rem; margin: 0 0 10px; background: var(--good-soft); padding: 12px 14px; border-radius: 12px; }
.warnbox { margin: 0 0 10px; background: var(--warn-soft); padding: 12px 14px; border-radius: 12px; }
.map { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.done { text-align: center; padding: 30px 20px; }
.done-ic .ic { width: 34px; height: 34px; padding: 12px; box-sizing: content-box; border-radius: 99px; background: var(--good-soft); color: var(--good); }
.done h2 { justify-content: center; font-family: var(--display); font-size: 1.6rem; margin-top: 10px; }
.done p { color: var(--muted); }

/* ---------- Settings ---------- */
.money-in { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 0 10px; min-height: 42px; }
.money-in span { color: var(--muted); font-weight: 600; }
.money-in input { border: 0; background: none; width: 6.5em; min-height: 40px; text-align: right; font-variant-numeric: tabular-nums; outline: none; }
.money-in.pctin input { width: 3em; }
.money-in:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }
.addrow { display: flex; gap: 8px; margin-top: 12px; }
.addrow .in { flex: 1; min-width: 0; }
.toggle { width: 52px; height: 32px; border-radius: 99px; border: 0; background: var(--line); position: relative; flex: none; padding: 0; }
.toggle span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 99px; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.toggle[aria-checked="true"] { background: var(--good); }
.toggle[aria-checked="true"] span { left: 23px; }
.btn.wrap { white-space: normal; text-align: left; padding-top: 8px; padding-bottom: 8px; }
.settings-l .li { flex-wrap: wrap; }
.settings-l .li .l { flex: 1 1 120px; }
.settings-l .li .r.set { max-width: none; margin-left: auto; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 60; background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; max-width: calc(100% - 32px); display: flex; gap: 14px; align-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
@media (max-width: 999px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }
.toast button { background: transparent; border: 0; color: var(--accent); font-weight: 800; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.gate h1 { font-family: var(--display); font-size: 2rem; margin: 0 0 8px; }
.gate h1 span { color: var(--accent); }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.chosen { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }

/* ---------- AI helper ---------- */
.bigs.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 999px) { .bigs.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .bigs.four .big:first-child { grid-column: auto; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; padding: 14px; }
  .bigs.four .big:first-child .ic { width: 22px; height: 22px; padding: 8px; }
  .bigs.four .big:first-child b { font-size: 1rem; }
}
.askbar { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 99px; padding: 5px 5px 5px 14px; box-shadow: var(--shadow); min-width: 0; }
.askbar:focus-within { border-color: var(--accent); }
.askbar input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1rem; color: var(--fg); min-height: 42px; padding: 0 4px; outline: none; }
.askbar input::placeholder { color: var(--muted); }
.ask-ic { color: var(--accent); display: inline-flex; flex: none; }
.ask-ic .ic { width: 22px; height: 22px; }
.ask-mic, .ask-go { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 99px; border: 0; background: var(--surface-2); color: var(--fg); cursor: pointer; }
.ask-go { background: var(--accent); color: var(--accent-fg); }
.ask-mic .ic, .ask-go .ic { width: 20px; height: 20px; }
.ask-mic.on { background: var(--bad); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--bad) 25%, transparent); } }
.ask-eg { font-size: .86rem; color: var(--muted); margin: 8px 4px 14px; line-height: 1.6; }
.ask-eg .link { font-size: .86rem; font-weight: 600; }
.askbar.in-sheet { position: sticky; bottom: 0; margin-top: 12px; }
.chatwrap { padding: 16px 20px 20px; }
.chat { display: grid; gap: 10px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; font-size: .97rem; overflow-wrap: anywhere; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin-bottom: 0; }
.msg ul { margin: 4px 0 6px; padding-left: 20px; }
.msg.me { justify-self: end; background: var(--accent); color: var(--accent-fg); border-bottom-right-radius: 6px; }
.msg.ai { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.ai .btn { margin-top: 8px; display: flex; width: 100%; justify-content: center; white-space: normal; text-align: center; }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--muted); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ai-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--fg); font-size: .92rem; line-height: 1.45; }
.ai-note .ic { flex: none; color: var(--accent); width: 20px; height: 20px; margin-top: 1px; }
.photo-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; border-radius: 14px; border: 1.5px dashed var(--accent); background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.photo-btn .ic { width: 22px; height: 22px; }
.busy { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 36px 20px 40px; }
.busy p { margin: 0; font-weight: 600; } .busy .hint { font-weight: 400; }
.busy.small { justify-items: start; grid-template-columns: auto 1fr; align-items: center; padding: 4px 0; gap: 12px; }
.spin { width: 34px; height: 34px; border-radius: 99px; border: 3.5px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.busy.small .spin { width: 22px; height: 22px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin, .dots i, .ask-mic.on { animation-duration: 3s; } }
.how-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; line-height: 1.45; }
.inv-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inv-lines > li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; }
.inv-top { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; align-items: baseline; }
.inv-lines .row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .inv-lines .row { grid-template-columns: 1fr 1fr; } .inv-lines .row .f:first-child { grid-column: 1 / -1; } }
.weekly .card-h h2 .ic, .card-h h2 .ic { color: var(--accent); }
.wk-head { font-size: 1.05rem; font-weight: 700; margin: 0 0 10px; line-height: 1.4; }
.wk-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wk-points li { padding: 8px 12px; border-radius: 12px; background: var(--bg); border-left: 4px solid var(--line); line-height: 1.4; font-size: .95rem; }
.wk-points li.good { border-left-color: var(--good); }
.wk-points li.bad { border-left-color: var(--bad); }
.wk-points li.neutral { border-left-color: var(--accent); }
.promo { background: var(--accent-soft); border-color: transparent; }
.promo-in { display: flex; gap: 14px; align-items: center; }
.promo-in > .ic { flex: none; width: 26px; height: 26px; color: var(--accent); }
.promo-in p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.promo-in > div { flex: 1; min-width: 0; }
.promo-in .btn { flex: none; }
@media (max-width: 520px) { .promo-in { flex-wrap: wrap; } .promo-in .btn { width: 100%; justify-content: center; } }
.ai-tag { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; font-weight: 800; letter-spacing: .03em; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.photo-btn > span { display: grid; text-align: left; gap: 1px; }
.photo-btn small { font-weight: 500; color: var(--muted); font-size: .84rem; }
.ai-tag .ic { width: 11px; height: 11px; }

/* ---------- stores & invoices ---------- */
.store-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: 0 0 6px -2px; padding: 0 10px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: .92rem; color: var(--fg); max-width: 100%; }
.store-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-btn .ic { width: 18px; height: 18px; color: var(--accent); flex: none; }
.store-btn .chev { width: 16px; height: 16px; color: var(--muted); }
.store-btn:hover { border-color: var(--accent); }
.menu-i[aria-current="true"] { color: var(--accent); }
.menu-i .ic.on { margin-left: auto; color: var(--accent); }
.menu-i small { font-weight: 500; }
.warn-t { color: var(--warn); font-weight: 600; }
.center-t { text-align: center; }
.addrow select { min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 0 10px; flex: none; }
@media (max-width: 520px) { .addrow { flex-wrap: wrap; } .addrow .in { flex: 1 1 100%; } .addrow select { flex: 1; } }
.logo-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-prev { width: 150px; height: 64px; border-radius: 12px; border: 1px dashed var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-pick .btn { cursor: pointer; }
/* invoice lines: description on top; qty, unit, price and line total underneath */
.inv-line { display: grid; gap: 8px; align-items: center; grid-template-columns: 70px minmax(76px, 1fr) minmax(84px, 1fr) minmax(64px, auto); grid-template-areas: "d d d x" "q u p a"; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.inv-line + .inv-line { margin-top: 8px; }
.f .inv-line input, .f .inv-line select { padding: 0 10px; }
.inv-line .d { grid-area: d; } .inv-line .q { grid-area: q; } .inv-line .u { grid-area: u; } .inv-line .p { grid-area: p; }
.inv-line .x { grid-area: x; justify-self: end; }
.inv-line .q, .inv-line .p { text-align: right; }
.inv-line .a { grid-area: a; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 400px) { .inv-line { grid-template-columns: 58px minmax(70px, 1fr) minmax(70px, 1fr); grid-template-areas: "d d x" "q u p" "a a a"; } }
.sheet-pad { padding: 8px 20px 20px; }
.menu-i .k { font-weight: 500; color: var(--muted); font-size: .9rem; }
/* units */
.wrap-row { flex-wrap: wrap; }
.wrap-row .in { flex: 2 1 180px; }
.wrap-row .eq { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); }
.wrap-row .in.num { width: 76px; flex: none; }
.eq-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.f .eq-row input { width: 90px; } .f .eq-row select { width: auto; flex: 1; min-width: 120px; }
.conv { margin: 4px 0 0; color: var(--good); font-weight: 600; }
/* invoice preview: a sheet of white paper, like the PDF */
.paper { background: #fff; color: #1f1a1c; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.08); padding: 22px 20px; font-size: .86rem; line-height: 1.45; color-scheme: light; }
.paper h3 { margin: 0 0 6px; font: 800 1.5rem var(--body); text-align: right; letter-spacing: .01em; }
.paper h4 { margin: 14px 0 4px; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: #a3165f; }
.paper p { margin: 0; }
.pp-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pp-logo img { max-width: 140px; max-height: 60px; object-fit: contain; display: block; }
.pp-logo b { font-size: 1.3rem; color: #a3165f; }
.pp-meta dl { display: grid; grid-template-columns: auto auto; gap: 2px 12px; margin: 0; font-size: .78rem; }
.pp-meta dt { color: #6b6266; text-align: right; } .pp-meta dd { margin: 0; font-weight: 700; text-align: right; }
.pp-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.pp-parties > div { display: grid; align-content: start; }
.pp-parties h4 { margin-top: 0; }
.pp-parties .m { color: #6b6266; }
.pp-missing { color: #c62828; font-style: italic; }
.pp-lines { width: 100%; border-collapse: collapse; margin-top: 16px; font-variant-numeric: tabular-nums; }
.pp-lines th { background: #f6eef2; font-size: .72rem; text-align: right; padding: 7px 8px; }
.pp-lines td { padding: 8px; border-bottom: 1px solid #e6dfe2; text-align: right; vertical-align: top; white-space: nowrap; }
.pp-lines th:first-child, .pp-lines td:first-child { text-align: left; white-space: normal; }
.pp-tot { margin: 10px 0 0 auto; max-width: 260px; display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.pp-tot > div { display: flex; justify-content: space-between; gap: 12px; color: #6b6266; }
.pp-tot .t { color: #1f1a1c; font-weight: 800; font-size: 1rem; border-top: 1px solid #e6dfe2; padding-top: 6px; }
.pp-tot .due { background: #f6eef2; color: #1f1a1c; font-weight: 800; padding: 7px 8px; border-radius: 4px; margin-top: 4px; }
.pp-tot .due span:last-child { color: #a3165f; }
.pp-tot .due.paid { background: #e7f4ec; } .pp-tot .due.paid span:last-child { color: #1f7a46; }
.pp-thanks { text-align: center; color: #6b6266; margin-top: 18px !important; }
@media (max-width: 420px) { .paper { padding: 16px 12px; font-size: .8rem; } .pp-parties { grid-template-columns: 1fr; } .pp-lines td, .pp-lines th { padding: 6px 4px; } }
.mini li.big-t { font-size: 1.1rem; }
.inv-tot { background: var(--surface); border-radius: 14px; padding: 4px 14px; }
.paybox { background: var(--surface); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.paybox .row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.paybox .btn { width: 100%; }

/* email invoices */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps > li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
.steps .n { width: 30px; height: 30px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
.steps .ok .n { background: var(--good-soft); color: var(--good); }
.steps .n .ic { width: 16px; height: 16px; }
.steps .step-t { display: block; margin: 4px 0; }
.step-b > form, .step-b > .row-btns, .step-b > ul, .step-b > p { margin-top: 10px; }
.step-b > p { margin-bottom: 0; }
.form.tight { gap: 10px; }
.dns { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.dns > li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; background: var(--surface); }
.dns-h { display: flex; gap: 8px; align-items: center; }
.dns-f { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.dns-f .k { color: var(--muted); font-size: .82rem; }
.dns-f code, .hint code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; background: var(--surface-2); padding: 4px 6px; border-radius: 6px; overflow-wrap: anywhere; word-break: break-all; }
.dns-f .btn { min-height: 34px; padding: 0 8px; }
@media (max-width: 520px) { .dns-f { grid-template-columns: minmax(0, 1fr) auto; } .dns-f .k { grid-column: 1 / -1; } }
.attach { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.attach > span { flex: 1; }
.note-b { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--good-soft); color: var(--good); font-weight: 600; font-size: .92rem; }
.sent-l { display: flex; gap: 6px; align-items: center; margin: 8px 0 0; color: var(--good); font-weight: 600; font-size: .92rem; }
.sent-l .ic { width: 16px; height: 16px; }
.chip .k { opacity: .6; font-weight: 600; margin-left: 2px; }
.biz-f { display: grid; gap: 14px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.biz-f[hidden] { display: none; }

/* inbox */
.mail .li { align-items: flex-start; }
.mail .mdot { width: 9px; height: 9px; border-radius: 99px; margin-top: 7px; flex: none; background: transparent; }
.mail .unread .mdot { background: var(--accent); }
.mail .unread .t { font-weight: 800; }
.mail .s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mail .r { align-items: flex-end; gap: 4px; }
.msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.msgs > li { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); display: grid; gap: 8px; max-width: 92%; }
.msgs > li.out { justify-self: end; background: var(--accent-soft); border-color: transparent; }
.msgs .mh { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--muted); flex-wrap: wrap; }
.msgs .mh b { color: var(--ink, inherit); }
.msgs .mb { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.msgs .q summary { cursor: pointer; color: var(--muted); font-size: .86rem; }
.msgs .q .mb { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; }
.atts .attach { text-decoration: none; color: inherit; padding: 6px 10px; }
.more-btn { position: relative; }
.more-btn.dot-badge::after { content: ""; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 99px; background: var(--bad); }

/* ---------- Team: schedule, people, pay ---------- */
.tseg { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.tseg::-webkit-scrollbar { display: none; }
.tseg button { flex: 1 0 auto; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: none; font-weight: 700; font-size: .95rem; color: var(--muted); white-space: nowrap; }
.tseg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); }
.weeknav b { display: grid; text-align: center; font-size: 1.05rem; line-height: 1.2; }
.weeknav small { font-weight: 500; color: var(--muted); font-size: .85rem; }
.weeknav .btn { min-width: 48px; font-size: 1.3rem; }
.days { display: grid; gap: 14px; }
.day { border-top: 1px solid var(--line); padding-top: 10px; }
.day:first-child { border-top: 0; padding-top: 0; }
.day.is-today .day-h b { color: var(--accent); }
.day-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.day-h .link { display: inline-flex; align-items: center; gap: 4px; }
.day-h .ic { width: 16px; height: 16px; }
.day .empty-s { margin: 2px 0 0; }
.tset { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 14px; margin: 0; min-width: 0; }
.tset legend { font-weight: 700; padding: 0 6px; display: flex; gap: 12px; align-items: center; }
.tset legend .link { font-weight: 600; }
.paidbox { display: flex; align-items: center; gap: 12px; background: var(--good-soft); color: var(--fg); border-radius: 14px; padding: 12px 14px; }
.paidbox > .ic { color: var(--good); width: 26px; height: 26px; }
.paidbox span { display: grid; flex: 1; }
.paidbox small { color: var(--muted); }
.paybar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.paybar .f { flex: 0 1 200px; }
.paybar .btn { margin-left: auto; }
@media (max-width: 520px) { .paybar .f, .paybar .btn { flex: 1 1 100%; margin-left: 0; } }
.team-now .card-h h2 { display: flex; align-items: center; gap: 8px; }

/* phones: bigger taps, one swipeable row of tabs and filters */
html { -webkit-tap-highlight-color: transparent; }
@media (pointer: coarse), (max-width: 700px) {
  .chip { min-height: 44px; }
  .link.inline { display: inline-flex; align-items: center; min-height: 40px; }
}
@media (max-width: 700px) {
  .chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chips.scroll-x::-webkit-scrollbar { display: none; }
  .chips.scroll-x > * { flex: none; white-space: nowrap; }
}
