/* ==========================================================
   Fornada — componentes
   ========================================================== */

/* ---------- cartões ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 16px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { font-size: 15px; font-weight: 600; color: var(--label-2); letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.card-head h3 svg { width: 17px; height: 17px; }

/* ---------- listas agrupadas (inset grouped) ---------- */
.list {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px;
  padding: 9px 16px;
  width: 100%;
  text-align: left;
  background: transparent;
  transition: background .15s var(--ease);
}
.row + .row::before {
  content: ""; position: absolute; top: 0; right: 0;
  left: var(--sep-inset, 16px);
  border-top: 0.5px solid var(--separator);
}
.row.has-icon { --sep-inset: 60px; }
.row.has-tile { --sep-inset: 72px; }
button.row:hover, a.row:hover, .row.tap:hover { background: var(--fill-3); }
button.row:active, a.row:active, .row.tap:active { background: var(--fill-2); }
.row-icon {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center; color: #fff; background: var(--accent);
}
.row-icon svg { width: 18px; height: 18px; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16px; font-weight: 500; letter-spacing: -0.015em; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13.5px; color: var(--label-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { display: flex; align-items: center; gap: 6px; flex: none; color: var(--label-2); font-size: 15px; text-align: right; }
.row-end .val { color: var(--label); font-weight: 600; font-variant-numeric: tabular-nums; }
.row-end .chev { width: 16px; height: 16px; color: var(--label-3); }
.row-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.row.danger .row-title { color: var(--red-text); }
.row.center { justify-content: center; }
.row.center .row-title { color: var(--accent-text); font-weight: 500; }

/* ---------- tiles de emoji / foto ---------- */
.tile {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  font-size: 26px; line-height: 1;
  background: var(--tile-bg, var(--accent-soft));
  overflow: hidden;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 20px; }
.tile.lg { width: 84px; height: 84px; border-radius: 22px; font-size: 46px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, var(--av1, #A1A1AA), var(--av2, #71717A));
  letter-spacing: 0;
}
.avatar.lg { width: 76px; height: 76px; font-size: 28px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; padding: 0 18px; border-radius: 12px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.015em;
  background: var(--fill-2); color: var(--accent-text);
  transition: transform .18s var(--ease), opacity .18s var(--ease), background .2s var(--ease), filter .2s;
  white-space: nowrap; user-select: none;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:active { transform: scale(.97); opacity: .85; }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.tinted { background: var(--accent-soft); color: var(--accent-text); }
.btn.plain { background: transparent; padding: 0 8px; }
.btn.danger { background: rgba(255, 59, 48, .12); color: var(--red-text); }
.btn.success { background: var(--green); color: #fff; }
.btn.dark { background: var(--label); color: var(--bg); }
.btn.lg { height: 54px; border-radius: 14px; font-size: 17px; padding: 0 22px; }
.btn.sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.round { width: 44px; padding: 0; border-radius: 50%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; }

/* ações rápidas estilo Control Center */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 6px 12px; border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow-1);
  font-size: 12.5px; font-weight: 600; color: var(--label); text-align: center; line-height: 1.15;
  transition: transform .2s var(--ease);
}
.quick-btn:active { transform: scale(.95); }
.quick-btn .qi { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.quick-btn .qi svg { width: 22px; height: 22px; }

/* ---------- campos ---------- */
.field-list { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.field {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 50px; padding: 0 16px;
}
.field + .field::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--separator); }
.field > label, .field > .flabel { flex: none; width: 34%; max-width: 150px; font-size: 16px; color: var(--label); }
.field input, .field select, .field textarea {
  flex: 1; min-width: 0;
  border: 0; background: transparent;
  font-size: 16px; padding: 13px 0; text-align: right;
  -webkit-appearance: none; appearance: none;
}
.field textarea { text-align: left; resize: vertical; min-height: 84px; line-height: 1.4; }
.field.col { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
.field.col > label { width: auto; max-width: none; font-size: 13px; color: var(--label-2); }
.field.col input, .field.col textarea, .field.col select { text-align: left; padding: 6px 0 12px; }
.field select { text-align-last: right; cursor: pointer; color: var(--label-2); }
.field .unit { color: var(--label-2); font-size: 15px; flex: none; }
.field .hint { font-size: 13px; color: var(--label-2); }
.field.big input { font-family: var(--font-rounded); font-size: 34px; font-weight: 700; text-align: left; padding: 10px 0; letter-spacing: -0.02em; }
.input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 0; border-radius: 12px; background: var(--fill-3);
  font-size: 16px;
}
textarea.input { height: auto; padding: 12px 14px; min-height: 90px; resize: vertical; }
.input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }

/* busca */
.search {
  position: relative; display: flex; align-items: center;
  height: 38px; border-radius: 11px; background: var(--fill-2);
}
.search svg { position: absolute; left: 9px; width: 17px; height: 17px; color: var(--label-2); pointer-events: none; }
.search input { width: 100%; height: 100%; border: 0; background: transparent; padding: 0 12px 0 33px; font-size: 16px; -webkit-appearance: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* controle segmentado */
.seg {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 2px; border-radius: 10px; background: var(--fill-2);
  isolation: isolate; user-select: none;
}
.seg button {
  position: relative; z-index: 1;
  height: 30px; padding: 0 10px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--label);
  white-space: nowrap; transition: color .2s;
}
.seg button[aria-pressed="true"] { font-weight: 600; }
.seg .seg-thumb {
  position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px;
  width: calc((100% - 4px) / var(--n, 2));
  transform: translateX(calc(var(--i, 0) * 100%));
  border-radius: 8px; background: var(--bg-elevated);
  box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04);
  transition: transform .32s var(--ease), width .32s var(--ease);
}
:root[data-theme="dark"] .seg .seg-thumb { background: #636366; }
.seg.lg button { height: 36px; font-size: 15px; }

/* chips de categoria */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px var(--gutter); margin: 0 calc(var(--gutter) * -1); scroll-padding: var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 17px;
  background: var(--surface); box-shadow: var(--shadow-1);
  font-size: 14.5px; font-weight: 500; color: var(--label);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--label); color: var(--bg); }
.chip .ce { font-size: 16px; }
.chip.small { height: 30px; padding: 0 12px; font-size: 13.5px; }

/* opções em grade (formas de pagamento, tipos) */
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.option {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 74px; padding: 10px 6px; border-radius: 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--separator);
  font-size: 13.5px; font-weight: 600; color: var(--label); text-align: center;
  transition: box-shadow .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.option svg { width: 24px; height: 24px; color: var(--label-2); }
.option:active { transform: scale(.97); }
.option[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-text); }
.option[aria-pressed="true"] svg { color: var(--accent-text); }

/* ---------- badges e status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 11px;
  font-size: 12px; font-weight: 600; letter-spacing: 0; white-space: nowrap;
  background: var(--fill-2); color: var(--label-2);
}
.badge.green { background: rgba(52, 199, 89, .15); color: var(--green-text); }
.badge.red { background: rgba(255, 59, 48, .13); color: var(--red-text); }
.badge.orange { background: rgba(255, 149, 0, .16); color: #B25E00; }
.badge.blue { background: rgba(0, 122, 255, .13); color: var(--blue-text); }
.badge.purple { background: rgba(175, 82, 222, .14); color: #8E3BBF; }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
:root[data-theme="dark"] .badge.orange { color: #FFB340; }
:root[data-theme="dark"] .badge.purple { color: #DA8FFF; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--gray); }

/* ---------- switch iOS ---------- */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--fill); transition: background .25s var(--ease); }
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06);
  transition: transform .3s var(--spring);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

/* ---------- stepper ---------- */
.stepper { display: inline-flex; align-items: center; background: var(--fill-2); border-radius: 10px; height: 34px; flex: none; }
.stepper button { width: 36px; height: 34px; display: grid; place-items: center; color: var(--label); border-radius: 10px; }
.stepper button svg { width: 16px; height: 16px; }
.stepper button:active { background: var(--fill); }
.stepper .qty { min-width: 30px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }

/* ---------- widgets / métricas ---------- */
.widget {
  position: relative;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.widget .w-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--label-2); }
.widget .w-label svg { width: 15px; height: 15px; }
.widget .w-value { font-family: var(--font-rounded); font-size: 27px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.12; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget .w-sub { font-size: 13px; color: var(--label-2); }
.widget.tap { text-align: left; transition: transform .2s var(--ease); }
.widget.tap:active { transform: scale(.98); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.delta svg { width: 12px; height: 12px; }

/* barra de progresso */
.progress { height: 6px; border-radius: 3px; background: var(--fill-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .6s var(--ease); }

/* ---------- estados vazios ---------- */
.empty { text-align: center; padding: 44px 24px; color: var(--label-2); }
.empty .e-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--fill-3); color: var(--label-3); }
.empty .e-icon svg { width: 32px; height: 32px; }
.empty h3 { font-size: 18px; font-weight: 600; color: var(--label); margin-bottom: 4px; letter-spacing: -0.02em; }
.empty p { font-size: 15px; max-width: 34ch; margin: 0 auto; }
.empty .btn { margin-top: 18px; }

/* ==========================================================
   Sheets (modais)
   ========================================================== */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); opacity: 0; transition: opacity .38s var(--ease); }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - var(--safe-top) - 12px);
  display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: 14px 14px 0 0;
  box-shadow: var(--shadow-3);
  transform: translateY(100%);
  transition: transform .46s var(--ease);
  will-change: transform;
  overscroll-behavior: contain;
}
.sheet.tall { height: calc(100dvh - var(--safe-top) - 12px); }
.sheet-wrap.open .sheet { transform: translateY(0); }
.sheet.dragging { transition: none; }
.sheet-grabber { position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--label-3); opacity: .6; z-index: 2; }
.sheet-header {
  flex: none;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 56px; padding: 10px 8px 4px;
  touch-action: none;
}
.sheet-header h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-header .sh-left { justify-self: start; }
.sheet-header .sh-right { justify-self: end; }
.sheet-header .nav-btn.bold { font-weight: 600; }
.sheet-header .nav-btn:disabled { color: var(--label-3); }
.sheet-close {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--fill-2); color: var(--label-2); margin-right: 8px;
}
.sheet-close svg { width: 15px; height: 15px; stroke-width: 2.6; }
.sheet-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px var(--gutter) calc(24px + var(--safe-bottom));
  overscroll-behavior: contain;
}
.sheet-body > * + * { margin-top: 20px; }
.sheet-footer {
  flex: none; padding: 12px var(--gutter) calc(12px + var(--safe-bottom));
  background: var(--bar); border-top: 0.5px solid var(--bar-border);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.sheet-footer + .sheet-body, .sheet-body:has(+ .sheet-footer) { padding-bottom: 20px; }

@media (min-width: 720px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet {
    max-width: 560px; max-height: min(86vh, 860px);
    border-radius: 22px;
    transform: translateY(18px) scale(.96); opacity: 0;
    transition: transform .36s var(--ease), opacity .26s var(--ease);
  }
  .sheet.wide { max-width: 760px; }
  .sheet.tall { height: min(86vh, 860px); }
  .sheet-wrap.open .sheet { transform: none; opacity: 1; }
  .sheet-grabber { display: none; }
  .sheet-footer { border-radius: 0 0 22px 22px; padding-bottom: 14px; }
  .sheet-body { padding-bottom: 28px; }
}

/* alerta (diálogo de confirmação) */
.alert-wrap { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; }
.alert-wrap .sheet-backdrop { opacity: 0; }
.alert-wrap.open .sheet-backdrop { opacity: 1; }
.alert {
  position: relative; width: 100%; max-width: 290px;
  border-radius: 16px; overflow: hidden;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--shadow-3);
  transform: scale(1.12); opacity: 0;
  transition: transform .32s var(--spring), opacity .2s var(--ease);
  text-align: center;
}
.alert-wrap.open .alert { transform: scale(1); opacity: 1; }
.alert-body { padding: 20px 16px 16px; }
.alert-body h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.alert-body p { font-size: 13.5px; margin-top: 4px; color: var(--label); opacity: .85; }
.alert-body .input { margin-top: 14px; text-align: left; }
.alert-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 0.5px solid var(--separator); }
.alert-actions.stacked { grid-auto-flow: row; }
.alert-actions button { height: 46px; font-size: 17px; color: var(--blue-text); }
.alert-actions button + button { border-left: 0.5px solid var(--separator); }
.alert-actions.stacked button + button { border-left: 0; border-top: 0.5px solid var(--separator); }
.alert-actions button.bold { font-weight: 600; }
.alert-actions button.destructive { color: var(--red-text); }
.alert-actions button:active { background: var(--fill-2); }

/* ---------- toasts (HUD) ---------- */
#toasts { position: fixed; z-index: 300; left: 0; right: 0; top: calc(10px + var(--safe-top)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 11px 18px 11px 12px; border-radius: 26px;
  background: color-mix(in srgb, var(--bg-elevated) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-2), inset 0 0 0 0.5px var(--bar-border);
  font-size: 15px; font-weight: 600; letter-spacing: -0.015em;
  animation: toastIn .5s var(--spring) both;
  pointer-events: auto;
}
.toast .ti { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; flex: none; }
.toast .ti svg { width: 15px; height: 15px; stroke-width: 3; }
.toast.error .ti { background: var(--red); }
.toast.info .ti { background: var(--accent); }
.toast.out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-24px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px) scale(.96); } }

/* ---------- teclado numérico ---------- */
.keypad-display { text-align: center; padding: 8px 0 4px; }
.keypad-display .kd-value { font-family: var(--font-rounded); font-size: 52px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.keypad-display .kd-sub { font-size: 15px; color: var(--label-2); margin-top: 4px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button {
  height: 58px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1);
  font-family: var(--font-rounded); font-size: 26px; font-weight: 500;
  display: grid; place-items: center; transition: background .12s, transform .12s;
}
.keypad button svg { width: 26px; height: 26px; }
.keypad button:active { background: var(--fill-2); transform: scale(.97); }

/* ---------- sucesso animado ---------- */
.success-check { width: 88px; height: 88px; margin: 6px auto 12px; border-radius: 50%; background: var(--green); display: grid; place-items: center; color: #fff; animation: popIn .55s var(--spring) both; }
.success-check svg { width: 46px; height: 46px; stroke-width: 3; }
.success-check svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: drawCheck .45s .2s var(--ease-out) forwards; }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

/* ---------- emoji picker ---------- */
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.emoji-grid button { height: 44px; border-radius: 10px; font-size: 26px; display: grid; place-items: center; }
.emoji-grid button[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); position: relative; }
.swatch[aria-pressed="true"]::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; box-shadow: 0 0 0 2px var(--sw); }

/* ---------- gráficos ---------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--label-2); font-size: 11px; }
.chart .grid-line { stroke: var(--separator); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .bar { fill: var(--accent); }
.chart .bar.muted { fill: var(--fill); }
.chart .bar.green { fill: var(--green); }
.chart .bar.red { fill: var(--red); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--label-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.hbar-track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--fill-3); overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

/* ---------- banner / aviso ---------- */
.banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r);
  background: var(--accent-soft); color: var(--label);
  font-size: 14.5px;
}
.banner svg { width: 22px; height: 22px; color: var(--accent-text); flex: none; }
.banner .b-main { flex: 1; min-width: 0; }
.banner b { display: block; font-weight: 600; }
.banner.red { background: rgba(255, 59, 48, .1); }
.banner.red svg { color: var(--red-text); }
.banner.green { background: rgba(52, 199, 89, .12); }
.banner.green svg { color: var(--green-text); }

/* tabela simples */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--label-2); padding: 8px 10px; border-bottom: 0.5px solid var(--separator); }
.table td { padding: 10px; border-bottom: 0.5px solid var(--separator); font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; }
.kv span:first-child { color: var(--label-2); }
.kv b { font-variant-numeric: tabular-nums; font-weight: 600; }
.kv.total { font-size: 18px; padding-top: 10px; border-top: 0.5px solid var(--separator); margin-top: 6px; }
.kv.total span:first-child { color: var(--label); font-weight: 600; }

.divider { height: 0.5px; background: var(--separator); margin: 10px 0; }
.spacer { height: 12px; }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex.between { justify-content: space-between; }
.flex.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
