/* NASL ERP · dark space theme (matches docs/prototype/App.dc.html). Themes: Black (default) and Warm light (class th-light on <html>).
   All colours are custom properties on the root, so every screen works in both themes. No live blur on cards (UI-SPEC). */
:root {
  --bn: 0px; --side: 264px; --scheme: dark;
  --tint: 255 255 255; --shade: 0 0 0; --scrim: 3 4 8;
  --bg: #05060a; --fg: #f4f4f5; --fg-strong: #fafafa; --fg-2: #d4d4d8; --fg-3: #e4e4e7;
  --muted: #a1a1aa; --muted-2: #8b8b96; --muted-3: #71717a;
  --accent: #fafafa; --on-accent: #09090b; --accent-hover: #e4e4e7;
  --panel: #0e0f14; --panel-2: #0b0c11; --panel-glass: rgba(14,15,20,.96);
  --bg-nav: rgba(5,6,10,.7); --bg-head: rgba(5,6,10,.94); --bg-drawer: #07080c;
  --ok: 134 239 172; --ok-t: #bbf7d0; --warn: 253 224 71; --warn-t: #fde68a;
  --info: 147 197 253; --info-t: #bfdbfe; --bad: 252 165 165; --bad-t: #fca5a5; --on-bad: #450a0a;
  --stars-size: 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 100% 100%, 100% 100%;
  --stars: radial-gradient(1px 1px at 23px 41px, rgba(255,255,255,.7), transparent 60%), radial-gradient(1px 1px at 141px 89px, rgba(255,255,255,.45), transparent 60%), radial-gradient(1.5px 1.5px at 253px 197px, rgba(255,255,255,.6), transparent 60%), radial-gradient(1px 1px at 77px 263px, rgba(255,255,255,.35), transparent 60%), radial-gradient(1px 1px at 311px 31px, rgba(255,255,255,.5), transparent 60%), radial-gradient(1px 1px at 199px 331px, rgba(255,255,255,.4), transparent 60%), radial-gradient(900px 500px at 75% -10%, rgba(148,163,184,.10), transparent 70%), radial-gradient(700px 500px at -10% 110%, rgba(148,163,184,.07), transparent 70%);
}
/* Theme: Warm light (off-white, easy on the eyes). Same tokens, different values. */
html.th-light {
  --scheme: light;
  --tint: 60 40 20; --shade: 70 45 20; --scrim: 40 28 14;
  --bg: #f6f1e7; --fg: #2b2620; --fg-strong: #1c1814; --fg-2: #3d362d; --fg-3: #342e26;
  --muted: #6f665b; --muted-2: #8a8073; --muted-3: #968b7d;
  --accent: #2b2620; --on-accent: #fffaf0; --accent-hover: #433b31;
  --panel: #fffaf0; --panel-2: #fffaf0; --panel-glass: rgba(255,250,240,.98);
  --bg-nav: rgba(255,250,240,.88); --bg-head: rgba(246,241,231,.95); --bg-drawer: #fbf6ea;
  --ok: 22 128 61; --ok-t: #166534; --warn: 202 138 4; --warn-t: #854d0e;
  --info: 37 99 235; --info-t: #1d4ed8; --bad: 220 38 38; --bad-t: #b91c1c; --on-bad: #fff;
  --stars-size: 100% 100%, 100% 100%;
  --stars: radial-gradient(900px 500px at 75% -10%, rgba(200,150,80,.12), transparent 70%), radial-gradient(700px 500px at -10% 110%, rgba(200,150,80,.09), transparent 70%);
}
html.th-light .glass, html.th-light .tile, html.th-light .state { background: #fffaf0; border-color: rgba(60,40,20,.10); box-shadow: 0 1px 2px rgba(90,60,30,.05), 0 10px 28px rgba(90,60,30,.06); }
html.th-light .tile.hero { background: linear-gradient(160deg, #fff3dc, #fffaf0); }
html.th-light .state-loading, html.th-light .state-empty { box-shadow: none; }
html.th-light .login.lgbh::before { display: none; }
body.is-test { --bn: 26px; padding-top: 26px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 1.45; -webkit-tap-highlight-color: transparent;
}
/* Bangla needs a Bangla font and a little more line height. */
html[lang="bn"] body, html[lang="bn"] button, html[lang="bn"] input, html[lang="bn"] textarea, html[lang="bn"] select {
  font-family: Inter, "Noto Sans Bengali", "Nirmala UI", "Hind Siliguri", system-ui, sans-serif;
}
html[lang="bn"] body { line-height: 1.6; }
html[lang="bn"] .h1, html[lang="bn"] .h2, html[lang="bn"] .h3, html[lang="bn"] .big, html[lang="bn"] .gl, html[lang="bn"] .brandtx strong, html[lang="bn"] .tile-t {
  font-family: "Space Grotesk", "Noto Sans Bengali", "Nirmala UI", Inter, sans-serif; letter-spacing: 0;
}
html[lang="bn"] .eyebrow, html[lang="bn"] th, html[lang="bn"] .lock { letter-spacing: 0; text-transform: none; }

a { color: var(--fg-3); }
a:hover { color: var(--fg-strong); }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid rgb(var(--tint) / .7); outline-offset: 2px; }
h1, h2, h3, p, ul, ol { margin: 0; }
hr { border: 0; border-top: 1px solid rgb(var(--tint) / .08); margin: 4px 0; width: 100%; }
.noscript { padding: 24px; }
body.has-sheet { overflow: hidden; }

/* Star field */
body.space { position: relative; isolation: isolate; }
body.space::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-color: var(--bg);
  background-image: var(--stars);
  background-size: var(--stars-size);
}

/* ---------- Controls ---------- */
input, textarea, select {
  font-family: inherit; font-size: 14px; color: var(--fg); border: 1px solid rgb(var(--tint) / .14); border-radius: 12px;
  padding: 11px 14px; background: rgb(var(--tint) / .04); width: 100%; outline: none; color-scheme: var(--scheme);
}
input:focus, textarea:focus, select:focus { border-color: rgb(var(--tint) / .45); background: rgb(var(--tint) / .07); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
option { background: var(--panel); color: var(--fg); }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
label { font-size: 13px; font-weight: 600; color: var(--fg-2); display: flex; flex-direction: column; gap: 7px; }
.fl-note { font-weight: 400; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 7px; }
.fl { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.field-hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.field-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.date-echo { color: var(--fg-2); }
.form { display: flex; flex-direction: column; gap: 16px; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
input[lang="bn"] { font-family: Inter, "Noto Sans Bengali", "Nirmala UI", "Hind Siliguri", system-ui, sans-serif; }
.auto-note { color: var(--warn-t); }
.warn { color: var(--warn-t); font-size: 13px; }
.form-error { margin: 0; }
.bad { color: var(--bad-t); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  border: 1px solid rgb(var(--tint) / .16); background: rgb(var(--tint) / .06); color: var(--fg); font-size: 13px; font-weight: 600;
  border-radius: 12px; padding: 9px 16px; min-height: 40px; text-align: center;
}
.btn:hover { background: rgb(var(--tint) / .12); color: var(--fg); }
.btn.white { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.white:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn.ghost-red { color: var(--bad-t); border-color: rgb(var(--bad) / .35); background: transparent; }
.btn.ghost-red:hover { background: rgb(var(--bad) / .1); color: var(--bad-t); }
.btn.okb { background: rgb(var(--ok) / .12); border-color: rgb(var(--ok) / .4); color: var(--ok-t); }
.btn.okb:hover { background: rgb(var(--ok) / .2); color: var(--ok-t); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.btn.icon-btn { width: 40px; padding: 0; flex: none; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid rgb(var(--shade) / .25); border-top-color: var(--on-accent); border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.white).is-busy::after { border-color: rgb(var(--tint) / .3); border-top-color: var(--fg-strong); }
.btn.link-btn { align-self: flex-start; background: transparent; border-color: transparent; color: var(--fg-2); padding-left: 0; padding-right: 0; min-height: 30px; }
.link-btn:hover { background: transparent; text-decoration: underline; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgb(var(--tint) / .05); border: 1px solid rgb(var(--tint) / .10); }
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 9px; min-height: 32px; }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.seg-sm { padding: 2px; border-radius: 10px; }
.seg-sm button { padding: 4px 10px; min-height: 26px; border-radius: 8px; }
.seg-size button { min-width: 44px; }
.pickrow { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { border: 1px solid rgb(var(--tint) / .16); background: rgb(var(--tint) / .04); font-size: 13px; border-radius: 999px; padding: 7px 13px; color: var(--fg-2); min-height: 36px; }
.pick:hover { background: rgb(var(--tint) / .09); }
.pick.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.c-assigned { background: rgb(var(--tint) / .06); color: var(--fg-2); border-color: rgb(var(--tint) / .12); }
.c-in_progress { background: rgb(var(--info) / .12); color: var(--info-t); border-color: rgb(var(--info) / .3); }
.c-submitted { background: rgb(var(--warn) / .10); color: var(--warn-t); border-color: rgb(var(--warn) / .3); }
.c-sent_back { background: rgb(var(--bad) / .10); color: var(--bad-t); border-color: rgb(var(--bad) / .3); }
.c-done { background: rgb(var(--ok) / .10); color: var(--ok-t); border-color: rgb(var(--ok) / .3); }
.c-overdue { background: rgb(var(--bad)); color: var(--on-bad); }
.p5 { background: var(--accent); color: var(--on-accent); }
.p4 { background: rgb(var(--tint) / .75); color: var(--on-accent); }
.p3 { background: rgb(var(--tint) / .12); color: var(--fg-strong); border-color: rgb(var(--tint) / .3); }
.p2 { background: transparent; color: var(--fg-2); border-color: rgb(var(--tint) / .22); }
.p1 { background: transparent; color: var(--muted); border-color: rgb(var(--tint) / .14); }
.lock { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); border: 1px solid rgb(var(--tint) / .25); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.badge { font-size: 11px; font-weight: 700; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 1px 7px; line-height: 1.4; }

/* ---------- Type + surfaces ---------- */
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.h1 { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 30px; font-weight: 600; letter-spacing: -.02em; color: var(--fg-strong); line-height: 1.2; }
.h2 { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 17px; font-weight: 600; color: var(--fg-strong); line-height: 1.3; }
.h3 { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 15px; font-weight: 600; color: var(--fg-strong); }
.sub { font-size: 13px; color: var(--muted); }
.block { display: block; }
.big { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 34px; font-weight: 600; letter-spacing: -.02em; color: var(--fg-strong); line-height: 1.1; }
.big.bad { color: var(--bad-t); }
.up { color: rgb(var(--ok)); font-size: 12px; font-weight: 600; }
.up.down { color: var(--bad-t); }
.glass { background: rgb(var(--tint) / .045); border: 1px solid rgb(var(--tint) / .10); border-radius: 20px; box-shadow: inset 0 1px 0 rgb(var(--tint) / .07), 0 20px 40px rgb(var(--shade) / .25); min-width: 0; }
.pad { padding: 22px; }
.av { width: 34px; height: 34px; border-radius: 999px; background: rgb(var(--tint) / .1); border: 1px solid rgb(var(--tint) / .18); color: var(--fg-strong); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.av-me { background: var(--accent); color: var(--on-accent); }
.av-lg { width: 56px; height: 56px; font-size: 16px; }
.logo { display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--accent); color: var(--on-accent); font-family: 'Space Grotesk', sans-serif; font-weight: 700; box-shadow: 0 0 24px rgb(var(--tint) / .25); }
.ic { width: 42px; height: 42px; border-radius: 13px; background: rgb(var(--tint) / .1); border: 1px solid rgb(var(--tint) / .16); display: flex; align-items: center; justify-content: center; flex: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(28px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ringFill { from { stroke-dashoffset: 389.56; } }
@keyframes drawLine { from { stroke-dashoffset: 1; } }

/* ---------- App shell: sidebar + header ---------- */
.shell { display: flex; min-height: calc(100vh - var(--bn)); }
.mainwrap { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
nav.appz {
  flex: 0 0 var(--side); width: var(--side); position: sticky; top: var(--bn); height: calc(100vh - var(--bn)); overflow-y: auto; scrollbar-width: none;
  background: var(--bg-nav); border-right: 1px solid rgb(var(--tint) / .08); padding: 22px 14px; display: flex; flex-direction: column; gap: 24px;
}
nav.appz::-webkit-scrollbar { display: none; }
.brandbtn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 10px; margin: 0; border: 0; background: transparent; color: inherit; text-align: left; border-radius: 12px; cursor: pointer; transition: background .15s; }
.brandbtn:hover { background: rgb(var(--tint) / .05); }
.brandtx { display: flex; flex-direction: column; min-width: 0; }
.brandtx strong { font-family: 'Space Grotesk', sans-serif; font-size: 16px; line-height: 1.25; }
.brandtx span { font-size: 11px; color: var(--muted); }
.brandchev { margin-left: auto; width: 16px; height: 16px; color: var(--muted-3); flex: none; transition: color .15s; }
.brandbtn:hover .brandchev { color: var(--fg-strong); }
.navlist { position: relative; display: flex; flex-direction: column; gap: 24px; }
.navg { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
.gl { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 15px; font-weight: 700; color: var(--fg-strong); height: 24px; line-height: 20px; padding: 2px 12px; letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 9px 12px; border-radius: 10px; border: 0; background: transparent; color: var(--fg-2); font-size: 14px; text-decoration: none; text-align: left; }
.nav:hover { background: rgb(var(--tint) / .06); color: var(--fg-strong); }
.navlist .nav.on { background: transparent; color: var(--fg-strong); }
.nav-ic { display: inline-flex; flex: none; color: var(--muted); }
.nav.on .nav-ic { color: var(--fg-strong); }
.nav-lb { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npill { position: absolute; left: 0; right: 0; top: 0; height: 40px; opacity: 0; border-radius: 10px; background: rgb(var(--tint) / .12); box-shadow: inset 0 0 0 1px rgb(var(--tint) / .18), 0 0 22px rgb(var(--tint) / .07); transition: top .28s cubic-bezier(.4,0,.2,1), height .28s cubic-bezier(.4,0,.2,1), opacity .2s; pointer-events: none; z-index: 0; }
.navscrim { display: none; position: fixed; inset: 0; z-index: 65; background: rgb(var(--shade) / .55); }
body.sidehide nav.appz { display: none; }

.apphd { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid rgb(var(--tint) / .08); background: var(--bg-head); position: sticky; top: var(--bn); z-index: 20; }
.hamb { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgb(var(--tint) / .12); background: rgb(var(--tint) / .04); color: var(--fg-strong); flex: none; padding: 0; }
body.sidehide .hamb { display: inline-flex; }
.srch { flex: 1 1 260px; position: relative; max-width: 520px; }
.srch input { padding-left: 40px; }
.srch-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); display: inline-flex; pointer-events: none; }
.srch-ic svg { width: 16px; height: 16px; }
.srch-res { position: absolute; top: 50px; left: 0; right: 0; padding: 8px; background: var(--panel-glass); z-index: 10; display: flex; flex-direction: column; gap: 2px; }
.srch-item { justify-content: space-between; }
.srch-lb { color: var(--fg-strong); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch-kind { font-size: 11px; color: var(--muted); flex: none; }
.srch-none { padding: 8px 12px; }
.usr { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.menm { display: flex; flex-direction: column; line-height: 1.3; }
.menm strong { font-size: 13px; }
.menm span { font-size: 11px; color: var(--muted); }

.main { padding: 28px; max-width: 1380px; width: 100%; margin-inline: auto; }
.page { display: flex; flex-direction: column; gap: 22px; }
.pagehead { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--fg-strong); }
.crumb svg { width: 16px; height: 16px; }
.page-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash > * { animation: rise .5s cubic-bezier(.2,.9,.25,1) both; }
.dash > *:nth-child(2) { animation-delay: .05s; }

/* ---------- Dashboard ---------- */
.dhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.dtitle { display: flex; flex-direction: column; gap: 6px; }
.tilegrid { display: grid; gap: 14px; }
.tilegrid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tilegrid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; gap: 16px; padding: 20px; min-height: 150px; border-radius: 22px; color: var(--fg-strong); text-decoration: none; border: 1px solid rgb(var(--tint) / .12); background: rgb(var(--tint) / .05); transition: transform .2s cubic-bezier(.2,.9,.25,1), background .2s; }
.tile:hover { transform: translateY(-3px); background: rgb(var(--tint) / .09); border-color: rgb(var(--tint) / .24); color: var(--fg-strong); }
.tile.hero { background: linear-gradient(160deg, rgb(var(--tint) / .16), rgb(var(--tint) / .04)); }
.tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tile-n { font-size: 28px; }
.tile-tx { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.tile-t { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 17px; font-weight: 600; line-height: 1.25; }
.tile-s { font-size: 12px; color: var(--muted); line-height: 1.4; }
.dstats { display: flex; flex-wrap: wrap; gap: 18px; align-items: stretch; }
.dstats > * { animation: rise .5s cubic-bezier(.2,.9,.25,1) both; }
.dstats.noanim > *, .dstats.noanim * { animation: none !important; }
.ringcard { flex: 1 1 470px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: center; }
.ringbox { position: relative; width: 164px; height: 164px; flex-shrink: 0; }
.ringbox svg { display: block; }
.ring-tick { stroke: rgb(var(--tint) / .28); }
.ring-bg { stroke: rgb(var(--tint) / .08); }
.chart-grid { stroke: rgb(var(--tint) / .06); }
.ring-fg { stroke: var(--fg-strong); filter: drop-shadow(0 0 8px rgb(var(--tint) / .55)); transition: stroke-dashoffset .8s ease; }
.ringin { animation: ringFill .9s cubic-bezier(.3,.7,.2,1) both; }
.ringin-tx { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ringin-tx .sub { font-size: 11px; }
.ringinfo { flex: 1 1 150px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ringline { font-size: 15px; color: var(--fg-3); margin-top: 6px; }
.ringinfo .up { margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi .big { font-size: 24px; }
.kpi .sub { font-size: 12px; }
.chartcard { flex: 999 1 460px; display: flex; flex-direction: column; gap: 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.chart-tot { text-align: right; }
.chart-tot .big { font-size: 26px; }
.chart-svg { width: 100%; height: 170px; display: block; }
.chart-area { fill: rgb(var(--tint) / .07); animation: fadeIn .9s .3s both; }
.chart-line { stroke: var(--fg-strong); filter: drop-shadow(0 0 6px rgb(var(--tint) / .5)); }
.draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 1s cubic-bezier(.3,.7,.2,1) both; }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.dlinks { display: flex; }

/* ---------- Lists, cards, forms ---------- */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.toolbar .sub { flex: 1 1 240px; }
.toolbar > input[type=search] { max-width: 420px; }
.summary { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 14px; align-items: start; }
.cards > .summary, .cards > .state { grid-column: 1 / -1; }
.tcard { display: flex; flex-direction: column; gap: 12px; animation: rise .4s cubic-bezier(.2,.9,.25,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.tcard.is-sentback { border-color: rgb(var(--bad) / .35); }
.card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card-title { overflow-wrap: anywhere; }
.card-details { color: var(--fg-2); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.callout { border-left: 2px solid rgb(var(--tint) / .3); padding: 2px 0 2px 12px; font-size: 13px; color: var(--fg-3); overflow-wrap: anywhere; }
.callout-danger { border-left-color: var(--bad-t); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-actions.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-actions .btn { flex: 1 1 140px; }
.person { display: flex; align-items: center; gap: 12px; }
.more-details summary { cursor: pointer; color: var(--fg-2); font-size: 13px; }
.more-details p { margin-top: 8px; font-size: 13px; color: var(--fg-2); white-space: pre-wrap; }
.assignee-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.assignee-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid rgb(var(--tint) / .07); }
.assignee-list .emp-name { flex: 1 1 140px; }
.emp-name { font-size: 14px; font-weight: 600; color: var(--fg-strong); overflow-wrap: anywhere; }
.history-wrap { display: flex; flex-direction: column; gap: 6px; }
.events { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.event { padding: 12px 0; border-top: 1px solid rgb(var(--tint) / .07); display: flex; flex-direction: column; gap: 6px; }
.event:first-child { border-top: 0; padding-top: 0; }
.glass.events { padding: 22px; }
.event-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.event-meta { font-size: 12px; color: var(--muted); }
.event-task { font-size: 13px; font-weight: 600; color: var(--fg-strong); overflow-wrap: anywhere; }
.event-note { font-size: 13px; color: var(--fg-2); overflow-wrap: anywhere; }
.ev-chip { background: rgb(var(--tint) / .06); color: var(--fg-2); border-color: rgb(var(--tint) / .12); }
.ev-chip-started { background: rgb(var(--info) / .12); color: var(--info-t); border-color: rgb(var(--info) / .3); }
.ev-chip-submitted { background: rgb(var(--warn) / .10); color: var(--warn-t); border-color: rgb(var(--warn) / .3); }
.ev-chip-sent_back { background: rgb(var(--bad) / .10); color: var(--bad-t); border-color: rgb(var(--bad) / .3); }
.ev-chip-approved { background: rgb(var(--ok) / .10); color: var(--ok-t); border-color: rgb(var(--ok) / .3); }

.page-body > form.glass, .page-body > .filters { max-width: 820px; }
.filters-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.results { display: flex; flex-direction: column; gap: 14px; max-width: 820px; }

.emp-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; scrollbar-width: thin; }
.emp-list.admin-list { max-height: none; }
.emp-none { padding: 14px 4px; }
.check { position: relative; display: flex; flex-direction: row; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid rgb(var(--tint) / .12); background: rgb(var(--tint) / .03); color: var(--fg-3); border-radius: 14px; padding: 10px 14px; font-size: 14px; font-weight: 400; min-height: 48px; cursor: pointer; }
.check:hover { background: rgb(var(--tint) / .06); }
.check.on { border-color: rgb(var(--tint) / .45); background: rgb(var(--tint) / .08); }
.check input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; padding: 0; border: 0; }
.check input:focus-visible ~ .box { outline: 2px solid rgb(var(--tint) / .7); outline-offset: 2px; }
.box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid rgb(var(--tint) / .45); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; color: transparent; }
.check.on .box { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.box.rad { border-radius: 50%; }
.check.on .box.rad { box-shadow: inset 0 0 0 4px var(--panel-2); }
.emp-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.emp-text .sub { font-size: 12px; overflow-wrap: anywhere; }
.emp-btn { font: inherit; }
.chev { color: var(--muted-3); font-size: 18px; margin-left: auto; flex: none; }
.radio-list { display: flex; flex-direction: column; gap: 8px; }

.board-list { list-style: none; display: flex; flex-direction: column; gap: 6px; padding: 14px; max-width: 820px; }
.lb { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; }
.lb.me { background: rgb(var(--tint) / .08); box-shadow: inset 0 0 0 1px rgb(var(--tint) / .16); }
.rank { width: 26px; text-align: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; color: var(--muted); flex: none; }
.rank-1 .rank { color: var(--warn-t); }
.board-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.points { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 20px; color: var(--fg-strong); white-space: nowrap; }
.pts-label { font-size: 12px; font-weight: 500; color: var(--muted); font-family: Inter, sans-serif; }
.board { display: flex; flex-direction: column; gap: 14px; }
.section-title { margin-top: 6px; }
.highlights { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 820px; }
.highlight { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; font-size: 13.5px; }
.hl-icon { color: rgb(var(--ok)); font-weight: 700; }

.state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 36px 20px; border: 1px dashed rgb(var(--tint) / .16); border-radius: 18px; background: rgb(var(--tint) / .02); }
.state-loading { flex-direction: row; gap: 12px; color: var(--muted); border-style: solid; border-color: rgb(var(--tint) / .06); }
.state-title { font-size: 15px; font-weight: 600; color: var(--fg-strong); }
.state-error { border-color: rgb(var(--bad) / .35); }
.spinner { width: 18px; height: 18px; border: 2px solid rgb(var(--tint) / .18); border-top-color: var(--fg-strong); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }

/* ---------- Settings ---------- */
.setcol { display: flex; flex-direction: column; gap: 22px; max-width: 880px; min-width: 0; }
.setcard { display: flex; flex-direction: column; gap: 14px; }
.setcard > .seg { align-self: flex-start; }
.field > .seg { align-self: flex-start; }
.thgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.thcard { display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 12px; border-radius: 18px; border: 1px solid rgb(var(--tint) / .12); background: rgb(var(--tint) / .03); color: var(--fg-strong); transition: transform .2s, border-color .2s; }
.thcard:hover { transform: translateY(-2px); border-color: rgb(var(--tint) / .3); }
.thcard.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.th-tx { display: flex; flex-direction: column; gap: 3px; }
.th-tx strong { font-size: 14px; }
.th-tx .sub { font-size: 12px; }
.thsw { height: 110px; border-radius: 12px; position: relative; overflow: hidden; display: flex; align-items: flex-end; gap: 6px; padding: 10px; }
.thsw span { height: 10px; border-radius: 5px; flex: 1; }
.thsw-black { background: radial-gradient(circle at 30% 20%, #1b1c22, var(--bg) 70%); border: 1px solid rgb(var(--tint) / .08); }
.thsw-black span { background: rgb(var(--tint) / .18); }
.thsw-black span:first-child { background: var(--accent); }
.thsw-light { background: radial-gradient(circle at 30% 20%, #fffaf0, #f6f1e7 70%); border: 1px solid rgba(60,40,20,.14); }
.thsw-light span { background: rgba(60,40,20,.16); }
.thsw-light span:first-child { background: #2b2620; }
.th-name { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pk-row { display: flex; gap: 14px; align-items: flex-start; }
.pk-tx { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pk-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tg-code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 32px; letter-spacing: .25em; font-weight: 600; color: var(--fg-strong); text-align: center; padding: 12px 0; }
.tg-out { display: flex; flex-direction: column; gap: 12px; }
.tg-out:empty { display: none; }
.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--fg-2); }
.tg-cmd { display: block; margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: rgb(var(--tint) / .06); border: 1px solid rgb(var(--tint) / .1); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; color: var(--fg-strong); }

/* ---------- Sheet (modal) ---------- */
.ov { position: fixed; inset: 0; z-index: 130; display: flex; justify-content: center; align-items: flex-start; padding: 28px 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.ov::-webkit-scrollbar { display: none; }
.scrim { position: fixed; inset: 0; border: 0; padding: 0; background: rgb(var(--scrim) / .8); animation: fadeIn .25s both; cursor: default; }
.sheet { position: relative; width: min(560px, 100%); background: var(--panel); border: 1px solid rgb(var(--tint) / .14); border-radius: 26px; padding: 24px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 40px 90px rgb(var(--shade) / .6), inset 0 1px 0 rgb(var(--tint) / .08); animation: popIn .38s cubic-bezier(.2,.9,.25,1) both; }
.sec { animation: drop .4s cubic-bezier(.2,.9,.25,1) both; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; animation-delay: .04s; }
.sheet > .sec:nth-child(2) { animation-delay: .1s; }
.sheet-body { display: flex; flex-direction: column; gap: 14px; }
.sheet-task { margin: 0; font-weight: 600; font-size: 15px; color: var(--fg-strong); overflow-wrap: anywhere; }
.sheet-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* ---------- Toast, banner, update bar ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 300; max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 14px; background: var(--panel-glass); border: 1px solid rgb(var(--tint) / .18); color: var(--fg-strong); font-size: 13.5px; box-shadow: 0 14px 40px rgb(var(--shade) / .5); transition: opacity .2s, transform .2s; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { border-color: rgb(var(--bad) / .5); color: var(--bad-t); }
body.has-update .toast { bottom: 84px; }
.update-bar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 250; display: inline-flex; gap: 6px; align-items: center; justify-content: center; max-width: min(92vw, 460px); border: 1px solid rgb(var(--tint) / .3); background: var(--accent); color: var(--on-accent); font-size: 13px; border-radius: 999px; padding: 11px 20px; min-height: 44px; box-shadow: 0 0 30px rgb(var(--tint) / .25); }
#env-banner { position: fixed; top: 0; left: 0; right: 0; height: 26px; z-index: 400; display: flex; align-items: center; justify-content: center; gap: 0; padding: 0 12px; background: #fde68a; color: #422006; font-size: 11.5px; line-height: 1; letter-spacing: .02em; white-space: nowrap; overflow: hidden; }
#env-banner b { font-weight: 800; letter-spacing: .06em; }

/* ---------- Sign-in ---------- */
body.is-login { overflow: hidden; }
.login { position: fixed; inset: var(--bn) 0 0 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--bg); overflow: hidden; overscroll-behavior: contain; }
.login.lgbh { background: var(--panel-2); }
.login.lgbh::before { content: ''; position: absolute; inset: -24px; background: url('/icons/login-bg.jpg') center / cover no-repeat; filter: blur(4px); opacity: .6; pointer-events: none; }
.login > * { position: relative; z-index: 1; }
.lgcard { width: 100%; max-width: 420px; max-height: calc(100vh - var(--bn) - 32px); overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 16px; padding: 28px; border-radius: 22px; background: var(--panel-2); border: 1px solid rgb(var(--tint) / .07); box-shadow: 0 0 60px 20px rgba(11,12,17,.7); animation: rise .35s both; }
.lgcard::-webkit-scrollbar { display: none; }
.lgtop { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lgbrand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lgbrand > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.lgbrand strong { font-family: 'Space Grotesk', sans-serif; font-size: 17px; }
.lgbrand span { font-size: 12px; color: var(--muted); }
.lgh { font-size: 24px; }
.lgsub { margin-top: 4px; }
.lgbtn { min-height: 46px; width: 100%; }
.lgnote { font-size: 12px; margin: 0; }

/* ---------- Phone layout (max 620px) ---------- */
@media (max-width: 1180px) {
  .tilegrid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .highlights { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  nav.appz { position: fixed; top: var(--bn); left: 0; bottom: 0; width: 280px; max-width: 84%; height: auto; flex: none; z-index: 70; background: var(--bg-drawer); transform: translateX(-104%); transition: transform .26s cubic-bezier(.2,.7,.2,1); box-shadow: 24px 0 60px rgb(var(--shade) / .5); display: flex !important; }
  body.nav-open nav.appz { transform: none; }
  body.nav-open .navscrim { display: block; }
  .hamb { display: inline-flex; }
  .apphd { padding: 10px 14px; gap: 10px; }
  .apphd .srch { order: 3; flex: 1 1 100%; max-width: none; }
  .apphd .menm { display: none; }
  .apphd .hamb { order: 0; }
  .usr { order: 1; }
  .main { padding: 16px 14px 90px; }
  .page { gap: 16px; }
  .h1 { font-size: 24px; }
  .main .seg { display: flex; width: 100%; }
  .main .seg button { flex: 1 1 0; padding: 7px 6px; }
  .main .seg-sm { display: inline-flex; width: auto; }
  .main .seg-sm button { flex: none; }
  .glass.pad, .glass.events { padding: 16px; }
  .tilegrid, .tilegrid.c4, .tilegrid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { min-height: 0; padding: 14px; gap: 10px; border-radius: 18px; }
  .tile .ic { width: 34px; height: 34px; }
  .tile-n { font-size: 24px; }
  .tile-t { font-size: 15px; }
  .tile-s { font-size: 11px; line-height: 1.35; min-height: 2.7em; }
  .ringcard { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .ringcard > div { width: 100%; flex: none; }
  .ringcard > .ringbox { width: 164px; }
  .ringinfo { align-items: stretch; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .highlights { grid-template-columns: minmax(0, 1fr); }
  .thgrid { grid-template-columns: minmax(0, 1fr); }
  .thsw { height: 80px; }
  .ov { padding: 12px 8px; }
  .sheet { padding: 18px 16px; border-radius: 22px; }
  .lgcard { padding: 22px 18px; }
  .toast { bottom: 18px; }
  .events .event-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* ---------- TV ---------- */
body.tv { background: #0f2236; color: #fff; overflow: hidden; }
.tv-root { min-height: 100vh; display: flex; flex-direction: column; padding: 3vh 4vw; font-size: clamp(16px, 2.2vw, 44px); }
.tv-head { display: flex; align-items: center; justify-content: space-between; gap: 2vw; margin-bottom: 3vh; }
.tv-brand { white-space: nowrap; display: flex; align-items: center; gap: 1vw; font-weight: 800; font-size: 1.3em; }
.tv-brand img { width: 2.2em; height: 2.2em; border-radius: .3em; }
.tv-periods { display: flex; gap: .5em; }
.tv-period { white-space: nowrap; padding: .25em .8em; border-radius: 2em; background: rgb(var(--tint) / .08); color: rgba(255, 255, 255, .6); font-weight: 700; font-size: .8em; }
.tv-period.active { background: #ffd400; color: #1a1400; }
.tv-clock { white-space: nowrap; font-size: .75em; color: rgba(255, 255, 255, .75); text-align: right; }
.tv-main { flex: 1; display: flex; flex-direction: column; gap: 3vh; }
.tv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.4vh; }
.tv-row { display: flex; align-items: center; gap: 1.5vw; background: rgba(255, 255, 255, .07); border-radius: .5em; padding: 1.4vh 2vw; }
.tv-row.rank-1 { background: rgba(255, 212, 0, .16); }
.tv-rank { width: 1.6em; text-align: center; font-weight: 900; font-size: 1.4em; color: rgb(var(--tint) / .7); }
.tv-row.rank-1 .tv-rank { color: #ffd400; }
.tv-avatar { width: 2.2em; height: 2.2em; border-radius: 50%; background: #2c5478; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8em; flex: none; }
.tv-who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tv-name { font-weight: 800; font-size: 1.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-dept { color: rgba(255, 255, 255, .65); font-size: .65em; }
.tv-points { font-weight: 900; font-size: 1.4em; font-variant-numeric: tabular-nums; }
.tv-points small { font-size: .45em; color: rgba(255, 255, 255, .6); }
.tv-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 2vw; margin-top: auto; }
.tv-hl { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; background: rgba(95, 208, 143, .12); border-radius: .5em; padding: 1.2vh 1.5vw; font-size: .75em; }
.tv-hl-icon { color: #5fd08f; font-weight: 900; }
.tv-hl-time { width: 100%; color: rgba(255, 255, 255, .6); font-size: .8em; }
.tv-msg { font-size: 1.2em; text-align: center; margin: auto; color: rgba(255, 255, 255, .8); }
body.tv #env-banner { position: static; height: auto; padding: 4px 12px; font-size: 1.4rem; }
@media (max-width: 700px) { .tv-head { flex-wrap: wrap; } .tv-highlights { grid-template-columns: 1fr; } }

/* ---------- Daily reports ---------- */
.rp-date { min-width: 170px; }
.rp-tasks { display: flex; flex-direction: column; gap: 8px; }
.rp-task { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgb(var(--tint) / .10); background: rgb(var(--tint) / .03); }
.rp-tick { display: flex; flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; }
.rp-tick input { width: 20px; height: 20px; min-height: 0; min-width: 0; padding: 0; margin: 0; accent-color: var(--accent); flex: none; }
.rp-tick .emp-name { flex: 1 1 160px; }
.rp-sec { display: flex; flex-direction: column; gap: 4px; }
.rp-tlist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rp-histh { margin-top: 8px; }
.rp-sum { display: flex; align-items: center; gap: 18px; grid-column: 1 / -1; }
.rp-sum .big { font-size: 34px; }
.dlinks { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 620px) {
  .field-row:has(.rp-date) { flex-direction: column; align-items: stretch; }
  .dlinks .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Tasks dashboard (prototype layout) ---------- */
.tile.rbanner { display: flex; flex-direction: row; align-items: center; gap: 16px; min-height: 0; }
.tile.rbanner .tile-tx { flex: 1; }
.tile.rbanner .tile-n { color: var(--warn-t, #f5a524); }
.tile.rbanner.is-sent .tile-n { color: var(--ok-t, #3ecf8e); }
.dsec { margin-top: 6px; }
.chip.req-approved { background: rgb(var(--ok, 62 207 142) / .14); }
.chip.req-rejected { background: rgb(var(--bad, 240 80 80) / .14); }
.chip.req-pending, .chip.req-approving { background: rgb(var(--tint) / .08); }

/* ---------- Assign / request form (prototype layout) ---------- */
.assign-form { gap: 14px; }
.assign-foot { display: flex; justify-content: flex-end; gap: 8px; }
.people-pick { max-height: 260px; overflow-y: auto; }
@media (max-width: 620px) { .assign-foot .btn { flex: 1 1 0; justify-content: center; } }

/* Daily report: "Finished: send for review" under a ticked task */
.rp-fin { margin-left: 28px; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 0.92em; }
.rp-fin .sub { flex-basis: 100%; margin-left: 26px; }

/* Task request card: requester → people */
.req-flow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.req-arrow { font-size: 1.3em; opacity: 0.6; }
textarea::placeholder { white-space: pre-line; }

/* Team reports: one even row of filters, then a table of reports */
.rp-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: end; }
.rp-filters .field { min-width: 0; }
.rp-results { display: flex; flex-direction: column; gap: 12px; }
.rp-tablehead { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.rp-tablewrap { padding: 0; overflow-x: auto; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rp-table th { text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--tint) / .55); padding: 12px 14px; border-bottom: 1px solid rgb(var(--tint) / .10); white-space: nowrap; }
.rp-table td { padding: 12px 14px; border-bottom: 1px solid rgb(var(--tint) / .06); vertical-align: top; }
.rp-table tbody tr { cursor: pointer; }
.rp-table tbody tr:hover, .rp-table tbody tr:focus-visible { background: rgb(var(--tint) / .05); outline: none; }
.rp-table tbody tr:last-child td { border-bottom: 0; }
.rp-table .nowrap { white-space: nowrap; }
.tilegrid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) { .rp-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .tilegrid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tilegrid.c3 > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .rp-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-filters .field:first-child { grid-column: 1 / -1; }
  .rp-table th:nth-child(3), .rp-table td:nth-child(3), .rp-table th:nth-child(5), .rp-table td:nth-child(5) { display: none; }
}

/* Row lists (My tasks, Tasks review): one full-width row per item */
.rows { display: flex; flex-direction: column; gap: 8px; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 16px; padding: 12px 16px; animation: rise .35s cubic-bezier(.2,.9,.25,1) both; animation-delay: calc(var(--i, 0) * 30ms); }
.trow.is-sentback { border-color: rgb(var(--bad) / .35); }
.row-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { display: flex; align-items: baseline; gap: 6px; font: inherit; font-weight: 650; font-size: 15px; color: var(--fg); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
span.row-title { cursor: default; }
.row-caret { display: inline-block; width: 10px; color: var(--muted); transition: transform .15s; }
.row-title[aria-expanded="true"] .row-caret { transform: rotate(90deg); }
.row-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.row-chips { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.row-actions { display: flex; gap: 8px; }
.row-actions .btn { min-width: 108px; padding-top: 8px; padding-bottom: 8px; }
.row-more { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px solid rgb(var(--tint) / .08); }
.rows > .summary, .rows > .state { margin: 4px 0; }
@media (max-width: 720px) {
  .trow { grid-template-columns: minmax(0, 1fr) auto; }
  .row-actions { grid-column: 1 / -1; }
  .row-actions .btn { flex: 1 1 0; min-width: 0; }
}
.callout-ok { border-left-color: rgb(var(--ok)); }
.rp-permanent { margin-top: -4px; }
.trow-click { cursor: pointer; }
.trow-click:hover { border-color: rgb(var(--tint) / .18); }
.trow-click:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-go { color: var(--muted); font-size: 20px; line-height: 1; }
@media (max-width: 720px) { .trow-click { grid-template-columns: minmax(0, 1fr) auto auto; } }
.adm-group { display: flex; align-items: baseline; gap: 6px; padding: 14px 4px 6px; border-top: 1px solid rgb(var(--tint) / .08); }
.adm-group:first-child { border-top: 0; padding-top: 2px; }
.chip.warn { background: rgb(var(--warn) / .14); color: var(--warn-t); border-color: rgb(var(--warn) / .3); }
