/* Modo oscuro de Terapeutas Chile. No usa el CSS de Django Admin. */
[data-bs-theme="dark"] {
    color-scheme: dark;
    --tc-page-bg: #1a1824;
    --tc-surface: #221f2e;
    --tc-surface-2: #2c2838;
    --tc-text: #f4f1f8;
    --tc-muted: #d7d0e4;
    --tc-border: #3d384c;
    --tc-link: #d4b8ff;
    --tc-menu-surface: #3d3470;
    --tc-menu-selected: #53478a;
    --bs-dropdown-bg: #2a2736;
    --bs-dropdown-color: #f0ebf8;
    --bs-dropdown-link-color: #f0ebf8;
    --bs-dropdown-link-hover-bg: #3a3350;
    --bs-dropdown-link-hover-color: #ffffff;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] #layout-wrapper,
[data-bs-theme="dark"] main.app-wrapper,
[data-bs-theme="dark"] main.app-wrapper-main,
[data-bs-theme="dark"] main.app-sing,
[data-bs-theme="dark"] .body-auth {
    background-color: var(--tc-page-bg) !important;
    color: var(--tc-text);
}

[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-body,
[data-bs-theme="dark"] .text-secundary,
[data-bs-theme="dark"] .txt-table,
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] .form-text,
[data-bs-theme="dark"] .card-users .card-header h4,
[data-bs-theme="dark"] .card-users .text-primary {
    color: var(--tc-muted) !important;
}

[data-bs-theme="dark"] .text-primary {
    color: #d4b8ff !important;
}

[data-bs-theme="dark"] a:not(.tc-navbar a):not(.tc-session-menu a):not(.footer-copy a):not(.btn):not(.page-link):not(.buttons):not([class*="buttons-"]):not(.float-btn) {
    color: var(--tc-link);
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card-users,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="dark"] .accordion-item,
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-body,
[data-bs-theme="dark"] .role-card {
    background-color: var(--tc-surface) !important;
    color: var(--tc-text) !important;
    border-color: var(--tc-border) !important;
}

[data-bs-theme="dark"] .card-tot-users,
[data-bs-theme="dark"] .bg-primary-subtle {
    background-color: #2a2440 !important;
    color: var(--tc-text) !important;
}

[data-bs-theme="dark"] .card-tot-users .text-secundary,
[data-bs-theme="dark"] .card-tot-users h4 {
    color: #f4f1f8 !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text,
[data-bs-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] select {
    background-color: var(--tc-surface-2) !important;
    border-color: var(--tc-border) !important;
    color: var(--tc-text) !important;
}

[data-bs-theme="dark"] input::placeholder,
[data-bs-theme="dark"] textarea::placeholder {
    color: #9a93a8 !important;
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: #3a3350 !important;
    color: var(--tc-text) !important;
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] thead.table-light,
[data-bs-theme="dark"] .table-light > tr > th,
[data-bs-theme="dark"] .table-light tr th,
[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] table.dataTable thead th {
    background-color: #322c45 !important;
    color: #f0ebf8 !important;
    border-color: var(--tc-border) !important;
    --bs-table-bg: #322c45;
    --bs-table-color: #f0ebf8;
    --bs-table-striped-bg: #2c2838;
    --bs-table-hover-bg: #3a3350;
}

[data-bs-theme="dark"] .table > :not(caption) > * > *,
[data-bs-theme="dark"] .table-light tr th,
[data-bs-theme="dark"] .table-light > :not(caption) > * > * {
    background-color: var(--tc-surface) !important;
    color: var(--tc-text) !important;
    border-color: var(--tc-border) !important;
}

[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] .table-light tr th,
[data-bs-theme="dark"] .table-light > tr > th,
[data-bs-theme="dark"] thead.table-light th {
    background-color: #322c45 !important;
    color: #f0ebf8 !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--tc-surface-2) !important;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer,
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
    background-color: var(--tc-surface-2) !important;
    border-color: var(--tc-border) !important;
    color: var(--tc-text) !important;
}

[data-bs-theme="dark"] .pagi-perso .page-link,
[data-bs-theme="dark"] .page-link {
    background-color: var(--tc-surface-2) !important;
    border: 1px solid var(--tc-border) !important;
    color: var(--tc-text) !important;
}

[data-bs-theme="dark"] .pagi-perso .page-item.active .page-link,
[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: #7157ff !important;
    border-color: #7157ff !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .pagi-perso .page-item.disabled .page-link,
[data-bs-theme="dark"] .page-item.disabled .page-link {
    background-color: #1c1a26 !important;
    color: #8d8799 !important;
    border-color: var(--tc-border) !important;
}

[data-bs-theme="dark"] .tc-profile-menu,
[data-bs-theme="dark"] .tc-public-menu,
[data-bs-theme="dark"] .tc-session-menu__submenu,
[data-bs-theme="dark"] .tc-session-menu .tc-session-menu__submenu,
[data-bs-theme="dark"] .dropdown-menu {
    background: var(--tc-menu-surface) !important;
    background-color: var(--tc-menu-surface) !important;
    color: var(--tc-text) !important;
    box-shadow: 0 16px 30px rgba(0, 0, 0, .45) !important;
}

[data-bs-theme="dark"] .tc-profile-menu__link,
[data-bs-theme="dark"] .tc-public-menu a,
[data-bs-theme="dark"] .tc-session-menu__submenu a,
[data-bs-theme="dark"] .dropdown-menu .dropdown-item {
    color: #f0ebf8 !important;
}

[data-bs-theme="dark"] .tc-session-menu__submenu a::before {
    color: #c4a6ff !important;
}

[data-bs-theme="dark"] .tc-profile-menu__link:hover,
[data-bs-theme="dark"] .tc-public-menu a:hover,
[data-bs-theme="dark"] .tc-session-menu__submenu a:hover,
[data-bs-theme="dark"] .tc-session-menu__submenu a:focus-visible,
[data-bs-theme="dark"] .dropdown-menu .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-menu .dropdown-item:focus {
    background: #3a3350 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .tc-profile-menu__notification,
[data-bs-theme="dark"] .tc-profile__notification {
    box-shadow: 0 0 0 2px var(--tc-menu-surface) !important;
}

[data-bs-theme="dark"] .tc-profile-menu__link:hover .tc-profile-menu__notification,
[data-bs-theme="dark"] .tc-profile-menu__link:focus-visible .tc-profile-menu__notification {
    box-shadow: 0 0 0 2px var(--tc-menu-selected) !important;
}

@media (max-width: 991px) {
    [data-bs-theme="dark"] .tc-session-menu.tc-is-open,
    [data-bs-theme="dark"] .tc-profile-menu,
    [data-bs-theme="dark"] .tc-public-menu {
        background: #3d3470 !important;
        color: #f7f2ff !important;
        border: 1px solid rgba(224, 200, 255, .32) !important;
        box-shadow: 0 18px 36px rgba(28, 16, 64, .45) !important;
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-menu__toggle,
    [data-bs-theme="dark"] .tc-profile-menu__link,
    [data-bs-theme="dark"] .tc-public-menu a {
        background: transparent !important;
        border-color: transparent !important;
        color: #f7f2ff !important;
        text-shadow: none;
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-menu__group.tc-is-open .tc-session-menu__toggle,
    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-menu__toggle:hover,
    [data-bs-theme="dark"] .tc-profile-menu__link:hover,
    [data-bs-theme="dark"] .tc-public-menu a:hover {
        background: #53478a !important;
        color: #ffffff !important;
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-menu__submenu {
        background: #2b2458 !important;
        border: 1px solid rgba(212, 184, 255, .28) !important;
        border-radius: 12px !important;
        box-shadow: none !important;
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-menu__submenu a {
        background: transparent !important;
        color: #f3eefc !important;
        text-shadow: none;
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-menu__submenu a:hover {
        background: #53478a !important;
        color: #ffffff !important;
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-menu__identity {
        border-top-color: rgba(224, 200, 255, .22);
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-user__name {
        color: #f7f2ff !important;
        text-shadow: none;
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-user__rut {
        color: #c8bfd8 !important;
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-switch {
        background: #53478a;
        border-color: rgba(224, 200, 255, .4);
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-switch__icon,
    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-switch__text {
        color: #f7f2ff !important;
        text-shadow: none;
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-switch__track {
        background: #3d3470;
        border-color: rgba(224, 200, 255, .4);
    }

    [data-bs-theme="dark"] .tc-session-menu.tc-is-open .tc-session-switch input:checked + .tc-session-switch__track {
        background: #8d7dff;
    }
}

[data-bs-theme="dark"] .text-tertiary,
[data-bs-theme="dark"] .text-secundary {
    color: #d4b8ff !important;
}

[data-bs-theme="dark"] .tc-navbar,
[data-bs-theme="dark"] .tc-session-menu:not(.tc-is-open),
[data-bs-theme="dark"] .footer-copy {
    background: linear-gradient(110deg, #7a5ed4 0%, #5b47b8 100%) !important;
    border-bottom-color: rgba(255, 255, 255, .16);
}

[data-bs-theme="dark"] .footer-copy,
[data-bs-theme="dark"] .footer-copy p,
[data-bs-theme="dark"] .footer-copy a {
    color: #f4f1f8 !important;
}

[data-bs-theme="dark"] .footer-copy a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

[data-bs-theme="dark"] .banner,
[data-bs-theme="dark"] #home.banner,
[data-bs-theme="dark"] #perfil-privado .banner {
    background: linear-gradient(180deg, #4a3488 0%, #32265e 42%, #1a1824 100%) !important;
}

[data-bs-theme="dark"] .banner .svg-wave,
[data-bs-theme="dark"] #home .svg-wave {
    display: block;
    line-height: 0;
    background-color: #1a1824;
    -webkit-mask-image: url("/static/assets/images/index/applight-wave.svg");
    mask-image: url("/static/assets/images/index/applight-wave.svg");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

[data-bs-theme="dark"] .banner .svg-hero,
[data-bs-theme="dark"] #home .svg-hero {
    visibility: hidden;
    opacity: 0;
    filter: none;
}

[data-bs-theme="dark"] .banner .feature-mobile img,
[data-bs-theme="dark"] #home .feature-mobile img {
    filter: brightness(.9) saturate(.88);
}

[data-bs-theme="dark"] .about,
[data-bs-theme="dark"] .feature,
[data-bs-theme="dark"] .team,
[data-bs-theme="dark"] #about,
[data-bs-theme="dark"] #features,
[data-bs-theme="dark"] #team {
    background: #1a1824 !important;
    border-color: transparent !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

[data-bs-theme="dark"] .sectioner-header p,
[data-bs-theme="dark"] .icon-box p,
[data-bs-theme="dark"] .single-feature p,
[data-bs-theme="dark"] .media-body p,
[data-bs-theme="dark"] #about p,
[data-bs-theme="dark"] #features p,
[data-bs-theme="dark"] #team p {
    color: #e4dcf2 !important;
}

[data-bs-theme="dark"] .team-detail h4,
[data-bs-theme="dark"] .single-feature h5,
[data-bs-theme="dark"] .icon-box h5 {
    color: #e0c8ff !important;
}

[data-bs-theme="dark"] .single-feature h5,
[data-bs-theme="dark"] .icon-box h5 {
    color: #e8d4ff !important;
}

[data-bs-theme="dark"] .single-feature p {
    color: #efe8f8 !important;
}

[data-bs-theme="dark"] .icon-border span {
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #e0c8ff !important;
    border-color: #c4a6ff !important;
    background: transparent;
    line-height: 1 !important;
}

[data-bs-theme="dark"] .line,
[data-bs-theme="dark"] .line::after {
    background: #c4a6ff;
    border-bottom-color: #c4a6ff;
}

[data-bs-theme="dark"] .btn-light,
[data-bs-theme="dark"] .btn-outline-light {
    background-color: var(--tc-surface-2) !important;
    border-color: var(--tc-border) !important;
    color: var(--tc-text) !important;
}

[data-bs-theme="dark"] .swal2-popup {
    background: var(--tc-surface) !important;
    color: var(--tc-text) !important;
}

.progress-wrap {
    right: 18px !important;
    bottom: 18px !important;
    left: auto !important;
    z-index: 1050;
}

[data-bs-theme="dark"] .progress-wrap {
    background: #2c2838 !important;
    border: 1px solid #8d7dff !important;
}

[data-bs-theme="dark"] .progress-wrap .text-primary {
    color: #e6dcff !important;
}

[data-bs-theme="dark"] .float-btn,
[data-bs-theme="dark"] .float-btn:hover,
[data-bs-theme="dark"] .float-btn i,
[data-bs-theme="dark"] .float-btn:hover i {
    color: #fff !important;
    border: 0 !important;
    outline: 0 !important;
}

[data-bs-theme="dark"] .phone-btn {
    background-color: #007bff !important;
}

[data-bs-theme="dark"] .whatsapp-btn {
    background-color: #25d366 !important;
}

[data-bs-theme="dark"] .tc-user-identity__name {
    color: #e6dcff !important;
}

[data-bs-theme="dark"] .tc-user-identity__rut {
    color: #c8bfd8 !important;
}

[data-bs-theme="dark"] .buttons,
[data-bs-theme="dark"] .buttons-select,
[data-bs-theme="dark"] .buttons-select-wide,
[data-bs-theme="dark"] .buttons-create,
[data-bs-theme="dark"] .buttons-closee,
[data-bs-theme="dark"] .buttons-resultado,
[data-bs-theme="dark"] .buttons-informe,
[data-bs-theme="dark"] .buttons-accion-ok,
[data-bs-theme="dark"] .buttons-pdf,
[data-bs-theme="dark"] .buttons-pdf-informe,
[data-bs-theme="dark"] .buttons-link,
[data-bs-theme="dark"] .buttons-ok,
[data-bs-theme="dark"] .buttons-save,
[data-bs-theme="dark"] .buttons-interior-link,
[data-bs-theme="dark"] .buttons-interior-ok,
[data-bs-theme="dark"] .buttons-interior-ver,
[data-bs-theme="dark"] .buttons-interior-save,
[data-bs-theme="dark"] .btn-verde,
[data-bs-theme="dark"] .btn-amarillo,
[data-bs-theme="dark"] .btn-rojo {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .buttons span,
[data-bs-theme="dark"] .buttons i,
[data-bs-theme="dark"] .buttons-select span,
[data-bs-theme="dark"] .buttons-select i,
[data-bs-theme="dark"] .buttons-select-wide span,
[data-bs-theme="dark"] .buttons-select-wide i,
[data-bs-theme="dark"] .buttons-create span,
[data-bs-theme="dark"] .buttons-create i,
[data-bs-theme="dark"] .buttons-closee span,
[data-bs-theme="dark"] .buttons-closee i,
[data-bs-theme="dark"] .buttons-resultado span,
[data-bs-theme="dark"] .buttons-resultado i,
[data-bs-theme="dark"] .buttons-informe span,
[data-bs-theme="dark"] .buttons-informe i,
[data-bs-theme="dark"] .buttons-accion-ok span,
[data-bs-theme="dark"] .buttons-accion-ok i,
[data-bs-theme="dark"] .buttons-pdf span,
[data-bs-theme="dark"] .buttons-pdf i,
[data-bs-theme="dark"] .buttons-link span,
[data-bs-theme="dark"] .buttons-link i,
[data-bs-theme="dark"] .buttons-ok span,
[data-bs-theme="dark"] .buttons-ok i,
[data-bs-theme="dark"] .buttons-save span,
[data-bs-theme="dark"] .buttons-save i {
    color: #ffffff !important;
}
