/* Modo oscuro de CXC. Sin la clase dark en html, estas reglas no aplican. */
html.dark {
    --bs-body-bg: #151824;
    --bs-body-color: #e8eaef;
    --bs-body-color-rgb: 232, 234, 239;
    --bs-body-bg-rgb: 21, 24, 36;
    color-scheme: dark;
    background-color: #151824;
}
html.dark body {
    background-color: #151824;
    background-image: linear-gradient(#151824, #151824) !important;
}
html:not(.dark) body {
    background-image: linear-gradient(#f5f6fa, #f5f6fa) !important;
}
html.dark h1,
html.dark .h1,
html.dark h2,
html.dark .h2,
html.dark h3,
html.dark .h3,
html.dark h4,
html.dark .h4,
html.dark h5,
html.dark .h5,
html.dark h6,
html.dark .h6 {
    color: #e8eaef;
}

html.dark .loader.simple-loader {
    background: #151824;
}

.cxc-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .75rem;
    border: 1px solid #dce3ef;
    border-radius: 999px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}
.cxc-theme-toggle:hover { background: #f4f6ff; }
.cxc-theme-toggle:focus-visible { outline: 2px solid #6576cc; outline-offset: 2px; }
html.dark .cxc-theme-toggle {
    border-color: #4a5470;
    background: #1c2030;
    color: #e8eaef;
}
html.dark .cxc-theme-toggle:hover { background: #2a3148; }
html.dark .cxc-theme-icon-moon,
html:not(.dark) .cxc-theme-icon-sun,
html.dark .cxc-theme-when-light,
html:not(.dark) .cxc-theme-when-dark { display: none; }
.cxc-theme-toggle-float {
    position: fixed;
    top: .85rem;
    right: .85rem;
    z-index: 2200;
}
@media (max-width: 576px) {
    .navbar .cxc-theme-when-light,
    .navbar .cxc-theme-when-dark {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

html.dark .form-control,
html.dark .form-select,
html.dark textarea,
html.dark .schedule-editor input {
    background-color: #1c2030;
    color: #e8eaef;
    border-color: #4a5470;
}
html.dark .form-control::placeholder,
html.dark textarea::placeholder { color: #9aa3b8; }
html.dark .form-control:focus,
html.dark .form-select:focus,
html.dark textarea:focus,
html.dark .schedule-editor input:focus {
    background-color: #1c2030;
    color: #e8eaef;
    border-color: #8ea2ff;
    box-shadow: 0 0 0 .2rem rgba(142, 162, 255, .25);
}
html.dark .form-control:disabled,
html.dark .form-select:disabled,
html.dark .form-control[readonly] {
    background-color: #171b2b;
    color: #c5cbe0;
}
html.dark .form-check-input {
    background-color: #1c2030;
    border-color: #4a5470;
}
html.dark .form-check-label,
html.dark label,
html.dark .form-label { color: #d5d8e2; }
html.dark .select2-container--default .select2-selection--single,
html.dark .select2-container--default .select2-selection--multiple {
    background-color: #1c2030;
    border-color: #4a5470;
    color: #e8eaef;
}
html.dark .select2-container--default .select2-selection--single .select2-selection__rendered,
html.dark .select2-container--default .select2-selection--multiple .select2-selection__rendered { color: #e8eaef; }
html.dark .select2-dropdown,
html.dark .select2-search__field {
    background-color: #222738;
    color: #e8eaef;
    border-color: #4a5470;
}
html.dark .select2-results__option { color: #e8eaef; }
html.dark .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #3b54b4;
    color: #fff;
}

html.dark .table {
    --bs-table-bg: #222738;
    --bs-table-color: #e8eaef;
    --bs-table-border-color: #30384f;
    --bs-table-striped-bg: #1c2030;
    --bs-table-striped-color: #e8eaef;
    --bs-table-hover-bg: #2a3148;
    --bs-table-hover-color: #e8eaef;
    color: #e8eaef;
    border-color: #30384f;
}
html.dark .table > :not(caption) > * > *,
html.dark .table tbody td,
html.dark .table thead th {
    color: #e8eaef;
    border-color: #30384f;
    background-color: #222738;
    box-shadow: inset 0 0 0 9999px #222738;
}
html.dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    box-shadow: inset 0 0 0 9999px #1c2030;
}
html.dark .table-hover > tbody > tr:hover > * {
    box-shadow: inset 0 0 0 9999px #2a3148;
    color: #e8eaef;
}

html.dark .card,
html.dark .modal-content,
html.dark .list-group-item,
html.dark .dropdown-menu {
    background-color: #222738;
    color: #e8eaef;
    border-color: #30384f;
}
html.dark .modal-header,
html.dark .modal-footer,
html.dark .card-header,
html.dark .card-footer {
    background-color: #1c2030;
    color: #e8eaef;
    border-color: #30384f;
}
html.dark .modal-title,
html.dark .card-title,
html.dark .dropdown-item { color: #e8eaef; }
html.dark .dropdown-item:hover,
html.dark .dropdown-item:focus {
    background-color: #2a3148;
    color: #fff;
}
html.dark .text-muted,
html.dark .text-secondary { color: #b7c0d4 !important; }
html.dark .text-dark,
html.dark .text-black,
html.dark .text-body { color: #e8eaef !important; }
html.dark .bg-white,
html.dark .bg-light {
    background-color: #222738 !important;
    color: #e8eaef;
}

html.dark .tasks-count,
html.dark .tasks-panel,
html.dark .tasks-overall,
html.dark .task-item,
html.dark .agents-count,
html.dark .agents-panel,
html.dark .agents-row,
html.dark .construction-shell,
html.dark .cut-detail-card {
    background: #222738;
    color: #e8eaef;
    border-color: #30384f;
}
html.dark .tasks-list,
html.dark .agents-list,
html.dark .tasks-toolbar,
html.dark .agents-toolbar,
html.dark .tasks-filters,
html.dark .tasks-pagination,
html.dark .cut-detail,
html.dark .cuts-filter,
html.dark .cuts-header {
    background: #1c2030;
    border-color: #30384f;
    color: #e8eaef;
}
html.dark .tasks-eyebrow,
html.dark .tasks-toolbar p,
html.dark .tasks-client label,
html.dark .task-project,
html.dark .task-notes-task,
html.dark .task-notes-meta,
html.dark .task-notes-empty,
html.dark .task-notes-author-current,
html.dark .tasks-empty,
html.dark .tasks-pagination,
html.dark .tasks-hidden-today,
html.dark .task-progress-head,
html.dark .task-description,
html.dark .task-created,
html.dark .task-due small,
html.dark .agents-eyebrow,
html.dark .agents-toolbar p,
html.dark .agents-field label,
html.dark .agents-modal-help,
html.dark .agents-empty,
html.dark .agents-webhook-mask,
html.dark .construction-shell p,
html.dark .cuts-subtitle,
html.dark .cut-detail-top .cut-kicker,
html.dark .cut-metric small,
html.dark .payment-account-label,
html.dark .schedule-help,
html.dark .schedule-side-note,
html.dark .schedule-corner,
html.dark .schedule-day,
html.dark .schedule-empty-board {
    color: #b7c0d4;
}
html.dark .tasks-heading h1,
html.dark .tasks-toolbar h2,
html.dark .task-title,
html.dark .task-edit-dialog h2,
html.dark .task-notes-text,
html.dark .agents-heading h1,
html.dark .agents-name,
html.dark .construction-shell h1,
html.dark .cut-detail-card-header h2,
html.dark .cut-metric strong,
html.dark .cut-detail-top h1,
html.dark .receipt-modal .modal-title,
html.dark .receipt-section-heading h6,
html.dark .receipt-card-name,
html.dark .schedule-loose strong,
html.dark .schedule-label strong,
html.dark .schedule-editor p {
    color: #e8eaef;
}
html.dark .task-id,
html.dark .task-due,
html.dark .tasks-overall-label,
html.dark .payment-account-value,
html.dark .payment-account-line,
html.dark .receipt-card-amount,
html.dark .receipt-card-meta,
html.dark .receipt-summary-count,
html.dark .cut-detail-table thead th,
html.dark .cut-detail-table tbody td,
html.dark #cuts_table th {
    color: #d5d8e2;
}
html.dark .task-notes-btn,
html.dark .task-notes-quick-btn,
html.dark .task-notes-hide,
html.dark .task-hide-today,
html.dark .tasks-sitrep-btn,
html.dark .tasks-reset-creation-btn,
html.dark .tasks-sitrep-tab,
html.dark .tasks-filters-toggle,
html.dark .tasks-filters-reset,
html.dark .tasks-filter-clear,
html.dark .tasks-closing-btn,
html.dark .task-admin-btn,
html.dark .tasks-manage-btn,
html.dark .agents-clear,
html.dark .agents-hide,
html.dark .agents-webhook,
html.dark .task-date-shortcuts button,
html.dark .schedule-editor .task-date-shortcuts button,
html.dark .schedule-shift,
html.dark .schedule-assign,
html.dark .schedule-priority {
    background: #1c2030;
    color: #c9d4ff;
    border-color: #4a5470;
}
html.dark .task-notes-btn:hover,
html.dark .task-notes-quick-btn:hover,
html.dark .task-notes-hide:hover,
html.dark .task-hide-today:hover,
html.dark .tasks-sitrep-btn:hover,
html.dark .tasks-reset-creation-btn:hover,
html.dark .tasks-sitrep-tab:hover,
html.dark .tasks-filters-toggle:hover,
html.dark .tasks-filters-reset:hover,
html.dark .tasks-filter-clear:hover,
html.dark .tasks-closing-btn:hover,
html.dark .task-admin-btn:hover,
html.dark .tasks-manage-btn:hover,
html.dark .agents-clear:hover,
html.dark .agents-hide:hover,
html.dark .agents-webhook:hover,
html.dark .task-date-shortcuts button:hover,
html.dark .schedule-shift:hover,
html.dark .schedule-assign:hover {
    background: #2a3148;
    color: #e8eaef;
}
html.dark .tasks-sitrep-tab.is-active,
html.dark .tasks-filter-submit,
html.dark .tasks-gantt-btn,
html.dark .agents-submit {
    background: #3b54b4;
    color: #fff;
    border-color: #3b54b4;
}
html.dark .task-admin-btn.is-quality { color: #8ee0b0; border-color: #1f6b45; }
html.dark .task-admin-btn.is-quality:hover { background: #143528; }
html.dark .task-admin-btn.is-delete { color: #ffb4bc; border-color: #8f3038; }
html.dark .task-admin-btn.is-delete:hover { background: #3a1c22; }
html.dark .task-notes-reply,
html.dark .task-notes-reply-line { color: #f0c36a; }
html.dark .task-notes-author-change { color: #c9d4ff; }
html.dark .task-notes-author-pick label { color: #e8eaef; }
html.dark .task-pill { background: #2a3148; color: #c9d4ff; }
html.dark .task-pill.priority,
html.dark .task-pill.remaining,
html.dark .task-pill.remaining.is-unassigned { background: #2a3148; color: #d5d8e2; }
html.dark .task-pill.price { background: #143528; color: #8ee0b0; }
html.dark .task-pill.remaining.is-soon { background: #3d2e12; color: #f0c36a; }
html.dark .task-pill.remaining.is-overdue { background: #3a1c22; color: #ffb4bc; }
html.dark .task-progress-bar { background: #2a3148; }
html.dark .task-progress-head strong,
html.dark .tasks-overall-label strong,
html.dark .task-description summary,
html.dark .agents-link { color: #c9d4ff; }
html.dark .task-item.is-note-added {
    background: #143528;
    border-color: #1f6b45;
    color: #d8f5e4;
}
html.dark .task-item.is-note-added .task-title,
html.dark .task-item.is-note-added .task-project,
html.dark .task-item.is-note-added .task-description { color: #d8f5e4; }
html.dark .task-edit-dialog,
html.dark .agents-modal-card {
    background: #222738;
    color: #e8eaef;
}
html.dark .task-edit-field span { color: #d5d8e2; }
html.dark .task-notes-item {
    background: #1c2030;
    border-color: #30384f;
}
html.dark .task-delete-warning { color: #ffb4bc; }
html.dark .agents-check-ui {
    background: #1c2030;
    border-color: #4a5470;
}
html.dark .agents-row.is-done {
    background: #143528;
    border-color: #1f6b45;
}
html.dark .agents-row.is-done .agents-name { color: #d8f5e4; }
html.dark .agents-webhook.is-set {
    color: #8ee0b0;
    border-color: #1f6b45;
    background: #143528;
}
html.dark .construction-shell i,
html.dark .tasks-empty i,
html.dark .agents-empty i { color: #8b93a7; }

html.dark .schedule-side,
html.dark .schedule-board,
html.dark .schedule-head,
html.dark .schedule-corner,
html.dark .schedule-label,
html.dark .schedule-loose,
html.dark .schedule-editor,
html.dark .schedule-zooms,
html.dark .schedule-delete {
    background: #222738;
    color: #e8eaef;
    border-color: #30384f;
}
html.dark .schedule-zooms button,
html.dark .schedule-legend,
html.dark .schedule-editor label,
html.dark .schedule-loose small,
html.dark .schedule-label small { color: #d5d8e2; }
html.dark .schedule-day.is-weekend,
html.dark .schedule-column.is-weekend { background: #1c2030; }
html.dark .schedule-column.is-today { background: rgba(240, 195, 106, .12); }
html.dark .schedule-day.is-today { color: #f0c36a; }
html.dark .schedule-editor button.is-quiet { background: #2a3148; color: #e8eaef; }
html.dark .schedule-delete { color: #ffb4bc; border-color: #8f3038; }
html.dark .schedule-delete:hover,
html.dark .schedule-delete:focus-visible { background: #3a1c22; }

html.dark .cut-detail-table thead th,
html.dark .cut-detail table,
html.dark .payment-account-row,
html.dark .receipt-modal-section,
html.dark .receipt-card,
html.dark .receipt-dropzone,
html.dark .receipt-selected-file,
html.dark .receipt-modal .modal-header {
    background: #1c2030;
    color: #e8eaef;
    border-color: #30384f;
}
html.dark .receipt-modal .modal-header { background: #1c2030; }
html.dark .cut-detail-table tbody tr:hover { background: #2a3148; }
html.dark .cut-detail-status,
html.dark .cut-status-partial { background: #1c2d52; color: #c9d4ff; border-color: #304878; }
html.dark .cut-status-pending { background: #3d2e12; color: #f0c36a; }
html.dark .cut-status-paid,
html.dark .cut-status.paid,
html.dark .cut-status.released,
html.dark .cut-status.available { background: #143528; color: #8ee0b0; border-color: #1f6b45; }
html.dark .cut-status.pending,
html.dark .cut-status.under_review,
html.dark .cut-status.rejected,
html.dark .cut-status.overdue,
html.dark .receipt-status.rejected { background: #3a1c22; color: #ffb4bc; border-color: #8f3038; }
html.dark .cut-status.reviewed,
html.dark .cut-status.partial { background: #1c2d52; color: #c9d4ff; border-color: #304878; }
html.dark .cut-status.blocked,
html.dark .receipt-status.reviewing { background: #3d2e12; color: #f0c36a; }
html.dark .cut-status.closed,
html.dark .cut-status-default { background: #2a3148; color: #d5d8e2; }
html.dark .receipt-status.received,
html.dark .receipt-status.reviewed,
html.dark .receipt-status.applied { background: #143528; color: #8ee0b0; }
html.dark .receipt-count,
html.dark .receipt-file-icon { background: #1c2d52; color: #c9d4ff; }
html.dark .receipt-file-icon.pdf { color: #ffb4bc; background: #3a1c22; }
html.dark .receipt-file-icon.image { color: #8ee0b0; background: #143528; }
html.dark .receipt-dropzone strong,
html.dark .receipt-dropzone i,
html.dark .payment-copy-icon { color: #c9d4ff; }
html.dark .receipt-empty,
html.dark .receipt-dropzone,
html.dark .receipt-dropzone small,
html.dark .receipt-status-dot { color: #b7c0d4; }
html.dark .receipt-card-actions .btn { color: #b7c0d4; }
html.dark .receipt-card-actions .btn:hover { color: #c9d4ff; background: #1c2d52; }
html.dark .receipt-card-actions .btn.delete:hover { color: #ffb4bc; background: #3a1c22; }
html.dark .receipt-confirm-icon { color: #ffb4bc; background: #3a1c22; }

html.dark .incpulse-directory { background: #222738; }
html.dark .incpulse-directory__table thead th {
    background: #1c2030;
    color: #f1b521;
}
html.dark .incpulse-directory__table tbody td {
    color: #e8eaef;
    border-bottom-color: #30384f;
}
html.dark .incpulse-directory__name,
html.dark .incpulse-directory__contact-link { color: #dbe5f2; }
html.dark .incpulse-directory__footer { color: #123a64; }
