/* ============================================================
   ValidadeApp - CSS Principal
   Design: Industrial Utilitarian + Mobile-First
   Fonte: Plus Jakarta Sans
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; line-height: 1.5; min-height: 100vh; overflow-x: hidden; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --green:       #16a34a;
  --green-dark:  #15803d;
  --green-light: #dcfce7;
  --green-xlight:#f0fdf4;
  --yellow:      #ca8a04;
  --yellow-light:#fef9c3;
  --red:         #dc2626;
  --red-light:   #fee2e2;
  --blue:        #2563eb;
  --blue-light:  #dbeafe;
  --gray-50:     #f9fafb;
  --gray-100:    #f3f4f6;
  --gray-200:    #e5e7eb;
  --gray-300:    #d1d5db;
  --gray-400:    #9ca3af;
  --gray-500:    #6b7280;
  --gray-600:    #4b5563;
  --gray-700:    #374151;
  --gray-800:    #1f2937;
  --gray-900:    #111827;

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 2px 8px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 24px rgba(0,0,0,.14);
  --transition:  all .18s ease;
  --sidebar-w:   260px;
}

/* ── Tema Claro ─────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:           #f4f6f9;
  --surface:      #ffffff;
  --surface-2:    #f8fafc;
  --border:       #e5e7eb;
  --text:         #111827;
  --text-2:       #4b5563;
  --text-3:       #9ca3af;
  --sidebar-bg:   #111827;
  --sidebar-text: #e5e7eb;
  --sidebar-hover:#1f2937;
  --sidebar-active:#16a34a;
}

/* ── Tema Escuro ────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:           #0f1117;
  --surface:      #1a1d27;
  --surface-2:    #22263a;
  --border:       #2e3347;
  --text:         #f1f5f9;
  --text-2:       #94a3b8;
  --text-3:       #64748b;
  --sidebar-bg:   #0d1117;
  --sidebar-text: #cbd5e1;
  --sidebar-hover:#161b26;
  --sidebar-active:#16a34a;
}

body { background: var(--bg); color: var(--text); }

/* ── Splash ─────────────────────────────────────────────────── */
.splash {
  position: fixed; inset: 0; background: #16a34a;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .4s ease;
}
.splash.hide { opacity: 0; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.splash-title { color: #fff; font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.splash-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }

@media (min-width: 1024px) {
  .sidebar { transform: translateX(0); box-shadow: none; }
  .main-wrapper { margin-left: var(--sidebar-w); }
  .overlay { display: none !important; }
  .sidebar-close { display: none !important; }
  #menuBtn { display: none !important; }
}

.sidebar-header {
  padding: 20px 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: #fff; }
.sidebar-close { color: var(--sidebar-text); font-size: 18px; padding: 4px 8px; border-radius: var(--radius-sm); transition: var(--transition); }
.sidebar-close:hover { background: rgba(255,255,255,.1); }

.sidebar-nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--sidebar-text);
  transition: var(--transition);
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-divider { height: 1px; background: rgba(255,255,255,.07); margin: 6px 4px; }
.nav-item.hidden { display: none; }

.sidebar-footer {
  padding: 12px 12px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 8px;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.user-info { min-width: 0; }
.user-name { display: block; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 11px; color: var(--sidebar-text); text-transform: capitalize; }
.theme-btn { color: var(--sidebar-text); font-size: 18px; padding: 6px; border-radius: var(--radius-sm); transition: var(--transition); flex-shrink: 0; }
.theme-btn:hover { background: rgba(255,255,255,.1); }

.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 150; opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.overlay.show { opacity: 1; pointer-events: all; }

/* ── Topbar ─────────────────────────────────────────────────── */
.main-wrapper { flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  height: 58px; padding: 0 16px;
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}

.menu-btn {
  display: flex; flex-direction: column; gap: 5px;
  padding: 6px; border-radius: var(--radius-sm);
}
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

.page-title { flex: 1; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-right { display: flex; align-items: center; gap: 6px; }

.notif-btn {
  position: relative; padding: 8px; border-radius: var(--radius-sm);
  font-size: 18px; transition: var(--transition); color: var(--text-2);
}
.notif-btn:hover { background: var(--surface-2); }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  border-radius: 10px; padding: 1px 4px; min-width: 16px; text-align: center;
}
.logout-btn { padding: 8px; border-radius: var(--radius-sm); font-size: 18px; color: var(--text-2); transition: var(--transition); }
.logout-btn:hover { background: var(--red-light); color: var(--red); }

/* ── Painel de notificações ─────────────────────────────────── */
.notif-panel {
  position: absolute; top: 58px; right: 8px; width: 320px; max-width: calc(100vw - 16px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  z-index: 300; overflow: hidden;
}
.notif-panel-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; }
.notif-panel-header button { font-size: 12px; color: var(--green); font-weight: 600; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; }
.notif-item.unread { background: var(--green-xlight); }
.notif-item:last-child { border-bottom: none; }
.notif-item-icon { font-size: 18px; flex-shrink: 0; }
.notif-item-content { min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 600; }
.notif-item-msg { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.notif-item-time { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 14px; }

/* ── View Container ─────────────────────────────────────────── */
.view-container { flex: 1; padding: 16px; max-width: 1200px; width: 100%; margin: 0 auto; }
@media (min-width: 768px) { .view-container { padding: 24px; } }

/* ── Cards / Surface ────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  box-shadow: var(--shadow-sm);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 8px; }
.card-title { font-size: 15px; font-weight: 700; }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden;
  transition: var(--transition); cursor: pointer;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.stat-card.green::before  { background: var(--green); }
.stat-card.yellow::before { background: var(--yellow); }
.stat-card.red::before    { background: var(--red); }
.stat-card.blue::before   { background: var(--blue); }
.stat-icon { font-size: 22px; }
.stat-value { font-size: 28px; font-weight: 800; font-family: 'JetBrains Mono', monospace; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-2); font-weight: 500; }

/* ── Tabela ─────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: var(--surface-2); padding: 10px 14px; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }
.table-empty { text-align: center; padding: 40px; color: var(--text-3); }

/* ── Badges de status ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-green  { background: var(--green-light);  color: #15803d; }
.badge-yellow { background: var(--yellow-light); color: #92400e; }
.badge-red    { background: var(--red-light);    color: #991b1b; }
.badge-gray   { background: var(--gray-100);     color: var(--gray-600); }
.badge-blue   { background: var(--blue-light);   color: #1e40af; }

/* ── Indicador de dias ──────────────────────────────────────── */
.dias-indicator { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.dias-indicator.ok     { color: var(--green); }
.dias-indicator.aviso  { color: var(--yellow); }
.dias-indicator.critico{ color: var(--red); }
.dias-indicator.vencido{ color: var(--red); font-size: 11px; }

/* ── Formulários ────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-label .req { color: var(--red); }
.form-control {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 15px; color: var(--text); transition: var(--transition);
  width: 100%;
}
.form-control:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.form-control::placeholder { color: var(--text-3); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--text-3); }
.form-error { font-size: 11px; color: var(--red); display: none; }
.form-control.error { border-color: var(--red); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 480px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } }

/* Campo com ícone/botão interno */
.input-group { position: relative; }
.input-group .form-control { padding-right: 46px; }
.input-group-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  padding: 6px 10px; border-radius: var(--radius-sm); font-size: 16px;
  background: var(--surface-2); color: var(--text-2);
  transition: var(--transition);
}
.input-group-btn:hover { background: var(--green-light); color: var(--green); }

/* ── Botões ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius); font-size: 14px;
  font-weight: 600; transition: var(--transition); white-space: nowrap;
  min-height: 42px; cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary   { background: var(--green); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--green-dark); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--gray-400); }
.btn-danger    { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-ghost     { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm        { padding: 6px 12px; font-size: 12px; min-height: 32px; }
.btn-lg        { padding: 14px 24px; font-size: 16px; min-height: 52px; }
.btn-full      { width: 100%; }
.btn-icon      { padding: 8px; min-height: 36px; border-radius: var(--radius-sm); }

/* ── Busca ──────────────────────────────────────────────────── */
.search-bar {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap::before { content: '🔍'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; }
.search-input-wrap .form-control { padding-left: 36px; }

/* ── Filtros ────────────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 12px; background: var(--surface-2); border-radius: var(--radius);
  margin-bottom: 16px; border: 1px solid var(--border);
}
.filter-chip {
  padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: var(--transition); cursor: pointer;
}
.filter-chip.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ── Paginação ──────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text-2);
  transition: var(--transition);
}
.page-btn:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.page-btn.active { background: var(--green); border-color: var(--green); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-info { font-size: 12px; color: var(--text-3); padding: 0 8px; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 12px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.modal-box {
  position: relative; background: var(--surface);
  border-radius: var(--radius-xl); width: 100%; max-width: 520px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: slideUp .2s ease;
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } }
.modal-header { padding: 18px 20px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { font-size: 18px; color: var(--text-2); padding: 4px 8px; border-radius: var(--radius-sm); transition: var(--transition); }
.modal-close:hover { background: var(--surface-2); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Toast ──────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 16px; right: 16px; z-index: 9000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--gray-800); color: #fff;
  padding: 12px 16px; border-radius: var(--radius-lg);
  font-size: 13px; font-weight: 500; max-width: 300px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px;
  animation: toastIn .25s ease;
}
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
.toast.warning { background: var(--yellow); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } }
.toast.hide { animation: toastOut .2s ease forwards; }
@keyframes toastOut { to { transform: translateX(110%); opacity: 0; } }

/* ── Scanner ────────────────────────────────────────────────── */
.scanner-modal { position: fixed; inset: 0; z-index: 600; }
.scanner-overlay {
  position: absolute; inset: 0; background: #000;
  display: flex; flex-direction: column;
}
.scanner-header {
  padding: 16px 20px; background: rgba(0,0,0,.7);
  display: flex; justify-content: space-between; align-items: center;
  color: #fff; font-size: 16px; font-weight: 700;
}
.scanner-close { color: #fff; font-size: 24px; padding: 4px 10px; }
.scanner-wrapper { flex: 1; position: relative; overflow: hidden; }
#scannerVideo { width: 100%; height: 100%; object-fit: cover; }
.scanner-crosshair {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.scanner-crosshair::before, .scanner-crosshair::after {
  content: ''; position: absolute;
  width: 240px; height: 160px;
  border: 2px solid rgba(255,255,255,.8);
}
.scanner-crosshair::before { border-radius: 8px; }
.scanner-line {
  position: absolute; width: 220px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  animation: scanLine 2s ease-in-out infinite;
}
@keyframes scanLine { 0%,100%{transform:translateY(-60px)} 50%{transform:translateY(60px)} }
.scanner-status { padding: 12px 20px; color: #fff; text-align: center; font-size: 14px; background: rgba(0,0,0,.5); }
.scanner-manual { padding: 12px 16px; background: rgba(0,0,0,.7); display: flex; gap: 8px; }
.scanner-manual input { flex: 1; padding: 10px 14px; border-radius: var(--radius); border: 1.5px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; font-size: 14px; }
.scanner-manual input::placeholder { color: rgba(255,255,255,.5); }
.scanner-manual button { padding: 10px 16px; background: var(--green); color: #fff; border-radius: var(--radius); font-weight: 600; font-size: 14px; }

/* ── Login ──────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f1117 0%, #1a2340 50%, #0f1117 100%);
  padding: 16px;
}
.login-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 36px 32px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 32px; }
.login-logo-icon { width: 64px; height: 64px; background: var(--green); border-radius: 18px; display: flex; align-items: center; justify-content: center; }
.login-logo-icon svg { width: 36px; height: 36px; }
.login-title { font-size: 24px; font-weight: 800; }
.login-sub { font-size: 13px; color: var(--text-2); }

/* ── Dashboard ──────────────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
@media (min-width: 480px) { .quick-actions { grid-template-columns: repeat(4, 1fr); } }
.quick-btn {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  transition: var(--transition); cursor: pointer; text-align: center;
}
.quick-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-xlight); }
.quick-btn-icon { font-size: 24px; }

/* ── Utilitários ────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-16 { margin-bottom: 16px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-2); }
.text-right { text-align: right; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.section-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }

/* ── Toggle Switch ──────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--gray-300);
  border-radius: 24px; cursor: pointer; transition: .3s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px;
  left: 3px; bottom: 3px; background: #fff;
  border-radius: 50%; transition: .3s;
}
.toggle input:checked + .toggle-slider { background: var(--green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab-btn {
  padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: var(--transition); white-space: nowrap;
}
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }
.tab-btn:hover { color: var(--text); }

/* ── Loader ─────────────────────────────────────────────────── */
.loader-wrap { display: flex; justify-content: center; align-items: center; padding: 40px; }
.loader { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.empty-state-text { font-size: 13px; color: var(--text-2); margin-bottom: 20px; }

/* ── Modo Conferência ───────────────────────────────────────── */
.conf-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 8px; transition: var(--transition);
}
.conf-item.checked { background: var(--green-xlight); border-color: var(--green); }
.conf-check { width: 24px; height: 24px; flex-shrink: 0; }
.conf-info { flex: 1; min-width: 0; }
.conf-product { font-weight: 600; font-size: 14px; }
.conf-meta { font-size: 12px; color: var(--text-2); }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--gray-600); }

/* ── Responsive ajustes ─────────────────────────────────────── */
@media (max-width: 480px) {
  .modal-box { border-radius: var(--radius-lg); }
  .login-card { padding: 28px 20px; }
  .stat-value { font-size: 22px; }
  th { font-size: 11px; padding: 8px 10px; }
  td { padding: 10px; }
}

/* ── Animações de entrada ───────────────────────────────────── */
.fade-in { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .notif-btn, .logout-btn, .btn, .pagination { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
  .view-container { padding: 0 !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
