/* ============================================================
   admin.css — Shell do Painel Administrativo
   Usa design tokens definidos em tokens.css.
   ============================================================ */

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--t1);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.005em;
}

/* Shell principal: sidebar + main lado a lado */
body.admin-shell {
  display: flex;
  overflow: hidden;
}
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
#sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--side-bg);
  border-right: 1px solid var(--side-border);
  transition: transform .25s ease, width .2s ease;
  z-index: var(--z-nav);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}
#sidebar.collapsed          { width: 68px; min-width: 68px; }
#sidebar.collapsed .nav-label,
#sidebar.collapsed .user-info,
#sidebar.collapsed .logo-text,
#sidebar.collapsed .nav-group-label { display: none; }
#sidebar.collapsed .nav-item         { justify-content: center; padding: 10px; }
#sidebar.collapsed .sidebar-footer   { padding: 10px; }

/* Mobile drawer */
@media (max-width: 900px) {
  #sidebar {
    position: fixed; top: 0; left: 0; height: 100%;
    transform: translateX(-100%);
    width: 260px !important; min-width: 260px !important;
    box-shadow: var(--sh-lg);
  }
  #sidebar.mobile-open { transform: translateX(0); }
  #sidebar.collapsed .nav-label,
  #sidebar.collapsed .user-info,
  #sidebar.collapsed .logo-text,
  #sidebar.collapsed .nav-group-label { display: unset; }
  #sidebarOverlay { display: block; }
}
#sidebarOverlay {
  display: none; position: fixed; inset: 0;
  background: rgba(17,24,39,.45); backdrop-filter: blur(2px);
  z-index: calc(var(--z-nav) - 10);
}
#sidebarOverlay.active { display: block; animation: fadeIn .2s ease; }

/* ─── Logo ───────────────────────────────────────────────── */
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px; min-height: 64px;
  border-bottom: 1px solid var(--side-border);
}
.sidebar-logo img,
.sidebar-logo-img { height: 32px; width: auto; flex-shrink: 0; }

.logo-text, .sidebar-logo-text { line-height: 1.15; min-width: 0; }
.logo-text .logo-title,
.sidebar-logo-brand {
  color: var(--t1); font-weight: 700; font-size: 14.5px;
  letter-spacing: -.2px; margin: 0;
}
.logo-text .logo-sub,
.sidebar-logo-product {
  color: var(--brand); font-size: 11px; font-weight: 600;
  letter-spacing: .2px; margin: 0;
}

/* ─── Nav ────────────────────────────────────────────────── */
#navMenu { flex: 1; padding: 10px 10px 14px; overflow-y: auto; }

.nav-group-label {
  display: block;
  padding: 14px 10px 6px;
  font-size: 10.5px; font-weight: 600;
  color: var(--t4); text-transform: uppercase;
  letter-spacing: .8px;
}
.nav-group-label:first-child { padding-top: 6px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; margin: 2px 0;
  border-radius: var(--r);
  color: var(--side-item); cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  user-select: none;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
}
.nav-item:hover {
  background: var(--side-item-bg-hov);
  color: var(--side-item-hov);
}
.nav-item.active {
  background: var(--side-item-bg-act);
  color: var(--brand-active);
  font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute;
  left: -10px; top: 8px; bottom: 8px; width: 3px;
  background: var(--brand); border-radius: 0 3px 3px 0;
}
.nav-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-icon svg { width: 18px; height: 18px; }
.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
  background: var(--red); color: #fff;
  border-radius: var(--r-pill);
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; line-height: 1.4;
  min-width: 18px; text-align: center;
}

/* ─── Footer com usuário ─────────────────────────────────── */
.sidebar-footer,
.sidebar-user {
  border-top: 1px solid var(--side-border);
  padding: 12px;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-active); font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-info .user-name {
  color: var(--t1); font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-info .user-role {
  color: var(--t4); font-size: 11px;
  text-transform: capitalize;
}
.logout-btn {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  border: none; background: transparent;
  color: var(--t3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}
.logout-btn:hover { background: var(--red-bg); color: var(--red); }
.logout-btn svg { width: 16px; height: 16px; }

/* ============================================================
   TOPBAR
   ============================================================ */
#topbar {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex; align-items: center; gap: 16px;
  flex-shrink: 0;
}
.topbar-menu-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: none; background: transparent;
  color: var(--t2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast);
}
.topbar-menu-btn:hover { background: var(--surface-3); }
.topbar-menu-btn svg { width: 20px; height: 20px; }

#pageTitle {
  font-size: 16px; font-weight: 700; color: var(--t1);
  letter-spacing: -.2px;
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-actions {
  display: flex; align-items: center; gap: 8px;
}
.topbar-btn {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  background: transparent; border: none; cursor: pointer;
  color: var(--t2); position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}
.topbar-btn:hover { background: var(--surface-3); color: var(--t1); }
.topbar-btn svg { width: 20px; height: 20px; }
.topbar-btn .badge,
.topbar-badge {
  position: absolute; top: 6px; right: 6px;
  background: var(--red); color: #fff;
  font-size: 9.5px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: var(--r-pill);
  padding: 0 4px; line-height: 1.6;
  border: 2px solid var(--surface);
  animation: pop .28s cubic-bezier(.34,1.56,.64,1);
}
.topbar-badge[hidden] { display: none !important; }
.nav-badge[hidden]    { display: none !important; }
.topbar-clock {
  font-size: 12px; color: var(--t4); font-variant-numeric: tabular-nums;
  padding: 0 8px;
}
@media (max-width: 720px) {
  #topbar { padding: 0 14px; }
  .topbar-clock { display: none; }
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
#pageContent, .page-content {
  flex: 1; overflow-y: auto;
  padding: 24px;
  transition: opacity var(--t-base);
}
#pageContent.loading,
#pageContent.is-loading,
.page-content.is-loading { opacity: .45; pointer-events: none; }
#pageContent > * { animation: fadeIn .2s ease; }

@media (max-width: 720px) {
  #pageContent { padding: 14px; }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
.card.hoverable {
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.card.hoverable:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-1px);
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-header h3 {
  font-size: 14px; font-weight: 600; color: var(--t1);
  letter-spacing: -.1px;
}
.card-body   { padding: 16px 18px; }
.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* KPI card moderno (Stripe-style) */
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.kpi-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.kpi-head {
  display: flex; align-items: center; justify-content: space-between;
}
.kpi-label {
  font-size: 12.5px; font-weight: 500; color: var(--t3);
  letter-spacing: .1px;
}
.kpi-icon-wrap {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
}
.kpi-icon-wrap svg { width: 18px; height: 18px; }
.kpi-icon-wrap.ic-orange { background: var(--brand-dim);   color: var(--brand); }
.kpi-icon-wrap.ic-blue   { background: var(--blue-bg);     color: var(--blue-fg); }
.kpi-icon-wrap.ic-green  { background: var(--green-bg);    color: var(--green-fg); }
.kpi-icon-wrap.ic-yellow { background: var(--yellow-bg);   color: var(--yellow-fg); }
.kpi-icon-wrap.ic-red    { background: var(--red-bg);      color: var(--red-fg); }
.kpi-icon-wrap.ic-purple { background: var(--purple-bg);   color: var(--purple-fg); }
.kpi-icon-wrap.ic-gray   { background: var(--surface-3);   color: var(--t2); }

.kpi-value {
  font-size: 28px; font-weight: 700; color: var(--t1);
  letter-spacing: -1px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--t3);
}
.kpi-delta {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 7px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600;
}
.kpi-delta.up   { background: var(--green-bg); color: var(--green-fg); }
.kpi-delta.down { background: var(--red-bg);   color: var(--red-fg); }
.kpi-delta.flat { background: var(--surface-3); color: var(--t3); }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.2;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg      { width: 16px; height: 16px; }

.btn-primary  { background: var(--brand); color: #fff;
                box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.btn-primary:hover:not(:disabled)   { background: var(--brand-hover); }
.btn-primary:active:not(:disabled)  { background: var(--brand-active); }

.btn-secondary{ background: var(--surface); color: var(--t2);
                border-color: var(--border-2);
                box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.btn-secondary:hover:not(:disabled){ background: var(--surface-2); border-color: var(--t4); color: var(--t1); }

.btn-ghost    { background: transparent; color: var(--t2); }
.btn-ghost:hover:not(:disabled){ background: var(--surface-3); color: var(--t1); }

.btn-success  { background: var(--green);  color: #fff; }
.btn-success:hover:not(:disabled)  { background: #0E9F73; }

.btn-danger   { background: var(--red);    color: #fff; }
.btn-danger:hover:not(:disabled)   { background: #DC2626; }

.btn-warning  { background: var(--yellow); color: #fff; }
.btn-warning:hover:not(:disabled)  { background: #D97706; }

.btn-sm { padding: 6px 11px; font-size: 12.5px; gap: 5px; }
.btn-sm svg { width: 14px; height: 14px; }

/* ============================================================
   INPUTS / SELECT / TEXTAREA
   ============================================================ */
.field-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--t2); margin-bottom: 6px;
  letter-spacing: .1px;
}
.field-input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  font-size: 13.5px; color: var(--t1);
  background: var(--surface);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  font-family: inherit;
}
.field-input:focus {
  border-color: var(--brand);
  box-shadow: var(--sh-focus);
}
.field-input:disabled {
  background: var(--surface-3); color: var(--t3); cursor: not-allowed;
}
select.field-input   { cursor: pointer; }
textarea.field-input { resize: vertical; min-height: 90px; line-height: 1.55; }

/* Fieldset visual para agrupamento */
.form-group {
  border: none; padding: 0 0 14px; margin: 0 0 14px;
  border-bottom: 1px solid var(--border);
}
.form-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.form-group-title {
  display: block;
  font-size: 12px; font-weight: 700; color: var(--t2);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 10px;
}

/* ============================================================
   TABELAS
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  background: var(--surface-2);
  color: var(--t3);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 11px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
thead th.sortable { cursor: pointer; transition: color var(--t-fast); }
thead th.sortable:hover { color: var(--t1); background: var(--surface-3); }
.sort-icon { opacity: .35; font-size: 10px; margin-left: 4px; }
.sort-icon.active { opacity: 1; color: var(--brand); }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.selected { background: var(--brand-dim); }
tbody td {
  padding: 12px 14px;
  color: var(--t1);
  vertical-align: middle;
}

/* Mobile: transforma tabela em lista de cards */
@media (max-width: 720px) {
  .mobile-card-table thead { display: none; }
  .mobile-card-table tbody tr {
    display: block;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 12px 14px;
    background: var(--surface);
    box-shadow: var(--sh-xs);
  }
  .mobile-card-table tbody td {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; border: none; font-size: 13px;
  }
  .mobile-card-table tbody td::before {
    content: attr(data-label);
    font-weight: 600; color: var(--t3); font-size: 11px;
    text-transform: uppercase; letter-spacing: .4px;
    margin-right: 10px;
  }
  .mobile-card-table tbody td:last-child {
    padding-top: 10px; margin-top: 6px;
    border-top: 1px solid var(--border);
  }
}

/* ============================================================
   STATUS BADGES — paleta moderna
   ============================================================ */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600;
  letter-spacing: .1px;
  white-space: nowrap;
}
.status-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .8;
}

.s-aberta, .s-info         { background: var(--blue-bg);   color: var(--blue-fg); }
.s-em_andamento, .s-aguardando,
.s-em_execucao, .s-alerta  { background: var(--yellow-bg); color: var(--yellow-fg); }
.s-resolvida, .s-concluido,
.s-concluida, .s-retirado  { background: var(--green-bg);  color: var(--green-fg); }
.s-cancelada, .s-aviso     { background: var(--gray-bg);   color: var(--gray-fg); }
.s-agendada, .s-agendado   { background: var(--purple-bg); color: var(--purple-fg); }
.s-urgente                 { background: var(--red-bg);    color: var(--red-fg); }

.p-baixa   { background: var(--gray-bg);   color: var(--gray-fg); }
.p-media   { background: var(--blue-bg);   color: var(--blue-fg); }
.p-alta    { background: var(--yellow-bg); color: var(--yellow-fg); }
.p-urgente { background: var(--red-bg);    color: var(--red-fg); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(17,24,39,.55);
  backdrop-filter: blur(3px);
  z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .18s ease;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: 100%; max-width: 640px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--sh-lg);
  animation: slideInUp .24s cubic-bezier(.16,1,.3,1);
}
.modal-header {
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
}
.modal-header h2 {
  font-size: 16px; font-weight: 700; color: var(--t1);
  letter-spacing: -.2px;
}
.modal-close {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  border: none; background: transparent; cursor: pointer;
  color: var(--t3);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}
.modal-close:hover { background: var(--surface-3); color: var(--t1); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box     { max-width: 100%; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--r);
  padding: 18px 14px;
  text-align: center; cursor: pointer;
  background: var(--surface-2);
  transition: all var(--t-fast);
  position: relative;
}
.upload-zone:hover      { border-color: var(--brand); background: var(--brand-dim); }
.upload-zone.has-file   { border-color: var(--green); background: var(--green-bg); border-style: solid; }
.upload-zone input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.photo-preview {
  max-width: 100%; max-height: 160px; border-radius: var(--r-sm);
  object-fit: cover; margin-top: 10px; display: none;
}
.photo-preview.visible { display: inline-block; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.88); backdrop-filter: blur(4px);
  z-index: calc(var(--z-modal) + 1000);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  animation: fadeIn .18s ease;
}
.lightbox img {
  max-width: 92vw; max-height: 92vh;
  border-radius: var(--r);
  box-shadow: var(--sh-lg);
}

/* ============================================================
   TOAST
   ============================================================ */
#toastContainer {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: var(--z-toast);
  display: flex; flex-direction: column-reverse; gap: 10px;
  pointer-events: none;
}
@media (max-width: 640px) {
  #toastContainer { top: 14px; bottom: auto; left: 14px; right: 14px; flex-direction: column; }
}
.toast {
  padding: 12px 16px 12px 14px;
  border-radius: var(--r);
  background: var(--surface);
  color: var(--t1);
  font-size: 13.5px; font-weight: 500;
  min-width: 260px; max-width: 420px;
  box-shadow: var(--sh-lg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  animation: slideInRight .28s cubic-bezier(.16,1,.3,1);
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
}
@media (max-width: 640px) {
  .toast { animation: slideInUp .28s cubic-bezier(.16,1,.3,1); min-width: 0; width: 100%; }
}
.toast-success { border-left-color: var(--green); }
.toast-error   { border-left-color: var(--red); }
.toast-info    { border-left-color: var(--blue); }
.toast-warning { border-left-color: var(--yellow); }

/* ============================================================
   LOADING / SPINNER / SKELETON
   ============================================================ */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--surface-3);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.loading-center {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px; color: var(--t3); font-size: 13px;
  gap: 10px;
}

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center;
  color: var(--t3);
}
.empty-state-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--t4); margin-bottom: 16px;
}
.empty-state-icon svg { width: 30px; height: 30px; }
.empty-state h3,
.empty-state-title {
  font-size: 15px; font-weight: 600; color: var(--t1);
  margin: 0 0 6px; letter-spacing: -.1px;
}
.empty-state p,
.empty-state-text {
  font-size: 13.5px; color: var(--t3);
  max-width: 360px; line-height: 1.55;
  margin: 0 0 16px;
}

/* ============================================================
   PAGINAÇÃO
   ============================================================ */
.pagination-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 14px 4px 4px;
}
.pagination-info {
  font-size: 12.5px; color: var(--t3);
  font-variant-numeric: tabular-nums;
}
.pagination { display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.page-btn {
  min-width: 34px; height: 34px; padding: 0 10px;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--t2);
  font-size: 13px; cursor: pointer;
  font-family: inherit; font-variant-numeric: tabular-nums;
  transition: all var(--t-fast);
  display: inline-flex; align-items: center; justify-content: center;
}
.page-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--t1); }
.page-btn.active {
  background: var(--brand); color: #fff;
  border-color: var(--brand); font-weight: 600;
}
.page-btn:disabled { opacity: .4; cursor: default; }
.page-ellipsis { color: var(--t4); font-size: 13px; padding: 0 6px; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  align-items: end;
}
.filter-bar .field-input { min-width: 180px; }
@media (max-width: 640px) {
  .filter-bar                   { flex-direction: column; align-items: stretch; }
  .filter-bar .field-input      { width: 100% !important; min-width: 0; }
  .filter-bar .btn              { width: 100%; }
}

/* ============================================================
   CHART (barras horizontais simples)
   ============================================================ */
.chart-bar {
  height: 10px;
  border-radius: var(--r-pill);
  transition: width .6s cubic-bezier(.16,1,.3,1);
}

/* ============================================================
   TABLE WRAP (scroll horizontal responsivo)
   ============================================================ */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
.table-wrap > table { border: none; }
.table-wrap > .table-scroll { overflow-x: auto; }
.table-footer-count {
  padding: 10px 14px;
  font-size: 12px; color: var(--t4);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .table-wrap {
    background: transparent; border: none; box-shadow: none;
  }
}

/* ============================================================
   KPI GRID — responsivo auto-fit
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

/* ============================================================
   TOAST — sub-elementos
   ============================================================ */
.toast-icon {
  flex-shrink: 0; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.toast-success .toast-icon { color: var(--green); }
.toast-error   .toast-icon { color: var(--red); }
.toast-info    .toast-icon { color: var(--blue); }
.toast-warning .toast-icon { color: var(--yellow); }
.toast-icon svg { width: 18px; height: 18px; }
.toast-msg { flex: 1; min-width: 0; line-height: 1.45; color: var(--t1); }

/* ============================================================
   MODAL TITLE (alias p/ .modal-header h2)
   ============================================================ */
.modal-title {
  font-size: 16px; font-weight: 700; color: var(--t1);
  letter-spacing: -.2px; margin: 0;
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-muted   { color: var(--t3); }
.text-subtle  { color: var(--t4); }
.text-mono    { font-variant-numeric: tabular-nums; }
.badge-dot    { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.divider      { height: 1px; background: var(--border); margin: 14px 0; }

/* Retro-compat: códigos antigos usam Tailwind .hidden para esconder */
.hidden { display: none !important; }
