﻿/* ===========================
   BASE
   =========================== */
@font-face {
    font-family: 'Flama';
    src: url('../../../fonts/flama/Flama-Basic2.otf')
}

body {
    font-family: 'Flama', 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Loader */
.loader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: url('../../../File//resource//loading.gif') 50% 50% no-repeat rgb(5,5,5);
    opacity: .85;
}

/* Layout general */
#right-panel {
    background: transparent;
    margin-left: 230px;
}

.content {
    padding: 1.25rem 1.5rem 2.5rem;
    min-height: calc(100vh - 70px);
    background: #f3f4f6;
}

.animated {
    animation-duration: .4s;
}

/* Sidebar */
.left-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 230px;
    background: #020617;
    border-right: 1px solid rgba(15,23,42,0.9);
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

    .left-panel .navbar {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

.main-menu .nav {
    width: 100%;
}

    .main-menu .nav > li {
        width: 100%;
    }

        .main-menu .nav > li.menu-title {
            padding: 0.75rem 1.25rem 0.4rem;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            font-weight: 600;
        }

        .main-menu .nav > li > a {
            display: flex;
            align-items: center;
            padding: 0.65rem 1.25rem;
            font-size: 0.9rem;
            border-radius: 0.75rem;
            margin: 0.15rem 0.65rem;
            transition: all 0.15s ease-in-out;
        }

            .main-menu .nav > li > a .menu-icon {
                margin-right: 0.55rem;
                font-size: 1rem;
                opacity: 0.85;
            }

            .main-menu .nav > li > a:hover,
            .main-menu .nav > li > a:focus,
            .main-menu .nav > li > a.active {
                text-decoration: none;
            }

                .main-menu .nav > li > a:hover .menu-icon {
                    opacity: 1;
                }

.menu-item-has-children > a {
    position: relative;
    padding-right: 1.75rem; /* hueco para la flecha */
}

.left-panel .main-menu .nav > li.menu-item-has-children > a.dropdown-toggle::after {
    font-family: "FontAwesome";
    content: "\f107"; /* icono angle-down */
    border: none; /* pisamos el caret por defecto de Bootstrap */
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.8;
}



.sub-menu {
    border-radius: 0.75rem;
    margin: 0.2rem 0.75rem 0.5rem;
    padding: 0.25rem 0.35rem 0.5rem;
    border: 1px solid rgba(31,41,55,0.85);
}

    .sub-menu > li > a {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        border-radius: 0.55rem;
    }

        .sub-menu > li > a .menu-icon {
            font-size: 0.85rem;
        }

/* Header */
.header {
    position: relative; /* nuevo */
    z-index: 1101; /* nuevo: mayor que el 1000 del sidebar */
    border-bottom: 1px solid rgba(31,41,55,0.9);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    padding: 0.4rem 1.25rem;
}

.navbar-header {
    display: flex;
    align-items: center;
}

    .navbar-header .navbar-brand img {
        max-height: 42px;
    }

#menuToggle {
    margin-left: 0.85rem;
    font-size: 1.1rem;
    cursor: pointer;
}

.header-menu {
    display: flex;
    align-items: center;
    height: 100%;
}
/* Cambio de tema (switch dark / light) */
.theme-toggle-wrapper {
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
}

.theme-toggle-btn {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Dark */
body.theme-dark .theme-toggle-btn {
    color: #f9fafb;
    border-color: rgba(156, 163, 175, 0.8);
    background: rgba(15, 23, 42, 0.85);
}

    body.theme-dark .theme-toggle-btn:hover {
        border-color: #22c55e;
    }

/* Light */
body.theme-light .theme-toggle-btn {
    color: #374151;
    border-color: #d1d5db;
    background: #ffffff;
}

    body.theme-light .theme-toggle-btn:hover {
        border-color: #16a34a;
    }

.theme-toggle-btn i {
    font-size: 0.95rem;
}


.header-left {
    display: flex;
    align-items: center;
}

    .header-left label {
        margin-bottom: 0;
    }

#nameVotation {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-right: 0.5rem;
}

.header-left strong {
    font-size: 0.95rem;
}

/* Usuario */
.user-area .user-avatar {
    border: 2px solid #22c55e;
    padding: 2px;
    width: 36px;
    height: 36px;
}

.user-menu {
    border-radius: 0.75rem;
    border: 1px solid rgba(31,41,55,0.9);
    min-width: 180px;
}

    .user-menu .nav-link {
        font-size: 0.85rem;
    }

        .user-menu .nav-link i {
            width: 18px;
        }

/* Botonera DisplayControl */
#DisplayControl {
    margin-bottom: 1rem;
}

    #DisplayControl .btn {
        border-radius: 999px;
        font-size: 0.85rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        padding: 0.6rem 0.5rem;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

        #DisplayControl .btn i {
            font-size: 1rem;
            margin-right: 0.45rem;
        }

/* Footer */
.site-footer {
    border-top: 1px solid rgba(31,41,55,0.85);
}

    .site-footer .footer-inner {
        font-size: 0.8rem;
    }

/* Botón primario MiVoto */
.btn-primary {
    color: #fff;
    background-color: #F38B15;
    border-color: #F38B15;
}

    .btn-primary:hover {
        background-color: #F5A64C;
        border-color: #F5A64C;
    }

/* Responsivo */
@media (max-width: 991.98px) {
    .left-panel {
        top: 56px;
        position: fixed;
        transform: translateX(-100%);
        transition: transform .25s ease-in-out;
    }

        .left-panel.open {
            transform: translateX(0);
        }

    #right-panel {
        margin-left: 0;
    }

    .header {
        padding: 0.4rem 0.75rem;
    }

    .content {
        padding: 1rem 0.9rem 2rem;
    }

    .main-menu .nav > li > a {
        margin: 0.1rem 0.5rem;
    }

    #DisplayControl .btn {
        margin-bottom: 0.3rem;
    }
}

/* ===========================
   THEME DARK
   =========================== */
body.theme-dark {
    background: radial-gradient(circle at top left, #111827 0, #020617 40%, #000000 100%);
    color: #e5e7eb;
}

    /* Sidebar dark */
    body.theme-dark .left-panel {
        background: #020617;
        border-right: 1px solid rgba(15,23,42,0.9);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.6);
    }

    body.theme-dark .main-menu .nav > li.menu-title {
        color: #6b7280;
    }

    body.theme-dark .main-menu .nav > li > a {
        color: #d1d5db;
    }

        body.theme-dark .main-menu .nav > li > a:hover,
        body.theme-dark .main-menu .nav > li > a:focus,
        body.theme-dark .main-menu .nav > li > a.active {
            background: linear-gradient(90deg, #16a34a, #22c55e);
            color: #f9fafb;
            box-shadow: 0 12px 30px rgba(34,197,94,0.45);
        }

    /* Submenu dark */
    body.theme-dark .sub-menu {
        background: #020617;
        border: 1px solid rgba(31,41,55,0.85);
    }

        body.theme-dark .sub-menu > li > a {
            color: #9ca3af;
        }

            body.theme-dark .sub-menu > li > a:hover {
                background: rgba(55,65,81,0.9);
                color: #e5e7eb;
            }

    /* Header dark */
    body.theme-dark .header {
        background: rgba(15,23,42,0.95);
        border-bottom: 1px solid rgba(31,41,55,0.9);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    }

    body.theme-dark #menuToggle {
        color: #e5e7eb;
    }

        body.theme-dark #menuToggle:hover {
            color: #22c55e;
        }

    body.theme-dark #nameVotation {
        color: #9ca3af;
    }

    body.theme-dark .header-left strong {
        color: #f9fafb;
    }

    /* Content dark */
    body.theme-dark .content {
        background: radial-gradient(circle at top left, #020617 0, #020617 45%, #020617 100%);
    }

    /* User menu dark */
    body.theme-dark .user-menu {
        background: #020617;
        border: 1px solid rgba(31,41,55,0.9);
    }

        body.theme-dark .user-menu .nav-link {
            color: #d1d5db;
        }

            body.theme-dark .user-menu .nav-link:hover {
                background: rgba(55,65,81,0.9);
                color: #f9fafb;
            }

    /* Footer dark */
    body.theme-dark .site-footer .footer-inner {
        background: rgba(15,23,42,0.98) !important;
        color: #9ca3af;
    }

        body.theme-dark .site-footer .footer-inner .col-sm-6:last-child {
            color: #6b7280;
        }

    /* Botonera dark */
    body.theme-dark #DisplayControl .btn.btn-success {
        background: linear-gradient(90deg, #15803d, #22c55e);
        box-shadow: 0 10px 25px rgba(34,197,94,0.45);
    }

        body.theme-dark #DisplayControl .btn.btn-success:hover {
            filter: brightness(1.05);
            transform: translateY(-1px);
            box-shadow: 0 16px 38px rgba(34,197,94,0.55);
        }

/* ===========================
   THEME LIGHT
   =========================== */
body.theme-light {
    background: #f3f4f6;
    color: #111827;
}

    /* Sidebar light */
    body.theme-light .left-panel {
        background: #ffffff;
        border-right: 1px solid #e5e7eb;
        box-shadow: 4px 0 20px rgba(0,0,0,0.05);
    }

    body.theme-light .main-menu .nav > li.menu-title {
        color: #9ca3af;
    }

    body.theme-light .main-menu .nav > li > a {
        color: #4b5563;
    }

        body.theme-light .main-menu .nav > li > a:hover,
        body.theme-light .main-menu .nav > li > a.active {
            background: linear-gradient(90deg, #16a34a, #22c55e);
            color: #ffffff;
        }

    /* Submenu light */
    body.theme-light .sub-menu {
        background: #ffffff;
        border: 1px solid #e5e7eb;
    }

        body.theme-light .sub-menu > li > a {
            color: #4b5563;
        }

            body.theme-light .sub-menu > li > a:hover {
                background: #f3f4f6;
                color: #111827;
            }

    /* Header light */
    body.theme-light .header {
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 4px 12px rgba(15,23,42,0.08);
    }

    body.theme-light #menuToggle {
        color: #4b5563;
    }

        body.theme-light #menuToggle:hover {
            color: #16a34a;
        }

    body.theme-light #nameVotation {
        color: #9ca3af;
    }

    body.theme-light .header-left strong {
        color: #111827;
    }

    /* Content light */
    body.theme-light .content {
        background: #f3f4f6;
    }

    /* User menu light */
    body.theme-light .user-menu {
        background: #ffffff;
        border: 1px solid #e5e7eb;
    }

        body.theme-light .user-menu .nav-link {
            color: #4b5563;
        }

            body.theme-light .user-menu .nav-link:hover {
                background: #f3f4f6;
                color: #111827;
            }

    /* Footer light */
    body.theme-light .site-footer .footer-inner {
        background: #ffffff !important;
        color: #6b7280;
        border-top: 1px solid #e5e7eb;
    }

/* ===========================
   COMPONENTES
   =========================== */
/* Cards base */
.vote-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform .18s ease-out, box-shadow .18s ease-out, background-color .18s ease-out;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .vote-card img.card-img-top {
        object-fit: cover;
    }

    .vote-card .card-body {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .vote-card .card-title {
        font-weight: 700;
    }

    .vote-card .card-text {
        font-size: 0.95rem;
    }

    .vote-card:hover {
        transform: translateY(-4px);
    }

/* Cards + tema dark */
body.theme-dark .vote-card {
    background: #020617;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
    color: #e5e7eb;
}

    body.theme-dark .vote-card:hover {
        background-color: #0b1120;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.95);
    }

/* Cards + tema light */
body.theme-light .vote-card {
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    color: #111827;
}

    body.theme-light .vote-card:hover {
        background-color: #f9fafb;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    }

/* Badge de cards */
.vote-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #6b7280;
    margin-bottom: .35rem;
}

body.theme-dark .vote-badge {
    color: #9ca3af;
}

/* index type*/


.fab-add {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform .15s ease-out, box-shadow .15s ease-out, background-color .15s ease-out, color .15s ease-out;
}

    .fab-add i {
        margin-top: 0;
    }

body.theme-dark .fab-add {
    background-color: #22c55e;
    color: #ffffff;
}

    body.theme-dark .fab-add:hover {
        background-color: #bbf7d0;
        color: #14532d;
        transform: translateY(-2px);
        box-shadow: 0 18px 45px rgba(34, 197, 94, 0.6);
    }

body.theme-light .fab-add {
    background-color: #22c55e;
    color: #ffffff;
}

    body.theme-light .fab-add:hover {
        background-color: #16a34a;
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: 0 18px 40px rgba(34, 197, 94, 0.45);
    }


.help-popup {
    position: absolute;
    left: 150px;
    top: 100px;
    border: 1px solid #facc15;
    width: 450px;
    background-color: #f59e0b;
    color: #ffffff;
    box-shadow: 6px 6px 5px #999;
    -webkit-box-shadow: 6px 6px 5px #999;
    -moz-box-shadow: 6px 6px 5px #999;
    visibility: hidden;
    z-index: 5000;
    padding: 8px 10px;
    font-size: 0.9rem;
    border-radius: 0.5rem;
}

#iconhelp {
    color: #f59e0b;
    cursor: pointer;
    margin-left: 4px;
}

/* Modal: que se vea bien con nuestros temas */
.modal-content {
    border-radius: 0.75rem;
}

body.theme-dark .modal-content {
    background-color: #020617;
    color: #e5e7eb;
    border: 1px solid #1f2937;
}

body.theme-light .modal-content {
    background-color: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.modal-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.modal-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}


/* ===========================
   COMPONENTE: Cards de votaciones (listado)
   =========================== */
.votation-card {
    position: relative;
}

    .votation-card .votation-subtitle {
        font-size: 0.8rem;
        opacity: 0.8;
    }

.votation-card-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

/* Botones de icono dentro de las cards */
.icon-btn {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    line-height: 1;
    opacity: 0.9;
}

    .icon-btn i {
        font-size: 1.1rem;
    }

body.theme-dark .icon-btn {
    color: #22c55e;
}

    body.theme-dark .icon-btn:hover {
        color: #bbf7d0;
    }

body.theme-light .icon-btn {
    color: #16a34a;
}

    body.theme-light .icon-btn:hover {
        color: #0f766e;
    }

/* Lista de meta-información de la votación */
.votation-meta li {
    display: flex;
    align-items: center;
    padding: 0.35rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

    .votation-meta li:first-child {
        border-top: none;
    }

    .votation-meta li i {
        margin-right: 0.6rem;
        font-size: 1rem;
        opacity: 0.9;
        width: 18px;
        text-align: center;
    }

    .votation-meta li div {
        display: flex;
        flex-direction: column;
    }

.votation-meta .meta-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.votation-meta .meta-value {
    font-size: 0.95rem;
}


/* Barra de navegación de componentes de votación */
.votation-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.votation-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    transition: background-color .15s ease-out, box-shadow .15s ease-out, transform .15s ease-out, color .15s ease-out;
}

    .votation-nav-btn i {
        font-size: 1rem;
        margin-right: 0.65rem;
    }

    /* texto interno */
    .votation-nav-btn .nav-text {
        display: flex;
        flex-direction: column;
    }

    .votation-nav-btn .nav-label {
        line-height: 1.1;
    }

    .votation-nav-btn .nav-hint {
        font-size: 0.7rem;
        text-transform: none;
        letter-spacing: 0;
        opacity: 0.8;
    }

/* Tema dark */
body.theme-dark .votation-nav-btn {
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.45);
}

    body.theme-dark .votation-nav-btn:hover {
        background: #22c55e;
        transform: translateY(-1px);
        box-shadow: 0 16px 38px rgba(34, 197, 94, 0.65);
    }

/* Tema light */
body.theme-light .votation-nav-btn {
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.35);
}

    body.theme-light .votation-nav-btn:hover {
        background: #22c55e;
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(34, 197, 94, 0.45);
    }

/* Estado activo */
.votation-nav-btn.is-active {
    transform: translateY(-1px);
}

body.theme-dark .votation-nav-btn.is-active {
    background: #22c55e;
    box-shadow: 0 18px 40px rgba(34, 197, 94, 0.75);
}

body.theme-light .votation-nav-btn.is-active {
    background: #22c55e;
    box-shadow: 0 18px 40px rgba(34, 197, 94, 0.6);
}

/* Responsive: que no explote en móvil */
@media (max-width: 767.98px) {
    .votation-nav {
        flex-direction: column;
    }

    .votation-nav-btn {
        width: 100%;
        justify-content: flex-start;
    }
}
/* Card principal de configuración */
body.theme-dark .votation-config-card {
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #1f2937;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}

body.theme-light .votation-config-card {
    background: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

/* Tabs arriba */
body.theme-dark .nav-tabs .nav-link {
    color: #9ca3af;
    border: none;
}

    body.theme-dark .nav-tabs .nav-link.active {
        color: #22c55e;
        border-bottom: 2px solid #22c55e;
        background: transparent;
    }

body.theme-light .nav-tabs .nav-link {
    color: #4b5563;
    border: none;
}

    body.theme-light .nav-tabs .nav-link.active {
        color: #16a34a;
        border-bottom: 2px solid #16a34a;
        background: transparent;
    }


/* ===== DATATABLES THEME DARK ===== */
body.theme-dark .dataTables_wrapper .dataTables_length label,
body.theme-dark .dataTables_wrapper .dataTables_filter label,
body.theme-dark .dataTables_wrapper .dataTables_info,
body.theme-dark .dataTables_wrapper .dataTables_paginate {
    color: #e5e7eb;
}

body.theme-dark .dataTables_wrapper .dataTables_length select,
body.theme-dark .dataTables_wrapper .dataTables_filter input {
    background-color: #020617;
    border: 1px solid #374151;
    color: #e5e7eb;
    border-radius: 0.375rem;
}

body.theme-dark table.dataTable {
    background-color: #020617;
    color: #e5e7eb;
    border-color: #1f2937;
}

    body.theme-dark table.dataTable thead th {
        background-color: #020617;
        border-bottom: 1px solid #1f2937;
        color: #f9fafb;
    }

    body.theme-dark table.dataTable tbody tr {
        background-color: #020617;
    }

        body.theme-dark table.dataTable tbody tr:nth-child(even) {
            background-color: #020617; /* si quieres alternar, pon #030712 aquí */
        }

    body.theme-dark table.dataTable tbody td {
        border-top: 1px solid #111827;
    }

/* Paginación */
body.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid transparent;
    background: transparent;
    color: #e5e7eb !important;
}

    body.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button.current,
    body.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
        background: #f9fafb;
        color: #111827 !important;
        border-radius: 0.5rem;
    }

/* enlaces dentro de la tabla (iconos, etc.) */
body.theme-dark table.dataTable a {
    color: #f97316; /* o el verde de tu marca: #22c55e */
}

/* ===== DATATABLES DARK – FORZAR FILAS ===== */
body.theme-dark table.dataTable,
body.theme-dark table.dataTable tbody tr,
body.theme-dark table.dataTable tbody td {
    background-color: #020617 !important;
    color: #e5e7eb !important;
    border-color: #111827 !important;
}

    /* DataTables usa .odd y .even para rayado */
    body.theme-dark table.dataTable.display tbody tr.odd,
    body.theme-dark table.dataTable.display tbody tr.even {
        background-color: #020617 !important;
    }

    /* Encabezados */
    body.theme-dark table.dataTable thead th {
        background-color: #020617 !important;
        color: #f9fafb !important;
        border-bottom: 1px solid #1f2937 !important;
    }

    /* Enlaces / texto dentro de la tabla (como la URL gris que casi no se ve) */
    body.theme-dark table.dataTable tbody a {
        color: #e5e7eb !important; /* o el naranja/verde que prefieras */
    }

    /* Opcional: hover de fila */
    body.theme-dark table.dataTable tbody tr:hover {
        background-color: #030712 !important;
    }


/* ===== JODIT – THEME DARK ===== */

body.theme-dark .jodit-container {
    background: #020617;
    border-color: #1f2937;
    color: #e5e7eb;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Barra de herramientas */
body.theme-dark .jodit-toolbar__box {
    background: #020617;
    border-bottom: 1px solid #1f2937;
}

body.theme-dark .jodit-toolbar-button__button {
    background: transparent;
    color: #e5e7eb;
}

    body.theme-dark .jodit-toolbar-button__button:hover {
        background: #111827;
    }

/* Área de edición */
body.theme-dark .jodit-wysiwyg {
    background: #020617;
    color: #e5e7eb;
}

/* Barra de estado inferior */
body.theme-dark .jodit-status-bar {
    background: #020617;
    border-top: 1px solid #1f2937;
    color: #9ca3af;
}

/* Scrollbars internas un poco más oscuras (opcional) */
body.theme-dark .jodit-wysiwyg::-webkit-scrollbar {
    width: 8px;
}

body.theme-dark .jodit-wysiwyg::-webkit-scrollbar-track {
    background: #020617;
}

body.theme-dark .jodit-wysiwyg::-webkit-scrollbar-thumb {
    background: #1f2937;
}


.question-card {
    border-radius: 1rem;
    overflow: hidden;
}

/* Dark */
body.theme-dark .question-card {
    background: #020617;
    box-shadow: 0 18px 45px rgba(0,0,0,.65);
}

/* Light */
body.theme-light .question-card {
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15,23,42,.08);
}


/* ====== CARDS DE PREGUNTA ====== */

.question-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: box-shadow .18s ease-out, transform .18s ease-out, border-color .18s ease-out;
}

/* Dark */
body.theme-dark .question-card {
    background: #020617;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.35); /* borde visible */
}

    body.theme-dark .question-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.95);
        border-color: rgba(96, 165, 250, 0.7);
    }

/* Light */
body.theme-light .question-card {
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

    body.theme-light .question-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
        border-color: #60a5fa;
    }

/* Texto “Pregunta 1” etc. */
body.theme-dark .question-card .small {
    color: #9ca3af;
}

body.theme-light .question-card .small {
    color: #6b7280;
}

/* ====== LISTA DE RESPUESTAS ====== */

.question-answer-list {
    margin-bottom: 0;
    border-radius: .75rem;
    overflow: hidden;
}

/* Dark */
body.theme-dark .question-answer-list .list-group-item {
    background-color: #020617;
    border-color: rgba(55, 65, 81, 0.8);
    color: #e5e7eb;
    padding-top: .65rem;
    padding-bottom: .65rem;
    font-size: .95rem;
}

    body.theme-dark .question-answer-list .list-group-item + .list-group-item {
        border-top-color: rgba(31, 41, 55, 0.9);
    }

/* Light */
body.theme-light .question-answer-list .list-group-item {
    background-color: #ffffff;
    border-color: #e5e7eb;
    color: #111827;
    padding-top: .65rem;
    padding-bottom: .65rem;
    font-size: .95rem;
}

/* Letra A., B., C. */
.question-answer-list .badge {
    min-width: 1.8rem;
    text-align: center;
    font-weight: 600;
}

/* Ícono lápiz de cada respuesta */
.question-answer-list .btn-link i {
    transition: transform .12s ease-out, opacity .12s ease-out;
}

.question-answer-list .btn-link:hover i {
    transform: scale(1.1);
    opacity: .9;
}


/* Tabla de respuestas dentro del modal */
.answer-table {
    border-radius: .75rem;
    overflow: hidden;
}

/* Dark */
body.theme-dark .answer-table {
    background: #020617;
}

    body.theme-dark .answer-table td,
    body.theme-dark .answer-table th {
        border-color: rgba(55, 65, 81, 0.9);
        color: #e5e7eb;
    }

    body.theme-dark .answer-table tbody tr:hover {
        background-color: #020617;
    }

/* Light */
body.theme-light .answer-table {
    background: #ffffff;
}

    body.theme-light .answer-table td,
    body.theme-light .answer-table th {
        border-color: #e5e7eb;
        color: #111827;
    }

    body.theme-light .answer-table tbody tr:hover {
        background-color: #f9fafb;
    }

body.theme-dark .card {
    background-color: #020617; /* o transparent si quieres que no se note nada */
    border-color: rgba(148, 163, 184, 0.3);
}


/* 🔥 Selección de filas en modo LIGHT */
body.theme-light table.dataTable tbody tr.selected {
    background-color: #e8f3ff !important; /* Azul clarito */
    color: #000 !important;
}

/* 🔥 Selección de filas en modo DARK */
body.theme-dark table.dataTable tbody tr.selected {
    background-color: #2e4a5a !important; /* azul-gris oscuro */
    color: #fff !important;
}

    /* Para que el checkbox seleccionado también resalte */
    body.theme-dark table.dataTable tbody tr.selected td:first-child,
    body.theme-light table.dataTable tbody tr.selected td:first-child {
        background-color: transparent !important;
    }


table.dataTable tbody tr {
    transition: background-color .2s ease;
}


/* ===========================
   PANEL CONTROL VOTACIÓN
   =========================== */

/* Scroll de preguntas y preguntas en vivo */
.my-custom-scrollbar {
    position: relative;
    max-height: 400px;
    overflow: auto;
}

.table-wrapper-scroll-y {
    display: block;
}

/* ====== TARJETAS DE SECCIÓN (Control de Enlace / Votación / Preguntas) ====== */

.vote-section-card {
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.vote-section-header {
    background-color: #66C22C;
    padding: .65rem 1.25rem;
    border-bottom: none;
}

    .vote-section-header .fa-bars {
        cursor: pointer;
    }

/* un poco más de aire dentro de los body */
#CtrlVotation,
#CtrlVotation2 {
    padding-top: 1.25rem;
    padding-bottom: 0.75rem;
}

/* ====== GRID DE BOTONES ====== */

.vote-control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
}

.vote-control-item {
    min-height: 140px;
}

.vote-control-item-wide {
    grid-column: span 2;
}

/* ====== TARJETA DE BOTÓN ====== */

.control-card {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .16s ease-out, box-shadow .16s ease-out, border-color .16s ease-out, background-color .16s ease-out;
    padding-bottom: .75rem;
}

    .control-card .card-body {
        padding: 1.15rem 0.75rem 0.35rem;
    }

        .control-card .card-body a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        /* Bajamos el tamaño respecto al fa-5x para que no se vea tan apretado */
        .control-card .card-body i {
            font-size: 2.6rem !important;
        }

.control-label {
    display: block;
    margin-top: .35rem;
    font-size: .9rem;
    font-weight: 500;
}

/* Tarjetas con dos o más iconos */
.double-icon a + a,
.multi-actions a + a {
    margin-left: 1.15rem;
}

.multi-actions a i {
    font-size: 2.2rem !important;
}

/* Icono “invertido” del ocultar gráfico */
.icon-inverted {
    background-color: #000;
    padding: .15rem .35rem;
    border-radius: .35rem;
}

/* ====== THEMING DARK/LIGHT PARA LAS TARJETAS DE CONTROL ====== */

body.theme-dark .control-card {
    background-color: #020617;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

    body.theme-dark .control-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 22px 55px rgba(15, 23, 42, 0.95);
        border-color: #22c55e;
    }

body.theme-dark .control-label {
    color: #e5e7eb;
}

body.theme-light .control-card {
    background-color: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

    body.theme-light .control-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
        border-color: #16a34a;
    }

body.theme-light .control-label {
    color: #111827;
}

/* ====== PREGUNTAS (ajustes de padding y tarjetas) ====== */

#DivCtrlVotation3 .card-body,
#DivCtrlQuestionLive .card-body {
    padding-top: 1.1rem;
    padding-bottom: 1.25rem;
}

#DivCtrlVotation3 .question-card,
#DivCtrlQuestionLive .question-card {
    border-radius: 1rem;
}

/* Responsive: la tarjeta “ancha” vuelve a ocupar solo 1 columna en móvil */
@media (max-width: 767.98px) {
    .vote-control-item-wide {
        grid-column: span 1;
    }
}


/* Fondo oscuro para las preguntas en modo dark */
body.theme-dark #questions .list-group-item {
    background-color: transparent; /* quita el blanco */
    color: #e5e7eb; /* texto claro */
    border-color: rgba(148, 163, 184, 0.25); /* borde suave */
}

    /* quitamos el borde extra del último, queda más limpio */
    body.theme-dark #questions .list-group-item:last-child {
        border-bottom-color: transparent;
    }

    /* enlaces dentro de la lista de preguntas */
    body.theme-dark #questions .list-group-item a {
        color: #60a5fa; /* azul clarito legible */
    }

        /* que respete tus colores inline (rojo/azul) si los usas */
        body.theme-dark #questions .list-group-item a span[style],
        body.theme-dark #questions .list-group-item a strong[style] {
            color: inherit;
        }


/* ================================
   Guía de pestañas Configuración
   ================================ */

.votation-tabs-help {
    margin-top: 4px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 0.82rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

/* Cada item: "Nombre — descripción" */
.vth-item {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.vth-name {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.vth-desc {
    opacity: 0.9;
}

/* --- Tema DARK --- */
body.theme-dark .votation-tabs-help {
    background: rgba(15,23,42,0.96); /* fondo oscuro suave */
    border-color: rgba(55,65,81,0.9);
    box-shadow: 0 14px 30px rgba(0,0,0,0.7);
}

body.theme-dark .vth-name {
    color: #bbf7d0; /* verdoso suave */
}

body.theme-dark .vth-desc {
    color: #9ca3af;
}

/* --- Tema LIGHT --- */
body.theme-light .votation-tabs-help {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 10px 26px rgba(15,23,42,0.06);
}

body.theme-light .vth-name {
    color: #15803d; /* verde que combina con la línea activa */
}

body.theme-light .vth-desc {
    color: #4b5563;
}

/* Responsive: en pantallas pequeñas que se vea cómodo */
@media (max-width: 768px) {
    .votation-tabs-help {
        padding: 8px 10px;
        gap: 4px 12px;
    }
}

/* ===========================
   Indicador de conexión
   =========================== */

.net-status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-left: 10px;
    border-radius: 999px;
    cursor: default;
    transition: background-color 0.15s ease-out;
}

    .net-status-indicator .net-icon {
        font-size: 1rem;
        color: #9ca3af; /* color “comprobando” */
    }

    /* Estados */
    .net-status-indicator.is-online .net-icon {
        color: #22c55e; /* verde */
    }

    .net-status-indicator.is-offline .net-icon {
        color: #ef4444; /* rojo */
    }

    .net-status-indicator.is-unstable .net-icon {
        color: #f59e0b; /* amarillo */
    }

/* Por defecto (checking) */
body.theme-light .net-status-indicator {
    background: #f3f4f6;
}

body.theme-dark .net-status-indicator {
    background: rgba(31,41,55,0.9);
}

/* Estados */
.net-status-indicator.is-online .net-dot {
    background: #22c55e; /* verde */
}

.net-status-indicator.is-offline .net-dot {
    background: #ef4444; /* rojo */
}

.net-status-indicator.is-unstable .net-dot {
    background: #f59e0b; /* amarillo */
}

/* Asegurar que los modales quedan por encima del header y sidebar */
.modal-backdrop {
    z-index: 1190 !important;
}

.modal {
    z-index: 1200 !important;
}
