/* ══════════════════════════════════════════════════════════════
   Coach do Concurseiro — Tema Principal
   ══════════════════════════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img, video, svg { display: block; max-width: 100%; }
a { color: var(--clr-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ── Tipografia ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--clr-text);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

.page-title {
  font-family: var(--font-title);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--clr-secondary);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.page-title .page-title-icon {
  width: 40px; height: 40px;
  background: var(--clr-primary-light);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-primary);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-title);
  font-size: var(--text-lg);
  font-weight: var(--weight-semi);
  color: var(--clr-secondary);
  margin-bottom: var(--space-4);
}

/* ── Layout Principal (Sidebar + Content) ────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-normal);
}

.app-content.sidebar-collapsed {
  margin-left: var(--sidebar-width-collapsed);
}

.page-wrapper {
  flex: 1;
  padding: var(--space-8);
  max-width: 1400px;
  width: 100%;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  transition: box-shadow var(--transition-fast);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--clr-border);
}

.card-title {
  font-family: var(--font-title);
  font-size: var(--text-md);
  font-weight: var(--weight-semi);
  color: var(--clr-secondary);
}

.card-body { }

.card-footer {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--clr-border);
}

/* Stat card para dashboard */
.stat-card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0;
}

.stat-card-icon.primary   { background: var(--clr-primary-light); color: var(--clr-primary); }
.stat-card-icon.accent    { background: #FEF3C7; color: var(--clr-accent-dark); }
.stat-card-icon.success   { background: var(--clr-success-bg); color: var(--clr-success); }
.stat-card-icon.info      { background: var(--clr-info-bg); color: var(--clr-info); }

.stat-card-content { flex: 1; }
.stat-card-label   { font-size: var(--text-sm); color: var(--clr-text-secondary); margin-bottom: var(--space-1); }
.stat-card-value   { font-family: var(--font-title); font-size: var(--text-2xl); font-weight: var(--weight-bold); color: var(--clr-text); line-height: 1; }
.stat-card-sub     { font-size: var(--text-xs); color: var(--clr-text-light); margin-top: var(--space-1); }

/* ── Grid ────────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.badge-primary { background: var(--clr-primary-light); color: var(--clr-primary); }
.badge-info    { background: var(--clr-info-bg); color: var(--clr-info); }
.badge-success { background: var(--clr-success-bg); color: var(--clr-success); }
.badge-warning { background: var(--clr-warning-bg); color: var(--clr-warning); }
.badge-error   { background: var(--clr-error-bg); color: var(--clr-error); }
.badge-neutral { background: #F1F5F9; color: var(--clr-text-secondary); }

/* ── Alertas ─────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  border-left: 4px solid;
}

.alert-success { background: var(--clr-success-bg); border-color: var(--clr-success); color: var(--clr-success); }
.alert-error   { background: var(--clr-error-bg);   border-color: var(--clr-error);   color: var(--clr-error); }
.alert-warning { background: var(--clr-warning-bg); border-color: var(--clr-warning); color: var(--clr-warning); }
.alert-info    { background: var(--clr-info-bg);    border-color: var(--clr-info);    color: var(--clr-info); }
.alert p { color: var(--clr-text); margin: 0; }

/* ── Tabelas ─────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-xs);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--clr-surface);
  font-size: var(--text-sm);
}

.table thead th {
  padding: var(--space-3) var(--space-5);
  text-align: left;
  font-family: var(--font-title);
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clr-text-secondary);
  background: var(--clr-surface-2);
  border-bottom: 1px solid var(--clr-border);
  white-space: nowrap;
}

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

.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--clr-surface-2); }

.table tbody td {
  padding: var(--space-3) var(--space-5);
  color: var(--clr-text);
  vertical-align: middle;
}

/* ── Progress Bar ────────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--clr-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--clr-primary), #4F7FFF);
  transition: width 0.6s ease;
}

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 380px;
}

.toast {
  background: var(--clr-secondary);
  color: #fff;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: toastIn 0.3s ease forwards;
  border-left: 4px solid var(--clr-primary);
}

.toast.toast-success { border-color: var(--clr-success); }
.toast.toast-error   { border-color: var(--clr-error); }
.toast.toast-warning { border-color: var(--clr-warning); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Divisores e utilitários ─────────────────────────────────── */
.divider { height: 1px; background: var(--clr-border); margin: var(--space-6) 0; }

.text-muted   { color: var(--clr-text-secondary); }
.text-small   { font-size: var(--text-sm); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.font-title   { font-family: var(--font-title); }
.font-bold    { font-weight: var(--weight-bold); }
.font-semi    { font-weight: var(--weight-semi); }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2        { gap: var(--space-2); }
.gap-3        { gap: var(--space-3); }
.gap-4        { gap: var(--space-4); }

.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

.hidden   { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Scrollbar personalizada ─────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--clr-border-dark); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-text-light); }

/* ── Loading Spinner ─────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

.spinner-primary {
  border-color: var(--clr-primary-light);
  border-top-color: var(--clr-primary);
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--clr-text-secondary);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.4;
}

.empty-state h3 {
  font-size: var(--text-lg);
  color: var(--clr-text);
  margin-bottom: var(--space-2);
}

.empty-state p {
  font-size: var(--text-sm);
  max-width: 360px;
  margin: 0 auto var(--space-6);
}


/* ══════════════════════════════════════════════════════════════
   Aplicação visual do tema global em todo o sistema
   ══════════════════════════════════════════════════════════════ */
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.15), transparent 34%),
    radial-gradient(circle at 92% 6%, rgba(124, 58, 237, 0.12), transparent 36%),
    var(--clr-bg);
}

html[data-theme="dark"] .app-content {
  background: transparent;
}

html[data-theme="dark"] .topbar {
  background: rgba(7, 17, 31, 0.86);
  border-bottom-color: var(--clr-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  backdrop-filter: blur(16px);
}

html[data-theme="dark"] .sidebar {
  background:
    linear-gradient(180deg, rgba(5, 11, 26, 0.98), rgba(8, 17, 35, 0.98));
  border-right: 1px solid var(--clr-border);
}

html[data-theme="dark"] .sidebar-logo,
html[data-theme="dark"] .sidebar-footer {
  border-color: rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] .page-title,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .modal-title,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
  color: var(--clr-text);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .table,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .auth-soft-card,
html[data-theme="dark"] .auth-plan-card {
  background-color: var(--clr-surface);
  border-color: var(--clr-border);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .table-wrap {
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table tbody tr,
html[data-theme="dark"] footer {
  border-color: var(--clr-border) !important;
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table tbody tr:hover,
html[data-theme="dark"] .progress-bar,
html[data-theme="dark"] .badge-neutral {
  background: var(--clr-surface-2);
}

html[data-theme="dark"] .form-label,
html[data-theme="dark"] .table tbody td,
html[data-theme="dark"] .alert p {
  color: var(--clr-text);
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .topbar-breadcrumb,
html[data-theme="dark"] .topbar-breadcrumb a,
html[data-theme="dark"] footer,
html[data-theme="dark"] footer a {
  color: var(--clr-text-secondary) !important;
}

html[data-theme="dark"] .topbar-breadcrumb .current {
  color: var(--clr-text) !important;
}

html[data-theme="dark"] .alert {
  background: color-mix(in srgb, var(--clr-surface) 82%, transparent);
}

/* Evita cards com informações cortadas: os cards crescem conforme o conteúdo. */
.card,
.stat-card,
.dash-card,
.focus-card {
  overflow-wrap: anywhere;
}

.card,
.stat-card {
  min-width: 0;
}

/* Dashboard personalizado: remove alturas rígidas que cortavam textos, listas e gráficos. */
.focus-dashboard-custom-shell .focus-card-kpi,
.focus-dashboard-custom-shell .focus-card-standard,
.focus-dashboard-custom-shell .focus-card-graph {
  height: auto !important;
  max-height: none !important;
}

.focus-dashboard-custom-shell .focus-card-kpi { min-height: 126px !important; }
.focus-dashboard-custom-shell .focus-card-standard { min-height: 184px !important; }
.focus-dashboard-custom-shell .focus-card-graph { min-height: 318px !important; }

.focus-dashboard-custom-shell .focus-card,
.focus-dashboard-custom-shell .focus-card-list,
.focus-dashboard-custom-shell .focus-card-standard,
.focus-dashboard-custom-shell .focus-card-graph {
  max-height: none !important;
}

.focus-dashboard-custom-shell .focus-card-list,
.focus-dashboard-custom-shell .focus-card-standard,
.focus-dashboard-custom-shell .focus-card-graph {
  overflow: hidden;
}

@media (max-width: 980px) {
  .focus-dashboard-custom-shell .focus-card-kpi,
  .focus-dashboard-custom-shell .focus-card-standard,
  .focus-dashboard-custom-shell .focus-card-graph {
    height: auto !important;
    min-height: 150px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   Ajustes globais de contraste e tema claro — v1.2.2
   ══════════════════════════════════════════════════════════════ */
:root,
html[data-theme="light"] {
  --clr-bg-soft: var(--clr-surface-2, #f8faff);
}

html[data-theme="dark"] {
  --clr-bg-soft: var(--clr-surface-2, #111c2e);
}

/* Tema claro global inspirado no modelo azul/ciano enviado. */
html[data-theme="light"] body:not(.page-dashboard) {
  background:
    radial-gradient(circle at -8% -12%, rgba(14, 165, 233, .13), transparent 30%),
    radial-gradient(circle at 96% 0%, rgba(37, 99, 235, .10), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
}

html[data-theme="light"] body:not(.page-dashboard) .app-content {
  background: transparent;
}

html[data-theme="light"] body:not(.page-dashboard) .topbar {
  background: rgba(255,255,255,.90);
  border-bottom-color: rgba(15, 77, 132, .10);
  box-shadow: 0 8px 28px rgba(15, 77, 132, .06);
  backdrop-filter: blur(14px);
}

html[data-theme="light"] body:not(.page-dashboard) .sidebar {
  background: linear-gradient(180deg, #0f5ba7 0%, #096fba 44%, #08b8cf 100%);
  border-right: 0;
  box-shadow: 18px 0 46px rgba(12, 103, 176, .16);
}

html[data-theme="light"] body:not(.page-dashboard) .sidebar-logo,
html[data-theme="light"] body:not(.page-dashboard) .sidebar-footer {
  border-color: rgba(255,255,255,.20);
}

html[data-theme="light"] body:not(.page-dashboard) .sidebar-section-label {
  color: rgba(224, 244, 255, .74);
}

html[data-theme="light"] body:not(.page-dashboard) .sidebar-item {
  color: rgba(255,255,255,.90);
}

html[data-theme="light"] body:not(.page-dashboard) .sidebar-item:hover,
html[data-theme="light"] body:not(.page-dashboard) .sidebar-item.active {
  color: #fff;
  background: rgba(255,255,255,.16);
  box-shadow: inset 3px 0 0 #dff7ff;
}

html[data-theme="light"] body:not(.page-dashboard) .sidebar-item .sidebar-icon {
  opacity: .92;
}

html[data-theme="light"] body:not(.page-dashboard) .sidebar-logo-text,
html[data-theme="light"] body:not(.page-dashboard) .sidebar-user-name {
  color: #fff;
}

html[data-theme="light"] body:not(.page-dashboard) .sidebar-logo-text span,
html[data-theme="light"] body:not(.page-dashboard) .sidebar-user-role {
  color: rgba(255,255,255,.68);
}

html[data-theme="light"] body:not(.page-dashboard) .page-wrapper {
  max-width: none;
}

html[data-theme="light"] body:not(.page-dashboard) .card,
html[data-theme="light"] body:not(.page-dashboard) .stat-card,
html[data-theme="light"] body:not(.page-dashboard) .modal,
html[data-theme="light"] body:not(.page-dashboard) .table,
html[data-theme="light"] body:not(.page-dashboard) .table-wrap {
  background-color: rgba(255,255,255,.96);
  border-color: rgba(15, 77, 132, .12);
  box-shadow: 0 14px 38px rgba(15, 77, 132, .08);
}

html[data-theme="light"] body:not(.page-dashboard) .card-title,
html[data-theme="light"] body:not(.page-dashboard) .page-title,
html[data-theme="light"] body:not(.page-dashboard) .section-title,
html[data-theme="light"] body:not(.page-dashboard) .modal-title,
html[data-theme="light"] body:not(.page-dashboard) h1,
html[data-theme="light"] body:not(.page-dashboard) h2,
html[data-theme="light"] body:not(.page-dashboard) h3,
html[data-theme="light"] body:not(.page-dashboard) h4,
html[data-theme="light"] body:not(.page-dashboard) h5,
html[data-theme="light"] body:not(.page-dashboard) h6 {
  color: #102a43;
}

html[data-theme="light"] body:not(.page-dashboard) .text-muted,
html[data-theme="light"] body:not(.page-dashboard) .form-hint,
html[data-theme="light"] body:not(.page-dashboard) .table thead th,
html[data-theme="light"] body:not(.page-dashboard) .topbar-breadcrumb,
html[data-theme="light"] body:not(.page-dashboard) .topbar-breadcrumb a,
html[data-theme="light"] body:not(.page-dashboard) footer,
html[data-theme="light"] body:not(.page-dashboard) footer a {
  color: #5d728b !important;
}

html[data-theme="light"] body:not(.page-dashboard) .topbar-breadcrumb .current {
  color: #16324f !important;
}

html[data-theme="light"] body:not(.page-dashboard) .page-title .page-title-icon {
  background: linear-gradient(135deg, rgba(0, 194, 232, .14), rgba(19, 95, 189, .10));
  color: #135fbd;
}

html[data-theme="light"] body:not(.page-dashboard) .form-control,
html[data-theme="light"] body:not(.page-dashboard) select.form-control,
html[data-theme="light"] body:not(.page-dashboard) textarea.form-control {
  background-color: #f8fbff;
  border-color: rgba(15, 77, 132, .18);
  color: #11263f;
}

html[data-theme="light"] body:not(.page-dashboard) .form-control:focus {
  border-color: #0abde3;
  box-shadow: 0 0 0 3px rgba(10, 189, 227, .14);
}

/* Contraste no tema escuro: páginas com estilos inline antigos usavam
   var(--clr-secondary) como cor de texto, o que ficava quase invisível. */
html[data-theme="dark"] .app-layout [style*="color:var(--clr-secondary)"],
html[data-theme="dark"] .app-layout [style*="color: var(--clr-secondary)"],
html[data-theme="dark"] .msg-bubble.ia strong {
  color: var(--clr-text) !important;
}

html[data-theme="dark"] .app-layout [style*="background:var(--clr-bg-soft)"],
html[data-theme="dark"] .app-layout [style*="background: var(--clr-bg-soft)"],
html[data-theme="dark"] .app-layout [style*="background:var(--clr-surface-2)"],
html[data-theme="dark"] .app-layout [style*="background: var(--clr-surface-2)"] {
  background-color: var(--clr-surface-2) !important;
  color: var(--clr-text) !important;
}

html[data-theme="dark"] .app-layout [style*="background:linear-gradient(135deg,var(--clr-secondary)"],
html[data-theme="dark"] .app-layout [style*="background: linear-gradient(135deg,var(--clr-secondary)"],
html[data-theme="dark"] .app-layout [style*="background:linear-gradient(135deg, var(--clr-secondary)"],
html[data-theme="dark"] .app-layout [style*="background: linear-gradient(135deg, var(--clr-secondary)"] {
  background: linear-gradient(135deg, #0f1d36 0%, #1b4fff 100%) !important;
  color: #fff !important;
}

html[data-theme="dark"] .app-layout code,
html[data-theme="dark"] .app-layout pre,
html[data-theme="dark"] #markdownContent code,
html[data-theme="dark"] #markdownContent pre {
  background: var(--clr-surface-2) !important;
  color: var(--clr-text) !important;
  border: 1px solid var(--clr-border);
}

html[data-theme="dark"] #markdownContent blockquote {
  background: rgba(38, 201, 243, .10) !important;
  color: var(--clr-text-secondary) !important;
}

html[data-theme="dark"] .btn-secondary {
  background: #1b4fff;
  border-color: #1b4fff;
  color: #fff;
}

html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .btn-light {
  color: #dbeafe;
}

html[data-theme="dark"] .btn-outline:hover,
html[data-theme="dark"] .btn-ghost:hover,
html[data-theme="dark"] .btn-light:hover {
  background: rgba(38, 201, 243, .10);
  color: #ffffff;
}

/* Ordenação global de tabelas */
.table thead th.cc-sortable-th {
  cursor: pointer;
  user-select: none;
  position: relative;
}
.table thead th.cc-sortable-th:hover {
  color: var(--clr-primary);
}
.cc-sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  font-size: 11px;
  opacity: .65;
  text-transform: none;
  letter-spacing: 0;
}
html[data-theme="dark"] .table thead th.cc-sortable-th:hover {
  color: #38bdf8 !important;
}

/* Ajustes v1.2.15 — legibilidade global */
.sidebar-item { font-size: 0.92rem; }
.sidebar-section-label { font-size: 11px; }
html[data-theme="light"] body:not(.page-dashboard) .table tbody td,
html[data-theme="light"] body:not(.page-dashboard) .card,
html[data-theme="light"] body:not(.page-dashboard) .modal {
  color: #11263f;
}
html[data-theme="light"] body:not(.page-dashboard) .badge-info {
  background: rgba(37, 99, 235, .11);
  color: #135fbd;
}
html[data-theme="dark"] .badge-info {
  background: rgba(37, 99, 235, .18);
  color: #93c5fd;
}
