/* ============================================================
   AssinaBox — Design System Unbox v2.3
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root,
[data-theme="light"] {
  --font-display: 'Sora', system-ui, sans-serif;
  --font-text: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --bg0: #f1f3f7; --bg1: #ffffff; --bg2: #ffffff; --bg3: #f7f8fb; --bg4: #e8ecf3;
  --b1: #e0e5ee; --b2: #cfd7e6; --b3: #b7c1d2;
  --t1: #111318; --t2: #3f4654; --t3: #778092; --t4: #a0a8b7;
  --inp: #ffffff; --inpb: #d4dbe8; --ti: #111318;

  --or: #f97316; --or2: #ea650b; --or3: #c94f05;
  --og: rgba(249,115,22,.12); --og2: rgba(249,115,22,.20);
  --info: #3b82f6; --success: #22c55e; --danger: #ef4444; --warning: #f59e0b;

  --sidebar-w: 228px; --topbar-h: 72px; --content-max: 1480px;
  --page-gap: clamp(18px, 2.5vw, 36px); --bottom-safe-gap: 160px;
  --radius-card: 12px; --radius-control: 8px;
  --shadow-card: 0 10px 28px rgba(15, 23, 42, .07);

  --scrollbar-size: 8px;
  --scrollbar-thumb: var(--or);
  --scrollbar-thumb-hover: var(--or2);
  --scrollbar-track: transparent;

  --fs-xs: 11px; --fs-sm: 12px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px;
}

[data-theme="dark"] {
  --bg0: #09090b; --bg1: #111113; --bg2: #16161a; --bg3: #1c1c21; --bg4: #232328;
  --b1: #232328; --b2: #2c2c33; --b3: #383842;
  --t1: #eeeef3; --t2: #c8c8d8; --t3: #858596; --t4: #656574;
  --inp: #1c1c21; --inpb: #2c2c33; --ti: #eeeef3;
  --shadow-card: 0 14px 34px rgba(0, 0, 0, .22);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
*::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); }
*::-webkit-scrollbar-track { background: var(--scrollbar-track); }
*::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: content-box; }
*::-webkit-scrollbar-corner { background: transparent; }

body {
  margin: 0; background: var(--bg0); color: var(--t1);
  font-family: var(--font-text); font-size: var(--fs-md); line-height: 1.55;
  transition: background .2s, color .2s;
}
h1, h2, h3, h4, h5, h6, button, label, nav { font-family: var(--font-display); }
code, pre, .mono { font-family: var(--font-mono); }
a { color: var(--or); }
img { max-width: 100%; }
[hidden] { display: none !important; }

[data-theme="light"] .abx-logo-dark { display: none; }
[data-theme="dark"] .abx-logo-light { display: none; }

/* ---------- Layout base ---------- */
.abx-wrapper { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.abx-main { min-width: 0; }

.abx-sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--bg1); border-right: 1px solid var(--b1); z-index: 30;
  transition: background .2s, border-color .2s;
}
.abx-sidebar-head {
  height: var(--topbar-h); display: flex; align-items: center; padding: 0 18px;
  border-bottom: 1px solid var(--b1); flex-shrink: 0;
}
.abx-nav { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.abx-nav-item {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 9px 12px;
  border-radius: 9px; color: var(--t2); text-decoration: none; font-weight: 600;
  font-size: var(--fs-sm); cursor: pointer; border: 0; background: none; text-align: left;
  font-family: var(--font-display); width: 100%;
}
.abx-nav-item svg { color: var(--or); flex-shrink: 0; }
.abx-nav-item:hover { background: var(--bg3); color: var(--t1); }
.abx-nav-item.active { background: var(--og); color: var(--or); font-weight: 700; }
.abx-sidebar-foot {
  padding: 14px 18px; border-top: 1px solid var(--b1); display: flex; flex-direction: column;
  align-items: flex-start; gap: 4px; font-size: var(--fs-xs); color: var(--t4); flex-shrink: 0;
}
.abx-version { font-family: var(--font-mono); }

.abx-topbar {
  position: sticky; top: 0; z-index: 10; height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px; padding: 0 var(--page-gap);
  background: var(--bg1); border-bottom: 1px solid var(--b1);
  transition: background .2s, border-color .2s;
}
.abx-topbar-title { margin: 0; font-size: var(--fs-xl); font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.abx-topbar-actions { display: flex; align-items: center; gap: 12px; }
.abx-user-chip { display: flex; align-items: center; gap: 10px; }
.abx-user-name { font-weight: 600; font-size: var(--fs-sm); color: var(--t2); }

.abx-hamburger { display: none; background: none; border: 0; color: var(--t1); cursor: pointer; padding: 6px; border-radius: 8px; }
.abx-hamburger:hover { background: var(--bg3); }

.abx-theme-toggle {
  position: relative; width: 52px; height: 26px; border: 0; border-radius: 999px;
  background: var(--bg4); cursor: pointer; display: flex; align-items: center; padding: 0 5px;
  justify-content: space-between; color: var(--t3);
}
.abx-theme-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--or); transition: transform .2s;
}
[data-theme="dark"] .abx-theme-toggle::after { transform: translateX(26px); }
.abx-theme-toggle svg { position: relative; z-index: 1; width: 13px; height: 13px; }
/* Ícone sob o botão deslizante fica branco (sol no claro, lua no escuro). */
[data-theme="light"] .abx-theme-toggle .icon-sun { color: #fff; }
[data-theme="dark"] .abx-theme-toggle .icon-moon { color: #fff; }

.content-shell {
  width: 100%; max-width: var(--content-max); margin: 0 auto;
  padding: 28px var(--page-gap) var(--bottom-safe-gap);
}

.abx-overlay {
  position: fixed; inset: 0; z-index: 25; background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

/* ---------- Componentes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-control); padding: 10px 14px; font-family: var(--font-display);
  font-weight: 700; font-size: var(--fs-sm); cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--or); color: #fff; border: 1px solid var(--or); }
.btn-primary:hover:not(:disabled) { background: var(--or2); border-color: var(--or2); }
.btn-primary:active { background: var(--or3); border-color: var(--or3); }
.btn-secondary { background: var(--bg1); border: 1px solid var(--b2); color: var(--t2); }
.btn-secondary:hover:not(:disabled) { border-color: rgba(249,115,22,.45); color: var(--or); }
.btn-danger { background: var(--danger); border: 1px solid var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.92); }
.btn-sm { padding: 6px 10px; font-size: var(--fs-xs); }
.btn-block { width: 100%; }
.btn-icon { padding: 7px; }

.card {
  background: var(--bg2); border: 1px solid var(--b1); border-radius: var(--radius-card);
  padding: 18px 22px; box-shadow: var(--shadow-card); margin-bottom: 18px;
  transition: background .2s, border-color .2s;
}
.card h3 { margin: 0 0 12px; font-size: var(--fs-lg); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }

.abx-grid { display: grid; gap: 16px; }
.abx-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.abx-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat-card {
  background: var(--bg2); border: 1px solid var(--b1); border-radius: 10px; padding: 14px;
  box-shadow: var(--shadow-card);
}
.stat-card .stat-label { font-size: var(--fs-sm); color: var(--t3); font-weight: 600; font-family: var(--font-display); }
.stat-card .stat-value { font-size: 28px; font-weight: 800; font-family: var(--font-display); margin-top: 2px; }
.stat-card.stat-danger .stat-value { color: var(--danger); }
.stat-card.stat-warning .stat-value { color: var(--warning); }
.stat-card.stat-orange .stat-value { color: var(--or); }

/* Formulários */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; }
.field { display: flex; flex-direction: column; gap: 6px; align-self: start; }
.field label { font-size: var(--fs-sm); font-weight: 600; }
.field .req, .req { color: var(--or); }
.field .help { font-size: var(--fs-xs); color: var(--t4); }
.field .error-text { font-size: var(--fs-xs); color: var(--danger); }
.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; } .col-12 { grid-column: span 12; }

input[type="text"], input[type="password"], input[type="email"], input[type="date"],
input[type="number"], input[type="url"], input[type="tel"], select, textarea {
  background: var(--inp); border: 1px solid var(--inpb); border-radius: var(--radius-control);
  color: var(--ti); font-family: var(--font-text); font-size: var(--fs-md);
  padding: 10px 14px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(249,115,22,.55); box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
textarea { resize: vertical; min-height: 90px; }
.abx-check { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--t2); cursor: pointer; font-family: var(--font-text); }
.abx-check input { width: auto; accent-color: var(--or); }

/* Checkbox próprio: quadrado laranja com check BRANCO. */
.abx-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; margin: 0; flex-shrink: 0;
  border: 1.5px solid var(--b3); border-radius: 4px;
  background: var(--inp); cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.abx-check input[type="checkbox"]:hover { border-color: var(--or); }
.abx-check input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(249,115,22,.2); }
.abx-check input[type="checkbox"]:checked {
  background-color: var(--or); border-color: var(--or);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 11px 11px;
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 10px;
  font-size: var(--fs-xs); font-weight: 700; font-family: var(--font-display); white-space: nowrap;
}
.badge-warning { color: #f59e0b; background: rgba(245,158,11,.13); }
.badge-info { color: #3b82f6; background: rgba(59,130,246,.13); }
.badge-success { color: #22c55e; background: rgba(34,197,94,.13); }
.badge-danger { color: #ef4444; background: rgba(239,68,68,.13); }
.badge-muted { color: var(--t3); background: var(--bg4); }

/* Tabelas */
.table-wrap { overflow-x: auto; }
.abx-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.abx-table th {
  text-align: left; padding: 10px 12px; color: var(--t3); font-family: var(--font-display);
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--b2); white-space: nowrap;
}
.abx-table td { padding: 11px 12px; border-bottom: 1px solid var(--b1); vertical-align: middle; }
.abx-table tr:hover td { background: var(--bg3); }
.abx-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.abx-empty { text-align: center; color: var(--t3); padding: 34px 10px; }

.abx-pagination { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 14px; font-size: var(--fs-sm); color: var(--t3); }

/* Modais */
.abx-modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .48); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 20px; overflow-y: auto;
}
.abx-modal {
  background: var(--bg2); border: 1px solid var(--b1); border-radius: 16px; padding: 24px;
  width: 100%; max-width: 520px; box-shadow: var(--shadow-card); max-height: calc(100vh - 40px);
  overflow-y: auto; position: relative;
}
.abx-modal.lg { max-width: 720px; }
.abx-modal-close {
  position: absolute; top: 14px; right: 14px; background: none; border: 0; color: var(--t3);
  cursor: pointer; padding: 6px; border-radius: 8px; line-height: 0;
}
.abx-modal-close:hover { background: var(--bg3); color: var(--t1); }
.abx-modal h3 { margin: 0 0 6px; font-size: var(--fs-xl); padding-right: 30px; }
.abx-modal .modal-sub { color: var(--t3); font-size: var(--fs-sm); margin: 0 0 16px; }
.abx-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Loader / progresso */
.abx-spinner {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid var(--og2); border-top-color: var(--or); animation: abx-spin .7s linear infinite;
  vertical-align: -4px;
}
.abx-spinner.lg { width: 34px; height: 34px; border-width: 3.5px; }
@keyframes abx-spin { to { transform: rotate(360deg); } }
.abx-loader-modal { text-align: center; padding: 12px 0; }
.abx-loader-modal .msg { margin-top: 14px; color: var(--t2); font-weight: 600; font-family: var(--font-display); }
.abx-progress { height: 8px; background: var(--bg4); border-radius: 999px; overflow: hidden; margin-top: 16px; }
.abx-progress-bar { height: 100%; background: var(--or); border-radius: 999px; width: 0; transition: width .2s; }
.abx-boot-loader { display: flex; align-items: center; gap: 10px; color: var(--t3); padding: 40px 0; justify-content: center; }

/* Toasts */
.abx-toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 92vw; }
.abx-toast {
  background: var(--bg2); border: 1px solid var(--b1); border-left: 3px solid var(--success);
  border-radius: 10px; padding: 12px 16px; box-shadow: var(--shadow-card); font-size: var(--fs-sm);
  max-width: 380px; animation: abx-slide .25s ease;
}
.abx-toast.error { border-left-color: var(--danger); }
.abx-toast.warning { border-left-color: var(--warning); }
@keyframes abx-slide { from { transform: translateX(24px); opacity: 0; } }

/* Suporte flutuante */
.abx-support-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 54px; height: 54px;
  border-radius: 50%; background: var(--or); color: #fff; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(249,115,22,.4); transition: background .15s, transform .15s;
}
.abx-support-fab:hover { background: var(--or2); transform: translateY(-2px); }

/* ---------- Login / Conferência ---------- */
.abx-login-page, .abx-verify-page { min-height: 100vh; display: flex; }
.abx-login-wrap, .abx-verify-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 40px);
}
.abx-login-card, .abx-verify-card {
  background: var(--bg2); border: 1px solid var(--b1); border-radius: 16px; padding: 32px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 14px;
}
/* Campos do login ocupam toda a largura do card. */
.abx-login-card form { display: flex; flex-direction: column; gap: 14px; }
.abx-login-card .field { align-self: stretch; width: 100%; }
.abx-verify-card { max-width: 640px; }
.abx-login-logo { display: flex; justify-content: center; margin-bottom: 4px; }
.abx-verify-card .abx-login-logo { justify-content: flex-start; }
.abx-login-card h1, .abx-verify-card h1 { margin: 0; font-size: 22px; text-align: center; }
.abx-verify-card h1 { text-align: left; }
.abx-login-sub { margin: -6px 0 4px; text-align: center; color: var(--t3); font-size: var(--fs-sm); }
.abx-login-error {
  background: rgba(239,68,68,.1); color: var(--danger); border: 1px solid rgba(239,68,68,.25);
  border-radius: 8px; padding: 10px 14px; font-size: var(--fs-sm);
}
.abx-login-footer {
  display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px;
  font-size: var(--fs-xs); color: var(--t4);
}

/* 2FA */
.abx-2fa-hint { color: var(--t3); font-size: var(--fs-sm); margin: 0 0 12px; }
.abx-2fa-qr { display: flex; justify-content: center; margin: 0 0 12px; }
.abx-2fa-qr svg { width: 180px; height: 180px; background: #fff; padding: 10px; border-radius: 10px; border: 1px solid var(--b1); }
.abx-2fa-secret { font-size: var(--fs-xs); color: var(--t4); text-align: center; word-break: break-all; margin: 0 0 12px; }
#abx-2fa-input { text-align: center; font-family: var(--font-mono); font-size: 20px; letter-spacing: 8px; }

.abx-verify-status {
  display: flex; align-items: center; gap: 10px; border-radius: 10px; padding: 12px 16px;
  font-weight: 700; font-family: var(--font-display); font-size: var(--fs-md);
}
.abx-verify-status.ok { background: rgba(34,197,94,.12); color: #16a34a; }
.abx-verify-status.warn { background: rgba(245,158,11,.12); color: #d97706; }
.abx-verify-status.err { background: rgba(239,68,68,.12); color: var(--danger); }
.abx-verify-list { display: grid; grid-template-columns: 220px 1fr; gap: 8px 16px; margin: 8px 0; font-size: var(--fs-sm); }
.abx-verify-list dt { color: var(--t3); font-weight: 600; font-family: var(--font-display); }
.abx-verify-list dd { margin: 0; word-break: break-word; }
.abx-hash { font-size: var(--fs-xs); }
.abx-verify-hint { color: var(--t3); font-size: var(--fs-xs); }
.abx-verify-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.abx-copied { color: var(--success); font-size: var(--fs-xs); font-weight: 600; }
.abx-verify-footer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--b1); font-size: var(--fs-xs); color: var(--t4); text-align: center; }
.abx-verify-inst { margin: 0 0 12px; }
.abx-verify-dev { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.abx-verify-dev a { line-height: 0; }

/* ---------- Assinatura: wizard + visualizador ---------- */
.abx-steps {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 26px; width: 100%;
}
.abx-step {
  flex: 1; position: relative; display: flex; flex-direction: column;
  align-items: center; gap: 8px; min-width: 0;
  font-size: var(--fs-sm); font-weight: 600; font-family: var(--font-display);
  color: var(--t3); text-align: center;
}
.abx-step .n {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg2); border: 2px solid var(--b2); color: var(--t3);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-lg); font-weight: 700; position: relative; z-index: 1;
  transition: background .2s, border-color .2s, color .2s;
}
.abx-step .lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Linha fina interligando as etapas. */
.abx-step::before {
  content: ''; position: absolute; top: 18px; right: 50%; width: 100%; height: 2px;
  background: var(--b2); z-index: 0;
}
.abx-step:first-child::before { display: none; }
.abx-step.active .n { background: var(--or); border-color: var(--or); color: #fff; }
.abx-step.active { color: var(--or); }
.abx-step.active::before { background: var(--or); }
.abx-step.done .n { background: var(--og); border-color: var(--or); color: var(--or); }
.abx-step.done { color: var(--or); }
.abx-step.done::before { background: var(--or); }

/* Ações das listagens como links. */
.abx-table .actions { gap: 4px 16px; align-items: center; }
.action-link {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--or); font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-sm); text-decoration: none; line-height: 1.3;
}
.action-link:hover { color: var(--or2); text-decoration: underline; }
.action-link.danger { color: var(--danger); }
.action-link.danger:hover { color: #c02626; }

.abx-dropzone {
  border: 2px dashed var(--b2); border-radius: var(--radius-card); padding: 44px 20px;
  text-align: center; color: var(--t3); cursor: pointer; transition: border-color .15s, background .15s;
}
.abx-dropzone:hover, .abx-dropzone.drag { border-color: var(--or); background: var(--og); color: var(--or); }
.abx-dropzone strong { font-family: var(--font-display); }

.abx-viewer-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.abx-viewer-panel { background: var(--bg3); border: 1px solid var(--b1); border-radius: var(--radius-card); padding: 14px; }
.abx-viewer-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.abx-viewer-toolbar .spacer { flex: 1; }
.abx-page-info { font-size: var(--fs-sm); color: var(--t3); font-family: var(--font-mono); }
.abx-canvas-wrap {
  position: relative; margin: 0 auto; max-width: 100%; overflow: auto;
  display: flex; justify-content: center; background: var(--bg4); border-radius: 8px; padding: 12px;
}
.abx-canvas-stage { position: relative; line-height: 0; }
.abx-canvas-stage canvas { box-shadow: 0 6px 22px rgba(15,23,42,.18); border-radius: 4px; max-width: 100%; height: auto; }

.abx-sig-box {
  position: absolute; border: 2px solid var(--or); background: rgba(249,115,22,.14);
  border-radius: 4px; cursor: move; touch-action: none; line-height: 1.2;
  display: flex; flex-direction: column; justify-content: center; padding: 4px 6px; overflow: hidden;
}
.abx-sig-box .sig-title { font-size: 9px; font-weight: 700; color: var(--or3); font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abx-sig-box .sig-sub { font-size: 7px; color: var(--or3); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abx-sig-box .sig-resize {
  position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--or); cursor: nwse-resize; border: 2px solid var(--bg1);
}

.abx-sign-summary { font-size: var(--fs-sm); }
.abx-sign-summary dt { color: var(--t3); font-weight: 600; font-family: var(--font-display); margin-top: 8px; }
.abx-sign-summary dd { margin: 0; }

/* Linha do tempo */
.abx-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--b2); }
.abx-timeline li { position: relative; padding: 0 0 16px 16px; font-size: var(--fs-sm); }
.abx-timeline li::before {
  content: ''; position: absolute; left: -7px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--or); border: 2px solid var(--bg2);
}
.abx-timeline .tl-date { color: var(--t4); font-size: var(--fs-xs); font-family: var(--font-mono); }
.abx-timeline .tl-user { color: var(--t3); font-size: var(--fs-xs); }

/* Alertas inline */
.abx-alert { border-radius: 10px; padding: 12px 16px; font-size: var(--fs-sm); margin-bottom: 14px; }
.abx-alert.warning { background: rgba(245,158,11,.12); color: #b45309; border: 1px solid rgba(245,158,11,.3); }
.abx-alert.danger { background: rgba(239,68,68,.1); color: var(--danger); border: 1px solid rgba(239,68,68,.25); }
.abx-alert.info { background: rgba(59,130,246,.1); color: #1d4ed8; border: 1px solid rgba(59,130,246,.25); }
[data-theme="dark"] .abx-alert.warning { color: #fbbf24; }
[data-theme="dark"] .abx-alert.info { color: #93c5fd; }

/* ---------- Responsividade ---------- */
@media (max-width: 1024px) {
  .abx-wrapper { grid-template-columns: 1fr; }
  .abx-sidebar {
    position: fixed; left: 0; top: 0; width: var(--sidebar-w); transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.2);
  }
  .abx-sidebar.open { transform: translateX(0); }
  .abx-hamburger { display: inline-flex; }
  .abx-viewer-layout { grid-template-columns: 1fr; }
  .abx-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .col-3, .col-4, .col-6, .col-8 { grid-column: span 12; }
  .abx-user-name { display: none; }
  .abx-verify-list { grid-template-columns: 1fr; gap: 2px 0; }
  .abx-verify-list dt { margin-top: 8px; }
}
@media (max-width: 420px) {
  .abx-grid-4, .abx-grid-2 { grid-template-columns: 1fr; }
  .abx-modal-actions .btn, .abx-verify-actions .btn { width: 100%; }
  .content-shell { padding-left: 14px; padding-right: 14px; }
}

/* ---------- Mobile (refinamentos) ---------- */
body { -webkit-tap-highlight-color: transparent; }
.abx-sidebar { height: 100vh; height: 100dvh; }

@media (max-width: 720px) {
  /* iOS dá zoom automático em inputs com fonte < 16px. */
  input[type="text"], input[type="password"], input[type="email"], input[type="date"],
  input[type="number"], input[type="url"], input[type="tel"], select, textarea { font-size: 16px; }

  .btn { min-height: 42px; }
  .btn-sm { min-height: 38px; }
  .field > .btn { width: 100%; }
  .content-shell { padding-top: 18px; }

  /* Tabelas viram cards empilhados (sem scroll horizontal). */
  .abx-table, .abx-table tbody { display: block; }
  .abx-table thead { display: none; }
  .abx-table tr {
    display: block; border: 1px solid var(--b1); border-radius: 10px;
    padding: 6px 14px; margin-bottom: 10px; background: var(--bg2);
  }
  .abx-table tr:hover td { background: transparent; }
  .abx-table td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid var(--b1); text-align: right; flex-wrap: wrap;
  }
  .abx-table td:last-child { border-bottom: none; }
  .abx-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    font-family: var(--font-display); font-weight: 600; color: var(--t3);
    font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em;
    text-align: left; flex-shrink: 0;
  }
  .abx-table td.abx-empty { justify-content: center; text-align: center; }
  .abx-table .actions { justify-content: flex-end; width: 100%; }
  .abx-pagination { justify-content: center; }

  /* Modais em estilo bottom-sheet. */
  .abx-modal-backdrop { padding: 0; align-items: flex-end; }
  .abx-modal, .abx-modal.lg {
    max-width: 100%; border-radius: 18px 18px 0 0;
    max-height: 92vh; max-height: 92dvh; padding: 20px 16px;
  }
  .abx-modal-actions .btn { flex: 1 1 auto; }

  /* Visualizador PDF: altura controlada, controles sempre à mão. */
  .abx-canvas-wrap { padding: 8px; max-height: 62vh; max-height: 62dvh; overflow: auto; }
  .abx-viewer-toolbar { gap: 6px; }
  .abx-viewer-toolbar .btn { flex: 1 1 auto; }
  .abx-page-info { width: 100%; text-align: center; order: -1; }

  /* Toasts em largura total no topo. */
  .abx-toasts { left: 12px; right: 12px; top: 12px; }
  .abx-toast { max-width: none; width: 100%; }

  .abx-support-fab { width: 48px; height: 48px; right: 14px; bottom: 14px; }
  .abx-login-card, .abx-verify-card { padding: 24px 18px; }

  /* Passo a passo compacto no celular. */
  .abx-step .n { width: 30px; height: 30px; font-size: var(--fs-md); }
  .abx-step::before { top: 15px; }
  .abx-step .lbl { font-size: 10px; }
}

/* Alvos de toque maiores em telas touch. */
@media (pointer: coarse) {
  .abx-nav-item { min-height: 44px; }
  .abx-sig-box .sig-resize { width: 24px; height: 24px; right: -12px; bottom: -12px; }
  .abx-sig-box { border-width: 2.5px; }
  .abx-theme-toggle { width: 56px; height: 28px; }
}

@media print {
  .abx-sidebar, .abx-topbar, .abx-support-fab, .abx-verify-actions, .abx-hamburger { display: none !important; }
}
