/* Power Point Ops — "Field ledger" admin. Hand-written CSS: no build step, so it deploys anywhere PHP does. */

:root {
  --bg: #F6F5F1; --surface: #FFFFFF; --sunk: #EFEDE7; --line: #E3E0D8;
  --ink: #1A1A17; --muted: #6B6960; --brand: #F5B800; --on-brand: #1A1A17;
  --done: #2F7D4F; --warn: #B4541A; --danger: #B3261E;
  --r-control: 6px; --r-card: 10px;
  --side-bg: #0E0E0D; --side-line: #2E2D29; --side-ink: #F2F1EC; --side-muted: #A3A096; --side-hover: #232320;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #121211; --surface: #1B1B19; --sunk: #232320; --line: #2E2D29; --ink: #F2F1EC; --muted: #A3A096;
    --brand: #FFC72C; --done: #5BBE84; --warn: #E58A4E; --danger: #F08A82; color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #121211; --surface: #1B1B19; --sunk: #232320; --line: #2E2D29; --ink: #F2F1EC; --muted: #A3A096;
  --brand: #FFC72C; --done: #5BBE84; --warn: #E58A4E; --danger: #F08A82; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-family: var(--sans); font-size: 14px; background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); line-height: 1.45; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--brand); color: var(--on-brand); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
code, kbd, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { letter-spacing: -.01em; }
.muted { color: var(--muted); }
.ok { color: var(--done); } .warn { color: var(--warn); } .danger { color: var(--danger); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.right { text-align: right; }
.strong { font-weight: 600; } .medium { font-weight: 500; }
.text-sm { font-size: 12.5px; } .text-xs { font-size: 11.5px; } .text-md { font-size: 16px; } .text-xl { font-size: 24px; letter-spacing: -.02em; }
.stack { display: grid; gap: 24px; align-content: start; }
.flex { display: flex; } .wrap { flex-wrap: wrap; } .center { align-items: center; } .between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.grow { flex: 1; min-width: 0; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.icon { flex-shrink: 0; }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-control);
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; transition: background .15s, filter .15s;
}
.btn:hover { background: var(--sunk); text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.btn-primary:hover { background: var(--brand); filter: brightness(.95); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 40px; padding: 0 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-control); color: var(--muted); }
.icon-btn:hover { background: var(--sunk); color: var(--ink); text-decoration: none; }
.link-btn { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.link-btn:hover { color: var(--ink); }
.link-btn.danger:hover { color: var(--danger); }

.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-control);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
}
textarea.input { height: 80px; padding: 8px 12px; resize: vertical; }
.input::placeholder { color: var(--muted); }
.input:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }
.input-auto { width: auto; }
.input-sm { height: 30px; font-size: 13px; }
.has-icon { position: relative; display: block; }
.has-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.has-icon .input { padding-left: 36px; }
.field { display: block; }
.label { display: block; margin-bottom: 4px; font-size: 12.5px; color: var(--muted); }
.err { display: block; margin-top: 4px; font-size: 12.5px; color: var(--danger); }
.hint { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.form { display: grid; gap: 16px; }
.form-2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; }

/* ------------------------------------------------------------------ surfaces */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px;
  box-shadow: 0 1px 2px rgb(30 28 18 / .04), 0 14px 30px -22px rgb(30 28 18 / .28);
}
:root[data-theme='dark'] .card { box-shadow: 0 14px 30px -22px rgb(0 0 0 / .7); }
.card.flush { padding: 0; overflow: hidden; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.card-title::after { content: ''; display: block; width: 22px; height: 3px; margin-top: 6px; border-radius: 2px; background: var(--brand); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head .card-title { margin: 0; }
.dawn { background: radial-gradient(90% 160% at 100% 0%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%), var(--surface); }
.ruler {
  height: 9px; margin-top: 8px; max-width: 360px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 8px), repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 40px);
  background-size: 100% 5px, 100% 9px; background-repeat: repeat-x;
  -webkit-mask-image: linear-gradient(90deg, #000 0, transparent 90%); mask-image: linear-gradient(90deg, #000 0, transparent 90%);
}
.avatar {
  display: inline-grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
  background: var(--sunk); border: 1px solid var(--line); font-size: 10.5px; font-weight: 600; color: var(--ink);
}
.avatar.lg { width: 32px; height: 32px; font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ------------------------------------------------------------------ shell */
.shell { min-height: 100vh; }
.side { display: none; }
.main-col { min-width: 0; padding-bottom: 64px; }
@media (min-width: 768px) {
  .shell { display: flex; }
  .side {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; width: 56px; flex-shrink: 0; overflow: hidden;
    padding: 8px; background: var(--side-bg); color: var(--side-ink); border-right: 1px solid var(--side-line);
  }
  .main-col { flex: 1; padding-bottom: 0; }
  .tabbar { display: none !important; }
}
@media (min-width: 1280px) { .side { width: 224px; padding: 12px; } }
.side .brand { display: flex; justify-content: center; margin-bottom: 16px; }
.brand-chip { width: 32px; height: 32px; border-radius: 4px; background: #fff; overflow: hidden; }
.brand-chip img { height: 32px; max-width: none; object-fit: cover; object-position: left; }
.brand-wide { display: none; width: 100%; padding: 8px 10px; border-radius: var(--r-control); background: #fff; }
.brand-wide img { width: 100%; height: auto; }
@media (min-width: 1280px) { .brand-chip { display: none; } .brand-wide { display: block; } .side .brand { display: block; } }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a, .side-btn {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r-control);
  color: var(--side-muted); font-weight: 500; font-size: 14px; width: 100%; text-align: left;
}
.nav a:hover, .side-btn:hover { background: var(--side-hover); color: var(--side-ink); text-decoration: none; }
.nav a.active { background: var(--brand); color: var(--on-brand); }
.nav .lbl, .side-btn .lbl { display: none; }
@media (min-width: 1280px) { .nav .lbl, .side-btn .lbl { display: inline; } }
.side-scene { margin-top: auto; display: none; height: 112px; width: 100%; opacity: .7; pointer-events: none; }
@media (min-width: 1280px) { .side-scene { display: block; } }
.side-foot { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.side-scene + .side-foot { margin-top: 0; }
.side-foot .who { min-width: 0; display: none; flex: 1; }
@media (min-width: 1280px) { .side-foot .who { display: block; } }
.side-foot .who small { display: block; font-size: 11.5px; font-weight: 400; color: var(--side-muted); }

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; padding: 0 16px;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px);
}
@media (min-width: 768px) { .topbar { padding: 0 32px; } }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.crumbs .here { color: var(--ink); }
.top-search { display: flex; width: 100%; max-width: 320px; }
.top-search .input { height: 32px; font-size: 13px; }
.page { width: 100%; max-width: 1400px; margin: 0 auto; padding: 24px 16px; animation: pp-page .45s cubic-bezier(.16, 1, .3, 1) both; }
@media (min-width: 768px) { .page { padding: 24px 32px; } }
@keyframes pp-page { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; align-items: center; justify-content: space-around; height: 56px;
  border-top: 1px solid var(--line); background: var(--surface);
}
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 44px; height: 44px; font-size: 11.5px; color: var(--muted); }
.tabbar a.active { color: var(--ink); }
.tabbar a:hover { text-decoration: none; }

.flash { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); font-size: 14px; }
.flash.ok { border-left: 3px solid var(--done); color: var(--ink); }
.flash.bad { border-left: 3px solid var(--danger); color: var(--ink); }

.page-header { margin-bottom: 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-header h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.page-header .sub { margin-top: 4px; color: var(--muted); }
.page-header .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; font-size: 12.5px; color: var(--muted); }
.back:hover { color: var(--ink); text-decoration: none; }

/* ------------------------------------------------------------------ stage rail: done = ink, current = brand, upcoming = line */
.rail { width: 100%; }
.rail.xs { min-width: 120px; max-width: 200px; }
.rail .segs { display: flex; gap: 2px; }
.rail .seg { flex: 1; height: 6px; border-radius: 2px; background: var(--line); }
.rail.md .seg { height: 8px; }
.rail .seg.done { background: var(--ink); }
.rail .seg.cur { background: var(--brand); transform-origin: left; animation: pp-fill .18s ease-out; }
@keyframes pp-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.rail .cap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11.5px; }
.rail.md .cap { margin-top: 8px; font-size: 12.5px; }
.rail .cap .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.rail .cap .lbl.on { color: var(--ink); }
.rail.md .cap .lbl { font-weight: 500; color: var(--ink); }
.rail .cap .n { color: var(--muted); font-family: var(--mono); }

.timeline { position: relative; }
.timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: 9px; top: 20px; bottom: -4px; width: 1px; background: var(--line); }
.timeline li.done::before { background: var(--ink); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: relative; z-index: 1; display: grid; place-items: center; width: 19px; height: 19px; margin-top: 2px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); }
.timeline li.done .dot { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.timeline li.current .dot { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.timeline .body { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; min-width: 0; }
.timeline .name { font-size: 14px; color: var(--muted); }
.timeline li.done .name, .timeline li.current .name { color: var(--ink); font-weight: 500; }
.timeline form.inline { display: flex; align-items: center; gap: 4px; }

/* ------------------------------------------------------------------ lists / tables */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); font-size: 14px; transition: border-color .15s, color .15s;
}
.pill:hover { border-color: var(--muted); color: var(--ink); text-decoration: none; }
.pill b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.pill.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pill.on b { color: var(--bg); }
.pill.warn:not(.on) { color: var(--warn); } .pill.warn:not(.on) b { color: var(--warn); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; }
.chip:hover { background: var(--sunk); text-decoration: none; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.toolbar .search { flex: 1; min-width: 220px; max-width: 320px; }
.toolbar .push { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seg-toggle { display: inline-flex; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); }
.seg-toggle a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; font-size: 14px; color: var(--muted); }
.seg-toggle a.on { background: var(--sunk); color: var(--ink); font-weight: 500; }
.seg-toggle a:hover { text-decoration: none; color: var(--ink); }

.tbl { width: 100%; }
.tbl .tr { display: grid; align-items: center; gap: 4px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tbl .tr:last-child { border-bottom: 0; }
.tbl .th { display: none; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
a.tr:hover, .tr.hl:hover { background: color-mix(in srgb, var(--sunk) 50%, var(--surface)); text-decoration: none; }
.tbl .tr { position: relative; }
.tr .stretch::after { content: ''; position: absolute; inset: 0; }
.tr .above { position: relative; z-index: 1; }
.tr .p { font-size: 14px; font-weight: 500; }
.tr .s { font-size: 12.5px; color: var(--muted); }
.empty { padding: 48px 16px; text-align: center; }
@media (min-width: 768px) {
  .tbl .th { display: grid; align-items: center; gap: 16px; }
  .cols-inq { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.3fr) minmax(0, 1.8fr) minmax(0, 1fr); }
  .cols-inq.sel { grid-template-columns: 28px minmax(0, 2.4fr) minmax(0, 1.3fr) minmax(0, 1.8fr) minmax(0, 1fr); }
  .cols-cust { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, 1.2fr) 80px; }
  .cols-team { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.6fr) 100px minmax(0, 1.2fr) 190px; }
}
.sortlink { display: inline-flex; align-items: center; gap: 4px; }
.sortlink:hover { color: var(--ink); text-decoration: none; }
.bulkbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 8px 16px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.kbd-help { margin-top: 12px; font-size: 12.5px; color: var(--muted); display: none; }
@media (min-width: 768px) { .kbd-help { display: block; } }
kbd { padding: 0 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); font-size: 11.5px; }

/* pipeline */
.pipe { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.pipe .col { flex: 0 0 224px; border: 1px solid var(--line); border-radius: var(--r-card); background: color-mix(in srgb, var(--sunk) 55%, var(--bg)); }
.pipe .col h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); }
.pipe .col h3 .n { color: var(--muted); font-family: var(--mono); font-weight: 500; }
.pipe .cards { display: grid; gap: 8px; padding: 8px; }
.pipe .job { display: block; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); transition: transform .15s, box-shadow .15s; }
.pipe .job:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgb(30 28 18 / .5); }
.pipe .job.stalled { border-left: 3px solid var(--warn); }

/* ------------------------------------------------------------------ detail */
.cols-2 { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
@media (min-width: 1024px) { .cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dash { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .dash { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash .span-2 { grid-column: span 2; } .dash .span-3 { grid-column: span 3; } }
.contact li { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.contact .icon { color: var(--muted); }
.kv { display: grid; gap: 6px; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; }
.kv dt { color: var(--muted); }
.kv .total { font-weight: 500; } .kv .total dt { color: var(--ink); }
.loanbox { padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); }
.meter { height: 6px; overflow: hidden; border-radius: 999px; background: var(--line); margin-top: 8px; }
.meter > span { display: block; height: 100%; background: var(--done); }
.meter.ink > span { background: var(--ink); } .meter.brand > span { background: var(--brand); }
.paylist { margin-top: 16px; border-top: 1px solid var(--line); }
.paylist li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.paylist li:last-child { border-bottom: 0; }
.activity h3 { margin-bottom: 8px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.activity ul { display: grid; gap: 10px; }
.activity li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.activity .group + .group { margin-top: 20px; }
.copyline { display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; }
.copyline:hover { color: var(--ink); }

/* dashboard bars */
.bars { display: flex; align-items: stretch; gap: 6px; height: 224px; }
.bars a { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; border-radius: 4px; }
.bars a:hover { text-decoration: none; }
.bars .col { flex: 1; display: flex; align-items: flex-end; }
.bars .col span { width: 100%; border-radius: 3px 3px 0 0; background: var(--brand); transition: filter .15s; }
.bars a:hover .col span { filter: brightness(.93); }
.bars .col span.zero { background: var(--sunk); } .bars .col span.ns { background: var(--line); }
.bars .n { text-align: center; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.bars .n.zero { color: var(--muted); font-weight: 400; }
.bars .k { text-align: center; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.bars .lbl { display: none; text-align: center; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1024px) { .bars .lbl { display: block; } }
.joblist li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: var(--r-control); }
.joblist li a:hover { background: var(--sunk); text-decoration: none; }
.load li a { display: block; border-radius: 4px; padding: 4px 0; }
.load li a:hover { background: var(--sunk); text-decoration: none; }
.load li + li { margin-top: 8px; }
.load .meter { margin-top: 6px; height: 6px; }
.feed li { border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed li a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; padding: 10px 0; }
.feed li a:hover { text-decoration: none; }
.money-big { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }

/* ------------------------------------------------------------------ dialogs */
dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px -20px rgb(0 0 0 / .5); }
dialog::backdrop { background: rgb(14 14 13 / .55); backdrop-filter: blur(2px); }
dialog[open] { animation: pp-pop .18s cubic-bezier(.16, 1, .3, 1); }
@keyframes pp-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: 16px; font-weight: 600; }
.dlg-body { padding: 20px; display: grid; gap: 16px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; }
.pw { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--sunk); font-size: 16px; user-select: all; }

/* ------------------------------------------------------------------ sign in */
.login { display: grid; min-height: 100vh; }
@media (min-width: 1024px) { .login { grid-template-columns: 1.15fr 1fr; } }
.login-art {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 192px; overflow: hidden; padding: 24px;
  background: #0E0E0D; color: #F2F1EC;
}
@media (min-width: 1024px) { .login-art { height: auto; padding: 48px; } }
.login-art .field-wrap { position: absolute; inset: 0; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 85%); mask-image: linear-gradient(180deg, #000 30%, transparent 85%); }
.login-art canvas { position: absolute; left: 50%; top: 50%; transform-origin: center; transform: translate(-50%, -62%) perspective(1100px) rotateX(58deg) rotateZ(-32deg) scale(1.25); }
.login-art .logo { position: relative; z-index: 1; width: fit-content; padding: 6px 12px; border-radius: var(--r-control); background: #fff; }
.login-art .logo img { height: 32px; }
@media (min-width: 1024px) { .login-art .logo img { height: 40px; } }
.login-art .claim { position: relative; z-index: 1; display: none; max-width: 512px; }
@media (min-width: 1024px) { .login-art .claim { display: block; } }
.login-art .claim p { font-size: 44px; font-weight: 600; line-height: 1.05; letter-spacing: -.025em; text-wrap: balance; }
.login-art .segs { display: flex; gap: 4px; margin-top: 32px; }
.login-art .segs span { flex: 1; height: 6px; border-radius: 2px; background: #2E2D29; animation: pp-segin .5s ease-out both; }
@keyframes pp-segin { from { background: #2E2D29; } to { background: #FFC72C; } }
.login-form-wrap { display: grid; place-items: center; padding: 40px 16px; }
.login-form { width: 100%; max-width: 384px; animation: pp-rise .7s cubic-bezier(.16, 1, .3, 1) both .15s; }
@keyframes pp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.login-form h1 { font-size: 20px; font-weight: 600; }
.busy { display: flex; gap: 2px; margin-top: 12px; height: 4px; }
.busy span { flex: 1; border-radius: 2px; background: transparent; }
form.is-busy .busy span { background: var(--brand); animation: pp-busy 1.4s ease-in-out infinite; }
@keyframes pp-busy { 0%, 100% { opacity: .15; } 20% { opacity: 1; } }
.sun-ray { opacity: .28; animation: pp-ray 4.4s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes pp-ray { 0%, 100% { opacity: .28; } 12% { opacity: 1; } 30% { opacity: .28; } }
.sun-arc { stroke-dasharray: 1; animation: pp-arc 1.4s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes pp-arc { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.errpage { display: grid; place-items: center; min-height: 60vh; text-align: center; gap: 8px; }
.errpage .code { font-size: 64px; font-weight: 600; letter-spacing: -.04em; color: var(--brand); font-family: var(--mono); }

@media (prefers-reduced-motion: reduce) { * { transition-duration: 0ms !important; animation-duration: 0ms !important; } }
@media (max-width: 640px) { .form-2 { grid-template-columns: 1fr; } }

.selcell { display: none; place-items: center; cursor: pointer; }
@media (min-width: 768px) { .selcell { display: grid; } }
.right-md { text-align: left; }
@media (min-width: 768px) { .right-md { text-align: right; } }
.input.input-auto, select.input.input-auto { width: auto; }
.input.input-sm, select.input.input-sm { height: 30px; font-size: 13px; }
