/* ═══════════════════════════════════════════════════════════════════
   Kim's Papelaria — Sistema Interno
   Design: escuro, moderno, profissional, limpo
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:           #0c0e14;
  --bg2:          #111318;
  --surface:      #161921;
  --surface2:     #1c1f2e;
  --border:       rgba(255,255,255,0.07);
  --border2:      rgba(255,255,255,0.04);

  --txt:          #e8eaf2;
  --txt2:         #8b91b0;
  --txt3:         #4a5070;

  --accent:       #6366f1;
  --accent-light: #818cf8;
  --accent-dark:  #4f46e5;
  --accent-glow:  rgba(99,102,241,0.18);
  --accent-subtle:rgba(99,102,241,0.08);

  --green:        #34d399;
  --green-subtle: rgba(52,211,153,0.10);
  --yellow:       #fbbf24;
  --yellow-subtle:rgba(251,191,36,0.10);
  --red:          #f87171;
  --red-subtle:   rgba(248,113,113,0.10);
  --blue:         #60a5fa;
  --blue-subtle:  rgba(96,165,250,0.10);

  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    14px;
  --radius-xl:    20px;

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.5);
  --shadow:       0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.5);

  --font:         'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:         'JetBrains Mono', 'Fira Code', monospace;

  --topbar-h:     58px;
}

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  min-height: 100dvh; /* iOS Safari: exclui barra de URL do cálculo */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar            { width: 5px; height: 5px; }
::-webkit-scrollbar-track      { background: transparent; }
::-webkit-scrollbar-thumb      { background: rgba(255,255,255,0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,0.14); }

/* ── Tipografia ──────────────────────────────────────────────────── */
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 0.95rem; font-weight: 600; }
p  { color: var(--txt2); font-size: 0.875rem; }
a  { color: var(--accent-light); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--txt); }
small { font-size: 0.78rem; color: var(--txt3); }

/* ── Layout ──────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Topbar ──────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12,14,20,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--topbar-h);
}

/* Mobile: empilha em 2 linhas para a nav não cortar */
@media (max-width: 640px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 0.5rem 1rem 0;
    gap: 0;
  }
  .topbar-brand {
    flex: 1;
    padding: 0.4rem 0;
  }
  .topbar-right {
    padding: 0.4rem 0;
  }
  .topbar-nav {
    order: 3;
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border);
    border-bottom: none;
    background: var(--bg2);
    padding: 4px 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    gap: 2px;
  }
  .topbar-nav::-webkit-scrollbar { display: none; }
  .clock { font-size: 0.72rem; padding: 0.25rem 0.5rem; }
  .btn-sm { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
}

.topbar-brand {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--txt);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.topbar-brand em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent-light), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}

.nav-link {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--txt2);
  transition: all 0.18s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--txt); background: var(--border); text-decoration: none; }
.nav-link.ativo {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.topbar-right { display: flex; align-items: center; gap: 0.5rem; }

.clock {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--txt3);
  padding: 0.3rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

/* ── Main Content ────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
@media (min-width: 768px) { .main-content { padding: 2.5rem 2rem 4rem; } }

/* ── Page Header ─────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 2rem;
}
.page-header h1 { margin-bottom: 0.25rem; }
.page-header p { font-size: 0.875rem; }

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, transparent 60%);
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border2);
}

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--txt);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Formulários ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--txt2);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

input, select, textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--txt);
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  appearance: none;
  -webkit-appearance: none;
}

input:hover, select:hover, textarea:hover {
  border-color: rgba(255,255,255,0.14);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background: var(--surface2);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder, textarea::placeholder { color: var(--txt3); }
select { cursor: pointer; }
select option { background: var(--surface); color: var(--txt); }
textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 480px) {
  .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.18s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,0.35);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 4px 20px rgba(99,102,241,0.5);
  transform: translateY(-1px);
}

.btn-sucesso {
  background: linear-gradient(135deg, var(--green), #10b981);
  color: #fff;
  box-shadow: 0 2px 12px rgba(52,211,153,0.25);
}
.btn-sucesso:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(52,211,153,0.4);
}

.btn-ghost {
  background: var(--surface2);
  color: var(--txt2);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(255,255,255,0.06);
  color: var(--txt);
  border-color: rgba(255,255,255,0.12);
}

.btn-perigo {
  background: var(--red-subtle);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.25);
}
.btn-perigo:hover:not(:disabled) {
  background: var(--red);
  color: #fff;
}

.btn-icon {
  background: var(--surface2);
  color: var(--txt3);
  border: 1px solid var(--border);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.btn-icon:hover { color: var(--txt); background: rgba(255,255,255,0.06); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }

.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ── Badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}

.badge-mensalista { background: var(--accent-subtle); color: var(--accent-light); border-color: rgba(99,102,241,0.2); }
.badge-avulso     { background: rgba(255,255,255,0.04); color: var(--txt2); border-color: var(--border); }
.badge-aberto     { background: var(--yellow-subtle); color: var(--yellow); border-color: rgba(251,191,36,0.2); }
.badge-fechado    { background: rgba(255,255,255,0.04); color: var(--txt2); border-color: var(--border); }
.badge-enviado    { background: var(--blue-subtle); color: var(--blue); border-color: rgba(96,165,250,0.2); }
.badge-pago       { background: var(--green-subtle); color: var(--green); border-color: rgba(52,211,153,0.2); }

/* ── Stats Grid ──────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 480px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s;
}
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.stat-card:hover::after { opacity: 1; }
.stat-card:hover { border-color: rgba(99,102,241,0.25); }

.stat-valor {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--txt);
  line-height: 1;
  margin-bottom: 0.4rem;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

/* ── Lista Items ─────────────────────────────────────────────────── */
.lista-items { list-style: none; }

.item-linha {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border2);
  transition: background 0.12s;
}
.item-linha:last-child { border-bottom: none; padding-bottom: 0; }
.item-linha:first-child { padding-top: 0; }

.item-info { flex: 1; min-width: 0; }
.item-nome {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-sub {
  font-size: 0.78rem;
  color: var(--txt2);
  margin-top: 0.15rem;
}
.item-valor {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}

/* ── Closing Card ────────────────────────────────────────────────── */
.closing-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.closing-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.18s;
}
.closing-card:hover {
  border-color: rgba(99,102,241,0.3);
  background: var(--surface2);
  transform: translateX(2px);
}
.closing-card:hover::before { opacity: 1; }

.closing-nome { font-weight: 600; font-size: 0.9rem; }
.closing-total {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--green);
  font-size: 0.95rem;
  white-space: nowrap;
}

/* ── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border2);
}
.modal-title { font-size: 1rem; font-weight: 700; }

.btn-fechar {
  width: 28px; height: 28px;
  min-width: 44px; min-height: 44px; /* área de toque mínima iOS (44px) */
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--txt2);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.15s;
}
.btn-fechar:hover { background: var(--red-subtle); color: var(--red); border-color: transparent; }

/* ── Toasts ──────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: max(1.5rem, calc(1rem + env(safe-area-inset-bottom)));
  right: max(1.5rem, calc(1rem + env(safe-area-inset-right)));
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 320px;
}

.toast {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.toast::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.toast-sucesso { border-left: 3px solid var(--green); }
.toast-sucesso::before { background: var(--green); }
.toast-erro    { border-left: 3px solid var(--red); }
.toast-erro::before { background: var(--red); }
.toast-aviso   { border-left: 3px solid var(--yellow); }
.toast-aviso::before { background: var(--yellow); }

/* ── Busca ───────────────────────────────────────────────────────── */
.busca-container { position: relative; }
.busca-container input { padding-left: 2.4rem; }
.busca-icone {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt3);
  font-size: 0.85rem;
  pointer-events: none;
}

/* ── Empty State ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--txt2);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  filter: grayscale(0.3);
}
.empty-state h3 { color: var(--txt2); margin-bottom: 0.4rem; font-size: 0.95rem; }
.empty-state p  { font-size: 0.825rem; }

/* ── Loading ─────────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.55s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.carregando {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 2.5rem;
  color: var(--txt2);
  font-size: 0.85rem;
}

/* ── Login ───────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* fundo decorativo */
.login-page::before {
  content: '';
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo .brand-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  box-shadow: 0 6px 24px rgba(99,102,241,0.35);
}
.login-logo h1 {
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--txt) 40%, var(--txt2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-logo p { font-size: 0.825rem; margin-top: 0.35rem; }

.erro-login {
  background: var(--red-subtle);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  font-size: 0.83rem;
  color: var(--red);
  margin-bottom: 1rem;
}

/* ── Autocomplete de clientes ────────────────────────────────────── */
.cliente-wrapper { position: relative; }

#cliente-resultados {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  z-index: 200;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.resultado-item {
  padding: 0.7rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.12s;
  border-bottom: 1px solid var(--border2);
}
.resultado-item:last-child { border-bottom: none; }
.resultado-item:hover { background: rgba(99,102,241,0.1); }
.resultado-nome { color: var(--txt); }
.resultado-criar { color: var(--accent-light); font-style: normal; }
.resultado-criar:hover { background: var(--accent-subtle); }

#cliente-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--accent-subtle);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}
#cliente-info .cliente-nome-conf { color: var(--accent-light); font-weight: 600; }

/* ── Divisor de seção ────────────────────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}
.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border2);
}
.section-divider-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--txt3);
}

/* ── Impressão ───────────────────────────────────────────────────── */
@media print {
  .topbar, .btn, .btn-group { display: none !important; }
  body { background: #fff; color: #000; font-size: 13px; }
  .card { border: 1px solid #ddd; box-shadow: none; }
  .item-valor { color: #1a7a50 !important; }
}

/* ── Card principal de áudio ─────────────────────────────────────── */
.audio-card-principal {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 2rem;
  gap: 1.5rem;
  background: linear-gradient(160deg, var(--surface) 0%, #1a1d2e 100%);
  border: 1px solid rgba(99,102,241,0.2);
}

/* Botão microfone grande */
.mic-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mic-btn {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font);
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 0 0 0 rgba(99,102,241,0.5), var(--shadow-lg);
}
.mic-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 12px rgba(99,102,241,0.12), var(--shadow-lg);
}
.mic-btn:active { transform: scale(0.96); }
/* Em dispositivos touch (sem hover real), o :active replica o glow do hover */
@media (hover: none) {
  .mic-btn:active {
    transform: scale(0.96);
    box-shadow: 0 0 0 12px rgba(99,102,241,0.18), var(--shadow-lg);
  }
}
.mic-icon {
  font-size: 2.5rem;
  line-height: 1;
  display: block;
}
.mic-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);
}

/* Botão parar (vermelho) */
.mic-btn-parar {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 0 0 0 rgba(239,68,68,0.5), var(--shadow-lg);
  animation: mic-pulse 1.4s infinite;
}
.mic-btn-parar:hover {
  box-shadow: 0 0 0 14px rgba(239,68,68,0.12), var(--shadow-lg);
}
.mic-stop-icon { font-size: 2rem; }

@keyframes mic-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(239,68,68,0.55), var(--shadow-lg); }
  60%  { box-shadow: 0 0 0 22px rgba(239,68,68,0),   var(--shadow-lg); }
  100% { box-shadow: 0 0 0 0   rgba(239,68,68,0),    var(--shadow-lg); }
}

/* Status / loading */
.mic-status {
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 1.2rem;
  text-align: center;
}
.mic-status.gravando    { color: var(--red);    }
.mic-status.processando { color: var(--yellow); }
.mic-status.ok          { color: var(--green);  }
.mic-status.erro        { color: var(--red);    }

.mic-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--txt2);
  font-size: 0.83rem;
}
.mic-loading-ring {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Transcrição exibida */
.transcricao-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--txt3);
  margin-bottom: 0.4rem;
  text-align: center;
}
.transcricao-texto {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--txt);
  text-align: center;
  max-width: 480px;
  min-width: 260px;
}
.transcricao-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  color: var(--txt);
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
}
.transcricao-acoes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.6rem;
}
.btn-link {
  background: none;
  border: none;
  color: var(--txt2);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.btn-link:hover { color: var(--accent-light); }

/* Divisor "ou" */
.audio-ou {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 380px;
  gap: 0.75rem;
}
.audio-ou::before, .audio-ou::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border2);
}
.audio-ou span {
  font-size: 0.75rem;
  color: var(--txt3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Input de texto rápido inline */
.texto-rapido-wrapper {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 480px;
}
.texto-rapido-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--txt);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
}
.texto-rapido-input:focus { border-color: var(--accent); }
.texto-rapido-input::placeholder { color: var(--txt3); }
.texto-rapido-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--txt);
  border-radius: var(--radius);
  padding: 0.65rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.texto-rapido-btn:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Formulário manual como <details> recolhido */
.card-manual {
  cursor: default;
}
.card-manual-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  padding: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--txt2);
  user-select: none;
}
.card-manual-toggle::-webkit-details-marker { display: none; }
.card-manual-toggle::after {
  content: '▸';
  font-size: 0.75rem;
  transition: transform 0.2s;
  color: var(--txt3);
}
details[open] .card-manual-toggle::after { transform: rotate(90deg); }
.card-manual-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: var(--surface2);
  color: var(--txt3);
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

/* ── Tabs (mantido para compatibilidade) ─────────────────────────── */
.tab-pills {
  display: flex;
  gap: 0.35rem;
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 0.25rem;
}
.tab-pill {
  background: transparent;
  border: none;
  color: var(--txt2);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}
.tab-pill:hover { color: var(--txt); background: rgba(255,255,255,0.04); }
.tab-pill.ativo { background: var(--accent); color: #fff; }
.tab-content { padding-top: 1.25rem; }
.tab-content.hidden { display: none !important; }

/* ── NLP / Áudio ─────────────────────────────────────────────────── */
.nlp-section {
  padding: 0.5rem 0;
}
.nlp-instrucao {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: var(--txt2);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.nlp-instrucao em { color: var(--accent-light); font-style: normal; font-weight: 500; }
.nlp-controles {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.btn-lg { padding: 0.7rem 1.5rem; font-size: 1rem; }
.btn-danger {
  background: var(--red-subtle);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.25);
}
.btn-danger:hover { background: rgba(248,113,113,0.2); }
.btn-danger:disabled { opacity: 0.35; cursor: not-allowed; }

.nlp-status {
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 1.4rem;
  padding: 0.35rem 0;
  transition: color 0.2s;
}
.nlp-status.gravando  { color: var(--red); }
.nlp-status.processando { color: var(--yellow); }
.nlp-status.ok        { color: var(--green); }
.nlp-status.erro      { color: var(--red); }

.nlp-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--txt2);
  font-size: 0.83rem;
  padding: 0.5rem 0;
}

/* ── Modal NLP ───────────────────────────────────────────────────── */
.nlp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.nlp-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
  /* -webkit-overflow-scrolling: touch; — deprecated, removido */
}
.nlp-confirmacao {}
.nlp-conf-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: flex-start;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border2);
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  color: var(--txt2);
}
.nlp-conf-header em {
  color: var(--txt);
  font-style: italic;
  display: block;
  width: 100%;
  font-size: 0.82rem;
  line-height: 1.4;
}
.nlp-ambiguidades {
  background: rgba(251,191,36,0.07);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--yellow);
  margin-bottom: 1rem;
}
.nlp-ambiguidades ul { margin: 0.35rem 0 0 1.2rem; padding: 0; }
.nlp-ambiguidades li { margin-bottom: 0.2rem; }
.nlp-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.85rem;
  margin-bottom: 1rem;
}
.nlp-field { display: flex; flex-direction: column; gap: 0.3rem; }
.nlp-field label {
  font-size: 0.72rem;
  color: var(--txt2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nlp-field input, .nlp-field select {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--txt);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;   /* maior para toque */
  font-size: 1rem;            /* legível no mobile */
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  min-height: 48px;           /* alvo mínimo de toque */
}
.nlp-field input:focus, .nlp-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.nlp-field-full { grid-column: 1 / -1; }

/* Cliente — destaque visual especial */
#nlpConfClienteId {
  font-weight: 600;
  font-size: 1rem;
  border-color: var(--accent);
}
.nlp-sugestao { font-size: 0.77rem; color: var(--txt2); margin-top: 0.2rem; display: block; }
.nlp-sugestao.novo { color: var(--yellow); }
.nlp-sugestao.ok   { color: var(--green); }

.btn-cadastrar-rapido {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.btn-cadastrar-rapido:hover {
  background: rgba(52,211,153,0.18);
}
.btn-cadastrar-rapido:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.nlp-itens {
  margin-bottom: 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.nlp-itens-titulo {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--txt3);
  padding: 0.5rem 0.85rem 0.35rem;
}
.nlp-itens-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.nlp-itens-tabela th {
  padding: 0.35rem 0.85rem;
  color: var(--txt3);
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border2);
  font-size: 0.75rem;
}
.nlp-itens-tabela td {
  padding: 0.4rem 0.85rem;
  border-bottom: 1px solid var(--border2);
  color: var(--txt);
}
.nlp-itens-tabela tbody tr:last-child td { border-bottom: 1px solid var(--border); }
.nlp-itens-tabela tfoot td {
  padding: 0.45rem 0.85rem;
  background: rgba(99,102,241,0.05);
}

.nlp-actions {
  display: flex;
  flex-direction: column;    /* empilha no mobile */
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border2);
}
.nlp-btn-salvar {
  order: -1;                 /* botão salvar aparece primeiro */
  min-height: 52px;          /* alvo de toque generoso */
  font-size: 1.05rem;
  font-weight: 700;
}
.nlp-btn-cancelar {
  min-height: 44px;
  font-size: 0.9rem;
  color: var(--txt3);
}

.badge-engine {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-engine.openai { background: rgba(16,163,127,0.15); color: #10a37f; border: 1px solid rgba(16,163,127,0.3); }
.badge-engine.local  { background: var(--accent-subtle); color: var(--accent-light); border: 1px solid rgba(99,102,241,0.25); }

/* Botão gravar em estado ativo */
#nlpBtnGravar.gravando {
  background: var(--red);
  animation: pulse-btn 1.2s infinite;
}
@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248,113,113,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(248,113,113,0); }
}

/* ── Mobile / iOS otimizações ────────────────────────────────────── */
@media (max-width: 768px) {
  /* Previne zoom automático no iOS quando input tem font-size < 16px */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Tap targets mínimos (44px) para todos os botões e links interativos */
  .btn, button, a.btn, [role="button"] {
    min-height: 44px;
  }

  /* Safe area para iPhone com notch/Dynamic Island */
  .app-shell {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Tabela de itens NLP: scroll horizontal se não couber */
  .nlp-itens-tabela {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* Modal NLP: ocupa mais tela no celular */
  .nlp-modal-overlay {
    padding: 0.75rem;
    align-items: flex-end; /* sobe do rodapé no mobile */
  }
  .nlp-modal {
    max-height: 88dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  /* Formulário manual: 1 coluna no celular */
  .form-grid {
    grid-template-columns: 1fr;
  }

  /* Nav pills: scroll horizontal se não couberem */
  .nav-pills {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
}

/* ── Utilities ───────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--txt2); }
.text-sucesso { color: var(--green) !important; }
.text-erro   { color: var(--red); }
.text-accent { color: var(--accent-light); }
.mt-05 { margin-top: 0.5rem; }
.mt-1  { margin-top: 1rem; }
.mt-15 { margin-top: 1.5rem; }
.mb-05 { margin-bottom: 0.5rem; }
.mb-1  { margin-bottom: 1rem; }
.w-full { width: 100%; }
.mono   { font-family: var(--mono); }

/* ══════════════════════════════════════════════════════════════════
   Kim's Papelaria — Refinamento Visual
   Puramente estético. Nenhuma lógica, ID, função ou binding alterado.
   ══════════════════════════════════════════════════════════════════ */

/* ── Atmosfera de fundo — gradiente ambiente sutil ───────────────── */
body {
  background-image:
    radial-gradient(ellipse 70% 55% at 18% -8%,  rgba(99,102,241,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 82% 108%, rgba(52,211,153,0.04)  0%, transparent 50%);
}

/* ── Topbar — borda inferior com brilho accent ───────────────────── */
.topbar {
  box-shadow: 0 1px 0 rgba(99,102,241,0.1), 0 4px 24px rgba(0,0,0,0.25);
}

/* Brand — gradiente índigo→turquesa em "Papelaria" */
.topbar-brand {
  letter-spacing: -0.035em;
}
.topbar-brand em {
  background: linear-gradient(125deg, #a5b4fc 0%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav link ativo — gradiente com micro-sombra */
.nav-link.ativo {
  background: linear-gradient(135deg, var(--accent) 0%, #4338ca 100%);
  box-shadow: 0 1px 8px rgba(99,102,241,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
}

/* ── Relógio — mais discreto, sem fundo ──────────────────────────── */
.clock {
  background: transparent;
  border-color: rgba(255,255,255,0.04);
  font-size: 0.74rem;
  color: var(--txt3);
  letter-spacing: 0.04em;
}

/* ── Tipografia — hierarquia mais firme ──────────────────────────── */
.page-header h1 {
  letter-spacing: -0.045em;
  line-height: 1.15;
}
.page-header p {
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

/* ── Cards — superfície com gradiente de profundidade ───────────── */
.card {
  background: linear-gradient(160deg, #161921 0%, #131620 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.025) inset;
}
.card:hover {
  border-color: rgba(255,255,255,0.09);
}

/* Card title — barra accent com gradiente */
.card-title::before {
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
}

/* ── Card de áudio — hero visual mais atmosférico ────────────────── */
.audio-card-principal {
  background: linear-gradient(160deg, #181c2c 0%, #111420 100%);
  border-color: rgba(99,102,241,0.2);
  padding: 3rem 2rem 2.5rem;
  gap: 1.75rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.025) inset, inset 0 -1px 0 rgba(99,102,241,0.08);
}

/* ── Botão mic — anéis ambiente (box-shadow, não recortado por overflow) */
.mic-btn {
  box-shadow:
    0 0 0 16px rgba(99,102,241,0.055),
    0 0 0 32px rgba(99,102,241,0.025),
    var(--shadow-lg);
}
.mic-btn:hover {
  box-shadow:
    0 0 0 16px rgba(99,102,241,0.1),
    0 0 0 32px rgba(99,102,241,0.05),
    0 0 0 48px rgba(99,102,241,0.02),
    var(--shadow-lg);
}

/* Botão parar — anéis vermelhos durante gravação */
.mic-btn-parar {
  box-shadow:
    0 0 0 16px rgba(239,68,68,0.07),
    0 0 0 32px rgba(239,68,68,0.03),
    var(--shadow-lg);
  animation: mic-pulse 1.4s infinite;
}

/* ── Divisor "ou" — pílula refinada ──────────────────────────────── */
.audio-ou span {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 0.18rem 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

/* ── Input texto rápido — estilo app ────────────────────────────── */
.texto-rapido-input {
  border-radius: var(--radius-lg);
  padding: 0.78rem 1.1rem;
  font-size: 0.9rem;
}
.texto-rapido-input:focus {
  background: var(--surface2);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Botão "Analisar →" — primário com gradiente */
.texto-rapido-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #4338ca 100%);
  border: none;
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 0.78rem 1.35rem;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 12px rgba(99,102,241,0.32), inset 0 1px 0 rgba(255,255,255,0.12);
}
.texto-rapido-btn:hover {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(99,102,241,0.45), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ── Formulário manual — toggle mais refinado ────────────────────── */
.card-manual-toggle {
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.card-manual-toggle:hover { color: var(--txt); }

/* ── Lista de lançamentos — itens com mais respiro ───────────────── */
.item-linha {
  padding: 0.95rem 0.25rem;
  border-radius: var(--radius-sm);
  transition: background 0.12s, padding 0.12s;
}
.item-linha:hover { background: rgba(255,255,255,0.025); }
.item-nome {
  letter-spacing: -0.01em;
}
.item-valor {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.item-sub { font-size: 0.77rem; }

/* ── Stat cards — número mais impactante ─────────────────────────── */
.stat-valor {
  font-size: 1.6rem;
  letter-spacing: -0.045em;
  line-height: 1;
}
.stat-label { font-size: 0.7rem; }

/* ── Botão primário — brilho premium ─────────────────────────────── */
.btn-primary {
  box-shadow: 0 2px 12px rgba(99,102,241,0.28), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(99,102,241,0.48), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ── Modais — superfície mais profunda ───────────────────────────── */
.modal, .nlp-modal {
  background: linear-gradient(145deg, #161921 0%, #131620 100%);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.035) inset;
}

/* ── Toasts — mais densos e refinados ────────────────────────────── */
.toast {
  background: #1a1d2c;
  border-color: rgba(255,255,255,0.07);
}

/* ── Login — atmosfera mais rica ─────────────────────────────────── */
.login-page::before {
  width: 900px; height: 900px;
  top: -38%;
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 65%);
}
.login-box {
  background: linear-gradient(145deg, #161921 0%, #131620 100%);
  box-shadow: 0 32px 80px rgba(0,0,0,0.65), 0 1px 0 rgba(255,255,255,0.04) inset;
}
.login-logo .brand-icon {
  box-shadow: 0 8px 28px rgba(99,102,241,0.4), 0 1px 0 rgba(255,255,255,0.12) inset;
}

/* ── Closing cards — borda accent no hover mais nítida ───────────── */
.closing-card::before {
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  border-radius: 0 2px 2px 0;
}

/* ── Stat card — linha accent no hover ───────────────────────────── */
.stat-card::after {
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
}

/* ── Mobile refinements ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .audio-card-principal {
    padding: 2.25rem 1.25rem 2rem;
    gap: 1.5rem;
  }
  /* Anéis menores no mobile para caber melhor */
  .mic-btn {
    box-shadow:
      0 0 0 12px rgba(99,102,241,0.06),
      0 0 0 24px rgba(99,102,241,0.025),
      var(--shadow-lg);
  }
  .page-header h1 {
    font-size: 1.45rem;
  }
}
