/* ============================================================
   Modo oscuro de condominios — paleta oscura con acento dorado
   Se activa con <html data-theme="dark"> (toggle en theme.js)
   ============================================================ */

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background: #141821 !important;
    color: #e6e4df !important;
}

/* --- Navbar --- */
html[data-theme="dark"] .navbar {
    background: #1a1f2c !important;
    border-bottom-color: #2a3140 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

/* --- Sidebar --- */
html[data-theme="dark"] .body-sidebar,
html[data-theme="dark"] .desk-sidebar,
html[data-theme="dark"] .sidebar-menu {
    background: #161b26 !important;
}
html[data-theme="dark"] .standard-sidebar .standard-sidebar-item,
html[data-theme="dark"] .sidebar-menu a {
    color: #c9cdd6 !important;
}
html[data-theme="dark"] .standard-sidebar .standard-sidebar-item:hover {
    background: #222836 !important;
}
html[data-theme="dark"] .standard-sidebar .standard-sidebar-item.active-sidebar,
html[data-theme="dark"] .standard-sidebar .standard-sidebar-item.selected {
    background: #2a3140 !important;
    color: #f2c94c !important;
}
html[data-theme="dark"] .standard-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-label,
html[data-theme="dark"] .standard-sidebar .standard-sidebar-item.selected .sidebar-item-label {
    color: #f2c94c !important;
}

/* --- Cards y widgets del workspace --- */
html[data-theme="dark"] .widget,
html[data-theme="dark"] .frappe-card,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .rpt-card {
    background: #1e2330 !important;
    border-color: #333a48 !important;
    color: #e6e4df !important;
}
html[data-theme="dark"] .widget.number-widget-box {
    background: linear-gradient(160deg, #1e2330, #252b3a) !important;
}
html[data-theme="dark"] .widget.links-widget-box,
html[data-theme="dark"] .widget.shortcut-widget-box,
html[data-theme="dark"] .widget.chart-widget {
    background: #1e2330 !important;
}

/* --- Títulos y textos --- */
html[data-theme="dark"] .page-title .title-text,
html[data-theme="dark"] .page-head .title-text,
html[data-theme="dark"] .widget .widget-title,
html[data-theme="dark"] .frappe-card h4,
html[data-theme="dark"] .frappe-card h5,
html[data-theme="dark"] .ce-header {
    color: #e6e4df !important;
}
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .muted-text,
html[data-theme="dark"] .widget.number-widget-box .widget-head .widget-label .widget-title {
    color: #9aa0ab !important;
}

/* --- Tablas --- */
html[data-theme="dark"] .grid-heading-row,
html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .data-table thead th,
html[data-theme="dark"] .dt-header {
    background: #252b3a !important;
    color: #c9cdd6 !important;
    border-bottom-color: #333a48 !important;
}
html[data-theme="dark"] .grid-row,
html[data-theme="dark"] .table tbody tr,
html[data-theme="dark"] .list-row {
    background: #1e2330 !important;
    color: #e6e4df !important;
}
html[data-theme="dark"] .grid-row:hover,
html[data-theme="dark"] .table tbody tr:hover,
html[data-theme="dark"] .list-row:hover {
    background: #252b3a !important;
}

/* --- Inputs --- */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] input.form-control,
html[data-theme="dark"] select.form-control,
html[data-theme="dark"] textarea.form-control {
    background: #1a1f2c !important;
    border-color: #333a48 !important;
    color: #e6e4df !important;
}

/* --- Botones secundarios --- */
html[data-theme="dark"] .btn-default,
html[data-theme="dark"] .btn-secondary {
    background: #252b3a !important;
    border-color: #3a4254 !important;
    color: #e6e4df !important;
}

/* --- Enlaces --- */
html[data-theme="dark"] a,
html[data-theme="dark"] a.link,
html[data-theme="dark"] .control-value a {
    color: #f2c94c !important;
}

/* --- Portal (mi-condominio) --- */
html[data-theme="dark"] .portal-wrap {
    color: #e6e4df;
}
html[data-theme="dark"] .portal-card {
    background: #1e2330 !important;
    border-color: #333a48 !important;
    color: #e6e4df !important;
}
html[data-theme="dark"] .portal-fila,
html[data-theme="dark"] .portal-valor,
html[data-theme="dark"] .portal-bs {
    color: #e6e4df !important;
}
html[data-theme="dark"] .portal-etiqueta,
html[data-theme="dark"] .portal-moneda,
html[data-theme="dark"] .portal-tasa {
    color: #9aa0ab !important;
}
html[data-theme="dark"] .portal-saldo-item,
html[data-theme="dark"] .portal-kpi {
    background: #252b3a !important;
    border-color: #333a48 !important;
}
html[data-theme="dark"] .portal-tabla th {
    color: #9aa0ab;
    border-bottom-color: #333a48;
}
html[data-theme="dark"] .portal-tabla td {
    color: #e6e4df;
    border-bottom-color: #2a3140;
}
