/* ==========================================================================
   STREAM PLAYER - PAINEL DO REVENDEDOR  ·  Tema claro, limpo e responsivo
   Marca: marinho #06142e · azul #0b6bcb · verde #22c55e
   ========================================================================== */

:root {
  --bg: #f3f8fe;
  --surface: #ffffff;
  --surface-2: #f6faff;
  --line: #dbe7f5;
  --line-strong: #c3d8ef;

  --ink: #0b1f44;          /* títulos */
  --text: #24385c;         /* texto base */
  --muted: #52617c;        /* secundário (contraste AA em fundo branco) */

  --primary: #0b6bcb;
  --primary-600: #0856a5;
  --primary-50: #e5f1fd;
  --pink: #38bdf8;
  --pink-50: #e0f2fe;
  --green: #15803d;
  --green-50: #dcfce7;
  --amber: #b86e00;
  --amber-50: #fff3d9;
  --red: #d63355;
  --red-50: #ffe7ec;
  --cyan: #0b8fb5;
  --cyan-50: #e0f4fa;

  --sidebar-w: 268px;
  --topbar-h: 68px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(6, 20, 46, .05), 0 1px 3px rgba(6, 20, 46, .04);
  --shadow: 0 4px 14px rgba(6, 20, 46, .07);
  --shadow-lg: 0 24px 60px rgba(6, 20, 46, .22);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 16px; height: 16px; }
:focus-visible { outline: 3px solid rgba(11, 107, 203, .35); outline-offset: 2px; }

/* ---------- Estrutura ---------- */
.app-wrapper { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.app-sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  z-index: 60;
  transition: transform .3s var(--ease);
}
.sidebar-header { padding: 20px 20px 14px; display: flex; align-items: center; justify-content: space-between; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, #0b6bcb, #22c55e);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(11, 107, 203, .3);
}
.brand-icon .ico { width: 22px; height: 22px; }
.brand-line { display: flex; align-items: center; gap: 6px; }
.brand-name { font-weight: 800; font-size: 16.5px; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em;
  color: var(--primary); background: var(--primary-50);
  padding: 2px 7px; border-radius: 99px;
}
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 600; }
.sidebar-close { display: none; width: 38px; height: 38px; border-radius: 10px; color: var(--muted); place-items: center; }
.sidebar-close:hover { background: var(--surface-2); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 14px 14px; }
.nav-category {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #8a90a8; padding: 18px 10px 8px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border-radius: 12px; margin-bottom: 2px;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  text-align: left; cursor: pointer; transition: background .15s, color .15s;
  position: relative;
}
.sidebar-link .ico { color: #7b819c; transition: color .15s; }
.sidebar-link:hover { background: var(--surface-2); color: var(--ink); }
.sidebar-link:hover .ico { color: var(--primary); }
.sidebar-link.active { background: var(--primary-50); color: var(--primary); font-weight: 700; }
.sidebar-link.active .ico { color: var(--primary); }
.sidebar-link.active::before {
  content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px;
  background: var(--primary); border-radius: 0 4px 4px 0;
}

.sidebar-footer { padding: 14px; border-top: 1px solid var(--line); }
.quick-credit-card {
  background: linear-gradient(145deg, #06142e 0%, #12306b 100%);
  border-radius: 16px; padding: 16px; color: #fff; position: relative; overflow: hidden;
}
.quick-credit-card::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px;
  border-radius: 50%; background: rgba(56, 189, 248, .35); filter: blur(2px);
}
.quick-credit-card .title { font-size: 12px; font-weight: 700; color: #bcd6f5; letter-spacing: .04em; text-transform: uppercase; position: relative; z-index: 1; }
.quick-credit-card .amount { font-size: 34px; font-weight: 800; line-height: 1.15; margin: 2px 0 12px; position: relative; z-index: 1; }
.quick-credit-card .amount small { font-size: 13px; font-weight: 600; color: #bcd6f5; margin-left: 4px; }
.btn-sidebar-recharge {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #4ade80, #22c55e); color: #052e16; font-weight: 800; font-size: 14px;
  padding: 11px; border-radius: 11px; position: relative; z-index: 1;
  transition: transform .15s, filter .15s;
}
.btn-sidebar-recharge:hover { filter: brightness(1.06); transform: translateY(-1px); }

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(6, 20, 46, .45); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 55;
}
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

/* ---------- Main + Topbar ---------- */
.app-main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.app-topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 28px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mobile-toggle-btn {
  display: none; width: 42px; height: 42px; border-radius: 12px; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.page-title { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.page-crumb { font-size: 12.5px; color: var(--muted); font-weight: 600; }

.saldo-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--primary-50); color: var(--primary);
  border-radius: 12px; padding: 8px 14px; font-weight: 700; font-size: 13px; white-space: nowrap;
}
.saldo-chip b { font-size: 15px; color: var(--ink); font-weight: 800; }
.user-profile-pill { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #0b6bcb, #22c55e); color: #fff; font-weight: 800; font-size: 14px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-meta-name { font-size: 13.5px; font-weight: 700; color: var(--ink); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta-role { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.btn-topbar-exit {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 11px;
  font-size: 13.5px; font-weight: 700; color: var(--red); background: var(--red-50); transition: filter .15s;
}
.btn-topbar-exit:hover { filter: brightness(.96); }

/* ---------- Conteúdo ---------- */
.panel-content { padding: 28px; max-width: 1360px; width: 100%; margin: 0 auto; }

.welcome-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(120deg, #e5f1fd, #dcfce7);
  border: 1px solid #cfe3f9; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 22px;
}
.welcome-title { font-weight: 800; font-size: 17px; color: var(--ink); }
.welcome-desc { color: var(--muted); font-size: 14px; margin-top: 2px; max-width: 620px; }

/* KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.kpi-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.kpi-icon .ico { width: 24px; height: 24px; }
.kpi-icon-cyan { background: var(--cyan-50); color: var(--cyan); }
.kpi-icon-green { background: var(--green-50); color: var(--green); }
.kpi-icon-purple { background: var(--primary-50); color: var(--primary); }
.kpi-icon-amber { background: var(--amber-50); color: var(--amber); }
.kpi-info { display: flex; flex-direction: column; min-width: 0; }
.kpi-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.kpi-value { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.2; letter-spacing: -.02em; }
.kpi-value.is-text { font-size: 19px; padding-top: 4px; }
.status-online { display: inline-flex; align-items: center; gap: 8px; color: var(--green); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-50); }

/* Botões */
.btn-panel-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 18px; border-radius: 12px; font-weight: 700; font-size: 14.5px;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; min-height: 46px;
  text-align: center; line-height: 1.25;
}
.btn-panel-action:active { transform: scale(.98); }
.btn-panel-action:disabled { opacity: .6; cursor: not-allowed; }
.btn-panel-cyan { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(11, 107, 203, .28); }
.btn-panel-cyan:hover { background: var(--primary-600); transform: translateY(-1px); }
.btn-panel-green { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(15, 157, 107, .25); }
.btn-panel-green:hover { filter: brightness(.94); transform: translateY(-1px); }
.btn-panel-outline { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-panel-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-panel-lg { padding: 14px 20px; font-size: 15.5px; }

.actions-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.actions-strip .btn-panel-action { justify-content: flex-start; padding: 14px 18px; }
.actions-strip small { display: block; font-weight: 600; font-size: 12px; opacity: .85; }
.actions-strip .btn-txt { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }

/* Cards / Grid */
.main-grid-split { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-header-clean {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.card-title-text { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--ink); }
.card-title-text .ico { color: var(--primary); }
.card-hint { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.search-box { position: relative; }
.search-box .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8a90a8; width: 17px; height: 17px; pointer-events: none; }
.table-search-input {
  width: 240px; max-width: 100%; padding: 10px 12px 10px 38px; border-radius: 11px;
  border: 1.5px solid var(--line); background: var(--surface-2); font-size: 14px; outline: none; transition: border-color .15s, background .15s, box-shadow .15s;
}
.table-search-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-50); }

/* Tabela */
.table-responsive-wrapper { overflow-x: auto; }
.data-table-pro { width: 100%; border-collapse: collapse; }
.data-table-pro th {
  text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); padding: 12px 20px; white-space: nowrap; border-bottom: 1px solid var(--line);
}
.data-table-pro td { padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.data-table-pro tbody tr:last-child td { border-bottom: 0; }
.data-table-pro tbody tr:hover td { background: #fafbff; }
.cell-nome { font-weight: 700; color: var(--ink); }
.cell-plano { color: var(--muted); font-size: 13.5px; }
.user-code, .pass-code {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 600;
  padding: 4px 9px; border-radius: 8px; white-space: nowrap;
}
.user-code { background: var(--primary-50); color: var(--primary-600); }
.pass-code { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.badge-status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge-status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-status-active { background: var(--green-50); color: var(--green); }
.badge-status-warn { background: var(--amber-50); color: var(--amber); }
.badge-status-expired { background: var(--red-50); color: var(--red); }
.btn-mini-copy {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px;
  background: var(--primary-50); color: var(--primary); font-weight: 700; font-size: 13px; white-space: nowrap; transition: background .15s, color .15s;
}
.btn-mini-copy:hover { background: var(--primary); color: #fff; }

.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-state .empty-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-state .empty-ico .ico { width: 30px; height: 30px; }
.empty-state p { margin-bottom: 4px; }

/* Extrato */
.extrato-list-scroll { max-height: 560px; overflow-y: auto; padding: 6px 12px 12px; }
.extrato-row-box { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 12px; }
.extrato-row-box + .extrato-row-box { border-top: 1px solid var(--line); border-radius: 0; }
.extrato-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.extrato-ico .ico { width: 18px; height: 18px; }
.extrato-ico.plus { background: var(--green-50); color: var(--green); }
.extrato-ico.minus { background: var(--red-50); color: var(--red); }
.extrato-body { flex: 1; min-width: 0; }
.extrato-desc { font-size: 14px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.extrato-date { font-size: 12.5px; color: var(--muted); }
.extrato-qty { font-weight: 800; font-size: 16px; white-space: nowrap; }
.extrato-plus { color: var(--green); }
.extrato-minus { color: var(--red); }

/* Navegação por seção (sem recarregar) */
body[data-view="clientes"] .kpi-grid,
body[data-view="clientes"] .actions-strip,
body[data-view="clientes"] #secaoExtrato,
body[data-view="extrato"] .kpi-grid,
body[data-view="extrato"] .actions-strip,
body[data-view="extrato"] #secaoClientes { display: none; }
body[data-view="clientes"] .main-grid-split,
body[data-view="extrato"] .main-grid-split { grid-template-columns: minmax(0, 1fr); }
body[data-view="extrato"] .extrato-list-scroll { max-height: none; }

/* ---------- Modais ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(6, 20, 46, .5); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal.on { opacity: 1; pointer-events: auto; }
.modal-dialog-pro {
  width: 100%; max-width: 480px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--surface); border-radius: 22px; padding: 28px; box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.98); transition: transform .25s var(--ease);
}
.modal.on .modal-dialog-pro { transform: none; }
.modal-head { text-align: center; margin-bottom: 18px; }
.modal-title { font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; margin: 8px 0 4px; }
.modal-desc { color: var(--muted); font-size: 14px; }
.modal-emoji { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 12px; }
.modal-emoji .ico { width: 32px; height: 32px; }
.modal-emoji.ok { background: var(--green-50); color: var(--green); }
.stack > * + * { margin-top: 10px; }

.form-group-clean { margin-bottom: 14px; }
.form-label-clean { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.form-control-pro {
  width: 100%; padding: 12px 14px; font-size: 15px; background: #fff; color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 48px;
}
.form-control-pro::placeholder { color: #9aa0b8; }
.form-control-pro:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
select.form-control-pro { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23646b86' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.err { color: var(--red); font-size: 13.5px; font-weight: 600; min-height: 20px; margin-bottom: 8px; }
.info-box {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--primary-50); border-radius: 12px; padding: 13px 16px; margin-bottom: 16px; font-size: 14px; color: var(--muted); font-weight: 600;
}
.info-box b { font-size: 17px; color: var(--primary); font-weight: 800; }
.pix-wait { background: var(--cyan-50); border-radius: 12px; padding: 12px; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 10px; }
.pix-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); animation: pulseGlow 1.5s infinite; flex: none; }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(11, 143, 181, .5); } 70% { box-shadow: 0 0 0 10px rgba(11, 143, 181, 0); } 100% { box-shadow: 0 0 0 0 rgba(11, 143, 181, 0); } }
.pix-textarea {
  width: 100%; height: 88px; resize: none; outline: none; padding: 12px; border-radius: 12px;
  background: var(--surface-2); border: 1.5px dashed var(--primary); color: var(--ink);
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px;
}

.pix-packages-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.pix-pkg-card {
  border: 2px solid var(--line); border-radius: 14px; padding: 14px 12px; text-align: center; cursor: pointer;
  background: #fff; transition: border-color .15s, box-shadow .15s, background .15s;
}
.pix-pkg-card:hover { border-color: #9ec9f1; }
.pix-pkg-card.selected { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 4px rgba(11, 107, 203, .1); }
.pix-pkg-card .pkg-name { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.pix-pkg-card .pkg-price { font-size: 22px; font-weight: 800; color: var(--ink); margin: 2px 0; letter-spacing: -.02em; }
.pix-pkg-card .pkg-sub { font-size: 12px; font-weight: 700; color: var(--green); }

.cred-box-pro {
  background: var(--surface-2); border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 16px; margin: 16px 0;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; text-align: left; white-space: pre-wrap; word-break: break-word; color: var(--ink); line-height: 1.7;
}
.big-credits { font-size: 40px; font-weight: 800; color: var(--primary); margin: 6px 0 22px; letter-spacing: -.02em; }

/* Toast */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: toastIn .3s var(--ease);
}
.toast .ico { color: #5be6ae; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Login / Cadastro ---------- */
body.auth-page {
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--bg);
}
.auth-hero {
  background: linear-gradient(150deg, #06142e 0%, #0b1f44 55%, #0b6bcb 100%);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-hero::before, .auth-hero::after { content: ''; position: absolute; border-radius: 50%; }
.auth-hero::before { width: 360px; height: 360px; right: -110px; bottom: -110px; background: rgba(34, 197, 94, .28); }
.auth-hero::after { width: 200px; height: 200px; left: -60px; top: 38%; background: rgba(255, 255, 255, .06); }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero h2 { font-size: 34px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; max-width: 420px; }
.auth-hero p { color: #cfe3f9; margin-top: 12px; max-width: 420px; }
.auth-points { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.auth-points .ico { background: rgba(255, 255, 255, .14); border-radius: 50%; padding: 5px; width: 28px; height: 28px; }
.auth-hero .sidebar-brand .brand-name { color: #fff; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 25px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.auth-card .lead { color: var(--muted); font-size: 14.5px; margin: 6px 0 22px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.alert-ok { background: var(--green-50); color: #0b7a53; }
.alert-err { background: var(--red-50); color: var(--red); }
.auth-foot { text-align: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.auth-foot a.link { color: var(--primary); font-weight: 700; }
.auth-foot a.link:hover { text-decoration: underline; }
.auth-foot .back { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1560px) {
  .main-grid-split { grid-template-columns: minmax(0, 1fr); }
  .extrato-list-scroll { max-height: 420px; }
}
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .app-sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s; width: min(86vw, 300px); }
  .app-sidebar.show { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
  .sidebar-close { display: grid; }
  .sidebar-link.active::before { left: -14px; }
  .app-main { margin-left: 0; }
  .mobile-toggle-btn { display: grid; }
  .app-topbar { padding: 0 16px; }
  .user-meta { display: none; }
  .user-profile-pill { padding: 4px; }
  .panel-content { padding: 20px 16px 40px; }
}

@media (max-width: 760px) {
  :root { --topbar-h: 62px; }
  .page-crumb { display: none; }
  .page-title { font-size: 17px; }
  .btn-topbar-exit span { display: none; }
  .btn-topbar-exit { padding: 10px; }
  .saldo-chip { padding: 7px 11px; }
  .saldo-chip .lbl { display: none; }
  .actions-strip { grid-template-columns: 1fr; }
  .kpi-grid { gap: 12px; }
  .kpi-card { padding: 14px; gap: 12px; flex-direction: column; align-items: flex-start; }
  .kpi-icon { width: 42px; height: 42px; border-radius: 12px; }
  .kpi-value { font-size: 23px; }
  .card-header-clean { padding: 16px; }
  .table-search-input { width: 100%; }
  .search-box { width: 100%; }

  /* Tabela vira lista de cartões */
  .data-table-pro thead { display: none; }
  .data-table-pro, .data-table-pro tbody, .data-table-pro tr, .data-table-pro td { display: block; width: 100%; }
  .data-table-pro tbody tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .data-table-pro tbody tr:last-child { border-bottom: 0; }
  .data-table-pro tbody tr:hover td { background: transparent; }
  .user-code, .pass-code { white-space: normal; word-break: break-all; }
  .data-table-pro td { border: 0; padding: 5px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: right; }
  .data-table-pro td::before { content: attr(data-label); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-align: left; flex: none; }
  .data-table-pro td.cell-nome { font-size: 16px; padding-bottom: 8px; }
  .data-table-pro td.cell-nome::before { display: none; }
  .data-table-pro td.cell-acao { padding-top: 10px; }
  .data-table-pro td.cell-acao::before { display: none; }
  .data-table-pro td.cell-acao .btn-mini-copy { width: 100%; justify-content: center; padding: 11px; font-size: 14px; }

  /* Modal vira bottom-sheet */
  .modal { align-items: flex-end; padding: 0; }
  .modal-dialog-pro { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); transform: translateY(40px); }

  body.auth-page { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-side { padding: 20px 14px; align-items: flex-start; }
  .auth-card { padding: 26px 20px; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .saldo-chip svg { display: none; }
  .pix-packages-grid { gap: 8px; }
  .pix-pkg-card .pkg-price { font-size: 19px; }
}

.auth-mobile-brand { display: none; }
@media (max-width: 760px) {
  .auth-mobile-brand { display: flex; margin-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 480px) {
  .user-profile-pill { display: none; }
  .page-title { font-size: 16px; }
}

/* Copiar acesso rápido */
.cred-list-pro { display: grid; gap: 8px; margin: 16px 0; text-align: left; }
.cred-row-pro { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink); text-align: left; transition: border-color .15s, transform .1s; }
.cred-row-pro:hover { border-color: var(--primary); }
.cred-row-pro:active { transform: scale(.985); }
.cred-row-pro .k { flex: none; width: 82px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .65; }
.cred-row-pro .v { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14.5px; font-weight: 700; word-break: break-all; user-select: all; }
.cred-row-pro .c { flex: none; font-size: 12px; font-weight: 800; color: var(--primary); padding: 6px 10px; border-radius: 8px; background: rgba(14,165,233,.12); }
#btnCopiarTudo.copied { background: var(--green); border-color: var(--green); color: #fff; }

/* ==========================================================================
   MODO ESCURO (opcional) - ativado por [data-theme="dark"] no <html>
   ========================================================================== */
.theme-toggle { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); transition: background .15s, border-color .15s, transform .1s; }
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle:active { transform: scale(.94); }
.ico-sun { display: none; }
[data-theme="dark"] .ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: block; }
.sidebar-link .ico-sun { margin-right: 0; }

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #131c2e;
  --surface-2: #182339;
  --line: #243350;
  --line-strong: #2f4166;

  --ink: #eaf1ff;
  --text: #c5d2ea;
  --muted: #93a3c2;

  --primary: #4a9bff;
  --primary-600: #6aaeff;
  --primary-50: rgba(74, 155, 255, .16);
  --pink-50: rgba(56, 189, 248, .14);
  --green: #3ddc84;
  --green-50: rgba(61, 220, 132, .15);
  --amber: #f5b13d;
  --amber-50: rgba(245, 177, 61, .15);
  --red: #ff6b88;
  --red-50: rgba(255, 107, 136, .15);
  --cyan: #38c4e8;
  --cyan-50: rgba(56, 196, 232, .14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 4px 14px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
}
[data-theme="dark"] .app-topbar { background: rgba(11, 18, 32, .86); }
[data-theme="dark"] .sidebar-link .ico,
[data-theme="dark"] .nav-category,
[data-theme="dark"] .search-box .ico { color: #7f90b3; }
[data-theme="dark"] .sidebar-link .ico-moon, [data-theme="dark"] .sidebar-link .ico-sun { color: #f5c542; }
[data-theme="dark"] .form-control-pro,
[data-theme="dark"] .pix-pkg-card,
[data-theme="dark"] .table-search-input:focus { background: var(--surface-2); color: var(--ink); }
[data-theme="dark"] .form-control-pro::placeholder { color: #6f809f; }
[data-theme="dark"] .pix-pkg-card:hover { border-color: var(--primary); }
[data-theme="dark"] .pix-pkg-card.selected { background: var(--primary-50); }
[data-theme="dark"] .data-table-pro tbody tr:hover td { background: rgba(255, 255, 255, .03); }
[data-theme="dark"] .welcome-banner,
[data-theme="dark"] .hero-banner { background: linear-gradient(120deg, rgba(74,155,255,.16), rgba(61,220,132,.12)); border-color: var(--line); }
[data-theme="dark"] .alert-ok { color: var(--green); }
[data-theme="dark"] .toast { background: #eaf1ff; color: #0b1220; }
[data-theme="dark"] .toast .ico { color: #15803d; }
[data-theme="dark"] .btn-panel-cyan { color: #04122b; box-shadow: 0 6px 16px rgba(74, 155, 255, .25); }
[data-theme="dark"] .btn-panel-green { color: #04210f; }
[data-theme="dark"] .btn-mini-copy:hover { color: #04122b; }
[data-theme="dark"] .saldo-chip b { color: var(--ink); }
[data-theme="dark"] :focus-visible { outline-color: rgba(74, 155, 255, .55); }
