/* ===========================================================
   Sistema de Control de Pagos — design tokens
   =========================================================== */

:root {
  /* Type */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Neutrals (cool) */
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-sunken: #EEF1F7;
  --border: #E2E6EE;
  --border-strong: #CFD5E2;
  --ink: #0E1936;
  --ink-2: #2A3457;
  --muted: #5E6B85;
  --muted-2: #93A0BA;

  /* FONDEN brand palette */
  --fonden-blue:       #1F4FA3;
  --fonden-blue-deep:  #163A7A;
  --fonden-blue-soft:  #E8EEF8;
  --fonden-blue-tint:  #F3F6FC;
  --fonden-red:        #D6262C;
  --fonden-red-soft:   #FBE9EA;
  --fonden-yellow:     #FFCB05;
  --fonden-yellow-soft:#FFF6D2;

  /* Accent — FONDEN blue */
  --accent: var(--fonden-blue);
  --accent-hover: var(--fonden-blue-deep);
  --accent-soft: var(--fonden-blue-soft);

  /* Status — semaphore */
  --pay: #0E8A4F;
  --pay-bg: #E6F4ED;
  --pay-border: #BCE0CC;

  --analyze: #B7791F;
  --analyze-bg: #FFF6D2;
  --analyze-border: #F2D97A;

  --hold: var(--fonden-red);
  --hold-bg: var(--fonden-red-soft);
  --hold-border: #F1B5B8;

  --paid: var(--fonden-blue);
  --paid-bg: var(--fonden-blue-soft);
  --paid-border: #C4D2EB;

  /* Layout */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(14,25,54,0.05);
  --shadow: 0 1px 2px rgba(14,25,54,0.06), 0 8px 24px rgba(14,25,54,0.06);
  --shadow-lg: 0 1px 2px rgba(14,25,54,0.06), 0 20px 50px rgba(14,25,54,0.10);

  --nav-h: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ===========================================================
   Top nav
   =========================================================== */
.topnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky;
}
.topnav::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -3px;
  height: 3px;
  background: linear-gradient(90deg,
    var(--fonden-yellow) 0%, var(--fonden-yellow) 33%,
    var(--fonden-blue) 33%,  var(--fonden-blue)   66%,
    var(--fonden-red)  66%,  var(--fonden-red)    100%);
  opacity: 0.92;
}
.topnav__brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; letter-spacing: -0.02em;
}
.topnav__logo {
  height: 30px;
  width: auto;
  display: block;
}
.topnav__sep {
  width: 1px; height: 22px; background: var(--border);
}
.topnav__mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--fonden-blue);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0;
}
.topnav__title { font-size: 14px; }
.topnav__sub { color: var(--muted); font-size: 12px; margin-left: 6px; }
.topnav__nav { display: flex; gap: 4px; }
.topnav__link {
  background: transparent; border: 0; color: var(--muted);
  padding: 6px 12px; border-radius: 6px;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
}
.topnav__link:hover { color: var(--ink); background: var(--surface-sunken); }
.topnav__link.is-active { color: var(--fonden-blue-deep); background: var(--fonden-blue-soft); border: 1px solid #C4D2EB; }
.topnav__right { display: flex; align-items: center; gap: 12px; }
.topnav__user {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface);
  font-size: 12px;
}
.topnav__avatar {
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--fonden-blue); color: #fff;
  font-size: 10px; font-weight: 600;
  display: grid; place-items: center;
}
.topnav__role {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ===========================================================
   App shell
   =========================================================== */
.app {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}
.page-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.page-sub { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }

/* ===========================================================
   Cards
   =========================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.card__title { font-size: 13px; font-weight: 600; margin: 0; }
.card__sub { color: var(--muted); font-size: 12px; }
.card__body { padding: 16px; }
.card__body--flush { padding: 0; }

/* ===========================================================
   Buttons
   =========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px; font-weight: 500;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-sunken); }
.btn:active { transform: translateY(0.5px); }
.btn--primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--accent {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { background: var(--surface-sunken); }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn--lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.icon-btn {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  display: inline-grid; place-items: center; color: var(--muted);
}
.icon-btn:hover { color: var(--ink); background: var(--surface-sunken); }

/* ===========================================================
   Inputs
   =========================================================== */
.input, .select {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  width: 100%;
  outline: none;
}
.input:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B72' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.search {
  position: relative;
}
.search input {
  padding-left: 32px;
}
.search svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2);
}

/* ===========================================================
   Tabs
   =========================================================== */
.tabs {
  display: inline-flex; padding: 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.tabs__item {
  padding: 5px 12px;
  font-size: 12px; font-weight: 500;
  color: var(--muted);
  background: transparent; border: 0; border-radius: 6px;
}
.tabs__item.is-active {
  background: var(--surface);
  color: var(--fonden-blue-deep);
  box-shadow: var(--shadow-sm);
  border: 1px solid #C4D2EB;
}

/* ===========================================================
   Table
   =========================================================== */
.table-wrap {
  overflow-x: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl thead th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0;
  white-space: nowrap;
}
.tbl tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: color-mix(in oklch, var(--surface-sunken), transparent 50%); }
.tbl tbody tr.is-selected { background: var(--accent-soft); }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tbl td.right, .tbl th.right { text-align: right; }
.tbl .cell-strong { font-weight: 500; color: var(--ink); }
.tbl .cell-muted { color: var(--muted); font-size: 12px; }

/* ===========================================================
   Badges & status
   =========================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}
.badge--dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor;
}
.badge--pay { color: var(--pay); background: var(--pay-bg); border-color: var(--pay-border); }
.badge--analyze { color: var(--analyze); background: var(--analyze-bg); border-color: var(--analyze-border); }
.badge--hold { color: var(--hold); background: var(--hold-bg); border-color: var(--hold-border); }
.badge--paid { color: var(--paid); background: var(--paid-bg); border-color: var(--paid-border); }
.badge--approved { color: var(--accent); background: var(--accent-soft); border-color: oklch(0.85 0.06 245); }
.badge--neutral { color: var(--ink-2); background: var(--surface-sunken); border-color: var(--border); }

/* status dropdown trigger */
.status-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px; font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.status-trigger:hover { background: var(--surface-sunken); }
.status-trigger--pay { color: var(--pay); background: var(--pay-bg); border-color: var(--pay-border); }
.status-trigger--analyze { color: var(--analyze); background: var(--analyze-bg); border-color: var(--analyze-border); }
.status-trigger--hold { color: var(--hold); background: var(--hold-bg); border-color: var(--hold-border); }
.status-trigger--paid { color: var(--paid); background: var(--paid-bg); border-color: var(--paid-border); }
.status-trigger--approved { color: var(--accent); background: var(--accent-soft); border-color: oklch(0.85 0.06 245); }

.status-dot {
  width: 8px; height: 8px; border-radius: 999px; background: currentColor;
  flex-shrink: 0;
}

/* ===========================================================
   Stat / KPI card
   =========================================================== */
.kpi {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.kpi__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.kpi__value {
  font-family: var(--font-mono);
  font-size: 24px; font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.kpi__hint { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi--accent {
  background: linear-gradient(135deg, var(--fonden-blue) 0%, var(--fonden-blue-deep) 100%);
  color: #fff;
  border-color: var(--fonden-blue-deep);
}
.kpi--accent .kpi__label,
.kpi--accent .kpi__hint { color: rgba(255,255,255,0.78); }
.kpi--accent .kpi__value { color: #fff; }
.kpi--accent .progress { background: rgba(255,255,255,0.18); }
.kpi--accent .progress__bar { background: #fff; }
.kpi--accent .progress__bar--warn { background: var(--fonden-yellow); }
.kpi--accent .progress__bar--over  { background: #FFB4B6; }
.kpi--warn { background: linear-gradient(180deg, var(--fonden-yellow-soft), var(--surface)); border-color: var(--analyze-border); }

/* ===========================================================
   Drop zone
   =========================================================== */
.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
  transition: all 0.15s ease;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone__icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-sunken);
  display: grid; place-items: center;
  color: var(--muted);
}
.dropzone__title { font-size: 14px; font-weight: 500; }
.dropzone__hint { color: var(--muted); font-size: 12px; }

/* ===========================================================
   Layout helpers
   =========================================================== */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-split { grid-template-columns: 2fr 1fr; }
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .app { padding: 16px; }
  .topnav { padding: 0 16px; }
  .topnav__sub, .topnav__user .topnav__role { display: none; }
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.wrap { flex-wrap: wrap; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }

/* ===========================================================
   Modal
   =========================================================== */
.scrim {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,15,18,0.5);
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}
.modal {
  width: 100%; max-width: 680px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  max-height: 92vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: scaleIn 0.2s ease;
}
.modal--lg { max-width: 920px; }
.modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--border); }
.modal__title { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -0.02em; }
.modal__sub { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.modal__body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal__foot {
  padding: 14px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--surface-sunken);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

/* ===========================================================
   Popover
   =========================================================== */
.popover {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 4px;
  z-index: 60;
  min-width: 220px;
  animation: scaleIn 0.12s ease;
}
.popover__item {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  font-size: 13px;
  text-align: left;
  color: var(--ink);
}
.popover__item:hover { background: var(--surface-sunken); }
.popover__item.is-active { background: var(--accent-soft); }
.popover__item-meta { color: var(--muted); font-size: 11px; margin-left: auto; }

/* ===========================================================
   Checkbox
   =========================================================== */
.check {
  appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.check:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check:checked::after {
  content: "";
  position: absolute; left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check:indeterminate {
  background: var(--accent);
  border-color: var(--accent);
}
.check:indeterminate::after {
  content: "";
  position: absolute; left: 3px; top: 6px;
  width: 8px; height: 2px;
  background: white;
}

/* ===========================================================
   Sticky sidebar (Viceministro)
   =========================================================== */
.layout-with-aside {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: flex-start;
}
.aside {
  position: sticky; top: calc(var(--nav-h) + 20px);
  display: flex; flex-direction: column; gap: 12px;
}
@media (max-width: 1024px) {
  .layout-with-aside { grid-template-columns: 1fr; }
  .aside { position: static; }
}

/* ===========================================================
   BCV balance progress
   =========================================================== */
.progress {
  height: 6px;
  background: var(--surface-sunken);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress__bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress__bar--warn { background: var(--analyze); }
.progress__bar--over { background: var(--hold); }

/* ===========================================================
   Alert
   =========================================================== */
.alert {
  display: flex; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
}
.alert--warn { background: var(--analyze-bg); border-color: var(--analyze-border); color: oklch(0.42 0.10 75); }
.alert--danger { background: var(--hold-bg); border-color: var(--hold-border); color: oklch(0.42 0.12 27); }
.alert--info { background: var(--accent-soft); border-color: oklch(0.87 0.04 245); color: var(--accent); }
.alert--success { background: var(--pay-bg); border-color: var(--pay-border); color: var(--pay); }

/* ===========================================================
   Timeline
   =========================================================== */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline__row {
  display: grid; grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
  position: relative;
}
.timeline__dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  margin-top: 5px;
  margin-left: 9px;
  position: relative; z-index: 2;
}
.timeline__row.is-done .timeline__dot { background: var(--pay); border-color: var(--pay); }
.timeline__row.is-current .timeline__dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline__line {
  position: absolute; left: 13px; top: 18px; bottom: -8px;
  width: 2px; background: var(--border);
}
.timeline__row:last-child .timeline__line { display: none; }
.timeline__title { font-size: 13px; font-weight: 500; }
.timeline__meta { font-size: 12px; color: var(--muted); }
.timeline__time { font-size: 11px; color: var(--muted-2); font-family: var(--font-mono); }

/* ===========================================================
   Email preview
   =========================================================== */
.email {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.email__head {
  background: var(--surface-sunken);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.email__head-row { display: flex; gap: 8px; padding: 2px 0; }
.email__head-label { color: var(--muted); width: 60px; }
.email__body { padding: 24px; font-size: 14px; line-height: 1.6; }

/* ===========================================================
   Payment order (printable)
   =========================================================== */
.order {
  background: #fff;
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 820px;
  margin: 0 auto;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}
.order__tricolor {
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    var(--fonden-yellow) 0%, var(--fonden-yellow) 33%,
    var(--fonden-blue)  33%, var(--fonden-blue)   66%,
    var(--fonden-red)   66%, var(--fonden-red)    100%);
}
.order__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
  margin-bottom: 24px;
}
.order__title { font-size: 22px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.02em; }
.order__num { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.order__section { margin-bottom: 20px; }
.order__section h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 0 0 8px; font-weight: 500;
}
.order__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.order__field { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.order__field-label { font-size: 11px; color: var(--muted); }
.order__field-value { font-size: 13px; font-weight: 500; }
.order__total {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px;
}
.order__total-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.order__total-value { font-family: var(--font-mono); font-size: 22px; font-weight: 500; }
.order__sign {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  margin-top: 48px;
}
.order__sign-box { border-top: 1px solid var(--ink); padding-top: 8px; text-align: center; font-size: 11px; color: var(--muted); }
.order__sign-name { font-size: 13px; color: var(--ink); font-weight: 500; }

@media print {
  body { background: #fff; }
  .topnav, .no-print { display: none !important; }
  .app { padding: 0; max-width: none; }
  .order { border: 0; box-shadow: none; padding: 0; }
}

/* ===========================================================
   Bar chart
   =========================================================== */
.barchart { display: flex; flex-direction: column; gap: 10px; }
.barchart__row { display: grid; grid-template-columns: 140px 1fr 80px; gap: 12px; align-items: center; font-size: 12px; }
.barchart__bar {
  height: 8px; border-radius: 999px;
  background: var(--surface-sunken);
  overflow: hidden;
}
.barchart__fill { height: 100%; border-radius: 999px; }
.barchart__val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }

/* ===========================================================
   Misc
   =========================================================== */
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }
.fadein { animation: fadeIn 0.25s ease; }

/* hide scrollbars on inner scroll regions, keep functional */
.scroll-y { overflow-y: auto; }
