:root {
  --bg: #0b0d13;
  --surface: #141722;
  --surface2: #1e2235;
  --border: #282d47;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --gold: #dfb347;
  --gold-hover: #c99e36;
  --gold-glow: rgba(223, 179, 71, 0.12);
  --danger: #ef4444;
  --pane-right-bg: #07090e;
  --pane-left-bg: #0d0f17;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg); color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif; height: 100vh; display: flex; flex-direction: column;
  overflow: hidden;
}

header {
  background: var(--surface); height: 65px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; justify-content: space-between;
}

.brand-container { display: flex; align-items: center; gap: 14px; }

.boleto-icon {
  display: flex; align-items: flex-end; gap: 2px; height: 26px; width: 32px;
  padding: 3px; background: rgba(255,255,255,0.05); border-radius: 4px; border: 1px solid var(--border);
}
.boleto-icon .bar { background: var(--gold); border-radius: 1px; height: 100%; }
.boleto-icon .bar1 { width: 3px; }
.boleto-icon .bar2 { width: 5px; }
.boleto-icon .bar3 { width: 2px; }
.boleto-icon .bar4 { width: 4px; }

h2 { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: 0.5px; }
.subdomain-gold { color: var(--gold); font-weight: 400; font-size: 13px; }
.header-subtitle { font-size: 11px; color: var(--text2); display: block; margin-top: 1px; }

/* Distintivo de Banco no Cabeçalho */
.banco-header-badge {
  background: rgba(223, 179, 71, 0.1); border: 1px solid var(--gold);
  color: var(--gold); padding: 6px 16px; border-radius: 20px; font-weight: 800;
  font-size: 13px; letter-spacing: 0.05em; font-family: monospace;
}

.header-actions { display: flex; gap: 12px; align-items: center; }
.split-container { flex: 1; display: flex; overflow: hidden; }
.pane { width: 50%; display: flex; flex-direction: column; overflow: hidden; }
.pane-left { border-right: 2px solid var(--border); background: var(--pane-left-bg); }
.pane-right { background: var(--pane-right-bg); }

.pane-title {
  padding: 14px 20px; background: var(--surface2); font-size: 12.5px; 
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: #fff;
  display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border);
}

.toolbar { padding: 10px 15px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; gap: 8px; align-items: center; }
.toolbar input { background: var(--surface2); border: 1px solid var(--border); border-radius: 5px; color: #fff; padding: 7px 12px; font-size: 12.5px; outline: none; flex: 1; }
.toolbar input:focus { border-color: var(--gold); }

.list-wrap { flex: 1; overflow-y: auto; padding: 10px; }

.nota-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 16px; margin-bottom: 8px; cursor: pointer; transition: transform 0.1s, border-color 0.2s;
  display: flex; align-items: center; justify-content: space-between;
}
.nota-card:hover { border-color: var(--gold); transform: translateX(2px); }
.nota-card.checked { border-left: 4px solid var(--gold); background: var(--gold-glow); }
.nota-card.removido { border-left: 4px solid var(--danger); opacity: 0.5; }

.nota-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.nota-top { font-weight: 700; font-size: 14px; display: flex; gap: 10px; font-family: monospace; align-items: center; }
.nota-top .doc-text { color: var(--gold); }
.nota-forn { font-size: 13px; color: #fff; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.nota-val { font-size: 14px; font-weight: bold; color: #fff; font-family: monospace; }

/* Crachá e Efeito Piscante do Tipo 129 */
.badge-tipo { font-size: 11px; font-weight: bold; padding: 2px 6px; border-radius: 4px; background: var(--surface2); color: var(--text2); font-family: monospace; }
.badge-tipo.alert-129 {
  background: var(--danger); color: #fff;
  animation: pulse 1.2s infinite alternate;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

@keyframes pulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; background-color: #ff2a2a; }
}

.circle-seq { width: 26px; height: 26px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; color: var(--gold); }
.nota-card.removido .circle-seq { color: var(--danger); }

.btn-print { background: var(--gold); border: none; color: #000; padding: 9px 18px; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 13px; }
.btn-print:hover { background: var(--gold-hover); }

.btn-import { background: var(--surface2); border: 1px solid var(--border); padding: 9px 16px; font-size: 13px; color: #fff; border-radius: 6px; cursor: pointer; position: relative; font-weight: 600; }
.btn-import:hover { background: var(--border); border-color: var(--gold); }
.btn-import input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.btn-mass { border: none; padding: 7px 12px; font-size: 11px; font-weight: bold; border-radius: 4px; cursor: pointer; text-transform: uppercase; }
.mass-right { background: rgba(223, 179, 71, 0.15); color: var(--gold); border: 1px solid var(--gold); }
.mass-right:hover { background: var(--gold); color: #000; }
.mass-left { background: rgba(239, 68, 110, 0.1); color: var(--danger); border: 1px solid var(--danger); }
.mass-left:hover { background: var(--danger); color: #fff; }

.totalizer-wrapper { display: flex; align-items: center; gap: 12px; }
.totalizer-box { background: rgba(223, 179, 71, 0.12); border: 1px solid var(--gold); padding: 4px 14px; border-radius: 4px; font-weight: bold; color: var(--gold); font-family: monospace; font-size: 14px; }

.badge-gold { background: var(--gold); color: #000; padding: 3px 8px; border-radius: 4px; font-weight: bold; font-size: 11px; }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); padding: 3px 8px; border-radius: 4px; font-weight: bold; font-size: 11px; border: 1px solid var(--danger); }
.aviso-vazio { text-align: center; color: var(--text2); padding: 40px 20px; font-size: 13.5px; }