/* ============================================================
   OLHAR DEVHUB — Design System
   Cores: Teal #3D8F82 · Charcoal #1A1A1A
   ============================================================ */

/* --- Variáveis ------------------------------------------- */
:root {
  --sidebar-width: 240px;
  --sidebar-width-rail: 72px;
  --topbar-height: 62px;
  --content-gutter: 24px;

  /* Olhar DevHub Brand — Teal */
  --color-yellow:       #3D8F82;
  --color-yellow-dark:  #2C6F65;
  --color-yellow-light: #E6F2F0;
  --color-yellow-mid:   #B9DAD5;
  --color-charcoal:     #1A1A1A;
  --color-charcoal-soft:#2D2D2D;

  /* Alias primária */
  --color-primary:      #3D8F82;
  --color-primary-dark: #2C6F65;
  --color-primary-light:#E6F2F0;

  /* Sidebar */
  --color-sidebar-bg:     #FAFAF9;
  --color-sidebar-border: #E8E8E4;
  --color-sidebar-text:   #52524E;
  --color-sidebar-hover:  #F0F0EE;

  /* Body */
  --color-body-bg:     #F5F5F3;
  --color-card-bg:     #FFFFFF;
  --color-border:      #E8E8E4;
  --color-border-soft: #F0F0EE;

  /* Texto */
  --color-text-primary:   #1A1A1A;
  --color-text-secondary: #6B6B6B;
  --color-text-muted:     #A3A3A3;

  /* Semânticas */
  --color-success: #16A34A;
  --color-warning: #D97706;
  --color-danger:  #DC2626;
  --color-info:    #2563EB;

  /* Sombras */
  --shadow-xs:     0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:     0 1px 4px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:     0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:     0 12px 32px rgba(0,0,0,.10);
  --shadow-yellow: 0 6px 20px rgba(61,143,130,.30);

  /* Forma */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: all .18s cubic-bezier(.4,0,.2,1);

  /* Escala tipográfica */
  --font-size-caption: 11px;
  --font-size-label: 12px;
  --font-size-body: 13px;
  --font-size-body-lg: 13.5px;
  --font-size-title-sm: 15px;
  --font-size-title-md: 16px;
  --line-height-compact: 1.4;
  --line-height-body: 1.55;

  /* Escala de espaçamento */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  /* Altura de controles */
  --control-height-sm: 31px;
  --control-height-md: 37px;
  --control-height-lg: 41px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --color-yellow:       #6FBEB0;
  --color-yellow-dark:  #4FA396;
  --color-yellow-light: rgba(111,190,176,.16);
  --color-yellow-mid:   rgba(111,190,176,.35);
  --color-primary:      #6FBEB0;
  --color-primary-dark: #4FA396;
  --color-primary-light: rgba(111,190,176,.16);

  --color-body-bg:     #121212;
  --color-card-bg:     #1A1A1A;
  --color-border:      #2A2A2A;
  --color-border-soft: #232323;

  --color-text-primary:   #e5e7eb;
  --color-text-secondary: #94a3b8;
  --color-text-muted:     #64748b;

  --color-sidebar-bg:     #0D0D0D;
  --color-sidebar-border: #232323;
  --color-sidebar-text:   #9A9A9A;
  --color-sidebar-hover:  #1C1C1C;

  --shadow-xs:     0 1px 2px rgba(0,0,0,.35);
  --shadow-sm:     0 1px 4px rgba(0,0,0,.32), 0 1px 2px rgba(0,0,0,.22);
  --shadow-md:     0 8px 22px rgba(0,0,0,.35);
  --shadow-lg:     0 14px 34px rgba(0,0,0,.4);
  color-scheme: dark;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-body-bg);
  color: var(--color-text-primary);
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color .18s ease, color .18s ease;
}

html, body { max-width: 100%; overflow-x: hidden; }

a { color: var(--color-charcoal); text-decoration: none; }
a:hover { color: var(--color-yellow-dark); }

/* ============================================================
   LAYOUT
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  background: var(--color-sidebar-bg);
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--color-sidebar-border);
  transition: transform .22s ease, width .18s ease;
}

/* Brand */
.sidebar-brand {
  padding: 20px 18px;
  border-bottom: 1px solid var(--color-sidebar-border);
  flex-shrink: 0;
}

.sidebar-brand a {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
}

.sidebar-brand .brand-logo-img {
  height: 26px;
  width: auto;
  /* Fallback (logo padrão não pensada pra fundo claro/escuro): força monocromático */
  filter: brightness(0);
  opacity: .85;
}
html[data-theme="dark"] .sidebar-brand .brand-logo-img {
  filter: brightness(0) invert(1);
  opacity: .9;
}
/* Logo custom enviada nas Configurações: nunca força filtro, mostra a cor original */
.sidebar-brand .brand-logo-img.brand-logo-custom,
html[data-theme="dark"] .sidebar-brand .brand-logo-img.brand-logo-custom {
  filter: none;
  opacity: 1;
}
/* Uma logo por tema: claro é o padrão visível, escuro só aparece com data-theme=dark */
.sidebar-brand .brand-logo-img.brand-logo-dark { display: none; }
html[data-theme="dark"] .sidebar-brand .brand-logo-img.brand-logo-light { display: none; }
html[data-theme="dark"] .sidebar-brand .brand-logo-img.brand-logo-dark { display: block; }

.sidebar-brand .brand-sub {
  font-size: 9px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #3A3A3A;
  font-weight: 600;
  margin-top: 5px;
  display: block;
}

/* Ícone colapsado */
.sidebar-brand .brand-icon-small {
  display: none;
  width: 32px; height: 32px;
  background: var(--color-yellow);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}

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

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { border-radius: 2px; }

.sidebar-section-label {
  padding: 14px 16px 5px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #3A3A3A;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1px 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-sidebar-text);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-link i {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: var(--color-sidebar-hover);
  color: #D0D0D0;
  text-decoration: none;
}

.sidebar-link.active {
  background: var(--color-yellow);
  color: #ffffff;
  font-weight: 700;
}

.sidebar-link.active i { color: #ffffff; }

.sidebar-link .badge-count {
  margin-left: auto;
  background: var(--color-danger);
  color: #FFF;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
  line-height: 1.6;
}

/* Footer sidebar */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--color-sidebar-border);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-user:hover { background: var(--color-sidebar-hover); }

.sidebar-user .user-avatar {
  width: 34px; height: 34px;
  background: var(--color-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user .user-info .user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #D0D0D0;
  line-height: 1.2;
}

.sidebar-user .user-info .user-role { font-size: 10.5px; color: #555; }

/* Sidebar theme-reativa: overrides pro tema escuro (base acima assume fundo claro) */
html[data-theme="dark"] .sidebar-brand .brand-sub { color: #8A8A86; }
html[data-theme="dark"] .sidebar-section-label { color: #8A8A86; }
html[data-theme="dark"] .sidebar-link:hover { color: #D0D0D0; }
html[data-theme="dark"] .sidebar-user .user-info .user-name { color: #D0D0D0; }
html[data-theme="dark"] .sidebar-user .user-info .user-role { color: #8A8A8A; }
html[data-theme="dark"] .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); }

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  transition: margin-left .18s ease;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-height);
  background: var(--color-card-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.topbar-menu-toggle {
  width: 36px; height: 36px;
  border: 1px solid var(--color-border);
  background: var(--color-card-bg);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}

.topbar-menu-toggle:hover {
  background: var(--color-yellow-light);
  color: var(--color-charcoal);
}

.topbar .page-title {
  font-size: var(--font-size-title-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  flex: 1;
  letter-spacing: -0.2px;
}

.topbar .topbar-actions { display: flex; align-items: center; gap: 6px; }

.topbar-btn {
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.topbar-btn:hover {
  background: var(--color-yellow-light);
  color: var(--color-yellow);
}

.theme-toggle-btn i {
  font-size: 15px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.topbar-user:hover {
  background: var(--color-yellow-light);
  border-color: var(--color-yellow-mid);
}

.topbar-user .user-avatar {
  width: 30px; height: 30px;
  background: var(--color-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.topbar-user .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.topbar-user-summary-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.topbar-user-summary-email {
  font-size: 11px;
  color: var(--color-text-secondary);
}

.topbar-user-summary-badge-wrap {
  margin-top: 4px;
}

.topbar-user-summary-badge {
  font-size: 10px;
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
  flex: 1;
  min-width: 0;
  padding: var(--content-gutter);
  padding-bottom: calc(var(--content-gutter) + 8px);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.page-head-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-title-sm);
  font-weight: 700;
  letter-spacing: -0.15px;
  line-height: var(--line-height-compact);
}

.page-head-subtitle {
  margin: 2px 0 0;
  color: #64748b;
  font-size: var(--font-size-label);
  line-height: 1.45;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.page-badge-note {
  font-size: var(--font-size-label);
  color: #64748b;
  padding: 6px 12px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

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

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-soft);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header .card-title {
  font-size: var(--font-size-body-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header .card-title i { color: var(--color-yellow); font-size: 15px; }

.card-body { padding: 18px; }

/* --- Metric Cards ----------------------------------------- */
.metric-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  border-radius: 0 2px 2px 0;
}

.metric-card.primary::after   { background: var(--color-yellow); }
.metric-card.success::after   { background: var(--color-success); }
.metric-card.warning::after   { background: var(--color-warning); }
.metric-card.danger::after    { background: var(--color-danger); }
.metric-card.info::after      { background: var(--color-info); }
.metric-card.secondary::after { background: #CBD5E1; }
.metric-card.purple::after    { background: #7C3AED; }

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

.metric-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.metric-icon.primary   { background: var(--color-yellow-light); color: #2C6F65; }
.metric-icon.success   { background: #DCFCE7; color: var(--color-success); }
.metric-icon.warning   { background: #FEF3C7; color: var(--color-warning); }
.metric-icon.danger    { background: #FEE2E2; color: var(--color-danger); }
.metric-icon.info      { background: #DBEAFE; color: var(--color-info); }
.metric-icon.secondary { background: #F8FAFC; color: #64748B; }
.metric-icon.purple    { background: #EDE9FE; color: #7C3AED; }

.metric-content { flex: 1; min-width: 0; }

.metric-label {
  font-size: var(--font-size-caption);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 5px;
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1;
  letter-spacing: -0.8px;
  margin-bottom: 3px;
}

.metric-sub { font-size: var(--font-size-caption); color: var(--color-text-muted); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.1px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-primary   { background: var(--color-yellow-light); color: #1F5F55; border: 1px solid var(--color-yellow-mid); }
.badge-success   { background: #DCFCE7; color: #15803D; }
.badge-warning   { background: #FEF3C7; color: #B45309; }
.badge-danger    { background: #FEE2E2; color: #B91C1C; }
.badge-info      { background: #DBEAFE; color: #1D4ED8; }
.badge-secondary { background: #F1F5F9; color: #64748B; }
.badge-purple    { background: var(--color-yellow-light); color: var(--color-yellow-dark); }
.badge-indigo    { background: #E8ECF1; color: #3E4C63; }

/* ============================================================
   TABELAS
   ============================================================ */
.table-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.table {
  margin: 0;
  font-size: var(--font-size-body);
  line-height: 1.45;
  --bs-table-bg: transparent;
  --bs-table-color: var(--color-text-primary);
  --bs-table-border-color: var(--color-border-soft);
  --bs-table-striped-color: var(--color-text-primary);
  --bs-table-striped-bg: rgba(100, 116, 139, 0.05);
  --bs-table-hover-color: var(--color-text-primary);
  --bs-table-hover-bg: #FAFAF8;
}

.table > :not(caption) > * > * {
  background-color: var(--bs-table-bg);
  color: var(--bs-table-color);
}

.table thead th {
  background: #FAFAF8;
  color: var(--color-text-muted);
  font-size: var(--font-size-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table tbody td {
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border-soft);
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr {
  transition: background .12s ease;
  background: transparent;
}

.table tbody tr:hover {
  background: var(--bs-table-hover-bg);
}

.table tbody tr.row-atrasado {
  background: #FFF8F8;
  border-left: 3px solid var(--color-danger);
}

.table tbody tr.row-atrasado:hover { background: #FEE2E2; }

html[data-theme="dark"] .table tbody tr.row-atrasado { background: rgba(220,38,38,.08); }
html[data-theme="dark"] .table tbody tr.row-atrasado:hover { background: rgba(220,38,38,.16); }

/* ============================================================
   LISTA (TAREFAS / CONCLUÍDAS)
   ============================================================ */
.list-mode-card {
  border-radius: 12px;
  overflow: hidden;
}

.list-mode-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--color-border-soft);
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAF8 100%);
}

.list-mode-title {
  font-size: var(--font-size-label);
  color: #64748B;
  font-weight: 700;
}

.list-mode-search {
  width: 100%;
  max-width: 300px;
}

.list-mode-table-wrap {
  padding: 8px 8px 10px;
}

.list-mode-table-wrap .table-responsive {
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  background: #fff;
}

.list-mode-table-wrap .table {
  margin-bottom: 0;
}

.table-list-wide {
  min-width: 980px;
}

/* Avatar na tabela */
.user-avatar-sm {
  width: 28px; height: 28px;
  background: var(--color-yellow);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  font-size: var(--font-size-body);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all .17s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.45;
  white-space: nowrap;
  letter-spacing: -0.1px;
  min-height: var(--control-height-md);
}

.btn:active { transform: translateY(0) !important; }

.btn-primary {
  background: var(--color-yellow);
  border-color: var(--color-yellow);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(61,143,130,.25), 0 1px 2px rgba(61,143,130,.15);
}

.btn-primary:hover {
  background: var(--color-yellow-dark);
  border-color: var(--color-yellow-dark);
  color: #ffffff;
  box-shadow: var(--shadow-yellow);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
  box-shadow: 0 1px 3px rgba(22,163,74,.2);
}
.btn-success:hover { background: #15803D; color: #fff; box-shadow: 0 4px 12px rgba(22,163,74,.3); transform: translateY(-1px); }

.btn-danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
  box-shadow: 0 1px 3px rgba(220,38,38,.2);
}
.btn-danger:hover { background: #B91C1C; color: #fff; box-shadow: 0 4px 12px rgba(220,38,38,.3); transform: translateY(-1px); }

.btn-warning {
  background: var(--color-warning);
  border-color: var(--color-warning);
  color: #fff;
  box-shadow: 0 1px 3px rgba(217,119,6,.2);
}
.btn-warning:hover { background: #b45309; color: #fff; transform: translateY(-1px); }

.btn-outline-primary {
  background: transparent;
  border-color: var(--color-yellow-mid);
  color: #2C6F65;
}

.btn-outline-primary:hover {
  background: var(--color-yellow);
  border-color: var(--color-yellow);
  color: #ffffff;
  box-shadow: var(--shadow-yellow);
  transform: translateY(-1px);
}

.btn-sm {
  font-size: var(--font-size-label);
  padding: 5px 12px;
  border-radius: 7px;
  gap: 5px;
  font-weight: 600;
  min-height: var(--control-height-sm);
}

.btn-lg {
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 9px;
  gap: 8px;
  min-height: var(--control-height-lg);
}

.btn-icon {
  width: var(--control-height-md);
  height: var(--control-height-md);
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}

.btn-muted {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid transparent;
}

.btn-muted:hover {
  background: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
}

.btn-link-muted {
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-link-muted:hover {
  color: #64748b;
}

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
.form-label {
  font-size: var(--font-size-label);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 5px;
}

.form-control, .form-select {
  font-size: var(--font-size-body);
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  background: #fff;
  transition: var(--transition);
  line-height: 1.5;
  min-height: var(--control-height-md);
}

.form-control:focus, .form-select:focus {
  border-color: var(--color-yellow);
  box-shadow: 0 0 0 3px rgba(61,143,130,.14);
  outline: none;
}

textarea.form-control { resize: vertical; min-height: 80px; }
.form-control.form-control-sm,
.form-select.form-select-sm,
.input-group-sm > .form-control,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text {
  min-height: var(--control-height-sm);
  font-size: var(--font-size-label);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-dialog {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.modal-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border-soft);
  background: var(--theme-surface-2, #FAFAF8);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-title {
  font-size: var(--font-size-body-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title i { color: var(--color-yellow); }

.modal-body { padding: 18px; }

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--color-border-soft);
  background: var(--theme-surface-2, #FAFAF8);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-dialog.modal-dialog-scrollable .modal-body {
  max-height: calc(100dvh - 220px);
}

/* ============================================================
   OFFCANVAS
   ============================================================ */
.offcanvas.offcanvas-end {
  width: min(560px, 100vw);
}

.offcanvas-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border-soft);
}

.offcanvas-body {
  padding: 18px;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress {
  height: 5px;
  background: #F0F0EE;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  background: var(--color-yellow);
  border-radius: 3px;
  transition: width .6s ease;
}

.progress-bar.bg-success { background: var(--color-success) !important; }
.progress-bar.bg-warning { background: var(--color-warning) !important; }
.progress-bar.bg-danger  { background: var(--color-danger) !important; }

/* ============================================================
   ACTIVITY FEED
   ============================================================ */
.activity-feed { list-style: none; padding: 0; margin: 0; }

.activity-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--color-border-soft);
}

.activity-item:last-child { border-bottom: none; padding-bottom: 0; }

.activity-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-yellow);
  flex-shrink: 0;
  margin-top: 6px;
}

.activity-dot.success { background: var(--color-success); }
.activity-dot.warning { background: var(--color-warning); }
.activity-dot.danger  { background: var(--color-danger); }
.activity-dot.info    { background: var(--color-info); }

.activity-content { flex: 1; }

.activity-text { font-size: 13px; color: var(--color-text-primary); line-height: 1.5; }

.activity-meta { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }

/* ============================================================
   STATUS DOT (Infra)
   ============================================================ */
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  flex-shrink: 0;
}

.status-dot.operacional { background: var(--color-success); box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.status-dot.degradado   { background: var(--color-warning); box-shadow: 0 0 0 3px rgba(217,119,6,.15); }
.status-dot.manutencao  { background: var(--color-info);    box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.status-dot.offline     { background: var(--color-danger);  box-shadow: 0 0 0 3px rgba(220,38,38,.15); }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
}

.filter-bar form,
.filter-bar .row {
  --bs-gutter-x: 12px;
  --bs-gutter-y: 10px;
}

.filter-bar .input-group-text {
  background: #f8fafc;
  border-color: var(--color-border);
  color: #94a3b8;
}

/* ── Filtro padronizado (dropdown compacto) ─────────────────── */
.filter-dropdown-wrap { position: relative; display: inline-block; }
.filter-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 6px;
}
.filter-dropdown-trigger .filter-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-yellow);
}
.filter-dropdown-panel {
  position: absolute; z-index: 1085; top: calc(100% + 6px); left: 0;
  width: min(560px, 90vw);
  background: var(--theme-surface-1, #fff);
  border: 1px solid var(--theme-border-strong, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.12));
  padding: 16px;
  display: none;
}
.filter-dropdown-panel.open { display: block; }
.filter-dropdown-panel--right { left: auto; right: 0; }
.filter-dropdown-panel .row { --bs-gutter-x: 10px; --bs-gutter-y: 10px; }
.filter-dropdown-actions {
  display: flex; gap: 8px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--theme-border-strong, #e2e8f0);
}
.filter-dropdown-actions .btn { flex: 0 0 auto; }
@media (max-width: 640px) {
  .filter-dropdown-panel { position: fixed; left: 12px; right: 12px; width: auto; top: 64px; }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--color-text-muted);
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
  color: #D8D8D4;
}

.empty-state p { font-size: 13.5px; margin: 0; }

/* ============================================================
   ALERTAS
   ============================================================ */
.alert {
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.alert-success { background: #DCFCE7; border-color: #86EFAC; color: #166534; }
.alert-danger  { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
.alert-warning { background: #FEF3C7; border-color: #FDE68A; color: #92400E; }
.alert-info    { background: #DBEAFE; border-color: #93C5FD; color: #1E40AF; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: var(--color-body-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--theme-surface-1, #fff);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--theme-border-strong, #e2e8f0);
  box-shadow: var(--shadow-lg);
}

/* Logo no login */
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img {
  height: 32px;
  width: auto;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.login-logo-main {
  height: 36px;
  width: auto;
  max-width: 180px;
  display: block;
  margin: 0 auto 12px;
}

.login-divider {
  height: 1px;
  background: var(--theme-border-strong, #e2e8f0);
  margin-bottom: 24px;
}

.login-logo .login-tagline {
  font-size: 12.5px;
  color: var(--theme-text-2, #64748b);
  margin: 0;
}

.login-card .form-label { color: var(--theme-text-1); }

.login-card .form-control,
.login-card .input-group-text {
  background: var(--theme-surface-2, #f8fafc);
  border-color: var(--theme-border-strong, #e2e8f0);
  color: var(--theme-text-1);
}

.login-card .input-group-text i { color: var(--theme-text-3, #94a3b8); }

.btn-login {
  width: 100%;
  padding: 12px;
  font-size: 13.5px;
  font-weight: 700;
  background: var(--color-yellow);
  border: none;
  color: #fff;
  border-radius: 9px;
  cursor: pointer;
  transition: all .17s ease;
  letter-spacing: -0.1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-yellow);
}

.btn-login:hover {
  background: var(--color-yellow-dark);
  transform: translateY(-1px);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--theme-text-2, #64748b);
}

.login-footer > div:first-child {
  background: var(--theme-surface-2, #f8fafc) !important;
  border-color: var(--theme-border-strong, #e2e8f0) !important;
  color: var(--theme-text-2, #64748b);
}

/* ============================================================
   BANNER EXECUTIVO (Dashboard)
   ============================================================ */
.executive-banner {
  background: var(--color-charcoal);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  color: white;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
  border: 1px solid #2A2A2A;
}

.executive-banner::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(61,143,130,.10);
  pointer-events: none;
}

.executive-banner .accent { color: #4FA396; font-weight: 800; }

/* ============================================================
   INDICADORES
   ============================================================ */
.indicator-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

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

.indicator-number {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 6px;
}

.indicator-label { font-size: 12px; color: var(--color-text-secondary); font-weight: 600; }

/* ============================================================
   TABLE TOOLBARS / TABS
   ============================================================ */
.table-toolbar {
  padding: 12px 14px;
}

.table-toolbar-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.app-tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #E8E8E4;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.app-tab-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: var(--font-size-body);
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
  border-radius: 6px 6px 0 0;
}

.app-tab-btn:hover { color: #1A1A1A; background: #f8fafc; }
.app-tab-btn.active { color: #1A1A1A; border-bottom-color: var(--color-primary); }
.app-tab-pane { display: none; }
.app-tab-pane.active { display: block; }

/* ============================================================
   DROPDOWN
   ============================================================ */
.dropdown-menu {
  background: var(--color-card-bg);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  font-size: 13px;
}

.dropdown-item {
  color: var(--color-text-primary);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  transition: var(--transition);
  font-size: 13px;
}

.dropdown-item:hover { background: var(--color-yellow-light); color: var(--color-yellow); }

.dropdown-divider { border-color: var(--color-border-soft); }

/* ============================================================
   NOTIFICAÇÕES (TOPBAR)
   ============================================================ */
.notif-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
  box-shadow: 0 0 0 2px var(--color-card-bg);
}

.notif-dropdown-menu {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow: hidden;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-soft);
  background: var(--color-card-bg);
}

.notif-dropdown-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.notif-mark-all {
  border: none;
  background: transparent;
  color: #3D8F82;
  font-size: 11.5px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.notif-mark-all:hover {
  text-decoration: underline;
}

.notif-list {
  max-height: min(58vh, 430px);
  overflow-y: auto;
  background: var(--color-card-bg);
}

.notif-item {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-soft);
  transition: background .15s ease;
  cursor: pointer;
}

.notif-item:hover {
  background: rgba(61,143,130,.10);
}

.notif-item.unread {
  background: rgba(61,143,130,.16);
}

.notif-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notif-item-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.25;
}

.notif-item-time {
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.notif-item-msg {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--color-text-secondary);
  line-height: 1.35;
}

.notif-item.unread .notif-item-title {
  color: #2C6F65;
}

.notif-empty {
  padding: 16px 12px;
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: center;
}

/* ============================================================
   ANIMAÇÕES
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp .3s ease forwards; opacity: 0; }
.fade-in-up:nth-child(1) { animation-delay: .04s; }
.fade-in-up:nth-child(2) { animation-delay: .08s; }
.fade-in-up:nth-child(3) { animation-delay: .12s; }
.fade-in-up:nth-child(4) { animation-delay: .16s; }
.fade-in-up:nth-child(5) { animation-delay: .20s; }
.fade-in-up:nth-child(6) { animation-delay: .24s; }
.fade-in-up:nth-child(7) { animation-delay: .28s; }
.fade-in-up:nth-child(8) { animation-delay: .32s; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #F5F5F3; }
::-webkit-scrollbar-thumb { background: #D0D0CC; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #B0B0AA; }

/* ============================================================
   UTILIDADES
   ============================================================ */
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.cursor-pointer { cursor: pointer; }
.text-yellow { color: var(--color-yellow) !important; }

.text-truncate-custom {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

/* ============================================================
   CHARTS
   ============================================================ */
.chart-container { position: relative; width: 100%; }

.chart-h-220 { height: 220px; }
.chart-h-240 { height: 240px; }
.chart-max-280 { max-width: 280px; }

/* ============================================================
   UTILITÁRIOS DE SUPERFÍCIE/ESTADO (tema-aware)
   ============================================================ */
.theme-link-success {
  color: #10b981;
  font-weight: 600;
  text-decoration: none;
}

.theme-link-success:hover {
  color: #059669;
}

.theme-overdue-inline {
  color: #ef4444;
  font-weight: 700;
}

.theme-surface-btn {
  border: 1.5px solid var(--theme-border-strong);
  background: var(--theme-surface-1);
  color: var(--theme-text-2);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.theme-surface-btn:hover {
  background: var(--theme-surface-2);
  color: var(--theme-text-1);
}

.theme-surface-btn-primary {
  border-color: rgba(61,143,130, 0.35);
  background: var(--theme-accent-soft);
  color: var(--theme-accent-text);
}

.theme-surface-btn-primary:hover {
  background: rgba(111,190,176, 0.3);
}

.theme-surface-btn-danger {
  border-color: rgba(248, 113, 113, 0.32);
  background: var(--theme-danger-soft);
  color: var(--theme-danger-text);
}

.theme-surface-btn-danger:hover {
  background: rgba(220, 38, 38, 0.26);
}

.wf-btn {
  --wf-color: #64748b;
  --wf-border: rgba(100, 116, 139, 0.32);
  --wf-bg: rgba(100, 116, 139, 0.15);
  --wf-bg-hover: rgba(100, 116, 139, 0.25);
  border: 1.5px solid var(--wf-border);
  background: var(--wf-bg);
  color: var(--wf-color);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background .15s ease;
}

.wf-btn:hover {
  background: var(--wf-bg-hover);
}

.gh-rank-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.gh-rank-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.gh-rank-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--theme-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.gh-rank-sub {
  font-size: 10.5px;
  color: var(--theme-text-3);
}

.gh-rank-extras {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gh-rank-bar-track {
  height: 4px;
  background: var(--theme-surface-2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.gh-rank-bar-fill {
  height: 4px;
  border-radius: 3px;
}

.detail-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.responsive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.responsive-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
}

.table td .btn,
.table td .btn-sm {
  min-height: var(--control-height-sm);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 995;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  pointer-events: none;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  :root { --sidebar-width: var(--sidebar-width-rail); }

  .sidebar-brand .brand-logo-img,
  .sidebar-brand .brand-sub,
  .sidebar-link span,
  .sidebar-section-label,
  .sidebar-user .user-info,
  .sidebar-link .badge-count {
    display: none;
  }

  .sidebar-brand a { align-items: center; }
  .sidebar-brand .brand-icon-small { display: flex !important; }
  .sidebar-link { justify-content: center; padding: 10px; }
  .sidebar-link i { width: auto; }
  .sidebar-user { justify-content: center; padding: 8px 0; }

  .page-content { --content-gutter: 20px; }

  .table thead th,
  .table tbody td {
    padding-inline: 12px;
  }
}

@media (max-width: 768px) {
  :root {
    --topbar-height: 56px;
    --content-gutter: 14px;
    --font-size-body: 12.5px;
    --font-size-body-lg: 13px;
    --font-size-title-sm: 14px;
    --control-height-sm: 30px;
    --control-height-md: 36px;
  }

  .main-wrapper { margin-left: 0; }
  .sidebar {
    width: min(86vw, 320px);
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

  body.sidebar-open .sidebar { transform: translateX(0); }

  .sidebar-backdrop { display: block; }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .sidebar-brand .brand-icon-small { display: none !important; }
  .sidebar-brand .brand-logo-img,
  .sidebar-brand .brand-sub,
  .sidebar-link span,
  .sidebar-section-label,
  .sidebar-user .user-info,
  .sidebar-link .badge-count {
    display: initial;
  }
  .sidebar-link { justify-content: flex-start; padding: 9px 12px; }
  .sidebar-link i { width: 18px; }
  .sidebar-user { justify-content: flex-start; padding: 8px 10px; }

  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .topbar-menu-toggle { display: inline-flex; flex-shrink: 0; }
  .topbar .page-title {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar .topbar-actions { gap: 4px; }
  .topbar-btn { width: 34px; height: 34px; font-size: 15px; }
  .topbar-user { padding: 4px 8px; }
  .topbar-user .user-name { display: none; }

  .page-content { padding: var(--content-gutter); }
  .metric-value { font-size: 22px; }
  .login-card { padding: 32px 24px; }
  .login-logo-main { height: 30px; max-width: 160px; }

  .table-responsive > .table { min-width: 640px; }

  .list-mode-toolbar {
    padding: 10px 10px 8px;
    gap: 8px;
  }

  .list-mode-toolbar > * {
    flex: 1 1 100%;
  }

  .list-mode-search {
    max-width: none;
  }

  .list-mode-table-wrap {
    padding: 6px 6px 8px;
  }

  .table-list-wide {
    min-width: 860px;
  }

  .chart-h-220,
  .chart-h-240 { height: 200px; }
  .chart-max-280 { max-width: 100%; }

  .detail-grid-2 { grid-template-columns: 1fr; gap: 12px; }
  .responsive-toolbar { width: 100%; }
  .responsive-toolbar > * { flex: 1 1 auto; min-width: 120px; }

  .filter-bar { padding: 12px; }
  .filter-bar .row > [class*='col-'] .btn { white-space: nowrap; }
  .card-header { padding: 12px 14px; flex-wrap: wrap; }
  .card-body { padding: 16px; }

  .page-head {
    margin-bottom: 12px;
    gap: 10px;
  }

  .page-head-actions {
    width: 100%;
  }

  .page-head-actions > * {
    flex: 1 1 auto;
  }

  .app-tab-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .app-tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: var(--font-size-label);
    padding: 8px 12px;
  }

  .modal-dialog {
    margin: 10px;
  }

  .modal-dialog.modal-dialog-scrollable .modal-body {
    max-height: calc(100dvh - 180px);
  }

  .offcanvas.offcanvas-end {
    width: 100vw;
  }
}

@media (min-width: 1025px) {
  .topbar-menu-toggle { display: none !important; }
  .sidebar-backdrop { display: none !important; }
}

/* Toast animation (app.js) */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   DARK MODE REFINEMENT (GLOBAL + PÁGINAS ESPECÍFICAS)
   ============================================================ */
:root {
  --theme-surface-0: #F5F5F3;
  --theme-surface-1: #FFFFFF;
  --theme-surface-2: #F8F8F6;
  --theme-surface-3: #EFEFED;
  --theme-table-bg: #FFFFFF;
  --theme-table-head-bg: #F8F8F6;
  --theme-table-hover-bg: #F7F7F5;
  --theme-row-divider: #EBEBE8;
  --theme-border-strong: #E0E0DC;
  --theme-border-soft: #EDEDEA;
  --theme-text-1: #0f172a;
  --theme-text-2: #475569;
  --theme-text-3: #94a3b8;
  --theme-accent: #3D8F82;
  --theme-accent-strong: #2C6F65;
  --theme-accent-soft: #E6F2F0;
  --theme-accent-text: #1F5F55;
  --theme-success-text: #166534;
  --theme-success-soft: #dcfce7;
  --theme-warning-text: #92400e;
  --theme-warning-soft: #fef3c7;
  --theme-danger-text: #b91c1c;
  --theme-danger-soft: #fee2e2;
  --theme-info-text: #1e40af;
  --theme-info-soft: #dbeafe;
  --theme-hover: rgba(61,143,130, 0.12);
  --theme-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] {
  --theme-surface-0: #121212;
  --theme-surface-1: #1A1A1A;
  --theme-surface-2: #171717;
  --theme-surface-3: #1E1E1E;
  --theme-table-bg: #1A1A1A;
  --theme-table-head-bg: #202020;
  --theme-table-hover-bg: rgba(255, 255, 255, 0.06);
  --theme-row-divider: #2A2A2A;
  --theme-border-strong: #2A2A2A;
  --theme-border-soft: #232323;
  --theme-text-1: #e2e8f0;
  --theme-text-2: #cbd5e1;
  --theme-text-3: #94a3b8;
  --theme-accent: #6FBEB0;
  --theme-accent-strong: #4FA396;
  --theme-accent-soft: rgba(111,190,176, 0.22);
  --theme-accent-text: #A8E0D6;
  --theme-success-text: #86efac;
  --theme-success-soft: rgba(22, 163, 74, 0.2);
  --theme-warning-text: #fcd34d;
  --theme-warning-soft: rgba(245, 158, 11, 0.2);
  --theme-danger-text: #fca5a5;
  --theme-danger-soft: rgba(220, 38, 38, 0.2);
  --theme-info-text: #93c5fd;
  --theme-info-soft: rgba(37, 99, 235, 0.2);
  --theme-hover: rgba(111,190,176, 0.22);
  --theme-shadow: 0 12px 30px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] body {
  background: var(--theme-surface-0);
  color: var(--theme-text-1);
}

html[data-theme="dark"] a {
  color: var(--theme-accent-text);
}

html[data-theme="dark"] a:hover {
  color: #dbe3ff;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #0b1220;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #334155;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

html[data-theme="dark"] .alert-success {
  background: var(--theme-success-soft);
  border-color: rgba(134, 239, 172, 0.35);
  color: var(--theme-success-text);
}

html[data-theme="dark"] .alert-danger {
  background: var(--theme-danger-soft);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--theme-danger-text);
}

html[data-theme="dark"] .alert-warning {
  background: var(--theme-warning-soft);
  border-color: rgba(252, 211, 77, 0.3);
  color: var(--theme-warning-text);
}

html[data-theme="dark"] .alert-info {
  background: var(--theme-info-soft);
  border-color: rgba(147, 197, 253, 0.3);
  color: var(--theme-info-text);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .indicator-card,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .list-mode-card,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .cfg-section,
html[data-theme="dark"] .repo-card,
html[data-theme="dark"] .report-card,
html[data-theme="dark"] .cred-card,
html[data-theme="dark"] .cv-chip,
html[data-theme="dark"] .stat-chip,
html[data-theme="dark"] .stat-card-c,
html[data-theme="dark"] .kanban-card,
html[data-theme="dark"] .anexo-item,
html[data-theme="dark"] .drop-zone,
html[data-theme="dark"] .colab-row,
html[data-theme="dark"] .chat-modal,
html[data-theme="dark"] .chat-sidebar,
html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .chat-input-area,
html[data-theme="dark"] .members-panel {
  background: var(--theme-surface-1);
  border-color: var(--theme-border-strong);
  color: var(--theme-text-1);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .cfg-tab-btn.active,
html[data-theme="dark"] .kanban-col,
html[data-theme="dark"] .chat-main,
html[data-theme="dark"] .chat-empty,
html[data-theme="dark"] .chat-messages,
html[data-theme="dark"] .onboarding-card,
html[data-theme="dark"] .cv-onboarding,
html[data-theme="dark"] .dashboard-insights-card,
html[data-theme="dark"] .gh-insights-card,
html[data-theme="dark"] .dashboard-insights-chart-wrap,
html[data-theme="dark"] .gh-insights-chart-wrap,
html[data-theme="dark"] .table-toolbar {
  background: var(--theme-surface-2);
  border-color: var(--theme-border-soft);
  color: var(--theme-text-1);
}

html[data-theme="dark"] .table {
  --bs-table-bg: var(--theme-table-bg);
  --bs-table-color: var(--theme-text-2);
  --bs-table-border-color: var(--theme-row-divider);
  --bs-table-striped-color: var(--theme-text-2);
  --bs-table-striped-bg: rgba(148, 163, 184, 0.05);
  --bs-table-hover-color: var(--theme-text-1);
  --bs-table-hover-bg: var(--theme-table-hover-bg);
  background: var(--theme-table-bg);
}

html[data-theme="dark"] .table > :not(caption) > * > * {
  background-color: var(--bs-table-bg);
  color: var(--theme-text-2);
}

html[data-theme="dark"] .table thead th {
  background: var(--theme-table-head-bg);
  color: var(--theme-text-2);
}

html[data-theme="dark"] .table-responsive,
html[data-theme="dark"] .list-mode-table-wrap .table-responsive,
html[data-theme="dark"] .progress,
html[data-theme="dark"] pre,
html[data-theme="dark"] code {
  background: var(--theme-surface-2);
  border-color: var(--theme-border-strong);
  color: var(--theme-text-2);
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .dropdown-divider {
  border-color: var(--theme-border-soft);
}

html[data-theme="dark"] .list-mode-toolbar,
html[data-theme="dark"] .gh-insights-chart-wrap::after,
html[data-theme="dark"] .dashboard-insights-chart-wrap::after {
  background: linear-gradient(
    180deg,
    rgba(17, 26, 45, 0.92) 0%,
    rgba(15, 23, 40, 0.88) 100%
  );
}

html[data-theme="dark"] .list-mode-toolbar {
  border-bottom-color: var(--theme-row-divider);
}

html[data-theme="dark"] .list-mode-title {
  color: var(--theme-text-2);
}

html[data-theme="dark"] .table tbody tr:hover td,
html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .btn-muted:hover,
html[data-theme="dark"] .app-tab-btn:hover,
html[data-theme="dark"] .gh-tab-btn:hover,
html[data-theme="dark"] .cv-tab-btn:hover,
html[data-theme="dark"] .cfg-tab-btn:hover,
html[data-theme="dark"] .chat-item:hover,
html[data-theme="dark"] .chat-contact-item:hover,
html[data-theme="dark"] .file-row:hover,
html[data-theme="dark"] .colab-row:hover {
  background: var(--theme-hover);
  color: var(--theme-text-1);
}

html[data-theme="dark"] .topbar-menu-toggle,
html[data-theme="dark"] .topbar-user,
html[data-theme="dark"] .topbar-btn,
html[data-theme="dark"] .btn-muted,
html[data-theme="dark"] .view-btn,
html[data-theme="dark"] .fchip,
html[data-theme="dark"] .detail-btn,
html[data-theme="dark"] .pg-btn,
html[data-theme="dark"] .chat-action-btn,
html[data-theme="dark"] .chat-load-more button,
html[data-theme="dark"] .feed-filter-input,
html[data-theme="dark"] .chat-search input,
html[data-theme="dark"] .chat-input-wrap,
html[data-theme="dark"] .input-group-text {
  background: var(--theme-surface-2);
  color: var(--theme-text-2);
  border-color: var(--theme-border-strong);
}

html[data-theme="dark"] .btn-muted,
html[data-theme="dark"] .pg-btn,
html[data-theme="dark"] .detail-btn {
  border-color: var(--theme-border-strong);
}

html[data-theme="dark"] .app-tab-nav,
html[data-theme="dark"] .gh-tab-nav,
html[data-theme="dark"] .cv-tab-nav,
html[data-theme="dark"] .cfg-tab-nav,
html[data-theme="dark"] .table tbody td,
html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .repo-card,
html[data-theme="dark"] .cfg-section-header,
html[data-theme="dark"] .chat-sidebar-header,
html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .chat-date-sep::before,
html[data-theme="dark"] .chat-date-sep::after,
html[data-theme="dark"] .cl-section-line,
html[data-theme="dark"] .dashboard-commit-row,
html[data-theme="dark"] .info-row,
html[data-theme="dark"] .gh-feed-header,
html[data-theme="dark"] .commit-item {
  border-color: var(--theme-border-soft);
}

html[data-theme="dark"] .page-head-title,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .metric-value,
html[data-theme="dark"] .indicator-number,
html[data-theme="dark"] .cfg-section-header strong,
html[data-theme="dark"] .repo-name,
html[data-theme="dark"] .commit-resumo,
html[data-theme="dark"] .chat-item-name,
html[data-theme="dark"] .chat-header-name,
html[data-theme="dark"] .chat-sidebar-title,
html[data-theme="dark"] .cc-name,
html[data-theme="dark"] .colab-name,
html[data-theme="dark"] .stat-box-val,
html[data-theme="dark"] .info-row-value,
html[data-theme="dark"] .colab-pick-name,
html[data-theme="dark"] .member-name {
  color: var(--theme-text-1);
}

html[data-theme="dark"] .page-head-subtitle,
html[data-theme="dark"] .metric-label,
html[data-theme="dark"] .metric-sub,
html[data-theme="dark"] .indicator-label,
html[data-theme="dark"] .activity-meta,
html[data-theme="dark"] .repo-meta,
html[data-theme="dark"] .commit-original,
html[data-theme="dark"] .chat-item-preview,
html[data-theme="dark"] .chat-header-sub,
html[data-theme="dark"] .chat-item-time,
html[data-theme="dark"] .cc-sub,
html[data-theme="dark"] .colab-meta,
html[data-theme="dark"] .info-row-label,
html[data-theme="dark"] .stat-box-lbl,
html[data-theme="dark"] .cfg-tab-btn,
html[data-theme="dark"] .gh-tab-btn,
html[data-theme="dark"] .cv-tab-btn,
html[data-theme="dark"] .member-sub,
html[data-theme="dark"] .member-inativo {
  color: var(--theme-text-3);
}

html[data-theme="dark"] .stat-box {
  background: var(--theme-surface-2);
  border-color: var(--theme-border-strong);
}

html[data-theme="dark"] .stat-val-c {
  color: var(--theme-text-1);
}

html[data-theme="dark"] .stat-lbl-c {
  color: var(--theme-text-2);
}

html[data-theme="dark"] .fchip {
  background: var(--theme-surface-2);
  border-color: var(--theme-border-strong);
  color: var(--theme-text-2);
}

html[data-theme="dark"] .fchip:hover {
  background: var(--theme-hover);
  color: var(--theme-text-1);
}

html[data-theme="dark"] .fchip.active {
  background: #10b981;
  border-color: #10b981;
  color: #ecfdf5;
}

html[data-theme="dark"] .th-sortable .sort-ind {
  color: #b1c1d9;
}

html[data-theme="dark"] .th-sortable.sort-asc .sort-ind,
html[data-theme="dark"] .th-sortable.sort-desc .sort-ind {
  color: #86efac;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-check-input {
  background: var(--theme-surface-2);
  border-color: var(--theme-border-strong);
  color: var(--theme-text-1);
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .form-select::placeholder {
  color: #6b7a94;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .chat-search input:focus,
html[data-theme="dark"] .chat-input-wrap:focus-within,
html[data-theme="dark"] .feed-filter-input:focus {
  background: var(--theme-surface-3);
  border-color: #4FA396;
  color: var(--theme-text-1);
  box-shadow: 0 0 0 0.18rem rgba(111,190,176, 0.24);
}

html[data-theme="dark"] .notif-dropdown-menu,
html[data-theme="dark"] .notif-list,
html[data-theme="dark"] .notif-dropdown-header {
  background: var(--theme-surface-1);
  border-color: var(--theme-border-strong);
}

html[data-theme="dark"] .notif-dropdown-title {
  color: var(--theme-text-1);
}

html[data-theme="dark"] .notif-mark-all {
  color: var(--theme-accent);
}

html[data-theme="dark"] .notif-item {
  border-bottom-color: var(--theme-border-soft);
}

html[data-theme="dark"] .notif-item:hover {
  background: var(--theme-hover);
}

html[data-theme="dark"] .notif-item-title {
  color: var(--theme-text-1);
}

html[data-theme="dark"] .notif-item-msg {
  color: var(--theme-text-2);
}

html[data-theme="dark"] .notif-item-time,
html[data-theme="dark"] .notif-empty {
  color: var(--theme-text-3);
}

html[data-theme="dark"] .notif-item.unread {
  background: rgba(111,190,176, 0.24);
}

html[data-theme="dark"] .notif-item.unread .notif-item-title {
  color: #A8E0D6;
}

html[data-theme="dark"] .chat-item.active,
html[data-theme="dark"] .chat-contact-item.active,
html[data-theme="dark"] .colab-pick-item.selected {
  background: rgba(111,190,176, 0.24);
}

html[data-theme="dark"] .kanban-drop-zone.drag-over,
html[data-theme="dark"] .anexo-dropzone.drag-over {
  background: rgba(111,190,176, 0.2);
}

html[data-theme="dark"] .msg-bubble.other,
html[data-theme="dark"] .msg-sistema,
html[data-theme="dark"] .file-preview-bar {
  background: var(--theme-surface-3);
  color: var(--theme-text-2);
  border-color: var(--theme-border-strong);
}

/* Ajustes defensivos para estilos inline legados (neutros) */
html[data-theme="dark"] .page-content [style*="background:#fff" i],
html[data-theme="dark"] .page-content [style*="background: #fff" i],
html[data-theme="dark"] .page-content [style*="background:#ffffff" i],
html[data-theme="dark"] .page-content [style*="background: #ffffff" i],
html[data-theme="dark"] .offcanvas [style*="background:#fff" i],
html[data-theme="dark"] .offcanvas [style*="background: #fff" i],
html[data-theme="dark"] .offcanvas [style*="background:#ffffff" i],
html[data-theme="dark"] .offcanvas [style*="background: #ffffff" i] {
  background: var(--theme-surface-1) !important;
}

html[data-theme="dark"] .page-content [style*="background:#fafafa" i],
html[data-theme="dark"] .page-content [style*="background: #fafafa" i],
html[data-theme="dark"] .page-content [style*="background:#fafaf8" i],
html[data-theme="dark"] .page-content [style*="background: #fafaf8" i],
html[data-theme="dark"] .page-content [style*="background:#f8fafc" i],
html[data-theme="dark"] .page-content [style*="background: #f8fafc" i],
html[data-theme="dark"] .page-content [style*="background:#f1f5f9" i],
html[data-theme="dark"] .page-content [style*="background: #f1f5f9" i],
html[data-theme="dark"] .offcanvas [style*="background:#fafafa" i],
html[data-theme="dark"] .offcanvas [style*="background: #fafafa" i],
html[data-theme="dark"] .offcanvas [style*="background:#fafaf8" i],
html[data-theme="dark"] .offcanvas [style*="background: #fafaf8" i],
html[data-theme="dark"] .offcanvas [style*="background:#f8fafc" i],
html[data-theme="dark"] .offcanvas [style*="background: #f8fafc" i],
html[data-theme="dark"] .offcanvas [style*="background:#f1f5f9" i],
html[data-theme="dark"] .offcanvas [style*="background: #f1f5f9" i] {
  background: var(--theme-surface-2) !important;
}

html[data-theme="dark"] .page-content [style*="background:#f0fdf4" i],
html[data-theme="dark"] .page-content [style*="background: #f0fdf4" i],
html[data-theme="dark"] .page-content [style*="background:#dcfce7" i],
html[data-theme="dark"] .page-content [style*="background: #dcfce7" i],
html[data-theme="dark"] .offcanvas [style*="background:#f0fdf4" i],
html[data-theme="dark"] .offcanvas [style*="background: #f0fdf4" i],
html[data-theme="dark"] .offcanvas [style*="background:#dcfce7" i],
html[data-theme="dark"] .offcanvas [style*="background: #dcfce7" i] {
  background: rgba(16, 185, 129, 0.16) !important;
}

html[data-theme="dark"] .page-content [style*="background:#fffbeb" i],
html[data-theme="dark"] .page-content [style*="background: #fffbeb" i],
html[data-theme="dark"] .page-content [style*="background:#fef3c7" i],
html[data-theme="dark"] .page-content [style*="background: #fef3c7" i],
html[data-theme="dark"] .offcanvas [style*="background:#fffbeb" i],
html[data-theme="dark"] .offcanvas [style*="background: #fffbeb" i],
html[data-theme="dark"] .offcanvas [style*="background:#fef3c7" i],
html[data-theme="dark"] .offcanvas [style*="background: #fef3c7" i] {
  background: rgba(245, 158, 11, 0.15) !important;
}

html[data-theme="dark"] .page-content [style*="linear-gradient(135deg,#fafafa,#f1f5f9)" i],
html[data-theme="dark"] .page-content [style*="linear-gradient(180deg, #ffffff 0%, #f8fbff 100%)" i],
html[data-theme="dark"] .offcanvas [style*="linear-gradient(135deg,#fafafa,#f1f5f9)" i],
html[data-theme="dark"] .offcanvas [style*="linear-gradient(180deg, #ffffff 0%, #f8fbff 100%)" i] {
  background: linear-gradient(180deg, #111a2d 0%, #0f1728 100%) !important;
}

html[data-theme="dark"] .page-content [style*="border:1px solid #e2e8f0" i],
html[data-theme="dark"] .page-content [style*="border: 1px solid #e2e8f0" i],
html[data-theme="dark"] .page-content [style*="border:1.5px solid #e2e8f0" i],
html[data-theme="dark"] .page-content [style*="border: 1.5px solid #e2e8f0" i],
html[data-theme="dark"] .page-content [style*="border:1px solid #E8E8E4" i],
html[data-theme="dark"] .page-content [style*="border: 1px solid #E8E8E4" i],
html[data-theme="dark"] .page-content [style*="border:1.5px solid #E8E8E4" i],
html[data-theme="dark"] .page-content [style*="border: 1.5px solid #E8E8E4" i],
html[data-theme="dark"] .page-content [style*="border-top:1px solid #F1F5F9" i],
html[data-theme="dark"] .page-content [style*="border-bottom:1px solid #F1F5F9" i],
html[data-theme="dark"] .page-content [style*="border-top:1px solid #f1f5f9" i],
html[data-theme="dark"] .page-content [style*="border-bottom:1px solid #f1f5f9" i],
html[data-theme="dark"] .page-content [style*="border-bottom:1px solid #f8fafc" i],
html[data-theme="dark"] .page-content [style*="border-bottom:1px solid #eef2f7" i],
html[data-theme="dark"] .offcanvas [style*="border:1px solid #e2e8f0" i],
html[data-theme="dark"] .offcanvas [style*="border: 1px solid #e2e8f0" i],
html[data-theme="dark"] .offcanvas [style*="border:1.5px solid #e2e8f0" i],
html[data-theme="dark"] .offcanvas [style*="border: 1.5px solid #e2e8f0" i],
html[data-theme="dark"] .offcanvas [style*="border:1px solid #E8E8E4" i],
html[data-theme="dark"] .offcanvas [style*="border: 1px solid #E8E8E4" i],
html[data-theme="dark"] .offcanvas [style*="border:1.5px solid #E8E8E4" i],
html[data-theme="dark"] .offcanvas [style*="border: 1.5px solid #E8E8E4" i],
html[data-theme="dark"] .offcanvas [style*="border-top:1px solid #F1F5F9" i],
html[data-theme="dark"] .offcanvas [style*="border-bottom:1px solid #F1F5F9" i],
html[data-theme="dark"] .offcanvas [style*="border-top:1px solid #f1f5f9" i],
html[data-theme="dark"] .offcanvas [style*="border-bottom:1px solid #f1f5f9" i],
html[data-theme="dark"] .offcanvas [style*="border-bottom:1px solid #f8fafc" i],
html[data-theme="dark"] .offcanvas [style*="border-bottom:1px solid #eef2f7" i] {
  border-color: var(--theme-border-strong) !important;
}

html[data-theme="dark"] .page-content [style*="border:1px solid #bbf7d0" i],
html[data-theme="dark"] .page-content [style*="border: 1px solid #bbf7d0" i],
html[data-theme="dark"] .page-content [style*="border:1px solid #fde68a" i],
html[data-theme="dark"] .page-content [style*="border: 1px solid #fde68a" i],
html[data-theme="dark"] .offcanvas [style*="border:1px solid #bbf7d0" i],
html[data-theme="dark"] .offcanvas [style*="border: 1px solid #bbf7d0" i],
html[data-theme="dark"] .offcanvas [style*="border:1px solid #fde68a" i],
html[data-theme="dark"] .offcanvas [style*="border: 1px solid #fde68a" i] {
  border-color: rgba(148, 163, 184, 0.35) !important;
}

html[data-theme="dark"] .page-content [style*="color:#0f172a" i],
html[data-theme="dark"] .page-content [style*="color: #0f172a" i],
html[data-theme="dark"] .page-content [style*="color:#1A1A1A" i],
html[data-theme="dark"] .page-content [style*="color: #1A1A1A" i],
html[data-theme="dark"] .offcanvas [style*="color:#0f172a" i],
html[data-theme="dark"] .offcanvas [style*="color: #0f172a" i],
html[data-theme="dark"] .offcanvas [style*="color:#1A1A1A" i],
html[data-theme="dark"] .offcanvas [style*="color: #1A1A1A" i] {
  color: var(--theme-text-1) !important;
}

html[data-theme="dark"] .page-content [style*="color:#475569" i],
html[data-theme="dark"] .page-content [style*="color: #475569" i],
html[data-theme="dark"] .page-content [style*="color:#64748b" i],
html[data-theme="dark"] .page-content [style*="color: #64748b" i],
html[data-theme="dark"] .page-content [style*="color:#94a3b8" i],
html[data-theme="dark"] .page-content [style*="color: #94a3b8" i],
html[data-theme="dark"] .offcanvas [style*="color:#475569" i],
html[data-theme="dark"] .offcanvas [style*="color: #475569" i],
html[data-theme="dark"] .offcanvas [style*="color:#64748b" i],
html[data-theme="dark"] .offcanvas [style*="color: #64748b" i],
html[data-theme="dark"] .offcanvas [style*="color:#94a3b8" i],
html[data-theme="dark"] .offcanvas [style*="color: #94a3b8" i] {
  color: var(--theme-text-3) !important;
}

html[data-theme="dark"] .page-content [style*="color:#166534" i],
html[data-theme="dark"] .page-content [style*="color: #166534" i],
html[data-theme="dark"] .page-content [style*="color:#15803d" i],
html[data-theme="dark"] .page-content [style*="color: #15803d" i],
html[data-theme="dark"] .page-content [style*="color:#92400e" i],
html[data-theme="dark"] .page-content [style*="color: #92400e" i],
html[data-theme="dark"] .page-content [style*="color:#b45309" i],
html[data-theme="dark"] .page-content [style*="color: #b45309" i],
html[data-theme="dark"] .offcanvas [style*="color:#166534" i],
html[data-theme="dark"] .offcanvas [style*="color: #166534" i],
html[data-theme="dark"] .offcanvas [style*="color:#15803d" i],
html[data-theme="dark"] .offcanvas [style*="color: #15803d" i],
html[data-theme="dark"] .offcanvas [style*="color:#92400e" i],
html[data-theme="dark"] .offcanvas [style*="color: #92400e" i],
html[data-theme="dark"] .offcanvas [style*="color:#b45309" i],
html[data-theme="dark"] .offcanvas [style*="color: #b45309" i] {
  color: #d1fae5 !important;
}

html[data-theme="dark"] .notif-bar,
html[data-theme="dark"] .notif-bar-btn,
html[data-theme="dark"] .notif-bar-dismiss {
  border-color: var(--theme-border-strong) !important;
}

html[data-theme="dark"] .modal [style*="background:#f1f5f9" i],
html[data-theme="dark"] .modal [style*="background: #f1f5f9" i] {
  background: var(--theme-surface-2) !important;
}

html[data-theme="dark"] .modal [style*="color:#64748b" i],
html[data-theme="dark"] .modal [style*="color: #64748b" i],
html[data-theme="dark"] .modal [style*="color:#475569" i],
html[data-theme="dark"] .modal [style*="color: #475569" i] {
  color: var(--theme-text-3) !important;
}

/* Escopo ampliado para legados fora de .page-content/.offcanvas */
html[data-theme="dark"] .app-wrapper [style*="background:#fff" i],
html[data-theme="dark"] .app-wrapper [style*="background: #fff" i],
html[data-theme="dark"] .app-wrapper [style*="background:#ffffff" i],
html[data-theme="dark"] .app-wrapper [style*="background: #ffffff" i] {
  background: var(--theme-surface-1) !important;
}

html[data-theme="dark"] .app-wrapper [style*="background:#f1f5f9" i],
html[data-theme="dark"] .app-wrapper [style*="background: #f1f5f9" i],
html[data-theme="dark"] .app-wrapper [style*="background:#f8fafc" i],
html[data-theme="dark"] .app-wrapper [style*="background: #f8fafc" i],
html[data-theme="dark"] .app-wrapper [style*="background:#fafafa" i],
html[data-theme="dark"] .app-wrapper [style*="background: #fafafa" i] {
  background: var(--theme-surface-2) !important;
}

html[data-theme="dark"] .app-wrapper [style*="background:#eef2ff" i],
html[data-theme="dark"] .app-wrapper [style*="background: #eef2ff" i],
html[data-theme="dark"] .app-wrapper [style*="background:#eff6ff" i],
html[data-theme="dark"] .app-wrapper [style*="background: #eff6ff" i],
html[data-theme="dark"] .app-wrapper [style*="background:#ede9fe" i],
html[data-theme="dark"] .app-wrapper [style*="background: #ede9fe" i],
html[data-theme="dark"] .app-wrapper [style*="background:#dbeafe" i],
html[data-theme="dark"] .app-wrapper [style*="background: #dbeafe" i] {
  background: var(--theme-accent-soft) !important;
}

html[data-theme="dark"] .app-wrapper [style*="border:1px solid #e2e8f0" i],
html[data-theme="dark"] .app-wrapper [style*="border: 1px solid #e2e8f0" i],
html[data-theme="dark"] .app-wrapper [style*="border:1.5px solid #e2e8f0" i],
html[data-theme="dark"] .app-wrapper [style*="border: 1.5px solid #e2e8f0" i],
html[data-theme="dark"] .app-wrapper [style*="border:1px solid #E8E8E4" i],
html[data-theme="dark"] .app-wrapper [style*="border: 1px solid #E8E8E4" i] {
  border-color: var(--theme-border-strong) !important;
}

html[data-theme="dark"] .app-wrapper [style*="color:#1A1A1A" i],
html[data-theme="dark"] .app-wrapper [style*="color: #1A1A1A" i],
html[data-theme="dark"] .app-wrapper [style*="color:#0f172a" i],
html[data-theme="dark"] .app-wrapper [style*="color: #0f172a" i],
html[data-theme="dark"] .app-wrapper [style*="color:#334155" i],
html[data-theme="dark"] .app-wrapper [style*="color: #334155" i] {
  color: var(--theme-text-1) !important;
}

html[data-theme="dark"] .app-wrapper [style*="color:#94a3b8" i],
html[data-theme="dark"] .app-wrapper [style*="color: #94a3b8" i],
html[data-theme="dark"] .app-wrapper [style*="color:#64748b" i],
html[data-theme="dark"] .app-wrapper [style*="color: #64748b" i],
html[data-theme="dark"] .app-wrapper [style*="color:#475569" i],
html[data-theme="dark"] .app-wrapper [style*="color: #475569" i] {
  color: var(--theme-text-3) !important;
}

html[data-theme="dark"] .app-wrapper [style*="color:#4f46e5" i],
html[data-theme="dark"] .app-wrapper [style*="color: #4f46e5" i],
html[data-theme="dark"] .app-wrapper [style*="color:#3730a3" i],
html[data-theme="dark"] .app-wrapper [style*="color: #3730a3" i],
html[data-theme="dark"] .app-wrapper [style*="color:#2563eb" i],
html[data-theme="dark"] .app-wrapper [style*="color: #2563eb" i] {
  color: var(--theme-accent-text) !important;
}

html[data-theme="dark"] .app-wrapper [style*="background:#4f46e5" i],
html[data-theme="dark"] .app-wrapper [style*="background: #4f46e5" i] {
  background: var(--theme-accent-strong) !important;
}
