
/* ===============================================
   ARCA1 WEB - ESTILOS ESPECÍFICOS
   =============================================== */

/* -----------------------------------------------
   TOKENS DE COLOR — FUENTE ÚNICA DE VERDAD
   Para cambiar la identidad visual, editar SOLO
   estos valores. El cambio se propaga a toda la UI.
   ----------------------------------------------- */
:root {
  /* Colores — cambiar aquí propaga a toda la UI */
  --color-primary:       #3D85D3;  /* Azul Arca1 — acción principal  */
  --color-primary-dark:  #0B4A8E;  /* Azul oscuro — contraste, éxito */
  --color-primary-deep:  #0D1936;  /* Azul noche — hover, dark base  */

  /* Tipografía — cambiar aquí propaga a toda la UI */
  --font-display: 'Josefin Sans', sans-serif;  /* Títulos, cards, métricas    */
  --font-body:    'Josefin Sans', sans-serif;  /* Cuerpo, descripciones       */

  /* Superficies light mode */
  --surface-base:    #D9DDE2;  /* fondo de página           */
  --surface-card:    #ffffff;  /* fondo de cards            */
  --surface-nav:     #ffffff;  /* header / nav              */
  --surface-border:  #e0e0e0;  /* bordes                    */
  --surface-hover:   #f3f4f6;  /* fondo hover / secundario  */
}

/* Superficies dark mode — escala de elevación por luminosidad */
.dark-theme {
  --surface-base:    #1e1e1e;  /* L0 — fondo de página      */
  --surface-nav:     #252526;  /* L1 — nav, card-header     */
  --surface-card:    #2d2d2d;  /* L2 — cards, panels        */
  --surface-border:  #3c3c3c;  /* bordes dark               */
  --surface-hover:   #37373d;  /* fondo hover / secundario dark */
}

@font-face {
  font-family: 'Baskerville';
  src: url('../Fonts/BASKE9.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

html, body {
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* Layout principal - 100% viewport */
.premium-layout-horizontal {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* Header fijo */
.modern-header {
  flex-shrink: 0;
}

/* Contenido principal - ocupa todo el espacio disponible */
.main-content {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  background: #D9DDE2;
}

/* =========================================
   TEMA CLARO - Estilos base sólidos
   ========================================= */
.premium-layout-horizontal {
  background: #D9DDE2;
}

.modern-header {
  background: #ffffff !important;
}

.arca1-horizontal-nav {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}

/* =========================================
   TEMA OSCURO - Colores sólidos
   ========================================= */
body.dark-theme,
.dark-theme {
  background: var(--surface-base) !important;
}

body.dark-theme .premium-layout-horizontal,
.dark-theme .premium-layout-horizontal {
  background: #1e1e1e !important;
}

body.dark-theme .main-content,
.dark-theme .main-content {
  background: var(--surface-nav) !important;
}

body.dark-theme .arca1-horizontal-nav,
.dark-theme .arca1-horizontal-nav {
  background: var(--surface-nav) !important;
  border-bottom: 1px solid var(--surface-border) !important;
}

/* =========================================
   BLAZOR ERROR UI
   ========================================= */

#blazor-error-ui {
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

/* =========================================
   PAGE LAYOUT
   ========================================= */

.page {
  position: relative;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.content {
  padding: 1.1rem;
}

/* =========================================
   PAGE CONTAINER COMPONENT
   ========================================= */

.page-container {
    min-height: 100vh;
    background: var(--bg-primary, #ffffff);
}

.page-header {
    background: linear-gradient(135deg, #eef2ff 0%, #e8e0ff 50%, #dbeafe 100%);
    border-bottom: 1px solid #c7d2fe;
    padding: 2rem;
}

.page-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.page-title-section {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex: 1;
    min-width: 300px;
}

.page-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #4338ca;
    flex-shrink: 0;
}

.page-title-content {
    flex: 1;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.875rem;
    color: #6366f1;
    margin: 0.5rem 0 0 0;
    font-weight: 500;
}

.page-description {
    font-size: 1rem;
    color: #475569;
    margin: 0.75rem 0 0 0;
    line-height: 1.5;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-action-btn {
    padding: 0.75rem 1.8rem;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    transition: all 0.18s ease;
    white-space: nowrap;
    background: linear-gradient(135deg, #3D85D3 0%, #0B4A8E 100%);
    color: #E6EEF5;
    box-shadow: 0 3px 10px rgba(61,133,211,0.35);
    letter-spacing: 0.02em;
}

.page-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(61,133,211,0.45);
}

.page-action-btn.primary {
    background: linear-gradient(135deg, #3D85D3 0%, #0B4A8E 100%);
    color: #E6EEF5;
}

.page-action-btn.primary:hover {
    background: linear-gradient(135deg, #0B4A8E 0%, #0D1936 100%);
}

.page-action-btn.secondary {
    background: linear-gradient(135deg, #0B4A8E 0%, #3D85D3 100%);
    color: #E6EEF5;
}

.page-action-btn.secondary:hover {
    background: linear-gradient(135deg, #0D1936 0%, #0B4A8E 100%);
}

.page-action-btn.compact {
    padding: 0.6rem 1.4rem;
    font-size: 0.82rem;
}

.action-icon {
    width: 16px;
    height: 16px;
}

/* =========================================
   DASHBOARD STYLES
   ========================================= */

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.metric-icon.primary {
    background: var(--color-primary);
}

.metric-icon.success {
    background: var(--color-primary-dark);
}

.metric-icon.warning {
    background: var(--color-primary);
}

.metric-icon.info {
    background: var(--color-primary-dark);
}

.dark-theme .metric-icon.primary {
    background: var(--color-primary);
}

.dark-theme .metric-icon.success {
    background: var(--color-primary-deep);
}

.dark-theme .metric-icon.warning {
    background: var(--color-primary);
}

.dark-theme .metric-icon.info {
    background: var(--color-primary-deep);
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.25rem 0;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.metric-label {
    font-size: 0.875rem;
    color: #666;
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.metric-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.metric-change.positive {
    color: #10b981;
    background: #d1fae5;
}

.metric-change.negative {
    color: #ef4444;
    background: #fee2e2;
}

.metric-change.neutral {
    color: #6b7280;
    background: #f3f4f6;
}

.content-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.form-select-sm {
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    cursor: pointer;
}

.text-link {
    color: #1368BC;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.text-link:hover {
    text-decoration: underline;
}

.content-card-body {
    padding: 1.5rem;
}

.chart-placeholder {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    gap: 1rem;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.category-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-name {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.category-percentage {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

.category-bar {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.category-progress {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.activity-icon.success {
    background: var(--color-primary);
}

.activity-icon.info {
    background: var(--color-primary-dark);
}

.activity-icon.warning {
    background: var(--color-primary);
}

.activity-icon.primary {
    background: var(--color-primary-dark);
}

.dark-theme .activity-icon.success {
    background: var(--color-primary);
}

.dark-theme .activity-icon.info {
    background: var(--color-primary-deep);
}

.dark-theme .activity-icon.warning {
    background: var(--color-primary);
}

.dark-theme .activity-icon.primary {
    background: var(--color-primary-deep);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 0.875rem;
    color: #1a1a1a;
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.activity-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #D9DDE2;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 90px;
    color: #374151;
}

.quick-action-btn:hover {
    background: #D9DDE2;
    border-color: #1368BC;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.quick-action-btn i {
    font-size: 1.5rem;
    color: #1368BC;
}

.quick-action-btn span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* =========================================
   DOCUMENT OCR STYLES
   ========================================= */

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: #1368BC;
    background: #f9fafb;
}

.upload-area.drag-over {
    border-color: #1368BC;
    border-style: solid;
    background: #dbeafe;
}

.upload-icon {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.file-input {
    display: none;
}

.file-list {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-size {
    color: #6b7280;
    font-size: 0.875rem;
}

.file-status {
    min-width: 24px;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.document-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}


.document-card--selected {
    border-color: #1368BC;
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(19, 104, 188, 0.18);
    background-color: #f0f6ff;
}

.document-card:hover {
    border-color: #1368BC;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.document-preview {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.document-info h6 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    overflow-wrap: break-word;
    word-break: break-all;
}

.extracted-data {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.data-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    display: block;
    margin-bottom: 0.5rem;
}

.data-group p {
    color: #6b7280;
    margin: 0;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    font-size: 2rem;
    color: #1368BC;
}

.stat-card h3 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0;
}

.stat-card p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* =========================================
   TEAM STYLES
   ========================================= */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.member-card {
    background: var(--surface-card, #fff);
    border: 1px solid var(--surface-border, #e0e0e0);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.member-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
    font-weight: 600;
}

.member-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin: 0 0 0.25rem 0;
}

.member-role {
    color: var(--text-secondary, #6b7280);
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

.member-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 1rem;
    border-top: 1px solid var(--surface-border, #e5e7eb);
}

.member-stat {
    text-align: center;
}

.member-stat-value {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary, #1a1a1a);
    margin: 0 0 0.25rem 0;
}

.member-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

.role-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-badge {
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--surface-border, #d1d5db);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--surface-card, #fff);
    color: var(--text-secondary, #6b7280);
    user-select: none;
}

.filter-badge.active {
    background: var(--color-primary, #1368BC);
    color: white;
    border-color: var(--color-primary, #1368BC);
    font-weight: 600;
}

.filter-badge:hover:not(.active) {
    border-color: var(--color-primary, #1368BC);
    color: var(--color-primary, #1368BC);
}

/* Dark theme — Team/Mi Familia */
.dark-theme .member-card {
    background: var(--surface-card);
    border-color: var(--surface-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dark-theme .member-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dark-theme .member-name {
    color: var(--text-primary);
}

.dark-theme .member-role {
    color: var(--text-secondary);
}

.dark-theme .member-stats {
    border-top-color: var(--surface-border);
}

.dark-theme .member-stat-value {
    color: var(--text-primary);
}

.dark-theme .member-stat-label {
    color: var(--text-secondary);
}

.dark-theme .member-info-label {
    color: var(--text-secondary);
}

.dark-theme .member-info-value {
    color: var(--text-primary);
}

.dark-theme .filter-badge {
    background: var(--surface-card);
    border-color: var(--surface-border);
    color: var(--text-secondary);
}

.dark-theme .filter-badge.active {
    background: var(--color-primary, #3D85D3);
    border-color: var(--color-primary, #3D85D3);
    color: #ffffff;
}

.dark-theme .filter-badge:hover:not(.active) {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--surface-hover);
}

/* Dark theme — botones de acción en tarjeta de miembro */
.dark-theme .member-action-secondary {
    background: var(--surface-hover);
    border-color: var(--surface-border);
    color: var(--text-primary);
}

.dark-theme .member-action-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--surface-card);
}

.dark-theme .member-action-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.dark-theme .member-action-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #f87171;
}

/* Dark theme — modal de miembro */
.dark-theme .modal-container {
    background: var(--surface-card);
}

.dark-theme .modal-footer {
    border-top-color: var(--surface-border);
}

.dark-theme .modal-action-cancel {
    background: var(--surface-hover);
    color: var(--text-secondary);
    border-color: var(--surface-border);
}

.dark-theme .modal-action-cancel:hover {
    background: var(--surface-border);
    color: var(--text-primary);
}

.dark-theme .member-status-badge.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.dark-theme .member-status-badge.status-inactive {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}


/* =========================================
   SETTINGS PAGE
   ========================================= */

.settings-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* --- Sidebar nav --- */
.settings-nav {
    background: var(--surface-card, #fff);
    border-radius: 12px;
    border: 1px solid var(--surface-border, #e0e0e0);
    overflow: hidden;
    position: sticky;
    top: 1rem;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--surface-border, #e0e0e0);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
    color: var(--text-primary, #191919);
}

.settings-nav-item:last-child {
    border-bottom: none;
}

.settings-nav-item:hover {
    background: rgba(61, 133, 211, 0.06);
}

.settings-nav-item.active {
    background: var(--color-primary, #3D85D3);
    color: #ffffff;
    border-bottom-color: transparent;
}

.settings-nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(61, 133, 211, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--color-primary, #3D85D3);
    flex-shrink: 0;
}

.settings-nav-item.active .settings-nav-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.settings-nav-label {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
}

.settings-nav-arrow {
    font-size: 0.65rem;
    color: #aaa;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.settings-nav-item:hover .settings-nav-arrow,
.settings-nav-item.active .settings-nav-arrow {
    opacity: 1;
    color: var(--color-primary, #3D85D3);
}

/* --- Panel derecho --- */
.settings-panel {
    background: var(--surface-card, #fff);
    border-radius: 12px;
    border: 1px solid var(--surface-border, #e0e0e0);
    overflow: hidden;
}

.settings-panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--surface-border, #e0e0e0);
    background: rgba(61, 133, 211, 0.04);
}

.settings-panel-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--color-primary, #3D85D3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.settings-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #191919);
    margin: 0 0 0.2rem 0;
}

.settings-panel-desc {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 0;
}

/* --- Items en el panel (extiende report-item) --- */
.settings-item {
    cursor: pointer;
    padding: 1rem 1.5rem;
}

.settings-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(61, 133, 211, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--color-primary, #3D85D3);
    flex-shrink: 0;
    margin-right: 1rem;
}

.settings-item-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.settings-item-desc {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
}

.settings-item-chevron {
    font-size: 0.75rem;
    color: #ccc;
    transition: color 0.15s ease, transform 0.15s ease;
}

.settings-item:hover .settings-item-chevron {
    color: var(--color-primary, #3D85D3);
    transform: translateX(3px);
}

/* --- Dark mode --- */
.dark-theme .settings-nav,
.dark-theme .settings-panel {
    background: var(--surface-card);
    border-color: var(--surface-border);
}

.dark-theme .settings-nav-item {
    color: #e4e4e4;
    border-bottom-color: var(--surface-border);
}

.dark-theme .settings-nav-item:hover {
    background: rgba(61, 133, 211, 0.1);
}

.dark-theme .settings-nav-item.active {
    background: var(--color-primary, #3D85D3);
    color: #ffffff;
    border-bottom-color: transparent;
}

.dark-theme .settings-panel-header {
    background: rgba(61, 133, 211, 0.07);
    border-bottom-color: var(--surface-border);
}

.dark-theme .settings-panel-title {
    color: #e4e4e4;
}

/* --- Responsive: mobile --- */
@media (max-width: 768px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        border-radius: 10px;
        position: static;
    }

    .settings-nav-item {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
        padding: 0.75rem 1rem;
        min-width: 90px;
        border-bottom: none;
        border-right: 1px solid var(--surface-border, #e0e0e0);
        text-align: center;
    }

    .settings-nav-item:last-child {
        border-right: none;
    }

    .settings-nav-item.active {
        border-left: none;
        border-bottom: 3px solid var(--color-primary, #3D85D3);
    }

    .settings-nav-label {
        font-size: 0.68rem;
    }

    .settings-nav-arrow {
        display: none;
    }
}

/* =========================================
   REPORTS STYLES
   ========================================= */

.report-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.report-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.report-info {
    flex: 1;
}

.report-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.report-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
}

.report-templates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.template-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.template-card:hover {
    border-color: #1368BC;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.template-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

.template-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.template-description {
    font-size: 0.875rem;
    color: #6b7280;
}

/* =========================================
   RESPONSIVE STYLES
   ========================================= */

/* =========================================
   OCR DOCUMENT STYLES
   ========================================= */

.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: #1368BC;
    background: #eff6ff;
}

.upload-zone.drag-over {
    border-color: #1368BC;
    border-style: solid;
    background: #dbeafe;
}

.structured-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.result-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item-full {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.result-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.result-value {
    color: #111827;
    font-size: 0.875rem;
}

.activos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.activo-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.activo-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem;
    }

    .page-header-content {
        flex-direction: column;
    }

    .page-title-section {
        width: 100%;
    }

    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-content {
        padding: 1.5rem;
    }

    .metric-card {
        padding: 1rem;
    }

    .metric-value {
        font-size: 1.5rem;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .document-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .activos-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   DATA TABLE COMPONENT STYLES
   ========================================= */

.data-table-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.data-table-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.data-table-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-table-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.data-table-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Filters */
.data-table-filters {
    padding: 1.5rem 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    flex-wrap: wrap;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.data-table-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.data-table-filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.data-table-search-input {
    padding: 0.625rem 0.875rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #111827;
    background: #ffffff;
    transition: all 0.2s;
    outline: none;
}

.data-table-search-input:focus {
    border-color: #1368BC;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.data-table-search-input::placeholder {
    color: #9ca3af;
}

.data-table-select-wrapper {
    position: relative;
}

.data-table-select {
    padding: 0.625rem 2.5rem 0.625rem 0.875rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #111827;
    background: #ffffff;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s;
    outline: none;
    min-width: 200px;
}

.data-table-select:focus {
    border-color: #1368BC;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.data-table-select-wrapper::after {
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

/* Table */
.data-table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table-head {
    background: #f9fafb;
}

.data-table-th {
    padding: 0.875rem 1.5rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.data-table-th-actions {
    text-align: right;
}

.data-table-body {
    background: #ffffff;
}

.data-table-row {
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.data-table-row:hover {
    background: #f9fafb;
}

.data-table-td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

/* Actions */
.data-table-actions {
    text-align: right;
    white-space: nowrap;
}

.data-table-action-btn {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.data-table-action-btn:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.data-table-action-edit {
    color: #1368BC;
    border-color: #1368BC;
}

.data-table-action-edit:hover {
    background: #eff6ff;
    color: #1368BC;
}

.data-table-action-delete {
    color: #ef4444;
    border-color: #ef4444;
}

.data-table-action-delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Empty State */
.data-table-empty {
    padding: 4rem 2rem;
    text-align: center;
}

.data-table-empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.data-table-empty-content i {
    color: #d1d5db;
}

.data-table-empty-content p {
    color: #9ca3af;
    font-size: 1rem;
    margin: 0;
}

/* Footer & Pagination */
.data-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-wrap: wrap;
    gap: 1rem;
}

.data-table-pagination-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.data-table-pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.data-table-pagination-btn {
    padding: 0.5rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 38px;
    text-align: center;
}

.data-table-pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.data-table-pagination-btn.active {
    background: #1368BC;
    color: #ffffff;
    border-color: #1368BC;
}

.data-table-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Helper Classes for Table Content */
.data-table-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.data-table-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.data-table-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.data-table-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.data-table-badge.info {
    background: #dbeafe;
    color: #1368BC;
}

.data-table-badge.neutral {
    background: #f3f4f6;
    color: #374151;
}

/* Asset/Item Display */
.data-table-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.data-table-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.data-table-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.data-table-item-name {
    font-weight: 600;
    color: #111827;
    margin: 0;
    font-size: 0.875rem;
}

.data-table-item-code {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .data-table-header {
        padding: 1rem 1.5rem;
    }

    .data-table-filters {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .data-table-filter-group {
        min-width: 100%;
    }

    .data-table-th,
    .data-table-td {
        padding: 0.75rem 1rem;
    }

    .data-table-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: stretch;
    }

    .data-table-pagination {
        justify-content: center;
    }

    .data-table-pagination-info {
        text-align: center;
    }
}

/* ===============================================
   DARK THEME - VS CODE STYLE (GLOBAL)
   =============================================== */

body.dark-theme,
.dark-theme {
    /* Background Colors */
    --bg-primary: #1e1e1e !important;
    --bg-secondary: #252526 !important;
    --bg-tertiary: #2d2d2d !important;
    --bg-card: #252526 !important;

    /* Text Colors */
    --text-primary: #e4e4e4 !important;
    --text-secondary: #cccccc !important;
    --text-tertiary: #9d9d9d !important;
    --text-muted: #6d6d6d !important;

    /* Border Colors */
    --border-light: #3c3c3c !important;
    --border-medium: #4a4a4a !important;
    --border-dark: #5a5a5a !important;

    /* Interactive States */
    --hover-bg: #2d2d2d !important;
    --active-bg: #37373d !important;

    /* Brand Colors */
    --brand-primary: #569cd6 !important;
    --brand-secondary: #4fc1ff !important;
}

/* Global dark theme background */
body.dark-theme,
body.dark-theme .page,
body.dark-theme .content,
body.dark-theme main,
body.dark-theme .main-content,
body.dark-theme .premium-layout-horizontal,
.dark-theme,
.dark-theme .page,
.dark-theme .content,
.dark-theme main,
.dark-theme .main-content {
    background-color: #252526 !important;
    color: #e4e4e4 !important;
}

/* Cards and containers */
.dark-theme .card,
.dark-theme .panel,
.dark-theme .box,
.dark-theme .container-box,
.dark-theme .stat-card,
.dark-theme .widget,
.dark-theme .dashboard-card,
.dark-theme .data-card {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

/* Headers and titles */
.dark-theme h1,
.dark-theme h2,
.dark-theme h3,
.dark-theme h4,
.dark-theme h5,
.dark-theme h6,
.dark-theme .title,
.dark-theme .heading {
    color: #e4e4e4 !important;
}

/* Text and paragraphs */
.dark-theme p,
.dark-theme span,
.dark-theme label,
.dark-theme .text,
.dark-theme .description {
    color: #cccccc !important;
}

/* Form inputs */
.dark-theme input,
.dark-theme textarea,
.dark-theme select,
.dark-theme .form-control {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

.dark-theme input::placeholder,
.dark-theme textarea::placeholder {
    color: #6d6d6d !important;
}

.dark-theme input:focus,
.dark-theme textarea:focus,
.dark-theme select:focus {
    border-color: #569cd6 !important;
    box-shadow: 0 0 0 2px rgba(86, 156, 214, 0.2) !important;
}

/* Tables */
.dark-theme table,
.dark-theme .table {
    background-color: #2d2d2d !important;
    color: #e4e4e4 !important;
}

.dark-theme th,
.dark-theme .table-header {
    background-color: #1e1e1e !important;
    color: #e4e4e4 !important;
    border-color: #3c3c3c !important;
}

.dark-theme td,
.dark-theme tr {
    border-color: #3c3c3c !important;
}

.dark-theme tr:hover,
.dark-theme tbody tr:hover {
    background-color: #37373d !important;
}

/* Buttons */
.dark-theme .btn,
.dark-theme button {
    border-color: #4a4a4a !important;
}

.dark-theme .btn-secondary,
.dark-theme .btn-outline {
    background-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

.dark-theme .btn-secondary:hover,
.dark-theme .btn-outline:hover {
    background-color: #4a4a4a !important;
}

/* Links */
.dark-theme a {
    color: #569cd6 !important;
}

.dark-theme a:hover {
    color: #4fc1ff !important;
}

/* Dropdowns and menus */
.dark-theme .dropdown-menu,
.dark-theme .menu,
.dark-theme .popup {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

.dark-theme .dropdown-item,
.dark-theme .menu-item {
    color: #cccccc !important;
}

.dark-theme .dropdown-item:hover,
.dark-theme .menu-item:hover {
    background-color: #37373d !important;
    color: #e4e4e4 !important;
}

/* Modals and dialogs */
.dark-theme .modal,
.dark-theme .dialog,
.dark-theme .modal-content {
    background-color: #252526 !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

.dark-theme .modal-header,
.dark-theme .modal-footer {
    border-color: #3c3c3c !important;
}

/* Scrollbars */
.dark-theme ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dark-theme ::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.dark-theme ::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 5px;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

/* Sidebar / Navigation */
.dark-theme .sidebar,
.dark-theme .nav-menu,
.dark-theme .navigation {
    background-color: #1e1e1e !important;
    border-color: #3c3c3c !important;
}

.dark-theme .nav-item,
.dark-theme .nav-link {
    color: #cccccc !important;
}

.dark-theme .nav-item:hover,
.dark-theme .nav-link:hover,
.dark-theme .nav-item.active,
.dark-theme .nav-link.active {
    background-color: #37373d !important;
    color: #e4e4e4 !important;
}

/* Badges and tags */
.dark-theme .badge,
.dark-theme .tag,
.dark-theme .chip {
    background-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

/* Alerts and notifications */
.dark-theme .alert {
    border-color: #4a4a4a !important;
}

.dark-theme .alert-info {
    background-color: rgba(86, 156, 214, 0.2) !important;
    color: #569cd6 !important;
}

.dark-theme .alert-success {
    background-color: rgba(78, 201, 176, 0.2) !important;
    color: #4ec9b0 !important;
}

.dark-theme .alert-warning {
    background-color: rgba(220, 220, 170, 0.2) !important;
    color: #dcdcaa !important;
}

.dark-theme .alert-danger,
.dark-theme .alert-error {
    background-color: rgba(244, 135, 113, 0.2) !important;
    color: #f48771 !important;
}

/* Icons */
.dark-theme .icon,
.dark-theme i,
.dark-theme svg {
    color: #cccccc !important;
}

/* Specific page elements */
.dark-theme .page-header,
.dark-theme .page-title {
    color: #e4e4e4 !important;
}

.dark-theme .breadcrumb {
    background-color: transparent !important;
}

.dark-theme .breadcrumb-item {
    color: #9d9d9d !important;
}

.dark-theme .breadcrumb-item.active {
    color: #e4e4e4 !important;
}

/* Progress bars */
.dark-theme .progress {
    background-color: #3c3c3c !important;
}

/* Tabs */
.dark-theme .tabs,
.dark-theme .tab-content {
    background-color: #252526 !important;
}

.dark-theme .tab,
.dark-theme .nav-tabs .nav-link {
    color: #cccccc !important;
    border-color: #3c3c3c !important;
}

.dark-theme .tab.active,
.dark-theme .nav-tabs .nav-link.active {
    background-color: #2d2d2d !important;
    color: #e4e4e4 !important;
    border-color: #569cd6 !important;
}

/* Tooltips */
.dark-theme .tooltip {
    background-color: #1e1e1e !important;
    color: #e4e4e4 !important;
    border-color: #3c3c3c !important;
}

/* Loading indicators */
.dark-theme .loading,
.dark-theme .spinner {
    border-color: #3c3c3c !important;
    border-top-color: #569cd6 !important;
}

/* Charts and graphs (common containers) */
.dark-theme .chart-container,
.dark-theme .graph-container {
    background-color: #2d2d2d !important;
}

/* Empty states */
.dark-theme .empty-state,
.dark-theme .no-data {
    color: #6d6d6d !important;
}

/* Footer */
.dark-theme .footer,
.dark-theme footer {
    background-color: #1e1e1e !important;
    border-color: #3c3c3c !important;
    color: #9d9d9d !important;
}

/* ===============================================
   DARK THEME - SPECIFIC COMPONENTS
   =============================================== */

/* Content cards */
.dark-theme .content-card,
.dark-theme .metric-card {
    background: var(--surface-card) !important;
    background-color: var(--surface-card) !important;
    border-color: var(--surface-border) !important;
    color: #e4e4e4 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.dark-theme .content-card-body {
    background-color: var(--surface-card) !important;
    color: #e4e4e4 !important;
}

.dark-theme .card-header {
    background-color: var(--surface-nav) !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

.dark-theme .card-title {
    color: #e4e4e4 !important;
}

.dark-theme .card-body {
    background-color: #2d2d2d !important;
    color: #e4e4e4 !important;
}

/* Metric cards */
.dark-theme .metric-content {
    color: #e4e4e4 !important;
}

.dark-theme .metric-value {
    color: #e4e4e4 !important;
}

.dark-theme .metric-label {
    color: #9d9d9d !important;
}

.dark-theme .metric-change {
    color: #9d9d9d !important;
    background: rgba(255,255,255,0.06) !important;
}

.dark-theme .metric-change.positive {
    color: #7dd3c8 !important;
    background: rgba(61,133,211,0.18) !important;
}

.dark-theme .metric-change.negative {
    color: #f48771 !important;
    background: rgba(244,135,113,0.15) !important;
}

.dark-theme .metric-change.neutral {
    color: #9ca3af !important;
    background: rgba(255,255,255,0.07) !important;
}

/* Activity list */
.dark-theme .activity-list,
.dark-theme .activity-item {
    background-color: transparent !important;
    border-color: #3c3c3c !important;
}

.dark-theme .activity-content {
    color: #e4e4e4 !important;
}

.dark-theme .activity-title {
    color: #e4e4e4 !important;
}

.dark-theme .activity-time {
    color: #6d6d6d !important;
}

/* Quick actions */
.dark-theme .quick-actions {
    background-color: transparent !important;
}

.dark-theme .quick-action-btn {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

.dark-theme .quick-action-btn:hover {
    background-color: #4a4a4a !important;
    color: #ffffff !important;
}

.dark-theme .quick-action-btn i {
    color: #569cd6 !important;
}

/* Page container */
.dark-theme .page-container,
.dark-theme .page-header {
    background-color: #252526 !important;
    color: #e4e4e4 !important;
}

.dark-theme .page-title {
    color: #e4e4e4 !important;
}

.dark-theme .page-subtitle {
    color: #9d9d9d !important;
}

.dark-theme .page-description {
    color: #9d9d9d !important;
}

/* Row and column backgrounds */
.dark-theme .row {
    background-color: transparent !important;
}

/* Form selects */
.dark-theme .form-select {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

.dark-theme .form-select:focus {
    border-color: #569cd6 !important;
    box-shadow: 0 0 0 2px rgba(86, 156, 214, 0.2) !important;
}

/* Button groups */
.dark-theme .btn-group .btn {
    border-color: #4a4a4a !important;
}

.dark-theme .btn-outline-primary {
    color: #569cd6 !important;
    border-color: #569cd6 !important;
    background-color: transparent !important;
}

.dark-theme .btn-outline-primary:hover {
    background-color: #569cd6 !important;
    color: #ffffff !important;
}

.dark-theme .btn-primary {
    background-color: #569cd6 !important;
    border-color: #569cd6 !important;
    color: #ffffff !important;
}

/* Text utilities */
.dark-theme .text-muted {
    color: #6d6d6d !important;
}

.dark-theme .text-link {
    color: #569cd6 !important;
}

.dark-theme .text-link:hover {
    color: #4fc1ff !important;
}

/* Alert boxes */
.dark-theme .alert-info,
.dark-theme .info-box {
    background-color: rgba(86, 156, 214, 0.15) !important;
    border-color: rgba(86, 156, 214, 0.3) !important;
    color: #569cd6 !important;
}

/* Charts */
.dark-theme .chart-container {
    background-color: #2d2d2d !important;
}

/* Page action buttons */
.dark-theme .page-action-btn {
    background: linear-gradient(135deg, #3D85D3 0%, #0D1936 100%) !important;
    border: none !important;
    color: #E6EEF5 !important;
}

.dark-theme .page-action-btn:hover {
    background: linear-gradient(135deg, #0D1936 0%, #3D85D3 100%) !important;
    color: #E6EEF5 !important;
}

.dark-theme .page-action-btn.primary {
    background: linear-gradient(135deg, #3D85D3 0%, #0D1936 100%) !important;
    color: #E6EEF5 !important;
}

.dark-theme .page-action-btn.secondary {
    background: linear-gradient(135deg, #0D1936 0%, #3D85D3 100%) !important;
    color: #E6EEF5 !important;
}

/* Data tables specific */
.dark-theme .data-table {
    background-color: #2d2d2d !important;
}

.dark-theme .data-table th {
    background-color: #1e1e1e !important;
    color: #e4e4e4 !important;
    border-color: #3c3c3c !important;
}

.dark-theme .data-table td {
    background-color: #2d2d2d !important;
    color: #e4e4e4 !important;
    border-color: #3c3c3c !important;
}

.dark-theme .data-table tr:hover td {
    background-color: #37373d !important;
}

/* Status badges */
.dark-theme .status-badge {
    background-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

/* Navigation menu */
.dark-theme .nav-menu-horizontal,
.dark-theme .horizontal-nav {
    background-color: #1e1e1e !important;
    border-color: #3c3c3c !important;
}

.dark-theme .nav-menu-horizontal .nav-item,
.dark-theme .horizontal-nav .nav-item {
    color: #cccccc !important;
}

.dark-theme .nav-menu-horizontal .nav-item:hover,
.dark-theme .horizontal-nav .nav-item:hover {
    background-color: #2d2d2d !important;
    color: #e4e4e4 !important;
}

.dark-theme .nav-menu-horizontal .nav-item.active,
.dark-theme .horizontal-nav .nav-item.active {
    background-color: #37373d !important;
    color: #569cd6 !important;
}

/* ===============================================
   DARK THEME - REPORTS & ANALYTICS SPECIFIC
   =============================================== */

/* Report cards */
.dark-theme .report-card,
.dark-theme .report-item,
.dark-theme .quick-report,
.dark-theme .report-box {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

.dark-theme .report-card:hover,
.dark-theme .report-item:hover {
    background-color: #37373d !important;
}

/* Stats cards / Summary cards */
.dark-theme .stats-card,
.dark-theme .summary-card,
.dark-theme .stat-box,
.dark-theme .kpi-card,
.dark-theme .info-card {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

/* Analytics specific */
.dark-theme .analytics-card,
.dark-theme .chart-card,
.dark-theme .metrics-card {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

/* White background overrides - force dark on any white bg */
.dark-theme [style*="background: white"],
.dark-theme [style*="background-color: white"],
.dark-theme [style*="background: #fff"],
.dark-theme [style*="background-color: #fff"],
.dark-theme [style*="background: rgb(255"],
.dark-theme [style*="background-color: rgb(255"] {
    background-color: #2d2d2d !important;
}

/* Generic white bg classes */
.dark-theme .bg-white,
.dark-theme .bg-light {
    background-color: #2d2d2d !important;
}

/* Bootstrap cards */
.dark-theme .card {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

.dark-theme .card-header {
    background-color: #252526 !important;
    border-color: #3c3c3c !important;
}

.dark-theme .card-footer {
    background-color: #252526 !important;
    border-color: #3c3c3c !important;
}

/* Section backgrounds */
.dark-theme section,
.dark-theme .section {
    background-color: #252526 !important;
}

/* Panels and boxes */
.dark-theme .panel,
.dark-theme .panel-body,
.dark-theme .box,
.dark-theme .box-body {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

/* List groups */
.dark-theme .list-group-item {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

.dark-theme .list-group-item:hover {
    background-color: #37373d !important;
}

/* Action buttons inside cards */
.dark-theme .card .btn,
.dark-theme .report-card .btn {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

.dark-theme .card .btn:hover,
.dark-theme .report-card .btn:hover {
    background-color: #4a4a4a !important;
}

/* Export buttons */
.dark-theme .export-btn,
.dark-theme .download-btn {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

/* Filter sections */
.dark-theme .filter-section,
.dark-theme .filters,
.dark-theme .filter-container {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

/* Dividers */
.dark-theme hr,
.dark-theme .divider {
    border-color: #3c3c3c !important;
}

/* Any remaining div with light colors */
.dark-theme div[class*="card"],
.dark-theme div[class*="Card"] {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

/* Constructor section */
.dark-theme .constructor-section,
.dark-theme .builder-section {
    background-color: #252526 !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

/* ===============================================
   DARK THEME - HEADER & NAVIGATION (GLOBAL)
   =============================================== */

/* Modern Header */
body.dark-theme .modern-header,
.dark-theme .modern-header {
    background: #1e1e1e !important;
    border-bottom: 1px solid #3c3c3c !important;
    box-shadow: none !important;
}

body.dark-theme .header-brand,
.dark-theme .header-brand {
    color: #e4e4e4 !important;
}

body.dark-theme .brand-title,
body.dark-theme .brand-text h1,
.dark-theme .brand-title,
.dark-theme .brand-text h1 {
    color: #e4e4e4 !important;
}

body.dark-theme .brand-subtitle,
body.dark-theme .brand-version-badge,
.dark-theme .brand-subtitle,
.dark-theme .brand-version-badge {
    color: #9d9d9d !important;
}

/* Header Search */
body.dark-theme .header-search .search-wrapper,
.dark-theme .header-search .search-wrapper {
    background: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .search-input,
.dark-theme .search-input {
    background: transparent !important;
    color: #e4e4e4 !important;
}

body.dark-theme .search-input::placeholder,
.dark-theme .search-input::placeholder {
    color: #6d6d6d !important;
}

body.dark-theme .search-kbd,
.dark-theme .search-kbd {
    background: #3c3c3c !important;
    color: #9d9d9d !important;
    border-color: #4a4a4a !important;
}

/* Header Action Buttons */
body.dark-theme .header-btn,
body.dark-theme .header-actions button,
.dark-theme .header-btn,
.dark-theme .header-actions button {
    color: #cccccc !important;
    background: transparent !important;
}

body.dark-theme .header-btn:hover,
body.dark-theme .header-actions button:hover,
.dark-theme .header-btn:hover,
.dark-theme .header-actions button:hover {
    background: #2d2d2d !important;
    color: #e4e4e4 !important;
}

body.dark-theme .header-btn .badge,
.dark-theme .header-btn .badge {
    background: #f48771 !important;
    color: #ffffff !important;
}

/* User Menu */
body.dark-theme .user-menu,
.dark-theme .user-menu {
    color: #e4e4e4 !important;
}

body.dark-theme .user-trigger,
.dark-theme .user-trigger {
    background: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .user-trigger:hover,
.dark-theme .user-trigger:hover {
    background: #37373d !important;
}

body.dark-theme .user-name,
.dark-theme .user-name {
    color: #e4e4e4 !important;
}

body.dark-theme .user-role,
.dark-theme .user-role {
    color: #9d9d9d !important;
}

body.dark-theme .user-avatar,
.dark-theme .user-avatar {
    border-color: #3c3c3c !important;
}

body.dark-theme .chevron,
.dark-theme .chevron {
    color: #9d9d9d !important;
}

/* User Dropdown */
body.dark-theme .user-dropdown,
.dark-theme .user-dropdown {
    background: #2d2d2d !important;
    border-color: #3c3c3c !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .dropdown-header,
.dark-theme .dropdown-header {
    background: #252526 !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .dropdown-name,
.dark-theme .dropdown-name {
    color: #e4e4e4 !important;
}

body.dark-theme .dropdown-email,
.dark-theme .dropdown-email {
    color: #9d9d9d !important;
}

body.dark-theme .dropdown-divider,
.dark-theme .dropdown-divider {
    border-color: #3c3c3c !important;
    background-color: #3c3c3c !important;
}

body.dark-theme .dropdown-item,
.dark-theme .dropdown-item {
    color: #cccccc !important;
    background: transparent !important;
}

body.dark-theme .dropdown-item:hover,
.dark-theme .dropdown-item:hover {
    background: #37373d !important;
    color: #e4e4e4 !important;
}

body.dark-theme .dropdown-item.danger,
.dark-theme .dropdown-item.danger {
    color: #f48771 !important;
}

body.dark-theme .dropdown-item.danger:hover,
.dark-theme .dropdown-item.danger:hover {
    background: rgba(244, 135, 113, 0.15) !important;
}

body.dark-theme .dropdown-item svg,
.dark-theme .dropdown-item svg {
    color: #9d9d9d !important;
}

/* ===============================================
   DARK THEME - HORIZONTAL MENU (GLOBAL)
   =============================================== */

/* Main Navigation Container */
body.dark-theme .arca1-horizontal-nav,
.dark-theme .arca1-horizontal-nav {
    background: #1e1e1e !important;
    border-bottom: 1px solid #3c3c3c !important;
}

body.dark-theme .arca1-nav-container,
.dark-theme .arca1-nav-container {
    background: transparent !important;
}

body.dark-theme .arca1-nav-list,
.dark-theme .arca1-nav-list {
    background: transparent !important;
}

/* Navigation Items */
body.dark-theme .arca1-nav-item,
.dark-theme .arca1-nav-item {
    background: transparent !important;
}

body.dark-theme .arca1-nav-link,
.dark-theme .arca1-nav-link {
    color: #cccccc !important;
    background: transparent !important;
}

body.dark-theme .arca1-nav-link:hover,
.dark-theme .arca1-nav-link:hover {
    color: #e4e4e4 !important;
    background: #2d2d2d !important;
}

body.dark-theme .arca1-nav-link.active,
.dark-theme .arca1-nav-link.active {
    color: #569cd6 !important;
    background: #37373d !important;
}

body.dark-theme .arca1-nav-icon,
body.dark-theme .arca1-nav-icon i,
.dark-theme .arca1-nav-icon,
.dark-theme .arca1-nav-icon i {
    color: #9d9d9d !important;
}

body.dark-theme .arca1-nav-link:hover .arca1-nav-icon,
body.dark-theme .arca1-nav-link:hover .arca1-nav-icon i,
.dark-theme .arca1-nav-link:hover .arca1-nav-icon,
.dark-theme .arca1-nav-link:hover .arca1-nav-icon i {
    color: #569cd6 !important;
}

body.dark-theme .arca1-nav-text,
.dark-theme .arca1-nav-text {
    color: inherit !important;
}

body.dark-theme .arca1-nav-chevron,
.dark-theme .arca1-nav-chevron {
    color: #6d6d6d !important;
}

/* Dropdown Toggle */
body.dark-theme .arca1-dropdown-toggle,
.dark-theme .arca1-dropdown-toggle {
    color: #cccccc !important;
    background: transparent !important;
    border: none !important;
}

body.dark-theme .arca1-dropdown-toggle:hover,
.dark-theme .arca1-dropdown-toggle:hover {
    color: #e4e4e4 !important;
    background: #2d2d2d !important;
}

body.dark-theme .arca1-dropdown-toggle.expanded,
.dark-theme .arca1-dropdown-toggle.expanded {
    color: #569cd6 !important;
    background: #37373d !important;
}

/* Dropdown Menu */
body.dark-theme .arca1-dropdown-menu,
.dark-theme .arca1-dropdown-menu {
    background: #2d2d2d !important;
    border: 1px solid #3c3c3c !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .arca1-dropdown-grid,
.dark-theme .arca1-dropdown-grid {
    background: transparent !important;
}

body.dark-theme .arca1-dropdown-standard,
.dark-theme .arca1-dropdown-standard {
    background: transparent !important;
}

/* Dropdown Links */
body.dark-theme .arca1-dropdown-link,
.dark-theme .arca1-dropdown-link {
    color: #cccccc !important;
    background: transparent !important;
}

body.dark-theme .arca1-dropdown-link:hover,
.dark-theme .arca1-dropdown-link:hover {
    color: #e4e4e4 !important;
    background: #37373d !important;
}

body.dark-theme .arca1-dropdown-link.active,
.dark-theme .arca1-dropdown-link.active {
    color: #569cd6 !important;
    background: rgba(86, 156, 214, 0.15) !important;
}

body.dark-theme .arca1-dropdown-icon,
body.dark-theme .arca1-dropdown-icon i,
.dark-theme .arca1-dropdown-icon,
.dark-theme .arca1-dropdown-icon i {
    color: #9d9d9d !important;
}

body.dark-theme .arca1-dropdown-link:hover .arca1-dropdown-icon,
body.dark-theme .arca1-dropdown-link:hover .arca1-dropdown-icon i,
.dark-theme .arca1-dropdown-link:hover .arca1-dropdown-icon,
.dark-theme .arca1-dropdown-link:hover .arca1-dropdown-icon i {
    color: #569cd6 !important;
}

body.dark-theme .arca1-dropdown-text,
.dark-theme .arca1-dropdown-text {
    color: inherit !important;
}

/* Dropdown Sections */
body.dark-theme .arca1-dropdown-section,
.dark-theme .arca1-dropdown-section {
    border-color: #3c3c3c !important;
}

body.dark-theme .arca1-dropdown-section-title,
.dark-theme .arca1-dropdown-section-title {
    color: #9d9d9d !important;
    background: transparent !important;
}

body.dark-theme .arca1-dropdown-section-title i,
.dark-theme .arca1-dropdown-section-title i {
    color: #6d6d6d !important;
}

/* Dropdown Sublinks */
body.dark-theme .arca1-dropdown-sublink,
.dark-theme .arca1-dropdown-sublink {
    color: #cccccc !important;
    background: transparent !important;
}

body.dark-theme .arca1-dropdown-sublink:hover,
.dark-theme .arca1-dropdown-sublink:hover {
    color: #e4e4e4 !important;
    background: #37373d !important;
}

body.dark-theme .arca1-dropdown-sublink.active,
.dark-theme .arca1-dropdown-sublink.active {
    color: #569cd6 !important;
    background: rgba(86, 156, 214, 0.15) !important;
}

body.dark-theme .arca1-dropdown-subicon,
body.dark-theme .arca1-dropdown-subicon i,
.dark-theme .arca1-dropdown-subicon,
.dark-theme .arca1-dropdown-subicon i {
    color: #6d6d6d !important;
}

body.dark-theme .arca1-dropdown-subtext,
.dark-theme .arca1-dropdown-subtext {
    color: inherit !important;
}

/* ===============================================
   DARK THEME - PREMIUM LAYOUT HORIZONTAL
   =============================================== */

body.dark-theme .premium-layout-horizontal,
.dark-theme .premium-layout-horizontal {
    background: #252526 !important;
}

body.dark-theme .premium-layout-horizontal .main-content,
.dark-theme .premium-layout-horizontal .main-content {
    background: #252526 !important;
}

/* ===============================================
   DARK THEME - BOOTSTRAP TABLE OVERRIDES
   =============================================== */

/* Table container */
body.dark-theme .table-container,
body.dark-theme .table-wrapper,
body.dark-theme .enhanced-table-wrapper,
body.dark-theme .catalog-table-container,
.dark-theme .table-container,
.dark-theme .table-wrapper,
.dark-theme .enhanced-table-wrapper,
.dark-theme .catalog-table-container {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

/* Bootstrap table */
body.dark-theme .table,
body.dark-theme table.table,
.dark-theme .table,
.dark-theme table.table {
    background-color: #2d2d2d !important;
    color: #e4e4e4 !important;
    --bs-table-bg: #2d2d2d !important;
    --bs-table-color: #e4e4e4 !important;
    --bs-table-border-color: #3c3c3c !important;
    --bs-table-striped-bg: #333333 !important;
    --bs-table-striped-color: #e4e4e4 !important;
    --bs-table-hover-bg: #37373d !important;
    --bs-table-hover-color: #ffffff !important;
}

body.dark-theme .table thead,
body.dark-theme .table thead tr,
body.dark-theme .table thead th,
.dark-theme .table thead,
.dark-theme .table thead tr,
.dark-theme .table thead th {
    background-color: #1e1e1e !important;
    color: #e4e4e4 !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .table tbody,
body.dark-theme .table tbody tr,
body.dark-theme .table tbody td,
.dark-theme .table tbody,
.dark-theme .table tbody tr,
.dark-theme .table tbody td {
    background-color: #2d2d2d !important;
    color: #e4e4e4 !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .table-striped tbody tr:nth-of-type(odd),
body.dark-theme .table-striped > tbody > tr:nth-of-type(odd) > *,
.dark-theme .table-striped tbody tr:nth-of-type(odd),
.dark-theme .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #333333 !important;
    color: #e4e4e4 !important;
}

body.dark-theme .table-hover tbody tr:hover,
body.dark-theme .table-hover > tbody > tr:hover > *,
.dark-theme .table-hover tbody tr:hover,
.dark-theme .table-hover > tbody > tr:hover > * {
    background-color: #37373d !important;
    color: #ffffff !important;
}

/* Table header actions */
body.dark-theme .table-header-actions,
body.dark-theme .table-info,
.dark-theme .table-header-actions,
.dark-theme .table-info {
    background-color: transparent !important;
    color: #e4e4e4 !important;
}

body.dark-theme .table-info span,
body.dark-theme .table-info i,
.dark-theme .table-info span,
.dark-theme .table-info i {
    color: #9d9d9d !important;
}

/* Pagination */
body.dark-theme .pagination,
body.dark-theme nav.pagination,
.dark-theme .pagination,
.dark-theme nav.pagination {
    background-color: transparent !important;
}

body.dark-theme .page-item .page-link,
body.dark-theme .pagination .page-link,
.dark-theme .page-item .page-link,
.dark-theme .pagination .page-link {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #cccccc !important;
}

body.dark-theme .page-item .page-link:hover,
body.dark-theme .pagination .page-link:hover,
.dark-theme .page-item .page-link:hover,
.dark-theme .pagination .page-link:hover {
    background-color: #37373d !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .page-item.active .page-link,
body.dark-theme .pagination .page-item.active .page-link,
.dark-theme .page-item.active .page-link,
.dark-theme .pagination .page-item.active .page-link {
    background-color: #569cd6 !important;
    border-color: #569cd6 !important;
    color: #ffffff !important;
}

body.dark-theme .page-item.disabled .page-link,
body.dark-theme .pagination .page-item.disabled .page-link,
.dark-theme .page-item.disabled .page-link,
.dark-theme .pagination .page-item.disabled .page-link {
    background-color: #1e1e1e !important;
    border-color: #3c3c3c !important;
    color: #6d6d6d !important;
}

/* bg-light override */
body.dark-theme .bg-light,
body.dark-theme nav.bg-light,
body.dark-theme div.bg-light,
.dark-theme .bg-light,
.dark-theme nav.bg-light,
.dark-theme div.bg-light {
    background-color: #252526 !important;
    border-color: #3c3c3c !important;
}

/* border-top override */
body.dark-theme .border-top,
.dark-theme .border-top {
    border-top-color: #3c3c3c !important;
}

/* Input groups in dark theme */
body.dark-theme .input-group,
.dark-theme .input-group {
    background-color: transparent !important;
}

body.dark-theme .input-group .form-control,
body.dark-theme .input-group input,
.dark-theme .input-group .form-control,
.dark-theme .input-group input {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .input-group .btn,
body.dark-theme .input-group .btn-outline-secondary,
.dark-theme .input-group .btn,
.dark-theme .input-group .btn-outline-secondary {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .input-group .btn:hover,
.dark-theme .input-group .btn:hover {
    background-color: #4a4a4a !important;
}

/* Form control in table filters */
body.dark-theme .form-control,
body.dark-theme .form-control-sm,
.dark-theme .form-control,
.dark-theme .form-control-sm {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .form-control::placeholder,
.dark-theme .form-control::placeholder {
    color: #6d6d6d !important;
}

body.dark-theme .form-control:focus,
.dark-theme .form-control:focus {
    background-color: #3c3c3c !important;
    border-color: #569cd6 !important;
    color: #e4e4e4 !important;
    box-shadow: 0 0 0 2px rgba(86, 156, 214, 0.2) !important;
}

/* Search criteria banner */
body.dark-theme .search-criteria-banner,
.dark-theme .search-criteria-banner {
    background-color: rgba(86, 156, 214, 0.15) !important;
    border-color: rgba(86, 156, 214, 0.3) !important;
    color: #e4e4e4 !important;
}

/* Button styles in dark theme */
body.dark-theme .btn-secondary,
body.dark-theme .btn-outline-secondary,
.dark-theme .btn-secondary,
.dark-theme .btn-outline-secondary {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .btn-secondary:hover,
body.dark-theme .btn-outline-secondary:hover,
.dark-theme .btn-secondary:hover,
.dark-theme .btn-outline-secondary:hover {
    background-color: #4a4a4a !important;
    border-color: #5a5a5a !important;
    color: #ffffff !important;
}

body.dark-theme .btn-link,
.dark-theme .btn-link {
    color: #569cd6 !important;
}

body.dark-theme .btn-link:hover,
.dark-theme .btn-link:hover {
    color: #4fc1ff !important;
}

/* UITabs dark theme */
body.dark-theme .nav-tabs,
body.dark-theme .tab-content,
.dark-theme .nav-tabs,
.dark-theme .tab-content {
    background-color: transparent !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .nav-tabs .nav-link,
body.dark-theme .nav-tabs .nav-item .nav-link,
.dark-theme .nav-tabs .nav-link,
.dark-theme .nav-tabs .nav-item .nav-link {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #cccccc !important;
}

body.dark-theme .nav-tabs .nav-link:hover,
.dark-theme .nav-tabs .nav-link:hover {
    background-color: #37373d !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .nav-tabs .nav-link.active,
body.dark-theme .nav-tabs .nav-item.show .nav-link,
.dark-theme .nav-tabs .nav-link.active,
.dark-theme .nav-tabs .nav-item.show .nav-link {
    background-color: #252526 !important;
    border-color: #3c3c3c #3c3c3c #252526 !important;
    color: #569cd6 !important;
}

/* Alert in table */
body.dark-theme .alert-secondary,
.dark-theme .alert-secondary {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

/* Text utilities */
body.dark-theme .text-muted,
.dark-theme .text-muted {
    color: #6d6d6d !important;
}

body.dark-theme .text-warning,
.dark-theme .text-warning {
    color: #dcdcaa !important;
}

body.dark-theme .text-primary,
.dark-theme .text-primary {
    color: #569cd6 !important;
}

body.dark-theme .text-danger,
.dark-theme .text-danger {
    color: #f48771 !important;
}

/* ===============================================
   DARK THEME - DATA TABLE ASSETS COMPONENT
   =============================================== */

/* Data table container */
body.dark-theme .data-table-container,
.dark-theme .data-table-container {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

/* Data table header */
body.dark-theme .data-table-header,
.dark-theme .data-table-header {
    background-color: #252526 !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .data-table-title,
body.dark-theme .data-table-title-section h2,
.dark-theme .data-table-title,
.dark-theme .data-table-title-section h2 {
    color: #e4e4e4 !important;
}

body.dark-theme .data-table-subtitle,
.dark-theme .data-table-subtitle {
    color: #9d9d9d !important;
}

/* Data table filters */
body.dark-theme .data-table-filters,
.dark-theme .data-table-filters {
    background-color: #252526 !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .data-table-filter-group,
.dark-theme .data-table-filter-group {
    background-color: transparent !important;
}

body.dark-theme .data-table-filter-label,
.dark-theme .data-table-filter-label {
    color: #e4e4e4 !important;
}

body.dark-theme .data-table-search-input,
body.dark-theme .data-table-select,
.dark-theme .data-table-search-input,
.dark-theme .data-table-select {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .data-table-search-input::placeholder,
.dark-theme .data-table-search-input::placeholder {
    color: #6d6d6d !important;
}

body.dark-theme .data-table-search-input:focus,
body.dark-theme .data-table-select:focus,
.dark-theme .data-table-search-input:focus,
.dark-theme .data-table-select:focus {
    border-color: #569cd6 !important;
    box-shadow: 0 0 0 2px rgba(86, 156, 214, 0.2) !important;
}

/* Data table wrapper and table */
body.dark-theme .data-table-wrapper,
.dark-theme .data-table-wrapper {
    background-color: #2d2d2d !important;
}

body.dark-theme .data-table,
body.dark-theme table.data-table,
.dark-theme .data-table,
.dark-theme table.data-table {
    background-color: #2d2d2d !important;
    color: #e4e4e4 !important;
}

body.dark-theme .data-table-head,
body.dark-theme .data-table thead,
.dark-theme .data-table-head,
.dark-theme .data-table thead {
    background-color: #1e1e1e !important;
}

body.dark-theme .data-table-th,
body.dark-theme .data-table th,
.dark-theme .data-table-th,
.dark-theme .data-table th {
    background-color: #1e1e1e !important;
    color: #e4e4e4 !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .data-table-body,
body.dark-theme .data-table tbody,
.dark-theme .data-table-body,
.dark-theme .data-table tbody {
    background-color: #2d2d2d !important;
}

body.dark-theme .data-table-row,
body.dark-theme .data-table tr,
.dark-theme .data-table-row,
.dark-theme .data-table tr {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .data-table-row:hover,
body.dark-theme .data-table tr:hover,
.dark-theme .data-table-row:hover,
.dark-theme .data-table tr:hover {
    background-color: #37373d !important;
}

body.dark-theme .data-table-td,
body.dark-theme .data-table td,
.dark-theme .data-table-td,
.dark-theme .data-table td {
    background-color: transparent !important;
    color: #e4e4e4 !important;
    border-color: #3c3c3c !important;
}

/* Data table footer / pagination */
body.dark-theme .data-table-footer,
.dark-theme .data-table-footer {
    background-color: #252526 !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .data-table-pagination-info,
.dark-theme .data-table-pagination-info {
    color: #9d9d9d !important;
}

body.dark-theme .data-table-pagination-btn,
.dark-theme .data-table-pagination-btn {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #cccccc !important;
}

body.dark-theme .data-table-pagination-btn:hover,
.dark-theme .data-table-pagination-btn:hover {
    background-color: #37373d !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .data-table-pagination-btn.active,
.dark-theme .data-table-pagination-btn.active {
    background-color: #569cd6 !important;
    border-color: #569cd6 !important;
    color: #ffffff !important;
}

body.dark-theme .data-table-pagination-btn:disabled,
.dark-theme .data-table-pagination-btn:disabled {
    background-color: #1e1e1e !important;
    border-color: #3c3c3c !important;
    color: #6d6d6d !important;
}

/* Data table action buttons */
body.dark-theme .data-table-action-btn,
.dark-theme .data-table-action-btn {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #cccccc !important;
}

body.dark-theme .data-table-action-btn:hover,
.dark-theme .data-table-action-btn:hover {
    background-color: #4a4a4a !important;
}

body.dark-theme .data-table-action-edit,
.dark-theme .data-table-action-edit {
    color: #569cd6 !important;
    border-color: #569cd6 !important;
}

body.dark-theme .data-table-action-edit:hover,
.dark-theme .data-table-action-edit:hover {
    background-color: rgba(86, 156, 214, 0.15) !important;
}

body.dark-theme .data-table-action-delete,
.dark-theme .data-table-action-delete {
    color: #f48771 !important;
    border-color: #f48771 !important;
}

body.dark-theme .data-table-action-delete:hover,
.dark-theme .data-table-action-delete:hover {
    background-color: rgba(244, 135, 113, 0.15) !important;
}

/* Data table empty state */
body.dark-theme .data-table-empty,
body.dark-theme .data-table-empty-content,
.dark-theme .data-table-empty,
.dark-theme .data-table-empty-content {
    background-color: transparent !important;
    color: #6d6d6d !important;
}

body.dark-theme .data-table-empty-content i,
.dark-theme .data-table-empty-content i {
    color: #4a4a4a !important;
}

/* ===============================================
   DARK THEME - CATALOG CONSULTATION CONTAINER
   =============================================== */

body.dark-theme .catalog-consultation-container,
body.dark-theme .catalog-consultation-container-full,
body.dark-theme .catalog-consultation-content,
.dark-theme .catalog-consultation-container,
.dark-theme .catalog-consultation-container-full,
.dark-theme .catalog-consultation-content {
    background-color: transparent !important;
}

body.dark-theme .table-container-enhanced,
.dark-theme .table-container-enhanced {
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

/* ===============================================
   DARK THEME - METRIC CARDS FIX
   =============================================== */

body.dark-theme .metric-card,
.dark-theme .metric-card {
    background: var(--surface-card) !important;
    background-color: var(--surface-card) !important;
    border-color: var(--surface-border) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .metric-card .metric-content,
.dark-theme .metric-card .metric-content {
    background: transparent !important;
}

body.dark-theme .metric-card .metric-value,
body.dark-theme .metric-card h3,
.dark-theme .metric-card .metric-value,
.dark-theme .metric-card h3 {
    color: #e4e4e4 !important;
}

body.dark-theme .metric-card .metric-label,
body.dark-theme .metric-card p,
.dark-theme .metric-card .metric-label,
.dark-theme .metric-card p {
    color: #9d9d9d !important;
}

/* ===============================================
   DARK THEME - CONTENT CARD FIX
   =============================================== */

body.dark-theme .content-card,
.dark-theme .content-card {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .content-card .card-header,
.dark-theme .content-card .card-header {
    background: #252526 !important;
    background-color: #252526 !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .content-card .card-title,
body.dark-theme .content-card h5,
.dark-theme .content-card .card-title,
.dark-theme .content-card h5 {
    color: #e4e4e4 !important;
}

body.dark-theme .content-card .content-card-body,
body.dark-theme .content-card-body,
.dark-theme .content-card .content-card-body,
.dark-theme .content-card-body {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
}

/* ===============================================
   DARK THEME - TABLE FILTERS
   =============================================== */

body.dark-theme .table-filters,
body.dark-theme .filter-row,
.dark-theme .table-filters,
.dark-theme .filter-row {
    background-color: transparent !important;
}

body.dark-theme .table-filters .form-label,
body.dark-theme .table-filters label,
.dark-theme .table-filters .form-label,
.dark-theme .table-filters label {
    color: #e4e4e4 !important;
}

body.dark-theme .table-filters .form-input,
body.dark-theme .table-filters input,
body.dark-theme .table-filters .form-select,
body.dark-theme .table-filters select,
.dark-theme .table-filters .form-input,
.dark-theme .table-filters input,
.dark-theme .table-filters .form-select,
.dark-theme .table-filters select {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .table-filters .form-input::placeholder,
body.dark-theme .table-filters input::placeholder,
.dark-theme .table-filters .form-input::placeholder,
.dark-theme .table-filters input::placeholder {
    color: #6d6d6d !important;
}

/* Form input in any context */
body.dark-theme .form-input,
.dark-theme .form-input {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .form-input::placeholder,
.dark-theme .form-input::placeholder {
    color: #6d6d6d !important;
}

body.dark-theme .form-input:focus,
.dark-theme .form-input:focus {
    border-color: #569cd6 !important;
    box-shadow: 0 0 0 2px rgba(86, 156, 214, 0.2) !important;
}

/* Report list and items */
body.dark-theme .report-list,
.dark-theme .report-list {
    background-color: transparent !important;
}

body.dark-theme .report-item,
.dark-theme .report-item {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .report-item:hover,
.dark-theme .report-item:hover {
    background-color: #37373d !important;
}

body.dark-theme .report-title,
body.dark-theme .report-info h5,
.dark-theme .report-title,
.dark-theme .report-info h5 {
    color: #e4e4e4 !important;
}

body.dark-theme .report-meta,
body.dark-theme .report-meta span,
.dark-theme .report-meta,
.dark-theme .report-meta span {
    color: #9d9d9d !important;
}

/* Form groups */
body.dark-theme .form-group,
.dark-theme .form-group {
    background-color: transparent !important;
}

body.dark-theme .form-group .form-label,
body.dark-theme .form-group label,
.dark-theme .form-group .form-label,
.dark-theme .form-group label {
    color: #e4e4e4 !important;
}

/* ===============================================
   DARK THEME - CONFIRMATION DIALOG
   =============================================== */

body.dark-theme .confirmation-overlay,
.dark-theme .confirmation-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(8px) !important;
}

body.dark-theme .confirmation-container,
.dark-theme .confirmation-container {
    background: #2d2d2d !important;
    border: 1px solid #3c3c3c !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .confirmation-header,
.dark-theme .confirmation-header {
    background: linear-gradient(135deg, #569cd6 0%, #4fc1ff 100%) !important;
    border-bottom-color: #3c3c3c !important;
}

body.dark-theme .confirmation-title,
.dark-theme .confirmation-title {
    color: #ffffff !important;
}

body.dark-theme .confirmation-body,
.dark-theme .confirmation-body {
    background: #2d2d2d !important;
}

body.dark-theme .confirmation-body p,
.dark-theme .confirmation-body p {
    color: #e4e4e4 !important;
}

body.dark-theme .confirmation-footer,
.dark-theme .confirmation-footer {
    background: #252526 !important;
    border-top-color: #3c3c3c !important;
}

body.dark-theme .confirmation-footer .btn-secondary,
.dark-theme .confirmation-footer .btn-secondary {
    background: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .confirmation-footer .btn-secondary:hover,
.dark-theme .confirmation-footer .btn-secondary:hover {
    background: #4a4a4a !important;
    border-color: #5a5a5a !important;
}

body.dark-theme .confirmation-footer .btn-success,
.dark-theme .confirmation-footer .btn-success {
    background: linear-gradient(135deg, #4ec9b0 0%, #3da892 100%) !important;
    border-color: #4ec9b0 !important;
    color: #ffffff !important;
}

body.dark-theme .confirmation-footer .btn-success:hover,
.dark-theme .confirmation-footer .btn-success:hover {
    background: linear-gradient(135deg, #5dd9c0 0%, #4db8a2 100%) !important;
}

body.dark-theme .confirmation-close-btn,
.dark-theme .confirmation-close-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

body.dark-theme .confirmation-close-btn:hover,
.dark-theme .confirmation-close-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* ===============================================
   DARK THEME - ALERT DIALOG
   =============================================== */

body.dark-theme .alert-overlay,
.dark-theme .alert-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(8px) !important;
}

body.dark-theme .alert-container,
.dark-theme .alert-container {
    background: #2d2d2d !important;
    border: 1px solid #3c3c3c !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .alert-header,
.dark-theme .alert-header {
    border-bottom-color: #3c3c3c !important;
}

body.dark-theme .alert-title,
.dark-theme .alert-title {
    color: #e4e4e4 !important;
}

body.dark-theme .alert-body,
.dark-theme .alert-body {
    background: #2d2d2d !important;
}

body.dark-theme .alert-body p,
.dark-theme .alert-body p {
    color: #e4e4e4 !important;
}

body.dark-theme .alert-footer,
.dark-theme .alert-footer {
    background: #252526 !important;
    border-top-color: #3c3c3c !important;
}

body.dark-theme .alert-close-btn,
.dark-theme .alert-close-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

body.dark-theme .alert-close-btn:hover,
.dark-theme .alert-close-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* ===============================================
   DARK THEME - TOAST NOTIFICATIONS
   =============================================== */

body.dark-theme .toast-container,
.dark-theme .toast-container {
    z-index: 30000 !important;
}

body.dark-theme .toastBody,
body.dark-theme .toast,
.dark-theme .toastBody,
.dark-theme .toast {
    background: #2d2d2d !important;
    border: 1px solid #3c3c3c !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .toast-body,
.dark-theme .toast-body {
    color: #e4e4e4 !important;
}

/* ===============================================
   DARK THEME - LOADING INDICATOR
   =============================================== */

body.dark-theme .loading-overlay,
.dark-theme .loading-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
}

body.dark-theme .loading-container,
body.dark-theme .loading-indicator,
.dark-theme .loading-container,
.dark-theme .loading-indicator {
    background: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

body.dark-theme .loading-text,
body.dark-theme .spinner-text,
.dark-theme .loading-text,
.dark-theme .spinner-text {
    color: #e4e4e4 !important;
}

/* ===============================================
   DARK THEME - MODAL DIALOGS (BOOTSTRAP)
   =============================================== */

body.dark-theme .modal-content,
.dark-theme .modal-content {
    background: #2d2d2d !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

body.dark-theme .modal-header,
.dark-theme .modal-header {
    background: #252526 !important;
    border-bottom-color: #3c3c3c !important;
}

body.dark-theme .modal-title,
.dark-theme .modal-title {
    color: #e4e4e4 !important;
}

body.dark-theme .modal-body,
.dark-theme .modal-body {
    background: #2d2d2d !important;
    color: #e4e4e4 !important;
}

body.dark-theme .modal-footer,
.dark-theme .modal-footer {
    background: #252526 !important;
    border-top-color: #3c3c3c !important;
}

body.dark-theme .btn-close,
.dark-theme .btn-close {
    filter: invert(1) !important;
}

/* ===============================================
   DARK THEME - SWEETALERT STYLE DIALOGS (GLOBAL)
   =============================================== */

body.dark-theme .swal-overlay,
.dark-theme .swal-overlay {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px) !important;
}

body.dark-theme .swal-modal,
.dark-theme .swal-modal {
    background: #2d2d2d !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .swal-modal-alert,
.dark-theme .swal-modal-alert {
    border-top-color: #dcdcaa !important;
}

body.dark-theme .swal-icon-question,
.dark-theme .swal-icon-question {
    border-color: #569cd6 !important;
    color: #569cd6 !important;
}

body.dark-theme .swal-icon-warning,
.dark-theme .swal-icon-warning {
    border-color: #dcdcaa !important;
    color: #dcdcaa !important;
}

body.dark-theme .swal-title,
.dark-theme .swal-title {
    color: #e4e4e4 !important;
}

body.dark-theme .swal-text,
.dark-theme .swal-text {
    color: #9d9d9d !important;
}

body.dark-theme .swal-btn-cancel,
.dark-theme .swal-btn-cancel {
    background: #3c3c3c !important;
    color: #e4e4e4 !important;
}

body.dark-theme .swal-btn-cancel:hover,
.dark-theme .swal-btn-cancel:hover {
    background: #4a4a4a !important;
}

body.dark-theme .swal-btn-confirm,
.dark-theme .swal-btn-confirm {
    background: linear-gradient(135deg, #569cd6 0%, #4fc1ff 100%) !important;
    box-shadow: 0 4px 15px rgba(86, 156, 214, 0.4) !important;
}

body.dark-theme .swal-btn-confirm:hover,
.dark-theme .swal-btn-confirm:hover {
    background: linear-gradient(135deg, #4fc1ff 0%, #569cd6 100%) !important;
    box-shadow: 0 6px 20px rgba(86, 156, 214, 0.5) !important;
}

body.dark-theme .swal-btn-warning,
.dark-theme .swal-btn-warning {
    background: linear-gradient(135deg, #dcdcaa 0%, #c9c98a 100%) !important;
    color: #1e1e1e !important;
    box-shadow: 0 4px 15px rgba(220, 220, 170, 0.3) !important;
}

body.dark-theme .swal-btn-warning:hover,
.dark-theme .swal-btn-warning:hover {
    background: linear-gradient(135deg, #e8e8bb 0%, #dcdcaa 100%) !important;
    box-shadow: 0 6px 20px rgba(220, 220, 170, 0.4) !important;
}

/* ===============================================
   DARK THEME - ASSET DETAILS
   VS Code Style Dark Theme
   =============================================== */

/* Category Grid and Cards */
body.dark-theme .category-grid,
.dark-theme .category-grid {
    background: transparent !important;
}

body.dark-theme .category-card,
.dark-theme .category-card {
    background: #2d2d2d !important;
    border-color: #3c3c3c !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .category-card:hover,
.dark-theme .category-card:hover {
    border-color: #569cd6 !important;
    box-shadow: 0 20px 25px -5px rgba(86, 156, 214, 0.15), 0 10px 10px -5px rgba(86, 156, 214, 0.08) !important;
}

body.dark-theme .category-card::before,
.dark-theme .category-card::before {
    background: linear-gradient(90deg, #569cd6 0%, #4fc1ff 50%, #ce9178 100%) !important;
}

body.dark-theme .category-icon,
.dark-theme .category-icon {
    background: linear-gradient(135deg, #37373d 0%, #2d2d2d 100%) !important;
    color: #569cd6 !important;
}

body.dark-theme .category-card:hover .category-icon,
.dark-theme .category-card:hover .category-icon {
    background: linear-gradient(135deg, #569cd6 0%, #4fc1ff 100%) !important;
    color: #ffffff !important;
}

body.dark-theme .category-info h3,
.dark-theme .category-info h3 {
    color: #e4e4e4 !important;
}

body.dark-theme .category-info p,
.dark-theme .category-info p {
    color: #9d9d9d !important;
}

body.dark-theme .category-action,
.dark-theme .category-action {
    background: #3c3c3c !important;
    color: #9d9d9d !important;
}

body.dark-theme .category-card:hover .category-action,
.dark-theme .category-card:hover .category-action {
    background: #569cd6 !important;
    color: #ffffff !important;
}

/* Form Section Header */
body.dark-theme .form-section-header,
.dark-theme .form-section-header {
    background: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .form-section-header h3,
.dark-theme .form-section-header h3 {
    color: #e4e4e4 !important;
}

/* Back to General Button */
body.dark-theme .btn-back-to-general,
.dark-theme .btn-back-to-general {
    background: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #cccccc !important;
}

body.dark-theme .btn-back-to-general:hover,
.dark-theme .btn-back-to-general:hover {
    background: #4a4a4a !important;
    border-color: #569cd6 !important;
    color: #e4e4e4 !important;
}

/* Form Container */
body.dark-theme .form-container,
.dark-theme .form-container {
    background: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .form-header,
.dark-theme .form-header {
    background: #252526 !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .form-body,
.dark-theme .form-body {
    background: #2d2d2d !important;
}

body.dark-theme .form-actions,
.dark-theme .form-actions {
    border-top-color: #3c3c3c !important;
    background: transparent !important;
}

body.dark-theme .form-footer,
.dark-theme .form-footer {
    background: transparent !important;
}

/* Breadcrumb Items */
body.dark-theme .breadcrumb-item,
body.dark-theme .form-breadcrumb span,
.dark-theme .breadcrumb-item,
.dark-theme .form-breadcrumb span {
    color: #9d9d9d !important;
}

body.dark-theme .breadcrumb-current,
.dark-theme .breadcrumb-current {
    color: #e4e4e4 !important;
}

body.dark-theme .form-breadcrumb i,
.dark-theme .form-breadcrumb i {
    color: #6d6d6d !important;
}

body.dark-theme .breadcrumb-back,
.dark-theme .breadcrumb-back {
    background: #3c3c3c !important;
    color: #cccccc !important;
}

body.dark-theme .breadcrumb-back:hover,
.dark-theme .breadcrumb-back:hover {
    background: #4a4a4a !important;
    color: #e4e4e4 !important;
}

/* Form Description */
body.dark-theme .form-description,
.dark-theme .form-description {
    color: #9d9d9d !important;
}

/* Form Footer Buttons */
body.dark-theme .breadcrumb-back-footer,
.dark-theme .breadcrumb-back-footer {
    background: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #cccccc !important;
}

body.dark-theme .breadcrumb-back-footer:hover,
.dark-theme .breadcrumb-back-footer:hover {
    background: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .btn-save-primary,
.dark-theme .btn-save-primary {
    background: linear-gradient(135deg, #569cd6 0%, #4fc1ff 100%) !important;
    border-color: #569cd6 !important;
    color: #ffffff !important;
}

body.dark-theme .btn-save-primary:hover,
.dark-theme .btn-save-primary:hover {
    background: linear-gradient(135deg, #4fc1ff 0%, #569cd6 100%) !important;
    box-shadow: 0 6px 20px rgba(86, 156, 214, 0.4) !important;
}

/* Nav Pills (Vertical Tabs) */
body.dark-theme .nav.flex-column.nav-pills,
body.dark-theme .nav-pills,
.dark-theme .nav.flex-column.nav-pills,
.dark-theme .nav-pills {
    background: #252526 !important;
    border-color: #3c3c3c !important;
    border-radius: 12px !important;
    padding: 0.5rem !important;
}

body.dark-theme .nav-pills .nav-link,
body.dark-theme .nav-pills .nav-link.text-white,
.dark-theme .nav-pills .nav-link,
.dark-theme .nav-pills .nav-link.text-white {
    background: transparent !important;
    color: #cccccc !important;
    border: none !important;
}

body.dark-theme .nav-pills .nav-link:hover,
body.dark-theme .nav-pills .nav-link.text-white:hover,
.dark-theme .nav-pills .nav-link:hover,
.dark-theme .nav-pills .nav-link.text-white:hover {
    background: #37373d !important;
    color: #e4e4e4 !important;
}

body.dark-theme .nav-pills .nav-link.active,
body.dark-theme .nav-pills .nav-link.text-white.active,
.dark-theme .nav-pills .nav-link.active,
.dark-theme .nav-pills .nav-link.text-white.active {
    background: linear-gradient(135deg, #569cd6 0%, #4fc1ff 100%) !important;
    color: #ffffff !important;
}

body.dark-theme .nav-pills .nav-link i,
.dark-theme .nav-pills .nav-link i {
    color: inherit !important;
}

/* Tab Content */
body.dark-theme .tab-content,
body.dark-theme .tab-pane,
.dark-theme .tab-content,
.dark-theme .tab-pane {
    background: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

/* Form Labels */
body.dark-theme .form-label,
body.dark-theme label.form-label,
.dark-theme .form-label,
.dark-theme label.form-label {
    color: #e4e4e4 !important;
}

/* Form Check Labels */
body.dark-theme .form-check-label,
.dark-theme .form-check-label {
    color: #cccccc !important;
}

/* Form Controls - text-estandar class */
body.dark-theme .text-estandar,
body.dark-theme input.text-estandar,
body.dark-theme textarea.text-estandar,
body.dark-theme select.text-estandar,
.dark-theme .text-estandar,
.dark-theme input.text-estandar,
.dark-theme textarea.text-estandar,
.dark-theme select.text-estandar {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .text-estandar::placeholder,
.dark-theme .text-estandar::placeholder {
    color: #6d6d6d !important;
}

body.dark-theme .text-estandar:focus,
.dark-theme .text-estandar:focus {
    background-color: #3c3c3c !important;
    border-color: #569cd6 !important;
    box-shadow: 0 0 0 2px rgba(86, 156, 214, 0.2) !important;
    color: #e4e4e4 !important;
}

/* Select dropdowns with inline styles override */
body.dark-theme select.form-control[style*="background-color:#1c1c3a"],
body.dark-theme select.form-control[style*="background-color: #1c1c3a"],
.dark-theme select.form-control[style*="background-color:#1c1c3a"],
.dark-theme select.form-control[style*="background-color: #1c1c3a"] {
    background-color: #3c3c3c !important;
    border-color: #569cd6 !important;
    color: #e4e4e4 !important;
}

body.dark-theme select.form-control option,
.dark-theme select.form-control option {
    background-color: #2d2d2d !important;
    color: #e4e4e4 !important;
}

/* Form Select */
body.dark-theme .form-select,
body.dark-theme select.form-select,
.dark-theme .form-select,
.dark-theme select.form-select {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #e4e4e4 !important;
}

body.dark-theme .form-select:focus,
.dark-theme .form-select:focus {
    border-color: #569cd6 !important;
    box-shadow: 0 0 0 2px rgba(86, 156, 214, 0.2) !important;
}

/* Form Check Input */
body.dark-theme .form-check-input,
.dark-theme .form-check-input {
    background-color: #3c3c3c !important;
    border-color: #4a4a4a !important;
}

body.dark-theme .form-check-input:checked,
.dark-theme .form-check-input:checked {
    background-color: #569cd6 !important;
    border-color: #569cd6 !important;
}

/* Selection Header */
body.dark-theme .selection-header,
.dark-theme .selection-header {
    background: transparent !important;
}

body.dark-theme .selection-header h2,
.dark-theme .selection-header h2 {
    color: #e4e4e4 !important;
}

body.dark-theme .selection-header p,
body.dark-theme .selection-header .text-secondary,
.dark-theme .selection-header p,
.dark-theme .selection-header .text-secondary {
    color: #9d9d9d !important;
}

/* Container Fluid */
body.dark-theme .container-fluid.p-4,
.dark-theme .container-fluid.p-4 {
    background: #2d2d2d !important;
    border-radius: 12px !important;
}

/* HR separators */
body.dark-theme hr,
.dark-theme hr {
    border-color: #3c3c3c !important;
    opacity: 1 !important;
}

/* Form Section Title */
body.dark-theme .form-section-title,
body.dark-theme h5.form-section-title,
.dark-theme .form-section-title,
.dark-theme h5.form-section-title {
    color: #e4e4e4 !important;
}

/* Input Group */
body.dark-theme .input-group .btn,
body.dark-theme .input-group .btn-primary,
.dark-theme .input-group .btn,
.dark-theme .input-group .btn-primary {
    background-color: #569cd6 !important;
    border-color: #569cd6 !important;
    color: #ffffff !important;
}

body.dark-theme .input-group .btn:hover,
.dark-theme .input-group .btn:hover {
    background-color: #4fc1ff !important;
    border-color: #4fc1ff !important;
}

/* ===============================================
   DARK THEME - ASSETS PAGE HEADER & METRICS
   =============================================== */

/* Page Header Container */
body.dark-theme .page-header,
body.dark-theme .assets-header,
body.dark-theme .page-title-section,
.dark-theme .page-header,
.dark-theme .assets-header,
.dark-theme .page-title-section {
    background: transparent !important;
}

body.dark-theme .page-header h1,
body.dark-theme .page-header h2,
body.dark-theme .assets-header h1,
body.dark-theme .assets-header h2,
.dark-theme .page-header h1,
.dark-theme .page-header h2,
.dark-theme .assets-header h1,
.dark-theme .assets-header h2 {
    color: #e4e4e4 !important;
}

body.dark-theme .page-header p,
body.dark-theme .page-header .text-muted,
body.dark-theme .assets-header p,
.dark-theme .page-header p,
.dark-theme .page-header .text-muted,
.dark-theme .assets-header p {
    color: #9d9d9d !important;
}

/* Metric Cards - Stats Cards */
body.dark-theme .stats-card,
body.dark-theme .stat-card,
body.dark-theme .metric-card,
body.dark-theme .summary-card,
body.dark-theme .kpi-card,
.dark-theme .stats-card,
.dark-theme .stat-card,
.dark-theme .metric-card,
.dark-theme .summary-card,
.dark-theme .kpi-card {
    background: var(--surface-card) !important;
    background-color: var(--surface-card) !important;
    border-color: var(--surface-border) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .stats-card h3,
body.dark-theme .stats-card .stat-value,
body.dark-theme .stat-card h3,
body.dark-theme .stat-card .stat-value,
body.dark-theme .metric-card h3,
body.dark-theme .metric-card .metric-value,
.dark-theme .stats-card h3,
.dark-theme .stats-card .stat-value,
.dark-theme .stat-card h3,
.dark-theme .stat-card .stat-value,
.dark-theme .metric-card h3,
.dark-theme .metric-card .metric-value {
    color: #e4e4e4 !important;
}

body.dark-theme .stats-card p,
body.dark-theme .stats-card .stat-label,
body.dark-theme .stat-card p,
body.dark-theme .stat-card .stat-label,
body.dark-theme .metric-card p,
body.dark-theme .metric-card .metric-label,
.dark-theme .stats-card p,
.dark-theme .stats-card .stat-label,
.dark-theme .stat-card p,
.dark-theme .stat-card .stat-label,
.dark-theme .metric-card p,
.dark-theme .metric-card .metric-label {
    color: #9d9d9d !important;
}

/* Asset Detail Container */
body.dark-theme .asset-detail-container,
body.dark-theme .detail-container,
body.dark-theme .activo-detalle,
body.dark-theme .activos-detalle,
.dark-theme .asset-detail-container,
.dark-theme .detail-container,
.dark-theme .activo-detalle,
.dark-theme .activos-detalle {
    background: #252526 !important;
    border-color: #3c3c3c !important;
}

/* Selection Header - Asset Name Section */
body.dark-theme .selection-header h2,
body.dark-theme .asset-name,
body.dark-theme .activo-nombre,
.dark-theme .selection-header h2,
.dark-theme .asset-name,
.dark-theme .activo-nombre {
    color: #e4e4e4 !important;
}

/* Form Breadcrumb Container */
body.dark-theme .form-breadcrumb,
.dark-theme .form-breadcrumb {
    background: #2d2d2d !important;
    border-color: #3c3c3c !important;
    border-radius: 8px !important;
}

/* Row inside forms */
body.dark-theme .row,
.dark-theme .row {
    background: transparent !important;
}

/* Col inside forms */
body.dark-theme .col-md-3,
body.dark-theme .col-md-9,
body.dark-theme [class*="col-"],
.dark-theme .col-md-3,
.dark-theme .col-md-9,
.dark-theme [class*="col-"] {
    background: transparent !important;
}

/* Card and Panel backgrounds */
body.dark-theme .card,
body.dark-theme .panel,
.dark-theme .card,
.dark-theme .panel {
    background: #2d2d2d !important;
    background-color: #2d2d2d !important;
    border-color: #3c3c3c !important;
}

body.dark-theme .card-body,
body.dark-theme .panel-body,
.dark-theme .card-body,
.dark-theme .panel-body {
    background: #2d2d2d !important;
}

body.dark-theme .card-header,
body.dark-theme .panel-header,
.dark-theme .card-header,
.dark-theme .panel-header {
    background: #252526 !important;
    border-color: #3c3c3c !important;
    color: #e4e4e4 !important;
}

/* Container Fluid with bg-transparent text-light */
body.dark-theme .container-fluid.bg-transparent,
body.dark-theme .container-fluid.text-light,
.dark-theme .container-fluid.bg-transparent,
.dark-theme .container-fluid.text-light {
    background: #2d2d2d !important;
    border-radius: 12px !important;
    border: 1px solid #3c3c3c !important;
}

/* Rounded containers */
body.dark-theme .rounded,
body.dark-theme .rounded-lg,
body.dark-theme .rounded-3,
.dark-theme .rounded,
.dark-theme .rounded-lg,
.dark-theme .rounded-3 {
    border-color: #3c3c3c !important;
}

/* Back button - Regresar al Panel General */
body.dark-theme .btn-back-to-general,
body.dark-theme button.btn-back-to-general,
.dark-theme .btn-back-to-general,
.dark-theme button.btn-back-to-general {
    background: #3c3c3c !important;
    background-color: #3c3c3c !important;
    border: 1px solid #4a4a4a !important;
    color: #cccccc !important;
}

body.dark-theme .btn-back-to-general:hover,
.dark-theme .btn-back-to-general:hover {
    background: #4a4a4a !important;
    background-color: #4a4a4a !important;
    border-color: #569cd6 !important;
    color: #e4e4e4 !important;
}

/* Volver button */
body.dark-theme .btn-volver,
body.dark-theme [class*="btn-back"],
body.dark-theme [class*="btn-return"],
.dark-theme .btn-volver,
.dark-theme [class*="btn-back"],
.dark-theme [class*="btn-return"] {
    background: #3c3c3c !important;
    border-color: #4a4a4a !important;
    color: #cccccc !important;
}

/* Page action buttons */
body.dark-theme .page-action-btn,
.dark-theme .page-action-btn {
    background: linear-gradient(135deg, #3D85D3 0%, #0D1936 100%) !important;
    border: none !important;
    color: #E6EEF5 !important;
}

body.dark-theme .page-action-btn.secondary,
.dark-theme .page-action-btn.secondary {
    background: linear-gradient(135deg, #0D1936 0%, #3D85D3 100%) !important;
    border: none !important;
    color: #E6EEF5 !important;
}

body.dark-theme .page-action-btn:hover,
.dark-theme .page-action-btn:hover {
    background: linear-gradient(135deg, #0D1936 0%, #3D85D3 100%) !important;
    color: #E6EEF5 !important;
}

/* Bootstrap nav vertical */
body.dark-theme nav.nav.flex-column,
body.dark-theme .nav.flex-column,
.dark-theme nav.nav.flex-column,
.dark-theme .nav.flex-column {
    background: #252526 !important;
    border: 1px solid #3c3c3c !important;
    border-radius: 12px !important;
    padding: 0.75rem !important;
}

/* All button.nav-link elements */
body.dark-theme button.nav-link,
body.dark-theme button.nav-link.text-start,
body.dark-theme button.nav-link.text-white,
.dark-theme button.nav-link,
.dark-theme button.nav-link.text-start,
.dark-theme button.nav-link.text-white {
    background: transparent !important;
    color: #cccccc !important;
    border: none !important;
    border-radius: 8px !important;
    margin-bottom: 2px !important;
}

body.dark-theme button.nav-link:hover,
body.dark-theme button.nav-link.text-white:hover,
.dark-theme button.nav-link:hover,
.dark-theme button.nav-link.text-white:hover {
    background: #37373d !important;
    color: #e4e4e4 !important;
}

body.dark-theme button.nav-link.active,
body.dark-theme button.nav-link.text-white.active,
.dark-theme button.nav-link.active,
.dark-theme button.nav-link.text-white.active {
    background: linear-gradient(135deg, #569cd6 0%, #4fc1ff 100%) !important;
    color: #ffffff !important;
}

/* Tab content container */
body.dark-theme #actPillsContent,
body.dark-theme .tab-content#actPillsContent,
.dark-theme #actPillsContent,
.dark-theme .tab-content#actPillsContent {
    background: #2d2d2d !important;
    border: 1px solid #3c3c3c !important;
    border-radius: 12px !important;
    padding: 1rem !important;
}

/* Bootstrap p-4 padding containers */
body.dark-theme .p-4,
.dark-theme .p-4 {
    background: transparent !important;
}

/* Main content area backgrounds */
body.dark-theme main,
body.dark-theme .main-content,
body.dark-theme .content-area,
.dark-theme main,
.dark-theme .main-content,
.dark-theme .content-area {
    background: #252526 !important;
}

/* ============================================================
   ANDADA PRO — Dashboard custom font
   ============================================================ */
.section-label, .hero-card-title, .hero-card-pill, .noe-banner-title,
.noe-banner-pill, .metric-value, .metric-label, .card-title,
.page-title, .page-subtitle, .page-description, .page-action-btn {
    font-family: var(--font-display);
}

/* ============================================================
   PAGE-ACTION-BTN — pill shape
   ============================================================ */
.page-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1.8rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.18s ease;
    text-decoration: none;
    white-space: nowrap;
    background: linear-gradient(135deg, #3D85D3 0%, #0B4A8E 100%);
    color: #E6EEF5;
    box-shadow: 0 3px 10px rgba(61,133,211,0.35);
    letter-spacing: 0.02em;
}
.page-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(61,133,211,0.45);
}
.page-action-btn.primary {
    background: linear-gradient(135deg, #3D85D3 0%, #0B4A8E 100%);
    color: #E6EEF5;
}
.page-action-btn.primary:hover {
    background: linear-gradient(135deg, #0B4A8E 0%, #0D1936 100%);
}
.page-action-btn.secondary {
    background: linear-gradient(135deg, #0B4A8E 0%, #3D85D3 100%);
    color: #E6EEF5;
}
.page-action-btn.secondary:hover {
    background: linear-gradient(135deg, #0D1936 0%, #0B4A8E 100%);
}
.page-action-btn.compact {
    padding: 0.6rem 1.4rem;
    font-size: 0.82rem;
}
/* dark theme */
body.dark-theme .page-action-btn,
.dark-theme .page-action-btn {
    background: linear-gradient(135deg, #3D85D3 0%, #0D1936 100%) !important;
    border: none !important;
    color: #E6EEF5 !important;
}
body.dark-theme .page-action-btn.primary,
.dark-theme .page-action-btn.primary {
    background: linear-gradient(135deg, #3D85D3 0%, #0D1936 100%) !important;
    color: #E6EEF5 !important;
}
body.dark-theme .page-action-btn.secondary,
.dark-theme .page-action-btn.secondary {
    background: linear-gradient(135deg, #0D1936 0%, #3D85D3 100%) !important;
    color: #E6EEF5 !important;
}

/* ============================================================
   METRIC-CARD--SLIM
   ============================================================ */
.metric-card--slim {
    padding: 0.875rem 1rem;
}
.metric-card--slim .metric-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    flex-shrink: 0;
}
.metric-card--slim .metric-value {
    font-size: 1.25rem;
    font-weight: 700;
}
.metric-card--slim .metric-label {
    font-size: 0.7rem;
}
.metric-card--slim .metric-change {
    font-size: 0.65rem;
}

/* ============================================================
   EMPTY STATE BANNER
   ============================================================ */
.empty-state-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-warning, #f59e0b) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-warning, #f59e0b) 30%, transparent);
    color: var(--text-secondary, #64748b);
    font-size: 0.88rem;
}
.empty-state-banner i {
    font-size: 1.1rem;
    color: var(--color-warning, #f59e0b);
    flex-shrink: 0;
}
.empty-state-banner a {
    color: var(--color-primary, #3D85D3);
    font-weight: 600;
    text-decoration: none;
}
.empty-state-banner a:hover {
    text-decoration: underline;
}

/* ============================================================
   SECTION-LABEL
   ============================================================ */
.section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #486284;
}

/* ============================================================
   HERO-CARD
   ============================================================ */
.dashboard-welcome {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary, #191919);
    margin: 0 0 0.25rem;
    line-height: 1.1;
}

.dashboard-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

.dark-theme .dashboard-welcome {
    color: #e4e4e4;
}

.dark-theme .dashboard-subtitle {
    color: #9ca3af;
}

/* Dashboard — Mini tarjetas de familia */
.dashboard-family-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-family-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-width: 110px;
    text-align: center;
}

.dashboard-family-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(11,74,142,0.12);
    border-color: #3D85D3;
}

.dashboard-family-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #E6EEF5;
    flex-shrink: 0;
}

.dashboard-family-avatar--add {
    background: transparent !important;
    border: 2px dashed #3D85D3;
    color: #3D85D3;
    font-size: 1.3rem;
}

.dashboard-family-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary, #191919);
    margin: 0;
    line-height: 1.2;
}

.dashboard-family-role {
    font-size: 0.7rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

.dashboard-family-card--add .dashboard-family-name {
    color: #3D85D3;
}

.dark-theme .dashboard-family-card {
    border-color: var(--surface-border);
    background: var(--surface-card);
}

.dark-theme .dashboard-family-card:hover {
    border-color: #3D85D3;
    box-shadow: 0 6px 18px rgba(61,133,211,0.15);
}

.dark-theme .dashboard-family-avatar--add {
    border-color: #3D85D3;
    color: #3D85D3;
}

.dark-theme .dashboard-family-name {
    color: #e4e4e4;
}

.dark-theme .dashboard-family-role {
    color: #9ca3af;
}

.dark-theme .dashboard-family-card--add .dashboard-family-name {
    color: #3D85D3;
}

.hero-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    text-decoration: none;
}
.hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13,25,54,0.18);
}
/* Único gradiente para columna izquierda (light) */
.hero-card--left {
    background: linear-gradient(135deg, #3D85D3 0%, #0B4A8E 100%);
    color: #E6EEF5;
}
.hero-card--sm {
    min-height: 110px;
    border-radius: 10px;
}
/* Variante compacta para barras de acción y accesos rápidos */
.hero-card--xs {
    min-height: 56px;
    border-radius: 10px;
}
.hero-card--xs .hero-card-icon {
    width: 52px;
    font-size: 1.4rem;
    padding: 0 0.35rem;
}
.hero-card--xs .hero-card-content {
    padding: 0.55rem 0.6rem;
}
.hero-card--xs .hero-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
}
.hero-card--xs .hero-card-desc {
    display: none;
}
.hero-card--xs .hero-card-pill {
    padding: 0.4rem 0.85rem;
    font-size: 0.72rem;
    margin-right: 0.75rem;
}
/* Variante secundaria (acciones de soporte: actualizar, exportar, cancelar) */
.hero-card--secondary {
    background: var(--surface-card, #fff);
    border: 1.5px solid var(--surface-border, #e0e0e0);
    color: var(--text-primary, #191919);
}
.hero-card--secondary:hover {
    border-color: var(--color-primary, #3D85D3);
    box-shadow: 0 4px 14px rgba(61, 133, 211, 0.12);
}
.hero-card--secondary .hero-card-icon {
    background: rgba(61, 133, 211, 0.08);
    color: var(--color-primary, #3D85D3);
}
/* Variante Noé — gradiente del banner de Noé en Dashboard */
.hero-card--noe {
    background: linear-gradient(to right, #3D85D3 0%, #0B4A8E 100%);
    color: #E6EEF5;
}
.hero-card--secondary .hero-card-title {
    color: var(--text-primary, #191919);
}
.hero-card--secondary .hero-card-pill {
    background: rgba(61, 133, 211, 0.07);
    color: var(--color-primary, #3D85D3);
    border: 1px solid rgba(61, 133, 211, 0.18);
}
.dark-theme .hero-card--secondary {
    background: var(--surface-card);
    border-color: var(--surface-border);
}
.dark-theme .hero-card--secondary:hover {
    border-color: #7ab8f5;
}
.dark-theme .hero-card--secondary .hero-card-icon {
    color: #7ab8f5;
    background: rgba(122, 184, 245, 0.1);
}
.dark-theme .hero-card--secondary .hero-card-title {
    color: #e4e4e4;
}
.dark-theme .hero-card--secondary .hero-card-pill {
    background: rgba(122, 184, 245, 0.08);
    color: #7ab8f5;
    border-color: rgba(122, 184, 245, 0.2);
}
/* Icono viñeta: ocupa el alto completo de la card */
.hero-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 76px;
    font-size: 2.6rem;
    color: #E6EEF5;
    background: rgba(0,0,0,0.1);
    padding: 0 0.5rem;
}
.hero-card-content {
    flex: 1;
    min-width: 0;
    align-self: center;
    padding: 1rem 0.75rem;
}
.hero-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: #E6EEF5;
    line-height: 1.15;
}
.hero-card-desc {
    font-size: 0.78rem;
    margin: 0;
    opacity: 0.85;
    color: #E6EEF5;
}
.hero-card-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex-shrink: 0;
    width: 155px;
    background: rgba(230,238,245,0.2);
    color: #E6EEF5;
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(230,238,245,0.4);
    margin-right: 1.25rem;
    white-space: nowrap;
}

/* ============================================================
   NOÉ BANNER
   ============================================================ */
.noe-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    background: linear-gradient(to right, #3D85D3 0%, #0B4A8E 100%);
    color: #E6EEF5;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.noe-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13,25,54,0.25);
}
.noe-banner-icon {
    font-size: 1.5rem;
    opacity: 0.85;
    flex-shrink: 0;
}
.noe-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.noe-banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #E6EEF5;
}
.noe-banner-sub {
    font-size: 0.75rem;
    opacity: 0.8;
    color: #E6EEF5;
}
.noe-banner-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(230,238,245,0.15);
    color: #E6EEF5;
    border-radius: 999px;
    padding: 0.35rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(230,238,245,0.3);
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}
.noe-banner-pill:hover {
    background: rgba(230,238,245,0.25);
}
/* Dark mode: restaurar estilo original del banner */
.dark-theme .noe-banner {
    background: linear-gradient(135deg, #0D1936 0%, #0B4A8E 100%) !important;
    color: #E6EEF5 !important;
}
.dark-theme .noe-banner-title {
    color: #E6EEF5 !important;
}
.dark-theme .noe-banner-sub {
    color: #E6EEF5 !important;
}
.dark-theme .noe-banner-pill {
    background: rgba(230,238,245,0.15) !important;
    color: #E6EEF5 !important;
    border-color: rgba(230,238,245,0.3) !important;
}
.dark-theme .noe-banner-pill:hover {
    background: rgba(230,238,245,0.25) !important;
}
/* Variante izquierda: se estira para igualar el alto de la columna derecha */
.noe-banner--left {
    flex: 1;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    overflow: hidden;
}
/* Avatar de Noé en el banner — centrado y responsivo */
.noe-banner-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.noe-banner-avatar {
    width: clamp(48px, 8vw, 80px);
    height: clamp(48px, 8vw, 80px);
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 2px solid rgba(230,238,245,0.3);
    flex-shrink: 0;
}

/* ============================================================
   DARK MODE — Hero cards y noe-banner: preservar colores
   ============================================================ */
/* hero-card: forzar gradiente izquierdo en dark mode */
body.dark-theme div.hero-card.hero-card--left,
.dark-theme div.hero-card.hero-card--left {
    background: linear-gradient(135deg, #3D85D3 0%, #0D1936 100%) !important;
    border-color: transparent !important;
    color: #E6EEF5 !important;
}
body.dark-theme div.hero-card.hero-card--noe,
.dark-theme div.hero-card.hero-card--noe {
    background: linear-gradient(135deg, #0D1936 0%, #0B4A8E 100%) !important;
    border-color: transparent !important;
    color: #E6EEF5 !important;
}
/* Fix icon — no black background in dark mode */
body.dark-theme div.hero-card .hero-card-icon,
.dark-theme div.hero-card .hero-card-icon,
body.dark-theme div.hero-card .hero-card-icon i,
.dark-theme div.hero-card .hero-card-icon i {
    color: #E6EEF5 !important;
    background: transparent !important;
    background-color: transparent !important;
}
body.dark-theme div.hero-card .hero-card-content,
.dark-theme div.hero-card .hero-card-content {
    background: transparent !important;
    background-color: transparent !important;
}
body.dark-theme div.hero-card .hero-card-title,
body.dark-theme div.hero-card h5,
body.dark-theme div.hero-card .hero-card-desc,
body.dark-theme div.hero-card p,
body.dark-theme div.hero-card .hero-card-pill,
body.dark-theme div.hero-card span,
.dark-theme div.hero-card .hero-card-title,
.dark-theme div.hero-card h5,
.dark-theme div.hero-card .hero-card-desc,
.dark-theme div.hero-card p,
.dark-theme div.hero-card .hero-card-pill,
.dark-theme div.hero-card span {
    color: #E6EEF5 !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* ============================================================
   FOCUS RINGS — WCAG 2.1 SC 2.4.7
   Navegación por teclado: visible en todos los elementos
   interactivos, incluidos divs con role="button".
   Solo se activa con teclado (:focus-visible), no con click.
   ============================================================ */
[role="button"]:focus-visible,
.hero-card:focus-visible,
.noe-banner:focus-visible,
.dashboard-family-card:focus-visible,
.metric-card:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: inherit;
}

/* En dark mode el ring usa el azul claro para mejor contraste */
.dark-theme [role="button"]:focus-visible,
.dark-theme .hero-card:focus-visible,
.dark-theme .noe-banner:focus-visible,
.dark-theme .dashboard-family-card:focus-visible,
.dark-theme .metric-card:focus-visible {
    outline-color: #7ab8f5;
}

/* Suprimir outline nativo en campos que ya tienen focus visual propio */
.data-table-search-input:focus-visible,
.data-table-select:focus-visible {
    outline: none; /* box-shadow en :focus actúa como indicador */
}


/* ===============================================
   NOTIFICATION BELL PANEL
   =============================================== */

/* Wrapper posiciona el panel relativo al botón */
.notif-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Bell button styling */
.notif-bell-btn {
    position: relative;
}

/* Badge roja de conteo */
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

/* Overlay invisible para cerrar el panel al hacer click fuera */
.notif-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
}

/* Panel dropdown */
.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: var(--surface-card, #fff);
    border: 1px solid var(--surface-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
    z-index: 9999;
    overflow: hidden;
    animation: notifSlideIn 0.2s ease-out;
}

@keyframes notifSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem 0.75rem;
    border-bottom: 1px solid var(--surface-border, #f0f0f0);
    background: var(--surface-hover, #f8f9fa);
}

.notif-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary, #191919);
}

.notif-mark-read {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--color-primary, #3D85D3);
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}

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

/* Lista de notificaciones */
.notif-panel-body {
    max-height: 320px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--surface-border, #f0f0f0);
    transition: background 0.15s;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--surface-hover, #f8f9fa);
}

.notif-unread {
    background: rgba(61, 133, 211, 0.04);
}

/* Icono de notificación — reutiliza los colores de activity-icon */
.notif-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.notif-item-icon.success  { background: rgba(16,185,129,0.12); color: #059669; }
.notif-item-icon.info     { background: rgba(61,133,211,0.12); color: #3D85D3; }
.notif-item-icon.warning  { background: rgba(245,158,11,0.12); color: #d97706; }
.notif-item-icon.primary  { background: rgba(99,102,241,0.12); color: #6366f1; }
.notif-item-icon.danger   { background: rgba(239,68,68,0.12);  color: #dc2626; }

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

.notif-item-title {
    margin: 0 0 0.15rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary, #191919);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-time {
    margin: 0;
    font-size: 0.72rem;
    color: var(--text-secondary, #6b7280);
}

/* Estado vacío */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.85rem;
}

.notif-empty i {
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Footer */
.notif-panel-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--surface-border, #f0f0f0);
    text-align: center;
    background: var(--surface-hover, #f8f9fa);
}

.notif-footer-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary, #3D85D3);
    text-decoration: none;
}

.notif-footer-link:hover {
    text-decoration: underline;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .notif-panel {
        background: var(--surface-card, #1e2535);
        border-color: var(--surface-border, #2d3748);
    }
    .notif-panel-header,
    .notif-panel-footer {
        background: var(--surface-hover, #252d3d);
    }
    .notif-item:hover { background: var(--surface-hover, #252d3d); }
    .notif-unread     { background: rgba(61,133,211,0.07); }
}


/* ===============================================
   HISTORIAL PAGE
   =============================================== */

/* Reutiliza .settings-layout (ya definido).
   Solo se agregan estilos específicos del historial. */

/* Lista de actividad en el panel historial */
.historial-list {
    padding: 0.5rem 0;
}

.historial-item {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    transition: background 0.15s;
}

.historial-item:hover {
    background: var(--surface-hover, #f5f7fa);
}

/* Descripción adicional bajo el título */
.activity-desc {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: var(--text-secondary, #6b7280);
}

/* Contador de eventos en el sidebar */
.historial-nav-count {
    margin-left: auto;
    margin-right: 0.35rem;
    background: var(--color-primary, #3D85D3);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Estado vacío en el historial */
.historial-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 3rem 1rem;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.9rem;
}

.historial-empty i {
    font-size: 2rem;
    opacity: 0.4;
}

/* Empty state en el Dashboard */
.activity-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.5rem;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.82rem;
}

.activity-empty i {
    font-size: 1.4rem;
    opacity: 0.4;
}

/* Dark mode historial */
@media (prefers-color-scheme: dark) {
    .historial-item:hover { background: var(--surface-hover, #252d3d); }
}
