/* ==========================================================================
   Estilos Principales y Globales - App-V2 SaaS
   ========================================================================== */

:root {
    --primary-color: #efb810;
    --primary-hover: #d4a20b;
    --bg-dark: #121319;
    --card-bg: #1c1e26;
    --card-border: #2e3240;
    --text-primary: #ffffff;
    --text-muted: #9a9eb0;
    --input-bg: #14161d;
    --input-border: #2a2e3d;
    --color-sidebar: #181a22;
    --color-modal-bg: rgba(0, 0, 0, 0.7);
    --color-dot-modelo: #e63946;
    --color-dot-usuario: #2a9d8f;
    --color-dot-evento: #efb810;
    --color-dot-ticket: #4c6ef5;
}

body.dark-mode {
    --bg-dark: #f4f5f8;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --input-bg: #f8fafc;
    --input-border: #cbd5e1;
    --color-sidebar: #ffffff;
    --color-modal-bg: rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    width: 100%;
}

main#mainContainer {
    margin-left: 260px;
    padding: 24px;
    flex: 1;
    transition: margin-left 0.3s ease;
    width: calc(100% - 260px);
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

body.sidebar-collapsed main#mainContainer {
    margin-left: 80px;
    width: calc(100% - 80px);
}

@media (max-width: 768px) {
    main#mainContainer {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 12px;
    }
}

/* ==========================================================================
   Contenedores y Tarjetas
   ========================================================================== */
.container-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container-card {
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 16px;
    }
}

.home-header-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.welcome-text {
    flex: 1;
    min-width: 0;
}

.home-header-profile h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    word-break: break-word;
}

.subtitle-home {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
    word-break: break-word;
}

.profile-photo-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.card-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.card-section-header .section-title {
    margin-bottom: 0;
}

.btn-tour {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    background: var(--input-bg);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

#calendarRetry[hidden] {
    display: none;
}

.btn-tour:hover {
    background: var(--primary-color);
    color: #121319;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .home-header-profile {
        gap: 12px;
    }
    
    .home-header-profile h1 {
        font-size: 20px;
    }
    .profile-photo-lg {
        width: 48px;
        height: 48px;
    }
    .btn-tour {
        padding: 6px 12px;
        font-size: 12px;
    }
}


@media (max-width: 1300px) {
    .home-header-profile.model-option-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* ==========================================================================
   Barra Lateral / Sidebar
   ========================================================================== */
.barra-lateral {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--color-sidebar);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 16px;
    z-index: 100;
    transition: width 0.3s ease, left 0.3s ease;
    overflow: hidden;
    isolation: isolate;
}

.halloween-sidebar-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 96px;
    height: 112px;
    color: var(--primary-color, #f4b942);
    pointer-events: none;
    z-index: 0;
}

.halloween-web {
    position: absolute;
    top: -2px;
    right: -3px;
    width: 82px;
    height: 82px;
    fill: none;
    stroke: #aeb5c4;
    stroke-width: 1.15;
    opacity: 0.48;
}

.halloween-bat {
    position: absolute;
    top: -12px;
    right: 200px;
    width: 55px;
    height: 60px;
    fill: currentColor;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
    animation: halloween-bat-drift 3.8s ease-in-out infinite;
}

.halloween-spider {
    position: absolute;
    top: 40px;
    right: 4px;
    width: 30px;
    height: 45px;
    overflow: visible;
    animation: halloween-spider-sway 4.2s ease-in-out infinite;
    transform-origin: 50% 0;
}

.halloween-spider .spider-thread,
.halloween-spider .spider-legs {
    fill: none;
    stroke: #d2d6df;
    stroke-width: 1.4;
    stroke-linecap: round;
}

.halloween-spider .spider-body,
.halloween-spider .spider-head {
    fill: #20232d;
    stroke: currentColor;
    stroke-width: 1.3;
}

.sidebar-top,
.sidebar-bottom {
    position: relative;
    z-index: 1;
}

body.sidebar-collapsed .halloween-sidebar-decoration {
    display: none;
}

@keyframes halloween-bat-drift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes halloween-spider-sway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
    .halloween-bat,
    .halloween-spider {
        animation: none;
    }
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    margin-top: auto;
}

body.sidebar-collapsed .barra-lateral {
    width: 80px;
}

body.sidebar-collapsed .barra-lateral span,
body.sidebar-collapsed .barra-lateral p,
body.sidebar-collapsed .barra-lateral .arrow-sub {
    display: none;
}

/* Sidebar colapsado: centra los iconos y elimina la sangría de los submenús */
body.sidebar-collapsed .nombre-pagina,
body.sidebar-collapsed .modo-oscuro,
body.sidebar-collapsed .usuario {
    justify-content: center;
}

body.sidebar-collapsed .sub-menu {
    padding-left: 0;
}

body.sidebar-collapsed .modo-oscuro .info {
    display: none;
}

body.sidebar-collapsed .navegacion a,
body.sidebar-collapsed .btn-sub-menu {
    justify-content: center;
    gap: 0;
    padding: 12px 4px;
}

.nombre-pagina {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-shrink: 0;
    height: 48px;
}

.cloud-icon {
    font-size: 22px;
    color: var(--primary-color);
    cursor: pointer;
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.imgpride {
    max-width: 140px;
    max-height: 48px;
    object-fit: contain;
}

.linea {
    height: 1px;
    background: var(--card-border);
    margin: 10px 0;
    flex-shrink: 0;
}

.navegacion {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.navegacion::-webkit-scrollbar {
    width: 4px;
}

.navegacion::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.navegacion ul {
    list-style: none;
}

.navegacion a, .btn-sub-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.navegacion a > i, .btn-sub-menu > i:first-child {
    min-width: 28px;
    width: 28px;
    height: 28px;
    font-size: 18px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-news {
    color: var(--primary-color);
}

.icon-logout {
    color: #e63946;
}

.arrow-sub {
    font-size: 12px !important;
    min-width: auto !important;
    width: auto !important;
    height: auto !important;
    margin-left: auto;
}

.navegacion a:hover, .btn-sub-menu:hover, .btn-sub-menu.active {
    background: rgba(239, 184, 16, 0.1);
    color: var(--primary-color);
}

.navegacion a.active-link {
    background: rgba(239, 184, 16, 0.18);
    color: var(--primary-color);
    font-weight: 700;
}

.btn-sub-menu p {
    flex: 1;
}

.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 12px;
}

.sub-menu.open {
    max-height: 300px;
}

.perfilUrlPhoto {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Modo Oscuro Switch */
.modo-oscuro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 4px;
}

.modo-oscuro .switch {
    width: 46px;
    height: 24px;
    background: var(--input-border);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.modo-oscuro .circulo {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease, background 0.3s ease;
}

.modo-oscuro .circulo i {
    font-size: 10px;
    line-height: 1;
    color: #1e293b;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.modo-oscuro .circulo.girando i {
    transform: rotate(180deg) scale(0.6);
    opacity: 0;
}

.modo-oscuro .circulo.prendido {
    left: 25px;
    background: var(--primary-color);
}

.modo-oscuro .circulo.prendido i {
    color: #fff;
}

.menu-toggle-mobile {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: var(--primary-color);
    color: #121319;
    padding: 10px 14px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

@media (max-width: 768px) {
    .barra-lateral {
        left: -260px;
    }
    body.mobile-menu-open .barra-lateral {
        left: 0;
    }
    .menu-toggle-mobile {
        display: block;
    }
}

/* ==========================================================================
   KPI Cards & Dashboard Extras
   ========================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.icon-gold { background: rgba(239, 184, 16, 0.15); color: #efb810; }
.icon-blue { background: rgba(42, 157, 143, 0.15); color: #2a9d8f; }
.icon-green { background: rgba(46, 196, 182, 0.15); color: #2ec4b6; }
.icon-purple { background: rgba(157, 78, 221, 0.15); color: #9d4edd; }

.kpi-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kpi-title {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

.kpi-value small {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.model-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.model-link:hover {
    text-decoration: underline;
}

/* Header Action Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.period-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 5px 8px 5px 12px;
    background: color-mix(in srgb, var(--input-bg) 82%, var(--primary-color));
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.period-select-wrap i {
    color: var(--primary-color);
    font-size: 14px;
}

.dashboard-period-select {
    min-width: 116px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    outline: none;
}

.dashboard-period-select:focus {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 42%, transparent);
}

.btn-sm {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

/* Top Models Ranking Widget */
.top-models-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.top-model-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    gap: 12px;
}

.top-model-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.top-rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--input-border);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.top-rank-1 { background: #efb810; color: #121319; }
.top-rank-2 { background: #cbd5e1; color: #121319; }
.top-rank-3 { background: #cd7f32; color: #ffffff; }

.top-model-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary-color);
    flex-shrink: 0;
}

.top-model-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-model-right {
    text-align: right;
    flex-shrink: 0;
}

.top-model-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
}

.top-model-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.cal-evt-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.cal-evt-link:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* ==========================================================================
   Gráficos y Dashboard Grid
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.chart-box {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 576px) {
    .chart-box {
        padding: 12px;
    }
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    width: 100%;
}

.cal-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.total-badge {
    background: var(--primary-color);
    color: #121319;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.inline-select {
    display: inline-block;
    width: auto;
    max-width: 100%;
    padding: 4px 8px;
    font-size: 13px;
    margin-left: 4px;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 260px;
    overflow: hidden;
}

@media (max-width: 576px) {
    .canvas-wrapper {
        height: 210px;
    }
}

/* ==========================================================================
   Calendario de Cumpleaños y Eventos
   ========================================================================== */
.calendar-section {
    margin-top: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.cal-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    box-sizing: border-box;
}

.cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.cal-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-modelo { background: var(--color-dot-modelo); }
.dot-usuario { background: var(--color-dot-usuario); }
.dot-evento { background: var(--color-dot-evento); }
.dot-ticket { background: var(--color-dot-ticket); }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .cal-grid {
        min-width: 0;
        gap: 3px;
    }

    .cal-grid .cal-day-cell {
        min-width: 0;
        padding: 3px;
    }

    .cal-grid .cal-evt-item {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        line-height: 14px;
        padding: 2px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .cal-grid .cal-evt-icon {
        display: none;
    }
}

.cal-dow {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 0;
}

.cal-days {
    display: contents;
}

.cal-day-cell {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    min-height: 70px;
    padding: 6px;
    text-align: left;
    font-size: 12px;
    box-sizing: border-box;
    overflow: hidden;
}

.cal-day-cell.today {
    border-color: var(--primary-color);
}

.cal-day-num {
    font-weight: 600;
    margin-bottom: 4px;
}

.cal-evt-item {
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 4px;
    margin-bottom: 2px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.cal-evt-modelo { background: var(--color-dot-modelo); }
.cal-evt-usuario { background: var(--color-dot-usuario); }
.cal-evt-evento { background: var(--color-dot-evento); color: #121319; }
.cal-evt-ticket { background: var(--color-dot-ticket); }
.cal-evt-ticket.is-closed { opacity: .6; }
.cal-evt-link { text-decoration: none; }

/* ==========================================================================
   Loader Spinner
   ========================================================================== */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.halloween-loader-art {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(360px, calc(100vw - 32px));
    height: 210px;
    transform: translate(-50%, -50%);
    color: var(--primary-color, #f4b942);
    pointer-events: none;
    z-index: 0;
}

.halloween-loader-art .loading-web {
    position: absolute;
    top: 55px;
    right: 80px;
    width: 136px;
    height: 96px;
    fill: none;
    stroke: #aeb5c4;
    stroke-width: 1.2;
    opacity: 0.48;
}

.halloween-loader-art .loading-bat {
    position: absolute;
    bottom: 55px;
    left: 50px;
    width: 84px;
    height: 65px;
    fill: currentColor;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
    animation: halloween-bat-drift 3.8s ease-in-out infinite;
}

.halloween-loader-art .loading-spider {
    position: absolute;
    top: 152px;
    right: 101px;
    width: 20px;
    height: 40px;
    overflow: visible;
    transform-origin: 50% 0;
    animation: halloween-spider-sway 4.2s ease-in-out infinite;
}

.halloween-loader-art .spider-thread,
.halloween-loader-art .spider-legs {
    fill: none;
    stroke: #d2d6df;
    stroke-width: 1.4;
    stroke-linecap: round;
}

.halloween-loader-art .spider-body,
.halloween-loader-art .spider-head {
    fill: #20232d;
    stroke: currentColor;
    stroke-width: 1.3;
}

.spinnerContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(239, 184, 16, 0.2);
    border-right-color: var(--primary-color);
    border-radius: 50%;
    animation: tri-spinner 1s infinite linear;
}

@keyframes tri-spinner {
    100% { transform: rotate(1turn); }
}

.loader {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.words {
    overflow: hidden;
    height: 28px;
}

.word {
    display: block;
    color: var(--primary-color);
    animation: cycle-words 5s infinite;
}

@keyframes cycle-words {
    10%, 25% { transform: translateY(-100%); }
    35%, 50% { transform: translateY(-200%); }
    60%, 75% { transform: translateY(-300%); }
    85%, 100% { transform: translateY(-400%); }
}

@media (prefers-reduced-motion: reduce) {
    .halloween-loader-art .loading-bat,
    .halloween-loader-art .loading-spider {
        animation: none;
    }
}

/* ==========================================================================
   Modales & Ventanas Emergentes
   ========================================================================== */
.popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-modal-bg);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 9900;
}

.popup-modal.open {
    display: flex;
}

.popup-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

#popupVersion .detver > summary strong {
    color: var(--primary-color);
}

body.dark-mode #popupVersion .detver > summary strong {
    color: #8a6500;
}

.version-body {
    overflow-wrap: anywhere;
}

.version-body .version-link {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
    text-underline-offset: 3px;
}

.version-body .version-link:hover {
    text-decoration-thickness: 2px;
}

.version-body .version-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 16px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.close-btn:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Noticias Modal
   ========================================================================== */
.nwesContent {
    position: fixed;
    inset: 0;
    display: none;
    background: var(--color-modal-bg);
    backdrop-filter: blur(4px);
    z-index: 9950;
}

.nwesContent.open {
    display: block;
}

.nwes-wrap {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.nwes-modal {
    width: min(900px, 95vw);
    max-height: 90vh;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.nwes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--card-border);
}

.nwes-body {
    padding: 20px;
    overflow-y: auto;
}

.nwes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .nwes-grid {
        grid-template-columns: 1fr;
    }
}

.nwes-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.nwes-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.nwes-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.nwes-card-body {
    padding: 12px;
}

.nwes-cat {
    font-size: 11px;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
}

.nwes-h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 4px 0;
}

.nwes-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   Banner Cumpleaños
   ========================================================================== */
.hbd-cumple {
    background: linear-gradient(135deg, rgba(239, 184, 16, 0.2), rgba(230, 57, 70, 0.2));
    border: 1px solid var(--primary-color);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hbd-cumple h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.img-cumple {
    max-width: 180px;
    max-height: 180px;
    object-fit: cover;
    border-radius: 12px;
}

/* ==========================================================================
   Pie de Página / Footer
   ========================================================================== */
footer {
    margin-top: auto;
    padding: 16px 0;
    border-top: 1px solid var(--card-border);
    width: 100%;
}

.container-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container-footer {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    .informacion-adicional, .contacto {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.informacion-adicional, .contacto {
    display: flex;
    align-items: center;
    gap: 16px;
}

.container-footer .informacion-adicional {
    flex-wrap: wrap;
    min-width: 0;
}

.contacto a, .informacion-adicional a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.contacto a:hover, .informacion-adicional a:hover {
    color: var(--primary-color);
}

.contacto ion-icon, .informacion-adicional ion-icon {
    font-size: 16px;
    vertical-align: middle;
}

.session-timer-badge {
    display: inline-flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.session-timer-badge.login-history-badge {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.login-history-badge > span {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-history-location {
    display: inline;
    font-weight: 400;
}

/* ==========================================================================
   Administración de Suscripción
   ========================================================================== */
.img-bold-pay {
    max-width: 45px;
    max-height: 45px;
    object-fit: contain;
    margin-bottom: -2px;
}

.sub-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 992px) {
    .sub-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .sub-info-grid {
        grid-template-columns: 1fr;
    }
}

.sub-info-item {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sub-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sub-val {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.sub-val.highlight {
    color: var(--primary-color);
}

.sub-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    width: fit-content;
}

.sub-status-badge.activa {
    background: rgba(42, 157, 143, 0.15);
    color: #2a9d8f;
    border: 1px solid #2a9d8f;
}

.sub-status-badge.inactiva {
    background: rgba(230, 57, 70, 0.15);
    color: #e63946;
    border: 1px solid #e63946;
}

.limits-flex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .limits-flex-grid {
        grid-template-columns: 1fr;
    }
}

.limit-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.limit-icon {
    font-size: 28px;
    color: var(--primary-color);
    background: rgba(239, 184, 16, 0.1);
    padding: 12px;
    border-radius: 12px;
}

.limit-details {
    display: flex;
    flex-direction: column;
}

.limit-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.limit-title {
    font-size: 12px;
    color: var(--text-muted);
}

.media-input-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

@media (max-width: 576px) {
    .media-input-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
}

.media-preview-box {
    width: 100px;
    height: 60px;
    border-radius: 8px;
    background: var(--input-bg);
    border: 1px dashed var(--input-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
    flex-shrink: 0;
}

.media-preview-box.icon-box {
    width: 50px;
    height: 50px;
}

.media-preview-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.media-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Estilos Mejorados para Formulario de Suscripción */
.custom-name-input-group {
    margin-bottom: 24px;
}

.form-label-styled {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label-styled i {
    color: var(--primary-color);
    margin-right: 6px;
}

.styled-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.styled-input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    color: var(--primary-color);
    font-size: 15px;
    pointer-events: none;
}

.styled-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.input-password-wrapper {
    position: relative;
}

.input-password-wrapper .styled-input {
    padding-right: 52px;
}

.btn-toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.2s ease, background 0.2s ease;
}

.btn-toggle-password:hover,
.btn-toggle-password:focus-visible {
    background: rgba(239, 184, 16, 0.12);
    color: var(--primary-color);
}

.btn-toggle-password:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

select.styled-select,
.form-group select.form-control-select {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23efb810' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

select.styled-select:focus,
.form-group select.form-control-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(239, 184, 16, 0.2);
}

select.styled-select option,
.form-group select.form-control-select option {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 10px;
}

.pending-contact-card {
    border: 2px solid var(--primary-color);
    background: rgba(239, 184, 16, 0.05);
    margin-bottom: 24px;
}

.styled-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(239, 184, 16, 0.2);
}

.chaturbate-email-field {
    position: relative;
}

.chaturbate-email-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
    max-height: 220px;
    overflow-y: auto;
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(239, 184, 16, 0.08) inset;
}

.chaturbate-email-field.is-open .chaturbate-email-options {
    display: grid;
    gap: 6px;
}

.chaturbate-email-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.chaturbate-email-option[hidden] {
    display: none !important;
}

.chaturbate-email-option i {
    color: var(--primary-color);
}

.chaturbate-email-option:hover,
.chaturbate-email-option:focus-visible {
    outline: none;
    background: rgba(239, 184, 16, 0.12);
    color: var(--primary-color);
}

.chaturbate-email-options.is-empty::after {
    content: 'Sin coincidencias. Puedes guardar un correo nuevo.';
    display: block;
    padding: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.locker-zone-field {
    position: relative;
}

.locker-zone-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
    max-height: 220px;
    overflow-y: auto;
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(239, 184, 16, 0.08) inset;
}

.locker-zone-field.is-open .locker-zone-options {
    display: grid;
    gap: 6px;
}

.locker-zone-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.locker-zone-option i {
    color: var(--primary-color);
    font-size: 13px;
}

.locker-zone-option:hover,
.locker-zone-option:focus-visible {
    outline: none;
    background: rgba(239, 184, 16, 0.12);
    color: var(--primary-color);
    transform: translateX(2px);
}

.locker-zone-options.is-empty::after {
    content: 'Sin zonas coincidentes';
    display: block;
    padding: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.locker-zone-taken {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding: 9px 11px;
    background: rgba(239, 184, 16, 0.08);
    border: 1px solid rgba(239, 184, 16, 0.22);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.locker-zone-taken[hidden] {
    display: none;
}

.locker-zone-taken i {
    color: var(--primary-color);
    margin-top: 2px;
}

.locker-zone-taken strong {
    color: var(--text-primary);
}

.locker-zone-taken.has-conflict {
    background: rgba(230, 57, 70, 0.12);
    border-color: rgba(230, 57, 70, 0.45);
    color: #ffb4bd;
}

.locker-zone-taken.has-conflict i,
.locker-zone-taken.has-conflict strong {
    color: #ff7b8a;
}

.form-actions-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
}

.btn-save-styled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    background: var(--primary-color);
    color: #121319;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 184, 16, 0.3);
    transition: all 0.25s ease;
}

.btn-save-styled:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 184, 16, 0.4);
}

.btn-save-styled:active {
    transform: translateY(0);
}

.btn-file-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    width: fit-content;
    transition: all 0.2s ease;
}

.btn-file-upload:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(239, 184, 16, 0.08);
}

.btn-file-upload input[type="file"] {
    display: none;
}

.form-help {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ==========================================================================
   Cuentas y Módulo de Modelos
   ========================================================================== */
.dropdown-actions-menu {
    position: relative;
    display: inline-block;
}

.model-submenu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    min-width: 220px;
    z-index: 100;
    overflow: hidden;
}

.model-submenu-dropdown.open {
    display: block;
}

.model-submenu-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s ease;
}

.model-submenu-dropdown a:hover {
    background: rgba(239, 184, 16, 0.12);
    color: var(--primary-color);
}

.accounts-grid-2cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .accounts-grid-2cols {
        grid-template-columns: 1fr;
    }
}

.account-card, .account-edit-box {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 16px;
}

.account-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--card-border);
}

.account-card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.account-logo {
    max-width: 110px;
    max-height: 36px;
    object-fit: contain;
}

.account-details-sub {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
}

.doc-preview-container {
    width: 100%;
    height: 160px;
    background: var(--card-bg);
    border: 1px dashed var(--input-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
}

.doc-preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.users-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.filter-form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}

select#tipoUser,
.styled-select-user-type {
    padding: 8px 14px;
    background: var(--input-bg);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

select#tipoUser:hover,
select#tipoUser:focus,
.styled-select-user-type:hover,
.styled-select-user-type:focus {
    background: rgba(239, 184, 16, 0.1);
    box-shadow: 0 0 0 3px rgba(239, 184, 16, 0.25);
}

select#tipoUser option,
.styled-select-user-type option {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 8px;
    font-weight: 500;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 14px;
}

.search-field {
    padding-left: 38px;
}

.styled-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.styled-data-table thead tr {
    background: var(--input-bg);
    border-bottom: 2px solid var(--card-border);
}

.styled-data-table th {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.styled-data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

.styled-data-table tbody tr:hover {
    background: rgba(239, 184, 16, 0.05);
}

.user-table-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary-color);
}

.user-table-avatar[role="button"] {
    cursor: zoom-in;
}

.user-table-avatar[role="button"]:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.user-table-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.user-table-link:hover {
    color: var(--primary-color);
}

.badge-area {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(42, 157, 143, 0.15);
    color: #2a9d8f;
    border: 1px solid #2a9d8f;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.btn-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-action-icon:hover {
    background: var(--primary-color);
    color: #121319;
}

.table-counter-footer {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: right;
}

/* Info Usuario Detalle */
.user-info-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.user-info-avatar-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info-photo-xl {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.model-photo-trigger {
    display: block;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: zoom-in;
}

.model-photo-modal-content {
    width: min(92vw, 960px);
    max-width: 960px;
    max-height: 90vh;
    padding: 12px;
    overflow: visible;
}

.model-photo-modal-content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(90vh - 24px);
    margin: auto;
    border-radius: 10px;
    object-fit: contain;
}

.user-info-actions-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-user-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-primary);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-user-action i {
    font-size: 0.95rem;
}

.btn-user-action:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.btn-primary-action {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #121319;
}

.btn-primary-action:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #121319;
}

.btn-secondary-action {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
}

.btn-secondary-action:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-warning-action {
    background: rgba(239, 184, 16, 0.15);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-warning-action:hover {
    background: var(--primary-color);
    color: #121319;
}

.profile-login-history {
    min-width: 0;
}

.profile-login-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.profile-login-heading .section-title,
.profile-login-heading .subtitle-home {
    margin: 0;
}

.profile-login-empty {
    color: var(--text-muted);
    margin: 0;
}

.profile-login-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
}

.profile-login-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.profile-login-table th,
.profile-login-table td {
    padding: 12px;
    border-bottom: 1px solid var(--card-border);
    vertical-align: top;
    overflow-wrap: anywhere;
}

.profile-login-table th {
    background: var(--input-bg);
    color: var(--text-muted);
    font-weight: 600;
}

.profile-login-table td {
    max-width: 240px;
}

.profile-login-date,
.profile-login-ip {
    white-space: nowrap;
}

.profile-login-agent {
    width: 180px;
    max-width: 100%;
}

.profile-login-agent summary {
    color: var(--primary-color);
    cursor: pointer;
}

.profile-login-agent span {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.profile-login-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.profile-login-page-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--primary-color);
    text-decoration: none;
}

.profile-login-page-button[aria-disabled="true"] {
    opacity: 0.4;
}

.user-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .user-details-grid {
        grid-template-columns: 1fr;
    }

    .user-info-actions-box,
    .tienda-actions,
    .tienda-sales-filter {
        width: 100%;
    }

    .user-info-actions-box .btn-user-action,
    .tienda-actions .btn-user-action,
    .tienda-sales-filter .btn-user-action {
        width: 100%;
    }
}

.detail-block {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-block.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-val {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.highlight-email {
    color: var(--primary-color);
}

/* Fotos Grid Formulario */
.user-photos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .user-photos-grid {
        grid-template-columns: 1fr;
    }
}

.user-photos-grid-docs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 992px) {
    .user-photos-grid-docs {
        grid-template-columns: 1fr;
    }
}

.photo-upload-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.photo-upload-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.photo-previews-flex {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.avatar-edit-lg {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--input-border);
}

.form-grid-2cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .form-grid-2cols {
        grid-template-columns: 1fr;
    }
}

.form-grid-2cols .full-width {
    grid-column: 1 / -1;
}

.edit-form-sections {
    display: grid;
    gap: 18px;
}

.edit-form-block {
    padding: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--input-border);
    border-radius: 12px;
}

.edit-form-block-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--card-border);
}

.edit-form-block-header > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--primary-color);
    background: rgba(239, 184, 16, 0.1);
    border-radius: 10px;
    flex: 0 0 auto;
}

.edit-form-block-header h2 {
    margin: 0 0 3px;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 800;
}

.edit-form-block-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

/* Reglas Fortaleza Contraseña */
.password-rules-box {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.password-rules-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .password-rules-list {
        grid-template-columns: 1fr;
    }
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.rule-item.invalid {
    color: #e63946;
}

.rule-item.valid {
    color: #2a9d8f;
    font-weight: 600;
}

.password-strength-bar-container {
    width: 100%;
    height: 8px;
    background: var(--card-border);
    border-radius: 4px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
}

/* Matriz de Permisos */
.perms-groups-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .perms-groups-grid {
        grid-template-columns: 1fr;
    }
}

.perm-group-box {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 16px;
}

.perm-group-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--card-border);
}

.perm-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==========================================================================
   Modelos Modal & Responsive Table
   ========================================================================== */
.accounts-grid-modal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .accounts-grid-modal {
        grid-template-columns: 1fr;
    }

    .col-hide-mobile {
        display: none !important;
    }
}

.copyable-text,
.copyable {
    cursor: pointer;
    background: rgba(239, 184, 16, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    transition: background 0.2s ease;
}

.copyable-text:hover,
.copyable:hover {
    background: rgba(239, 184, 16, 0.25);
}

.room-capacity {
    color: var(--text-muted);
    margin-bottom: 18px;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.room-card {
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: var(--input-bg);
}

.room-card > img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.room-card-body {
    padding: 14px;
}

.room-card-body h2 {
    margin: 0 0 12px;
    font-size: 17px;
    color: var(--text-primary);
}

.room-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.room-modal {
    max-width: 760px;
}

.room-image-modal {
    max-width: 900px;
}

.room-image-modal img {
    display: block;
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border: 1px solid var(--input-border);
    border-radius: 8px;
}

.selected-room-model,
.history-people {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.selected-room-model {
    margin: -2px 0 18px;
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
}

.selected-room-model img,
.history-people img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
}

.history-people {
    margin: 10px 0 14px;
}

.history-people > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
}

.history-people span {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: var(--text-muted);
}

.history-people strong {
    color: var(--text-primary);
}

.select2-container--default .select2-results>.select2-results__options {
    background-color: var(--card-bg);
}

.select2-container--default .select2-selection--single {
    height: 44px;
    padding: 0 38px 0 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary);
    line-height: 42px;
    padding: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
    right: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-top-color: var(--primary-color);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(239, 184, 16, 0.2);
}

.select2-dropdown {
    background-color: var(--card-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
    border-radius: 8px;
    overflow: hidden;
}

.select2-container--default .select2-results__option--selectable {
    padding: 10px 12px;
    color: var(--text-primary);
    background: var(--card-bg);
}

.select2-container--default .select2-results__option--selected {
    background: var(--input-bg);
    color: var(--text-primary);
}

.select2-search--dropdown {
    padding: 8px;
    background: var(--card-bg);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    padding: 8px 10px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-primary);
    outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary-color);
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--primary-color);
    color: #121319;
}

.check-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--card-border);
}

.check-item > span {
    font-weight: 600;
}

.check-item label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
    font-size: 13px;
}

.history-entry {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
}

.history-entry h3 {
    margin: 0 0 8px;
    color: var(--primary-color);
    text-transform: capitalize;
}

@media (max-width: 768px) {
    .check-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .check-item label {
        margin: 0 12px 0 0;
    }
}

.perm-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.perm-checkbox-item:hover {
    border-color: var(--primary-color);
}

.perm-checkbox-item.checked {
    border-color: #2a9d8f;
    background: rgba(42, 157, 143, 0.1);
    color: var(--text-primary);
}

.perm-checkbox-item input[type="checkbox"] {
    display: none;
}

.perm-icon-status {
    font-weight: 700;
    font-size: 14px;
    color: #e63946;
}

.perm-checkbox-item.checked .perm-icon-status {
    color: #2a9d8f;
}

/* ==========================================================================
   Bitácora del Modelo
   ========================================================================== */
.bitacora-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.bitacora-card {
    display: flex;
    gap: 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 14px;
}

.bitacora-card img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    flex: 0 0 auto;
    border: 1px solid var(--input-border);
}

.bitacora-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bitacora-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.bitacora-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bitacora-desc {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0;
}

.bitacora-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

/* ==========================================================================
   Horas de Conexión del Modelo
   ========================================================================== */
.horas-iframe-wrapper {
    width: 100%;
    overflow-x: auto;
}

.horas-iframe-wrapper iframe {
    width: 100%;
    min-width: 320px;
    height: 550px;
    border: 1px solid var(--input-border);
    border-radius: 12px;
}

/* ==========================================================================
   SweetAlert2 - Tema Global App-V2 (reemplaza el estilo por defecto)
   ========================================================================== */
.swal2-container {
    z-index: 99999 !important;
}

.swal2-popup.swal2-popup {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
}

.swal2-popup .swal2-title {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
}

.swal2-popup .swal2-html-container,
.swal2-popup .swal2-content {
    color: var(--text-muted);
    font-size: 14px;
}

.swal2-popup .swal2-html-container strong {
    color: var(--text-primary);
}

.swal2-popup .swal2-close {
    color: var(--text-muted);
}

.swal2-popup .swal2-close:hover {
    color: var(--primary-color);
}

.swal2-popup .swal2-actions {
    gap: 10px;
}

.swal2-popup .swal2-confirm,
.swal2-popup .swal2-cancel,
.swal2-popup .swal2-deny {
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 10px 22px !important;
    box-shadow: none !important;
    transition: filter 0.2s ease, transform 0.15s ease;
}

.swal2-popup .swal2-confirm:hover,
.swal2-popup .swal2-cancel:hover,
.swal2-popup .swal2-deny:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.swal2-popup .swal2-confirm {
    background: var(--primary-color) !important;
    color: #14161d !important;
}

.swal2-popup .swal2-cancel {
    background: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--input-border) !important;
}

.swal2-popup .swal2-deny {
    background: #e63946 !important;
    color: #ffffff !important;
}

.swal2-popup .swal2-timer-progress-bar {
    background: var(--primary-color);
}

/* Iconos: recolorear los aros/símbolos por defecto de SweetAlert2 */
.swal2-icon.swal2-success {
    border-color: #2a9d8f;
    color: #2a9d8f;
}
.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #2a9d8f;
}
.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(42, 157, 143, 0.35);
}

.swal2-icon.swal2-error {
    border-color: #e63946;
    color: #e63946;
}
.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #e63946;
}

.swal2-icon.swal2-warning {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.swal2-icon.swal2-info,
.swal2-icon.swal2-question {
    border-color: var(--text-muted);
    color: var(--text-muted);
}

.swal2-popup .swal2-input,
.swal2-popup .swal2-textarea,
.swal2-popup .swal2-select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    border-radius: 8px;
    box-shadow: none;
}

.swal2-popup .swal2-input:focus,
.swal2-popup .swal2-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Toasts (Swal.mixin({ toast: true, ... })) */
.swal2-popup.swal2-toast {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.swal2-popup.swal2-toast .swal2-title {
    font-size: 14px;
    color: var(--text-primary);
}

.swal2-popup.swal2-toast .swal2-html-container {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* Fondo del overlay (backdrop) al usar showConfirmButton/no-toast */
.swal2-container.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.6);
}
