/* ---------- Tokens ---------- */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fafbff;
  --border: #e6e8ef;
  --text: #1a1f2e;
  --muted: #6b7385;
  --accent: #1f6feb;
  --accent-soft: #e8f0ff;
  --green: #0e9f6e;
  --green-soft: #e6f7ef;
  --red: #d92d20;
  --red-soft: #fdecec;
  --amber: #b54708;
  --amber-soft: #fff4e5;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md: 0 4px 12px rgba(16,24,40,.08);
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body {
  font-family: "Segoe UI", "Tahoma", "Geeza Pro", "Noto Naskh Arabic", "Arial", sans-serif;
  font-size: 14.5px;
}

/* ---------- App layout ---------- */
#app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f1422;
  color: #d8dde7;
  display: flex; flex-direction: column;
  padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #1f6feb, #6f5cff);
  color: white; font-weight: 700;
  display: grid; place-items: center;
}
.brand-name { font-weight: 700; letter-spacing: .2px; color: white; }
.brand-jo  { color: #6f5cff; }
.brand-sub { font-size: 11.5px; color: #8993a8; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav a {
  color: #c5cbd8; text-decoration: none;
  padding: 9px 12px; border-radius: 8px; font-weight: 500;
}
.nav a:hover { background: #1a2034; color: white; }
.nav a.active {
  background: #1a2034; color: white;
  box-shadow: inset 0 0 0 1px #2a3354;
}

.sidebar-foot {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid #1c2238;
  display: flex; flex-direction: column; gap: 6px;
}
.link-btn {
  background: none; border: none; color: #aab2c4; text-align: start;
  font: inherit; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.link-btn:hover { color: white; background: #1a2034; }
.lang-btn {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.lang-dot {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 6px;
  background: #1a2034; color: #c5cbd8; font-size: 10.5px; font-weight: 700;
  letter-spacing: .04em;
}

/* ---------- Main ---------- */
.main { padding: 22px 28px 60px; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.topbar h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.pill {
  background: var(--accent-soft); color: var(--accent);
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 700px)  { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Stat cards ---------- */
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 24px; font-weight: 600; margin-top: 6px; letter-spacing: -0.01em; }
.stat .delta { font-size: 12px; margin-top: 6px; color: var(--muted); }
.stat.green .value { color: var(--green); }
.stat.red   .value { color: var(--red); }
.stat.amber .value { color: var(--amber); }

/* ---------- Tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td {
  padding: 10px 12px;
  text-align: start;
  border-bottom: 1px solid var(--border);
}
table.data th {
  font-weight: 600; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em;
  background: var(--surface-2);
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }
.num { text-align: end; font-variant-numeric: tabular-nums; direction: ltr; }
.num.unit { unicode-bidi: isolate; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: white;
  border: 1px solid var(--accent);
  padding: 8px 14px; border-radius: 8px; font-weight: 600;
  cursor: pointer; font-size: 13px;
  transition: filter .12s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn.secondary {
  background: white; color: var(--text); border: 1px solid var(--border);
}
.btn.secondary:hover { background: var(--surface-2); }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.ghost { background: transparent; color: var(--muted); border: none; padding: 6px 8px; }
.btn.ghost:hover { color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 12px; }

/* Icon-only round buttons used in row actions */
.btn.icon {
  background: transparent; color: var(--muted); border: 1px solid transparent;
  padding: 6px; border-radius: 8px; line-height: 0;
  display: inline-grid; place-items: center;
}
.btn.icon:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.btn.icon.danger { color: var(--red); }
.btn.icon.danger:hover { background: var(--red-soft); border-color: #f7c7c2; color: var(--red); }
.btn.icon.green { color: var(--green); }
.btn.icon.green:hover { background: var(--green-soft); border-color: #b9e6cf; }

.row-actions { gap: 2px; }

/* Inline icon — inherits color from text */
.ic {
  display: inline-block;
  vertical-align: -3px;
  flex-shrink: 0;
  pointer-events: none; /* clicks pass through to the parent button */
}
.btn .ic { vertical-align: -2px; }
/* Buttons with icon + label keep gap consistent */
.btn { gap: 6px; }
/* Nav icon spacing */
.nav a { display: flex; align-items: center; gap: 10px; }
.nav a > .ic { flex-shrink: 0; }
.nav a > div { flex: 1; }
/* Brand-name with badge inline still OK; nav.profile two-line label needs flex column */
.nav a .nav-label-stack { display: flex; flex-direction: column; }

.row-actions { display: flex; gap: 4px; justify-content: flex-end; }

.toolbar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }
.toolbar input[type="search"], .toolbar select, .toolbar input[type="text"] {
  height: 34px; padding: 0 10px; border: 1px solid var(--border);
  background: white; border-radius: 8px; font: inherit;
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 12px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form .field { display: flex; flex-direction: column; gap: 4px; }
.form label { font-size: 12px; color: var(--muted); font-weight: 600; }
.form input, .form select, .form textarea {
  font: inherit; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: white; outline: none;
}
.form input:focus, .form select:focus, .form textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form textarea { min-height: 70px; resize: vertical; }
.form .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }

.line-items { display: grid; gap: 6px; }
.line-item {
  display: grid;
  grid-template-columns: 2fr 80px 100px 100px 30px;
  gap: 6px; align-items: center;
}
.line-items.no-gst .line-item {
  grid-template-columns: 2fr 80px 100px 30px;
}
.line-item input { padding: 7px 8px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.6;
}
.badge.paid    { background: var(--green-soft); color: var(--green); }
.badge.unpaid  { background: var(--amber-soft); color: var(--amber); }
.badge.overdue { background: var(--red-soft);   color: var(--red); }
.badge.draft   { background: #eef0f6; color: #545b6b; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(15, 20, 34, .45);
  display: grid; place-items: center; padding: 20px; z-index: 50;
}
.modal.hidden { display: none; }
.modal-card {
  background: white; width: min(640px, 100%);
  border-radius: 14px; box-shadow: var(--shadow-md);
  max-height: 90vh; display: flex; flex-direction: column;
}
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-head .x {
  margin-inline-start: auto; background: none; border: none;
  font-size: 22px; cursor: pointer; color: var(--muted);
}
.modal-body { padding: 18px; overflow: auto; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: #1a2034; color: white; padding: 10px 16px;
  border-radius: 10px; box-shadow: var(--shadow-md);
  font-size: 13px; z-index: 60;
}
.toast.hidden { display: none; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty {
  text-align: center; padding: 40px 16px; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--surface-2);
}
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; }
.kv .k { color: var(--muted); }
.kv .v { font-variant-numeric: tabular-nums; font-weight: 500; }
hr.sep { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

.bar-track {
  height: 8px; background: #eef0f6; border-radius: 999px; overflow: hidden;
}
.bar-fill { height: 100%; background: linear-gradient(90deg, #1f6feb, #6f5cff); }

.section-title {
  margin: 22px 0 10px; font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
}

.note {
  font-size: 12px; color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 12px; border-radius: 8px;
}

/* ---------- Info bubbles ("i") ---------- */
.info-i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0; margin: 0 2px;
  border: none; border-radius: 50%;
  background: transparent; color: var(--muted);
  cursor: pointer; vertical-align: middle; flex: none;
  transition: color .12s ease, background .12s ease;
}
.info-i:hover, .info-i:focus-visible {
  color: var(--accent); background: var(--accent-soft); outline: none;
}
.info-i .ic { width: 14px; height: 14px; vertical-align: 0; }
/* Sit nicely beside uppercase card titles / stat labels */
.card h3 .info-i, .stat .label .info-i, .section-head .info-i { color: #aab2c4; }
.kv .k .info-i { margin-inline-start: 4px; }

.info-pop {
  position: fixed; z-index: 1000;
  max-width: 260px;
  background: #1a2034; color: #fff;
  font-size: 12.5px; line-height: 1.5; font-weight: 400;
  text-transform: none; letter-spacing: normal;
  padding: 9px 11px; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(16,24,40,.22);
  opacity: 0; transform: translateY(-3px);
  transition: opacity .12s ease, transform .12s ease;
}
.info-pop.show { opacity: 1; transform: translateY(0); }

/* ---------- Profile / My info ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1000px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-intro {
  font-size: 13.5px; color: var(--muted); line-height: 1.6;
  margin: 0 0 16px;
}
.profile-intro b { color: var(--text); }

.field-hint {
  font-size: 11.5px; color: var(--muted); margin-top: 4px;
}

.toggle-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: white; cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.toggle-card:hover { border-color: #cbd1de; }
.toggle-card.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.toggle-card .tc-label {
  font-weight: 500; font-size: 13.5px; flex: 1;
}
.toggle-card input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; margin: 0;
  border: 1.5px solid #cbd1de; border-radius: 50%;
  background: white; cursor: pointer; position: relative;
  flex: 0 0 22px;
  transition: all .12s ease;
}
.toggle-card input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
}
.toggle-card input[type="checkbox"]:checked::after {
  content: ""; position: absolute;
  inset: 0; display: grid; place-items: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.5 8.5 6.5 11.5 12.5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

.toggle-stack { display: flex; flex-direction: column; gap: 8px; }
.toggle-extra {
  display: none; padding: 12px 14px; margin-top: -4px; margin-bottom: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px;
}
.toggle-extra.show { display: block; }

/* Status panel */
.status-panel { display: flex; flex-direction: column; gap: 12px; }
.status-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.status-row:last-child { border-bottom: none; }
.status-name { font-size: 13.5px; }
.status-badge {
  font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
}
.status-badge.ok       { background: var(--green-soft); color: var(--green); }
.status-badge.warn     { background: var(--amber-soft); color: var(--amber); }
.status-badge.neutral  { background: #eef0f6;          color: #545b6b; }

.tip-card {
  background: var(--accent-soft);
  border: 1px solid #d3e1ff;
  border-radius: 10px;
  padding: 12px 14px;
}
.tip-card h4 {
  margin: 0 0 6px; font-size: 12px; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: .04em;
}
.tip-card p { margin: 0; font-size: 12.5px; color: #2a3354; line-height: 1.55; }

.section-card { display: flex; flex-direction: column; gap: 14px; }
.section-card .section-head {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}

/* Sidebar: nav item with subtitle */
.nav a .nav-sub {
  display: block; font-size: 11px; color: #7a8295; font-weight: 400;
  margin-top: 2px;
}
.nav a:hover .nav-sub, .nav a.active .nav-sub { color: #aab2c4; }

/* Invoice preview */
.invoice-preview { font-family: Georgia, "Times New Roman", serif; }
.invoice-preview h2 { margin: 0 0 4px; }
.invoice-preview .from-to { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 14px 0; }
.invoice-preview table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.invoice-preview th, .invoice-preview td { border-bottom: 1px solid #ddd; padding: 8px 6px; text-align: start; }
.invoice-preview .totals { margin-top: 12px; margin-inline-start: auto; width: 260px; }
.invoice-preview .totals .row { display: flex; justify-content: space-between; padding: 4px 0; }
.invoice-preview .totals .grand { border-top: 2px solid #222; font-weight: 700; padding-top: 6px; margin-top: 4px; }

/* ---------- Smart import (AI) ---------- */
.import-intro {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px; line-height: 1.55; color: var(--text);
  margin-bottom: 14px;
}
.import-intro .ic { color: var(--accent); }
.import-privacy {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12px; color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid #f3dcc0;
  padding: 8px 10px; border-radius: 8px;
}
.import-privacy .ic { color: var(--amber); margin-top: 1px; }

.ai-setup { max-width: 560px; }
.ai-setup h3 { text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--text); }

/* Dropzone */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  padding: 44px 24px;
  border: 2px dashed #cbd3e4; border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color .12s ease, background .12s ease;
}
.dropzone.drag {
  border-color: var(--accent); background: var(--accent-soft);
}
.dz-icon { color: var(--accent); line-height: 0; margin-bottom: 4px; }
.dz-title { font-size: 16px; font-weight: 600; }
.dz-sub { font-size: 13px; color: var(--muted); }
.dz-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.dz-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* Reading progress */
.file-list { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12.5px;
}
.file-row .fr-name { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.file-row .fr-name .ic { color: var(--muted); flex-shrink: 0; }
.file-row .fr-status {
  display: flex; align-items: center; gap: 6px;
  color: var(--muted); white-space: nowrap;
}
.file-row.done   { border-color: #b9e6cf; }
.file-row.done   .fr-status { color: var(--green); }
.file-row.error  { border-color: #f7c7c2; background: var(--red-soft); }
.file-row.error  .fr-status { color: var(--red); }
.file-row.reading .fr-status { color: var(--accent); }

.spin {
  width: 13px; height: 13px; flex-shrink: 0;
  border: 2px solid var(--accent-soft); border-top-color: var(--accent);
  border-radius: 50%; display: inline-block;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Step-by-step review wizard */
.step-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin: 16px 0 8px;
}
.step-head strong { font-size: 15px; }
.step-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.step-meta .pg-ok { color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.step-meta .pg-read { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
.step-meta .pg-dot { color: var(--border); }

.review-card {
  display: flex; gap: 18px; align-items: stretch;
  background: white; border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; margin-top: 6px;
}
.review-card.err { border-color: #f7c7c2; }

.rc-prev { flex: 1 1 56%; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.doc-prev {
  width: 100%; height: 460px; border: 1px solid var(--border);
  border-radius: 10px; background: #f4f5f8; object-fit: contain;
}
.prev-na {
  width: 100%; height: 460px; border: 1px dashed var(--border); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--muted); background: #fafbfd;
}
.rc-open { align-self: flex-start; }

.rc-side { flex: 1 1 44%; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.rc-name { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; word-break: break-word; }
.rc-fields { display: flex; flex-direction: column; gap: 10px; }

.rf-row { display: flex; align-items: center; gap: 10px; }
.rf-row > label { flex: 0 0 92px; font-size: 12px; color: var(--muted); font-weight: 600; text-align: end; }
.rf-row > input, .rf-row > select,
.rf-amt input, .rf-amt select {
  font: inherit; font-size: 13px; padding: 7px 9px;
  border: 1px solid var(--border); border-radius: 8px; background: white; outline: none;
}
.rf-row > input, .rf-row > select { flex: 1 1 auto; min-width: 0; }
.rf-row > .rf-static { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.rf-row > input:focus, .rf-row > select:focus,
.rf-amt input:focus, .rf-amt select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.rf-amt { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; direction: ltr; min-width: 0; }
.rf-amt input.amt { flex: 1 1 90px; min-width: 80px; text-align: end; font-variant-numeric: tabular-nums; }
.rf-amt select.cur-sel { flex: 0 0 auto; }
.rf-amt input.fx { flex: 0 0 82px; width: 82px; text-align: end; font-variant-numeric: tabular-nums; }
.rf-amt .fx-x, .rf-amt .fx-eq { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rf-amt .jod-out { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.rf-row .conf { margin-inline-start: auto; }

.rc-actions { display: flex; gap: 10px; margin-top: auto; }
.rc-actions .btn { flex: 1 1 auto; justify-content: center; }
.rc-actions.center { justify-content: center; }
.rc-actions.center .btn { flex: 0 0 auto; }

.rc-wait, .rc-done {
  width: 100%; min-height: 340px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; color: var(--muted);
}
.rc-done h3 { margin: 0; color: var(--text); }
.err-msg {
  color: var(--red); font-size: 13px; background: var(--red-soft);
  border: 1px solid #f7c7c2; border-radius: 8px; padding: 10px 12px;
}
.spin.big { width: 30px; height: 30px; border-width: 3px; }

@media (max-width: 720px) {
  .review-card { flex-direction: column; }
  .doc-prev, .prev-na { height: 320px; }
  .rf-row > label { flex-basis: 76px; }
}

/* Flags / chips */
.flags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.conf {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.conf.ok  { background: var(--green-soft); color: var(--green); }
.conf.low { background: var(--amber-soft); color: var(--amber); }
.chip {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: #eef0f6; color: #545b6b; white-space: nowrap;
}
.chip.warn { background: var(--amber-soft); color: var(--amber); }
.chip.new  { background: var(--accent-soft); color: var(--accent); }

.import-foot { margin-top: 14px; }
