:root {
  /* DMLTN Pro Gear brand tokens (same as shop.demolitiontuna.com, app/styles/dmltn.css) */
  --bg: #0a0a0a; --surface: #111111; --surface-2: #161616; --line: #262423; --line-2: #3a3735;
  --text: #f5f5f4; --muted: #a8a29e; --dim: #5a5654;
  --accent: #dc2626; --accent-2: #b91c1c; --accent-ink: #ffffff;
  --ok: #a3c9a0; --warn: #e0b25c; --bad: #ef4444; --info: #d6d3d1;
  --r: 6px; --nav-h: 64px;
  --display: "Barlow Condensed", "Oswald", "Helvetica Neue", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* shell */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: rgba(10,10,10,.94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; flex: 1; display: flex; align-items: center; gap: 10px; }
.top h1 img { height: 26px; width: auto; }
.top h1 span { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 10px; }
.main { padding: 14px 14px calc(var(--nav-h) + var(--safe-b) + 90px); max-width: 1100px; margin: 0 auto; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(10,10,10,.97);
  border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
.nav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--dim); position: relative; font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.nav button svg { width: 24px; height: 24px; }
.nav button.on { color: var(--text); }
.nav button.on svg { color: var(--accent); }
.nav .dot { position: absolute; top: 8px; right: calc(50% - 20px); min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; font-family: Inter, sans-serif; letter-spacing: 0; display: grid; place-items: center; padding: 0 5px; }
@media (min-width: 900px) {
  .nav { top: 0; bottom: 0; right: auto; width: 88px; height: auto; grid-template-columns: 1fr; grid-auto-rows: 76px;
    padding-top: 80px; border-top: 0; border-right: 1px solid var(--line); }
  .top, .main { margin-left: 88px; }
  .main { padding-bottom: 60px; }
}

/* building blocks */
.h2 { font-family: var(--display); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .22em; color: var(--muted); margin: 24px 2px 8px;
  display: flex; align-items: center; gap: 8px; }
.h2 .n { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; font-size: 12px; letter-spacing: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 8px; }
.card.tap { cursor: pointer; }
.card.tap:active { background: var(--surface-2); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 8px; border-radius: 3px;
  background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.bad { background: rgba(220,38,38,.16); color: #f87171; }
.chip.warn { background: rgba(224,178,92,.13); color: var(--warn); }
.chip.ok { background: rgba(163,201,160,.12); color: var(--ok); }
.chip.acc { background: none; border: 1px solid var(--line-2); color: var(--text); }
.empty { color: var(--muted); font-size: 14px; padding: 6px 4px 2px; }
.btn { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 3px; padding: 9px 16px; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
.btn.pri { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.pri:active { background: var(--accent-2); }
.btn.ghost { background: none; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.icon-btn { background: none; border: 0; padding: 6px; color: var(--muted); cursor: pointer; }
.fab { position: fixed; right: 18px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 25; width: 56px; height: 56px;
  border-radius: 6px; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 30px; box-shadow: 0 8px 24px rgba(0,0,0,.4); cursor: pointer; }
.seg { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 3px; padding: 6px 12px; white-space: nowrap; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.seg button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
input.txt, select.txt, textarea.txt { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 11px 12px; }
input.txt:focus, select.txt:focus, textarea.txt:focus { outline: none; border-color: var(--accent); }
textarea.txt { min-height: 90px; resize: vertical; }
label.f { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }

/* checkbox */
.chk { appearance: none; width: 26px; height: 26px; flex: none; border: 2px solid var(--dim); border-radius: 4px; display: grid; place-items: center; cursor: pointer; margin: 0; }
.chk:checked { background: var(--accent); border-color: var(--accent); }
.chk:checked::after { content: ""; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px,-1px); }
.task.done .ttl { text-decoration: line-through; color: var(--muted); }

/* kanban */
.board { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
.col { flex: 0 0 82vw; max-width: 300px; scroll-snap-align: start; background: #0e0e0e; border: 1px solid var(--line); border-radius: var(--r); padding: 10px; }
.col h3 { margin: 2px 4px 10px; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; display: flex; justify-content: space-between; color: var(--muted); }
.col .list { min-height: 80px; }
.col .card { cursor: grab; }
.sortable-ghost { opacity: .35; }
.sortable-chosen .card, .card.sortable-chosen { box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; animation: fade .15s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92vh; overflow-y: auto; background: var(--surface);
  border-top: 2px solid var(--accent); border-radius: 10px 10px 0 0; padding: 8px 18px calc(24px + var(--safe-b)); animation: up .2s ease-out; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet h2 { margin: 4px 0 6px; font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; }
.sheet .actions { display: flex; gap: 8px; margin-top: 18px; }
.sheet .actions .sp { flex: 1; }
@media (min-width: 700px) { .sheet { left: 50%; right: auto; width: 560px; transform: translateX(-50%); bottom: auto; top: 6vh; border-radius: 6px; max-height: 88vh; animation: fade .15s; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

#toast { font-weight: 500; position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 84px); transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; }
#toast.on { opacity: 1; }

/* login */
.login { max-width: 380px; margin: 14vh auto 0; padding: 24px; }
.login .logo { width: 100%; max-width: 320px; height: auto; margin: 0 auto 26px; display: block; }
.login p { font-family: var(--display); font-weight: 600; letter-spacing: .22em; text-transform: uppercase; font-size: 13px; text-align: center; }
.login p { color: var(--muted); margin-top: 0; }
.login .btn { width: 100%; margin-top: 14px; padding: 13px; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 12px 0; cursor: pointer; width: 100%; }

/* meeting */
.hero { background: var(--surface) url(/icons/marlin-ghost.png) no-repeat right -24px center / 150px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r); padding: 16px; }
.hero .meta { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.hero .when { font-family: var(--display); font-size: 34px; font-weight: 800; text-transform: uppercase; line-height: 1; margin: 6px 0 14px; }
.prop { border-left: 3px solid var(--accent); }
.prop .acts { display: flex; gap: 8px; margin-top: 10px; }
.addline { display: flex; gap: 8px; margin-top: 6px; }
details.past summary { list-style: none; cursor: pointer; }
details.past summary::-webkit-details-marker { display: none; }
.md { font-size: 14px; color: #c9d6e0; white-space: pre-wrap; margin-top: 10px; max-height: 60vh; overflow-y: auto; }
.stock-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.stock-tbl td { padding: 5px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.kpi .card { margin: 0; text-align: center; padding: 10px 6px; }
.kpi b { display: block; font-family: var(--display); font-weight: 800; font-size: 26px; }
.kpi span { font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ro { background: var(--bg); border-radius: 4px; padding: 10px 12px; font-size: 13px; color: var(--muted); white-space: pre-wrap; max-height: 220px; overflow-y: auto; }
.banner { background: rgba(220,38,38,.12); color: #fca5a5; border-radius: 4px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }

/* account avatar */
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-family: var(--display); font-weight: 700; font-size: 16px; display: grid; place-items: center; cursor: pointer; flex: none; }
.avatar.on { border-color: var(--accent); color: var(--accent); }
.avatar.sm { width: 38px; height: 38px; cursor: default; }
.chk:disabled { opacity: .4; }

.seg.sub button { font-size: 12px; padding: 4px 10px; }
.col.term { opacity: .8; }
.col.term h3 { color: var(--dim); }
