/* =====================================================
   Routhow Tecnologia — Portal de Gestão
   ===================================================== */

/* ─── Transição suave de tema ───────────────────────── */
*, *::before, *::after {
  transition:
    background-color .2s ease,
    border-color     .2s ease,
    color            .2s ease,
    box-shadow       .2s ease;
}
/* Exceção: não aplicar transição em animações e transforms */
.sidebar, .app-main, .toast, .modal, .skeleton { transition: unset; }
.sidebar  { transition: transform .25s cubic-bezier(.4,0,.2,1); }
.app-main { transition: margin-left .25s cubic-bezier(.4,0,.2,1); }
.toast    { transition: opacity .25s; }
.modal    { transition: none; }

:root {
  --sidebar-bg:       #0f172a;
  --sidebar-text:     #94a3b8;
  --sidebar-hover:    #1e293b;
  --sidebar-active:   #6366f1;
  --sidebar-border:   #1e293b;
  --sidebar-width:    260px;
  --sidebar-mini:     68px;

  --primary:          #6366f1;
  --primary-hover:    #4f46e5;
  --primary-light:    #eef2ff;

  --success:          #22c55e;
  --success-light:    #dcfce7;
  --warning:          #f59e0b;
  --warning-light:    #fef9c3;
  --danger:           #ef4444;
  --danger-light:     #fee2e2;
  --info:             #3b82f6;
  --info-light:       #dbeafe;

  --bg:               #f1f5f9;
  --card:             #ffffff;
  --text:             #1e293b;
  --text-muted:       #64748b;
  --border:           #e2e8f0;
  --input-bg:         #f8fafc;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.05);
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.05);

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

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --fs: 14px;

  --transition: 150ms ease;
}

/* ─── Tema escuro ────────────────────────────────────── */
[data-theme="dark"] {
  --bg:         #111111;
  --card:       #1c1c1c;
  --text:       #ececec;
  --text-muted: #888888;
  --border:     #2e2e2e;
  --input-bg:   #161616;

  --sidebar-bg:         #111111;
  --sidebar-hover:      #252525;
  --sidebar-border:     #2a2a2a;
  --sidebar-text:       #888888;
  --sidebar-title-color:#cccccc;
  --sidebar-name-color: #cccccc;

  --primary-light: rgba(99,102,241,.18);
  --success-light: rgba(34,197,94,.15);
  --warning-light: rgba(245,158,11,.15);
  --danger-light:  rgba(239,68,68,.15);
  --info-light:    rgba(59,130,246,.15);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.6);
  --shadow:    0 1px 3px rgba(0,0,0,.7), 0 1px 2px rgba(0,0,0,.5);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.7), 0 2px 4px -2px rgba(0,0,0,.5);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.7), 0 4px 6px -4px rgba(0,0,0,.5);
}

/* ─── Reset ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); font-size: var(--fs); color: var(--text); line-height: 1.5; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, select { font-family: var(--font); }
svg { display: block; flex-shrink: 0; }

/* ─── Utilities ─────────────────────────────────────── */
.hidden { display: none !important; }
.mt-4  { margin-top: 24px; }
.mt-2  { margin-top: 12px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.w-full { width: 100%; }

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: calc(var(--fs) - 1px);
  font-weight: 500;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled)  { background: #dc2626; }
.btn-ghost    { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover:not(:disabled)   { background: var(--bg); color: var(--text); }
.btn-full     { width: 100%; justify-content: center; padding: 11px 16px; font-size: 14px; }
.btn-sm       { padding: 5px 10px; font-size: 12px; }

/* ─── Forms ─────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: calc(var(--fs) - 1px); font-weight: 500; color: var(--text); }
.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font-size: var(--fs);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.form-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
  font-weight: 500;
}
.form-hint { font-size: 12px; color: var(--text-muted); }

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: calc(var(--fs) + 1px); font-weight: 600; }
.card-body { padding: 24px; }

/* ─── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.badge::before { content: '●'; font-size: 8px; }
.badge-online  { background: var(--success-light); color: #15803d; }
.badge-offline { background: var(--border); color: var(--text-muted); }
.badge-info    { background: var(--info-light); color: #1d4ed8; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-primary { background: var(--primary-light); color: #3730a3; }

/* ─── Table ──────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: calc(var(--fs) - 1px); }
thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8fafc; }
.td-muted { color: var(--text-muted); font-size: 12px; }
.td-mono  { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

/* ─── Stats Grid ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon.info    { background: var(--info-light);    color: var(--info); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-sub   { font-size: 11px; color: var(--text-muted); }

/* ─── Filters bar ────────────────────────────────────── */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.filters-bar .form-group { flex: 1; min-width: 140px; }
.filters-bar .form-group input,
.filters-bar .form-group select { height: 38px; padding: 0 10px; }
.filters-actions { display: flex; gap: 8px; align-items: flex-end; padding-bottom: 0; }

/* ─── Pagination ─────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.pagination-pages { display: flex; gap: 4px; }
.page-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 13px;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
}
.page-btn:hover   { background: var(--bg); }
.page-btn.active  { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ─── Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  animation: fade-in .15s ease;
}
.modal {
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  animation: slide-up .18s ease;
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--bg); color: var(--text-muted);
  font-size: 18px; line-height: 1;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--border); }
.modal-body   { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { padding: 0 24px 24px; display: flex; justify-content: flex-end; gap: 10px; }

/* ─── Modal de confirmação ───────────────────────────── */
.confirm-modal {
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}
.confirm-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.confirm-icon--danger  { background: var(--danger-light);  color: var(--danger); }
.confirm-icon--primary { background: var(--info-light);    color: var(--info); }
.confirm-body { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.confirm-title   { font-size: 17px; font-weight: 700; color: var(--text); }
.confirm-message { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.confirm-detail  { font-size: 12.5px; color: var(--danger); font-weight: 500; }
.confirm-footer  { display: flex; gap: 10px; justify-content: center; width: 100%; }
.confirm-footer .btn { min-width: 110px; justify-content: center; }

/* ─── Modal de avatar / editor de crop ──────────────── */
.avatar-modal-body {
  padding: 20px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Zona de upload / drop */
.avatar-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--bg);
}
.avatar-drop-zone:hover,
.avatar-drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.avatar-drop-zone svg { color: var(--text-muted); }
.avatar-drop-zone p   { font-size: 14px; font-weight: 500; color: var(--text); }
.avatar-drop-zone span { font-size: 12px; color: var(--text-muted); }

/* Editor (canvas + controles) */
.avatar-editor { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.avatar-canvas-wrap {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px var(--primary), 0 0 0 6px var(--primary-light);
  cursor: grab;
  user-select: none;
}
.avatar-canvas-wrap:active { cursor: grabbing; }
.avatar-canvas-wrap canvas { display: block; }

.avatar-zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 260px;
}
.avatar-zoom-row button {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 18px;
  font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
}
.avatar-zoom-row button:hover { background: var(--bg); }
.avatar-zoom-row input[type=range] {
  flex: 1;
  accent-color: var(--primary);
  height: 4px;
  cursor: pointer;
}
.avatar-swap-btn {
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.avatar-swap-btn:hover { color: var(--primary); }

/* Avatar circular no header e sidebar */
.user-avatar[data-has-avatar="true"],
.sidebar-user-avatar[data-has-avatar="true"] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ─── Toast ──────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toast-in .25s ease;
  max-width: 340px;
}
.toast.success { background: #166534; }
.toast.error   { background: #991b1b; }
.toast.info    { background: #1e40af; }

/* ─── Empty state ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 16px; opacity: .35; }
.empty-state p   { font-size: 15px; }

/* ─── Loading skeleton ───────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card {
  height: 100px;
  border-radius: var(--radius-lg);
}
.skeleton-row {
  height: 48px;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}

/* ─── Login page ─────────────────────────────────────── */
.login-page { background: #060d1a; }
.login-container {
  display: flex;
  min-height: 100vh;
}

/* Painel esquerdo — identidade corporativa */
.login-brand {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #0b1628 0%, #0f1f3d 50%, #091426 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 56px;
}

/* Efeitos de decoração geométrica de fundo */
.login-brand-deco { position: absolute; inset: 0; pointer-events: none; }
.deco-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.18) 0%, transparent 70%);
}
.deco-circle-1 { width: 560px; height: 560px; top: -180px; right: -160px; }
.deco-circle-2 { width: 360px; height: 360px; bottom: -100px; left: -80px; background: radial-gradient(circle, rgba(79,70,229,.12) 0%, transparent 70%); }
.deco-circle-3 { width: 200px; height: 200px; top: 40%; left: 30%; background: radial-gradient(circle, rgba(99,102,241,.08) 0%, transparent 70%); }

/* Grade sutil de fundo */
.login-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.brand-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 400px;
}

/* Logo composto: ícone + texto */
.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}
.brand-logo-mark {
  width: 52px;
  height: 52px;
  color: var(--primary);
  flex-shrink: 0;
}
.brand-logo-mark svg { width: 100%; height: 100%; }
.brand-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #fff;
}
.brand-name-sub {
  font-size: 13px;
  font-weight: 400;
  color: #6366f1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand-divider {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  margin-bottom: 28px;
  border-radius: 2px;
}

.brand-tagline {
  font-size: 20px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 12px;
  line-height: 1.3;
}
.brand-description {
  font-size: 14px;
  color: #64748b;
  line-height: 1.65;
  margin-bottom: 40px;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.brand-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.4;
}
.feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

/* Painel direito — formulário */
.login-form-panel {
  width: 560px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 72px;
  background: #ffffff;
  border-left: 1px solid rgba(0,0,0,.06);
  position: relative;
}

/* Linha de acento no topo do painel de formulário */
.login-form-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #818cf8);
}

.login-form-container { width: 100%; max-width: 420px; }

.login-header { margin-bottom: 36px; }
.login-header-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.login-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -.02em;
}
.login-header-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* Campos com ícone */
.input-icon-wrap {
  position: relative;
  width: 100%;
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}
.input-icon-wrap input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-icon-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.login-form { display: flex; flex-direction: column; gap: 20px; }
.login-form .btn-primary {
  margin-top: 4px;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  box-shadow: 0 4px 14px rgba(99,102,241,.4);
  transition: opacity .15s, box-shadow .15s, transform .1s;
}
.login-form .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  opacity: .92;
  box-shadow: 0 6px 18px rgba(99,102,241,.5);
  transform: translateY(-1px);
}
.login-form .btn-primary:active:not(:disabled) { transform: translateY(0); }

.login-footer {
  margin-top: 36px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Link "Esqueceu sua senha?" */
.login-forgot-wrap { text-align: right; margin-top: -4px; }
.login-forgot-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.login-forgot-link:hover { text-decoration: underline; }

/* Caixas de sucesso / erro nas páginas de recuperação */
.login-success-box {
  text-align: center;
  padding: 32px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.login-success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #d1fae5;
  color: #059669;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.login-success-box h3 { margin: 0 0 8px; font-size: 18px; color: var(--text); }
.login-success-box p  { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.login-error-box  { border-color: #fecaca; }
.login-error-icon { background: #fee2e2; color: #dc2626; }

/* Responsivo */
@media (max-width: 860px) {
  .login-brand { display: none; }
  .login-form-panel { width: 100%; padding: 60px 48px; }
}
@media (max-width: 480px) {
  .login-form-panel { padding: 40px 24px; }
  .login-form-container { max-width: 100%; }
}

/* ─── App layout ─────────────────────────────────────── */
.app-page { background: var(--bg); }
.app-layout { display: flex; min-height: 100vh; overflow-x: hidden; }

/* Overlay — cobre o conteúdo quando sidebar expande no mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}
.sidebar-overlay.visible { display: block; }

/* ── Sidebar ─────────────────────────────── */
.sidebar {
  width: var(--sidebar-mini);        /* começa colapsada */
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  border-right: 1px solid var(--sidebar-border);
  overflow: hidden;
  transition: width .25s cubic-bezier(.4,0,.2,1);
}
.sidebar.expanded { width: var(--sidebar-width); }

/* Header da sidebar */
.sidebar-header {
  display: flex;
  align-items: center;
  height: 60px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--sidebar-border);
  overflow: hidden;
}

/* Botão hamburger — dentro da sidebar */
.sidebar-toggle {
  width: var(--sidebar-mini);
  min-width: var(--sidebar-mini);
  height: 60px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.sidebar-toggle:hover { background: var(--sidebar-hover); color: #fff; }

/* Brand: logo + nome (aparece quando expande) */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 16px;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-logo  { font-size: 20px; color: var(--primary); flex-shrink: 0; }
.sidebar-title { font-size: 13px; font-weight: 700; color: var(--sidebar-title-color, #e8eaf0); letter-spacing: .08em; }

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}
.nav-item {
  display: flex;
  align-items: center;
  height: 42px;
  border-radius: var(--radius);
  font-size: calc(var(--fs) - 1px);
  font-weight: 500;
  color: var(--sidebar-text);
  white-space: nowrap;
  overflow: hidden;
  transition: background var(--transition), color var(--transition);
  /* padding lateral no modo expandido */
  padding: 0 12px;
  gap: 12px;
}
.nav-item svg:not(.nav-chevron) {
  width: 18px; height: 18px;
  flex-shrink: 0;
}

/* Rótulo: visível só quando expandida */
.nav-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity .15s ease, width 0s .15s;
  pointer-events: none;
}
.sidebar.expanded .nav-label {
  opacity: 1;
  width: auto;
  overflow: visible;
  transition: opacity .2s ease .05s;
  pointer-events: auto;
}

/* Modo expandido: fundo completo */
.sidebar.expanded .nav-item:hover  { background: var(--sidebar-hover); color: #fff; }
.sidebar.expanded .nav-item.active { background: var(--sidebar-active); color: #fff; }

/* Modo mini: ícone centralizado + pill via pseudo-elemento */
.sidebar:not(.expanded) .nav-item {
  justify-content: center;
  padding: 0;
  gap: 0;
  position: relative;
}
.sidebar:not(.expanded) .nav-chevron { margin-left: 0; }
.sidebar:not(.expanded) .nav-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  transition: background var(--transition);
  z-index: 0;
}
.sidebar:not(.expanded) .nav-item svg:not(.nav-chevron) { position: relative; z-index: 1; }
.sidebar:not(.expanded) .nav-item:hover         { background: transparent; color: #fff; }
.sidebar:not(.expanded) .nav-item:hover::before { background: var(--sidebar-hover); }
.sidebar:not(.expanded) .nav-item.active         { background: transparent; color: #fff; }
.sidebar:not(.expanded) .nav-item.active::before { background: var(--sidebar-active); }

/* Rodapé */
.sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  position: relative;
}
.sidebar-version-tag {
  font-size: 10px;
  color: var(--sidebar-text);
  opacity: 0;
  width: 0;
  overflow: hidden;
  text-align: right;
  padding-right: 4px;
  pointer-events: none;
  transition: opacity .15s ease;
  white-space: nowrap;
  align-self: flex-end;
}
.sidebar.expanded .sidebar-version-tag {
  opacity: .4;
  width: auto;
  overflow: visible;
}
.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  transition: background var(--transition);
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.sidebar.expanded .sidebar-user { justify-content: flex-start; padding: 0 8px; }

.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 0;
  overflow: hidden;
  opacity: 0;
  margin-left: 0;
  transition: opacity .15s ease, width 0s .15s, margin-left 0s .15s;
}
.sidebar.expanded .sidebar-user-info {
  opacity: 1;
  width: auto;
  overflow: visible;
  margin-left: 10px;
  transition: opacity .2s ease .05s;
}
.sidebar-user-info span:first-child {
  font-size: 13px; font-weight: 500;
  color: var(--sidebar-name-color, #e2e8f0);
  overflow: hidden; text-overflow: ellipsis;
}
.sidebar-version { font-size: 11px; color: var(--sidebar-text); }

.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  width: 100%;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  overflow: hidden;
  transition: background var(--transition), color var(--transition);
}
.sidebar.expanded .sidebar-logout { justify-content: center; padding: 0 12px; gap: 10px; }
.sidebar-logout svg { flex-shrink: 0; width: 18px; height: 18px; }
.sidebar-logout:hover {
  background: rgba(239,68,68,.15);
  color: #fca5a5;
}
#prefsBtn:hover,
#prefsBtn.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* ── Conteúdo principal ──────────────────── */
.app-main {
  margin-left: var(--sidebar-mini);
  flex: 1;
  min-width: 0;
  max-width: calc(100vw - var(--sidebar-mini));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  transition: margin-left .25s cubic-bezier(.4,0,.2,1), max-width .25s cubic-bezier(.4,0,.2,1);
}
.app-main.expanded {
  margin-left: var(--sidebar-width);
  max-width: calc(100vw - var(--sidebar-width));
}

.app-header {
  position: sticky; top: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.app-header h1  { font-size: 18px; font-weight: 600; }
.header-right   { display: flex; align-items: center; gap: 12px; }

.user-greeting {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
@media (max-width: 480px) { .user-greeting { display: none; } }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  transition: box-shadow var(--transition);
}
.user-avatar:hover {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent);
}

/* Botão de tema (no header) */
.hamburger-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.hamburger-btn:hover { background: var(--bg); color: var(--text); }

.app-content { padding: 28px; flex: 1; min-width: 0; overflow-x: auto; }

/* Mobile: sidebar sobrepõe o conteúdo ao expandir */
@media (max-width: 720px) {
  .app-main {
    margin-left: var(--sidebar-mini) !important;
    max-width: calc(100vw - var(--sidebar-mini)) !important;
  }
  .sidebar.expanded { box-shadow: var(--shadow-lg); }
}

/* ─── Dark mode: overrides de telas com cores fixas ─── */
[data-theme="dark"] .login-form-panel {
  background: #1c1c1c;
  border-left-color: #2e2e2e;
}
[data-theme="dark"] .login-header h2 { color: #f1f5f9; }
[data-theme="dark"] .login-header-sub { color: #94a3b8; }
[data-theme="dark"] .login-footer { color: #64748b; border-top-color: #334155; }
[data-theme="dark"] .login-success-box { background: #1c1c1c; border-color: #2e2e2e; }
[data-theme="dark"] .login-success-icon { background: #064e3b; color: #34d399; }
[data-theme="dark"] .login-error-box   { border-color: #7f1d1d; }
[data-theme="dark"] .login-error-icon  { background: #7f1d1d; color: #f87171; }
[data-theme="dark"] .form-group label { color: #e2e8f0; }
[data-theme="dark"] .form-group input {
  background: #161616;
  border-color: #2e2e2e;
  color: #ececec;
}
[data-theme="dark"] .form-group input::placeholder { color: #475569; }
[data-theme="dark"] .input-icon { color: #64748b; }

/* ─── Views ──────────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; }

/* ─── Animations ─────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════════
   SIDEBAR — Submenu Estatísticas
   ═══════════════════════════════════════════════════════ */
.nav-group { display: flex; flex-direction: column; }

.nav-chevron {
  margin-left: auto;
  flex-shrink: 0;
  width: 0;
  height: 14px;
  overflow: hidden;
  opacity: 0;
  transition: transform .2s ease, opacity .15s ease, width 0s .15s;
}
.sidebar.expanded .nav-chevron {
  width: 14px;
  overflow: visible;
  opacity: .5;
  transition: transform .2s ease, opacity .15s ease .05s;
}
.nav-group.open .nav-chevron { transform: rotate(180deg); }

.nav-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s cubic-bezier(.4,0,.2,1);
}
.sidebar.expanded .nav-group.open .nav-submenu { max-height: 180px; }

.nav-sub-item {
  display: flex;
  align-items: center;
  height: 34px;
  margin: 1px 8px;
  padding: 0 12px 0 42px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--sidebar-text);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.nav-sub-item:hover  { background: var(--sidebar-hover); color: #fff; }
.nav-sub-item.active { color: var(--primary); background: rgba(99,102,241,.12); font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   ESTATÍSTICAS — Tabs e toolbar
   ═══════════════════════════════════════════════════════ */
.est-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  width: fit-content;
  flex-wrap: wrap;
}
.est-tab {
  padding: 7px 18px;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.est-tab.active { background: var(--primary); color: #fff; }
.est-tab:not(.active):hover { background: var(--bg); color: var(--text); }

.est-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.est-subtitle { font-size: 13px; color: var(--text-muted); }

.periodo-sel { display: flex; gap: 4px; }
.periodo-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text-muted);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.periodo-btn.active   { background: var(--primary); color: #fff; border-color: var(--primary); }
.periodo-btn:not(.active):hover { border-color: var(--primary); color: var(--primary); }

/* ═══════════════════════════════════════════════════════
   RANKINGS — grid e linhas
   ═══════════════════════════════════════════════════════ */
.rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 860px) { .rank-grid { grid-template-columns: 1fr; } }

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.rank-row:last-child { border-bottom: none; }

.rank-pos {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rank-gold   { background: #fef3c7; color: #b45309; }
.rank-silver { background: #f1f5f9; color: #475569; }
.rank-bronze { background: #fef2e7; color: #92400e; }

[data-theme="dark"] .rank-gold   { background: rgba(251,191,36,.2);  color: #fbbf24; }
[data-theme="dark"] .rank-silver { background: rgba(148,163,184,.15); color: #94a3b8; }
[data-theme="dark"] .rank-bronze { background: rgba(180,83,9,.2);     color: #fb923c; }

.rank-name {
  font-size: 13px; font-weight: 500;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-bar-wrap {
  flex: 1; height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  min-width: 40px;
}
.rank-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}
.rank-vals { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; min-width: 56px; }
.rank-val  { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.2; }
.rank-unit { font-size: 10px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   HORA DO DIA — gráfico de barras CSS
   ═══════════════════════════════════════════════════════ */
.hora-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100px;
}
.hora-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  cursor: default;
}
.hora-bar-fill {
  width: 100%;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  opacity: .65;
  min-height: 2px;
  transition: opacity var(--transition);
}
.hora-bar-col:hover .hora-bar-fill { opacity: 1; }
.hora-bar-label {
  font-size: 8px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   POR TIPO — cards
   ═══════════════════════════════════════════════════════ */
.tipos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.tipo-card { padding: 20px; }
.tipo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.tipo-pct { font-size: 20px; font-weight: 700; color: var(--primary); }
.tipo-stats { display: flex; gap: 16px; margin-bottom: 14px; }
.tipo-stat  { display: flex; flex-direction: column; gap: 2px; }
.tipo-stat span  { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.2; }
.tipo-stat small { font-size: 10px; color: var(--text-muted); }
.tipo-bar-wrap {
  width: 100%; height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.tipo-bar { height: 100%; background: var(--primary); border-radius: 999px; }

/* ═══════════════════════════════════════════════════════
   TAMANHO DE FONTE — escalonamento global
   ═══════════════════════════════════════════════════════ */
[data-fontsize="pequeno"] { --fs: 12px; }
[data-fontsize="medio"]   { --fs: 14px; }
[data-fontsize="grande"]  { --fs: 16px; }

/* ═══════════════════════════════════════════════════════
   PREFERÊNCIAS — página
   ═══════════════════════════════════════════════════════ */
.pref-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pref-page-header { text-align: center; }
.pref-page-header h2 { font-size: 20px; font-weight: 700; color: var(--text); }

.pref-card { overflow: hidden; }

/* Linha de configuração — 2 colunas */
.pref-row {
  display: grid;
  grid-template-columns: clamp(160px, 22%, 260px) 1fr;
  gap: 32px;
  padding: 24px 28px;
  align-items: start;
}
.pref-row-info        { display: flex; flex-direction: column; gap: 4px; }
.pref-row-info strong { font-size: 14px; font-weight: 600; color: var(--text); }
.pref-row-info span   { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.pref-row-control     { display: flex; flex-direction: column; gap: 12px; }
.pref-divider         { border: none; border-top: 1px solid var(--border); margin: 0; }

/* Tema — cards */
.pref-tema-grid {
  display: flex;
  gap: 12px;
}
.pref-tema-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  width: 130px;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  text-align: left;
}
.pref-tema-card:hover  { border-color: var(--primary); }
.pref-tema-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.13); }
.pref-tema-label             { display: flex; flex-direction: column; gap: 1px; }
.pref-tema-label strong      { font-size: 12px; font-weight: 600; color: var(--text); }
.pref-tema-label span        { font-size: 10px; color: var(--text-muted); }

/* Mini preview */
.pref-tema-preview {
  display: flex;
  height: 52px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.pref-tema-preview--light  { background: #f1f5f9; }
.pref-tema-preview--dark   { background: #111111; }
.pref-tema-preview--system { background: linear-gradient(135deg, #f1f5f9 50%, #111111 50%); }
.pref-tema-preview--icon   { align-items: center; justify-content: center; }
.ptpv-system-icon          { color: var(--primary); filter: drop-shadow(0 1px 3px rgba(0,0,0,.25)); }

.ptpv-sidebar { width: 28%; height: 100%; }
.pref-tema-preview--light  .ptpv-sidebar { background: #0f172a; }
.pref-tema-preview--dark   .ptpv-sidebar { background: #1c1c1c; border-right: 1px solid #2e2e2e; }
.pref-tema-preview--system .ptpv-sidebar { background: #0f172a; }

.ptpv-body {
  flex: 1; padding: 5px;
  display: flex; flex-direction: column; gap: 4px;
}
.ptpv-topbar { height: 8px; border-radius: 2px; }
.pref-tema-preview--light  .ptpv-topbar { background: #fff; }
.pref-tema-preview--dark   .ptpv-topbar { background: #1c1c1c; }
.pref-tema-preview--system .ptpv-topbar { background: linear-gradient(90deg, #fff 50%, #1c1c1c 50%); }

.ptpv-card { flex: 1; border-radius: 2px; }
.pref-tema-preview--light  .ptpv-card { background: #fff; }
.pref-tema-preview--dark   .ptpv-card { background: #222; }
.pref-tema-preview--system .ptpv-card { background: linear-gradient(90deg, #fff 50%, #222 50%); }
.ptpv-card--half { flex: 0 0 auto; height: 7px; }

/* Fonte — botões */
.pref-fonte-grid { display: flex; gap: 8px; }
.pref-fonte-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--transition), background var(--transition);
}
.pref-fonte-btn:hover  { border-color: var(--primary); }
.pref-fonte-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.pref-fonte-sample { font-weight: 700; line-height: 1; color: inherit; flex-shrink: 0; }

/* Cores — swatches */
.pref-cores-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.pref-cor-swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  outline: none;
  transition: transform .15s ease;
}
.pref-cor-swatch:hover  { transform: scale(1.18); }
.pref-cor-swatch.active {
  border-color: var(--card);
  box-shadow: 0 0 0 2px var(--border), 0 0 0 4px var(--primary);
  transform: scale(1.08);
}
.pref-cor-atual       { font-size: 12px; color: var(--text-muted); }
.pref-cor-atual code {
  font-family: var(--font-mono);
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.pref-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 24px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

@media (max-width: 700px) {
  .pref-row    { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .pref-page   { gap: 16px; }
  .pref-actions { flex-direction: column-reverse; padding: 16px 18px; }
  .pref-actions .btn { width: 100%; justify-content: center; }
  .pref-tema-grid { grid-template-columns: 1fr 1fr; }
  .pref-fonte-grid { flex-wrap: wrap; }
  .pref-fonte-btn  { flex: 1 1 80px; }
}

/* ─── Página de Usuários ─────────────────────────────── */
.gestores-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.gestores-form-card  { width: 300px; flex-shrink: 0; }
.gestores-table-card { flex: 1; min-width: 0; }
.gestores-form-body  {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gestores-form-submit { width: 100%; justify-content: center; }
.form-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 0; }

@media (max-width: 860px) {
  .gestores-layout     { flex-direction: column; }
  .gestores-form-card  { width: 100%; }
}
