/* Black and gold, tabs on top, figures in gold monospace (the owner's pick,
   2026-10-23). Dark is the default; light stays available. */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f1efe9;
  --line: #e4e1d8;
  --text: #27241d;
  --strong: #14120d;
  --muted: #736e62;
  --primary: #96752c;
  --primary-text: #7d6024;
  --primary-soft: #fbf3dc;
  --on-primary: #ffffff;
  --ok: #15803d;
  --ok-soft: #effaf2;
  --wait: #b45309;
  --wait-soft: #fff7e6;
  --bad: #dc2626;
  --bad-soft: #fef2f2;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --pink: #db2777;
  --pink-soft: #fdf2f8;
  --shadow: 0 1px 2px rgba(20, 16, 8, .06);
  --dot: 150, 117, 44;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", "SF Mono", Consolas, monospace;
  color-scheme: light;
}
:root.dark {
  --bg: #08080a;
  --surface: #111114;
  --surface-2: #19191d;
  --line: #25252b;
  --text: #d6d6db;
  --strong: #fafafa;
  --muted: #8b8b95;
  --primary: #b8954a;
  --primary-text: #cdac62;
  --primary-soft: rgba(184, 149, 74, .10);
  --on-primary: #1a1306;
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .08);
  --wait: #fbbf24;
  --wait-soft: rgba(251, 191, 36, .08);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, .08);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, .08);
  --pink: #f472b6;
  --pink-soft: rgba(244, 114, 182, .08);
  --shadow: none;
  --dot: 205, 172, 98;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
h1 { font-size: 22px; font-weight: 700; color: var(--strong); margin: 4px 0 18px; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; color: var(--strong); margin: 0 0 12px; }
.ic { flex-shrink: 0; }

/* ---- Shell: header, tabs, drifting dots behind everything ---- */
#bg-dots { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.shell { position: relative; z-index: 1; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px max(24px, calc((100% - 1240px) / 2)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand span { font-size: 17px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-text); }
.clock { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; font-size: 13px; font-family: var(--mono); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-right form { margin: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 10px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.icon-btn:hover { color: var(--strong); background: var(--surface-2); filter: none; }
#theme .ic + .ic, .dark #theme .ic:first-child { display: none; }
.dark #theme .ic + .ic { display: block; }
.user { display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.user b { display: block; color: var(--strong); font-size: 13.5px; line-height: 1.2; }
.user span { color: var(--primary-text); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.avatar { display: inline-flex; width: 32px; height: 32px; border-radius: 9px; align-items: center; justify-content: center; background: var(--primary); color: var(--on-primary) !important; font-size: 15px !important; font-weight: 800; text-transform: uppercase; letter-spacing: 0 !important; }

.tabs { position: relative; z-index: 15; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 16px max(24px, calc((100% - 1240px) / 2)); border-bottom: 1px solid var(--line); }
.tabs > a, .nav-more > summary { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 13.5px; }
.tabs > a .ic, .nav-more > summary .ic { color: var(--muted); }
.tabs > a:hover, .nav-more > summary:hover { text-decoration: none; color: var(--strong); border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.tabs > a.on, .nav-more > summary.on { color: var(--primary-text); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 65%, transparent); }
.tabs > a.on .ic, .nav-more > summary.on .ic { color: var(--primary-text); }
.nav-more { position: relative; }
.nav-more > summary { list-style: none; cursor: pointer; }
.nav-more > summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 2px; z-index: 30; }
.more-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 500; }
.more-menu a .ic { color: var(--muted); }
.more-menu a:hover { background: var(--surface-2); text-decoration: none; }
.more-menu a.on { color: var(--primary-text); background: var(--primary-soft); }

main { width: 100%; max-width: 1288px; margin: 0 auto; padding: 22px 24px 64px; }

/* ---- App frame (owner, 2026-10-23): header and tabs stay put, the page
   area scrolls inside with no visible bar, list cards fill the screen and
   scroll inside, and the home page fits the screen. ---- */
html, .page-area, .scroll, .feed, .fill > .card { scrollbar-width: none; }
html::-webkit-scrollbar, .page-area::-webkit-scrollbar, .scroll::-webkit-scrollbar,
.feed::-webkit-scrollbar, .fill > .card::-webkit-scrollbar { display: none; }
table.list thead th { position: sticky; top: 0; z-index: 2; }
@media (min-width: 761px) {
  body.app { height: 100vh; overflow: hidden; }
  .shell { height: 100vh; display: flex; flex-direction: column; }
  .topbar, .tabs { flex: none; }
  .page-area { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
  .page-area > main { flex: 1 0 auto; display: flex; flex-direction: column; padding-bottom: 22px; }
  main > * { flex-shrink: 0; }
  main > .fill { flex: 1 1 0; min-height: 200px; margin-bottom: 18px; }
  main > .fill:last-child { margin-bottom: 0; }
  .card.table-card.fill { display: flex; flex-direction: column; }
  .table-card.fill > .scroll { flex: 1 1 0; min-height: 0; overflow: auto; }
  main > .grid-wide.fill, main > .grid-halves.fill { grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .fill > .card { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
  .fill > .card.table-card { overflow: hidden; }
  .fill > .card.table-card > .scroll { flex: 1 1 0; min-height: 0; overflow: auto; }
  .fill > .card > .feed { flex: 1 1 0; min-height: 0; overflow-y: auto; }
}

/* ---- Building blocks ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card.narrow { max-width: 560px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.card-head .end { margin-left: auto; text-align: right; }
.card-head .count { margin-left: auto; display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 12.5px; }
.card-head .count b { font-size: 20px; color: var(--ok); }
.card-head .count + .end, .card-head .count + form { margin-left: 14px; }
.card-head .count.wait b { color: var(--wait); }
.card-head .count.bad b { color: var(--bad); }
.card-head .count.plain b { color: var(--strong); }
.chip { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.wait { background: var(--wait-soft); color: var(--wait); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.primary { background: var(--primary-soft); color: var(--primary-text); }
.chip.pink { background: var(--pink-soft); color: var(--pink); }
.chip.muted { background: var(--surface-2); color: var(--muted); }
.card-head .chip { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); color: var(--primary-text); }
.grid2, .grid3 { display: grid; gap: 20px; margin-bottom: 20px; }
.grid2 > .card, .grid3 > .card, .grid-wide > .card { margin-bottom: 0; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid-wide { display: grid; gap: 20px; margin-bottom: 20px; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
.grid-wide.top { align-items: start; }
.grid-thirds { display: grid; gap: 20px; margin-bottom: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-thirds > .card { margin-bottom: 0; }
.grid-halves { display: grid; gap: 18px; margin-bottom: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-halves > .card { margin-bottom: 0; }

.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); margin-bottom: 18px; }
@media (min-width: 1400px) { .tiles.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 900px) { .tiles.eight { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); color: inherit; }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tile-top { align-items: flex-start; }
.tile-top .label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: normal; line-height: 1.35; }
.tile-top .chip { width: 22px; height: 22px; border-radius: 0; background: none; color: var(--muted); }
.tile .big { font-family: var(--mono); font-size: 23px; font-weight: 700; color: var(--primary-text); margin-top: 12px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .big small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 5px; }
.tile .big.mid { font-size: 20px; }
.tile .big.second { font-size: 16px; margin-top: 3px; color: var(--strong); }
.tile .big.second small { font-size: 13px; }
a.tile:hover { text-decoration: none; border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); }
.tile.hero { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); background: linear-gradient(160deg, var(--primary-soft), var(--surface) 70%); }
.tile .label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tile .value { font-size: 22px; font-weight: 700; color: var(--strong); margin-top: 10px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .value.value-sm { font-size: 17px; }
.tile .sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.tile .ok { color: var(--ok); } .tile .wait { color: var(--wait); } .tile .bad { color: var(--bad); }
.tile .info { color: var(--info); } .tile .primary { color: var(--primary-text); } .tile .pink { color: var(--pink); }

.feed { display: flex; flex-direction: column; gap: 8px; }
.feed-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--bg) 60%, var(--surface)); color: inherit; }
a.feed-row:hover { text-decoration: none; border-color: var(--primary); }
.feed-row .chip { width: 34px; height: 34px; border-radius: 9px; }
.feed-row .main { flex: 1; min-width: 0; }
.feed-row .main b { display: block; color: var(--strong); font-size: 15px; line-height: 1.3; font-family: var(--mono); }
.feed-row .main div { color: var(--muted); font-size: 12.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-row .end { text-align: right; font-size: 12px; line-height: 1.3; color: var(--muted); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.empty { text-align: center; color: var(--muted); padding: 28px 0; }

.rows { display: flex; flex-direction: column; }
.rows > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows > div:last-child { border-bottom: 0; }
.rows span:first-child { color: var(--muted); }
.rows b { color: var(--strong); font-weight: 600; }

.muted { color: var(--muted); }
.strong { color: var(--strong); font-weight: 600; }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }

.flash { border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; border: 1px solid; color: var(--strong); }
.flash a { font-weight: 600; margin-left: 6px; }
.flash.wait { background: var(--wait-soft); border-color: color-mix(in srgb, var(--wait) 45%, transparent); }
.flash.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.flash.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.invite { margin-top: 8px; padding: 8px; background: var(--bg); border-radius: 8px; }

.badge, .pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge.ok, .pill.ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.badge.wait, .pill.wait { color: var(--wait); background: var(--wait-soft); border-color: color-mix(in srgb, var(--wait) 30%, transparent); }
.badge.bad, .pill.bad { color: var(--bad); background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.badge.muted, .pill.muted { color: var(--muted); background: var(--surface-2); border-color: var(--line); }

/* ---- Tables ---- */
.scroll { overflow-x: auto; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; }
table.list th, table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list th.r, table.list td.r { text-align: right; }
table.list thead th, table.list tr:first-child th { background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
table.list tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
table.list td[colspan] { text-align: center; padding: 28px 14px; }

/* A card holding a full-bleed table under its header (lists on every page). */
.card.table-card { padding: 0; overflow: hidden; }
.table-card > .card-head { padding: 16px 22px; margin: 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 72px; }
.table-card > .scroll { border: 0; border-radius: 0; margin: 0; box-shadow: none; background: none; }
.table-card table.list th:first-child, .table-card table.list td:first-child { padding-left: 22px; }
.table-card table.list th:last-child, .table-card table.list td:last-child { padding-right: 22px; }
.table-card table.list td { padding-top: 13px; padding-bottom: 13px; }
.table-card > .pager { padding: 14px 22px; border-top: 1px solid var(--line); }
.card-head form.filters { margin: 0 0 0 auto; padding: 0; border: 0; background: none; border-radius: 0; }
.card-head form.filters input { min-width: 280px; }
.card-head .count + form.filters { margin-left: 14px; }
table.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 7px 12px 7px 0; width: 45%; }
table.kv td { padding: 7px 0; color: var(--strong); }

/* ---- Forms ---- */
form.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
form.filters input { flex: 1; min-width: 200px; }
input, select, button { font: inherit; color: var(--text); }
input, select { background: color-mix(in srgb, var(--bg) 65%, var(--surface)); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; min-width: 0; }
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 0; border-color: var(--primary); }
button { background: var(--primary); color: var(--on-primary); border: 1px solid transparent; border-radius: 9px; padding: 9px 18px; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button.danger { background: var(--bad); color: #fff; }
.dark button.danger { color: #1f1315; }
button.small { padding: 5px 12px; font-size: 13px; }
button.link { background: none; color: var(--primary-text); padding: 0; font-weight: 500; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label input, label select { color: var(--text); font-size: 14px; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
.confirm { display: grid; grid-template-columns: 1fr 150px; gap: 10px; }
form.inline { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
form.inline .confirm { flex: 1; min-width: 280px; }
form.inline > select, form.inline > button { margin-bottom: 12px; }
form.stack { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; min-width: 260px; }
form.stack .confirm { grid-template-columns: 1fr; }
details summary { cursor: pointer; color: var(--primary-text); font-size: 13px; font-weight: 500; }
.switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.switches.stacked { grid-template-columns: minmax(0, 1fr); }
.switch { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.switch b { color: var(--strong); }
.pager { display: flex; gap: 10px; }
.pager a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 500; }
.pager a:hover { text-decoration: none; border-color: var(--primary); }
.mt { margin-top: 12px; }
.section { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
.section h2 { margin: 0; }
.section .chip { width: 32px; height: 32px; border-radius: 8px; }
.back { display: inline-block; margin-bottom: 6px; font-weight: 500; }
h1.with-badge { display: flex; align-items: center; gap: 12px; }
h1.with-badge .badge { font-size: 13px; }
details.fold summary { font-size: 14px; font-weight: 600; color: var(--strong); }
td.r details { text-align: left; display: inline-block; }
td.r details summary { text-align: right; }
form.stack p { margin: 0 0 6px; color: var(--text); max-width: 320px; }
.card > p { margin: 0 0 14px; }
.timeline { margin: 0 0 16px; padding-left: 18px; }
.timeline li { margin-bottom: 8px; }

/* ---- Sign-in pages ---- */
.auth-page { max-width: none; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 6vh 16px 40px; }
.auth-net { margin-bottom: 16px; }
.auth-flash { width: 100%; max-width: 420px; }
.auth { width: 100%; max-width: 420px; }
.auth.wide { max-width: 540px; }
.auth-logo { display: block; margin: 0 auto 8px; height: 72px; width: auto; }
.auth h1 { text-align: center; font-size: 20px; margin: 0; }
.auth > p { text-align: center; color: var(--muted); margin: 4px 0 20px; }
.auth form { margin-top: 0; padding: 24px; }
.auth button { width: 100%; margin-top: 6px; padding: 11px 16px; }
.steps { padding-left: 18px; margin-top: 0; }
.steps li { margin-bottom: 10px; }
.qr { background: #fff; display: inline-block; padding: 8px; border-radius: 8px; margin-top: 8px; }
.qr img { display: block; image-rendering: pixelated; }

/* ---- One-time credentials window after adding a user ---- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 620px; margin: 0; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.cred { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cred > span { width: 120px; flex-shrink: 0; color: var(--muted); }
.cred code { flex: 1; font-size: 16px; color: var(--strong); word-break: break-all; }
.modal > p { margin: 14px 0; color: var(--muted); }
.copy-all { width: 100%; padding: 12px 16px; }

/* ---- Withdrawals: the owner's pool top-up card ---- */
.pool-card { display: flex; gap: 28px; align-items: center; }
.pool-info { flex: 1; min-width: 0; }
.pool-info > p { margin: 0 0 14px; }
.pool-address { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); margin-bottom: 14px; }
.pool-address code { font-size: 16px; color: var(--strong); word-break: break-all; }
.pool-figures { display: flex; gap: 28px; flex-wrap: wrap; }
.pool-figures > div { display: flex; flex-direction: column; gap: 2px; }
.pool-figures span { color: var(--muted); font-size: 13px; }
.pool-figures b { color: var(--strong); font-size: 16px; }
.pool-figures .short b { color: var(--bad); }
/* ---- Settings: send pool funds to the cold wallet (form + summary) ---- */
.send-grid { display: grid; gap: 18px; margin-bottom: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.send-grid > .card { margin-bottom: 0; display: flex; flex-direction: column; }
.send-grid .send-foot { margin-top: auto; }
.send-grid .field:has(+ .send-foot) { margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 16px; color: var(--muted); }
.field:last-child { margin-bottom: 0; }
.field-label { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field-label em { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; }
.field > input, .field-input input { width: 100%; font-size: 15px; padding: 10px 12px; color: var(--strong); }
.field-input { display: flex; gap: 8px; }
.field-input input { flex: 1; font-family: var(--mono); font-weight: 700; color: var(--primary-text); }
button.ghost { padding: 8px 14px; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--primary-text); border: 1px solid var(--line); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { margin: 0; flex: 0 0 auto; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; min-width: 92px; text-align: center; padding: 9px 16px; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--bg) 65%, var(--surface)); color: var(--text); font-weight: 700; cursor: pointer; }
.seg input:checked + span { color: var(--primary-text); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 60%, transparent); }
.seg input:focus-visible + span { outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent); }
.rows.sum > div { padding: 11px 0; }
.rows.sum > div[hidden] { display: none; }
.rows.sum b { font-family: var(--mono); text-align: right; }
.rows.sum b .muted { font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
.rows.sum b .muted { font-weight: 500; font-size: 12px; }
.gold { color: var(--primary-text) !important; }
.bad-text { color: var(--bad) !important; }
.sum-note { margin: 12px 0 0; color: var(--wait); font-size: 13px; }
.sum-send { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.sum-send button { padding: 10px 22px; }
.sum-send button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.sum-send span { color: var(--muted); font-size: 12.5px; }
.send-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.send-foot .badge { margin: 0 4px; }
@media (max-width: 1100px) { .send-grid { grid-template-columns: minmax(0, 1fr); } }
.pool-qr { flex-shrink: 0; width: 132px; height: 132px; background: #fff; padding: 8px; border-radius: 12px; image-rendering: pixelated; }
.pool-card { padding-top: 16px; padding-bottom: 16px; }
.pool-card .card-head { margin-bottom: 8px; }
.pool-info > p { margin: 0 0 10px; }
.pool-address { padding: 8px 12px; margin-bottom: 10px; }
/* The active tab already names these pages. */
main.page-yatirimlar > h1:not(.with-badge), main.page-cekimler > h1:not(.with-badge),
main.page-ayarlar > h1, main.page-kullanicilar > h1 { display: none; }
.pool-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.pool-pair > .card { margin-bottom: 0; }
.pool-pair .pool-address code { font-size: 14px; }
@media (max-width: 1100px) { .pool-pair { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .pool-card { flex-direction: column; align-items: stretch; } .pool-qr { align-self: center; } }

details.tech > summary { list-style: none; cursor: pointer; }
details.tech > summary::-webkit-details-marker { display: none; }
details.tech:not([open]) > summary { border-bottom: 0; }
details.tech[open] .end { visibility: hidden; }

/* ---- Emergency switches: one strip each, green when on, red when off ---- */
.switch-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.switch-row.on { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.switch-row.off { border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: linear-gradient(90deg, var(--bad-soft), var(--surface) 60%); }
.switch-row > .chip { width: 34px; height: 34px; border-radius: 50%; }
.switch-row .txt { flex: 1; min-width: 0; }
.switch-row .txt b { display: flex; align-items: center; gap: 10px; color: var(--strong); font-size: 15px; }
.switch-row .txt > span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.switch-row details { position: relative; }
.switch-row summary { list-style: none; padding: 8px 18px; border-radius: 9px; font-weight: 700; font-size: 13.5px; border: 1px solid; }
.switch-row summary::-webkit-details-marker { display: none; }
.switch-row summary.to-off { color: var(--bad); background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.switch-row summary.to-on { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
/* Settings table: an on/off setting flips with one press (and 2FA), like the home switches. */
summary.toggle { list-style: none; display: inline-block; padding: 5px 14px; border-radius: 8px; font-weight: 700; font-size: 12.5px; border: 1px solid; }
summary.toggle::-webkit-details-marker { display: none; }
summary.toggle.to-off { color: var(--bad); background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
summary.toggle.to-on { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
/* Coins card: the state badge with its switch beside it. */
details.coin-switch { display: inline-block; margin-left: 8px; vertical-align: middle; }
.switch-form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 25; width: 320px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }
/* Home: the three switches side by side under the figures. */
.switch-grid { display: grid; gap: 12px; margin-bottom: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.switch-grid .switch-row { margin-bottom: 0; padding: 12px 14px; gap: 12px; }
.switch-grid .switch-row .txt b { font-size: 14px; }
@media (max-width: 1100px) { .switch-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Narrow screens ---- */
@media (max-width: 1100px) {
  .grid-wide, .grid-thirds, .grid-halves { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .topbar, .tabs { padding-left: 12px; padding-right: 12px; }
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .brand span, .clock, .user div { display: none; }
  .user { padding: 4px; }
  main { padding: 16px 12px 48px; }
  .confirm { grid-template-columns: 1fr; }
  .tile .value { font-size: 20px; }
  h1 { font-size: 20px; }
}
