* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #0f172a;
    --dark-card: rgba(30, 41, 59, var(--glass-opacity, 0.95));
    /* Usar variable de opacidad */
    --light-bg: #f8fafc;
    --light-card: rgba(255, 255, 255, var(--glass-opacity, 0.95));
    /* Usar variable de opacidad */
    --text-dark: #1e293b;
    --text-light: #f8fafc;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --widget-border-color: rgba(99, 102, 241, 0.25);
    --widget-fill-color: rgba(99, 102, 241, 0.08);
    --widget-shadow-color: rgba(15, 23, 42, 0.16);
    --widget-font-color: #0f172a;

    /* Variables de Gloss */
    --glass-opacity: 0.95;
    --glass-blur: 0px;
}

[data-theme="dark"] {
    --bg-color: var(--dark-bg);
    --card-color: var(--dark-card);
    --text-color: var(--text-light);
    --widget-font-color: var(--text-light);
}

[data-theme="light"] {
    --bg-color: var(--light-bg);
    --card-color: var(--light-card);
    --text-color: var(--text-dark);
}

/* Aplicar efecto glass a contenedores principales */
.card,
.modal-content,
.sidebar-menu,
.dashboard-header,
.company-section,
.login-card {
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

body.landing-mode {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in {
    animation: slideInRight 0.6s ease-out;
}

/* Header */
.header {
    background: var(--card-color);
    box-shadow: var(--shadow);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    gap: 1.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 45px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-right: 1rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: none;
    background: rgba(99, 102, 241, 0.12);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.nav-toggle i {
    font-size: 1.25rem;
}

.nav-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
}

.nav-toggle:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.45);
    outline-offset: 3px;
}

.nav-toggle.is-open {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 16px 26px rgba(79, 70, 229, 0.28);
}

body.nav-collapsible .logo-container {
    width: auto;
    justify-content: flex-start;
}

body.nav-collapsible .header-actions {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    width: auto;
}

body.nav-collapsible .nav-toggle {
    display: inline-flex;
}

body.nav-collapsible .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    flex-direction: column;
    align-items: stretch;
    min-width: min(230px, 80vw);
    background: var(--card-color);
    border-radius: 20px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.25);
    z-index: 1050;
}

body.nav-collapsible.nav-open .main-nav,
body.nav-collapsible .header.nav-open .main-nav {
    display: flex;
    gap: 0.5rem;
}

body.nav-collapsible .main-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 0.65rem 0.75rem;
}

.nav-link {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.18);
    font-weight: 700;
}

/* Ocultar link de tema en desktop (se muestra el botón) */
.nav-link-theme {
    display: none;
}

/* En responsive, mostrar link de tema y ocultar botón */
body.nav-collapsible .nav-link-theme {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.nav-collapsible .theme-toggle {
    display: none !important;
}

/* Botones */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 16px;
}

.btn-compact {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 14px;
    box-shadow: none;
}

.btn-compact i {
    font-size: 0.8rem;
}

.btn-icon {
    padding: 0.4rem;
    width: 2rem;
    height: 2rem;
    border-radius: 12px;
    justify-content: center;
    font-size: 0.9rem;
    gap: 0;
    box-shadow: none;
}

.btn-icon.btn-danger {
    color: white;
}

.btn-icon:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.theme-toggle {
    background: var(--card-color);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Contenedor principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Ajustes solo para landing */
body.landing-mode .container {
    padding: 1rem 1.5rem 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.footer-wrapper {
    flex-shrink: 0;
}

/* ============================================
   LANDING PAGE - DISEÑO PROFESIONAL PREMIUM
   ============================================ */

/* Contenedor principal del landing */
.landing-page {
    display: grid;
    min-height: calc(100vh - 120px);
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
    position: relative;
    overflow: hidden;
}

/* ========== DISEÑO MÓVIL / PORTRAIT ========== */
@media (max-width: 1024px),
(orientation: portrait) {
    .landing-page {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        padding: 2rem 1rem;
        gap: 3rem;
        align-items: start;
    }

    .landing-page>.login-card {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        order: 1;
    }

    .landing-page>.hero-section {
        width: 100%;
        max-width: 900px;
        margin: 0 auto;
        order: 2;
        min-height: 500px;
    }
}

/* ========== DISEÑO DESKTOP / LANDSCAPE ========== */
@media (min-width: 1025px) and (orientation: landscape) {
    .landing-page {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
        height: calc(100vh - 120px);
        padding: 3rem 4rem;
        gap: 4rem;
        align-items: center;
    }

    .landing-page>.login-card {
        justify-self: end;
        width: 100%;
        max-width: 500px;
    }

    .landing-page>.hero-section {
        justify-self: start;
        width: 100%;
        max-width: 700px;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ============================================
   HERO SECTION - SLIDER MEJORADO
   ============================================ */

.hero-section {
    width: 100%;
    position: relative;
    animation: slideInRight 0.8s ease-out;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle,
            rgba(99, 102, 241, 0.08) 0%,
            transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

[data-theme="dark"] .hero-section::before {
    background: radial-gradient(circle,
            rgba(129, 140, 248, 0.1) 0%,
            transparent 70%);
}

.hero-section {
    animation: fadeIn 0.8s ease-out;
}

/* Títulos con wrap y multilinea */
.hero-title {
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    color: var(--text-color);
    white-space: normal;
    word-wrap: break-word;
}

.hero-subtitle {
    opacity: 0.8;
    margin-bottom: 0.75rem;
    line-height: 1.45;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: var(--text-color);
    white-space: normal;
    word-wrap: break-word;
}

/* iPad Pro específico (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-title {
        font-size: 1.4rem;
        line-height: 1.25;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 600px) {
    .hero-title {
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
        line-height: 1.4;
    }
}

@media (max-height: 700px) and (orientation: landscape) {
    .hero-title {
        font-size: 1.1rem;
        margin-bottom: 0.35rem;
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
}

/* Features grid - Gap reducido entre filas */
.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    row-gap: 0.65rem;
    margin-top: 0;
    align-content: start;
}

.feature-card,
.benefit-item {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 0.875rem 0.75rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

[data-theme="dark"] .feature-card,
[data-theme="dark"] .benefit-item {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(148, 163, 184, 0.1);
}

.feature-card:hover,
.benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.15);
}

.feature-card h3,
.benefit-item h4 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-color);
    line-height: 1.2;
}

.feature-card p,
.benefit-item p {
    font-size: 0.75rem;
    line-height: 1.3;
    margin: 0;
    opacity: 0.8;
}

.feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin: 0 auto 0.5rem;
}

/* Ajustes responsive para features */
@media (max-width: 600px) {
    .features {
        gap: 0.6rem;
        row-gap: 0.5rem;
    }

    .feature-card,
    .benefit-item {
        padding: 0.75rem 0.6rem;
    }

    .feature-icon {
        width: 34px;
        height: 34px;
        font-size: 1.05rem;
        margin-bottom: 0.4rem;
    }

    .feature-card h3,
    .benefit-item h4 {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .feature-card p,
    .benefit-item p {
        font-size: 0.7rem;
        line-height: 1.25;
    }
}

/* iPad Pro y tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .features {
        gap: 0.7rem;
        row-gap: 0.6rem;
    }
}

@media (max-height: 700px) and (orientation: landscape) {
    .features {
        gap: 0.5rem;
        row-gap: 0.4rem;
    }

    .feature-card,
    .benefit-item {
        padding: 0.6rem 0.5rem;
    }

    .feature-icon {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
        margin-bottom: 0.35rem;
    }

    .feature-card h3,
    .benefit-item h4 {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
        line-height: 1.15;
    }

    .feature-card p,
    .benefit-item p {
        font-size: 0.65rem;
        line-height: 1.2;
    }
}

.feature-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.feature-icon.purple {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
}

.feature-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.feature-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* ============================================
   SLIDER CON TAMAÑO FIJO Y SLIDES STRETCH
   ============================================ */

.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
}

/* Tamaño fijo del slider según orientación */
@media (max-width: 1024px),
(orientation: portrait) {
    .hero-slider {
        height: 600px;
        min-height: 500px;
        max-height: 70vh;
    }
}

@media (min-width: 1025px) and (orientation: landscape) {
    .hero-slider {
        height: 550px;
        min-height: 450px;
        max-height: calc(100vh - 200px);
    }
}

/* Slides con posición absoluta para superponerse */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Slide card - TODO VISIBLE SIN SCROLL */
.slide-card {
    background: var(--card-color);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    gap: 0.5rem;
    justify-content: space-between;
}

[data-theme="dark"] .slide-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

/* Contenido de los slides hace stretch vertical */
.slide-card .features,
.slide-card .benefit-list {
    flex: 1;
    display: grid;
    align-content: space-between;
    min-height: 0;
}

.slide-card .signup-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

/* Beneficios dentro de card sin decoración extra */
.benefits-highlight.in-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.benefits-highlight.in-card .benefit-list {
    flex: 1;
    align-content: space-between;
}

/* Trial badge compacto */
.trial-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* Formulario compacto en slide 3 */
.signup-form.compact .form-group {
    margin-bottom: 0.5rem;
}

.signup-form.compact .form-input {
    height: 38px;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
}

.signup-form.compact .form-label {
    font-size: 0.825rem;
    margin-bottom: 0.35rem;
}

.signup-form.compact button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Phone input with country selector */
.phone-input-group {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.5rem;
    width: 100%;
}

.phone-input-group .phone-country-select {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    flex: 0 0 100px !important;
    padding-left: 0.5rem;
    padding-right: 0.25rem;
}

.phone-input-group .phone-number-input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0;
}

/* Trial button in slides */
.btn-trial {
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    text-align: center;
}

.btn-trial:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

.signup-footer {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Ajustes responsive para slides */
@media (max-width: 600px) {
    .slide-card {
        padding: 1rem 1.25rem;
        gap: 0.4rem;
    }

    .hero-slider {
        height: 550px;
        max-height: 65vh;
    }

    .signup-form.compact .form-group {
        margin-bottom: 0.4rem;
    }

    .signup-form.compact .form-input {
        height: 36px;
        font-size: 0.8rem;
    }

    .signup-form.compact button {
        padding: 0.65rem 0.875rem;
        font-size: 0.85rem;
    }
}

@media (max-height: 700px) and (orientation: landscape) {
    .hero-slider {
        height: 420px;
        min-height: 400px;
    }

    .slide-card {
        padding: 0.875rem 1.25rem;
        gap: 0.35rem;
    }

    .signup-form.compact .form-group {
        margin-bottom: 0.35rem;
    }

    .signup-form.compact .form-input {
        height: 32px;
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .signup-form.compact .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .signup-form.compact button {
        padding: 0.6rem 0.875rem;
        font-size: 0.825rem;
    }

    .trial-badge {
        padding: 0.2rem 0.6rem;
        font-size: 0.75rem;
        margin-bottom: 0.35rem;
    }

    .signup-footer {
        font-size: 0.75rem;
        margin-top: 0.35rem;
    }
}

/* Eliminamos los indicadores numéricos del slider */
.slider-controls {
    display: none;
}

/* ============================================
   BOTONES DE NAVEGACIÓN DEL SLIDER
   ============================================ */

.hero-section .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #6366f1;
    font-size: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 24px rgba(99, 102, 241, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .hero-section .slider-arrow {
    background: linear-gradient(145deg,
            rgba(30, 41, 59, 0.98) 0%,
            rgba(15, 23, 42, 0.95) 100%);
    border-color: rgba(129, 140, 248, 0.2);
    color: #818cf8;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.2);
}

.hero-section .slider-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    color: white;
    box-shadow:
        0 12px 32px rgba(99, 102, 241, 0.3),
        0 4px 12px rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .hero-section .slider-arrow:hover {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
}

.hero-section .slider-arrow:active {
    transform: translateY(-50%) scale(1.05);
}

.hero-section .slider-arrow.left {
    left: 1rem;
}

.hero-section .slider-arrow.right {
    right: 1rem;
}

/* Posicionamiento responsive */
@media (min-width: 1025px) and (orientation: landscape) {
    .hero-section .slider-arrow.left {
        left: -70px;
    }

    .hero-section .slider-arrow.right {
        right: -70px;
    }
}

/* Portrait: asegura 2x2 en features */
@media (orientation: portrait) {
    body.landing-mode .features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-card {
        padding: 1.25rem;
    }
}

/* Fuerza 2x2 en pantallas estrechas, incluido slide 1 */
@media (max-width: 768px) {
    body.landing-mode .features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* En móviles muy estrechos ajustar botones */
@media (max-width: 600px) {
    .hero-section .slider-arrow {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .hero-section .slider-arrow.left {
        left: 0.5rem;
    }

    .hero-section .slider-arrow.right {
        right: 0.5rem;
    }
}

.slider-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.2);
    cursor: pointer;
}

.slider-dot.active {
    background: var(--primary-color);
}

.benefits-highlight {
    margin-top: 2rem;
    background: var(--card-color);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.trial-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.benefits-highlight h3 {
    margin-bottom: 0.25rem;
    font-size: 1.4rem;
}

.benefits-highlight p {
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.benefit-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.benefit-item {
    border: none;
}

.benefit-item h4 {
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.benefit-item p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ============================================
   LOGIN CARD - DISEÑO PREMIUM
   ============================================ */

.login-card {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.98) 100%);
    backdrop-filter: blur(20px);
    padding: 3rem 2.5rem;
    border-radius: 32px;
    box-shadow:
        0 20px 60px rgba(15, 23, 42, 0.08),
        0 0 1px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
}

/* Efecto de brillo sutil en hover */
.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
            rgba(99, 102, 241, 0.03) 0%,
            transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.login-card:hover::before {
    opacity: 1;
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.12),
        0 0 1px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: rgba(99, 102, 241, 0.15);
}

/* Modo oscuro */
[data-theme="dark"] .login-card {
    background: linear-gradient(145deg,
            rgba(15, 23, 42, 0.95) 0%,
            rgba(30, 41, 59, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .login-card:hover {
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .login-card {
        padding: 2.5rem 2rem;
        border-radius: 24px;
    }
}

/* Título del login */
.login-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 2rem;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 2px;
}

[data-theme="dark"] .login-title {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .login-title::after {
    background: linear-gradient(90deg, #818cf8 0%, #a78bfa 100%);
}

/* Enlace de contraseña olvidada mejorado */
.forgot-password-link {
    text-align: center;
    margin-top: 1.25rem;
}

.forgot-password-link a {
    color: #6366f1;
    font-size: 0.925rem;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

[data-theme="dark"] .forgot-password-link a {
    color: #818cf8;
}

.forgot-password-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
}

[data-theme="dark"] .forgot-password-link a::after {
    background: linear-gradient(90deg, #818cf8, #a78bfa);
}

.forgot-password-link a:hover {
    color: #7c3aed;
}

[data-theme="dark"] .forgot-password-link a:hover {
    color: #a78bfa;
}

.forgot-password-link a:hover::after {
    width: 100%;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.forgot-password-link-old a:hover {
    text-decoration: underline;
}

.form-feedback {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #0f172a;
    background: #e0f2fe;
    padding: 0.65rem;
    border-radius: 8px;
    display: none;
}

.form-feedback.error {
    color: #b91c1c;
    background: #fee2e2;
}

.form-feedback.success {
    color: #047857;
    background: #d1fae5;
}

.form-group {
    margin-bottom: 1.5rem;
}

.signup-card {
    margin-top: 2rem;
    background: var(--card-color);
    padding: 2rem;
    border-radius: 28px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 220px);
    overflow: auto;
}

@media (orientation: landscape) and (max-height: 650px) {
    .container {
        padding: 1rem;
    }

    .features {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .benefits-highlight {
        padding: 1.25rem;
    }

    .signup-card {
        padding: 1.5rem;
        max-height: calc(100vh - 160px);
    }

    .btn {
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 1.8rem !important;
    }

    .feature-card {
        padding: 1rem;
    }
}

.signup-header h3 {
    margin-bottom: 0.25rem;
    font-size: 1.7rem;
}

.signup-header p {
    margin: 0;
    opacity: 0.75;
}

.signup-form .form-group {
    margin-bottom: 1rem;
}

.signup-form .form-input {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.signup-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

.signup-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-help {
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.6);
}

.text-muted {
    color: rgba(15, 23, 42, 0.5);
    font-size: 0.9rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.adjuntos-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.adjunto-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-size: 0.85rem;
}

.adjunto-pill i {
    color: var(--primary-color);
}

.adjunto-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.adjuntos-empty {
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.5);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 15px;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

/* ============================================
   FORMULARIO DE LOGIN MEJORADO
   ============================================ */

.login-card .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.login-card .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #475569;
    transition: color 0.3s ease;
}

[data-theme="dark"] .login-card .form-label {
    color: #cbd5e1;
}

.login-card .form-label i {
    font-size: 1.1rem;
    color: #6366f1;
    transition: transform 0.3s ease;
}

.login-card .form-group:focus-within .form-label {
    color: #6366f1;
}

[data-theme="dark"] .login-card .form-group:focus-within .form-label {
    color: #818cf8;
}

.login-card .form-group:focus-within .form-label i {
    transform: scale(1.1);
}

.login-card .form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1rem;
    background: #ffffff;
    color: #0f172a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .login-card .form-input {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(148, 163, 184, 0.2);
    color: #f1f5f9;
}

.login-card .form-input:focus {
    outline: none;
    border-color: #6366f1;
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

[data-theme="dark"] .login-card .form-input:focus {
    background: rgba(30, 41, 59, 0.7);
    border-color: #818cf8;
    box-shadow:
        0 0 0 4px rgba(129, 140, 248, 0.15),
        0 4px 12px rgba(129, 140, 248, 0.2);
}

.login-card .form-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

[data-theme="dark"] .login-card .form-input::placeholder {
    color: #64748b;
}

/* Botón de login mejorado */
.login-card .btn-primary {
    width: 100%;
    padding: 1.125rem 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 14px rgba(99, 102, 241, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

.login-card .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.login-card .btn-primary:hover::before {
    left: 100%;
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(99, 102, 241, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
}

.login-card .btn-primary:active {
    transform: translateY(0);
    box-shadow:
        0 4px 14px rgba(99, 102, 241, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.login-card .btn-primary i {
    margin-right: 0.5rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input[readonly] {
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.85;
}

.form-card {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

[data-theme="dark"] .form-card {
    background: rgba(148, 163, 184, 0.12);
}

.form-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.form-card-help {
    font-size: 0.95rem;
    opacity: 0.8;
}

.form-card-note {
    font-size: 0.9rem;
    opacity: 0.75;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.chip-generica {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.chip-ausencia_medica {
    background: rgba(34, 197, 94, 0.15);
    color: #047857;
}

.chip-registro_olvidado {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.text-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.adjunto-chip {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
    cursor: pointer;
}

.adjunto-extra {
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.6);
}

.btn-xs {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
}

.billing-tier-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 1rem;
}

.billing-tier-card {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.billing-tier-card h5 {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text);
}

.billing-tier-card table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.billing-tier-card th,
.billing-tier-card td {
    padding: 0.25rem 0;
    text-align: left;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.billing-tier-card th {
    font-weight: 600;
    color: rgba(15, 23, 42, 0.6);
}

.billing-tier-card td:last-child,
.billing-tier-card th:last-child {
    text-align: right;
}

.tier-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 0.75rem;
}

.tier-row .btn-icon {
    align-self: center;
    border: none;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
}

.tier-row label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    display: block;
    color: rgba(15, 23, 42, 0.7);
}

.plan-tier-summary {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.75);
}

.plan-tier-summary li {
    padding: 0.15rem 0;
}

.admin-onboarding {
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.12));
}

.admin-onboarding code {
    font-family: 'Fira Code', monospace;
    background: rgba(15, 23, 42, 0.08);
    padding: 0 0.35rem;
    border-radius: 6px;
}

.form-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-section+.admin-section {
    margin-top: 1.25rem;
}

.admin-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-empty {
    font-size: 0.95rem;
    opacity: 0.65;
}

.admin-entry {
    background: var(--card-color);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

[data-theme="dark"] .admin-entry {
    background: rgba(15, 23, 42, 0.35);
}

.admin-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.admin-entry-badge {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-entry-fields {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-entry-note {
    font-size: 0.85rem;
    opacity: 0.65;
}

.admin-entry-actions {
    display: flex;
    justify-content: flex-end;
}

.admin-entry-actions .btn {
    box-shadow: none;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-color);
    padding: 3rem;
    border-radius: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-medium .modal-content {
    max-width: 480px;
    padding: 2.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--bg-color);
    transform: rotate(90deg);
}

.global-spinner {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.global-spinner.active {
    display: flex;
}

.global-spinner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 2rem;
    border-radius: 16px;
    background: var(--card-color);
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: var(--shadow);
}

.global-spinner-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.global-spinner-message {
    font-weight: 600;
    color: var(--text-color);
}

.global-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 4500;
}

.global-toast {
    min-width: 200px;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    color: white;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.2);
}

.global-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.global-toast--success {
    background: #10b981;
}

.global-toast--error {
    background: #ef4444;
}

.import-export-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.import-export-tab {
    flex: 1;
    min-width: 160px;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: rgba(248, 250, 252, 0.9);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.import-export-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
}

.import-export-tab-content {
    display: none;
}

.import-export-tab-content.active {
    display: block;
}

.import-section,
.export-section {
    border-radius: 18px;
    padding: 1.5rem;
    border: 1px dashed rgba(148, 163, 184, 0.6);
    background: rgba(99, 102, 241, 0.05);
}

.drop-zone {
    border: 2px dashed rgba(99, 102, 241, 0.4);
    border-radius: 18px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(99, 102, 241, 0.08);
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.15);
}

.drop-zone i {
    font-size: 2rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: var(--card-color);
    margin-top: 1rem;
}

.file-info i {
    color: #10b981;
    font-size: 1.3rem;
}

.btn-icon {
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-color);
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-icon:hover {
    background: rgba(239, 68, 68, 0.2);
}

.import-options {
    margin-top: 1.5rem;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-weight: 500;
    padding: 0.7rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.radio-label input {
    margin-top: 0.25rem;
}

.radio-label strong {
    display: block;
    font-size: 0.95rem;
}

.radio-label small {
    display: block;
    color: rgba(15, 23, 42, 0.65);
    font-weight: 400;
}

.radio-label:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.help-section {
    margin-top: 1.5rem;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    border-radius: 14px;
    padding: 1rem;
    background: var(--card-color);
    border: 1px solid rgba(15, 23, 42, 0.08);
    text-align: center;
}

.stat-card.stat-success {
    border-color: rgba(16, 185, 129, 0.4);
}

.stat-card.stat-warning {
    border-color: rgba(245, 158, 11, 0.5);
}

.stat-card.stat-danger {
    border-color: rgba(239, 68, 68, 0.5);
}

.stat-card.stat-muted {
    border-color: rgba(15, 23, 42, 0.2);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    margin-top: 0.2rem;
    color: rgba(15, 23, 42, 0.6);
    font-size: 0.9rem;
}

.summary-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    gap: 0.5rem;
}

/* Fichaje Buttons */
.fichaje-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: clamp(0.8rem, 2vw, 1.25rem);
}

.fichaje-btn {
    padding: 1.6rem;
    border: 3px solid transparent;
    border-radius: 20px;
    background: var(--bg-color);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    gap: 0.4rem;
}

.fichaje-btn:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.fichaje-btn.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
}

.fichaje-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.fichaje-icon {
    font-size: 3rem;
    margin-bottom: 0.25rem;
}

/* Panel Personal y Admin */
.panel-container {
    display: none;
}

.panel-container.active {
    display: block;
}

.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 3rem;
    border-radius: 30px;
    color: white;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Ajustes responsive para títulos de dashboard */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1.5rem;
    }

    .dashboard-title {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: 0.75rem;
        word-wrap: break-word;
    }

    .dashboard-subtitle {
        font-size: 0.95rem !important;
        line-height: 1.4;
        word-wrap: break-word;
    }
}

/* Pantallas muy estrechas (móviles pequeños) */
@media (max-width: 480px) {
    .dashboard-header {
        padding: 1.25rem;
    }

    .dashboard-title {
        font-size: 1.35rem !important;
        margin-bottom: 0.5rem;
    }

    .dashboard-subtitle {
        font-size: 0.9rem !important;
    }
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.fichaje-limit-info {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background: rgba(248, 113, 113, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(248, 113, 113, 0.4);
    font-size: 0.9rem;
    text-align: center;
}

.fichajes-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.fichajes-readonly-alert {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #0f172a;
    background: rgba(15, 23, 42, 0.08);
}

.dashboard-actions .btn {
    box-shadow: none;
}

@media (min-width: 720px) {
    .dashboard-actions {
        flex-wrap: nowrap;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.filter-option-with-calendar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.calendar-inline-control {
    margin-left: 1.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
}

.calendar-inline-help {
    font-size: 0.78rem;
    color: rgba(15, 23, 42, 0.6);
    margin: 0;
}

.stat-card {
    background: var(--card-color);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    opacity: 0.7;
    font-size: 1rem;
}

.superadmin-overview .stats-grid {
    margin-bottom: 2rem;
}

.superadmin-overview .badge {
    margin: 0.25rem 0.35rem 0 0;
}

.panel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.panel-toolbar--stats {
    justify-content: flex-start;
}

.panel-toolbar .toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.panel-toolbar .toolbar-note {
    font-size: 0.9rem;
    opacity: 0.75;
}

.panel-metrics {
    margin-bottom: 2rem;
}

.panel-metrics:empty {
    display: none;
}

.section-title {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.company-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.company-section {
    background: var(--card-color);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 1.5rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .company-section {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(71, 85, 105, 0.35);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.6);
}

.company-section-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid.cols-5 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.form-grid.cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-grid.cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cols-span-3-md {
    grid-column: span 3;
}

@media (max-width: 1024px) {
    .cols-span-3-md {
        grid-column: span 3;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-helper-text {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--warning-color);
}

.input-editable {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.6);
}

.payment-element-wrapper {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.02);
    min-height: 180px;
}

.payment-placeholder {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text-muted, #6b7280);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 96px;
}

.status-pill.success {
    background: rgba(16, 185, 129, 0.18);
    color: var(--success-color);
}

.status-pill.inactive {
    background: rgba(245, 158, 11, 0.18);
    color: var(--warning-color);
}

.logo-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.flex-grow {
    flex: 1 1 220px;
}

.logo-preview-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.logo-preview {
    width: 160px;
    height: 160px;
    border-radius: 18px;
    border: 1px dashed rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.logo-preview.is-empty {
    background: rgba(148, 163, 184, 0.14);
}

.logo-preview.is-empty::after {
    content: 'Sin logo';
    color: rgba(99, 102, 241, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-preview.is-empty img {
    display: none;
}

.helper-text {
    font-size: 0.75rem;
    opacity: 0.7;
    text-align: center;
}

.form-input[readonly] {
    background: rgba(148, 163, 184, 0.16);
    cursor: default;
}

.form-input-textarea {
    min-height: 110px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .logo-layout {
        flex-direction: column;
        align-items: stretch;
    }
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.relations-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.relation-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(99, 102, 241, 0.12);
    color: var(--text-color);
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
}

.relation-chip.inactive {
    opacity: 0.7;
    background: rgba(148, 163, 184, 0.25);
}

.relation-name {
    font-weight: 600;
}

.empresa-info-cell {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.empresa-row--inactive .empresa-info-cell strong {
    color: #b45309;
}

.empresa-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    box-shadow: none;
    transition: var(--transition);
}

.empresa-toggle.is-open {
    transform: rotate(180deg);
}

.empresa-detail-row td {
    background: rgba(99, 102, 241, 0.05);
    border-top: none;
    padding: 1.5rem;
}

[data-theme="dark"] .empresa-detail-row td {
    background: rgba(15, 23, 42, 0.4);
}

.empresa-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.empresa-detail-block {
    flex: 1 1 260px;
    background: var(--card-color);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

[data-theme="dark"] .empresa-detail-block {
    background: rgba(15, 23, 42, 0.55);
}

.empresa-detail-block h5 {
    margin: 0;
    font-size: 1rem;
}

.empresa-detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empresa-detail-list li {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.empresa-detail-meta {
    font-size: 0.85rem;
    opacity: 0.7;
}

.empresa-detail-empty {
    margin: 0;
    opacity: 0.7;
}

.asesoria-overview .stats-grid {
    margin-bottom: 2rem;
}

.asesoria-overview .badge {
    margin: 0.25rem 0.35rem 0 0;
}

.table-meta {
    font-size: 0.8rem;
    opacity: 0.7;
}

.table-meta.muted {
    opacity: 0.6;
    font-style: italic;
}

.asesorias-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.asesoria-accordion-item {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: var(--card-color);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .asesoria-accordion-item {
    background: rgba(15, 23, 42, 0.55);
}

.asesoria-accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    border-radius: 16px;
}

.asesoria-accordion-trigger i {
    transition: var(--transition);
}

.asesoria-accordion-content {
    padding: 1rem 1.25rem 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.asesoria-info-card {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: rgba(99, 102, 241, 0.08);
    box-shadow: var(--shadow);
}

[data-theme="dark"] .asesoria-info-card {
    background: rgba(148, 163, 184, 0.12);
}

.asesoria-info-card h4 {
    margin: 0 0 1rem;
}

.asesoria-contacto {
    display: grid;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.asesoria-contacto i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Tabla */
.table-container {
    background: var(--card-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.responsive-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.5rem;
    background: white;
}

.responsive-table-wrapper .data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    min-width: 130px;
}

.data-table thead tr th {
    position: relative;
    background: #f9fafb;
    font-weight: 600;
    font-size: 0.9rem;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    background: rgba(99, 102, 241, 0.35);
}

.empty-state {
    padding: 2.5rem 1rem;
    border-radius: 16px;
    border: 2px dashed rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-color);
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
}

[data-theme="dark"] .empty-state {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.12);
}

.row-inactive {
    opacity: 0.6;
}

.asesorias-list {
    margin-top: 2rem;
}

.asesorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.asesoria-card {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.asesoria-card h5 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.asesoria-card .badge {
    margin-left: 0.75rem;
}

[data-theme="dark"] .asesoria-card {
    background: rgba(148, 163, 184, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--bg-color);
}

.table.personal-aligned th,
.table.personal-aligned td {
    text-align: center;
}

.table th {
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--bg-color);
}

.personal-monthly-hours {
    margin-top: 2rem;
}

.personal-monthly-hours .section-subtitle {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: rgba(15, 23, 42, 0.7);
}

.resumen-mensual-wrapper {
    margin-top: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1.25rem;
    background: var(--card-color);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.resumen-mensual-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.resumen-mensual-leyenda {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.6);
}

.leyenda-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--color-text-secondary, #64748b);
}

.leyenda-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 2px solid;
    flex-shrink: 0;
}

.leyenda-normal .leyenda-color {
    border-color: var(--primary-color, #6366f1);
    background: rgba(99, 102, 241, 0.15);
}

.leyenda-festivo .leyenda-color {
    border-color: var(--calendario-festivo-color, #f97316);
    background: var(--calendario-festivo-bg, rgba(249, 115, 22, 0.25));
}

.leyenda-vacaciones .leyenda-color {
    border-color: var(--calendario-vacaciones-color, #22c55e);
    background: var(--calendario-vacaciones-bg, rgba(34, 197, 94, 0.22));
}

.leyenda-asuntos .leyenda-color {
    border-color: var(--calendario-asuntos-color, #3b82f6);
    background: var(--calendario-asuntos-bg, rgba(59, 130, 246, 0.22));
}

.leyenda-incidencia .leyenda-color {
    border-color: var(--calendario-incidencia-color, #eab308);
    background: var(--calendario-incidencia-bg, rgba(234, 179, 8, 0.18));
}

.resumen-mensual-blocks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.resumen-mensual-block {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px dashed rgba(15, 23, 42, 0.1);
}

.resumen-mensual-block:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.resumen-mensual-subtitle {
    font-weight: 600;
    text-transform: capitalize;
    margin-bottom: 0.5rem;
    color: rgba(15, 23, 42, 0.85);
}

.resumen-mensual-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
    font-size: 0.82rem;
    width: 100%;
}

@media (max-width: 780px) {
    .resumen-mensual-wrapper {
        padding: 0.8rem;
    }

    .resumen-mensual-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        font-size: 0.75rem;
        grid-auto-rows: minmax(65px, auto);
    }

    .resumen-mensual-grid .calendar-day {
        min-height: 70px;
    }
}

.resumen-mensual-grid .calendar-header {
    font-weight: 600;
    text-align: center;
    color: rgba(15, 23, 42, 0.6);
}

.resumen-mensual-grid .calendar-day {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(99, 102, 241, 0.04);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.resumen-mensual-grid .calendar-day.placeholder {
    background: transparent;
    border: none;
    cursor: default;
}

.resumen-mensual-grid .calendar-day:hover:not(.placeholder) {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.15);
}

.resumen-mensual-grid .calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
}

/* Variables CSS por defecto para colores del calendario */
:root {
    --calendario-festivo-color: #f97316;
    --calendario-vacaciones-color: #22c55e;
    --calendario-asuntos-color: #3b82f6;
    --calendario-incidencia-color: #eab308;
    /* Backgrounds con transparencia (fallback para navegadores sin color-mix) */
    --calendario-festivo-bg: rgba(249, 115, 22, 0.25);
    --calendario-vacaciones-bg: rgba(34, 197, 94, 0.22);
    --calendario-asuntos-bg: rgba(59, 130, 246, 0.22);
    --calendario-incidencia-bg: rgba(234, 179, 8, 0.18);
}

/* Festivos - color personalizable */
.resumen-mensual-grid .calendar-day.day-festivo,
.resumen-mensual-grid button.calendar-day.day-festivo {
    border-color: var(--calendario-festivo-color) !important;
    background: var(--calendario-festivo-bg) !important;
}

/* Vacaciones - color personalizable */
.resumen-mensual-grid .calendar-day.day-vacaciones,
.resumen-mensual-grid button.calendar-day.day-vacaciones {
    border-color: var(--calendario-vacaciones-color) !important;
    background: var(--calendario-vacaciones-bg) !important;
}

/* Asuntos propios - color personalizable */
.resumen-mensual-grid .calendar-day.day-asuntos-propios,
.resumen-mensual-grid button.calendar-day.day-asuntos-propios {
    border-color: var(--calendario-asuntos-color) !important;
    background: var(--calendario-asuntos-bg) !important;
}

/* Mantener compatibilidad con clase antigua */
.resumen-mensual-grid .calendar-day.day-absence,
.resumen-mensual-grid button.calendar-day.day-absence {
    border-color: var(--calendario-vacaciones-color) !important;
    background: var(--calendario-vacaciones-bg) !important;
}

/* Incidencias - color personalizable */
.resumen-mensual-grid .calendar-day.day-incidencia,
.resumen-mensual-grid button.calendar-day.day-incidencia {
    border-color: var(--calendario-incidencia-color) !important;
    background: var(--calendario-incidencia-bg) !important;
}

.resumen-mensual-grid .calendar-day.calendar-day--range:not(.placeholder) {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.35);
}

.resumen-mensual-grid .calendar-day.calendar-day--selected {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.calendar-day .day-number {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.calendar-day .day-hours {
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.7);
}

.resumen-horas-detalle {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.resumen-horas-detalle .day-event {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Festivos - naranja */
.resumen-horas-detalle .day-event--festivo {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.15);
}

/* Vacaciones - verde pastel */
.resumen-horas-detalle .day-event--vacaciones {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
}

/* Asuntos propios - azul pastel */
.resumen-horas-detalle .day-event--asuntos_propios {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.12);
}

.resumen-horas-detalle .day-event--incidencia {
    border-color: var(--warning-color);
    background: rgba(249, 115, 22, 0.08);
}

.resumen-horas-detalle .day-event--fichaje {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.08);
}

.resumen-horas-detalle .day-event strong {
    font-size: 0.95rem;
    display: block;
}

.resumen-horas-detalle .day-event span {
    font-size: 0.82rem;
    color: rgba(15, 23, 42, 0.65);
}

.table tbody .section-divider td {
    padding: 0.8rem 1rem;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.8);
    background: rgba(15, 23, 42, 0.04);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 160px;
    overflow: hidden;
}

.table.sm-text td,
.table.sm-text th {
    font-size: 0.78rem;
}

.table-compact {
    table-layout: fixed;
    width: 100%;
}

.table-compact th,
.table-compact td {
    padding: 0.65rem 0.9rem;
}

.table-compact td {
    overflow: hidden;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.table-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.table-title {
    margin: 0;
    font-size: 1.4rem;
}

.table-title-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.table-title-actions .btn {
    white-space: nowrap;
}

.empleados-table-wrapper {
    margin-top: 1.5rem;
}

.empleados-table {
    width: 100%;
    table-layout: fixed;
    font-size: 0.78rem;
}

.empleados-table th,
.empleados-table td {
    padding: 0.6rem 0.8rem;
    vertical-align: middle;
}

.empleados-table th {
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.empleados-table td .cell-text,
.empleados-table td .cell-number {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empleados-table td .cell-number {
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.empleado-info-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.empleado-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
}

[data-theme="dark"] .empleado-avatar {
    background: rgba(148, 163, 184, 0.18);
    color: var(--card-color);
}

.empleado-info-cell .empleado-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.empleado-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    background: rgba(79, 70, 229, 0.12);
    color: var(--widget-font-color);
    text-transform: none;
    letter-spacing: 0.02em;
}

.empleados-table .badge-role {
    font-size: 0.68rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.empleados-table .table-meta {
    font-size: 0.7rem;
}

.vacaciones-filters {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1.5rem;
    align-items: end;
}

.vacaciones-filters .filter-actions {
    display: flex;
    gap: 0.75rem;
}

.vacaciones-admin-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vacaciones-summary-row {
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.vacaciones-summary-main {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.vacaciones-summary-name {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 240px;
    flex: 1;
}

.vacaciones-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #6366f1;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.vacaciones-summary-info {
    display: flex;
    flex-direction: column;
}

.vacaciones-summary-info .name {
    font-size: 1.05rem;
    font-weight: 600;
}

.vacaciones-summary-info .meta {
    font-size: 0.85rem;
    opacity: 0.65;
}

.vacaciones-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    flex: 2;
}

.vacaciones-metric {
    padding: 0.75rem;
    border-radius: 10px;
    background: #f3f4ff;
    min-width: 120px;
}

.vacaciones-summary-row.has-pendientes {
    border-color: rgba(249, 115, 22, 0.35);
    box-shadow: 0 8px 28px rgba(249, 115, 22, 0.2);
}

.vacaciones-summary-row.has-pendientes .vacaciones-summary-info .name {
    color: #ea580c;
}

.vacaciones-pendiente-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(249, 115, 22, 0.15);
    color: #c2410c;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

.vacaciones-pendiente-badge i {
    font-size: 0.85rem;
}

.vacaciones-metric .metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.65;
}

.vacaciones-metric .metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.vacaciones-absence-row.has-pendiente {
    background: rgba(249, 115, 22, 0.08);
    border-bottom-color: rgba(249, 115, 22, 0.3);
}

.vacaciones-absence-row.has-pendiente .vacaciones-periodo,
.vacaciones-absence-row.has-pendiente .vacaciones-meta,
.vacaciones-absence-row.has-pendiente .vacaciones-estado-indicador span {
    color: #c2410c;
}

.vacaciones-absence-row.has-pendiente .badge {
    background: rgba(249, 115, 22, 0.2);
    color: #9a3412;
}

.btn-accordion {
    min-width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vacaciones-summary-row .vacaciones-accordion {
    display: none;
    margin-top: 1rem;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    padding-top: 1rem;
}

.vacaciones-summary-row.is-open .vacaciones-accordion {
    display: block;
}

.vacaciones-summary-row.is-open .btn-accordion i {
    transform: rotate(180deg);
}

.vacaciones-absence-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1.2fr) minmax(120px, 0.8fr) minmax(160px, 1fr) minmax(150px, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

@media (max-width: 900px) {
    .vacaciones-absence-row {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

.vacaciones-absence-row:last-child {
    border-bottom: none;
}

.vacaciones-absence-row .vacaciones-periodo {
    font-weight: 600;
}

.vacaciones-absence-row .vacaciones-meta {
    display: block;
    font-size: 0.78rem;
    opacity: 0.7;
}

.vacaciones-dias-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vacaciones-dias-control .form-input {
    min-width: 80px;
}

.vacaciones-dias-control .btn-icon {
    min-width: 40px;
}

.vacaciones-dias-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
}

.vacaciones-estado-select,
.vacaciones-asignacion-select {
    min-width: 150px;
}

.vacaciones-estado-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.vacaciones-estado-indicador {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.vacaciones-estado-indicador .estado-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.vacaciones-estado-indicador .estado-icon.success {
    background: #10b981;
    color: #fff;
}

.vacaciones-estado-indicador .estado-icon.warning {
    background: #f59e0b;
    color: #fff;
}

.vacaciones-estado-indicador .estado-icon.danger {
    background: #ef4444;
    color: #fff;
}

.vacaciones-actions {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
}

.vacaciones-comment {
    margin-top: 0.5rem;
    display: none;
}

.vacaciones-comment.is-visible {
    display: block;
}

.vacaciones-comment textarea {
    min-height: 70px;
}

.vacaciones-empty-message {
    padding: 0.75rem 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

.empleados-table .table-meta.muted {
    opacity: 0.55;
}

.ui-panel {
    position: relative;
    background: linear-gradient(0deg, var(--widget-fill-color), var(--widget-fill-color)), var(--card-color);
    border: 1px solid var(--widget-border-color);
    border-radius: 22px;
    padding: 1.75rem;
    box-shadow: 0 20px 38px var(--widget-shadow-color);
    color: var(--widget-font-color);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: var(--transition);
}

.ui-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 48px var(--widget-shadow-color);
}

.ui-panel-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-right: 3rem;
}

.ui-panel-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.ui-panel-subtitle {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.75;
}

.ui-panel-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    gap: 0.4rem;
    z-index: 3;
}

.panel-control-btn {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
}

.panel-control-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: #fff;
}

.panel-control-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ui-panel-body {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: start;
    justify-content: flex-start;
}

/* Cambiar a grid cuando se especifica gridTemplateColumns */
.ui-panel-body[style*="grid-template-columns"] {
    display: grid;
}

.ui-panel-body[style*="grid-template-columns"]>.ui-tile,
.ui-panel-body[style*="grid-template-columns"]>.ui-card {
    width: auto;
    aspect-ratio: auto;
    min-height: auto;
    padding: 1.5rem;
}

/* Responsive: 2 columnas en móviles */
@media (max-width: 768px) {
    .ui-panel-body[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    .ui-panel-body[style*="grid-template-columns"]>.ui-tile,
    .ui-panel-body[style*="grid-template-columns"]>.ui-card {
        padding: 1rem;
    }

    .ui-panel-body[style*="grid-template-columns"] .ui-tile-title {
        font-size: 0.85rem;
    }

    .ui-panel-body[style*="grid-template-columns"] .ui-tile-value {
        font-size: 1.5rem;
    }

    .ui-panel-body[style*="grid-template-columns"] .ui-tile-meta {
        font-size: 0.75rem;
    }
}

.ui-panel-body.layout-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.ui-panel-body.layout-flex>* {
    flex: 1 1 min(280px, 100%);
}

.ui-panel-body>.ui-tile,
.ui-panel-body>.ui-card {
    background: linear-gradient(0deg, var(--widget-fill-color), var(--widget-fill-color)), var(--card-color);
    border: 1px solid var(--widget-border-color);
    border-radius: 18px;
    color: var(--widget-font-color);
    box-shadow: 0 18px 32px var(--widget-shadow-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1;
    width: 240px;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.ui-tile {
    padding: 1.15rem;
    gap: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

.ui-tile-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    flex-shrink: 0;
}

.ui-tile-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    margin: auto 0;
}

.ui-tile-meta {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: auto 0 0 0;
}

.ui-tile>.btn,
.ui-tile>button {
    margin-top: 0;
    flex-shrink: 0;
}

.ui-tile:hover,
.ui-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 42px var(--widget-shadow-color);
}

.ui-card {
    padding: 1.15rem;
    gap: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

.ui-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0;
    flex-shrink: 0;
}

.ui-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.ui-card-badge {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.18);
    color: var(--widget-font-color);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ui-card-value {
    font-size: 2rem;
    font-weight: 800;
    margin: auto 0;
}

.ui-card-subtitle {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: auto 0 0 0;
}

.ui-card-footer {
    font-size: 0.85rem;
    opacity: 0.65;
    margin-top: 0;
    flex-shrink: 0;
}

.ui-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .ui-panel-body {
        grid-auto-flow: row;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 720px) {
    .ui-panel-body {
        grid-auto-flow: row;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

.ui-card-actions .btn {
    box-shadow: none;
}

.ui-card-icon {
    font-size: 1.5rem;
    opacity: 0.65;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ui-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.superadmin-table {
    width: 100%;
    table-layout: fixed;
}

.superadmin-table th {
    position: relative;
    user-select: none;
    font-weight: 600;
    overflow: visible;
}

.superadmin-table .th-label {
    pointer-events: none;
}

.empleados-table .th-label {
    pointer-events: none;
}

.col-resize-handle {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 2;
}

.col-resize-handle::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 3px;
    width: 2px;
    background: rgba(99, 102, 241, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.superadmin-table th:hover .col-resize-handle::after {
    opacity: 1;
}

.empleados-table th:hover .col-resize-handle::after {
    opacity: 1;
}

body.is-resizing-column {
    cursor: col-resize !important;
}

.superadmin-table.is-resizing,
.superadmin-table.is-resizing * {
    cursor: col-resize !important;
}

.empleados-table.is-resizing,
.empleados-table.is-resizing * {
    cursor: col-resize !important;
}

.superadmin-overview .table-compact {
    font-size: 0.75rem;
}

.superadmin-overview .table-compact th,
.superadmin-overview .table-compact td {
    padding: 0.5rem 0.65rem;
}

.superadmin-overview .table-compact th {
    font-size: 0.7rem;
    letter-spacing: 0.35px;
}

.superadmin-overview .table-compact td {
    vertical-align: middle;
}

.superadmin-overview .table-compact td .cell-text,
.superadmin-overview .table-compact td .cell-number {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.superadmin-overview .table-compact td .cell-number {
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.superadmin-overview .table-compact td .cell-text.muted {
    opacity: 0.55;
}

.superadmin-overview .empresa-info-cell {
    gap: 0.5rem;
}

.superadmin-overview .col-empresa {
    white-space: normal;
    max-width: none;
    min-width: 220px;
}

.superadmin-overview .empresa-info-cell strong {
    font-size: 0.85rem;
}

.superadmin-overview .empresa-info-cell .table-meta {
    font-size: 0.68rem;
}

.superadmin-overview .col-empleados,
.superadmin-overview .col-admins,
.superadmin-overview .col-inspectores,
.superadmin-overview .col-fichajes,
.superadmin-overview .col-ausencias {
    width: 60px;
    text-align: center;
}

.superadmin-overview .col-nif,
.superadmin-overview .col-fiscalidad,
.superadmin-overview .col-actividad {
    max-width: 140px;
}

.superadmin-overview .col-tipo {
    width: 80px;
}

.superadmin-overview .col-relaciones {
    min-width: 100px;
}

.superadmin-overview .col-relaciones .badge-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.superadmin-overview .col-relaciones .badge {
    margin: 0;
}

.superadmin-overview .table-compact td .badge {
    white-space: nowrap;
}

.superadmin-overview .table-actions {
    gap: 0.35rem;
}

.superadmin-overview .col-estado {
    width: 90px;
}

.superadmin-overview .col-acciones {
    width: 150px;
    text-align: right;
}

.table td[data-tooltip],
.table th[data-tooltip] {
    position: relative;
    overflow: visible;
}

.table td[data-tooltip]:hover::after,
.table td[data-tooltip]:focus-within::after,
.table td[data-tooltip]:hover::before,
.table td[data-tooltip]:focus-within::before,
.table th[data-tooltip]:hover::after,
.table th[data-tooltip]:focus-within::after,
.table th[data-tooltip]:hover::before,
.table th[data-tooltip]:focus-within::before {
    opacity: 1;
}

.table td[data-tooltip]::before,
.table th[data-tooltip]::before,
.table td[data-tooltip]::after,
.table th[data-tooltip]::after {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 20;
}

.table td[data-tooltip]::before,
.table th[data-tooltip]::before {
    content: '';
    bottom: calc(100% - 0.1rem);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.9) transparent transparent transparent;
}

.table td[data-tooltip]::after,
.table th[data-tooltip]::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 0.5rem);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
}

.col-empleados {
    color: var(--text-color);
}

.col-admins {
    color: #6366f1;
}

.col-inspectores {
    color: #4338ca;
}

.col-fichajes {
    color: #0f766e;
    font-weight: 600;
}

.col-ausencias {
    color: #b45309;
    font-weight: 600;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-info {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-color);
}

.badge-muted {
    background: rgba(148, 163, 184, 0.18);
    color: var(--text-color);
}

.badge-group {
    display: inline-flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.action-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    cursor: default;
}

.profile-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.profile-item {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.profile-label {
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.info-tooltip .tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translate(-50%, -100%);
    background: var(--card-color);
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    white-space: nowrap;
    transition: var(--transition);
    pointer-events: none;
    z-index: 10;
}

.info-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -120%);
}

.safe-lock {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.safe-lock-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.safe-lock-btn.unlocked {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.safe-lock label {
    font-weight: 600;
}

/* Fichaje modal responsive full-height */
#superadminColumnModal.modal {
    align-items: center;
    justify-content: center;
}

.modal-columns {
    max-width: 420px;
}

.modal-intro {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-bottom: 1rem;
}

.column-config-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.column-config-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    background: var(--card-color);
}

[data-theme="dark"] .column-config-item {
    background: rgba(15, 23, 42, 0.55);
}

.column-config-item.is-fixed {
    opacity: 0.7;
}

.column-config-order {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.column-config-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: transparent;
    color: var(--primary-color);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.column-config-btn:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.12);
}

.column-config-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.column-config-btn i {
    pointer-events: none;
}

.column-config-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
}

.column-config-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.column-config-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.column-config-footer .spacer {
    flex: 1;
}

#fichajeModal {
    padding: 0.5rem 0;
    align-items: center;
    justify-content: center;
}

#fichajeModal .modal-content {
    width: 100%;
    max-width: 540px;
    height: calc(100vh - 2rem);
    max-height: calc(100vh - 2rem);
    border-radius: 24px;
    padding: clamp(1rem, 2.5vh, 1.8rem);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 2vh, 1.25rem);
    overflow: hidden;
}

#fichajeModal .modal-header {
    margin-bottom: 0;
}

#fichajeModal .fichaje-options {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: clamp(0.6rem, 1.8vh, 1rem);
}

#fichajeModal .fichaje-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(0.6rem, 1.8vh, 0.9rem);
    border-radius: 18px;
    min-height: 130px;
    gap: clamp(0.25rem, 1vh, 0.45rem);
}

#fichajeModal .fichaje-icon {
    font-size: clamp(1.75rem, 4.5vh, 2.3rem);
    margin-bottom: 0;
}

#fichajeModal .fichaje-btn h4 {
    font-size: clamp(0.9rem, 2.1vw, 1.05rem);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#fichajeModal .form-group {
    margin: 0;
}

#fichajeModal .form-group+.form-group,
#fichajeModal .form-group+button,
#fichajeModal button+button {
    margin-top: clamp(0.5rem, 1.5vh, 0.75rem);
}


.fichaje-inline-field {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    padding: 0.6rem 0.75rem;
    border-radius: 11px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.12);
    margin-bottom: 0.25rem;
}

.fichaje-inline-field .field-label {
    font-size: clamp(0.78rem, 1.6vw, 0.95rem);
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 0 0 auto;
}

.fichaje-inline-value {
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .fichaje-inline-field {
        gap: 0.45rem;
        padding: 0.7rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .fichaje-inline-field {
        padding: 0.65rem 0.75rem;
    }
}

#fichajeModal .bottom-actions {
    display: flex;
    flex-direction: column;
    gap: clamp(0.2rem, 0.8vh, 0.35rem);
}

#fichajeModal #geoLocation {
    margin-top: clamp(0.4rem, 1vh, 0.6rem);
    justify-content: center;
    align-items: flex-start;
}

@media (max-height: 780px) {
    #fichajeModal .modal-content {
        height: calc(100vh - 2.5rem);
        max-height: calc(100vh - 2.5rem);
        padding: clamp(0.75rem, 1.6vh, 0.95rem);
        gap: clamp(0.4rem, 1.2vh, 0.65rem);
    }

    #fichajeModal .fichaje-options {
        gap: clamp(0.5rem, 1.5vh, 0.75rem);
    }

    #fichajeModal .fichaje-btn {
        padding: clamp(0.55rem, 1.3vh, 0.75rem);
        min-height: 115px;
    }

    #fichajeModal .fichaje-icon {
        font-size: clamp(1.8rem, 4vh, 2.2rem);
    }

    #fichajeModal .bottom-actions {
        gap: clamp(0.25rem, 0.7vh, 0.4rem);
    }
}

@media (max-height: 640px) {
    #fichajeModal .modal-content {
        height: calc(100vh - 2rem);
        max-height: calc(100vh - 2rem);
        padding: clamp(0.55rem, 1.4vh, 0.75rem);
    }

    #fichajeModal .fichaje-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(0.3rem, 0.9vh, 0.5rem);
    }

    #fichajeModal .fichaje-btn {
        min-height: 100px;
        gap: clamp(0.3rem, 0.9vh, 0.5rem);
    }

    #fichajeModal .fichaje-btn h4 {
        font-size: clamp(0.85rem, 2.8vw, 1rem);
    }

    #fichajeModal .modal-header h3 {
        font-size: 1.2rem;
    }
}

@media (min-width: 768px) {
    #fichajeModal {
        padding: 1.25rem 0;
    }

    #fichajeModal .modal-content {
        height: min(660px, calc(100vh - 4rem));
        max-height: min(660px, calc(100vh - 4rem));
    }
}

@media (min-width: 1024px) and (min-height: 700px) {
    #fichajeModal {
        padding: 1rem 0;
    }

    #fichajeModal .modal-content {
        max-width: 620px;
        height: min(700px, calc(100vh - 3rem));
        max-height: min(700px, calc(100vh - 3rem));
        padding: clamp(1rem, 1.8vh, 1.5rem);
    }

    #fichajeModal .fichaje-options {
        gap: clamp(0.7rem, 1.5vh, 1rem);
    }

    #fichajeModal .fichaje-btn {
        min-height: 130px;
        padding: clamp(0.75rem, 1.7vh, 1rem);
        gap: clamp(0.4rem, 1.2vh, 0.65rem);
    }

    #fichajeModal .fichaje-icon {
        font-size: clamp(1.85rem, 4.5vh, 2.4rem);
    }

    #fichajeModal .fichaje-btn h4 {
        font-size: clamp(0.9rem, 1.6vw, 1.05rem);
    }
}

@media (max-width: 480px) {
    #fichajeModal {
        align-items: flex-start;
        justify-content: center;
        padding: 0.5rem 0;
    }

    #fichajeModal .modal-content {
        width: 100%;
        max-width: none;
        height: calc(100vh - 1rem);
        height: calc(100dvh - 1rem);
        max-height: none;
        border-radius: 0;
        padding: clamp(0.75rem, 3vw, 1.25rem);
        overflow-y: auto;
    }

    #fichajeModal .fichaje-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(110px, auto);
        gap: clamp(0.55rem, 2.3vw, 0.85rem);
    }

    #fichajeModal .fichaje-btn {
        min-height: clamp(95px, 24vh, 125px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: clamp(0.3rem, 2vw, 0.45rem);
        padding: clamp(0.7rem, 3vw, 0.95rem);
    }

    #fichajeModal .fichaje-icon {
        margin-bottom: 0;
        font-size: clamp(1.6rem, 4.5vh, 2rem);
    }

    #fichajeModal .fichaje-btn h4 {
        font-size: clamp(0.85rem, 3.4vw, 1rem);
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #fichajeModal .modal-header h3 {
        font-size: 1.3rem;
    }
}

.personal-table,
.personal-incidencias {
    width: 100%;
    max-width: none;
    margin: 0;
}

.personal-table h3,
.personal-incidencias h3 {
    text-align: left;
}

.personal-table .filters {
    justify-items: start;
}

.personal-incidencias .filters {
    justify-items: start;
}

.personal-incidencias .table-scroll {
    max-height: 420px;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.personal-incidencias .table-scroll table {
    margin: 0;
}

.personal-panel-block {
    margin-bottom: 1.75rem;
}

.personal-panel-block+.personal-panel-block {
    margin-top: 1rem;
}

.personal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.personal-section-header h3 {
    margin: 0;
}

.incidencia-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.incidencia-detail-grid .full-row {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.65;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
}

.detail-value.descripcion {
    white-space: pre-line;
}

.detalle-adjunto {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.detalle-adjunto i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.acciones-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.acciones-stack-inline {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

.incidencia-estado-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.incidencias-admin-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.incidencias-admin-header .table-subtitle {
    margin: 0.35rem 0 0;
    color: rgba(15, 23, 42, 0.65);
    font-weight: 500;
}

.incidencias-admin-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    align-items: flex-end;
}

.incidencias-filter-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.incidencia-block-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.incidencia-block-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

.incidencia-block-filters .filter-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.incidencia-block {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    padding: 1.25rem;
    background: #fff;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.incidencia-block-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.incidencia-block-header h4 {
    margin: 0;
    font-size: 1.05rem;
}

.incidencia-block-header p {
    margin: 0.2rem 0 0;
    color: rgba(15, 23, 42, 0.6);
}

.incidencia-block-count {
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.12);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.incidencia-table-scroll {
    overflow-x: auto;
    max-height: 11rem;
    overflow-y: auto;
}

.incidencia-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 560px;
}

.incidencia-table th,
.incidencia-table td {
    text-align: left;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 0.9rem;
}

.incidencia-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(15, 23, 42, 0.6);
    font-weight: 700;
    background: rgba(99, 102, 241, 0.04);
}

.incidencia-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02);
}

.incidencia-table .empty-row td {
    text-align: center;
    color: rgba(15, 23, 42, 0.6);
}

.incidencia-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.incidencia-actions .btn {
    box-shadow: none;
    min-width: 34px;
    justify-content: center;
    padding: 0.4rem;
    font-size: 0.8rem;
}

.incidencia-actions .btn i {
    font-size: 0.85rem;
}

.incidencia-notes-row td {
    background: rgba(99, 102, 241, 0.05);
    border-bottom: none;
    padding-top: 0.35rem;
    padding-bottom: 0.5rem;
}

.incidencia-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.incidencia-notes-list .note-line {
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.2);
    color: rgba(15, 23, 42, 0.85);
}

.incidencia-notes-row .no-notes {
    margin: 0;
    opacity: 0.7;
}

.incidencia-notes-row.visible td {
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

@media (max-width: 768px) {
    .incidencias-filter-actions {
        justify-content: flex-start;
    }

    .incidencia-table {
        min-width: auto;
    }
}

.table-scroll-limit {
    max-height: 420px;
    overflow-y: auto;
}

.superadmin-config-card {
    background: var(--card-color);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.superadmin-config-card .config-actions {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.superadmin-facturacion-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.facturacion-card {
    background: var(--card-color);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.facturacion-list {
    max-height: 420px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.facturacion-list-item {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    align-items: baseline;
}

.facturacion-list-item.facturacion-subscription-item {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: center;
}

.facturacion-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Empresas inactivas en facturación */
.facturacion-empresa-inactiva {
    background-color: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2) !important;
}

.facturacion-empresa-inactiva .facturacion-value {
    color: #991b1b;
}

/* Badge de trial */
.badge-trial {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.facturacion-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.35rem;
}

.facturacion-label {
    font-size: 0.85rem;
    color: #6b7280;
}

.facturacion-value {
    font-weight: 600;
}

.facturacion-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.facturacion-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.superadmin-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.config-form .config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.config-form .form-input-with-default {
    position: relative;
}

.form-input-with-default {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-input-with-default .default-hint {
    position: static;
    margin-left: 0;
}

.superadmin-config-card .default-badge {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.15);
    color: #0f172a;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.superadmin-config-card .default-badge i {
    font-size: 0.65rem;
}

.default-hint {
    font-size: 0.8rem;
    color: #1d4ed8;
    margin-left: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.default-hint i {
    font-size: 0.65rem;
}

.personal-fichajes-table,
.personal-incidencias,
.personal-ausencias-list {
    margin-bottom: 1.75rem;
}

.personal-incidencias {
    margin-top: 1rem;
}

.vacaciones-section {
    margin-top: 2rem;
}

.vacaciones-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.vacaciones-range {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.vacaciones-meta {
    font-size: 0.85rem;
    opacity: 0.75;
}

.vacaciones-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.vacaciones-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vacaciones-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.vacaciones-row {
    background: rgba(99, 102, 241, 0.05);
}

.vacaciones-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* Filters */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--bg-color);
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tabs-with-arrows {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tab-scroll-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #1d4ed8;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.tab-scroll-arrow[disabled] {
    opacity: 0.3;
    cursor: default;
}

.tab-scroll-arrow[hidden] {
    display: none !important;
}


.tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    opacity: 0.6;
}

.tab:hover {
    opacity: 1;
}

.tab.active {
    opacity: 1;
    color: var(--primary-color);
    position: relative;
    border-bottom-color: var(--primary-color);
}

.tab.active::after {
    display: none;
}

.tab.active.tab-alert {
    border-bottom-color: #ef4444;
}

.tab-alert-count {
    font-size: 0.7rem;
    color: #ef4444;
    margin-left: 0.4rem;
    font-weight: 700;
}

.tab.tab-alert {
    border-bottom-color: #ef4444;
    color: #ef4444;
    opacity: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* ============================================
   MENÚ AGRUPADO CON DROPDOWNS
   ============================================ */

.tabs-grouped {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-group {
    position: relative;
}

.tab-group-trigger {
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.tab-group-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.tab-group-trigger.active {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.tab-group-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.tab-group.open .tab-group-arrow {
    transform: rotate(180deg);
}

.tab-group-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 220px;
    background: var(--card-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    padding: 0.5rem;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.tab-group.open .tab-group-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tab-group-dropdown .tab {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-bottom: none;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.tab-group-dropdown .tab:last-child {
    margin-bottom: 0;
}

.tab-group-dropdown .tab:hover {
    background: rgba(99, 102, 241, 0.08);
    opacity: 1;
}

.tab-group-dropdown .tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    color: var(--primary-color);
    opacity: 1;
    border-bottom: none;
}

.tab-group-dropdown .tab i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.tab-group-dropdown .tab-alert-count {
    margin-left: auto;
}

/* Responsive: En móviles, botones en línea y dropdowns flotantes */
@media (max-width: 768px) {
    .tabs-grouped {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
        position: relative;
        /* Contenedor de dropdowns */
    }

    .tab-group {
        width: auto;
        flex: 1;
        position: static;
        /* Para que el dropdown se posicione respecto a .tabs-grouped */
    }

    .tab-group-trigger {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 0.25rem;
        font-size: 0.85rem;
        flex-direction: column;
        /* Icono arriba, texto abajo para ahorrar espacio horizontal */
        gap: 0.25rem;
        text-align: center;
        height: 100%;
        /* Igualar alturas */
    }

    /* Ocultar flecha en móvil para limpiar diseño */
    .tab-group-arrow {
        display: none;
    }

    .tab-group-dropdown {
        position: absolute;
        top: 100%;
        /* Justo debajo de los botones */
        left: 0;
        width: 100%;
        /* Todo el ancho del contenedor padre (.tabs-grouped) */
        margin-top: 0.5rem;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(99, 102, 241, 0.2);
        z-index: 999;
        /* Asegurar que flote sobre todo */
    }

    .tab-group.open .tab-group-dropdown {
        transform: translateY(0);
    }
}


/* Geolocation Badge */
.geo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-color);
    border-radius: 50px;
    font-size: 0.9rem;
}

.geo-icon {
    color: var(--success-color);
}

/* Alert de configuración */
.config-alert {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.config-alert i {
    font-size: 2rem;
}

/* ------------------------------
           Landing pages informativas
           ------------------------------ */
.info-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.info-hero {
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
    border-radius: 32px;
    padding: clamp(2rem, 5vw, 3.5rem);
    box-shadow: var(--shadow);
}

.info-hero h2 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-hero p {
    font-size: 1.1rem;
    opacity: 0.85;
}

.hero-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.hero-note {
    font-size: 0.9rem;
    opacity: 0.75;
}

.info-section {
    background: var(--card-color);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: clamp(2rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-section h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.info-section p {
    line-height: 1.6;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.workflow-item {
    background: var(--card-color);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
}

.workflow-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.guarantee {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.1));
}

.guarantee-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.guarantee-list li {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.guarantee-list i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

.stripe-security {
    gap: 2rem;
}

.stripe-security-header p {
    margin: 0;
    line-height: 1.7;
}

.stripe-security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.stripe-security-card {
    background: var(--background-color);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.stripe-security-card h4 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.stripe-security-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.stripe-security-card li {
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.stripe-security-card li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success-color);
    font-weight: 600;
}

.stripe-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.stripe-logos span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-weight: 600;
    font-size: 0.9rem;
}

.stripe-logos i {
    font-size: 1rem;
}

.stripe-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.stripe-links li {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    line-height: 1.5;
}

.stripe-links a {
    color: var(--primary-color);
    word-break: break-word;
    font-weight: 600;
}

.stripe-links span {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (min-width: 1024px) {

    .info-grid,
    .quick-help-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .info-grid.info-grid--balanced,
    .quick-help-grid.quick-help-grid--balanced {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .stripe-links {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.quick-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.quick-help-card {
    background: var(--card-color);
    border-radius: 22px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.quick-help-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.35);
}

.quick-help-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: var(--shadow);
}

.quick-help-icon.employees {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
}

.quick-help-icon.admins {
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

.quick-help-icon.advisors {
    background: linear-gradient(135deg, #10b981, #22d3ee);
}

.preview-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.preview-card {
    background: var(--card-color);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.preview-card h5 {
    font-size: 1.05rem;
    color: var(--primary-color);
}

.screen-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.14));
    overflow: hidden;
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.screen-preview .screen-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.screen-preview .screen-header .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.5);
}

.screen-preview .screen-header .title {
    flex: 1;
    height: 12px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.4);
}

.screen-preview .screen-header .title.wide {
    width: 70%;
}

.screen-preview .screen-header .title.short {
    width: 40%;
}

.screen-preview .screen-header .badge,
.screen-preview .screen-header .chips {
    flex: 1;
    height: 14px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.35);
}

.screen-preview .screen-header .chips {
    background: repeating-linear-gradient(90deg, rgba(99, 102, 241, 0.35) 0, rgba(99, 102, 241, 0.35) 22%, transparent 22%, transparent 32%);
}

.screen-preview .screen-header .filters {
    flex: 1;
    height: 10px;
    border-radius: 6px;
    background: repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.4) 0, rgba(148, 163, 184, 0.4) 25%, transparent 25%, transparent 38%);
}

.screen-preview .screen-body {
    flex: 1;
    display: flex;
    gap: 0.75rem;
}

.screen-preview .sidebar {
    width: 12%;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.18);
}

.screen-preview .form-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}

.screen-preview .form-block.slim {
    justify-content: flex-start;
}

.screen-preview .input-line {
    height: 10px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.45);
}

.screen-preview .input-line.short {
    width: 55%;
}

.screen-preview .button-line {
    height: 12px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.55);
    margin-top: auto;
}

.screen-preview .grid {
    display: grid;
    gap: 0.35rem;
    width: 100%;
}

.screen-preview .grid.six {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(40px, 1fr);
}

.screen-preview .grid.six span {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
}

.screen-preview .list-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.screen-preview .list-line {
    height: 11px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.45);
}

.screen-preview .stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.screen-preview .stat-row span {
    height: 32px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4));
}

.screen-preview .stat-row span.ghost {
    opacity: 0.25;
}

.screen-preview .chart {
    flex: 1;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(45, 212, 191, 0.25));
}

.screen-preview .chart.slim {
    height: 40%;
}

.screen-preview .table {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.screen-preview .table.compact {
    justify-content: center;
}

.screen-preview .table .row {
    height: 16px;
    border-radius: 10px;
    background: rgba(241, 245, 249, 0.6);
}

.screen-preview .gradient-card {
    flex: 1;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(66, 153, 225, 0.4), rgba(99, 102, 241, 0.4));
}

.screen-preview .gradient-card.light {
    background: linear-gradient(145deg, rgba(250, 204, 21, 0.35), rgba(236, 72, 153, 0.35));
}

.screen-preview .toggle {
    width: 45%;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.65), rgba(59, 130, 246, 0.4));
    margin-top: 0.5rem;
}

.screen-preview.login-preview {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.25));
}

.screen-preview.fichaje-preview {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.18), rgba(20, 184, 166, 0.24));
}

.screen-preview.resumen-preview,
.screen-preview.empleados-preview,
.screen-preview.informes-preview {
    background: linear-gradient(145deg, rgba(148, 163, 184, 0.18), rgba(203, 213, 225, 0.26));
}

.screen-preview.dashboard-preview {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.2), rgba(244, 114, 182, 0.24));
}

.screen-preview.configuracion-preview {
    background: linear-gradient(145deg, rgba(234, 179, 8, 0.18), rgba(249, 115, 22, 0.24));
}

.screen-preview.superadmin-preview {
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.18), rgba(99, 102, 241, 0.26));
}

.screen-preview.relacion-preview {
    background: linear-gradient(145deg, rgba(96, 165, 250, 0.18), rgba(236, 72, 153, 0.22));
}

.info-card {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 22px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .info-card {
    background: rgba(148, 163, 184, 0.12);
}

.info-card h4 {
    font-size: 1.2rem;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.flowchart {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: stretch;
    justify-content: center;
}

.flow-step {
    flex: 1 1 220px;
    max-width: 260px;
    background: var(--card-color);
    border-radius: 22px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(99, 102, 241, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.flow-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
}

.flow-step h5 {
    font-size: 1.1rem;
}

.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary-color);
    min-width: 40px;
}

.plan-card {
    background: var(--card-color);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid rgba(99, 102, 241, 0.15);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.plan-card.highlight {
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

.plan-card h4 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.plan-card ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.plan-card ul li::before {
    content: '✔';
    color: var(--success-color);
    margin-right: 0.5rem;
}

.info-footer {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.65;
    padding-bottom: 3rem;
}

/* Responsive - eliminado para usar orientation-based layout */

@media (max-width: 600px) {
    .header {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .logo-container {
        width: 100%;
        justify-content: space-between;
    }

    .container {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .login-card {
        padding: 2rem;
    }

    .fichaje-options {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        padding: 2rem;
    }

    .modal-content {
        padding: 2rem;
    }

    .header-actions {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .main-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        margin-right: 0;
        width: 100%;
        background: var(--card-color);
        border-radius: 20px;
        padding: 1rem 1.25rem;
        box-shadow: var(--shadow);
    }

    body.nav-open .main-nav,
    .header.nav-open .main-nav {
        display: flex;
        gap: 0.75rem;
        margin-top: 0.5rem;
    }

    .main-nav .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.65rem 0.75rem;
    }

    .header-actions>.server-status {
        order: 2;
    }

    /* Botones compactos en móvil - solo iconos */
    .profile-button,
    .btn-danger {
        padding: 0.65rem;
        font-size: 0;
        min-width: 40px;
        justify-content: center;
    }

    .profile-button i,
    .btn-danger i {
        margin-right: 0;
        font-size: 1.1rem;
    }

    .theme-toggle {
        padding: 0.65rem;
        min-width: 40px;
    }

    .server-status {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        cursor: help;
    }

    .server-status #serverStatusText {
        display: none;
    }

    /* Mostrar icono de enchufe en lugar de punto en mobile */
    .server-status .status-dot {
        display: none;
    }

    .server-status::before {
        content: '\f1e6';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 1rem;
    }

    .auth-status {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        cursor: help;
    }

    .auth-status #authStatusText {
        display: none;
    }

    /* Mostrar solo icono de reloj en mobile para auth-status */
    .auth-status .auth-dot {
        display: none;
    }

    .auth-status::before {
        content: '\f017';
        font-family: 'Font Awesome 6 Free';
        font-weight: 400;
        font-size: 1rem;
    }

    .info-container {
        padding: 2rem 1.25rem;
    }

    .plan-grid {
        grid-template-columns: 1fr;
    }

    .quick-help-grid {
        grid-template-columns: 1fr;
    }

    .preview-gallery {
        grid-template-columns: 1fr;
    }

    .quick-help-card {
        align-items: flex-start;
    }

    .flowchart {
        flex-direction: column;
        align-items: stretch;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .flow-step {
        max-width: none;
    }

    .info-hero {
        padding: 2.5rem 1.5rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--bg-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Settings Panel */
.color-picker-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.color-picker-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-input {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.widget-style-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.widget-style-heading {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
}

.widget-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.color-picker-composite .composite-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
}

.color-picker-composite .color-input {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.opacity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.opacity-control input[type="range"] {
    flex: 1;
    accent-color: var(--primary-color);
}

.opacity-value {
    min-width: 3ch;
    text-align: right;
    font-weight: 600;
}

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.server-status.online {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.server-status.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: var(--success-color);
}

.status-dot.offline {
    background: var(--danger-color);
}

/* Auth Status Indicator */
.auth-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: help;
}

.auth-status.authenticated {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.auth-status.expired {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.auth-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.auth-dot.authenticated {
    background: #6366f1;
    animation: pulse 2s infinite;
}

.auth-dot.expired {
    background: #f59e0b;
}

.detalle-adjunto-actions {
    display: flex;
    gap: 0.35rem;
}

.visor-modal {
    max-width: 90vw;
    width: 100%;
    height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.visor-modal .modal-header {
    padding: 1rem 1.5rem;
    width: 100%;
}

.visor-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.visor-body {
    flex: 1;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 1rem;
}

.visor-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.visor-pdf {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* Facturación Cliente - Panel Admin */
.facturacion-cliente-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.facturacion-cliente-card {
    background: var(--card-color);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.facturacion-cliente-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

.facturacion-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.facturacion-plan-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.facturacion-plan-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.facturacion-estado-badge {
    display: flex;
    gap: 0.5rem;
}

.facturacion-desglose {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.facturacion-desglose-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.facturacion-desglose-row.facturacion-subtotal {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

.facturacion-desglose-row.facturacion-total {
    border-top: 2px solid rgba(0, 0, 0, 0.15);
    padding-top: 1rem;
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.facturacion-desglose-row.facturacion-descuento {
    color: var(--success-color);
}

.facturacion-desglose-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
}

.facturacion-amount {
    font-weight: 600;
    color: var(--text-color);
}

.facturacion-amount-large {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.facturacion-discount {
    font-weight: 600;
    color: var(--success-color);
}

.facturacion-count {
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.facturacion-trial-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
    border-radius: 8px;
    color: #1e40af;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.facturacion-alert {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 18px;
    border: 1px solid rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.15);
    color: #92400e;
    font-size: 0.95rem;
}

.facturacion-alert i {
    font-size: 1.2rem;
}

.facturacion-alert-body p {
    margin: 0.15rem 0 0;
}

.facturacion-alert-warning {
    border-color: rgba(251, 191, 36, 0.6);
    background: rgba(251, 191, 36, 0.15);
}

.facturacion-alert-error {
    border-color: rgba(248, 113, 113, 0.7);
    background: rgba(248, 113, 113, 0.18);
    color: #991b1b;
}

.facturacion-alert-info {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(59, 130, 246, 0.12);
    color: #1e3a8a;
}

.facturacion-metodo-resumen {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.facturacion-metodo-info {
    flex: 1;
}

.facturacion-metodo-value {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0.25rem 0;
}

.facturacion-metodo-state {
    font-size: 0.9rem;
    font-weight: 500;
}

.facturacion-metodo-state.state-success {
    color: #15803d;
}

.facturacion-metodo-state.state-warning {
    color: #92400e;
}

.facturacion-metodo-state.state-error {
    color: #b91c1c;
}

.facturacion-metodo-actions {
    display: flex;
    gap: 0.75rem;
}

.facturacion-cupones-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.facturacion-cupon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.facturacion-cupon-codigo {
    font-weight: 600;
    font-family: monospace;
    color: var(--success-color);
}

.facturacion-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.facturacion-label {
    font-size: 0.8rem;
    color: #6b7280;
    display: block;
    margin-bottom: 0.25rem;
}

.facturacion-value {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
}

.facturacion-note {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #92400e;
}

.facturacion-note i {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.facturacion-cliente-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.facturacion-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Historial de Facturas */
.facturacion-invoices-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.facturacion-invoices-table thead {
    background: rgba(0, 0, 0, 0.03);
}

.facturacion-invoices-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: #666;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.facturacion-invoices-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.facturacion-invoices-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.facturacion-invoice-number {
    font-weight: 600;
    color: var(--primary-color);
}

.facturacion-invoice-period {
    font-size: 0.85rem;
    color: #666;
}

.facturacion-invoice-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.facturacion-invoice-status.paid {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.facturacion-invoice-status.open {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.facturacion-invoice-status.draft {
    background: rgba(156, 163, 175, 0.1);
    color: #6b7280;
}

.facturacion-invoice-status.void {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.facturacion-invoice-status.uncollectible {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.facturacion-invoice-amount {
    font-weight: 600;
    font-size: 1.1rem;
}

.facturacion-empty-invoices {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.facturacion-empty-invoices i {
    font-size: 3rem;
    color: rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.facturacion-empty-invoices h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #333;
}

.facturacion-empty-invoices p {
    margin: 0;
    font-size: 0.9rem;
}

.fichaje-last-info {
    font-size: 0.85rem;
    color: #475569;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* ============================================
   SISTEMA DE TICKETS DE SOPORTE
   ============================================ */

/* Container principal */
.soporte-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header del soporte */
.soporte-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.soporte-header h2 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.75rem;
}

.soporte-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

/* Filtros de estado */
.soporte-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: #64748b;
}

.filter-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn i {
    margin-right: 0.25rem;
}

/* Lista de tickets */
.tickets-list {
    display: grid;
    gap: 1rem;
}

.ticket-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ticket-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ticket-card-numero {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
}

.ticket-card-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ticket-card-asunto {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.ticket-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
    flex-wrap: wrap;
}

.ticket-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ticket-card-meta i {
    font-size: 0.8rem;
}

/* Badges de estado */
.ticket-estado-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-pendiente {
    background: #fef3c7;
    color: #92400e;
}

.estado-en-proceso {
    background: #dbeafe;
    color: #1e40af;
}

.estado-esperando {
    background: #fce7f3;
    color: #9f1239;
}

.estado-resuelto {
    background: #d1fae5;
    color: #065f46;
}

.estado-cerrado {
    background: #e5e7eb;
    color: #374151;
}

.estado-cancelado {
    background: #fee2e2;
    color: #991b1b;
}

/* Badges de prioridad */
.ticket-prioridad-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.prioridad-urgente {
    background: #fee2e2;
    color: #991b1b;
}

.prioridad-alta {
    background: #fed7aa;
    color: #9a3412;
}

.prioridad-media {
    background: #e5e7eb;
    color: #374151;
}

.prioridad-baja {
    background: #dbeafe;
    color: #1e40af;
}

/* Detalle del ticket */
.ticket-detalle-header {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.ticket-detalle-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.ticket-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.ticket-meta-item i {
    color: #94a3b8;
}

.ticket-descripcion {
    margin-bottom: 1.5rem;
}

.ticket-descripcion h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #1e293b;
}

/* Archivos adjuntos */
#ticketArchivosContainer h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #1e293b;
}

.ticket-archivos-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ticket-archivo-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.ticket-archivo-item i {
    font-size: 1.5rem;
    color: #6366f1;
}

.archivo-nombre {
    flex: 1;
    font-size: 0.9rem;
    color: #1e293b;
}

.archivo-tamano {
    font-size: 0.8rem;
    color: #64748b;
}

/* Notas del ticket */
.ticket-notas-container {
    margin-top: 2rem;
}

.ticket-notas-container h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #1e293b;
}

.ticket-notas-hilo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ticket-nota {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #6366f1;
    border-radius: 6px;
    padding: 1rem;
}

.ticket-nota.nota-empresa {
    border-left-color: #6366f1;
    background: #f8fafc;
}

.ticket-nota.nota-admin {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.nota-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.nota-header strong {
    color: #1e293b;
}

.badge-admin {
    background: #10b981;
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nota-fecha {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.8rem;
}

.nota-contenido {
    color: #1e293b;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Formulario nueva nota */
.ticket-nueva-nota {
    background: white;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 1rem;
}

.ticket-nueva-nota textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    font-family: inherit;
    resize: vertical;
}

.ticket-nueva-nota textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ============================================
   PANEL SUPERADMIN - TICKETS
   ============================================ */

.soporte-superadmin-container {
    padding: 2rem;
}

.soporte-superadmin-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.soporte-superadmin-header h2 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.75rem;
}

/* Estadísticas */
.soporte-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-pendiente .stat-icon {
    background: #fef3c7;
    color: #92400e;
}

.stat-proceso .stat-icon {
    background: #dbeafe;
    color: #1e40af;
}

.stat-esperando .stat-icon {
    background: #fce7f3;
    color: #9f1239;
}

.stat-urgente .stat-icon {
    background: #fee2e2;
    color: #991b1b;
}

.stat-resuelto .stat-icon {
    background: #d1fae5;
    color: #065f46;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Filtros y búsqueda */
.soporte-filters-container {
    margin-bottom: 2rem;
}

.soporte-search {
    position: relative;
    margin-bottom: 1rem;
}

.soporte-search input {
    width: 100%;
    padding-left: 2.5rem;
}

.soporte-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.soporte-filters-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.soporte-filters-row select {
    flex: 1;
    min-width: 150px;
}

/* Controles de admin */
.ticket-admin-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 2px solid #e5e7eb;
}

.admin-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-control-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

.admin-control-group select {
    font-size: 0.9rem;
}

/* Nota interna */
.ticket-nota.nota-interna {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.ticket-nota.nota-interna::before {
    content: "🔒 Nota Interna";
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-empresa-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================================================
   CONFIGURACIÓN DEL SISTEMA - SUPERADMIN
   ============================================================================ */

/* Header de configuración */
.config-header {
    padding: 2rem 0 1rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.config-header h2 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.config-header p {
    margin: 0;
    color: #6b7280;
    font-size: 1rem;
}

/* Tabs de categorías de configuración */
.config-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.config-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    top: 2px;
}

.config-tab:hover {
    color: #4f46e5;
    background: #f9fafb;
}

.config-tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    background: transparent;
}

/* Contenido de categorías */
.config-categoria-content {
    animation: fadeIn 0.3s ease;
}

/* Sección de configuración */
.config-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.config-section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.config-section-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.config-section-header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Grid de campos */
.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.config-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.config-field {
    display: flex;
    flex-direction: column;
}

.config-field.full-width {
    grid-column: 1 / -1;
}

.config-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.config-field small {
    display: block;
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.8rem;
}

.config-field small a {
    color: #4f46e5;
    text-decoration: underline;
}

.config-field small a:hover {
    color: #4338ca;
}

/* Toggle switch */
.config-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    transition: background 0.2s ease;
    justify-content: flex-start;
}

.config-toggle:hover {
    background: #f3f4f6;
}

.config-toggle-state {
    order: 3;
    margin-left: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(15, 23, 42, 0.05);
    color: #4b5563;
    transition: background 0.3s ease, color 0.3s ease;
}

.config-toggle input:checked+.config-toggle-slider+.config-toggle-label+.config-toggle-state {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.15);
}

.config-toggle-state::before {
    content: 'OFF';
}

.config-toggle input:checked+.config-toggle-slider+.config-toggle-label+.config-toggle-state::before {
    content: 'ON';
}

.config-toggle input:checked+.config-toggle-slider+.config-toggle-label {
    color: #0f172a;
    font-weight: 700;
}

.config-toggle input:not(:checked)+.config-toggle-slider+.config-toggle-label {
    color: #4b5563;
}

.config-toggle input[type="checkbox"] {
    display: none;
}

.config-toggle-slider {
    order: 1;
    position: relative;
    width: 64px;
    height: 28px;
    background: #9ca3af;
    border-radius: 28px;
    transition: background 0.3s ease;
    flex-shrink: 0;
    margin-left: 0;
    margin-right: 1rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.config-toggle-slider::before {
    content: 'OFF';
    position: absolute;
    top: 50%;
    left: 32%;
    transform: translate(-50%, -50%);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

.config-toggle-slider::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 3px 6px rgba(15, 23, 42, 0.3);
}

.config-toggle input:checked+.config-toggle-slider {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.config-toggle input:checked+.config-toggle-slider::after {
    transform: translateX(32px);
}

.config-toggle input:checked+.config-toggle-slider::before {
    content: 'ON';
    color: #ffffff;
    left: 68%;
}

.config-toggle input:checked+.config-toggle-slider::before {
    left: 68%;
}

.config-toggle-label {
    order: 2;
    flex: 1;
    font-weight: 600;
    color: #0f172a;
}

/* Estilos para modal Importar/Exportar empleados */
.import-export-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.import-export-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.import-export-tab:hover {
    color: #3b82f6;
    background-color: #f1f5f9;
}

.import-export-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.import-export-tab-content {
    display: none;
}

.import-export-tab-content.active {
    display: block;
}

.drop-zone {
    border: 3px dashed #cbd5e1;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.drop-zone:hover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.drop-zone.drag-over {
    border-color: #3b82f6;
    background-color: #dbeafe;
    transform: scale(1.02);
}

.drop-zone i {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.drop-zone p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.file-info i {
    font-size: 2rem;
    color: #3b82f6;
}

.file-info div {
    flex: 1;
}

.file-info strong {
    display: block;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.file-info span {
    color: #64748b;
    font-size: 0.875rem;
}

.file-info button {
    padding: 0.5rem 1rem;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.file-info button:hover {
    background-color: #dc2626;
}

.import-options {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.import-options h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #0f172a;
    font-size: 1rem;
}

.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.radio-label:hover {
    background-color: #f1f5f9;
}

.radio-label input[type="radio"] {
    margin-top: 0.25rem;
    cursor: pointer;
}

.radio-label div strong {
    display: block;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.radio-label div small {
    color: #64748b;
    display: block;
    line-height: 1.4;
}

.help-section {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-top: 1.5rem;
}

.help-section h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #1e40af;
    font-size: 0.95rem;
}

.help-section ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    color: #1e40af;
}

.help-section li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: #f8fafc;
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.stat-card.success {
    background-color: #f0fdf4;
    border-color: #86efac;
}

.stat-card.warning {
    background-color: #fffbeb;
    border-color: #fde047;
}

.stat-card.danger {
    background-color: #fef2f2;
    border-color: #fca5a5;
}

.stat-card.muted {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card.success .stat-value {
    color: #16a34a;
}

.stat-card.warning .stat-value {
    color: #ca8a04;
}

.stat-card.danger .stat-value {
    color: #dc2626;
}

.stat-card.muted .stat-value {
    color: #64748b;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.error-list {
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.error-list h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #dc2626;
    font-size: 0.95rem;
}

.error-list ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #991b1b;
}

.error-list li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Campo de password con toggle */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    flex: 1;
    padding-right: 3rem;
}

.btn-toggle-password {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3rem;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.btn-toggle-password:hover {
    color: #4f46e5;
}

/* Botones de acción */
.config-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.config-actions .btn {
    min-width: 180px;
}

/* Responsive */
@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }

    .config-tabs {
        flex-direction: column;
        border-bottom: none;
    }

    .config-tab {
        border-bottom: 1px solid #e5e7eb;
        border-left: 3px solid transparent;
        top: 0;
    }

    .config-tab.active {
        border-left-color: #4f46e5;
        border-bottom-color: #e5e7eb;
    }

    .config-actions {
        flex-direction: column;
    }

    .config-actions .btn {
        width: 100%;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   EDITOR DE PLANTILLAS DE EMAIL
   ============================================================================ */

/* Contenedor de plantillas */
.templates-container {
    padding: 1rem 0;
}

/* Grid de plantillas */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Tarjeta de plantilla */
.template-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.template-card.inactive {
    opacity: 0.6;
    background: #f9fafb;
}

.template-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.template-card-header h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.badge-sistema,
.badge-inactive {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-sistema {
    background: #dbeafe;
    color: #1e40af;
}

.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.template-description {
    margin: 0 0 1rem;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

.template-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.template-codigo,
.template-vars {
    font-size: 0.85rem;
    color: #6b7280;
}

.template-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.template-footer small {
    color: #9ca3af;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.template-autosave-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0f172a;
    background: #eef2ff;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}

.template-autosave-status.pending {
    color: #0ea5e9;
    background: #e0f2fe;
}

.template-autosave-status.saving {
    color: #0f172a;
    background: #dbeafe;
}

.template-autosave-status.error {
    color: #dc2626;
    background: #fee2e2;
}

.autosave-spinner {
    font-size: 0.75rem;
    display: none;
    animation: autosaveSpin 0.8s linear infinite;
}

.template-autosave-status.saving .autosave-spinner,
.template-autosave-status.pending .autosave-spinner {
    display: inline-block;
}

@keyframes autosaveSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.btn-icon {
    background: transparent;
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.125rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #f3f4f6;
    border-color: #6366f1;
    transform: scale(1.05);
}

/* Layout del editor (2 columnas) */
.template-editor-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.template-editor-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.templates-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.templates-toolbar .helper-text {
    margin: 0.25rem 0 0;
    color: #475467;
    font-size: 0.9rem;
}

.event-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.event-card {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 160px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.event-card h4 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
}

.event-recipient {
    margin: 0;
    font-size: 0.75rem;
    color: #475467;
}

.event-card p {
    margin: 0;
    color: #475467;
    font-size: 0.85rem;
}

.event-card ul {
    margin: 0;
    padding: 0.25rem 0 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.event-card li {
    font-size: 0.75rem;
    color: #475467;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}

.event-card button {
    margin-top: auto;
    align-self: flex-start;
}

.templates-container {
    border: 1px dashed #c4c9d9;
    border-radius: 12px;
    padding: 1.75rem;
    background: #f8f9ff;
}

.templates-list {
    min-height: 200px;
}

.template-editor-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Textarea de HTML */
.template-html-editor {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 300px;
}

/* Sección de branding */
.branding-section {
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.branding-section h4 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.branding-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.color-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-input-group input[type="color"] {
    width: 50px;
    height: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
}

.color-input-group .color-hex {
    flex: 1;
    text-transform: uppercase;
}

/* Panel de variables */
.variables-panel {
    padding: 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

.variables-panel h4 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.variables-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.variable-tag {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Monaco', 'Menlo', monospace;
    color: #6366f1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variable-tag:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
    transform: translateY(-1px);
}

.help-text {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Acciones de vista previa */
.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-block {
    width: 100%;
}

/* Modal largo para editor */
.modal-large .modal-content {
    max-width: 1200px;
}

/* Vista previa de email */
.preview-subject {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

.preview-subject strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.9rem;
}

.preview-subject p {
    margin: 0;
    font-size: 1rem;
    color: #1f2937;
    font-weight: 500;
}

.preview-frame {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.billing-dashboard-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(15, 23, 42, 0.06);
    margin-bottom: 24px;
}

.billing-dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.billing-summary-card {
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.billing-summary-card span {
    font-size: 13px;
    color: #6b7280;
}

.billing-summary-card strong {
    font-size: 24px;
    color: #111827;
}

.billing-dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 1.5fr;
    gap: 20px;
}

@media (max-width: 1200px) {
    .billing-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.billing-board-panel {
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 16px;
    background: #fafafa;
}

.billing-board-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.billing-companies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.billing-companies-table th,
.billing-companies-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #e5e7eb;
}

.billing-companies-table th {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11px;
    color: #6b7280;
}

.company-name span {
    font-size: 11px;
    color: #6b7280;
}

.pending-invoices-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pending-invoices-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.pending-invoices-list .invoice-date {
    display: block;
    font-size: 12px;
    color: #9ca3af;
}

.badge {
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-info {
    background: #e0f2fe;
    color: #0c4a6e;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.empty-state.error {
    color: #b91c1c;
}

.analysis-container {
    background: #fff;
    padding: 1.5rem;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.analysis-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group--button {
    display: flex;
    align-items: flex-end;
}

.heatmap-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1rem;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.heatmap-summary {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.heatmap-summary-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.heatmap-summary-controls .toggle-option {
    font-size: 0.85rem;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.heatmap-summary-controls input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #94a3b8;
}

.heatmap-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.legend-gradient {
    width: 120px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa, #fcd34d, #f87171);
}

.heatmap-scroll {
    overflow-x: auto;
}

@media (min-width: 1024px) {
    .heatmap-scroll {
        overflow-x: hidden;
    }
}

.heatmap-scroll--vertical {
    max-height: 520px;
    overflow-y: auto;
}

.heatmap-scroll--vertical::-webkit-scrollbar {
    width: 8px;
}

.heatmap-scroll--vertical::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.6);
    border-radius: 999px;
}

.heatmap-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
}

.heatmap-table thead th {
    position: sticky;
    top: 0;
    background: #f3f4f6;
    z-index: 1;
}

.heatmap-table th,
.heatmap-table td {
    padding: 6px 4px;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    min-width: 42px;
}

.heatmap-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.heatmap-cell {
    border-radius: 6px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
}

.heatmap-cell--clickable {
    cursor: pointer;
}

.heatmap-cell--clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.heatmap-detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-accordion {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background: #fdfdfd;
}

.detail-accordion summary {
    font-weight: 600;
    cursor: pointer;
}

.detail-fichajes {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-fichaje-row {
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 10px;
    padding: 0.75rem;
    background: #fff;
}

.detail-fichaje-row .chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.chip--warning {
    background: #fef3c7;
    color: #92400e;
}

.chip--info {
    background: #dbeafe;
    color: #1e3a8a;
}

.chip--light {
    background: #f1f5f9;
    color: #475569;
}

.detail-fichaje-row .comment {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #475569;
}

/* Responsive */
@media (max-width: 1024px) {
    .template-editor-layout {
        grid-template-columns: 1fr;
    }

    .templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .branding-grid {
        grid-template-columns: 1fr;
    }

    .templates-grid {
        grid-template-columns: 1fr;
    }
}

.auth-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 40%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-layout {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.auth-card h1 {
    margin-bottom: 0.75rem;
    font-size: 2rem;
}

.auth-form .form-group {
    text-align: left;
}

.heatmap-table--summary th,
.heatmap-table--summary td {
    font-size: 0.8rem;
}

.heatmap-table--summary td {
    border-radius: 6px;
    min-width: 48px;
}

.heatmap-cell--summary span {
    display: block;
    font-weight: 600;
}

/* Small Grid for Incident Selector */
.fichaje-options.small-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
    .fichaje-options.small-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Ensure close button is always visible in modals */
#fichajeModal .close-modal,
#incidenciaModal .close-modal {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(0, 0, 0, 0.15);
    font-size: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
}

[data-theme="dark"] #fichajeModal .close-modal,
[data-theme="dark"] #incidenciaModal .close-modal {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Create X using pseudo-elements */
#fichajeModal .close-modal::before,
#fichajeModal .close-modal::after,
#incidenciaModal .close-modal::before,
#incidenciaModal .close-modal::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2.5px;
    background: #1e293b;
    border-radius: 2px;
}

[data-theme="dark"] #fichajeModal .close-modal::before,
[data-theme="dark"] #fichajeModal .close-modal::after,
[data-theme="dark"] #incidenciaModal .close-modal::before,
[data-theme="dark"] #incidenciaModal .close-modal::after {
    background: #f8fafc;
}

#fichajeModal .close-modal::before,
#incidenciaModal .close-modal::before {
    transform: rotate(45deg);
}

#fichajeModal .close-modal::after,
#incidenciaModal .close-modal::after {
    transform: rotate(-45deg);
}

/* Hover state */
#fichajeModal .close-modal:hover,
#incidenciaModal .close-modal:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    transform: rotate(90deg);
}

#fichajeModal .close-modal:hover::before,
#fichajeModal .close-modal:hover::after,
#incidenciaModal .close-modal:hover::before,
#incidenciaModal .close-modal:hover::after {
    background: #dc2626;
}

[data-theme="dark"] #fichajeModal .close-modal:hover,
[data-theme="dark"] #incidenciaModal .close-modal:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] #fichajeModal .close-modal:hover::before,
[data-theme="dark"] #fichajeModal .close-modal:hover::after,
[data-theme="dark"] #incidenciaModal .close-modal:hover::before,
[data-theme="dark"] #incidenciaModal .close-modal:hover::after {
    background: #f87171;
}

/* Hide the icon */
#fichajeModal .close-modal i,
#incidenciaModal .close-modal i {
    display: none;
}

#fichajeModal .modal-header,
#incidenciaModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

/* Mejorar visibilidad de botones de acción en incidencias */
.incidencia-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.incidencia-actions .btn-xs {
    min-width: 38px;
    min-height: 38px;
    padding: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.3rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.incidencia-actions .btn-outline {
    background: rgba(99, 102, 241, 0.1);
    border: 1.5px solid rgba(99, 102, 241, 0.3);
}

.incidencia-actions .btn-outline:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}

.incidencia-actions .btn-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1.5px solid rgba(16, 185, 129, 0.4);
}

.incidencia-actions .btn-success:hover {
    background: var(--success-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.incidencia-actions .btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
}

.incidencia-actions .btn-danger:hover {
    background: var(--danger-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}