/* =========================================================
   CODIS — TEMA GLOBAL
   Azul escuro + modo claro
========================================================= */


/* =========================================================
   BOTÃO DO TEMA
========================================================= */

.logo {
    position: relative;
}


.theme-toggle {
    width: 34px;
    height: 34px;

    flex:
        0
        0
        34px;

    margin-left:
        auto;

    padding:
        0;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.09
        );

    border-radius:
        10px;

    background:
        rgba(
            255,
            255,
            255,
            0.045
        );

    color:
        inherit;

    font-size:
        17px;

    line-height:
        1;

    cursor:
        pointer;

    transition:
        transform .18s ease,
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}


.theme-toggle:hover {

    transform:
        translateY(-1px);

    background:
        rgba(
            255,
            255,
            255,
            0.08
        );

    border-color:
        rgba(
            80,
            180,
            235,
            0.25
        );

    box-shadow:
        0 5px 18px
        rgba(
            0,
            0,
            0,
            0.15
        );

}


.theme-toggle:focus-visible {

    outline:
        2px solid
        rgba(
            61,
            165,
            225,
            0.9
        );

    outline-offset:
        3px;

}


/* =========================================================
   TRANSIÇÕES GLOBAIS
========================================================= */

body,
.sidebar,
.relogio,
.auth-card,
.main-timer-card,
.settings-card,
.manual-card,
.stat,
.history-card,
.history-row,
.config-card,
.acesso-card,
.log-entry,
.hardware-device,
.hardware-dialog,
.cube-logs-card,
.cube-logs-users,
.cube-logs-detail {

    transition:
        background-color .22s ease,
        background .22s ease,
        color .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;

}


/* =========================================================
   VARIÁVEIS DO MODO CLARO
========================================================= */

html[data-theme="light"] {

    color-scheme:
        light;

    --bg:
        #eef4f9;

    --sidebar:
        #ffffff;

    --card:
        #ffffff;

    --card-hover:
        #f5f9fc;

    --border:
        rgba(
            21,
            51,
            75,
            0.12
        );

    --text:
        #10283d;

    --muted:
        #657d91;

    --blue:
        #247fbd;

}


/* =========================================================
   BASE CLARA
========================================================= */

html[data-theme="light"] body {

    background:
        linear-gradient(
            135deg,
            #edf4f9,
            #f7fbfe
        )
        !important;

    color:
        #10283d
        !important;

}


html[data-theme="light"] .sidebar {

    background:
        #ffffff
        !important;

    border-right-color:
        #d9e5ee
        !important;

    box-shadow:
        10px 0 28px
        rgba(
            31,
            67,
            96,
            0.055
        );

}


html[data-theme="light"] .logo {

    border-bottom-color:
        #e1eaf1
        !important;

}


html[data-theme="light"] .logo-text strong {

    color:
        #10283d
        !important;

}


html[data-theme="light"] .logo-text span {

    color:
        #6d8294
        !important;

}


html[data-theme="light"] .theme-toggle {

    border-color:
        #d6e2eb;

    background:
        #f3f7fa;

    color:
        #17354d;

    box-shadow:
        0 4px 14px
        rgba(
            31,
            67,
            96,
            0.07
        );

}


html[data-theme="light"] .theme-toggle:hover {

    background:
        #eaf3f9;

    border-color:
        #bcd7e8;

}


/* =========================================================
   MENU CLARO
========================================================= */

html[data-theme="light"] .menu-item {

    color:
        #60778a
        !important;

}


html[data-theme="light"] .menu-item:hover {

    color:
        #163249
        !important;

    background:
        #f0f5f9
        !important;

}


html[data-theme="light"] .menu-item.ativo {

    color:
        #187dbd
        !important;

    background:
        #e7f4fc
        !important;

    border-color:
        #cde7f6
        !important;

}


html[data-theme="light"] .sidebar-footer {

    color:
        #75899a
        !important;

}


/* =========================================================
   CABEÇALHOS / RELÓGIO
========================================================= */

html[data-theme="light"] .topbar h1,
html[data-theme="light"] .logs-heading h2,
html[data-theme="light"] .config-card h2,
html[data-theme="light"] .party-modal-card h2 {

    color:
        #10283d
        !important;

}


html[data-theme="light"] .pagina-label,
html[data-theme="light"] .section-label,
html[data-theme="light"] .status-label,
html[data-theme="light"] .logs-eyebrow,
html[data-theme="light"] .acesso-modal-label {

    color:
        #2c8bc3
        !important;

}


html[data-theme="light"] .relogio {

    background:
        #ffffff
        !important;

    border-color:
        #d8e4ed
        !important;

    color:
        #48647b
        !important;

    box-shadow:
        0 5px 18px
        rgba(
            30,
            65,
            90,
            0.045
        );

}


/* =========================================================
   DISCORD / CONTA
========================================================= */

html[data-theme="light"] .auth-card {

    background:
        linear-gradient(
            120deg,
            #ffffff,
            #f6faff
        )
        !important;

    border-color:
        #d3e0eb
        !important;

    box-shadow:
        0 14px 34px
        rgba(
            24,
            61,
            90,
            0.07
        );

}


html[data-theme="light"] .auth-card p {

    color:
        #5b7287
        !important;

}


html[data-theme="light"] .auth-role-section {

    border-top-color:
        #dbe6ef
        !important;

}


html[data-theme="light"] .auth-secondary {

    color:
        #214159
        !important;

    background:
        #edf4f8
        !important;

    border-color:
        #cad9e5
        !important;

}


html[data-theme="light"] .auth-permissions li {

    color:
        #31536d
        !important;

    background:
        #e9f2f8
        !important;

}


html[data-theme="light"] .auth-roles .role-anonymous {

    color:
        #354c60
        !important;

    background:
        #edf2f6
        !important;

    border-color:
        #c8d3dc
        !important;

}


html[data-theme="light"] .auth-roles .role-configurador {

    color:
        #705d00
        !important;

    background:
        #fff8d7
        !important;

    border-color:
        #d5bf55
        !important;

}


html[data-theme="light"] .auth-roles .role-responsavel {

    color:
        #3f4394
        !important;

    background:
        #efefff
        !important;

    border-color:
        #b7b8ea
        !important;

}


html[data-theme="light"] .auth-roles .role-codi {

    color:
        #166b9d
        !important;

    background:
        #e8f5fc
        !important;

    border-color:
        #a8d9f2
        !important;

}


/* =========================================================
   CUBE TIMER — CARTÕES
========================================================= */

html[data-theme="light"] .mode-card,
html[data-theme="light"] .main-timer-card,
html[data-theme="light"] .settings-card,
html[data-theme="light"] .manual-card,
html[data-theme="light"] .stat,
html[data-theme="light"] .history-card,
html[data-theme="light"] .history-row,
html[data-theme="light"] .party-member,
html[data-theme="light"] .party-h2h-player,
html[data-theme="light"] .party-compare-stat,
html[data-theme="light"] .party-round-row,
html[data-theme="light"] .party-auth-status {

    background:
        #ffffff
        !important;

    border-color:
        #dbe6ee
        !important;

    box-shadow:
        0 8px 22px
        rgba(
            23,
            55,
            80,
            0.045
        );

}


html[data-theme="light"] .mode-btn {

    color:
        #667d90
        !important;

}


html[data-theme="light"] .mode-btn.active {

    color:
        #176fa7
        !important;

    background:
        #e6f3fb
        !important;

}


html[data-theme="light"] .scramble-button,
html[data-theme="light"] .secondary-btn,
html[data-theme="light"] .party-top-btn,
html[data-theme="light"] .party-mini-btn,
html[data-theme="light"] .party-leave-btn,
html[data-theme="light"] .party-main-action.secondary,
html[data-theme="light"] .party-compare-btn,
html[data-theme="light"] .row-action {

    color:
        #36556d
        !important;

    background:
        #f3f7fa
        !important;

    border-color:
        #d6e2eb
        !important;

}


html[data-theme="light"] .scramble-button:hover,
html[data-theme="light"] .secondary-btn:hover,
html[data-theme="light"] .party-top-btn:hover,
html[data-theme="light"] .party-mini-btn:hover,
html[data-theme="light"] .row-action:hover {

    background:
        #e9f2f8
        !important;

}


html[data-theme="light"] .timer-display {

    color:
        #0f2a40;

}


html[data-theme="light"] .timer-display.ready {

    color:
        #19a660
        !important;

}


html[data-theme="light"] .timer-display.inspection {

    color:
        #b48200
        !important;

}


html[data-theme="light"] .inspection-hint,
html[data-theme="light"] .scramble-status,
html[data-theme="light"] .cube-help,
html[data-theme="light"] .small,
html[data-theme="light"] .history-meta,
html[data-theme="light"] .empty {

    color:
        #6b8295
        !important;

}


html[data-theme="light"] .manual-entry input,
html[data-theme="light"] #partyCodeInput {

    color:
        #17364d
        !important;

    background:
        #f5f9fc
        !important;

    border-color:
        #cfdee9
        !important;

}


html[data-theme="light"] .history-list::-webkit-scrollbar-thumb {

    background:
        #c1d1dd
        !important;

}


html[data-theme="light"] .party-bar {

    background:
        linear-gradient(
            90deg,
            #e8f5fc,
            #f6fbfe
        )
        !important;

    border-color:
        #cfe4f0
        !important;

}


html[data-theme="light"] .party-room-main small,
html[data-theme="light"] .party-round-box small,
html[data-theme="light"] .party-round-box strong,
html[data-theme="light"] .party-member-name,
html[data-theme="light"] .party-modal-description {

    color:
        #34566e
        !important;

}


html[data-theme="light"] .party-modal-backdrop {

    background:
        rgba(
            25,
            45,
            60,
            0.40
        )
        !important;

}


html[data-theme="light"] .party-modal-card {

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #f5f9fc
        )
        !important;

    border-color:
        #d1e0ea
        !important;

    color:
        #163249
        !important;

}


html[data-theme="light"] .party-modal-close {

    color:
        #405f76
        !important;

}


html[data-theme="light"] .party-avatar,
html[data-theme="light"] .party-h2h-avatar,
html[data-theme="light"] .party-h2h-player img {

    background:
        #e9f2f7
        !important;

}


/* =========================================================
   CONFIG / LOGS / HARDWARE
========================================================= */

html[data-theme="light"] .config-card,
html[data-theme="light"] .acesso-card,
html[data-theme="light"] #panel-logs .config-card,
html[data-theme="light"] .log-entry,
html[data-theme="light"] .hardware-device,
html[data-theme="light"] .hardware-dialog,
html[data-theme="light"] .software-client,
html[data-theme="light"] .cube-logs-card,
html[data-theme="light"] .cube-logs-users,
html[data-theme="light"] .cube-logs-detail,
html[data-theme="light"] .cube-detail-head,
html[data-theme="light"] .cube-detail-stat,
html[data-theme="light"] .cube-solve-row,
html[data-theme="light"] .cube-logs-summary span {

    color:
        #19364d
        !important;

    background:
        #ffffff
        !important;

    border-color:
        #d7e3ec
        !important;

    box-shadow:
        0 8px 24px
        rgba(
            25,
            59,
            84,
            0.045
        );

}


html[data-theme="light"] .config-card > p,
html[data-theme="light"] .logs-heading p,
html[data-theme="light"] .config-card .log-meta,
html[data-theme="light"] .config-card .logs-note,
html[data-theme="light"] .acesso-detalhes,
html[data-theme="light"] .acesso-modal-identidade p,
html[data-theme="light"] .software-client,
html[data-theme="light"] #logs-status {

    color:
        #637a8d
        !important;

}


html[data-theme="light"] .config-tabs,
html[data-theme="light"] .logs-filters,
html[data-theme="light"] .cube-logs-toolbar {

    background:
        #eef4f8
        !important;

    border-color:
        #d7e3ec
        !important;

}


html[data-theme="light"] .config-tabs button,
html[data-theme="light"] .config-subtabs button,
html[data-theme="light"] .hardware-actions button,
html[data-theme="light"] .hardware-edit-button,
html[data-theme="light"] .dialog-actions button,
html[data-theme="light"] #logs-refresh,
html[data-theme="light"] .cube-logs-refresh,
html[data-theme="light"] .hardware-groups button {

    color:
        #35556e
        !important;

    background:
        #edf4f8
        !important;

    border-color:
        #d3e0e9
        !important;

}


html[data-theme="light"] .config-tabs button:hover,
html[data-theme="light"] .config-subtabs button:hover,
html[data-theme="light"] #logs-refresh:hover,
html[data-theme="light"] .cube-logs-refresh:hover,
html[data-theme="light"] .hardware-groups button:hover {

    background:
        #e3eef5
        !important;

}


html[data-theme="light"] .config-tabs button[aria-selected="true"],
html[data-theme="light"] .config-subtabs button[aria-selected="true"],
html[data-theme="light"] .hardware-groups button[aria-selected="true"],
html[data-theme="light"] .hardware-actions button:first-child,
html[data-theme="light"] .dialog-actions button[type="submit"] {

    color:
        #ffffff
        !important;

    background:
        #2682bd
        !important;

    border-color:
        #2682bd
        !important;

}


html[data-theme="light"] .logs-filters input,
html[data-theme="light"] .logs-filters select,
html[data-theme="light"] .hardware-dialog input,
html[data-theme="light"] .hardware-dialog select,
html[data-theme="light"] .cube-logs-toolbar input,
html[data-theme="light"] .cube-solves-toolbar input {

    color:
        #19364d
        !important;

    background:
        #ffffff
        !important;

    border-color:
        #cfdee8
        !important;

}


html[data-theme="light"] .logs-filters input::placeholder,
html[data-theme="light"] .cube-logs-toolbar input::placeholder,
html[data-theme="light"] .cube-solves-toolbar input::placeholder {

    color:
        #91a4b3
        !important;

}


html[data-theme="light"] .log-event-icon,
html[data-theme="light"] .hardware-device-icon,
html[data-theme="light"] .cube-user-avatar {

    background:
        #e9f2f8
        !important;

}


html[data-theme="light"] .log-entry time,
html[data-theme="light"] .hardware-count,
html[data-theme="light"] .log-roles span {

    color:
        #4d6a80
        !important;

    background:
        #edf4f8
        !important;

}


html[data-theme="light"] .cube-user-card:hover {

    background:
        #f0f6fa
        !important;

}


html[data-theme="light"] .cube-user-card.active {

    background:
        #e0f1fb
        !important;

}


html[data-theme="light"] .cube-copy-scramble {

    color:
        #31536d
        !important;

    background:
        #edf4f8
        !important;

    border-color:
        #d4e1ea
        !important;

}


html[data-theme="light"] .acesso-modal-backdrop,
html[data-theme="light"] .hardware-dialog::backdrop {

    background:
        rgba(
            27,
            45,
            60,
            0.38
        )
        !important;

}


html[data-theme="light"] .acesso-modal-card {

    color:
        #17364d
        !important;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f6fafc
        )
        !important;

    border-color:
        #d4e2ec
        !important;

}


html[data-theme="light"] .acesso-modal-separador {

    background:
        #e0e9f0
        !important;

}


html[data-theme="light"] .acesso-modal-fechar,
html[data-theme="light"] .historico-pagina-icon {

    color:
        #36566f
        !important;

    background:
        #eef4f8
        !important;

    border-color:
        #d3e0e9
        !important;

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 800px) {

    .theme-toggle {

        width:
            30px;

        height:
            30px;

        flex-basis:
            30px;

        margin-left:
            4px;

        font-size:
            15px;

    }

}


/* =========================================================
   MODO CLARO — COR ÚNICA DE TEXTO
   Tudo o que é texto usa exatamente a mesma cor.
========================================================= */

html[data-theme="light"] {

    --light-text:
        #17364d;

}


/*
 * Regra final e intencional:
 * no modo claro todo o texto herda a mesma cor,
 * incluindo:
 * - scramble
 * - timer
 * - Ao5 / Ao12 / Ao100 / Média / Melhor
 * - valores das estatísticas
 * - cada tempo do histórico
 * - submenus e separadores
 * - Config / Logs / Hardware / Software
 * - Discord
 */
html[data-theme="light"] body,
html[data-theme="light"] body * {

    color:
        var(--light-text)
        !important;

}


/* Inputs / placeholders também ficam coerentes. */
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {

    color:
        var(--light-text)
        !important;

    opacity:
        .58;

}


/*
 * Como todo o texto passa a ser escuro, os botões/abas que antes
 * tinham fundo azul forte passam a usar azul muito claro.
 * Assim mantemos a mesma cor de letra sem perder contraste.
 */
html[data-theme="light"] .auth-button,
html[data-theme="light"] .scramble-button.primary,
html[data-theme="light"] .primary-btn,
html[data-theme="light"] .mode-btn.active,
html[data-theme="light"] .config-tabs button[aria-selected="true"],
html[data-theme="light"] .config-subtabs button[aria-selected="true"],
html[data-theme="light"] .hardware-groups button[aria-selected="true"],
html[data-theme="light"] .hardware-actions button:first-child,
html[data-theme="light"] .dialog-actions button[type="submit"],
html[data-theme="light"] .party-main-action,
html[data-theme="light"] .party-compare-btn {

    background:
        #dff1fb
        !important;

    border-color:
        #aed8ed
        !important;

    color:
        var(--light-text)
        !important;

}


/* Hover igualmente claro para não mudar a cor da letra. */
html[data-theme="light"] .auth-button:hover,
html[data-theme="light"] .scramble-button.primary:hover,
html[data-theme="light"] .primary-btn:hover,
html[data-theme="light"] .mode-btn.active:hover,
html[data-theme="light"] .config-tabs button[aria-selected="true"]:hover,
html[data-theme="light"] .config-subtabs button[aria-selected="true"]:hover,
html[data-theme="light"] .hardware-groups button[aria-selected="true"]:hover,
html[data-theme="light"] .party-main-action:hover,
html[data-theme="light"] .party-compare-btn:hover {

    background:
        #d2eaf7
        !important;

}


/* =========================================================
   CUBE TIMER — reforço explícito
========================================================= */

html[data-theme="light"] .scramble-text,
html[data-theme="light"] .scramble-status,
html[data-theme="light"] .timer-display,
html[data-theme="light"] .phase-label,
html[data-theme="light"] .inspection-hint,
html[data-theme="light"] .stat,
html[data-theme="light"] .stat span,
html[data-theme="light"] .stat strong,
html[data-theme="light"] .stat small,
html[data-theme="light"] .history-row,
html[data-theme="light"] .history-number,
html[data-theme="light"] .history-meta,
html[data-theme="light"] .history-time,
html[data-theme="light"] .history-row strong,
html[data-theme="light"] .history-row span,
html[data-theme="light"] .history-row small,
html[data-theme="light"] .solve-detail,
html[data-theme="light"] .solve-detail *,
html[data-theme="light"] .mode-card,
html[data-theme="light"] .mode-btn,
html[data-theme="light"] .settings-card,
html[data-theme="light"] .manual-card,
html[data-theme="light"] .stackmat-status-block,
html[data-theme="light"] .stackmat-status-block *,
html[data-theme="light"] .party-bar,
html[data-theme="light"] .party-bar *,
html[data-theme="light"] .party-modal-card,
html[data-theme="light"] .party-modal-card * {

    color:
        var(--light-text)
        !important;

}


/* =========================================================
   CONFIG — submenus e cada linha dos logs
========================================================= */

html[data-theme="light"] .config-tabs,
html[data-theme="light"] .config-tabs *,
html[data-theme="light"] .config-subtabs,
html[data-theme="light"] .config-subtabs *,
html[data-theme="light"] .logs-filters,
html[data-theme="light"] .logs-filters *,
html[data-theme="light"] .log-entry,
html[data-theme="light"] .log-entry *,
html[data-theme="light"] .hardware-device,
html[data-theme="light"] .hardware-device *,
html[data-theme="light"] .hardware-dialog,
html[data-theme="light"] .hardware-dialog *,
html[data-theme="light"] .cube-logs-card,
html[data-theme="light"] .cube-logs-card *,
html[data-theme="light"] .cube-logs-users,
html[data-theme="light"] .cube-logs-users *,
html[data-theme="light"] .cube-logs-detail,
html[data-theme="light"] .cube-logs-detail *,
html[data-theme="light"] .cube-solve-row,
html[data-theme="light"] .cube-solve-row * {

    color:
        var(--light-text)
        !important;

}


/* =========================================================
   MODO CLARO — MODAIS DE ESTATÍSTICAS / TEMPOS
   Ao3 / Ao5 / Ao12 / Ao100 e detalhe de cada solve
========================================================= */


/* Fundo exterior dos modais */
html[data-theme="light"] .stats-detail-backdrop,
html[data-theme="light"] .solve-detail-backdrop {

    background:
        rgba(
            31,
            46,
            58,
            0.34
        )
        !important;

}


/* Caixa principal */
html[data-theme="light"] .stats-detail-card,
html[data-theme="light"] .solve-detail-card {

    background:
        #ffffff
        !important;

    border-color:
        #d3e1ea
        !important;

    color:
        var(--light-text)
        !important;

    box-shadow:
        0 24px 70px
        rgba(
            26,
            57,
            80,
            0.18
        )
        !important;

}


/* Botão fechar */
html[data-theme="light"] .stats-detail-close,
html[data-theme="light"] .solve-detail-close {

    background:
        #edf4f8
        !important;

    border-color:
        #d1dfe9
        !important;

    color:
        var(--light-text)
        !important;

}


html[data-theme="light"] .stats-detail-close:hover,
html[data-theme="light"] .solve-detail-close:hover {

    background:
        #e2edf4
        !important;

}


/* =========================================================
   MODAL DAS ESTATÍSTICAS
========================================================= */

html[data-theme="light"] .stats-detail-tabs {

    border-bottom-color:
        #dce6ed
        !important;

}


html[data-theme="light"] .stats-detail-tab {

    background:
        #f3f7fa
        !important;

    border-color:
        #d7e3eb
        !important;

    color:
        var(--light-text)
        !important;

}


html[data-theme="light"] .stats-detail-tab:hover {

    background:
        #e8f1f7
        !important;

}


html[data-theme="light"] .stats-detail-tab.active {

    background:
        #dff1fb
        !important;

    border-color:
        #acd5ea
        !important;

    color:
        var(--light-text)
        !important;

}


html[data-theme="light"] .stats-detail-summary,
html[data-theme="light"] .stats-solve-row {

    background:
        #f8fbfd
        !important;

    border-color:
        #dbe6ed
        !important;

    color:
        var(--light-text)
        !important;

}


html[data-theme="light"] .stats-solve-row:hover {

    background:
        #f1f7fa
        !important;

}


html[data-theme="light"] .stats-copy-scramble {

    background:
        #edf4f8
        !important;

    border-color:
        #d3e0e9
        !important;

    color:
        var(--light-text)
        !important;

}


html[data-theme="light"] .stats-copy-scramble:hover {

    background:
        #e2edf4
        !important;

}


/* Scroll do modal de estatísticas */
html[data-theme="light"] .stats-detail-body {

    scrollbar-color:
        #bccdd9
        transparent;

}


html[data-theme="light"] .stats-detail-body::-webkit-scrollbar-thumb {

    background:
        #bccdd9
        !important;

}


/* =========================================================
   MODAL DO TEMPO ATUAL / DETALHE DA RESOLUÇÃO
========================================================= */

html[data-theme="light"] .solve-detail-summary,
html[data-theme="light"] .solve-detail-field,
html[data-theme="light"] .solve-detail-scramble-box {

    background:
        #f8fbfd
        !important;

    border-color:
        #dbe6ed
        !important;

    color:
        var(--light-text)
        !important;

}


html[data-theme="light"] .solve-detail-copy,
html[data-theme="light"] .solve-detail-actions button {

    background:
        #edf4f8
        !important;

    border-color:
        #d3e0e9
        !important;

    color:
        var(--light-text)
        !important;

}


html[data-theme="light"] .solve-detail-copy:hover,
html[data-theme="light"] .solve-detail-actions button:hover {

    background:
        #e2edf4
        !important;

}


html[data-theme="light"] .solve-detail-actions button.active {

    background:
        #dff1fb
        !important;

    border-color:
        #acd5ea
        !important;

    color:
        var(--light-text)
        !important;

}


/*
 * O botão Excluir continua distinguível pelo contorno,
 * mas mantém exatamente a mesma cor de texto.
 */
html[data-theme="light"] .solve-detail-actions button.danger {

    background:
        #fff4f4
        !important;

    border-color:
        #efcaca
        !important;

    color:
        var(--light-text)
        !important;

}


/* Tudo dentro destes dois modais mantém a cor única definida */
html[data-theme="light"] .stats-detail-card *,
html[data-theme="light"] .solve-detail-card * {

    color:
        var(--light-text)
        !important;

}


/* =========================================================
   MODO CLARO — MENU DE ANÁLISE
   Cross / XCross / XXCross
========================================================= */


/* O fundo desfocado deixa de ficar quase preto no modo claro. */
html[data-theme="light"]
body.cross-analysis-open
.cross-analysis-static-blur {

    filter:
        blur(6px)
        brightness(.88)
        !important;

    opacity:
        .74
        !important;

}


/* Scramble que fica por cima do blur. */
html[data-theme="light"]
.cross-analysis-scramble-text-clone {

    color:
        var(--light-text)
        !important;

}


/* Caixa principal da análise. */
html[data-theme="light"]
.cross-analysis-card {

    background:
        #ffffff
        !important;

    border-color:
        #d2e0e9
        !important;

    color:
        var(--light-text)
        !important;

    box-shadow:
        0 26px 80px
        rgba(
            27,
            57,
            80,
            .20
        )
        !important;

}


/* Garante a mesma cor de texto em TODO o conteúdo da análise. */
html[data-theme="light"]
.cross-analysis-card,
html[data-theme="light"]
.cross-analysis-card * {

    color:
        var(--light-text)
        !important;

}


/* Fechar */
html[data-theme="light"]
.cross-analysis-close {

    background:
        #eef4f8
        !important;

    border-color:
        #d3e0e9
        !important;

    color:
        var(--light-text)
        !important;

}


html[data-theme="light"]
.cross-analysis-close:hover {

    background:
        #e3edf4
        !important;

}


/* Cross / XCross / XXCross */
html[data-theme="light"]
.cross-analysis-tabs {

    border-bottom-color:
        #dce6ed
        !important;

}


html[data-theme="light"]
.cross-analysis-tab {

    background:
        #f3f7fa
        !important;

    border-color:
        #d6e2eb
        !important;

    color:
        var(--light-text)
        !important;

}


html[data-theme="light"]
.cross-analysis-tab:hover {

    background:
        #e8f1f7
        !important;

}


html[data-theme="light"]
.cross-analysis-tab.active {

    background:
        #dff1fb
        !important;

    border-color:
        #abd5eb
        !important;

    color:
        var(--light-text)
        !important;

}


/* Resumo no topo. */
html[data-theme="light"]
.cross-analysis-summary > div {

    background:
        #f7fafc
        !important;

    border-color:
        #dbe6ed
        !important;

}


/* Cada solução. */
html[data-theme="light"]
.cross-analysis-solution {

    background:
        #f8fbfd
        !important;

    border-color:
        #dbe6ed
        !important;

}


html[data-theme="light"]
.cross-analysis-solution.recommended {

    background:
        linear-gradient(
            100deg,
            #fff8df,
            #f8fbfd
        )
        !important;

    border-color:
        #e8d594
        !important;

}


html[data-theme="light"]
.cross-analysis-solution.optimal {

    border-color:
        #acd5ea
        !important;

}


/* Número de movimentos. */
html[data-theme="light"]
.cross-analysis-move-count {

    background:
        #eaf2f7
        !important;

    color:
        var(--light-text)
        !important;

}


/* Como segurar o cubo. */
html[data-theme="light"]
.cross-analysis-hold {

    background:
        #fff9e8
        !important;

    border-color:
        #eadba7
        !important;

}


/* Par do XCross. */
html[data-theme="light"]
.cross-analysis-pair {

    background:
        #edf7fc
        !important;

    border-color:
        #c7e4f2
        !important;

}


/* Algoritmo recomendado. */
html[data-theme="light"]
.cross-analysis-alg {

    background:
        #edf3f7
        !important;

    border:
        1px solid
        #d7e3eb
        !important;

    color:
        var(--light-text)
        !important;

}


/* Etiquetas da solução. */
html[data-theme="light"]
.cross-analysis-tags span {

    background:
        #eaf7f0
        !important;

    border-color:
        #c7e6d5
        !important;

    color:
        var(--light-text)
        !important;

}


/* Botões dentro das soluções. */
html[data-theme="light"]
.cross-analysis-actions button {

    background:
        #edf4f8
        !important;

    border-color:
        #d2dfe8
        !important;

    color:
        var(--light-text)
        !important;

}


html[data-theme="light"]
.cross-analysis-actions button:hover {

    background:
        #e2edf4
        !important;

}


/* Mais soluções. */
html[data-theme="light"]
.cross-analysis-more {

    border-top-color:
        #dce6ed
        !important;

}


html[data-theme="light"]
.cross-analysis-more summary {

    color:
        var(--light-text)
        !important;

}


/* Estados de carregamento / erro / em breve. */
html[data-theme="light"]
.cross-analysis-loading,
html[data-theme="light"]
.cross-analysis-error,
html[data-theme="light"]
.cross-analysis-coming-soon {

    color:
        var(--light-text)
        !important;

}


/* Scroll do menu da análise. */
html[data-theme="light"]
.cross-analysis-body {

    scrollbar-color:
        #b9cbd8
        transparent;

}


html[data-theme="light"]
.cross-analysis-body::-webkit-scrollbar-thumb {

    background:
        #b9cbd8
        !important;

}



/* =========================================================
   MODO CLARO — SESSÕES DO CUBE TIMER
========================================================= */
html[data-theme="light"] .session-card,
html[data-theme="light"] .session-select-wrap select,
html[data-theme="light"] .session-actions button {
    background:#ffffff !important;
    border-color:#d6e2eb !important;
    color:var(--light-text) !important;
}
html[data-theme="light"] .session-select-wrap select option { background:#fff !important; color:var(--light-text) !important; }
html[data-theme="light"] .session-actions button:hover { background:#eaf3f8 !important; }
html[data-theme="light"] .session-actions button.danger:hover { background:#fff0f1 !important; border-color:#efc7cb !important; }
html[data-theme="light"] .session-status { background:#fff8df !important; border-color:#e8d594 !important; color:var(--light-text) !important; }


/* =========================================================
   MODO CLARO — SESSÕES NAS LOGS DO CUBE TIMER
========================================================= */
html[data-theme="light"] .cube-session-log-bar,
html[data-theme="light"] .cube-session-log-bar select {
    background:#ffffff !important;
    border-color:#d6e2eb !important;
    color:var(--light-text) !important;
}
html[data-theme="light"] .cube-session-log-bar * { color:var(--light-text) !important; }


/* =========================================================
   RECORDES — destaque também no modo claro
========================================================= */

html[data-theme="light"] .history-time.history-time-record,
html[data-theme="light"] .solve-delta.record,
html[data-theme="light"] .record-badge {

    color:
        #a96f00
        !important;

}


html[data-theme="light"] .history-row.history-record-row {

    border-color:
        #e5c66f
        !important;

    background:
        linear-gradient(
            90deg,
            #fff7d9,
            #ffffff
        )
        !important;

}


html[data-theme="light"] .stat.stat-current-record {

    border-color:
        #dfbd57
        !important;

    background:
        linear-gradient(
            135deg,
            #fff5c9,
            #fffdf5
        )
        !important;

    box-shadow:
        0 8px 24px
        rgba(
            180,
            126,
            0,
            0.08
        )
        !important;

}


html[data-theme="light"] .stat.stat-current-record span,
html[data-theme="light"] .stat.stat-current-record strong,
html[data-theme="light"] .stat.stat-current-record small {

    color:
        #a96f00
        !important;

}


html[data-theme="light"] .stats-copy-all {

    background:
        #fff5cf
        !important;

    border-color:
        #e4c765
        !important;

    color:
        #8d6200
        !important;

}


html[data-theme="light"] .stats-copy-all:hover {

    background:
        #ffefb0
        !important;

    border-color:
        #d9b84c
        !important;

    color:
        #805700
        !important;

}

