/* ============================================================
   NC Internet RH — app.css
   ÚNICO arquivo CSS do projeto. Mobile-first.
   Cor primária: #FF6B00 | Fonte: Inter
   ============================================================ */

/* ── 1. VARIÁVEIS E RESET ─────────────────────────────────── */
:root {
  --primary:         #FF6B00;
  --primary-light:   #FFF3E8;
  --primary-dark:    #CC5500;
  --primary-glow:    rgba(255,107,0,.18);

  --bg:              #FFFFFF;
  --surface:         #F7F8FA;
  --surface-2:       #EDEEF2;

  --text-primary:    #0D0D0D;
  --text-secondary:  #5C5F6A;
  --text-muted:      #A0A3AE;
  --text-on-primary: #FFFFFF;

  --border:          #E4E6EC;
  --border-strong:   #C8CAD4;

  --success:         #00C076;
  --success-light:   #E8F5E9;
  --warning:         #F5A623;
  --warning-light:   #FFF8E1;
  --danger:          #E63946;
  --danger-light:    #FCE4EC;
  --info:            #0077FF;
  --info-light:      #E3F2FD;

  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-full: 9999px;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow-md: 0 4px 14px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

  --sidebar-w:  220px;
  --topbar-h:   52px;
  --bottomnav-h:62px;

  --trans: .16s cubic-bezier(.4,0,.2,1);
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* ── 2. LAYOUT SHELL ──────────────────────────────────────── */
.app-body {
  background: var(--surface);
  min-height: 100vh;
}

/* Mobile: stack simples */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  display: none; /* oculto mobile */
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
}

.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 var(--s-4);
  gap: var(--s-3);
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.logo-icon {
  width: 28px; height: 28px;
  background: var(--primary);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.3px;
}

.logo-rh {
  color: var(--primary);
}

.logo-nome { font-size: 12px; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.logo-sub  { font-size: 9px;  color: var(--text-muted); line-height: 1.2; }

.topbar-spacer { flex: 1; }

.topbar-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  position: relative;
  transition: background var(--trans), color var(--trans);
}
.topbar-btn:hover { background: var(--surface); color: var(--text-primary); }

.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  background: var(--primary);
  border: 2px solid var(--bg);
  border-radius: var(--r-full);
  font-size: 8px; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

.topbar-data {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-avatar { display: flex; align-items: center; }

.avatar-img    { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-light); }
.avatar-iniciais {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--primary-dark);
}
.avatar-sm {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--primary-dark);
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  padding: var(--s-4);
  padding-bottom: calc(var(--bottomnav-h) + var(--s-4));
  overflow-y: auto;
}

/* ── Desktop: sidebar aparece ───────────────────────────────── */
@media (min-width: 768px) {
  .app-shell { flex-direction: row; }

  .sidebar {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
  }

  .main-content {
    padding: var(--s-5) var(--s-6);
    padding-bottom: var(--s-6);
  }

  .bottom-nav    { display: none; }
  .d-mobile-none { display: flex !important; }
  .d-desktop-none { display: none !important; }
  .topbar-logo   { display: none; } /* logo já está na sidebar */
}

/* ── 3. SIDEBAR ──────────────────────────────────────────────── */
.sidebar-logo {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 var(--s-4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo-link {
  display: flex; align-items: center; gap: var(--s-2);
  color: inherit;
}

.sidebar-nav {
  flex: 1;
  padding: var(--s-2) var(--s-2);
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: var(--s-2) var(--s-2) 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px var(--s-2);
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: background var(--trans), color var(--trans);
  margin-bottom: 1px;
  position: relative;
}

.nav-item:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.nav-item--ativo {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.nav-item--ativo svg { stroke: var(--primary); }

.nav-item__indicador {
  position: absolute; right: var(--s-2);
  width: 3px; height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-3);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex; align-items: center; gap: var(--s-2);
  flex: 1; min-width: 0;
}

.sidebar-user__info { min-width: 0; }
.sidebar-user__nome  { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user__perfil { font-size: 10px; color: var(--text-muted); }

.sidebar-logout {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  color: var(--text-muted);
  transition: background var(--trans), color var(--trans);
  flex-shrink: 0;
}
.sidebar-logout:hover { background: var(--danger-light); color: var(--danger); }

/* ── 4. BOTTOM NAV (mobile) ──────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottomnav-h);
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav__item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 6px 0;
  color: var(--text-muted);
}

.bottom-nav__icon {
  width: 36px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  transition: background var(--trans);
}

.bottom-nav__item--ativo .bottom-nav__icon { background: var(--primary-light); }
.bottom-nav__item--ativo .bottom-nav__icon svg { stroke: var(--primary); }
.bottom-nav__item--ativo .bottom-nav__label { color: var(--primary); font-weight: 700; }

.bottom-nav__label {
  font-size: 9px;
  font-weight: 400;
}

/* ── 5. TIPOGRAFIA ───────────────────────────────────────────── */
h1 { font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
h2 { font-size: 16px; font-weight: 700; color: var(--text-primary); }
h3 { font-size: 14px; font-weight: 600; color: var(--text-primary); }

.page-title    { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.label { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.mono  { font-family: 'Fira Code', 'Courier New', monospace; }
.muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary-c { color: var(--primary); }

/* ── 6. BOTÕES ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: 10px var(--s-4);
  border-radius: var(--r-md);
  font-size: 13px; font-weight: 600;
  border: 1.5px solid transparent;
  transition: all var(--trans);
  white-space: nowrap;
  min-height: 40px; /* touch target */
  justify-content: center;
}

.btn--primary {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}
.btn--primary:hover  { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn--primary:active { transform: scale(.98); }

.btn--outline {
  background: var(--bg); color: var(--text-primary);
  border-color: var(--border);
}
.btn--outline:hover { background: var(--surface); border-color: var(--border-strong); }

.btn--ghost {
  background: transparent; color: var(--text-secondary);
  border-color: transparent;
}
.btn--ghost:hover { background: var(--surface); color: var(--text-primary); }

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

.btn--success {
  background: var(--success-light); color: var(--success);
  border-color: var(--success);
}

.btn--sm { padding: 6px var(--s-3); font-size: 11px; min-height: 32px; }
.btn--lg { padding: 14px var(--s-6); font-size: 14px; min-height: 52px; }
.btn--full { width: 100%; }

.btn--loading { opacity: .7; pointer-events: none; }
.btn--loading::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin-left: var(--s-1);
}

/* Botão ponto — gigante, principal ação mobile */
.btn--ponto {
  width: 100%; min-height: 56px;
  font-size: 15px; font-weight: 800;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--r-lg);
  box-shadow: 0 8px 24px var(--primary-glow);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn--ponto:hover  { background: var(--primary-dark); }
.btn--ponto:active { transform: scale(.98); }

/* ── 7. INPUTS E FORMULÁRIOS ─────────────────────────────────── */
.form-group { margin-bottom: var(--s-4); }

.form-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-label span { color: var(--danger); margin-left: 2px; }

.input, .select, .textarea {
  width: 100%;
  padding: 10px var(--s-3);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg);
  transition: border-color var(--trans), box-shadow var(--trans);
  min-height: 44px; /* touch target */
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input--error { border-color: var(--danger); }
.input--error:focus { box-shadow: 0 0 0 3px rgba(230,57,70,.15); }

.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

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

.form-error {
  font-size: 11px;
  color: var(--danger);
  margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
}

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 40px; height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border-strong);
  border-radius: var(--r-full);
  transition: background var(--trans);
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--trans);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── 8. CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-4);
}

.card--surface { background: var(--surface); border-color: transparent; }
.card--orange  { border-color: var(--primary); background: var(--primary-light); }
.card--danger  { border-color: var(--danger);  background: var(--danger-light);  }
.card--success { border-color: var(--success); background: var(--success-light); }
.card--dark    { background: #0D0D0D; border-color: transparent; color: #fff; }

.card__titulo   { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: var(--s-2); }
.card__subtitulo{ font-size: 11px; color: var(--text-muted); }

/* Métrica (número grande) */
.metric-card { padding: var(--s-3) var(--s-4); }
.metric-label { font-size: 10px; color: var(--text-muted); font-weight: 500; margin-bottom: var(--s-1); }
.metric-value { font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1; font-family: 'Inter', monospace; }
.metric-sub   { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

/* Grid de métricas */
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
@media (min-width: 768px) { .metrics-grid { grid-template-columns: repeat(4,1fr); } }

/* ── 9. BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 10px; font-weight: 700;
  white-space: nowrap;
}

.badge--success { background: var(--success-light); color: var(--success); }
.badge--danger  { background: var(--danger-light);  color: var(--danger);  }
.badge--warning { background: var(--warning-light); color: #7B5E00; }
.badge--info    { background: var(--info-light);    color: var(--info);    }
.badge--muted   { background: var(--surface-2);     color: var(--text-muted); }
.badge--primary { background: var(--primary-light); color: var(--primary-dark); }

/* Ponto de status */
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
}
.status-dot--ativo   { background: var(--success); }
.status-dot--inativo { background: var(--text-muted); }
.status-dot--ferias  { background: var(--info); }
.status-dot--alerta  { background: var(--warning); }
.status-dot--danger  { background: var(--danger); }

/* ── 10. TABELAS ─────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

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

.table th {
  padding: 8px var(--s-3);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 10px var(--s-3);
  border-bottom: 0.5px solid var(--surface-2);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface); }
.table .mono { font-family: monospace; font-size: 11px; }

/* ── 11. PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}

.page-header__acao { display: flex; gap: var(--s-2); flex-shrink: 0; }

/* ── 12. FLASH MESSAGES ──────────────────────────────────────── */
.flash {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--s-4);
  border-radius: var(--r-md);
  font-size: 13px; font-weight: 500;
  margin-bottom: var(--s-3);
  gap: var(--s-2);
  animation: slideDown .25s ease;
}

.flash--success { background: var(--success-light); color: #1B5E20; border-left: 3px solid var(--success); }
.flash--danger  { background: var(--danger-light);  color: #B71C1C; border-left: 3px solid var(--danger);  }
.flash--warning { background: var(--warning-light); color: #7B5E00; border-left: 3px solid var(--warning); }
.flash--info    { background: var(--info-light);    color: #0D47A1; border-left: 3px solid var(--info);    }

.flash__texto { flex: 1; }
.flash__fechar { background: none; border: none; opacity: .5; line-height: 1; padding: 2px; }
.flash__fechar:hover { opacity: 1; }

/* ── 13. MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}

.modal {
  background: var(--bg);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--s-6) var(--s-5);
  width: 100%; max-width: 480px;
  animation: slideUp .25s ease;
}

.modal__header { margin-bottom: var(--s-4); }
.modal__titulo { font-size: 16px; font-weight: 700; }
.modal__texto  { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.modal__footer { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.modal__footer .btn { flex: 1; }

@media (min-width: 480px) {
  .modal-overlay { align-items: center; padding: var(--s-4); }
  .modal { border-radius: var(--r-xl); }
}

/* ── 14. TELA DE PONTO (especial) ────────────────────────────── */
.ponto-card-dark {
  background: #0D0D0D;
  border-radius: var(--r-xl);
  padding: var(--s-5);
  position: relative;
  overflow: hidden;
  color: #fff;
}

.ponto-card-dark::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255,107,0,.12);
}

.ponto-hora-display {
  font-size: 36px; font-weight: 800;
  font-family: 'Inter', monospace;
  letter-spacing: -1px;
  line-height: 1;
}

.ponto-hora-display .sep { color: var(--primary); }
.ponto-hora-display .sec { font-size: 22px; color: rgba(255,255,255,.4); }

.ponto-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,107,0,.2);
  border-radius: var(--r-full);
  padding: 4px 12px;
  margin-top: var(--s-2);
}

.ponto-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.ponto-status-txt { font-size: 10px; color: var(--primary); font-weight: 700; }

.ponto-timeline {
  display: flex; align-items: center;
  gap: 0; margin: var(--s-4) 0;
}

.ponto-step {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}

.ponto-step::before {
  content: '';
  position: absolute; left: 0; top: 13px;
  width: 50%; height: 2px;
  background: rgba(255,255,255,.15);
}
.ponto-step:first-child::before { display: none; }
.ponto-step--done::before { background: var(--primary); }

.ponto-step::after {
  content: '';
  position: absolute; right: 0; top: 13px;
  width: 50%; height: 2px;
  background: rgba(255,255,255,.15);
}
.ponto-step:last-child::after { display: none; }

.ponto-step__circulo {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  transition: all var(--trans);
}

.ponto-step--done .ponto-step__circulo {
  background: var(--primary);
  border-color: var(--primary);
}

.ponto-step__label { font-size: 8px; color: rgba(255,255,255,.4); margin-top: 4px; }
.ponto-step__hora  { font-size: 9px; font-weight: 700; color: rgba(255,255,255,.9); font-family: monospace; }
.ponto-step--done .ponto-step__hora  { color: #fff; }
.ponto-step--done .ponto-step__label { color: rgba(255,255,255,.6); }

/* ── 15. AVATAR + CÂMERA ─────────────────────────────────────── */
.camera-container {
  background: #111;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}

.camera-preview {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  transform: scaleX(-1); /* espelho */
  display: block;
}

.camera-contador {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 64px; font-weight: 900;
  color: var(--primary);
  text-shadow: 0 0 30px var(--primary-glow);
  animation: pulse 1s ease infinite;
}

.camera-overlay-msg {
  position: absolute; bottom: var(--s-3); left: 0; right: 0;
  text-align: center; font-size: 12px; color: rgba(255,255,255,.7);
}

/* ── 16. GRID LAYOUT ─────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr;            gap: var(--s-3); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr;       gap: var(--s-3); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr);     gap: var(--s-3); }

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}

/* Flex utils */
.d-flex        { display: flex; }
.align-center  { align-items: center; }
.align-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-1        { flex: 1; }
.flex-wrap     { flex-wrap: wrap; }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }

/* Spacing */
.mt-1{margin-top:var(--s-1)} .mt-2{margin-top:var(--s-2)} .mt-3{margin-top:var(--s-3)} .mt-4{margin-top:var(--s-4)}
.mb-1{margin-bottom:var(--s-1)} .mb-2{margin-bottom:var(--s-2)} .mb-3{margin-bottom:var(--s-3)} .mb-4{margin-bottom:var(--s-4)}
.p-3{padding:var(--s-3)} .p-4{padding:var(--s-4)}

/* Text */
.text-sm{font-size:12px} .text-xs{font-size:11px} .fw-600{font-weight:600} .fw-700{font-weight:700}
.text-center{text-align:center} .text-right{text-align:right}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Hide */
.d-mobile-none  { display: none; }
.d-desktop-none { display: flex; }
@media(min-width:768px){
  .d-mobile-none  { display: flex; }
  .d-desktop-none { display: none; }
}

/* ── 17. ANIMAÇÕES ───────────────────────────────────────────── */
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes pulse     { 0%,100%{opacity:1} 50%{opacity:.6} }
@keyframes slideDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideUp   { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn    { from{opacity:0} to{opacity:1} }

/* ── 18. EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--s-8) var(--s-6);
  text-align: center; gap: var(--s-3);
}
.empty-state__icon { color: var(--border-strong); }
.empty-state__titulo { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.empty-state__texto  { font-size: 12px; color: var(--text-muted); max-width: 260px; }

/* ── 19. LOADING ─────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.8);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: var(--s-3);
}

/* ── 20. SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Fix: atributo hidden sobreposto por display:flex dos modais */
[hidden] { display: none !important; }
