/* ============================================================
   PUDO LOGÍSTICA — Design System
   Dark Mode com acentos em azul (#3B82F6)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Cores base */
  --bg-900:    #0a0f1e;
  --bg-800:    #0f1629;
  --bg-700:    #141d35;
  --bg-600:    #1a2540;
  --bg-500:    #1e2d4f;
  --bg-card:   #121929;
  --bg-hover:  #1c2740;

  /* Azul primário */
  --blue-600:  #2563eb;
  --blue-500:  #3b82f6;
  --blue-400:  #60a5fa;
  --blue-300:  #93c5fd;
  --blue-glow: rgba(59, 130, 246, 0.25);

  /* Estado */
  --green-500: #22c55e;
  --green-400: #4ade80;
  --yellow-500:#eab308;
  --yellow-400:#facc15;
  --red-500:   #ef4444;
  --red-400:   #f87171;
  --orange-500:#f97316;
  --purple-500:#a855f7;

  /* Texto */
  --text-100:  #f1f5f9;
  --text-200:  #cbd5e1;
  --text-300:  #94a3b8;
  --text-400:  #64748b;
  --text-500:  #475569;

  /* Bordas */
  --border:    rgba(255, 255, 255, 0.07);
  --border-md: rgba(255, 255, 255, 0.12);

  /* Sidebar */
  --sidebar-w: 260px;
  --sidebar-collapsed: 72px;

  /* Radius & Shadow */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px var(--blue-glow);

  /* Transições */
  --transition: 0.2s ease;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-900);
  color: var(--text-100);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--blue-400); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-300); }

img { max-width: 100%; height: auto; display: block; }

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-800); }
::-webkit-scrollbar-thumb { background: var(--bg-600); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-600); }

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

/* ─── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  min-height: 72px;
}

.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

.sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-100);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.sidebar-logo-sub {
  font-size: 10px;
  color: var(--text-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-500);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 16px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-300);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-100);
  background: var(--bg-hover);
  border-left-color: var(--blue-600);
}

.nav-item.active {
  color: var(--blue-400);
  background: var(--blue-glow);
  border-left-color: var(--blue-500);
}

.nav-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  font-size: 13.5px;
  font-weight: 500;
}

.nav-badge {
  margin-left: auto;
  background: var(--blue-600);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.sidebar-user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue-600), var(--purple-500));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-400);
}

/* ─── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}

/* ─── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-100);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-400);
}

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

.topbar-btn {
  width: 36px; height: 36px;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-300);
  transition: all var(--transition);
  text-decoration: none;
  font-size: 16px;
}

.topbar-btn:hover {
  background: var(--bg-hover);
  color: var(--text-100);
  border-color: var(--border-md);
}

.topbar-notif {
  position: relative;
}

.topbar-notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--red-500);
  width: 16px; height: 16px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-card);
}

/* ─── PAGE ───────────────────────────────────────────────── */
.page {
  padding: 28px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-100);
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-400);
  margin-top: 4px;
}

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-100);
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-400);
  margin-top: 2px;
}

/* ─── STAT CARDS ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-color, var(--blue-500));
}

.stat-card:hover {
  border-color: var(--border-md);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.stat-icon {
  width: 40px; height: 40px;
  background: color-mix(in srgb, var(--stat-color, var(--blue-500)) 15%, transparent);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-100);
  line-height: 1;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-trend {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-trend.up   { color: var(--green-400); }
.stat-trend.down { color: var(--red-400); }

/* ─── BOTÕES ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--blue-600);
  color: #fff;
  border-color: var(--blue-600);
}
.btn-primary:hover { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text-200);
  border-color: var(--border-md);
}
.btn-outline:hover { background: var(--bg-hover); color: var(--text-100); }

.btn-danger {
  background: var(--red-500);
  color: #fff;
  border-color: var(--red-500);
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

.btn-success {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}
.btn-success:hover { background: var(--green-500); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-300);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text-100); background: var(--bg-hover); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; justify-content: center; }

/* ─── FORMULÁRIOS ────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-300);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.form-label .required { color: var(--red-400); margin-left: 3px; }

.form-control {
  width: 100%;
  background: var(--bg-700);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  color: var(--text-100);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--blue-500);
  background: var(--bg-600);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.form-control::placeholder { color: var(--text-500); }

.form-control.is-invalid { border-color: var(--red-500); }
.form-control.is-valid   { border-color: var(--green-500); }

.form-error {
  font-size: 12px;
  color: var(--red-400);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-500);
  margin-top: 6px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  gap: 16px;
}
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* ─── TABELA ─────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead {
  background: var(--bg-700);
}

thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-400);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 13px 16px;
  color: var(--text-200);
  vertical-align: middle;
}

/* ─── BADGES DE STATUS ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-ativo    { background: rgba(34,197,94,.15);  color: var(--green-400); }
.badge-inativo  { background: rgba(100,116,139,.15); color: var(--text-400); }
.badge-em-rota  { background: rgba(59,130,246,.15);  color: var(--blue-400); }
.badge-finalizado { background: rgba(168,85,247,.15); color: var(--purple-500); }
.badge-pendente { background: rgba(234,179,8,.15);   color: var(--yellow-400); }
.badge-problema { background: rgba(239,68,68,.15);   color: var(--red-400); }
.badge-admin    { background: rgba(239,68,68,.15);   color: var(--red-400); }
.badge-gestor   { background: rgba(249,115,22,.15);  color: var(--orange-500); }
.badge-motorista { background: rgba(59,130,246,.15); color: var(--blue-400); }

/* ─── ALERTAS/TOASTS ─────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.3); color: var(--green-400); }
.alert-error   { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.3); color: var(--red-400); }
.alert-warning { background: rgba(234,179,8,.12); border-color: rgba(234,179,8,.3); color: var(--yellow-400); }
.alert-info    { background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.3); color: var(--blue-400); }

.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.modal-backdrop.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 16px; font-weight: 700; color: var(--text-100); }

.modal-close {
  width: 30px; height: 30px;
  background: var(--bg-700);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-400);
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-100); }

.modal-body    { padding: 24px; }
.modal-footer  { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── PAGINAÇÃO ──────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding-top: 20px;
}

.page-link {
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-300);
  background: var(--bg-700);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.page-link:hover { background: var(--bg-hover); color: var(--text-100); }
.page-link.active { background: var(--blue-600); color: white; border-color: var(--blue-600); }
.page-link:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── PROGRESS BAR ────────────────────────────────────────── */
.progress-wrap {
  background: var(--bg-700);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-400));
  transition: width 0.4s ease;
  position: relative;
}

.progress-bar.green { background: linear-gradient(90deg, #16a34a, var(--green-400)); }
.progress-bar.orange { background: linear-gradient(90deg, #ea580c, var(--orange-500)); }
.progress-bar.red   { background: linear-gradient(90deg, #dc2626, var(--red-400)); }

/* ─── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-400);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-300);
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 13px;
  color: var(--text-500);
  max-width: 320px;
  margin: 0 auto 20px;
}

/* ─── SEARCH BAR ──────────────────────────────────────────── */
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-500);
  font-size: 15px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-700);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-100);
  padding: 9px 14px 9px 36px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}

.search-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.search-input::placeholder { color: var(--text-500); }

/* ─── CHIPS / FILTROS ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.chip {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-md);
  background: var(--bg-700);
  color: var(--text-300);
  transition: all var(--transition);
}

.chip:hover { background: var(--bg-hover); color: var(--text-100); }
.chip.active { background: var(--blue-glow); color: var(--blue-400); border-color: var(--blue-500); }

/* ─── UTILS ──────────────────────────────────────────────── */
.text-muted  { color: var(--text-400); }
.text-small  { font-size: 12px; }
.text-bold   { font-weight: 700; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.w-full { width: 100%; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ─── TOAST NOTIFICATIONS ────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  pointer-events: all;
  animation: toast-in 0.3s ease forwards;
  font-size: 13.5px;
  font-weight: 500;
}

.toast.removing { animation: toast-out 0.3s ease forwards; }

.toast-success { border-left: 4px solid var(--green-500); }
.toast-error   { border-left: 4px solid var(--red-500); }
.toast-warning { border-left: 4px solid var(--yellow-500); }
.toast-info    { border-left: 4px solid var(--blue-500); }

@keyframes toast-in  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

/* ─── LOADING SPINNER ────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar-logo-text,
  .sidebar-logo-sub,
  .nav-label,
  .nav-badge,
  .nav-section-label,
  .sidebar-user-name,
  .sidebar-user-role { display: none; }
  .sidebar-logo { justify-content: center; padding: 20px 0; }
  .nav-item { justify-content: center; padding: 12px; }
  .main-content { margin-left: var(--sidebar-collapsed); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
  .sidebar.open { transform: translateX(0); }
  .sidebar .nav-label,
  .sidebar .nav-badge,
  .sidebar .nav-section-label,
  .sidebar .sidebar-logo-text,
  .sidebar .sidebar-logo-sub,
  .sidebar .sidebar-user-name,
  .sidebar .sidebar-user-role { display: block; }
  .sidebar .sidebar-logo { justify-content: flex-start; padding: 24px 20px; }
  .sidebar .nav-item { justify-content: flex-start; padding: 10px 20px; }
  .main-content { margin-left: 0; }
  .page { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row-2,
  .form-row-3,
  .form-row-4 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .topbar { padding: 0 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ─── ANIMAÇÕES ──────────────────────────────────────────── */
.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ─── ONLINE INDICATOR ────────────────────────────────────── */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.online  { background: var(--green-400); box-shadow: 0 0 6px var(--green-400); animation: pulse 2s infinite; }
.status-dot.away    { background: var(--yellow-400); }
.status-dot.offline { background: var(--text-500); }
