/* ORVEXIA Grooming Hub — colores del logo oficial: verde esmeralda, dorado y marfil */
:root {
  --emerald-900: #072a1d; --emerald-800: #0b3d2a; --emerald-700: #0f5a3d; --emerald-600: #137049; --emerald-100: #e3f1e9;
  --gold: #c9a24b; --gold-light: #ecd28b; --gold-dark: #9a7425;
  --ivory: #fbf8f1; --paper: #ffffff; --ink: #14201a; --muted: #5d6b63; --line: #e4ddcc;
  --ok: #1a8a55; --warn: #b7791f; --bad: #c0392b;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Figtree", -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
dialog { overflow-x: hidden; }
html, body { height: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 16px/1.5 var(--body); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-family: var(--display); font-size: 1.45rem; color: var(--emerald-800); letter-spacing: .02em; }
h2 { font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Pantalla de entrada */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); background: radial-gradient(120% 80% at 50% 0%, #fff 0%, var(--ivory) 60%, #efe6cf 100%); }
.login-card { width: min(420px, 100%); display: grid; gap: 18px; justify-items: center; text-align: center; }
.login-card img { width: min(300px, 80vw); height: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; text-decoration: none; }
.btn.block { width: 100%; }
.btn.pri { background: var(--emerald-700); border-color: var(--emerald-700); color: #fff; }
.btn.pri:hover { background: var(--emerald-600); }
.btn.gold { background: linear-gradient(180deg, var(--gold-light), var(--gold)); border-color: var(--gold-dark); color: var(--emerald-900); }
.btn.danger { color: var(--bad); border-color: #e9c4bf; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; }
.legal { font-size: .78rem; color: var(--muted); max-width: 36ch; }
.legal a { color: var(--emerald-700); }

/* Armazón */
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); background: var(--emerald-800); color: #fff; border-bottom: 3px solid var(--gold); }
.top img { width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.top .t { display: grid; line-height: 1.15; } .top b { font-family: var(--display); letter-spacing: .04em; } .top small { color: var(--gold-light); font-size: .78rem; }
main { padding: 16px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); display: grid; gap: 16px; align-content: start; max-width: 900px; width: 100%; margin: 0 auto; }
.tabs { position: sticky; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 4px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #0b3d2a, #072a1d); border-top: 2px solid var(--gold); }
.tabs button { border: 1px solid transparent; background: none; border-radius: 12px; padding: 4px 2px 5px; display: grid; justify-items: center; gap: 1px; font-size: .74rem; font-weight: 700; color: #e9dcb4; min-width: 0; }
.tabs button img { width: 32px; height: 32px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); }
.tabs button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabs button[aria-current="page"] { color: #fff; background: linear-gradient(180deg, #15a065, #0b6b43); border-color: var(--gold); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
/* Botones dorados como en el diseño */
.btn.pri { background: linear-gradient(180deg, #f3dc94, #c9a24b 55%, #a8802f); border-color: #8e6b22; color: #0b3d2a; box-shadow: 0 2px 6px rgba(120,90,20,.35), inset 0 1px 0 rgba(255,255,255,.55); text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.btn.pri:hover { background: linear-gradient(180deg, #f7e4a6, #d1ab55 55%, #ad8533); }
.daynav button.btn[aria-pressed="true"] { background: linear-gradient(180deg, #f3dc94, #c9a24b); border-color: #8e6b22; color: #0b3d2a; }
h1 { text-transform: uppercase; letter-spacing: .04em; }
.dtitle { text-transform: uppercase; letter-spacing: .03em; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.row-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.list { display: grid; }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.ava { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--emerald-700); border: 2px solid var(--gold); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--emerald-100); color: var(--emerald-700); }
.chip.off { background: #f1ede3; color: var(--muted); }
.chip.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(26,138,85,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 8px rgba(26,138,85,0); } }
.pets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pet-tag { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; padding: 2px 8px; border-radius: 8px; background: #f6f1e4; border: 1px solid var(--line); }
.empty { text-align: center; padding: 24px 8px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }

/* Formularios */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(7,42,29,.35); }
dialog::backdrop { background: rgba(7, 42, 29, .55); }
.dlg { padding: 20px; display: grid; gap: 14px; }
.dlg-h { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.x { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); }
.f { display: grid; gap: 6px; position: relative; } .f label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.f input, .f select, .f textarea { min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; width: 100%; }
.fr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sizes button { min-height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; }
.sizes button[aria-pressed="true"] { background: var(--emerald-700); color: #fff; border-color: var(--emerald-700); }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.err { color: var(--bad); font-size: .85rem; }

/* Buscador de razas */
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(7,42,29,.18); max-height: 260px; overflow: auto; }
.combo-list li { padding: 10px 12px; border-radius: 8px; display: flex; justify-content: space-between; gap: 8px; cursor: pointer; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--emerald-100); }
.combo-list li.add { color: var(--emerald-700); font-weight: 700; border-top: 1px dashed var(--line); }
.combo-list li small { color: var(--muted); }
.combo-list mark { background: #f5e6b8; color: inherit; border-radius: 3px; }

/* Furgonetas */
#map { height: 340px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.van-pin { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 3px solid var(--gold); box-shadow: 0 4px 10px rgba(0,0,0,.35); font-size: 18px; }
.van-pin.off { filter: grayscale(1); opacity: .6; }
.driver { background: linear-gradient(135deg, var(--emerald-800), var(--emerald-700)); color: #fff; border: 0; }
.driver .muted { color: #cfe3d8; }
.driver select { background: #fff; color: var(--ink); }
.sharing { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid var(--gold); }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; }


/* Agenda */
.daynav { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.daynav input { min-height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; width: 100%; }
.daynav [aria-pressed="true"] { background: var(--emerald-100); border-color: var(--emerald-600); color: var(--emerald-700); }
.dayhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.dtitle::first-letter { text-transform: uppercase; }
.dtitle { font-family: var(--display); color: var(--emerald-800); }
.kpis { display: flex; gap: 6px; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.filters button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .88rem; }
.filters button[aria-pressed="true"] { background: var(--emerald-700); color: #fff; border-color: var(--emerald-700); }
.filters i, .who i, .gh i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.appt { width: 100%; text-align: left; display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 10px; border: 0; border-bottom: 1px solid var(--line); background: none; border-left: 4px solid transparent; }
.appt:last-child { border-bottom: 0; }
.appt:hover { background: #fbf8f0; }
.when { display: grid; line-height: 1.2; white-space: nowrap; } .when small { color: var(--muted); font-size: .78rem; }
.what { display: grid; gap: 2px; min-width: 0; } .what > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.what small { color: var(--muted); font-size: .82rem; font-weight: 400; }
.who { display: inline-flex !important; align-items: center; gap: 6px; }
.tail { display: grid; justify-items: end; gap: 4px; }
.chip.st-booked { background: #eef1ff; color: #3949ab; } .chip.st-confirmed { background: var(--emerald-100); color: var(--emerald-700); }
.chip.st-in { background: #fff4d6; color: #8a5a00; } .chip.st-work { background: #ffe8d6; color: #a64b00; }
.chip.st-ready { background: #dff5e9; color: #0d6b3d; } .chip.st-paid { background: #e9e4d4; color: #5b4a1a; } .chip.st-off { background: #f1ede3; color: var(--muted); text-decoration: line-through; }
.appt.st-off { opacity: .6; } .appt.st-work { border-left-color: #e07a1f; } .appt.st-ready { border-left-color: var(--ok); } .appt.st-in { border-left-color: var(--gold); }
.agenda-grid { display: none; }
.picked { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--emerald-100); }
fieldset.addons { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 0; }
fieldset.addons legend { font-size: .85rem; font-weight: 600; color: var(--muted); padding: 0 4px; }
fieldset.addons label { display: flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 500; color: var(--ink); font-size: .95rem; }
fieldset.addons small { color: var(--muted); margin-left: auto; }
.loy { padding: 10px 12px; border-radius: 12px; background: #fbf3dc; border: 1px solid var(--gold); }
.warn { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fff4e0; color: #7a4b00; font-size: .88rem; }
.summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 12px; background: #f6f1e4; font-size: .92rem; }
.summary b { color: var(--emerald-800); }
.kv { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px 12px; font-size: .95rem; } .kv span { color: var(--muted); }
details.more { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; } details.more summary { cursor: pointer; font-weight: 600; } details.more[open] { display: grid; gap: 10px; }
.f input[type="checkbox"] { width: auto; min-height: 0; }
.switch input { width: 22px; height: 22px; accent-color: var(--emerald-700); flex: none; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stats > div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; }
.stats small { color: var(--muted); font-size: .78rem; } .stats b { font-size: 1.15rem; }
.stats .hl { background: var(--emerald-800); color: #fff; border-color: var(--gold); } .stats .hl small { color: var(--gold-light); }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpis.wrap { flex-wrap: wrap; }
.lines { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: #fbf8f0; border: 1px solid var(--line); }
.lines > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mini { width: 110px !important; min-height: 38px !important; padding: 6px 10px !important; border: 1px solid var(--line); border-radius: 10px; text-align: right; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 6px; } .seg.wrap { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.seg button { min-width: 0; min-height: 42px; padding: 0 6px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--emerald-700); color: #fff; border-color: var(--emerald-700); }
.summary.big { font-size: 1.05rem; } .summary.big b { font-size: 1.3rem; }

/* Ajustes */
.ptable { display: grid; overflow-x: auto; }
.pr { display: grid; grid-template-columns: minmax(120px, 1.6fr) repeat(4, minmax(64px, 1fr)); gap: 6px; align-items: center; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; width: 100%; min-width: 420px; }
.pr span { display: grid; } .pr small { color: var(--muted); font-size: .74rem; }
.pr.ph { font-size: .8rem; color: var(--muted); font-weight: 700; } .pr:not(.ph):not(:disabled):hover, .rowbtn:not(:disabled):hover { background: #fbf8f0; }
.pr.off, .rowbtn.off { opacity: .55; }
.rowbtn { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; } .rowbtn:disabled { cursor: default; color: inherit; }
.sizegrid { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 6px 10px; align-items: center; }
.sizegrid b { font-size: .85rem; color: var(--muted); } .sizegrid input { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; width: 100%; }
textarea.copy { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fbf8f0; resize: none; }

/* Report card */
.photos2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; border: 2px dashed var(--gold); border-radius: 14px; background: #fbf8f0; overflow: hidden; cursor: pointer; text-align: center; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo span { position: relative; z-index: 1; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.88); font-weight: 700; font-size: .85rem; }
.photo b { position: absolute; z-index: 1; left: 8px; top: 8px; padding: 2px 8px; border-radius: 8px; background: var(--emerald-800); color: #fff; font-size: .78rem; }
fieldset.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
fieldset.chips legend { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.chips label { display: inline-flex; } .chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; }
.chips input:checked + span { background: var(--emerald-700); color: #fff; border-color: var(--emerald-700); }
.chips input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
textarea { width: 100%; min-height: 80px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

.item.clickable { cursor: pointer; } .item.clickable:hover { background: #fbf8f0; }
.loydots { display: flex; gap: 3px; align-items: center; margin: 3px 0; } .loydots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gold); } .loydots i.on { background: var(--gold); }
.dlg h3 { margin: 4px 0 0; font-size: 1rem; color: var(--emerald-800); }

.wgrid { display: grid; gap: 10px; }
.wday { display: grid; gap: 4px; align-content: start; padding: 8px; border-radius: 12px; background: #fbf8f0; border: 1px solid var(--line); }
.wday.today { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,162,75,.25); }
.wh { border: 0; background: none; text-align: left; font-weight: 800; color: var(--emerald-800); text-transform: capitalize; padding: 2px 0; }
.wh small { color: var(--muted); font-weight: 600; }
.wap { display: grid; text-align: left; border: 1px solid var(--line); border-left: 4px solid; border-radius: 8px; background: #fff; padding: 4px 8px; font-size: .85rem; }
.wap small { color: var(--muted); } .wap.st-off { opacity: .5; text-decoration: line-through; }
@media (min-width: 900px) { .wgrid { grid-template-columns: repeat(7, minmax(0, 1fr)); } .wday { min-height: 320px; } }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 8px; overflow-x: auto; }
.bar { flex: 1 0 18px; max-width: 48px; display: grid; grid-template-rows: 1fr auto; height: 100%; align-items: end; text-align: center; }
.bar i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #f3dc94, #c9a24b); border: 1px solid #a8802f; }
.bar small { font-size: .7rem; color: var(--muted); }

code.link { display: block; flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; background: #f6f1e4; border: 1px solid var(--line); overflow-wrap: anywhere; font-size: .85rem; }

/* Acerca de */
.about { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 14px; align-items: center; }
.about img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; border: 2px solid var(--gold); }
.sig { font-family: "Segoe Script", "Brush Script MT", cursive; font-size: 1.6rem; color: var(--gold-dark); line-height: 1.1; }

.toast { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); background: var(--emerald-900); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
@media (max-width: 420px) { .fr { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Escritorio (navegador en computadora o tablet en horizontal): menú a la izquierda */
@media (min-width: 900px) {
  .shell { grid-template-columns: 230px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .top { grid-column: 1 / -1; }
  body { background: radial-gradient(120% 90% at 10% 100%, #0f5a3d 0%, #0b3d2a 45%, #072a1d 100%) fixed; }
  .tabs { grid-row: 2; grid-column: 1; position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); display: flex; flex-direction: column; gap: 14px; padding: 20px 14px; background: none; border-top: 0; }
  .tabs button { grid-template-columns: 52px 1fr; justify-items: start; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; font-size: 1.05rem; color: #fff;
    background: linear-gradient(180deg, #0f4a33, #072a1d); border: 2px solid var(--gold); box-shadow: 0 4px 12px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12); }
  .tabs button img { width: 46px; height: 46px; }
  .tabs button:hover { border-color: #ecd28b; }
  .tabs button[aria-current="page"] { background: linear-gradient(180deg, #19b371, #0a6a42); border-color: #ecd28b; box-shadow: 0 0 0 2px rgba(236,210,139,.35), 0 6px 16px rgba(0,0,0,.4); }
  main { grid-row: 2; grid-column: 2; padding: 28px 32px; max-width: none; margin: 16px 16px 16px 0; background: var(--ivory); border: 3px solid var(--gold); border-radius: 22px; box-shadow: 0 10px 40px rgba(0,0,0,.35); align-self: start; min-height: calc(100vh - 96px); }
  h1 { font-size: 2.2rem; }
  #map { height: 460px; }

  .agenda-list { display: none; }
  .agenda-grid { display: block; padding: 0; overflow-x: auto; }
  .grid { display: grid; grid-template-columns: 70px repeat(var(--cols), minmax(170px, 1fr)); min-width: calc(70px + var(--cols) * 170px); }
  .gh { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; background: var(--paper); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
  .gh:first-child { border-left: 0; }
  .gtimes { position: relative; } .gtimes span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .75rem; color: var(--muted); }
  .gtimes span:first-child { transform: none; }
  .gcol { position: relative; border-left: 1px solid var(--line); cursor: copy; background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--h) - 1px), var(--line) calc(var(--h) - 1px), var(--line) var(--h)); }
  .closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #f3efe4 0 6px, #ece6d6 6px 12px); pointer-events: none; }
  .gappt { position: absolute; left: 4px; right: 4px; z-index: 1; display: grid; align-content: start; gap: 1px; text-align: left; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); border-left: 4px solid; background: #fff; box-shadow: 0 2px 6px rgba(7,42,29,.08); overflow: hidden; font-size: .82rem; cursor: pointer; }
  .gappt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gappt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gappt.st-off { opacity: .5; text-decoration: line-through; } .gappt.st-ready { background: #effaf3; } .gappt.st-work { background: #fff5ec; } .gappt.st-paid { background: #f6f3ea; }
  .nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
  .nowline::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
  .toast { bottom: 24px; }
}
