/* JuriX Kavach Kendra — console design system (aligned with jurix-frontend Kavach dashboards) */
@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --ink: #161e2e;
  --ink-2: #1a1c1e;
  --text: #2a3550;
  --shell: #f8f5f0;
  --surface: #fff;
  --ivory: #f3eee2;
  --gold: #c19a3d;
  --gold-d: #b08a2e;
  --gold-hi: #caa64a;
  --green: #3e7a4a;
  --green-d: #2e5e38;
  --red: #b0432e;
  --blue: #3e5da8;
  --muted: #9a9385;
  --note: #7d776a;
  --line: #e4ddcc;
  --border: #eef0f4;
  --row-hover: #faf8f3;
  --input-bg: #f5f3ee;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 22px rgba(22, 30, 46, 0.08);
  --radius-card: 16px;
  --radius-btn: 10px;
  --radius-chip: 16px;
  --font: 'Albert Sans', 'Figtree', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--shell);
  color: var(--text);
  font: 13.5px/1.55 var(--font);
}

/* ── Full-width site header (unchanged width) ── */
.kv-site-header {
  background: var(--ink);
  color: var(--ivory);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
}
.kv-site-header .brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.kv-site-header .logo { display: block; height: 24px; width: auto; }
.kv-site-header .kav {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 2.5px;
  font-size: 10px;
}
.kv-header-right { margin-left: auto; font-size: 12px; color: #aeb6c4; }
.kv-header-link { color: #aeb6c4; text-decoration: none; font-weight: 600; }
.kv-header-link:hover { color: var(--ivory); }
.kv-desk-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
  margin-left: 18px;
  flex: 1;
  min-width: 0;
}
.kv-desk-nav .kv-header-link {
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.kv-desk-nav .kv-header-link.is-active,
.kv-desk-nav .kv-header-link:hover {
  color: var(--gold-hi);
  border-bottom-color: var(--gold);
}
@media (max-width: 720px) {
  .kv-site-header { flex-wrap: wrap; }
  .kv-desk-nav { margin-left: 0; width: 100%; order: 3; padding-top: 6px; }
}

/* ── Page body (single header + content) ── */
.kv-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px 80px;
}

.kv-page-head { margin-bottom: 14px; }
.kv-page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
.kv-page-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.kv-content { width: 100%; }

.kv-footer-note {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

/* ── Toolbar ─────────────────────────────── */
h2 {
  font: 600 15px/1.35 var(--font);
  color: var(--ink-2);
  margin: 22px 0 10px;
  border-left: none;
  padding-left: 0;
}
h2:first-child { margin-top: 0; }
h2 small {
  display: block;
  font: 400 12.5px/1.5 var(--font);
  color: var(--note);
  margin-top: 3px;
}

/* ── Toolbar ─────────────────────────────── */
.kv-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.kv-toolbar select,
.kv-toolbar input[type=text] {
  width: auto;
  min-width: 140px;
}

/* ── Forms ───────────────────────────────── */
label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.6px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 12px 0 5px;
  font-weight: 600;
}
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
  font: inherit;
  color: var(--ink-2);
  transition: border-color 0.15s, background 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--surface);
}
input.invalid { border-color: var(--red); background: #fcefec; }
input:disabled { opacity: 0.65; cursor: not-allowed; }
.err { color: var(--red); font-size: 12px; margin-top: 4px; }
.note { font-size: 12.5px; color: var(--note); line-height: 1.55; }

.row { display: grid; gap: 12px; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Buttons ─────────────────────────────── */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-btn);
  padding: 9px 18px;
  font: 600 13px var(--font);
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(180deg, #1d2740, var(--ink));
  color: var(--ivory);
}
button.gold, .btn.gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-d));
  color: #fff;
  border: none;
}
button.gold:hover { filter: brightness(1.06); }
button.ghost, .btn.ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
button.ghost:hover { background: var(--ink); color: var(--ivory); }
button.sm { padding: 5px 14px; font-size: 12px; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.kv-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  text-decoration: none;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-btn);
  background: var(--surface);
  margin: 0 0 14px;
}
.kv-back-link:hover { background: var(--ink); color: var(--ivory); }
.kv-page > .kv-back-link { margin-bottom: 12px; }

/* ── Cards ───────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}
.card.locked { opacity: 0.45; pointer-events: none; }
.card-title { font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 0 0 14px; }

/* ── Banners ─────────────────────────────── */
.banner {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 600;
  margin: 10px 0;
}
.banner.red { background: #fcefec; border: 1px solid #ecc9c0; color: #8f3422; }
.banner.green { background: #ecf5ec; border: 1px solid #bcd8be; color: var(--green-d); }
.banner.gold { background: #fdf3df; border: 1px solid #ecd9a3; color: #7a5d14; }
.banner.blue { background: #e8edf8; border: 1px solid #c9d4ec; color: #27314c; }

.proposal {
  background: var(--ivory);
  border: 1px solid var(--gold);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.proposal .k { font-size: 11px; letter-spacing: 0.8px; color: var(--gold-d); font-weight: 700; text-transform: uppercase; }
.proposal p { margin: 2px 0 12px; }

/* ── Chips ───────────────────────────────── */
.chip, .status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-chip);
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.chip { margin-left: 8px; cursor: pointer; border: 1px solid transparent; }
.chip.amber, .st-SUBMITTED { background: #fdf3df; color: #7a5d14; }
.chip.green { background: #e1efe1; color: var(--green-d); }
.chip.amber { border-color: #ecd9a3; }

.st-DRAFT { background: var(--ivory); color: var(--note); border: 1px solid var(--line); }
.st-DESK_REVIEW { background: #e8edf8; color: #33508f; }
.st-BLO_APPOINTED, .st-FIELD_VERIFIED { background: #e8edf8; color: #33508f; }
.st-ACCEPTED { background: #e1efe1; color: var(--green-d); }
.st-REJECTED { background: #fcefec; color: var(--red); }

/* ── Tables ──────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.cases, table.kt {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 13px;
}
table.cases th, table.kt thead th {
  background: var(--ink);
  color: var(--ivory);
  text-align: left;
  padding: 11px 14px;
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 600;
}
table.cases td, table.kt tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0ead9;
  color: #3a352a;
  vertical-align: middle;
}
table.cases tr:last-child td, table.kt tbody tr:last-child td { border-bottom: none; }
table.cases tr:hover td, table.kt tbody tr:hover { background: var(--row-hover); cursor: pointer; }
table.cases b, table.kt td b { color: var(--ink); }

/* ── Copy panel ──────────────────────────── */
.cp-head {
  background: var(--ink);
  color: var(--ivory);
  padding: 14px 16px;
  border-radius: 12px 12px 0 0;
}
.cp-head span { display: block; font-size: 12px; color: var(--gold); }
.cp-progress { height: 5px; background: #2a3446; border-radius: 3px; margin-top: 8px; }
#cpBar { height: 100%; width: 0; background: var(--gold); border-radius: 3px; transition: width 0.2s; }
.cp-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  padding: 10px 14px;
}
.cp-label { flex: 0 0 230px; font-size: 12px; color: var(--muted); }
.cp-value { flex: 1; font: 600 13px ui-monospace, monospace; }
.cp-row button { padding: 5px 12px; font-size: 12px; }
.cp-row button.done { background: var(--green); border: none; color: #fff; }

/* ── Docs / misc ─────────────────────────── */
.docslot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.docslot .nm { flex: 0 0 240px; font-size: 13px; }
.docslot .hash { font: 11px ui-monospace, monospace; color: var(--muted); }
.mismatch { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 13px; }
.summary {
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  font: italic 16px/1.6 Georgia, 'Times New Roman', serif;
  box-shadow: var(--shadow-sm);
}
.audit {
  font: 11px ui-monospace, monospace;
  color: var(--muted);
  max-height: 140px;
  overflow: auto;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

/* Brand lockups in panels */
.brand-lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-lockup .logo { display: block; height: 24px; width: auto; }
.brand-lockup .kav { color: var(--gold-d); font-weight: 700; letter-spacing: 2.5px; font-size: 9px; }
.panel-branded .brand-lockup--panel { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

/* Legacy single-page header (if used without shell) */
header.site-header {
  background: var(--ink); color: var(--ivory); padding: 12px 20px;
  display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 5;
}
header .right { margin-left: auto; font-size: 12px; color: #aeb6c4; }
header .header-link { color: #aeb6c4; text-decoration: none; }
header .header-link:hover { color: var(--ivory); }

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 10px 20px;
  font-size: 11px;
  color: var(--muted);
  background: var(--shell);
}

@media (max-width: 900px) {
  .row.c2, .row.c3 { grid-template-columns: 1fr; }
}

@media print {
  .kv-site-header, button, .chip, .journey, .screen-nav, .kv-stepper { display: none !important; }
  .card { border: none; box-shadow: none; page-break-inside: avoid; }
  .screen { display: block !important; }
}

/* ── Counter UI (v3.1 screens) ───────────── */
body.kv-counter {
  font-size: 14.5px;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(193,154,61,0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(22,30,46,0.06), transparent 45%),
    var(--shell);
}
body.kv-counter .kv-page { max-width: 880px; padding-top: 12px; }

.counter-sticky {
  position: sticky;
  top: 52px;
  z-index: 8;
  background: color-mix(in srgb, var(--shell) 92%, transparent);
  backdrop-filter: blur(10px);
  padding: 10px 0 8px;
  margin: 0 0 12px;
}
.step-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.step-pills button {
  flex: 1;
  min-width: 112px;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 8px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: none;
}
.step-pills button .num {
  display: inline-flex;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold-hi);
  font-size: 11px;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  vertical-align: -3px;
}
.step-pills button.alt .num { background: var(--gold); color: var(--ink); }
.step-pills button.active {
  background: #fff8e8;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(193,154,61,0.2);
}
.step-pills button.done .num { background: var(--green-d); color: #fff; }
.step-pills button:disabled { opacity: 0.38; cursor: not-allowed; filter: none; }
.step-pills button.locked-hint .num {
  outline: 1.5px dashed var(--gold);
  outline-offset: 2px;
}
.consent-nav-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8e8;
  border: 1.5px solid #e3cfa0;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.45;
}

.journey-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.journey-mini .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line); flex: none;
}
.journey-mini .dot.on { background: var(--gold); box-shadow: 0 0 0 4px rgba(193,154,61,0.25); }
.journey-mini .dot.done { background: var(--green); }
.journey-mini .seg { flex: 1; height: 2px; background: var(--line); min-width: 16px; }
.journey-mini .seg.done { background: var(--gold); }

.screen {
  display: none !important;
  animation: fadeUp 0.4s ease both;
}
.screen.active { display: block !important; }
.screen[hidden] { display: none !important; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.screen-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
}
.screen-head {
  background: linear-gradient(180deg, #f7f2e8, var(--ivory));
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
  margin: 0;
  border-radius: 0;
}
.screen-head .n {
  display: inline-block;
  background: var(--ink);
  color: var(--gold-hi);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.screen-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.screen-head p {
  margin: 6px 0 0;
  color: var(--note);
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 62ch;
}

.mock {
  border: none;
  background: transparent;
}
.mock-head {
  background: var(--ink);
  color: #fff;
  border-radius: 0;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mock-head b { font-size: 15px; font-weight: 700; }
.mock-head .sub { font-size: 12px; color: #aeb6c4; margin-top: 3px; }
.mock-body {
  border: none;
  border-radius: 0;
  padding: 20px 18px 22px;
  background: #fbfaf6;
}
body.kv-counter .mock-body label {
  color: var(--gold-d);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  font-weight: 800;
}
body.kv-counter .mock-body input[type=text],
body.kv-counter .mock-body input[type=email],
body.kv-counter .mock-body select,
body.kv-counter .mock-body textarea {
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
  border: 1.5px solid #d8d2c4;
  border-radius: 10px;
}
body.kv-counter .mock-body input:focus,
body.kv-counter .mock-body select:focus,
body.kv-counter .mock-body textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(193,154,61,0.15);
}

.chip-net {
  padding: 6px 14px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  border: none;
  background: #1e4d33;
  color: #7fe0a7;
}
.chip-net.on { background: #1e4d33; color: #7fe0a7; animation: pulseNet 2.4s infinite; }
.chip-net.off { background: #4d231e; color: #f5a79a; animation: none; }
@keyframes pulseNet {
  0%, 100% { box-shadow: 0 0 0 0 rgba(127,224,167,0.45); }
  50% { box-shadow: 0 0 0 7px rgba(127,224,167,0); }
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}
.plan-tile {
  margin: 0;
  cursor: pointer;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 12px;
  background: #fff;
  text-align: left;
  color: var(--ink);
  box-shadow: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.plan-tile:hover { transform: translateY(-2px); border-color: #c9b98a; }
.plan-tile.selected {
  border-color: var(--gold-d);
  background: #fff8e8;
  box-shadow: 0 8px 20px rgba(193,154,61,0.18);
}
.plan-tile .amt { font-size: 18px; font-weight: 800; color: var(--ink); }
.plan-tile .nm { font-size: 12.5px; font-weight: 700; color: var(--gold-d); margin: 2px 0 8px; }
.plan-tile ul {
  margin: 0; padding: 0 0 0 14px;
  font-size: 11.5px; color: var(--note); line-height: 1.45;
}

.notice-panel {
  background: #14213c;
  color: #edf1f8;
  border-radius: 14px;
  padding: 18px;
  font-size: 15.5px;
  line-height: 1.75;
  margin: 12px 0 14px;
}
.notice-panel .te { color: var(--gold-hi); margin-top: 12px; font-size: 15.5px; }
.notice-panel.rtl .te { direction: ltr; text-align: left; }

.lng { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.lng button {
  padding: 9px 16px;
  border-radius: 99px;
  border: 1.5px solid #d8d2c4;
  font-size: 13.5px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: none;
}
.lng button.act { background: var(--ink); color: #fff; border-color: var(--ink); }

.gate-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff8e8;
  border: 1.5px solid #e3cfa0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.gate-box:hover { background: #fff3d6; }
.gate-box input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--gold-d); }
.gate-box span {
  font-size: 14.5px;
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  line-height: 1.45;
}

.optsel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 8px 0 14px;
}
.optsel button {
  text-align: center;
  background: #fff;
  color: var(--ink);
  border: 2px solid #d8d2c4;
  border-radius: 14px;
  padding: 16px 12px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: none;
  transition: all 0.2s;
}
.optsel button:hover { border-color: var(--ink); }
.optsel button.act {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.optsel button small {
  display: block;
  font-weight: 400;
  font-size: 11.5px;
  opacity: 0.8;
  margin-top: 6px;
  line-height: 1.35;
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-d)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 14px 22px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 18px rgba(193,154,61,0.28);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary:disabled {
  background: #d8d2c4 !important;
  color: #8a8fa0 !important;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-secondary {
  background: #fff !important;
  color: var(--ink) !important;
  border: 2px solid var(--ink) !important;
  border-radius: 12px !important;
  padding: 12px 20px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: none;
}

.esc-chip {
  display: inline-block;
  background: #fbebe8;
  color: #8e3232;
  border: 1.5px solid #efc4bc;
  border-radius: 99px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
}

.state-card {
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  margin-top: 12px;
  display: none;
  line-height: 1.5;
}
.state-card.ok { display: block; background: #eaf6ee; border: 1.5px solid #bce0c8; color: var(--green-d); }
.state-card.err { display: block; background: #fbebe8; border: 1.5px solid #efc4bc; color: var(--red); }
.state-card.hidden { display: none !important; }

.rcard {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  max-width: 380px;
  margin: 16px auto 4px;
  box-shadow: 0 10px 28px rgba(27,42,74,0.12);
  display: none;
}
.rcard.show { display: block; animation: fadeUp 0.35s ease; }
.rcard h4 { margin: 0; color: var(--ink); font-size: 16px; }
.rcard .no { font-size: 20px; font-weight: 800; color: var(--ink); margin: 6px 0 10px; letter-spacing: 0.02em; }
.rcard table { width: 100%; font-size: 14px; border-collapse: collapse; }
.rcard td { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rcard td:last-child { text-align: right; font-weight: 700; }
.rcard .cl { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 12px; }

.checkrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.checkrow label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--ink-2) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  margin: 0 !important;
  background: #fff8e8;
  border: 1.5px solid #e3cfa0;
  border-radius: 10px;
  padding: 10px 13px;
  cursor: pointer;
}
.checkrow input { width: 17px; height: 17px; accent-color: var(--gold-d); }

.screen-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.hint-inline { font-size: 12.5px; color: var(--muted); margin: 6px 0 12px; line-height: 1.45; }

.panel-acc {
  border: 1.5px solid #e4ddcc;
  border-radius: 14px;
  background: #fff;
  margin: 0 0 12px;
  overflow: hidden;
}
.panel-acc > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #faf7f0);
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.panel-acc > summary::-webkit-details-marker { display: none; }
.panel-acc > summary::before {
  content: '';
  width: 8px; height: 8px;
  border-right: 2px solid var(--gold-d);
  border-bottom: 2px solid var(--gold-d);
  transform: rotate(-45deg);
  transition: transform 0.2s;
  margin-right: 2px;
}
.panel-acc[open] > summary::before { transform: rotate(45deg); }
.panel-acc > summary .tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.panel-acc .panel-body { padding: 4px 16px 16px; }
.panel-acc .card {
  margin: 0;
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}
body.kv-counter .panel-acc h2 { display: none; }

.field-block { margin-bottom: 4px; }
.redline-note {
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 0 4px;
}
.audit-wrap {
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.audit-wrap h2 { margin-top: 0; font-size: 13px; }

@media (max-width: 720px) {
  .plan-grid, .optsel { grid-template-columns: 1fr; }
  .step-pills button { min-width: calc(50% - 6px); }
}

/* ── Desk home (index) ───────────────────── */
body.kv-desk {
  font-size: 15px;
  line-height: 1.55;
  background:
    radial-gradient(ellipse 70% 45% at 0% -5%, rgba(193,154,61,0.09), transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 0%, rgba(22,30,46,0.05), transparent 50%),
    var(--shell);
}
body.kv-desk .kv-page { max-width: 960px; }
body.kv-desk .kv-page-title { font-size: 24px; }
body.kv-desk .kv-page-sub { font-size: 14.5px; }
body.kv-desk .kv-desk-nav .kv-header-link { font-size: 13.5px; }
body.kv-desk .kv-footer-note { font-size: 12.5px; }
body.kv-desk table.cases { font-size: 14.5px; }
body.kv-desk table.cases th { font-size: 11.5px; }
body.kv-desk .note { font-size: 13.5px; }
body.kv-desk .screen-head h2 { font-size: 22px; }
body.kv-desk .screen-head p { font-size: 14.5px; }
body.kv-desk .mock-head b { font-size: 16px; }
body.kv-desk .mock-head .sub { font-size: 13px; }
body.kv-desk .btn-primary { font-size: 15.5px !important; }
body.kv-desk .btn-secondary { font-size: 14.5px !important; }

.desk-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.desk-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-d);
}
.desk-new-case { flex-shrink: 0; white-space: nowrap; }

.desk-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 0 12px;
  position: sticky;
  top: 52px;
  z-index: 7;
  background: color-mix(in srgb, var(--shell) 92%, transparent);
  backdrop-filter: blur(10px);
}
.desk-pill {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
.desk-pill:hover { border-color: var(--gold) !important; }
.desk-pill.active {
  background: #fff8e8 !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px rgba(193,154,61,0.18) !important;
}

.desk-cases-toolbar {
  margin-bottom: 12px;
  gap: 12px;
}
.desk-filter-label {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--note);
  font-weight: 600;
}
.desk-case-count {
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.desk-table-wrap { margin-top: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.muted-cell { color: var(--muted); font-size: 13px; }
.unnamed { color: var(--muted); font-weight: 500; }
table.cases tr.empty-row:hover td { background: transparent; cursor: default; }
table.cases tr.no-nav:hover td { cursor: default; background: var(--row-hover); }
.compact-cell { font-size: 13.5px; line-height: 1.45; }

.desk-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 28px 8px;
  text-align: left;
}
.desk-empty strong { font-size: 16.5px; color: var(--ink-2); }
.desk-empty span { color: var(--note); font-size: 14.5px; max-width: 420px; }
.desk-empty.sm { padding: 18px 4px; }

.desk-panel { margin: 0 0 8px; }
.desk-shell { margin: 0; }
.desk-mock-body { padding-top: 4px; }

.desk-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.desk-stat {
  background: #fbfaf6;
  border: 1.5px solid #e4ddcc;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.desk-stat-n {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.desk-stat-l {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.desk-source-list {
  display: grid;
  gap: 12px;
}
.desk-source-card {
  border: 1.5px solid #e4ddcc;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}
.desk-source-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.desk-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 9px 16px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font: 600 13px var(--font);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.desk-file-btn:hover { background: var(--ink); color: var(--ivory); }
.desk-file-btn input { display: none; }

.desk-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 14px;
  font-size: 14.5px;
}
.desk-alert.warn { background: #fbebe8; border: 1.5px solid #efc4bc; color: var(--red); }
.desk-alert.ok { background: #eaf6ee; border: 1.5px solid #bce0c8; color: var(--green-d); }
.desk-alert-amt { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }

.desk-form-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.desk-inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.desk-inline-fields input { flex: 1; min-width: 160px; }
.desk-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
  border: none;
}
.desk-section-title {
  margin: 0 0 12px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-2);
}

.desk-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.desk-plan-card {
  border: 1.5px solid #e4ddcc;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}
.desk-plan-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.desk-plan-amt {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.desk-plan-name { font-weight: 700; font-size: 15px; color: var(--ink-2); margin-top: 2px; }
.desk-plan-includes {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.desk-plan-includes li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f0ead9;
  font-size: 13.5px;
  color: var(--note);
}
.desk-plan-includes li:last-child { border-bottom: none; }
.desk-x {
  background: transparent !important;
  color: var(--red) !important;
  border: none !important;
  padding: 0 4px !important;
  font-size: 16px !important;
  line-height: 1 !important;
  min-width: auto !important;
  box-shadow: none !important;
}

.desk-badge {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 99px;
  background: #fff8e8;
  border: 1px solid #e3cfa0;
  font-weight: 700;
  color: var(--ink);
}
.desk-forum-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 4px;
}
.desk-check {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--ink-2) !important;
  cursor: pointer;
}
.desk-registered { margin-top: 14px; }
.desk-inner-table { margin: 0 0 8px; box-shadow: none; }

body.kv-desk .mock-head .brand-lockup--panel {
  margin: 0;
  padding: 0;
  border: none;
  opacity: 0.9;
}
body.kv-desk .mock-head .brand-lockup--panel .kav {
  color: var(--gold);
  font-size: 9px;
}

@media (max-width: 720px) {
  .desk-page-head { flex-direction: column; align-items: stretch; }
  .desk-new-case { width: 100%; }
  .desk-stat-row { grid-template-columns: 1fr 1fr; }
  .desk-plan-grid { grid-template-columns: 1fr; }
}
