/* ============================================================
   MINI DAF · style.css — v42 (consolidado)
   Tema claro/escuro + Glassmorphism + Laranja acento
============================================================ */

/* ============================================================
   VARIÁVEIS — TEMA CLARO (padrão)
============================================================ */
:root {
  --bg: #f4f7fb;
  --bg-2: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --text: #0a1628;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border: #e2e8f0;
  --border-soft: #eef2f7;

  --brand: #0a2540;
  --brand-2: #1e40af;
  --brand-3: #3b82f6;
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-glow: rgba(30,64,175,.16);

  --accent: #10b981;
  --accent-2: #059669;
  --accent-soft: #d1fae5;
  --accent-glow: rgba(16,185,129,.30);

  --violet: #7c3aed;
  --violet-2: #6d28d9;
  --violet-soft: #ede9fe;
  --violet-glow: rgba(124,58,237,.20);

  --warn: #f59e0b;
  --warn-2: #b45309;
  --warn-soft: #fef3c7;
  --warn-glow: rgba(245,158,11,.20);

  --danger: #dc2626;
  --danger-2: #b91c1c;
  --danger-soft: #fee2e2;
  --danger-glow: rgba(220,38,38,.20);

  --orange: #ff7a1a;
  --orange-2: #ea580c;
  --orange-soft: #fff1e5;
  --orange-glow: rgba(255,122,26,.30);

  --gold: #fbbf24;
  --gold-2: #d97706;

  --grad-brand: linear-gradient(135deg,#0a2540 0%,#1e40af 55%,#3b82f6 100%);
  --grad-z2pay: linear-gradient(135deg,#4c1d95 0%,#7c3aed 55%,#10b981 100%);
  --grad-accent: linear-gradient(135deg,#059669 0%,#10b981 100%);
  --grad-orange: linear-gradient(135deg,#ea580c 0%,#ff7a1a 100%);

  --glass-bg: rgba(255,255,255,.65);
  --glass-bg-2: rgba(255,255,255,.45);
  --glass-border: rgba(255,255,255,.70);
  --glass-border-2: rgba(226,232,240,.60);

  --sh-xs: 0 1px 2px rgba(10,22,40,.04);
  --sh-sm: 0 2px 6px rgba(10,22,40,.06);
  --sh-md: 0 6px 20px rgba(10,22,40,.08);
  --sh-lg: 0 18px 40px rgba(10,22,40,.12);
  --sh-glow: 0 0 0 3px var(--brand-glow);
  --sh-hover: 0 20px 44px -14px rgba(10,22,40,.20);
}

/* ============================================================
   VARIÁVEIS — TEMA ESCURO
============================================================ */
html[data-theme="dark"] {
  --bg: #05080e;
  --bg-2: #080d16;
  --surface: #0b1220;
  --surface-2: #111827;
  --surface-3: #1a2436;
  --text: #e8eaed;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: #1e293b;
  --border-soft: rgba(30,41,59,.40);

  --brand: #3b82f6;
  --brand-2: #60a5fa;
  --brand-3: #93c5fd;
  --brand-50: rgba(59,130,246,.08);
  --brand-100: rgba(59,130,246,.16);
  --brand-glow: rgba(59,130,246,.35);

  --accent: #bfff37;
  --accent-2: #a3e635;
  --accent-soft: rgba(191,255,55,.12);
  --accent-glow: rgba(191,255,55,.35);

  --violet: #a855f7;
  --violet-2: #c084fc;
  --violet-soft: rgba(168,85,247,.12);
  --violet-glow: rgba(168,85,247,.35);

  --warn: #fbbf24;
  --warn-2: #f59e0b;
  --warn-soft: rgba(251,191,36,.12);
  --warn-glow: rgba(251,191,36,.35);

  --danger: #ff6b6b;
  --danger-2: #ef4444;
  --danger-soft: rgba(255,107,107,.12);
  --danger-glow: rgba(255,107,107,.35);

  --orange: #ff9a3c;
  --orange-2: #ff7a1a;
  --orange-soft: rgba(255,154,60,.14);
  --orange-glow: rgba(255,154,60,.40);

  --gold: #fbbf24;
  --gold-2: #f59e0b;

  --grad-brand: linear-gradient(135deg,#0a2540 0%,#1e40af 55%,#3b82f6 100%);
  --grad-z2pay: linear-gradient(135deg,#4c1d95 0%,#7c3aed 55%,#10b981 100%);
  --grad-accent: linear-gradient(135deg,#84cc16 0%,#bfff37 100%);
  --grad-orange: linear-gradient(135deg,#ff7a1a 0%,#ff9a3c 100%);

  --glass-bg: rgba(11,18,32,.68);
  --glass-bg-2: rgba(17,24,39,.55);
  --glass-border: rgba(255,255,255,.08);
  --glass-border-2: rgba(255,255,255,.05);

  --sh-xs: 0 1px 2px rgba(0,0,0,.30);
  --sh-sm: 0 2px 6px rgba(0,0,0,.35);
  --sh-md: 0 6px 20px rgba(0,0,0,.45);
  --sh-lg: 0 18px 40px rgba(0,0,0,.60);
  --sh-glow: 0 0 0 3px var(--brand-glow);
  --sh-hover: 0 24px 50px -12px rgba(0,0,0,.75), 0 0 0 1px var(--glass-border);
}

/* ============================================================
   RESET & BASE
============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 24px 20px 60px;
  font-family: 'Sora','Inter',-apple-system,system-ui,sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1100px 500px at 88% -10%, var(--brand-glow) 0%, transparent 62%),
    radial-gradient(900px 500px at -8% 105%, var(--violet-glow) 0%, transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}
::selection { background: var(--brand-2); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); background-clip: padding-box; }

i[data-lucide], svg.lucide { display: inline-block; vertical-align: middle; }
i[data-lucide] { width: 18px; height: 18px; stroke-width: 2; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(400px 400px at 15% 25%, var(--orange-glow) 0%, transparent 70%),
    radial-gradient(500px 500px at 85% 75%, var(--brand-glow) 0%, transparent 70%);
  opacity: .5;
}

/* ============================================================
   LOGIN
============================================================ */
#login-screen { display: flex; align-items: center; justify-content: center; min-height: 88vh; padding: 20px; }
.login-box {
  position: relative;
  width: 100%; max-width: 440px;
  padding: 52px 44px 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--sh-lg), inset 0 1px 0 var(--glass-border);
  text-align: center;
  overflow: hidden;
  animation: loginFadeIn .7s cubic-bezier(.2,.9,.3,1);
}
@keyframes loginFadeIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
.login-box::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-3) 25%, var(--violet) 50%, var(--orange) 75%, var(--accent) 100%);
  background-size: 300% 100%;
  animation: slideGrad 9s linear infinite;
}
@keyframes slideGrad { to { background-position: 300% 0; } }
.login-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 68px; height: 68px; margin-bottom: 18px;
  border-radius: 22px;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 12px 30px -8px var(--brand-glow), inset 0 1px 0 rgba(255,255,255,.20);
  transition: transform .3s cubic-bezier(.2,.9,.3,1);
}
.login-logo:hover { transform: scale(1.05) rotate(-3deg); }
.login-logo i { width: 34px; height: 34px; stroke-width: 1.8; }
.login-box h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.03em; color: var(--text); }
.login-sub { margin: 0 0 30px; font-size: 13.5px; color: var(--text-muted); }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 14px 18px;
  border: 1.5px solid var(--glass-border);
  background: var(--glass-bg-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  border-radius: 14px;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  transition: all .25s cubic-bezier(.2,.9,.3,1);
}
.google-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand-2);
  box-shadow: var(--sh-md), 0 0 0 3px var(--brand-glow);
  background: var(--surface);
}
.google-btn:active { transform: translateY(0); }
.google-btn:disabled { opacity: .55; cursor: not-allowed; }
.login-hint { margin-top: 22px; font-size: 12.5px; color: var(--text-muted); }
.secure-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 11.5px; color: var(--text-dim); }
.secure-note i { width: 13px; height: 13px; }

/* ============================================================
   APP CONTAINER
============================================================ */
#app-screen { display: none; max-width: 1680px; margin: 0 auto; animation: appFadeIn .6s ease; }
@keyframes appFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   HEADER
============================================================ */
.header-bar {
  position: relative;
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; flex-wrap: wrap;
  padding: 20px 28px;
  margin-bottom: 16px;
  border-radius: 24px;
  color: #fff;
  background: var(--grad-brand);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 20px 44px -14px rgba(10,37,64,.55),
    0 0 0 1px rgba(255,255,255,.05),
    inset 0 1px 0 rgba(255,255,255,.15);
  overflow: hidden;
  transition: background .4s ease, box-shadow .4s ease, padding .35s cubic-bezier(.2,.9,.3,1), margin-bottom .35s cubic-bezier(.2,.9,.3,1);
}
.header-bar::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(600px 200px at 90% 0%, rgba(255,255,255,.14) 0%, transparent 60%);
  pointer-events: none;
}
.header-bar.workspace-z2pay {
  background: var(--grad-z2pay);
  box-shadow: 0 20px 44px -14px rgba(76,29,149,.55), inset 0 1px 0 rgba(255,255,255,.15);
}
.header-bar.compact {
  padding: 12px 24px;
  margin-bottom: 10px;
}
.header-bar.compact .brand-mark { width: 38px; height: 38px; }
.header-bar.compact .brand-mark i { width: 20px; height: 20px; }
.header-bar.compact h1 { font-size: 16px; }
.header-bar.compact .header-sub { display: none; }
.header-bar.compact .version-chip { font-size: 9.5px; padding: 2px 8px; }

.header-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; position: relative; z-index: 1; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 15px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .3s cubic-bezier(.2,.9,.3,1), width .3s, height .3s;
}
.brand-mark:hover { transform: scale(1.08) rotate(-3deg); }
.brand-mark i { width: 24px; height: 24px; stroke-width: 2; transition: width .3s, height .3s; }
.header-bar h1 {
  margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  transition: font-size .3s;
}
.version-chip {
  padding: 3px 10px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(255,255,255,.28);
  letter-spacing: .06em; text-transform: uppercase;
  transition: font-size .3s, padding .3s;
}
.header-sub { font-size: 12px; font-weight: 500; opacity: .78; margin-top: 2px; }
.workspace-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 12px;
  background: rgba(255,255,255,.16);
  border: 1.5px solid rgba(255,255,255,.30);
  color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  transition: all .22s cubic-bezier(.2,.9,.3,1);
  margin-left: 8px; white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.workspace-btn:hover { background: rgba(255,255,255,.30); transform: translateY(-2px); }
.ws-caret { width: 12px !important; height: 12px !important; opacity: .85; }
.user-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.20);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.user-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.20); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; border-radius: 12px;
  background: rgba(255,255,255,.14); color: #fff;
  cursor: pointer; transition: all .22s cubic-bezier(.2,.9,.3,1);
}
.icon-btn:hover { background: rgba(255,255,255,.30); transform: translateY(-2px) scale(1.05); }
.icon-btn i { width: 18px; height: 18px; stroke-width: 2; }

/* ============================================================
   BANNER TESTE
============================================================ */
.test-banner {
  padding: 12px 18px; margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(90deg,#fef3c7,#fde68a,#fcd34d);
  border: 2px solid #f59e0b;
  color: #78350f; font-weight: 700; font-size: 13px;
  text-align: center; letter-spacing: .02em;
  box-shadow: 0 6px 20px rgba(245,158,11,.25);
  animation: pulse-banner 2.5s ease-in-out infinite;
}
.test-banner i { width: 16px; height: 16px; }
@keyframes pulse-banner {
  0%,100% { box-shadow: 0 6px 20px rgba(245,158,11,.20); }
  50% { box-shadow: 0 6px 28px rgba(245,158,11,.45); }
}

/* ============================================================
   CARDS
============================================================ */
.app-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border);
  padding: 26px 28px;
  border-radius: 20px;
  box-shadow: var(--sh-md), inset 0 1px 0 var(--glass-border);
  margin-bottom: 20px;
  transition: all .3s cubic-bezier(.2,.9,.3,1);
}
.app-card:hover { box-shadow: var(--sh-hover), inset 0 1px 0 var(--glass-border); }
.upload-section {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr auto;
  gap: 16px;
  padding: 22px;
  border-radius: 16px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border-2);
}
.upload-box { display: flex; flex-direction: column; min-width: 0; }
.upload-actions { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-width: 200px; }

/* ============================================================
   INPUTS
============================================================ */
label {
  margin-bottom: 8px;
  font-size: 11px; font-weight: 700;
  color: var(--brand-2);
  text-transform: uppercase; letter-spacing: .08em;
}
input[type=file],input[type=date],input[type=text],input[type=password],select,textarea {
  width: 100%; padding: 12px 14px;
  font-size: 13.5px; font-family: inherit;
  color: var(--text);
  background: var(--glass-bg-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--glass-border-2);
  border-radius: 12px;
  transition: all .22s cubic-bezier(.2,.9,.3,1);
}
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
input[type=file] { padding: 9px; cursor: pointer; font-size: 12.5px; }

/* ============================================================
   BOTÕES
============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border: none; border-radius: 12px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all .22s cubic-bezier(.2,.9,.3,1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.20) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .6s;
}
.btn:hover::before { transform: translateX(100%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn i { width: 15px; height: 15px; stroke-width: 2.2; flex-shrink: 0; position: relative; z-index: 1; }
.btn > * { position: relative; z-index: 1; }

.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 4px 14px -4px var(--brand-glow); }
.btn-primary:hover { box-shadow: 0 10px 26px -6px var(--brand-glow); }
.btn-danger { background: linear-gradient(135deg,var(--danger-2),var(--danger)); color: #fff; }
.btn-success { background: linear-gradient(135deg,var(--accent-2),var(--accent)); color: #fff; }
.btn-ghost { background: var(--glass-bg-2); color: var(--text); border: 1.5px solid var(--glass-border-2); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--brand-2); color: var(--brand-2); background: var(--surface); }
.btn-carta { background: linear-gradient(135deg,var(--violet-2),var(--violet)); color: #fff; }
.btn-z2pay { background: var(--grad-z2pay); color: #fff; }
.btn-orange { background: var(--grad-orange); color: #fff; box-shadow: 0 4px 14px -4px var(--orange-glow); }
.btn-orange:hover { box-shadow: 0 10px 26px -6px var(--orange-glow); }
.btn-sm { padding: 8px 13px; font-size: 12px; }
.btn-sm i { width: 13px; height: 13px; }
.btn-lg { padding: 13px 26px; font-size: 13.5px; }

/* Ripple */
.btn, .action-btn, .tab-btn, .icon-btn, .workspace-btn { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  transform: scale(0);
  animation: rippleGo .65s cubic-bezier(.2,.9,.3,1);
  pointer-events: none;
}
html[data-theme="light"] .btn-ghost .ripple,
html[data-theme="light"] .icon-btn .ripple,
html[data-theme="light"] .tab-btn .ripple,
html[data-theme="light"] .action-ver .ripple,
html[data-theme="light"] .workspace-btn .ripple {
  background: rgba(0,0,0,.15);
}
@keyframes rippleGo { to { transform: scale(4); opacity: 0; } }

/* ============================================================
   TABS
============================================================ */
.tabs {
  display: flex; gap: 4px;
  padding: 6px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: 18px 18px 0 0;
  border-bottom: none;
  flex-wrap: wrap;
}
.tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border: none; background: transparent;
  border-radius: 12px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .22s cubic-bezier(.2,.9,.3,1);
}
.tab-btn:hover { color: var(--text); background: var(--glass-bg-2); transform: translateY(-1px); }
.tab-btn.active { background: var(--grad-brand); color: #fff; box-shadow: 0 4px 14px -4px var(--brand-glow); }
.tab-btn.active.tab-z2pay { background: var(--grad-z2pay); box-shadow: 0 4px 14px -4px var(--violet-glow); }
.tab-btn i { width: 16px; height: 16px; stroke-width: 2; flex-shrink: 0; }

.tab-content {
  display: none;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  padding: 26px 28px;
  border-radius: 0 0 20px 20px;
  border: 1px solid var(--glass-border);
  border-top: none;
  box-shadow: var(--sh-md);
}
.tab-content.active { display: block; animation: fadeSlideIn .4s cubic-bezier(.2,.9,.3,1); }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============================================================
   FILTROS
============================================================ */
.filters-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
  gap: 12px;
  padding: 18px;
  margin-bottom: 18px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border-2);
  border-radius: 16px;
}
.filters-bar.z2pay { background: var(--violet-soft); border-color: rgba(124,58,237,.20); }
.filter-group { display: flex; flex-direction: column; min-width: 0; }
.filter-group.action { justify-content: flex-end; max-width: 150px; }
.filter-group.action .btn { width: 100%; }

/* ============================================================
   CHIPS RESUMO (versão compacta premium)
============================================================ */
.resumo-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.resumo-chip {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 1px;
  padding: 14px 16px;
  min-height: 68px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--sh-sm), inset 0 1px 0 var(--glass-border);
  transition: all .3s cubic-bezier(.2,.9,.3,1);
  cursor: default;
  overflow: hidden;
}
.resumo-chip::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--chip-accent, var(--brand-2)) 0%, transparent 70%);
  opacity: .10;
  transition: opacity .3s, transform .5s;
  pointer-events: none;
}
.resumo-chip:hover::before { opacity: .20; transform: scale(1.15); }
.resumo-chip::after {
  content: '';
  position: absolute;
  left: 16px; bottom: 0;
  width: 32px; height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--chip-accent, var(--brand-2));
  opacity: .8;
  transition: width .35s cubic-bezier(.2,.9,.3,1), opacity .3s;
}
.resumo-chip:hover::after { width: calc(100% - 32px); opacity: 1; }
.resumo-chip:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -10px var(--chip-glow, var(--brand-glow)), inset 0 1px 0 var(--glass-border);
  border-color: var(--chip-accent, var(--brand-2));
}
.chip-icon {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--chip-accent, var(--brand-2)) 14%, transparent);
  color: var(--chip-accent, var(--brand-2));
  grid-row: 1 / 3;
  align-self: center;
  transition: transform .3s cubic-bezier(.2,.9,.3,1), background .3s;
}
.resumo-chip:hover .chip-icon {
  transform: scale(1.06);
  background: color-mix(in srgb, var(--chip-accent, var(--brand-2)) 22%, transparent);
}
.chip-icon i { width: 16px; height: 16px; stroke-width: 2.2; }
.resumo-chip .num {
  font-size: 17px; font-weight: 800;
  color: var(--text);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  align-self: end;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.resumo-chip .lbl2 {
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  align-self: start;
  line-height: 1.25;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.resumo-chip.ok     { --chip-accent: var(--accent);   --chip-glow: var(--accent-glow); }
.resumo-chip.red    { --chip-accent: var(--danger);   --chip-glow: var(--danger-glow); }
.resumo-chip.warn   { --chip-accent: var(--orange);   --chip-glow: var(--orange-glow); }
.resumo-chip.blue   { --chip-accent: var(--brand-2);  --chip-glow: var(--brand-glow); }
.resumo-chip.violet { --chip-accent: var(--violet);   --chip-glow: var(--violet-glow); }
.resumo-chip.fire   { --chip-accent: var(--orange);   --chip-glow: var(--orange-glow); }
.resumo-chip:not([class*="ok"]):not([class*="red"]):not([class*="warn"]):not([class*="blue"]):not([class*="violet"]):not([class*="fire"]) {
  --chip-accent: var(--brand-2);
  --chip-glow: var(--brand-glow);
}
.resumo-chip .num.counting { color: var(--orange); transition: color .3s; }

/* ============================================================
   OCULTOS BAR
============================================================ */
.ocultos-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 18px; margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-soft));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px dashed var(--accent);
  font-size: 12.5px; color: var(--accent-2);
  flex-wrap: wrap;
}
.ocultos-bar i { width: 15px; height: 15px; }

/* ============================================================
   TABELAS
============================================================ */
.table-wrap {
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: auto;
  max-height: 72vh;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--sh-sm), inset 0 1px 0 var(--glass-border);
}
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
thead th {
  position: sticky; top: 0; z-index: 5;
  padding: 18px 16px;
  text-align: left;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  white-space: nowrap;
}
thead th.z2pay { background: linear-gradient(180deg,#4c1d95,#7c3aed); }
td {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  color: var(--text-muted);
  overflow-wrap: anywhere; word-break: break-word;
  font-size: 13px; line-height: 1.6;
}
tbody tr { transition: background .25s; min-height: 90px; }
tbody tr:nth-child(even) { background: var(--glass-bg-2); }
tbody tr:hover { background: var(--brand-50); }
tr.row-refunded { background: linear-gradient(90deg,rgba(220,38,38,.06),rgba(220,38,38,.02)) !important; }
tr.row-has-proofs { background: linear-gradient(90deg,rgba(59,130,246,.10),rgba(59,130,246,.03)) !important; }
tr.row-alta-prio { box-shadow: inset 4px 0 0 var(--orange); }
tr.row-refunded.row-has-proofs { background: linear-gradient(90deg,rgba(59,130,246,.14) 0%,rgba(220,38,38,.16) 100%) !important; }

td:nth-child(7) { padding-top: 22px; padding-bottom: 22px; }
td:last-child { padding-left: 8px; padding-right: 8px; }

.valor-cell {
  font-weight: 700; color: var(--text);
  font-size: 15px; font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  padding-top: 22px; padding-bottom: 22px;
}

/* Larguras */
#tabelaFaturas { table-layout: fixed; min-width: 1420px; }
#tabelaFaturas th:nth-child(1),#tabelaFaturas td:nth-child(1) { width: 11%; }
#tabelaFaturas th:nth-child(2),#tabelaFaturas td:nth-child(2) { width: 11%; }
#tabelaFaturas th:nth-child(3),#tabelaFaturas td:nth-child(3) { width: 11%; }
#tabelaFaturas th:nth-child(4),#tabelaFaturas td:nth-child(4) { width: 10%; }
#tabelaFaturas th:nth-child(5),#tabelaFaturas td:nth-child(5) { width: 13%; }
#tabelaFaturas th:nth-child(6),#tabelaFaturas td:nth-child(6) { width: 14%; }
#tabelaFaturas th:nth-child(7),#tabelaFaturas td:nth-child(7) { width: 11%; }
#tabelaFaturas th:nth-child(8),#tabelaFaturas td:nth-child(8) { width: 9%; }
#tabelaFaturas th:nth-child(9),#tabelaFaturas td:nth-child(9) { width: 10%; text-align: center; }
#tabelaBatch,#tabelaBatchZ2 { table-layout: fixed; min-width: 1250px; }
#tabelaBatch th:nth-child(1),#tabelaBatch td:nth-child(1),#tabelaBatchZ2 th:nth-child(1),#tabelaBatchZ2 td:nth-child(1) { width: 15%; }
#tabelaBatch th:nth-child(2),#tabelaBatch td:nth-child(2),#tabelaBatchZ2 th:nth-child(2),#tabelaBatchZ2 td:nth-child(2) { width: 13%; }
#tabelaBatch th:nth-child(3),#tabelaBatch td:nth-child(3),#tabelaBatchZ2 th:nth-child(3),#tabelaBatchZ2 td:nth-child(3) { width: 8%; }
#tabelaBatch th:nth-child(4),#tabelaBatch td:nth-child(4),#tabelaBatchZ2 th:nth-child(4),#tabelaBatchZ2 td:nth-child(4) { width: 14%; }
#tabelaBatch th:nth-child(5),#tabelaBatch td:nth-child(5),#tabelaBatchZ2 th:nth-child(5),#tabelaBatchZ2 td:nth-child(5) { width: 36%; }
#tabelaBatch th:nth-child(6),#tabelaBatch td:nth-child(6),#tabelaBatchZ2 th:nth-child(6),#tabelaBatchZ2 td:nth-child(6) { width: 14%; text-align: center; }
#tabelaZ2Pay { table-layout: fixed; min-width: 1560px; }
#tabelaZ2Pay th:nth-child(1),#tabelaZ2Pay td:nth-child(1) { width: 11%; }
#tabelaZ2Pay th:nth-child(2),#tabelaZ2Pay td:nth-child(2) { width: 7%; }
#tabelaZ2Pay th:nth-child(3),#tabelaZ2Pay td:nth-child(3) { width: 11%; }
#tabelaZ2Pay th:nth-child(4),#tabelaZ2Pay td:nth-child(4) { width: 10%; }
#tabelaZ2Pay th:nth-child(5),#tabelaZ2Pay td:nth-child(5) { width: 8%; }
#tabelaZ2Pay th:nth-child(6),#tabelaZ2Pay td:nth-child(6) { width: 8%; }
#tabelaZ2Pay th:nth-child(7),#tabelaZ2Pay td:nth-child(7) { width: 13%; }
#tabelaZ2Pay th:nth-child(8),#tabelaZ2Pay td:nth-child(8) { width: 8%; }
#tabelaZ2Pay th:nth-child(9),#tabelaZ2Pay td:nth-child(9) { width: 8%; }
#tabelaZ2Pay th:nth-child(10),#tabelaZ2Pay td:nth-child(10) { width: 11%; }
#tabelaZ2Pay th:nth-child(11),#tabelaZ2Pay td:nth-child(11) { width: 5%; text-align: center; }
#tabelaZ2Fin { table-layout: fixed; min-width: 1520px; }
#tabelaZ2Fin th:nth-child(1),#tabelaZ2Fin td:nth-child(1) { width: 12%; }
#tabelaZ2Fin th:nth-child(2),#tabelaZ2Fin td:nth-child(2) { width: 8%; }
#tabelaZ2Fin th:nth-child(3),#tabelaZ2Fin td:nth-child(3) { width: 10%; }
#tabelaZ2Fin th:nth-child(4),#tabelaZ2Fin td:nth-child(4) { width: 9%; }
#tabelaZ2Fin th:nth-child(5),#tabelaZ2Fin td:nth-child(5) { width: 9%; }
#tabelaZ2Fin th:nth-child(6),#tabelaZ2Fin td:nth-child(6) { width: 9%; }
#tabelaZ2Fin th:nth-child(7),#tabelaZ2Fin td:nth-child(7) { width: 9%; }
#tabelaZ2Fin th:nth-child(8),#tabelaZ2Fin td:nth-child(8) { width: 8%; }
#tabelaZ2Fin th:nth-child(9),#tabelaZ2Fin td:nth-child(9) { width: 9%; }
#tabelaZ2Fin th:nth-child(10),#tabelaZ2Fin td:nth-child(10) { width: 8%; }
#tabelaZ2Fin th:nth-child(11),#tabelaZ2Fin td:nth-child(11) { width: 9%; }

.empty-row td { text-align: center; color: var(--text-dim); padding: 60px 20px; font-style: italic; font-size: 13.5px; }

/* ============================================================
   BADGES / BANDEIRAS / VEC / RECO / PRIO
============================================================ */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  white-space: nowrap;
}
.engine-badge {
  font-size: 9.5px; padding: 2px 7px; border-radius: 5px;
  margin-left: 6px; color: #fff; display: inline-block;
  font-weight: 700; letter-spacing: .04em;
}
.engine-gemini { background: #3b82f6; }
.engine-groq { background: #f97316; }
.engine-ollama { background: #7c3aed; }
.engine-openai { background: #10a37f; }

.bg-danger { background: var(--danger-soft); color: var(--danger); }
.bg-warning { background: var(--warn-soft); color: var(--warn-2); }
.bg-success { background: var(--accent-soft); color: var(--accent-2); }
.bg-info { background: var(--brand-100); color: var(--brand-2); }
.bg-neutral { background: var(--surface-3); color: var(--text-muted); }
.bg-violet { background: var(--violet-soft); color: var(--violet-2); }
.bg-proof { background: var(--brand-100); color: var(--brand-2); }
.badge-refund { background: var(--danger); color: #fff; }

.fatura-id {
  display: inline-block; font-weight: 700;
  color: var(--brand-2); font-size: 13px;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}
.tracode {
  display: inline-block; margin-top: 3px;
  font-size: 10.5px; color: var(--text-dim);
  font-family: 'JetBrains Mono',monospace;
  word-break: break-all;
}
.meio-pag {
  display: inline-block; margin-top: 5px; margin-right: 4px;
  padding: 3px 8px; border-radius: 6px;
  background: var(--brand-50); color: var(--brand-2);
  font-size: 10px; font-weight: 700;
  border: 1px solid var(--brand-100);
}
.bandeira-badge {
  display: inline-block; margin-top: 5px;
  padding: 3px 9px; border-radius: 6px;
  font-size: 10px; font-weight: 800;
  letter-spacing: .06em; color: #fff;
  vertical-align: middle;
}
.bandeira-visa { background: #1a1f71; }
.bandeira-mastercard,.bandeira-master { background: #eb001b; }
.bandeira-elo { background: #000; }
.bandeira-amex { background: #006fcf; }
.bandeira-diners { background: #0079be; }
.bandeira-discover { background: #f58220; }
.bandeira-hipercard,.bandeira-hiper { background: #b3131b; }
.bandeira-outra { background: #64748b; }

.vec-badge {
  display: block; margin-top: 7px;
  padding: 5px 7px; border-radius: 6px;
  font-size: 9.5px; font-weight: 700;
  text-align: center; cursor: pointer;
  transition: all .2s cubic-bezier(.2,.9,.3,1);
}
.vec-badge:hover { transform: scale(1.06) translateY(-1px); }
.vec-positive { background: var(--accent-soft); color: var(--accent-2); border: 1px solid var(--accent); }
.vec-warning { background: var(--warn-soft); color: var(--warn-2); border: 1px solid var(--warn); }
.vec-negative { background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); }
.vec-ia {
  display: block; margin-top: 7px;
  padding: 6px 7px; border-radius: 7px;
  font-size: 10px; font-weight: 700;
  text-align: center; line-height: 1.35;
}
.vec-ia .vec-label { font-size: 9px; opacity: .78; font-weight: 700; }
.vec-ia .vec-value { font-size: 12px; }
.vec-ia .economia {
  display: block; font-size: 9.5px; font-weight: 700;
  opacity: .85; margin-top: 3px; padding-top: 3px;
  border-top: 1px dashed rgba(0,0,0,.15);
}
.reco-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 7px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .03em; white-space: nowrap;
  text-transform: uppercase;
  margin-top: 7px; cursor: pointer;
  transition: all .22s cubic-bezier(.2,.9,.3,1);
}
.reco-badge:hover { transform: translateY(-2px) scale(1.04); }
.reco-forte { background: var(--grad-accent); color: #fff; box-shadow: 0 4px 12px -3px var(--accent-glow); }
.reco-contestar { background: var(--accent-soft); color: var(--accent-2); border: 1.5px solid var(--accent); }
.reco-tentar { background: var(--orange-soft); color: var(--orange-2); border: 1.5px solid var(--orange); animation: pulse-reco 3s ease-in-out infinite; }
@keyframes pulse-reco { 0%,100% { box-shadow: 0 0 0 0 var(--orange-glow); } 50% { box-shadow: 0 0 0 4px transparent; } }
.reco-analise { background: #ffedd5; color: #9a3412; border: 1.5px solid #fdba74; }
.reco-nao { background: var(--surface-3); color: var(--text-muted); border: 1.5px solid var(--border); }
.prio-badge {
  display: inline-block; padding: 3px 8px; border-radius: 5px;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .03em; margin-right: 4px;
  vertical-align: middle;
}
.prio-alta { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }
.prio-media { background: var(--orange-soft); color: var(--orange-2); border: 1px solid var(--orange); }
.prio-baixa { background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); }

/* ============================================================
   MODAL VEC — 2 eixos
============================================================ */
.two-axis-box {
  margin-top: 14px; padding: 16px;
  border-radius: 12px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px dashed var(--glass-border-2);
}
.two-axis-box h5 {
  margin: 0 0 12px; font-size: 11.5px; font-weight: 700;
  color: var(--brand-2);
  text-transform: uppercase; letter-spacing: .05em;
}
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11.5px; margin-top: 8px; }
.matrix th {
  background: var(--surface-3); padding: 8px;
  font-size: 10px; text-transform: uppercase;
  color: var(--text-muted); letter-spacing: .05em;
  border-bottom: 1px solid var(--border); text-align: center;
  font-weight: 700;
}
.matrix th:first-child { text-align: left; }
.matrix td { padding: 9px; border-bottom: 1px solid var(--border-soft); text-align: center; font-weight: 700; color: var(--text); }
.matrix td:first-child { text-align: left; font-weight: 700; font-size: 11px; }
.matrix tr:last-child td { border-bottom: none; }
.matrix .cell-forte { background: var(--accent-soft); color: var(--accent-2); }
.matrix .cell-contestar { background: var(--accent-soft); color: var(--accent-2); }
.matrix .cell-tentar { background: var(--orange-soft); color: var(--orange-2); }
.matrix .cell-analise { background: #ffedd5; color: #9a3412; }
.matrix .cell-nao { background: var(--surface-3); color: var(--text-muted); }
.matrix .highlight-row { background: var(--danger-soft); }
.matrix .highlight-row td:first-child { color: var(--danger); }

/* ============================================================
   UTILS
============================================================ */
.mono { font-family: 'JetBrains Mono',monospace; font-size: 11px; }
.copy-cell {
  cursor: pointer;
  border-bottom: 1px dashed var(--text-dim);
  padding: 1px 3px; border-radius: 3px;
  transition: all .2s;
}
.copy-cell:hover { background: var(--orange-soft); color: var(--orange-2); }
.copy-cell.copied { background: var(--accent-soft); color: var(--accent-2); }
.cell-text { font-size: 11.5px; line-height: 1.55; overflow-wrap: anywhere; }
.cell-muted { color: var(--text-muted); font-size: 11px; line-height: 1.5; display: block; }
.reason-num {
  display: inline-block;
  font-family: 'JetBrains Mono',monospace;
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-3);
  padding: 2px 7px; border-radius: 4px;
  margin: 3px 0;
}
.row-actions { display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.action-btn {
  width: 36px; height: 36px;
  border: none; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .22s cubic-bezier(.2,.9,.3,1);
}
.action-btn:hover { transform: translateY(-3px) scale(1.08); }
.action-btn:active { transform: scale(.96); }
.action-btn i { width: 16px; height: 16px; stroke-width: 2.5; }
.action-ok { background: var(--grad-accent); color: #fff; box-shadow: 0 4px 12px -3px var(--accent-glow); }
.action-no { background: linear-gradient(135deg,var(--danger-2),var(--danger)); color: #fff; box-shadow: 0 4px 12px -3px var(--danger-glow); }
.action-ver { background: var(--glass-bg-2); color: var(--brand-2); border: 1.5px solid var(--glass-border-2); backdrop-filter: blur(8px); }
.action-ver:hover { border-color: var(--brand-2); }
.action-carta { background: linear-gradient(135deg,var(--violet-2),var(--violet)); color: #fff; box-shadow: 0 4px 12px -3px var(--violet-glow); }
.action-detail { background: linear-gradient(135deg,var(--violet-2),var(--violet)); color: #fff; }
tr.row-removing { animation: rowOut .42s cubic-bezier(.4,0,.6,1) forwards; pointer-events: none; }
@keyframes rowOut { to { opacity: 0; transform: translateX(140px); } }

/* ============================================================
   CARD PANEL (dados PSP)
============================================================ */
.card-panel {
  display: flex; flex-direction: column; gap: 7px;
  padding: 11px 12px; border-radius: 11px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border-2);
  border-left: 3px solid var(--brand-2);
  transition: all .25s;
}
.card-panel:hover { border-left-color: var(--orange); }
.card-panel .row { display: grid; grid-template-columns: 70px minmax(0,1fr); gap: 8px; font-size: 11px; }
.card-panel .row .k { color: var(--text-muted); font-weight: 700; font-size: 9.5px; text-transform: uppercase; }
.card-panel .row .v { color: var(--text); font-weight: 600; word-break: break-word; }
.card-panel .row .v.empty { color: var(--text-dim); font-style: italic; }
.card-panel .row .v.emissor {
  font-size: 10px; font-weight: 500; color: var(--text-muted);
  max-height: 42px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ============================================================
   AUDITORIA
============================================================ */
.audit-grid { display: flex; gap: 18px; flex-wrap: wrap; }
.audit-card {
  flex: 1; min-width: 340px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: var(--sh-sm), inset 0 1px 0 var(--glass-border);
  transition: all .3s cubic-bezier(.2,.9,.3,1);
}
.audit-card:hover { transform: translateY(-4px); box-shadow: var(--sh-hover), inset 0 1px 0 var(--glass-border); }
.audit-weekend { border-color: var(--orange); background: linear-gradient(180deg, var(--orange-soft), var(--glass-bg)); }
.audit-ghost { border-color: var(--danger); background: linear-gradient(180deg, var(--danger-soft), var(--glass-bg)); }
.audit-day { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--glass-bg)); }
.audit-card h3 {
  margin: 0 0 8px; font-size: 14.5px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  color: var(--text);
}
.audit-card h3 i { width: 18px; height: 18px; }
.audit-card p { margin: 0 0 14px; font-size: 12.5px; color: var(--text-muted); }
.audit-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.audit-filters select { width: auto; padding: 7px 11px; font-size: 12px; }

.audit-card.breathing { animation: auditBreathe 1.4s cubic-bezier(.2,.9,.3,1); }
@keyframes auditBreathe {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.015); }
  100% { transform: scale(1); }
}
.audit-weekend.has-items { --audit-glow: 255,154,60; }
.audit-ghost.has-items   { --audit-glow: 255,107,107; }
.audit-day.has-items     { --audit-glow: 191,255,55; }
.audit-card.has-items { animation: auditGlow 2.6s ease-in-out infinite; }
@keyframes auditGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--audit-glow), .45), inset 0 1px 0 var(--glass-border); }
  50%      { box-shadow: 0 0 0 12px rgba(var(--audit-glow), 0), inset 0 1px 0 var(--glass-border); }
}
.copy-count { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.copy-count.counting { color: var(--orange); font-weight: 800; transition: color .2s; }

.copy-toolbar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
.copy-toolbar textarea {
  flex: 1; min-width: 200px; min-height: 62px;
  padding: 12px;
  border: 1.5px solid var(--glass-border-2);
  border-radius: 11px;
  font-family: 'JetBrains Mono',monospace;
  font-size: 11.5px;
  resize: vertical;
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  color: var(--text);
}

/* ============================================================
   PAGER
============================================================ */
.pager {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  margin: 20px 0 4px;
  font-size: 12.5px; color: var(--text-muted);
  flex-wrap: wrap;
}
.pager button {
  padding: 8px 14px;
  border: 1.5px solid var(--glass-border-2);
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all .2s;
}
.pager button:hover:not(:disabled) { border-color: var(--orange); color: var(--orange-2); transform: translateY(-2px); }
.pager button:disabled { opacity: .32; cursor: not-allowed; }
.pager select { width: auto; padding: 8px 12px; }

/* ============================================================
   HELP BOXES
============================================================ */
.help-box {
  padding: 14px 18px;
  margin-bottom: 18px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 3px solid var(--brand-2);
  border-radius: 0 12px 12px 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text);
  display: flex; gap: 10px; align-items: flex-start;
}
.help-box i { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--brand-2); }
.help-box.z2pay { background: var(--violet-soft); border-left-color: var(--violet); }
.help-box.z2pay i { color: var(--violet); }
.help-inline {
  padding: 11px 14px; margin-top: 10px;
  font-size: 12px; line-height: 1.6;
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  border-left: 3px solid var(--brand-2);
  border-radius: 0 9px 9px 0;
  color: var(--text);
  display: flex; gap: 8px; align-items: flex-start;
}
.help-inline i { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--brand-2); }
.help-inline.warn { background: var(--orange-soft); border-left-color: var(--orange); }
.help-inline.warn i { color: var(--orange-2); }

/* ============================================================
   DAY PICK / UPLOAD ROW
============================================================ */
.day-pick {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(190px,1fr));
  gap: 12px; padding: 18px; margin-bottom: 18px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border-2);
  border-radius: 16px;
  align-items: end;
}
.upload-row { display: flex; gap: 14px; align-items: center; margin: 8px 0 14px; flex-wrap: wrap; }
.file-drop {
  flex: 1; min-width: 260px; padding: 12px;
  border: 2px dashed var(--orange);
  border-radius: 12px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  transition: all .25s cubic-bezier(.2,.9,.3,1);
  cursor: pointer;
}
.file-drop:hover { border-color: var(--brand-2); background: var(--brand-50); transform: translateY(-2px); }

/* ============================================================
   MODAIS
============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(10,22,40,.72);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  padding: 20px;
  animation: backdropIn .25s ease;
}
.modal-backdrop.open { display: flex; }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 720px; max-height: 92vh; overflow: auto;
  padding: 30px;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--sh-lg), inset 0 1px 0 var(--glass-border);
  animation: modalIn .35s cubic-bezier(.2,.9,.3,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
.modal.modal-wide { max-width: 900px; }
.modal.modal-xl { max-width: 1100px; }
.modal h3 {
  margin: 0 0 14px; font-size: 19px; font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -.02em;
}
.modal h3 i { width: 20px; height: 20px; color: var(--orange); }
.modal-sub { font-size: 13px; color: var(--text-muted); margin: 0 0 18px; line-height: 1.7; }
.modal .btn-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }

/* Config */
.cfg-status {
  padding: 13px 16px; margin-bottom: 18px;
  font-size: 12.5px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  border: 1px dashed var(--brand-2);
  border-radius: 12px;
  color: var(--text);
}
.cfg-section { border-top: 1px solid var(--glass-border-2); margin-top: 24px; padding-top: 20px; }
.section-title {
  margin: 0 0 14px;
  font-size: 12.5px; font-weight: 700;
  color: var(--brand-2);
  text-transform: uppercase; letter-spacing: .06em;
  display: flex; align-items: center; gap: 8px;
}
.section-title i { width: 15px; height: 15px; }
.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding: 13px 16px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border-2);
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s;
}
.checkbox-row:hover { border-color: var(--orange); transform: translateY(-1px); }
.checkbox-row input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--orange); }
.checkbox-row label {
  margin: 0; font-size: 13px; font-weight: 600;
  color: var(--text);
  text-transform: none; letter-spacing: 0;
  display: flex; align-items: center; gap: 6px;
}
.checkbox-row label i { width: 15px; height: 15px; }
.field-hidden { display: none; }

/* Texto modal */
.texto-modal {
  padding: 18px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border-2);
  border-radius: 12px;
  font-family: 'JetBrains Mono',monospace;
  font-size: 12px; line-height: 1.7;
  color: var(--text);
  max-height: 420px; overflow: auto;
  white-space: pre-wrap; word-break: break-word;
}

/* VEC modal */
.vec-modal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-radius: 14px;
  margin-bottom: 18px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border-2);
}
.vec-modal-header .emoji { font-size: 32px; }
.vec-modal-header h4 { margin: 0 0 3px; font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.vec-modal-header p { margin: 0; font-size: 12px; color: var(--text-muted); }
.vec-scenario {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 10px; margin-bottom: 16px;
}
.vec-scenario .card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border-2);
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  transition: all .25s;
}
.vec-scenario .card:hover { transform: translateY(-2px); }
.vec-scenario .card .lbl {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 5px; letter-spacing: .06em;
}
.vec-scenario .card .val { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.vec-scenario .card.green { border-color: var(--accent); background: var(--accent-soft); }
.vec-scenario .card.green .val { color: var(--accent-2); }
.vec-scenario .card.red { border-color: var(--danger); background: var(--danger-soft); }
.vec-scenario .card.red .val { color: var(--danger); }
.vec-scenario .card.neutral { background: var(--glass-bg-2); }
.vec-formula {
  margin-top: 14px; padding: 14px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  border: 1px dashed var(--glass-border-2);
  border-radius: 12px;
  font-family: 'JetBrains Mono',monospace;
  font-size: 11.5px; line-height: 1.75;
  color: var(--text);
}
.vec-formula .highlight {
  background: var(--orange-soft); padding: 2px 6px;
  border-radius: 4px; color: var(--orange-2); font-weight: 700;
}

/* Carta */
.carta-info {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 8px; margin-bottom: 16px; font-size: 11.5px;
}
.carta-info .item { padding: 9px 11px; background: var(--glass-bg-2); border: 1px solid var(--glass-border-2); border-radius: 9px; }
.carta-info .item .lbl {
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 3px; letter-spacing: .06em;
}
.carta-info .item .val { font-weight: 600; color: var(--text); word-break: break-word; }
.plano-secao { margin-bottom: 14px; }
.plano-secao h4 {
  margin: 0 0 10px; font-size: 12.5px; font-weight: 700;
  color: var(--brand-2);
  text-transform: uppercase; letter-spacing: .05em;
}
.plano-secao ul { margin: 0; padding-left: 20px; font-size: 12.5px; line-height: 1.8; }
.plano-secao.faltantes ul li { color: var(--orange-2); }
.plano-secao.encontradas ul li { color: var(--accent-2); }
.carta-editor {
  padding: 16px; border-radius: 12px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border-2);
  font-family: 'JetBrains Mono',monospace;
  font-size: 11px; line-height: 1.7;
  color: var(--text);
  width: 100%; min-height: 420px;
  resize: vertical;
}

/* Workspace modal */
.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.workspace-card {
  padding: 26px 20px;
  border: 2px solid var(--glass-border-2);
  border-radius: 18px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all .3s cubic-bezier(.2,.9,.3,1);
  text-align: center;
  font-family: inherit;
  font-size: 14px;
}
.workspace-card:hover { transform: translateY(-6px); box-shadow: var(--sh-hover); border-color: var(--violet); }
.workspace-card.active { border-color: var(--brand-2); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-glow); }
.workspace-card.active.z2pay { border-color: var(--violet); background: var(--violet-soft); box-shadow: 0 0 0 3px var(--violet-glow); }
.ws-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: 12px;
  border-radius: 14px;
  background: var(--grad-brand);
  color: #fff;
}
.workspace-card.z2pay .ws-icon { background: var(--grad-z2pay); }
.ws-icon i { width: 24px; height: 24px; }
.ws-title { font-weight: 700; color: var(--text); margin-bottom: 4px; font-size: 15px; }
.ws-title.z2pay { color: var(--violet); }
.ws-sub { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }

/* Timeline */
.timeline { margin-top: 16px; border-left: 3px solid var(--violet); padding-left: 18px; }
.timeline-item { position: relative; padding: 9px 0 9px 4px; }
.timeline-item::before {
  content: '';
  position: absolute; left: -25px; top: 15px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--violet);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--violet);
}
.timeline-item .tl-date { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono',monospace; }
.timeline-item .tl-type { font-size: 12.5px; font-weight: 700; color: var(--violet); margin-top: 3px; }

/* Detail grid */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 10px;
}
.detail-item { padding: 11px 13px; background: var(--glass-bg-2); border: 1px solid var(--glass-border-2); border-radius: 10px; transition: all .2s; }
.detail-item:hover { transform: translateY(-2px); border-color: var(--orange); }
.detail-item .di-label {
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; color: var(--text-muted);
  letter-spacing: .06em; margin-bottom: 4px;
}
.detail-item .di-value {
  font-size: 13px; font-weight: 600;
  color: var(--text); word-break: break-word;
  font-variant-numeric: tabular-nums;
}
.detail-item .di-value.mono { font-family: 'JetBrains Mono',monospace; font-size: 11.5px; }

/* ============================================================
   TOASTS (versão UX com ícone + barra)
============================================================ */
#toast-container {
  position: fixed; top: 22px; right: 22px; z-index: 2000;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 420px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 14px 14px;
  border-radius: 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  animation: toastIn .38s cubic-bezier(.2,.9,.3,1);
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.10);
  position: relative;
  overflow: hidden;
}
.toast.toast-out { animation: toastOut .3s cubic-bezier(.4,0,.6,1) forwards; }
.toast-icon {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 10px;
  background: rgba(255,255,255,.20);
  flex-shrink: 0;
}
.toast-icon i { width: 16px; height: 16px; stroke-width: 2.5; }
.toast-text { flex: 1; min-width: 0; line-height: 1.5; }
.toast-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px; width: 100%;
  background: rgba(255,255,255,.30);
  transform-origin: left;
  animation: toastBar linear forwards;
}
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(28px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(28px) scale(.95); } }
.toast.success { background: linear-gradient(135deg,var(--accent-2),var(--accent)); }
.toast.error { background: linear-gradient(135deg,var(--danger-2),var(--danger)); }
.toast.info { background: var(--grad-brand); }
.toast.warn { background: var(--grad-orange); }
.toast.violet { background: linear-gradient(135deg,var(--violet-2),var(--violet)); }

/* ============================================================
   CONFIRMAÇÃO CUSTOMIZADA
============================================================ */
#confirm-backdrop {
  position: fixed; inset: 0; z-index: 3000;
  display: none; align-items: center; justify-content: center;
  background: rgba(10,22,40,.72);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  padding: 20px;
  animation: backdropIn .22s ease;
}
#confirm-backdrop.open { display: flex; }
.confirm-modal {
  width: 100%; max-width: 440px;
  padding: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--sh-lg), inset 0 1px 0 var(--glass-border);
  animation: modalIn .3s cubic-bezier(.2,.9,.3,1);
}
.confirm-icon {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: var(--orange-soft);
  color: var(--orange);
  border: 1px solid var(--orange);
  box-shadow: 0 8px 24px -8px var(--orange-glow);
}
.confirm-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 8px 24px -8px var(--danger-glow);
}
.confirm-icon i { width: 26px; height: 26px; stroke-width: 2; }
.confirm-modal h3 {
  margin: 0 0 10px;
  font-size: 18px; font-weight: 700;
  color: var(--text); text-align: center;
  letter-spacing: -.02em;
  justify-content: center;
}
.confirm-msg {
  margin: 0 0 24px;
  font-size: 13.5px; line-height: 1.65;
  color: var(--text-muted);
  text-align: center;
}
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn { min-width: 110px; }

/* ============================================================
   SKELETON LOADER
============================================================ */
.skeleton-row td { padding: 20px 16px; }
.skeleton-block {
  height: 14px; border-radius: 7px;
  background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 40%, var(--surface-3) 80%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s linear infinite;
}
.skeleton-block.sm { height: 10px; width: 55%; margin-top: 6px; }
.skeleton-block.lg { height: 18px; width: 75%; }
.skeleton-block.full { width: 90%; }
.skeleton-block.wide { width: 100%; }
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   DONUT CHART
============================================================ */
.resumo-financeiro-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}
@media (max-width: 1200px) { .resumo-financeiro-wrap { grid-template-columns: 1fr; } }
.donut-box {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--sh-sm), inset 0 1px 0 var(--glass-border);
  min-width: 340px;
  animation: fadeSlideIn .4s cubic-bezier(.2,.9,.3,1);
}
.donut-svg { width: 130px; height: 130px; flex-shrink: 0; transform: rotate(-90deg); overflow: visible; }
.donut-svg circle { transition: stroke-dasharray 1.4s cubic-bezier(.2,.9,.3,1), stroke-dashoffset 1.4s cubic-bezier(.2,.9,.3,1); }
.donut-ring { fill: none; stroke: var(--surface-3); stroke-width: 12; }
.donut-segment { fill: none; stroke-width: 12; stroke-linecap: round; }
.donut-center-info { display: flex; flex-direction: column; gap: 8px; font-size: 12px; flex: 1; min-width: 0; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; color: var(--text); }
.donut-legend-item .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px var(--surface); }
.donut-legend-item .lbl { flex: 1; color: var(--text-muted); font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.donut-legend-item .val { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text); }

/* ============================================================
   PROGRESS / SPINNER
============================================================ */
.progress-bar { height: 8px; background: var(--surface-3); border-radius: 5px; overflow: hidden; margin-top: 12px; }
.progress-bar > div {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand-2), var(--orange), var(--accent));
  background-size: 200% 100%;
  transition: width .3s cubic-bezier(.2,.9,.3,1);
  border-radius: 5px;
  animation: progressShimmer 2s linear infinite;
}
@keyframes progressShimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
.progress-bar.z2pay > div { background: var(--grad-z2pay); background-size: 200% 100%; }
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ROBÔ IA
============================================================ */
.ia-robot {
  position: fixed;
  bottom: 40px; right: 40px;
  width: 160px; height: 180px;
  pointer-events: none;
  z-index: 900;
  color: var(--brand-2);
  opacity: 0;
  transform: translateX(120px) translateY(30px) scale(0.6);
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(.2,.9,.3,1);
}
.ia-robot.visible { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
html[data-theme="dark"] .ia-robot { color: var(--brand-3); }
.ia-robot-svg {
  width: 100%; height: 100%;
  animation: robotFloat 3.5s ease-in-out infinite;
  filter: drop-shadow(0 14px 28px rgba(10,37,64,.30));
}
@keyframes robotFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.ia-antenna-dot {
  fill: var(--orange);
  transform-origin: 80px 43px;
  animation: antennaPulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 6px var(--orange));
}
@keyframes antennaPulse { 0%, 100% { transform: scale(1); opacity: 0.75; } 50% { transform: scale(1.5); opacity: 1; } }

.ia-bulb { opacity: 0; transition: opacity .3s; }
.ia-bulb path { filter: drop-shadow(0 0 6px var(--gold)); }

.ia-eye { transform-origin: center; animation: robotBlink 4.5s ease-in-out infinite; }
.ia-eye:nth-of-type(2) { animation-delay: 0.05s; }
@keyframes robotBlink { 0%, 90%, 100% { transform: scaleY(1); } 93%, 96% { transform: scaleY(0.1); } }

.ia-eyes-closed { opacity: 0; transition: opacity .2s; }
.ia-mouth-happy, .ia-mouth-sad { opacity: 0; transition: opacity .2s; }

.ia-chest-glow {
  fill: var(--orange);
  transform-origin: 80px 145px;
  animation: chestPulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px var(--orange));
  transition: fill .3s;
}
@keyframes chestPulse { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.35); opacity: 1; } }

.ia-arm-left {
  transform-origin: 55px 140px;
  transition: transform .5s cubic-bezier(.2,.9,.3,1);
  animation: robotWave 1.8s ease-in-out infinite;
}
@keyframes robotWave { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.ia-arm-right { transform-origin: 105px 140px; transition: transform .5s cubic-bezier(.2,.9,.3,1); }

/* Pensando */
.ia-robot.thinking .ia-robot-svg { animation: robotThink 1.8s ease-in-out infinite; }
@keyframes robotThink { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.ia-robot.thinking .ia-antenna { opacity: 0; transition: opacity .3s; }
.ia-robot.thinking .ia-bulb { opacity: 1; animation: bulbGlow 0.9s ease-in-out infinite; }
@keyframes bulbGlow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.ia-robot.thinking .ia-eyes-open { opacity: 0; }
.ia-robot.thinking .ia-eyes-closed { opacity: 1; }
.ia-robot.thinking .ia-arm-left { animation: none; transform: rotate(-110deg); }
.ia-robot.thinking .ia-arm-right { transform: rotate(110deg); }
.ia-robot.thinking .ia-chest-glow { fill: var(--orange); animation: chestPulse 0.7s ease-in-out infinite; }

/* Feliz */
.ia-robot.happy .ia-robot-svg { animation: robotJump 0.85s cubic-bezier(.2,.9,.3,1) 3; }
@keyframes robotJump {
  0%   { transform: translateY(0) scale(1); }
  40%  { transform: translateY(-35px) scale(1.08); }
  70%  { transform: translateY(-8px) scale(1.03); }
  100% { transform: translateY(0) scale(1); }
}
.ia-robot.happy .ia-mouth-neutral { opacity: 0; }
.ia-robot.happy .ia-mouth-happy { opacity: 1; }
.ia-robot.happy .ia-arm-left { animation: none; transform: rotate(-100deg); }
.ia-robot.happy .ia-arm-right { animation: none; transform: rotate(100deg); }
.ia-robot.happy .ia-eye { animation: robotHappyBlink 0.5s ease-in-out 4; }
@keyframes robotHappyBlink { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.2); } }
.ia-robot.happy .ia-chest-glow { fill: var(--accent); animation: chestPulse 0.5s ease-in-out infinite; filter: drop-shadow(0 0 14px var(--accent)); }
.ia-robot.happy .ia-bulb { opacity: 0; }

/* Triste */
.ia-robot.sad .ia-mouth-neutral { opacity: 0; }
.ia-robot.sad .ia-mouth-sad { opacity: 1; }
.ia-robot.sad .ia-arm-left { animation: none; transform: rotate(15deg); }
.ia-robot.sad .ia-arm-right { transform: rotate(-15deg); }
.ia-robot.sad .ia-chest-glow { fill: var(--text-dim); animation: chestPulse 2.5s ease-in-out infinite; filter: none; }
.ia-robot.sad .ia-bulb { opacity: 0; }
.ia-robot.sad .ia-eye { animation: robotSadEye 1s ease-out 1 forwards; }
@keyframes robotSadEye { 0% { transform: scaleY(1); } 100% { transform: scaleY(0.3); } }
.ia-robot.sad .ia-robot-svg { animation: robotSadHead 1s ease-out 1 forwards; }
@keyframes robotSadHead { 0% { transform: translateY(0); } 100% { transform: translateY(6px); } }

/* ============================================================
   PREMIUM — barra de scroll, botão topo, tooltip
============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  z-index: 9999;
  background: linear-gradient(90deg, var(--brand-2), var(--orange), var(--accent));
  box-shadow: 0 0 12px var(--orange-glow);
  transition: width .1s linear;
  pointer-events: none;
  border-radius: 0 3px 3px 0;
}
.back-to-top {
  position: fixed;
  bottom: 40px; left: 40px;
  width: 48px; height: 48px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  color: var(--brand-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 950;
  opacity: 0;
  transform: translateY(20px) scale(.85);
  transition: all .35s cubic-bezier(.2,.9,.3,1);
  box-shadow: var(--sh-md), inset 0 1px 0 var(--glass-border);
  pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover {
  background: var(--grad-brand);
  color: #fff;
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 30px -8px var(--brand-glow);
}
.back-to-top:active { transform: translateY(-2px) scale(1.02); }
.back-to-top i { width: 22px; height: 22px; stroke-width: 2.5; }

.premium-tooltip {
  position: fixed;
  padding: 7px 12px;
  background: var(--brand);
  color: #fff;
  font-size: 11.5px; font-weight: 600;
  border-radius: 8px;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s;
  box-shadow: 0 6px 16px -4px rgba(10,37,64,.35);
  letter-spacing: .01em;
  max-width: 260px;
  text-align: center;
}
.premium-tooltip.visible { opacity: 1; transform: translateY(0); }
html[data-theme="dark"] .premium-tooltip { background: var(--brand-2); color: #05080e; }

/* Fade-in em cascata nas tabelas */
tbody tr { animation: rowFadeIn .35s cubic-bezier(.2,.9,.3,1) both; }
tbody tr:nth-child(1) { animation-delay: 0s; }
tbody tr:nth-child(2) { animation-delay: .03s; }
tbody tr:nth-child(3) { animation-delay: .06s; }
tbody tr:nth-child(4) { animation-delay: .09s; }
tbody tr:nth-child(5) { animation-delay: .12s; }
tbody tr:nth-child(6) { animation-delay: .15s; }
tbody tr:nth-child(7) { animation-delay: .18s; }
tbody tr:nth-child(8) { animation-delay: .21s; }
tbody tr:nth-child(9) { animation-delay: .24s; }
tbody tr:nth-child(10) { animation-delay: .27s; }
tbody tr:nth-child(n+11) { animation-delay: .3s; }
@keyframes rowFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Troca de workspace */
#eduizz-area, #z2pay-area { transition: opacity .4s ease, transform .4s cubic-bezier(.2,.9,.3,1); }
#eduizz-area.workspace-hiding, #z2pay-area.workspace-hiding { opacity: 0; transform: translateY(8px) scale(.995); pointer-events: none; }
#eduizz-area.workspace-showing, #z2pay-area.workspace-showing { animation: workspaceIn .5s cubic-bezier(.2,.9,.3,1); }
@keyframes workspaceIn {
  0%   { opacity: 0; transform: translateY(10px) scale(.995); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   RESPONSIVO
============================================================ */
@media (max-width: 1200px) {
  .resumo-chips { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
  .resumo-chip .num { font-size: 15.5px; }
}
@media (max-width: 900px) {
  .upload-section { grid-template-columns: 1fr; }
  .workspace-grid { grid-template-columns: 1fr; }
  .header-bar { padding: 18px 20px; }
  .tab-content, .app-card { padding: 22px 20px; }
  .user-info { gap: 6px; }
  .user-chip { padding: 7px 12px; font-size: 11.5px; }
  .icon-btn { width: 36px; height: 36px; }
  .ia-robot { display: none; }
}
@media (max-width: 600px) {
  .resumo-chips { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
  .resumo-chip { min-height: 62px; padding: 12px 14px; column-gap: 10px; }
  .chip-icon { width: 30px; height: 30px; }
  .resumo-chip .num { font-size: 15px; }
  .resumo-chip .lbl2 { font-size: 9px; }
}