/* ==========================================================================
   Property Analyzer — styles
   ========================================================================== */
:root {
  --bg: #0a0e15;
  --bg-2: #0f141e;
  --panel: #121926;
  --panel-2: #172033;
  --line: #223049;
  --line-soft: #1a2438;
  --txt: #e8eef9;
  --txt-dim: #93a4c2;
  --txt-faint: #64748b;
  --accent: #4f9cf9;
  --accent-2: #34d399;
  --warn: #f59e0b;
  --bad: #f87171;
  --good: #34d399;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 34px rgba(0, 0, 0, .45);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

html[data-theme="light"] {
  --bg: #eef2f8;
  --bg-2: #e4eaf4;
  --panel: #ffffff;
  --panel-2: #f4f7fc;
  --line: #d3dceb;
  --line-soft: #e4eaf4;
  --txt: #10192b;
  --txt-dim: #536580;
  --txt-faint: #8496b0;
  --accent: #1d6fdc;
  --shadow: 0 10px 28px rgba(20, 40, 80, .12);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font: 14px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }

/* ------------------------------------------------------------------ layout */
#app { display: flex; flex-direction: column; height: 100vh; }

header.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(150deg, #10505f, #05222b);
  border: 1px solid rgba(224, 175, 96, .28);
  display: grid; place-items: center; overflow: hidden;
}
.brand .logo img { display: block; width: 22px; height: 22px; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--txt-faint); letter-spacing: 0; }
.spacer { flex: 1; }

.main { flex: 1; display: flex; min-height: 0; }

/* ----------------------------------------------------------------- sidebar */
aside.sidebar {
  width: 268px; flex: 0 0 268px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.sidebar-head {
  padding: 12px 12px 8px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--txt-faint);
}
.prop-list { flex: 1; overflow-y: auto; padding: 0 8px 10px; }

.prop-card {
  position: relative;
  display: flex; gap: 10px; align-items: center;
  padding: 9px; margin-bottom: 6px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--panel-2); cursor: pointer;
  transition: border-color .12s, transform .08s;
}
.prop-card:hover { border-color: var(--line); }
.prop-card.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, var(--panel-2)); }
.prop-card .thumb {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 7px; object-fit: cover;
  background: var(--bg-2); border: 1px solid var(--line-soft);
}
.prop-card .thumb.ph { display: grid; place-items: center; font-size: 18px; color: var(--txt-faint); }
.prop-card .meta { min-width: 0; flex: 1; }
.prop-card .nm { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prop-card .sub { font-size: 11px; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prop-card .kpi { font-size: 11px; font-weight: 700; font-family: var(--mono); }
.prop-card .pin {
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px;
  border-radius: 5px; border: 1px solid var(--line); background: var(--panel);
  display: grid; place-items: center; font-size: 10px; color: var(--txt-faint);
  opacity: 0; cursor: pointer;
}
.prop-card:hover .pin, .prop-card .pin.on { opacity: 1; }
.prop-card .pin.on { color: var(--accent); border-color: var(--accent); }
.prop-card .card-del {
  position: absolute; bottom: 6px; right: 6px; width: 20px; height: 20px;
  border-radius: 5px; border: 1px solid var(--line); background: var(--panel);
  display: grid; place-items: center; font-size: 10px; line-height: 1; color: var(--txt-faint);
  opacity: 0; cursor: pointer; padding: 0;
}
.prop-card:hover .card-del { opacity: 1; }
.prop-card .card-del:hover { color: var(--bad); border-color: var(--bad); }

/* ------------------------------------------------------------------ content */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }

.tabs {
  display: flex; gap: 2px; padding: 0 16px;
  background: var(--panel); border-bottom: 1px solid var(--line); flex: 0 0 auto;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 11px 14px; font-size: 13px; font-weight: 600; color: var(--txt-dim);
  border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--txt); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.scroll { flex: 1; overflow-y: auto; padding: 18px; }
.view { max-width: 1360px; margin: 0 auto; }

/* -------------------------------------------------------------- components */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--txt); cursor: pointer; font-size: 13px; font-weight: 600;
  transition: border-color .12s, background .12s;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #04101f; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: none; border-color: transparent; color: var(--txt-dim); }
.btn.ghost:hover { color: var(--txt); background: var(--panel-2); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.card > h3 {
  margin: 0 0 12px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--txt-faint);
  display: flex; align-items: center; gap: 8px;
}
.card > h3 .hint { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--txt-faint); font-size: 11px; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* KPI tiles */
.kpi-tile {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 12px 13px; position: relative; overflow: hidden;
}
.kpi-tile::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: .85;
}
.kpi-tile.good::before { background: var(--good); }
.kpi-tile.bad::before { background: var(--bad); }
.kpi-tile.warn::before { background: var(--warn); }
.kpi-tile .lab { font-size: 11px; color: var(--txt-dim); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi-tile .val { font-size: 22px; font-weight: 750; font-family: var(--mono); letter-spacing: -.02em; margin-top: 3px; }
.kpi-tile .val.neg { color: var(--bad); }
.kpi-tile .val.pos { color: var(--good); }
.kpi-tile .note { font-size: 11px; color: var(--txt-faint); margin-top: 2px; }

/* tables */
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th, table.tbl td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
table.tbl th {
  position: sticky; top: 0; z-index: 2; background: var(--panel);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--txt-faint); font-weight: 700;
}
table.tbl td:first-child, table.tbl th:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); z-index: 1; }
table.tbl th:first-child { z-index: 3; }
table.tbl tr:hover td { background: var(--panel-2); }
table.tbl tr.total td { border-top: 2px solid var(--line); font-weight: 750; background: var(--panel-2); }
table.tbl td.num { font-family: var(--mono); }
table.tbl td.neg { color: var(--bad); }
table.tbl td.pos { color: var(--good); }
.tbl-wrap { overflow: auto; max-height: 560px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }

/* forms */
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 11.5px; color: var(--txt-dim); margin-bottom: 3px; font-weight: 600; }
.field .sub { font-size: 10.5px; color: var(--txt-faint); margin-top: 3px; }
input[type=text], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 7px 9px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--txt);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=number] { font-family: var(--mono); }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > * { flex: 1; }
.suffix { position: relative; }
.suffix input { padding-right: 30px; }
.suffix span {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--txt-faint); pointer-events: none;
}
input[type=range] { width: 100%; accent-color: var(--accent); }
label.check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--txt-dim); cursor: pointer; }
label.check input { width: auto; }

/* seasonality editor */
.season { display: grid; grid-template-columns: 42px 1fr 1fr; gap: 6px; align-items: center; margin-bottom: 5px; }
.season .m { font-size: 12px; color: var(--txt-dim); font-weight: 650; }
.season input { padding: 5px 7px; font-size: 12.5px; }
.season-head { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--txt-faint); font-weight: 700; }

/* custom expense lines */
.cx-row { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,.8fr) minmax(0,1.3fr) auto 26px; gap: 6px; align-items: center; margin-bottom: 6px; }
.cx-row input, .cx-row select { padding: 6px 8px; font-size: 12.5px; width: 100%; min-width: 0; }
.cx-row .cx-eq { font-family: var(--mono); font-size: 11px; color: var(--txt-dim); white-space: nowrap; text-align: right; }
.cx-row .btn { padding: 0; height: 26px; }
.cx-head { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--txt-faint); font-weight: 700; margin-bottom: 4px; }

/* charts */
svg.chart { width: 100%; height: auto; display: block; }
svg.chart text.axis { fill: var(--txt-faint); font-size: 10.5px; font-family: inherit; }
svg.chart text.axis.strong { fill: var(--txt-dim); font-weight: 700; }
svg.chart text.axis.dim { fill: var(--txt-faint); opacity: .75; font-size: 10px; }
svg.chart line.grid { stroke: var(--line-soft); stroke-width: 1; }
svg.chart line.axisline { stroke: var(--line); stroke-width: 1.4; }
svg.chart text.donut-total { fill: var(--txt); font-size: 20px; font-weight: 750; font-family: var(--mono); }
svg.chart text.donut-sub { fill: var(--txt-faint); font-size: 10.5px; }
svg.chart text.heatval { fill: var(--txt); font-size: 10.5px; font-family: var(--mono); font-weight: 600; }
svg.chart .bar:hover, svg.chart .slice:hover { opacity: .82; }

/* photos */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-soft); background: var(--bg-2); }
.gallery img { width: 100%; height: 140px; object-fit: cover; display: block; cursor: zoom-in; }
.gallery .rm {
  position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 6px;
  background: rgba(6, 10, 18, .78); border: 1px solid var(--line); color: #fff; cursor: pointer; font-size: 12px; line-height: 1;
}
.hero {
  height: 188px; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2) center/cover no-repeat; border: 1px solid var(--line);
  display: grid; place-items: end start; position: relative;
}
.hero .veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(4, 8, 15, .88)); }
.hero .cap { position: relative; padding: 14px 16px; }
.hero .cap b { font-size: 18px; display: block; }
.hero .cap span { font-size: 12px; color: #c8d6ee; }

/* compare */
.cmp-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.cmp { border-collapse: collapse; width: 100%; font-size: 13px; }
table.cmp th, table.cmp td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; }
table.cmp th.rowhead, table.cmp td.rowhead {
  text-align: left; position: sticky; left: 0; background: var(--panel); font-weight: 600; z-index: 1; min-width: 210px;
}
table.cmp thead th { position: sticky; top: 0; background: var(--panel-2); z-index: 2; font-size: 12px; }
table.cmp thead th.rowhead { z-index: 3; }
table.cmp td.num { font-family: var(--mono); }
table.cmp td.best { background: color-mix(in srgb, var(--good) 17%, transparent); font-weight: 750; }
table.cmp td.worst { background: color-mix(in srgb, var(--bad) 13%, transparent); }
table.cmp tr.section td { background: var(--panel-2); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--txt-faint); }
.cmp-head { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cmp-head img { width: 100%; height: 62px; object-fit: cover; border-radius: 6px; }

/* split view */
.split { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

/* modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(4, 8, 15, .72);
  display: grid; place-items: center; z-index: 90; padding: 20px; backdrop-filter: blur(3px);
}
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); width: min(760px, 100%); max-height: 88vh; display: flex; flex-direction: column;
}
.modal header { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal header h2 { margin: 0; font-size: 16px; }
.modal .body { padding: 18px; overflow-y: auto; }
.modal footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

.steps { counter-reset: s; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding-left: 30px; margin-bottom: 12px; font-size: 13px; color: var(--txt-dim); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 21px; height: 21px;
  border-radius: 50%; background: var(--accent); color: #04101f;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.steps li b { color: var(--txt); }

.bmk {
  display: inline-block; padding: 9px 16px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04101f;
  font-weight: 800; text-decoration: none; cursor: grab; border: 0;
}
.callout {
  border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent);
  padding: 10px 12px; border-radius: 0 8px 8px 0; font-size: 12.5px; color: var(--txt-dim); margin: 12px 0;
}
.callout b { color: var(--txt); }

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--txt-dim); }
.seg button.on { background: var(--accent); color: #04101f; }

.badge { display: inline-block; padding: 2px 7px; border-radius: 20px; font-size: 10.5px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); color: var(--txt-dim); }
.badge.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }

.empty { text-align: center; padding: 70px 20px; color: var(--txt-faint); }
.empty h2 { color: var(--txt); margin: 0 0 8px; }

.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--accent); color: var(--txt);
  padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); z-index: 200; font-size: 13px; font-weight: 600;
}

.lightbox { position: fixed; inset: 0; background: rgba(2, 5, 10, .93); z-index: 300; display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 10px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--txt-faint); }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 900px) {
  aside.sidebar { width: 200px; flex-basis: 200px; }
  .brand small { display: none; }
}

@media print {
  body { overflow: visible; background: #fff; }
  aside.sidebar, header.topbar, .tabs, .no-print { display: none !important; }
  .scroll { overflow: visible; height: auto; padding: 0; }
  #app { height: auto; display: block; }
  .card { break-inside: avoid; border-color: #ccc; }
  html { --panel: #fff; --panel-2: #f7f9fc; --txt: #111; --txt-dim: #444; --txt-faint: #666; --line: #ccc; --line-soft: #e2e2e2; --bg: #fff; --bg-2: #fafafa; }
}

/* ------------------------------------------------------------- sign-in gate */
body.gated > #app { filter: blur(7px); pointer-events: none; user-select: none; }

.login-gate {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}

.login-box {
  width: min(380px, calc(100vw - 40px));
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 30px 28px 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
  text-align: center;
}
.login-mark { line-height: 0; margin-bottom: 12px; }
.login-mark img { width: 62px; height: 62px; display: inline-block; }
.login-brand { margin: 16px 0 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-faint); }
.login-box h2 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--txt); }
.login-sub { margin: 0 0 18px; font-size: 12.5px; color: var(--txt-dim); }

.login-box input[type="password"] {
  width: 100%; box-sizing: border-box;
  padding: 11px 13px; margin-bottom: 12px;
  font-size: 15px; font-family: inherit;
  color: var(--txt); background: var(--bg);
  border: 1px solid var(--line-soft); border-radius: 9px;
  outline: none; text-align: center; letter-spacing: .12em;
}
.login-box input[type="password"]:focus { border-color: #4f9cf9; box-shadow: 0 0 0 3px rgba(79, 156, 249, .18); }
.login-box .btn { width: 100%; justify-content: center; padding: 10px; font-size: 14px; }
.login-box .btn:disabled { opacity: .6; cursor: not-allowed; }

.login-msg { margin-top: 12px; font-size: 12.5px; min-height: 0; opacity: 0; transition: opacity .15s; }
.login-msg.show { opacity: 1; min-height: 17px; }
.login-msg.bad { color: #f87171; }
/* ------------------------------------------------- copy-section preview */
.copy-src-list { display: flex; flex-direction: column; gap: 8px; }
.copy-src {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 13px; font: inherit; color: var(--txt); cursor: pointer;
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: 10px;
  transition: border-color .12s, background .12s;
}
.copy-src:hover:not(:disabled) { border-color: #4f9cf9; background: var(--bg-2); }
.copy-src:disabled { opacity: .5; cursor: not-allowed; }
.copy-src .cs-main { flex: 1; min-width: 0; }
.copy-src .cs-name { font-weight: 600; font-size: 13.5px; }
.copy-src .cs-sub { font-size: 11.5px; color: var(--txt-dim); margin-top: 2px; }

/* highlighted inputs that a pending import would change */
.preview-changed {
  position: relative;
  border-radius: 8px;
  background: rgba(79, 156, 249, .12);
  box-shadow: 0 0 0 2px rgba(79, 156, 249, .45);
  animation: previewPulse .45s ease-out;
}
.field.preview-changed { padding: 6px 8px; margin: -6px -8px; }
.season.preview-changed { padding: 2px 6px; margin: 0 -6px; }
.cx-row.preview-changed { padding: 4px 6px; margin: 0 -6px; }
.preview-changed input,
.preview-changed select { border-color: #4f9cf9 !important; }
@keyframes previewPulse { from { box-shadow: 0 0 0 7px rgba(79, 156, 249, 0); } }

.preview-was {
  margin-top: 4px; font-size: 11px; color: var(--txt-dim);
  text-decoration: line-through; opacity: .85;
}

/* seasonality: highlight the individual cell, and drop a "was" note under
   the month row without disturbing the 3-column grid */
.preview-cell {
  background: rgba(79, 156, 249, .12);
  border-color: #4f9cf9 !important;
  box-shadow: 0 0 0 2px rgba(79, 156, 249, .45);
  animation: previewPulse .45s ease-out;
}
.preview-was-cell {
  grid-column: 2 / -1;
  margin: 0 0 2px; font-size: 10.5px; font-family: var(--mono);
}

/* confirmed / still-a-default markers */
.inp-wrap { position: relative; }
.inp-wrap input { padding-right: 30px; }
.inp-wrap.has-sfx input { padding-right: 58px; }
.inp-wrap .sfx {
  position: absolute; right: 30px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--txt-faint); pointer-events: none;
}
.conf-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; padding: 0; border-radius: 5px; cursor: pointer;
  border: 1px solid transparent; background: transparent;
  font-size: 12px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.conf-btn:hover { border-color: currentColor; }
.conf-no input { border-color: rgba(226, 143, 42, .55); background: rgba(226, 143, 42, .07); }
.conf-no .conf-btn { color: #e28f2a; }
.conf-yes input { border-color: rgba(45, 168, 106, .5); background: rgba(45, 168, 106, .06); }
.conf-yes .conf-btn { color: #2da86a; }
.conf-no input:focus, .conf-yes input:focus { border-color: var(--accent); }

.conf-count {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
}
.conf-count:hover { border-color: currentColor; }
.conf-count.warn { color: #e28f2a; background: rgba(226, 143, 42, .14); }
.conf-count.good { color: #2da86a; background: rgba(45, 168, 106, .14); }

.mgmt-note {
  font-size: 11px; color: var(--txt-dim); line-height: 1.45;
  padding: 7px 9px; border-radius: 7px; background: var(--bg-2); border: 1px dashed var(--line);
}

@media print { .conf-btn { display: none; } .inp-wrap input { padding-right: 9px; } }

/* confirm bar */
body.previewing { padding-bottom: 78px; }
.preview-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 900;
  display: flex; align-items: center; gap: 14px;
  width: min(720px, calc(100vw - 32px));
  padding: 12px 16px;
  background: var(--bg-2); border: 1px solid #4f9cf9; border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .45);
  animation: previewRise .18s ease-out;
}
@keyframes previewRise { from { opacity: 0; transform: translate(-50%, 14px); } }
.preview-bar .pb-icon {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none;
  border-radius: 8px; background: rgba(79, 156, 249, .18); color: #4f9cf9; font-size: 16px;
}
.preview-bar .pb-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; }
.preview-bar .pb-sub { font-size: 11.5px; color: var(--txt-dim); margin-top: 2px; }
.preview-bar .btn { flex: none; }

@media print { .preview-bar, .login-gate { display: none !important; } }