
:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --dark: #1F2937;
    --gray: #6B7280;
    --light: #F9FAFB;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark);
    line-height: 1.6;
}


    /* ==========================================
       ESTILOS PROFESIONALES DEL LOGIN
    ========================================== */
    
    .login-container {
        display: flex;
        min-height: 100vh;
        background: #ffffff;
    }

    /* PANEL IZQUIERDO */
    .login-left {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 60px 80px;
        max-width: 600px;
        position: relative;
        overflow-y: auto;
    }

    .login-brand {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 50px;
    }

    .brand-icon {
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: white;
        box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    }

    .brand-text {
        display: flex;
        flex-direction: column;
    }

    .brand-name {
        font-size: 24px;
        font-weight: 700;
        color: #111827;
        line-height: 1;
        letter-spacing: -0.5px;
    }

    .brand-product {
        font-size: 14px;
        font-weight: 600;
        color: #4F46E5;
        letter-spacing: 2px;
        text-transform: uppercase;
    }

    .login-header {
        margin-bottom: 40px;
    }

    .login-title {
        font-size: 32px;
        font-weight: 700;
        color: #111827;
        margin: 0 0 12px 0;
        letter-spacing: -0.5px;
    }

    .login-subtitle {
        font-size: 16px;
        color: #6B7280;
        margin: 0;
        line-height: 1.5;
    }

    .login-form {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .form-label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 8px;
    }

    .form-label i {
        font-size: 12px;
        color: #9CA3AF;
    }

    .form-input {
        width: 100%;
        padding: 14px 16px;
        font-size: 15px;
        border: 2px solid #E5E7EB;
        border-radius: 10px;
        transition: all 0.3s ease;
        font-family: 'Inter', sans-serif;
        background: #F9FAFB;
    }

    .form-input:focus {
        outline: none;
        border-color: #4F46E5;
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

    .password-input-wrapper {
        position: relative;
    }

    .password-toggle {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #9CA3AF;
        cursor: pointer;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.2s;
    }

    .password-toggle:hover {
        color: #4F46E5;
    }

    .forgot-password {
        font-size: 13px;
        color: #4F46E5;
        text-decoration: none;
        font-weight: 600;
        transition: color 0.2s;
    }

    .forgot-password:hover {
        color: #4338CA;
        text-decoration: underline;
    }

    .checkbox-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        user-select: none;
    }

    .checkbox-wrapper input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: #4F46E5;
    }

    .checkbox-label {
        font-size: 14px;
        color: #6B7280;
        font-weight: 500;
    }

    .btn-login-primary {
        width: 100%;
        padding: 16px 24px;
        background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
    }

    .btn-login-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
    }

    .btn-login-primary:active {
        transform: translateY(0);
    }

    .btn-icon {
        transition: transform 0.3s ease;
    }

    .btn-login-primary:hover .btn-icon {
        transform: translateX(4px);
    }

    .login-divider {
        display: flex;
        align-items: center;
        text-align: center;
        margin: 30px 0;
    }

    .login-divider::before,
    .login-divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #E5E7EB;
    }

    .login-divider span {
        padding: 0 16px;
        color: #9CA3AF;
        font-size: 13px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .social-login {
        display: flex;
        gap: 12px;
    }

    .btn-social {
        flex: 1;
        padding: 14px 20px;
        background: white;
        border: 2px solid #E5E7EB;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        color: #374151;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        transition: all 0.3s ease;
    }

    .btn-social:hover {
        border-color: #4F46E5;
        background: #F9FAFB;
        transform: translateY(-2px);
    }

    .login-footer {
        margin-top: 40px;
        text-align: center;
    }

    .footer-text {
        font-size: 14px;
        color: #6B7280;
        margin: 0;
    }

    .footer-link {
        color: #4F46E5;
        text-decoration: none;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: all 0.2s;
    }

    .footer-link:hover {
        color: #4338CA;
        gap: 10px;
    }

    /* PANEL DERECHO */
    .login-right {
        flex: 1;
        background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4C1D95 100%);
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 60px;
    }

    .features-bg-animation {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            radial-gradient(circle at 20% 50%, rgba(167, 139, 250, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 40% 10%, rgba(196, 181, 253, 0.1) 0%, transparent 50%);
        animation: bgShift 15s ease-in-out infinite;
    }

    @keyframes bgShift {
        0%, 100% { opacity: 0.5; transform: scale(1); }
        50% { opacity: 0.8; transform: scale(1.1); }
    }

    .features-content {
        position: relative;
        z-index: 2;
        max-width: 500px;
        color: white;
    }

    .features-icon {
        width: 80px;
        height: 80px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 36px;
        margin-bottom: 30px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .features-title {
        font-size: 40px;
        font-weight: 700;
        margin: 0 0 20px 0;
        line-height: 1.2;
        letter-spacing: -1px;
    }

    .features-description {
        font-size: 18px;
        line-height: 1.6;
        opacity: 0.9;
        margin-bottom: 40px;
    }

    .features-list {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-bottom: 40px;
    }

    .feature-item {
        display: flex;
        align-items: start;
        gap: 16px;
        padding: 20px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }

    .feature-item:hover {
        background: rgba(255, 255, 255, 0.12);
        transform: translateX(8px);
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        flex-shrink: 0;
    }

    .feature-text {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .feature-text strong {
        font-size: 16px;
        font-weight: 600;
    }

    .feature-text span {
        font-size: 14px;
        opacity: 0.8;
    }

    .testimonial {
        padding: 30px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(10px);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
    }

    .quote-icon {
        position: absolute;
        top: 20px;
        left: 20px;
        font-size: 24px;
        opacity: 0.3;
    }

    .testimonial-text {
        font-size: 15px;
        line-height: 1.6;
        opacity: 0.9;
        margin: 0 0 20px 0;
        padding-left: 40px;
    }

    .testimonial-author {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .testimonial-author strong {
        font-size: 15px;
        font-weight: 600;
    }

    .testimonial-author span {
        font-size: 13px;
        opacity: 0.7;
    }

    /* RESPONSIVE */
    @media (max-width: 1024px) {
        .login-right {
            display: none;
        }
        
        .login-left {
            max-width: 100%;
            padding: 40px;
        }
    }

    @media (max-width: 640px) {
        .login-left {
            padding: 30px 24px;
        }

        .login-title {
            font-size: 26px;
        }

        .brand-name {
            font-size: 20px;
        }
    }

    /* ANIMACIONES DE ENTRADA */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .login-left > * {
        animation: fadeInUp 0.6s ease-out backwards;
    }

    .login-brand { animation-delay: 0.1s; }
    .login-header { animation-delay: 0.2s; }
    .login-form { animation-delay: 0.3s; }
    .login-divider { animation-delay: 0.4s; }
    .social-login { animation-delay: 0.5s; }
    .login-footer { animation-delay: 0.6s; }


.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--gray);
    font-size: 14px;
    z-index: 1;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

.input-icon-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #818CF8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-google {
    background: white;
    color: var(--dark);
    border: 2px solid var(--border);
    margin-top: 15px;
}

.btn-google:hover {
    background: var(--light);
    border-color: var(--gray);
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: var(--gray);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.login-right {
    flex: 1.2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-right::before {
    content: '';
    position: absolute;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: moveGrid 20s linear infinite;
}

@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

/* ============================================
   MODAL DE CONFIRMACIÃ"N PROFESIONAL
   ============================================ */

.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.confirm-modal.show {
    display: flex;
}

.confirm-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirm-header {
    padding: 30px 30px 20px;
    text-align: center;
}

.confirm-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.confirm-icon.warning {
    background: #FEF2F2;
    color: var(--danger);
}

.confirm-icon.info {
    background: #EFF6FF;
    color: var(--info);
}

.confirm-icon.success {
    background: #ECFDF5;
    color: var(--success);
}

.confirm-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.confirm-message {
    font-size: 15px;
    color: var(--gray);
    line-height: 1.6;
    padding: 0 20px;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    padding: 25px 30px 30px;
    background: var(--light);
}

.confirm-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

.btn-confirm-yes {
    background: var(--danger);
    color: white;
}

.btn-confirm-yes:hover {
    background: #DC2626;
    transform: translateY(-2px);
}

.btn-confirm-no {
    background: white;
    color: var(--dark);
    border: 2px solid var(--border);
}

.btn-confirm-no:hover {
    background: var(--light);
}

/* Toast Notifications Mejoradas */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 400px;
    z-index: 10001;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutRight {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--info); }

.toast i:first-child {
    font-size: 24px;
}

.toast-success i:first-child { color: var(--success); }
.toast-error i:first-child { color: var(--danger); }
.toast-warning i:first-child { color: var(--warning); }
.toast-info i:first-child { color: var(--info); }

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Login */
@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-right {
        flex: 0;
        min-height: 200px;
    }
    
    .login-left {
        flex: 1;
    }
}


        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--dark);
            font-size: 14px;
        }

        .input-icon-wrapper {
            position: relative;
        }

        .input-icon-wrapper i {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray);
        }

        .form-group input, .form-group select, .form-group textarea {
            width: 100%;
            padding: 12px 16px 12px 40px;
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 15px;
            transition: all 0.2s;
            background-color: #FAFAFA;
        }
        
        select, textarea, input[type="date"], input[type="number"], input.no-icon {
            padding-left: 16px !important;
        }

        .form-group input:focus, .form-group textarea:focus {
            outline: none;
            border-color: var(--primary);
            background-color: white;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .btn {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
            box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
        }

        .btn-primary:hover {
            background-color: var(--primary-dark);
            transform: translateY(-1px);
        }

        .btn-ai {
            background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
            color: white;
            border: none;
            font-size: 13px;
            padding: 8px 16px;
            width: auto;
            display: inline-flex;
        }
        
        .btn-ai:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
        }

        .btn-google {
            background: white;
            border: 1px solid var(--border);
            color: var(--dark);
            margin-top: 15px;
        }

        .btn-google:hover {
            background: var(--light);
        }

        .btn-secondary {
            background: var(--gray);
            color: white;
        }

        .btn-success {
            background: var(--success);
            color: white;
        }

        .btn-danger {
            background: var(--danger);
            color: white;
        }

        .divider {
            display: flex;
            align-items: center;
            text-align: center;
            margin: 25px 0;
            color: var(--gray);
            font-size: 13px;
        }
        .divider::before, .divider::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid var(--border);
        }
        .divider:not(:empty)::before { margin-right: .5em; }
        .divider:not(:empty)::after { margin-left: .5em; }

        /* Alert Box */
        .alert {
            padding: 12px 16px;
            border-radius: 8px;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
        }

        .alert-success {
            background: #ECFDF5;
            color: var(--success);
            border: 1px solid #A7F3D0;
        }

        .alert-error {
            background: #FEF2F2;
            color: var(--danger);
            border: 1px solid #FECACA;
        }

        .alert-warning {
            background: #FFFBEB;
            color: var(--warning);
            border: 1px solid #FDE68A;
        }

        .alert-info {
            background: #EFF6FF;
            color: var(--primary);
            border: 1px solid #BFDBFE;
        }

        /* Verification Modal */
        .verification-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(17, 24, 39, 0.7);
            backdrop-filter: blur(4px);
            z-index: 2000;
            justify-content: center;
            align-items: center;
        }

        .verification-box {
            background: white;
            padding: 40px;
            border-radius: 16px;
            max-width: 500px;
            text-align: center;
            box-shadow: var(--shadow-lg);
            animation: modalSlide 0.3s ease-out;
        }

        .verification-box i {
            font-size: 64px;
            color: var(--warning);
            margin-bottom: 20px;
        }

        .verification-box h2 {
            font-size: 24px;
            margin-bottom: 10px;
            color: var(--dark);
        }

        .verification-box p {
            color: var(--gray);
            margin-bottom: 30px;
            font-size: 15px;
        }

        .verification-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        /* App Layout */
        .app-container {
            display: none;
            background: #F3F4F6;
            min-height: 100vh;
        }

        .sidebar {
            width: 260px;
            background: white;
            border-right: 1px solid var(--border);
            position: fixed;
            height: 100vh;
            z-index: 50;
            display: flex;
            flex-direction: column;
        }

        .sidebar-header {
            padding: 24px;
            border-bottom: 1px solid var(--border);
        }

        .sidebar-logo {
            font-weight: 800;
            font-size: 20px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .nav-links {
            padding: 20px 0;
            flex: 1;
        }

        .nav-item {
            padding: 14px 24px;
            cursor: pointer;
            color: var(--gray);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.2s;
            border-left: 3px solid transparent;
        }

        .nav-item:hover {
            color: var(--primary);
            background-color: #EEF2FF;
        }

        .nav-item.active {
            color: var(--primary);
            background-color: #EEF2FF;
            border-left-color: var(--primary);
        }

        .user-profile {
            padding: 20px;
            border-top: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            background: var(--primary);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 14px;
        }

        .main-content {
            margin-left: 260px;
            padding: 30px;
        }

        /* --- ARREGLO DE ESPACIO --- */
.main-content {
    width: calc(100% - 260px); /* Resta el ancho del sidebar */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.section {
    width: 100%;
    height: 100%;
    flex: 1;
}

/* En móviles ajustamos */
@media (max-width: 768px) {
    .main-content { width: 100%; margin-left: 0; }
}

/* --- NUEVOS ESTILOS VISTA DE ACTIVOS --- */
.view-toggle {
    display: flex;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-right: 10px;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: white;
    cursor: pointer;
    color: var(--gray);
    transition: 0.2s;
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

/* Grid de Cards */
.assets-grid {
    display: none; /* Oculto por defecto */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.assets-grid.active {
    display: grid;
}

.asset-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}

.asset-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.asset-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.card-icon {
    width: 40px; height: 40px;
    background: #EEF2FF; color: var(--primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}

        /* --- ESTILOS DEL MODAL DE 5 PESTAÑAS --- */
        .tabs-wrapper { margin-top: 10px; }

        .tabs-header {
            display: flex;
            border-bottom: 1px solid var(--border);
            gap: 20px;
            margin-bottom: 20px;
            overflow-x: auto;
        }

        .tab-link {
            padding: 10px 0;
            color: var(--gray);
            cursor: pointer;
            font-weight: 500;
            border-bottom: 2px solid transparent;
            transition: 0.3s;
            white-space: nowrap;
        }

        .tab-link:hover { color: var(--primary); }
        .tab-link.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

        .tab-pane { display: none; animation: fadeIn 0.3s; }
        .tab-pane.active { display: block; }

        /* Barra de Vida Útil (Depreciación) */
        .lifecycle-bar-container {
            height: 10px;
            background: #E5E7EB;
            border-radius: 5px;
            margin-top: 10px;
            overflow: hidden;
            position: relative;
        }

        .lifecycle-progress {
            height: 100%;
            background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
            border-radius: 5px;
        }

        .detail-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 15px;
        }

        .detail-item label {
            font-size: 11px; color: var(--gray); text-transform: uppercase; display: block;
        }
        .detail-item div {
            font-weight: 600; color: var(--dark); font-size: 14px;
        }


        .header-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }

        .page-title {
            font-size: 24px;
            font-weight: 700;
            color: var(--dark);
        }

        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 24px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: white;
            padding: 24px;
            border-radius: 12px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .stat-icon {
            width: 48px;
            height: 48px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
        }

        .bg-indigo { background: #EEF2FF; color: var(--primary); }
        .bg-green { background: #ECFDF5; color: var(--success); }
        .bg-yellow { background: #FFFBEB; color: var(--warning); }
        .bg-red { background: #FEF2F2; color: var(--danger); }

        .stat-info h3 {
            color: var(--gray);
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 4px;
        }

        .stat-info p {
            color: var(--dark);
            font-size: 24px;
            font-weight: 700;
        }

        .card {
            background: white;
            border-radius: 12px;
            padding: 24px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border);
            margin-bottom: 24px;
        }

        .table-responsive {
            overflow-x: auto;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th {
            text-align: left;
            padding: 12px 16px;
            background-color: #F9FAFB;
            color: var(--gray);
            font-weight: 600;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border-bottom: 1px solid var(--border);
        }

        td {
            padding: 16px;
            border-bottom: 1px solid var(--border);
            color: var(--dark);
            font-size: 14px;
            vertical-align: middle;
        }

        tr:last-child td { border-bottom: none; }

        .badge {
            padding: 4px 10px;
            border-radius: 9999px;
            font-size: 12px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .badge-success { background: #ECFDF5; color: var(--success); }
        .badge-warning { background: #FFFBEB; color: var(--warning); }
        .badge-danger { background: #FEF2F2; color: var(--danger); }
        .badge-info { background: #EFF6FF; color: var(--primary); }

        .action-buttons {
            display: flex;
            gap: 8px;
        }

        .btn-icon {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: white;
            color: var(--gray);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .btn-icon:hover {
            background: #F3F4F6;
            color: var(--primary);
        }

        .btn-icon.delete:hover {
            color: var(--danger);
            background: #FEF2F2;
            border-color: #FECACA;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(17, 24, 39, 0.5);
            backdrop-filter: blur(4px);
            z-index: 1000;
            overflow-y: auto;
            padding: 20px;
        }

        .modal-content {
            background: white;
            max-width: 700px;
            margin: 40px auto;
            border-radius: 16px;
            padding: 30px;
            box-shadow: var(--shadow-lg);
            animation: modalSlide 0.3s ease-out;
        }

        @keyframes modalSlide {
            from { transform: translateY(-20px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border);
        }

        .modal-title {
            font-size: 20px;
            font-weight: 700;
            color: var(--dark);
        }

        .close-modal {
            font-size: 24px;
            color: var(--gray);
            cursor: pointer;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }
        
        .section { display: none; }
        .section.active { display: block; animation: fadeIn 0.3s; }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .file-upload-area {
            border: 2px dashed var(--border);
            padding: 20px;
            text-align: center;
            border-radius: 8px;
            margin-top: 10px;
            cursor: pointer;
            color: var(--gray);
            transition: all 0.2s;
        }
        
        .file-upload-area:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .ai-result-box {
            background: #F5F3FF;
            border: 1px solid #DDD6FE;
            border-radius: 8px;
            padding: 15px;
            margin-top: 10px;
            font-size: 14px;
            color: #4C1D95;
            display: none;
        }
        
        .ai-result-box.active {
            display: block;
            animation: fadeIn 0.3s;
        }

        /* Signature Pad */
        .signature-container {
            border: 2px solid var(--border);
            border-radius: 8px;
            margin: 15px 0;
        }

        #signaturePad {
            width: 100%;
            height: 200px;
            cursor: crosshair;
        }

        .signature-actions {
            display: flex;
            justify-content: space-between;
            padding: 10px;
            background: var(--light);
            border-top: 1px solid var(--border);
        }

        /* QR Scanner */
        #qrScanner {
            width: 100%;
            max-width: 500px;
            margin: 0 auto;
        }

        .uploaded-files {
            margin-top: 10px;
        }

        .file-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px;
            background: var(--light);
            border-radius: 6px;
            margin-bottom: 8px;
            font-size: 13px;
        }

        .file-item i {
            color: var(--primary);
            margin-right: 8px;
        }

        .file-item button {
            background: transparent;
            border: none;
            color: var(--danger);
            cursor: pointer;
            padding: 4px 8px;
        }

        /* Loading Spinner */
        .spinner {
            border: 3px solid var(--light);
            border-top: 3px solid var(--primary);
            border-radius: 50%;
            width: 24px;
            height: 24px;
            animation: spin 1s linear infinite;
            display: inline-block;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @media (max-width: 768px) {
            .login-container { flex-direction: column; }
            .login-right { display: none; }
            .login-left { padding: 20px; width: 100%; max-width: 100%; }
            
            .sidebar {
                width: 100%;
                height: auto;
                position: fixed;
                bottom: 0;
                top: auto;
                flex-direction: row;
                border-right: none;
                border-top: 1px solid var(--border);
                padding: 0;
                justify-content: space-around;
                background: white;
                box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
            }
            
            .sidebar-header, .user-profile { display: none; }
            
            .nav-links {
                display: flex;
                width: 100%;
                padding: 0;
                margin: 0;
            }
            
            .nav-item {
                flex: 1;
                flex-direction: column;
                padding: 10px 5px;
                font-size: 10px;
                gap: 4px;
                border-left: none;
                border-top: 3px solid transparent;
                text-align: center;
                justify-content: center;
            }
            
            .nav-item i { font-size: 18px; margin-bottom: 2px; }
            
            .nav-item.active {
                border-left: none;
                border-top-color: var(--primary);
                background: transparent;
            }

            .main-content {
                margin-left: 0;
                padding: 15px;
                padding-bottom: 80px;
            }
            
            .form-row { grid-template-columns: 1fr; gap: 0; }
            .verification-box { padding: 30px 20px; margin: 20px; }
        }

        /* Animación suave para el cambio de pestaña */
        .form-tab-pane {
            animation: fadeIn 0.3s ease-in-out;
        }

        /* ==============================================
   ESTILOS CORREGIDOS - INVENTARIO Y MODALES
   ============================================== */

/* 1. ARREGLO DE LA BARRA SUPERIOR (HEADER) */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Permite que bajen si no caben */
    gap: 15px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap; /* Botones bajan en pantallas muy pequeñas */
}

/* Título Responsivo */
.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap; /* Evita que se parta feo */
}

/* 2. BOTONES Y TOGGLE (Para que no se estiren) */
.view-toggle {
    display: flex;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    height: 40px; /* Altura fija para que no crezca */
}

.view-btn {
    padding: 0 15px; /* Padding lateral */
    border: none;
    background: white;
    cursor: pointer;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

/* Forzar a los botones a no crecer más de lo necesario */
.header-actions .btn {
    width: auto !important; 
    white-space: nowrap;
    padding: 10px 20px;
}

/* 3. MODAL CENTRADO Y RESPONSIVO */
.modal {
    display: none; /* JS lo activa con display: flex */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.6); /* Fondo oscuro */
    backdrop-filter: blur(4px);
    
    /* MAGIA PARA CENTRAR */
    align-items: center; 
    justify-content: center;
    padding: 20px; /* Margen para que no pegue al borde */
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 800px; /* Ancho máximo PC */
    max-height: 90vh; /* Altura máxima 90% de la pantalla */
    overflow-y: auto; /* Scroll INTERNO si el contenido es largo */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* El cuerpo del modal debe tener scroll si es necesario */
.modal-content form, .tabs-content {
    overflow-y: auto;
    padding: 20px;
}
.modal-header { padding: 20px; flex-shrink: 0; } /* Header fijo */

/* 4. PESTAÑAS DESLIZABLES (SCROLL MÓVIL) */
.tabs-header {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid var(--border);
    margin: 0 20px 20px 20px; /* Margen lateral */
    
    /* ESTO HACE LA MAGIA EN MÓVIL */
    overflow-x: auto; /* Scroll horizontal */
    white-space: nowrap; /* No permite saltos de línea */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iPhone */
    scrollbar-width: none; /* Ocultar barra scroll Firefox */
}

.tabs-header::-webkit-scrollbar { display: none; } /* Ocultar barra scroll Chrome */

.tab-link {
    padding: 10px 5px;
    cursor: pointer;
    color: var(--gray);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    flex-shrink: 0; /* IMPORTANTE: Evita que se aplasten */
}

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ==============================================
   AJUSTES ESPECÍFICOS PARA MÓVIL (Celulares)
   ============================================== */
@media (max-width: 768px) {
    /* Header: Uno debajo del otro */
    .header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .page-title { font-size: 20px; }

    /* Contenedor de botones: permitir scroll horizontal si son muchos */
    .header-actions {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        justify-content: flex-start;
    }

    /* Ajustar botones para que quepan */
    .header-actions .btn, .view-toggle {
        font-size: 13px;
        height: 36px;
        padding: 0 12px;
    }
    
    /* Modal ocupando más espacio */
    .modal { padding: 10px; }
    .modal-content { max-height: 95vh; }
}

/* =========================================
   NOTIFICACIONES FLOTANTES (TOASTS)
   ========================================= */
#notificationContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999; /* Encima de cualquier modal */
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Para que no bloquee clicks si está vacío */
}

.toast {
    min-width: 300px;
    max-width: 400px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInLeft 0.3s ease-out forwards;
    border-left: 5px solid #ccc;
    pointer-events: auto; /* Permitir cerrar o copiar */
    font-size: 14px;
    font-weight: 500;
}

/* Colores según el tipo */
.toast-success { border-left-color: var(--success); }
.toast-success i { color: var(--success); }

.toast-error { border-left-color: var(--danger); }
.toast-error i { color: var(--danger); }

.toast-warning { border-left-color: var(--warning); }
.toast-warning i { color: var(--warning); }

.toast-info { border-left-color: var(--primary); }
.toast-info i { color: var(--primary); }

/* Animaciones */
@keyframes slideInLeft {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* PAGINACIÓN */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.pagination-controls button {
    width: auto;
    padding: 8px 16px;
}

/* Estilos para Calificación de Estrellas */
.rating-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #D1D5DB;
    cursor: pointer;
    transition: all 0.2s;
    padding: 5px;
}

.rating-btn:hover {
    color: #FBBF24;
    transform: scale(1.1);
}

.rating-btn.active {
    color: #F59E0B;
}

/* Badge de Tiempo de Ticket */
.ticket-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.ticket-time-badge.on-time {
    background: #D1FAE5;
    color: #065F46;
}

.ticket-time-badge.warning {
    background: #FEF3C7;
    color: #92400E;
}

.ticket-time-badge.overdue {
    background: #FEE2E2;
    color: #991B1B;
}

/* Indicador de Prioridad */
.priority-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.priority-baja {
    background: #10B981;
}

.priority-media {
    background: #3B82F6;
}

.priority-alta {
    background: #F59E0B;
}

.priority-critica {
    background: #EF4444;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Mejora de la caja de resultados de IA */
.ai-result-box {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.ai-result-box.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-result-box strong {
    color: var(--primary);
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

.ai-result-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-result-box li {
    margin-bottom: 5px;
}

/* Agregue esto en su bloque de estilos CSS */
.btn-warning {
    background-color: var(--warning); /* Naranja (#F59E0B) */
    color: white;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
    background-color: #D97706; /* Naranja más oscuro al pasar el mouse */
    transform: translateY(-1px);
}

/* Estilos para el Spinner de Carga */
.report-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border-left-color: var(--primary); /* Tu color azul */
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

/* Estilos para las Tabs (Pestañas) */
.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--gray);
    font-weight: 500;
}
.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.tab-pane {
    display: none; /* Oculto por defecto */
}
.tab-pane.active {
    display: block; /* Solo el activo se ve */
    animation: fadeIn 0.3s;
}

/* ===================================
   SISTEMA DE TOOLTIPS PROFESIONAL
   =================================== */

.stat-card {
    position: relative;
    cursor: help;
}

.stat-card::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    line-height: 1.4;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #1F2937;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.stat-card:hover::before,
.stat-card:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Animación de aparición */
@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.stat-card:hover::before {
    animation: tooltipFadeIn 0.3s ease-out;
}

/* ===================================
   MEJORAS VISUALES PARA REPORTES
   =================================== */

.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Indicador de carga mejorado */
.report-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(79, 70, 229, 0.1);
    border-top-color: #4F46E5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Botones de exportación mejorados */
.btn-danger, .btn-success {
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #DC2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3);
}

.btn-success:hover {
    background-color: #059669 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

/* ===================================
   CARDS DE REPORTES CON TOOLTIPS
   =================================== */

.report-card {
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.report-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.report-card::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.report-card::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    border: 9px solid transparent;
    border-top-color: #1F2937;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.report-card:hover::before,
.report-card:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===================================
   ANIMACIÓN DE SACUDIDA PARA MODALES
   =================================== */

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.shake-animation {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Mejorar indicador visual de modal */
.modal {
    backdrop-filter: blur(3px);
    transition: backdrop-filter 0.3s ease;
}

.modal-content {
    position: relative;
    transition: transform 0.3s ease;
}

/* Indicador sutil de que el modal está activo */
.modal[style*="display: flex"] .modal-content,
.modal[style*="display: block"] .modal-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Mejorar botón de cerrar */
.close-modal {
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: var(--gray);
    opacity: 0.7;
}

.close-modal:hover {
    opacity: 1;
    color: var(--danger);
    transform: rotate(90deg);
}

/* Tooltip para ESC */
.modal::before {
    content: 'Presiona ESC para cerrar';
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10001;
    letter-spacing: 0.5px;
}

.modal[style*="display: flex"]::before,
.modal[style*="display: block"]::before {
    opacity: 1;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* Tabla responsive en modales de reportes */
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 15px;
}

.report-table th {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    color: white;
    padding: 10px 8px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #4338CA;
}

.report-table td {
    padding: 8px;
    border: 1px solid #E5E7EB;
    font-size: 11px;
}

.report-table tbody tr:nth-child(even) {
    background-color: #F9FAFB;
}

.report-table tbody tr:hover {
    background-color: #EEF2FF;
}

/* Animación para items que aparecen */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   ESCÁNER QR - DISEÑO PROFESIONAL
   ========================================== */

/* Grid Principal */
.scanner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

/* Panel de Cámara */
.scanner-camera-panel {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--border);
}

.camera-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

.camera-header i {
    color: var(--primary);
    font-size: 20px;
}

.camera-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    aspect-ratio: 1;
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.3);
}

#qrScanner {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

#qrScanner video {
    border-radius: 12px;
}

/* Overlay de escaneo */
.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.scan-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
}

.corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary);
    animation: pulse-corner 2s infinite;
}

.corner-tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.corner-tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.corner-bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.corner-br { bottom: 0; right: 0; border-left: none; border-top: none; }

@keyframes pulse-corner {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Instrucciones */
.camera-instructions {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--dark);
}

.instruction-item i {
    font-size: 16px;
}

/* Panel de Resultados */
.scanner-results-panel {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

.result-header i {
    color: var(--success);
    font-size: 20px;
}

.result-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waiting-state {
    text-align: center;
    color: var(--gray);
}

.pulse-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #818CF8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-scale 2s infinite;
}

.pulse-animation i {
    font-size: 48px;
    color: white;
}

@keyframes pulse-scale {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.waiting-state p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.waiting-state small {
    font-size: 13px;
    opacity: 0.7;
}

/* Modo Auditoría */
.audit-list-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.audit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-radius: 12px;
    border-left: 4px solid var(--success);
}

.audit-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

.audit-title i {
    color: var(--success);
    font-size: 20px;
}

.audit-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 8px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.count-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--success);
    line-height: 1;
}

.count-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.audit-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.audit-items-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    max-height: 350px;
}

/* Scrollbar personalizado */
.audit-items-scroll::-webkit-scrollbar {
    width: 8px;
}

.audit-items-scroll::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 10px;
}

.audit-items-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.audit-items-scroll::-webkit-scrollbar-thumb:hover {
    background: #4338CA;
}

.audit-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

/* Items de auditoría */
.audit-item {
    background: white;
    border: 2px solid var(--border);
    border-left: 4px solid var(--success);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    animation: slideInRight 0.4s ease-out;
}

.audit-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.audit-item-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--success) 0%, #10B981 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.audit-item-content {
    flex: 1;
}

.audit-item-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.audit-item-details {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--gray);
}

.audit-item-time {
    font-size: 11px;
    color: var(--gray);
    white-space: nowrap;
}

/* Toggle Moderno */
.audit-mode-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    border: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.switch-modern {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch-modern input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-modern {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #CBD5E1;
    transition: 0.4s;
    border-radius: 28px;
}

.slider-modern:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-modern input:checked + .slider-modern {
    background: linear-gradient(135deg, var(--success) 0%, #10B981 100%);
}

.switch-modern input:checked + .slider-modern:before {
    transform: translateX(24px);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.toggle-label i {
    color: var(--success);
}

/* Estadísticas Mini */
.audit-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.stat-mini {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--border);
}

.stat-mini i {
    font-size: 32px;
}

.stat-mini-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

.stat-mini-label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 1024px) {
    .scanner-grid {
        grid-template-columns: 1fr;
    }
    
    .scanner-camera-panel {
        order: 1;
    }
    
    .scanner-results-panel {
        order: 2;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .audit-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .audit-mode-toggle {
        padding: 8px 15px;
    }
    
    .toggle-label span {
        display: none;
    }
}

/* Card de resultado exitoso */
.scan-success-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border);
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-badge {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: bounce 0.6s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.asset-header-scan {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.asset-header-scan h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
}

.asset-details-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.asset-detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--light);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.asset-detail-item i {
    font-size: 20px;
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.detail-label {
    display: block;
    font-size: 11px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    margin-top: 2px;
}

.action-buttons-scan {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asset-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--light);
    border-radius: 10px;
}

.asset-info-row i {
    font-size: 24px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* ESTILOS DE LA ETIQUETA DE ACTIVO */
.sticker-container {
    width: 300px;
    background: white;
    border: 2px solid #000; /* Se cambiará dinámicamente */
    border-radius: 8px;
    padding: 15px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-family: 'Arial', sans-serif;
    position: relative;
    overflow: hidden;
}

.sticker-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.sticker-logo {
    max-height: 40px;
    max-width: 80px;
    object-fit: contain;
}

.sticker-company {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
    color: #333;
}

.sticker-body {
    display: flex;
    justify-content: center;
    padding: 5px 0;
}

.sticker-footer {
    margin-top: 10px;
    text-align: center;
}

.sticker-asset-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    color: #000;
}

.sticker-meta {
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: #555;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.sticker-warning {
    font-size: 8px;
    color: #999;
    margin-top: 5px;
    letter-spacing: 0.5px;
}

/* ============================================
   ESTILOS PARA ETIQUETAS QR
   ============================================ */

.qr-label-corporate,
.qr-label-minimal,
.qr-label-compact,
.qr-label-industrial {
    box-sizing: border-box;
    display: inline-block;
}

/* Asegurar que las imágenes del QR se rendericen */
#qrcode canvas,
#previewQRCode canvas,
[id^="qrcode_"] canvas {
    display: block !important;
    margin: 0 auto;
}

/* Asegurar que el logo se cargue correctamente */
.qr-label-corporate img,
.qr-label-minimal img {
    display: block;
    margin: 0 auto;
}

/* --- CORRECCIÓN QR DUPLICADO --- */
/* Oculta el elemento canvas técnico y deja solo la imagen generada */
#qrCodePlaceholder canvas, 
#qrcode canvas,
.qr-label canvas {
    display: none !important;
}

#qrCodePlaceholder img, 
#qrcode img,
.qr-label img {
    display: block !important;
    margin: 0 auto;
    max-width: 100%;
}

/* Esto debe estar en tu CSS para que este HTML funcione perfecto */
#qrCodePlaceholder canvas {
    display: none !important;
}


/* --- ESTILOS PARA CORREGIR LA VISIBILIDAD DE SCANAPP --- */

/* Transforma el enlace "Escanear un archivo de imagen" en un BOTÓN */
#qrScanner a {
    display: inline-block !important;
    color: #ffffff !important;           /* Texto blanco */
    background-color: #4F46E5;           /* Color primario (cámbialo al de tu marca) */
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-top: 15px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    cursor: pointer;
}

#qrScanner a:hover {
    transform: scale(1.05);
    background-color: #4338ca;
}

/* Arreglar el texto que dice "O arrastra una imagen..." para que se vea */
#qrScanner span, 
#qrScanner div {
    color: #d1d5db !important; /* Gris claro para que se vea sobre fondo negro */
}

/* Ocultar el texto de "Powered by..." */
#qrScanner div[style*="font-size: 10pt"] {
    display: none !important;
}

/* Ajustar los botones de permisos de cámara */
#html5-qrcode-button-camera-permission {
    background-color: #10B981 !important; /* Verde */
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
}

/* ============================================
   CHECKBOXES ESTILO TARJETA (CONFIGURACIÃ"N QR)
   ============================================ */

.checkbox-card {
    position: relative;
    display: block;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
}

.checkbox-content i {
    font-size: 16px;
    color: var(--gray);
    transition: color 0.3s ease;
}

.checkbox-content span {
    flex: 1;
}

/* Hover effect */
.checkbox-card:hover .checkbox-content {
    border-color: var(--primary);
    background: #EEF2FF;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.1);
}

/* Checked state */
.checkbox-card input:checked ~ .checkbox-content {
    border-color: var(--primary);
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.checkbox-card input:checked ~ .checkbox-content i {
    color: var(--primary);
}

/* Checkmark indicator */
.checkbox-card input:checked ~ .checkbox-content::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    color: var(--primary);
    font-size: 14px;
    animation: checkmarkPop 0.3s ease;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .checkbox-content {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .checkbox-content i {
        font-size: 14px;
    }
}

/* ---------------------------------------------------- */
/* OCULTAR BOTÓN DE CAPTURA DE HARDWARE EN MÓVIL */
/* ---------------------------------------------------- */

/* Ocultar por defecto (Mobile First) */
#btnCaptureHardware {
    display: none !important;
}

/* Mostrar solo en pantallas grandes (992px es un buen umbral de escritorio) */
@media (min-width: 992px) { 
    #btnCaptureHardware {
        display: inline-flex !important; /* Para que el icono y el texto se vean bien */
    }
}

.step-card {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px dashed #E5E7EB;
}
.step-card:last-child {
    border-bottom: none;
}
.step-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary); /* Asegúrate de que 'var(--primary)' esté definido */
    background: #EEF2FF;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 15px;
}
.step-details h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 16px;
    color: var(--dark);
}
.step-details p {
    font-size: 14px;
    color: var(--gray);
}
.step-list {
    list-style-type: disc;
    padding-left: 20px;
    font-size: 13px;
    color: #6B7280;
    margin-top: 8px;
}

/* Estilos para la Línea de Tiempo de Vida Útil */
.lifecycle-bar-container {
    width: 100%;
    height: 8px;              /* Altura de la barra de fondo */
    background-color: #E5E7EB; /* Gris claro (fondo vacío) */
    border-radius: 4px;       /* Bordes redondeados */
    overflow: hidden;         /* Para que la barra interna respete los bordes */
    margin: 10px 0;           /* Espacio vertical */
}

.lifecycle-progress {
    height: 100%;
    background-color: #10B981; /* Verde (o usa var(--primary)) para el progreso */
    width: 0%;                 /* Inicia en 0 */
    transition: width 0.6s ease; /* Animación suave al cargar */
    border-radius: 4px;
}

   /* ==========================================
   ESTILOS ESPECÍFICOS PARA PANEL ADMIN
   ========================================== */

/* Tarjetas de planes */
.plan-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.plan-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Items de actividad */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-content {
    flex: 1;
}

.activity-text {
    display: block;
    font-size: 13px;
    color: var(--dark);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 11px;
    color: var(--gray);
}

/* Departamentos de soporte */
.department-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    background: var(--light);
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Características de planes */
.feature-input {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

/* Badges adicionales */
.badge-purple {
    background: #8B5CF6;
    color: white;
}

.badge-blue {
    background: #3B82F6;
    color: white;
}

/* Responsive para admin */
@media (max-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .activity-item {
        flex-direction: column;
        gap: 8px;
    }
}

/* Animaciones para admin */
@keyframes slideInAdmin {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-section {
    animation: slideInAdmin 0.3s ease-out;
}

/* ==========================================
   ESTILOS PARA NOTIFICACIONES (TOASTS)
   ========================================== */

#notificationContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    animation: slideInRight 0.3s ease-out;
    min-width: 300px;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-info {
    border-left-color: var(--info);
}

.toast i:first-child {
    font-size: 20px;
}

.toast-success i:first-child {
    color: var(--success);
}

.toast-error i:first-child {
    color: var(--danger);
}

.toast-warning i:first-child {
    color: var(--warning);
}

.toast-info i:first-child {
    color: var(--info);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ==========================================
   ESTILOS ESPECÍFICOS PARA PANEL ADMIN
   ========================================== */

/* Badges adicionales para admin */
.badge-purple {
    background: #8B5CF6;
    color: white;
}

.badge-blue {
    background: #3B82F6;
    color: white;
}

/* Tarjetas de planes */
.plan-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    background: white;
}

.plan-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Items de actividad */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-content {
    flex: 1;
}

.activity-text {
    display: block;
    font-size: 13px;
    color: var(--dark);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 11px;
    color: var(--gray);
}

/* Departamentos de soporte */
.department-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    background: var(--light);
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Características de planes */
.feature-input {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

/* Responsive para admin */
@media (max-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .activity-item {
        flex-direction: column;
        gap: 8px;
    }
    
    #notificationContainer {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
    }
}

/* Animaciones para admin */
@keyframes slideInAdmin {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-section {
    animation: slideInAdmin 0.3s ease-out;
}

/* Mejoras para los modales del admin */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideInUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltips personalizados */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: 400;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--dark) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Tooltips para las cards de estadísticas */
.stat-card {
    position: relative;
}

.stat-card .tooltip-trigger {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--gray);
    cursor: help;
    font-size: 14px;
}

.stat-card .tooltip-trigger:hover {
    color: var(--primary);
}

#companiesByPlanChart {
    width: 100%;
    height: 250px;
}

/* Estilos para Módulo de Licencias */
.license-assignment-item input {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.license-assignment-item .btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--danger);
    padding: 10px;
}

.license-assignment-item .btn-icon:hover {
    color: #DC2626;
}

 /* Reset Password Modal Styles */
    .reset-password-modal-content {
        max-width: 500px;
    }

    .reset-password-modal-header {
        background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
        color: white;
        margin: -30px -30px 20px -30px;
        padding: 20px 30px;
        border-radius: 16px 16px 0 0;
    }

    .reset-password-title {
        color: white;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .reset-password-modal-header .close-modal {
        color: white;
    }

    .reset-password-form {
        display: block;
    }

    .reset-password-alert {
        margin-bottom: 20px;
    }

    .reset-password-buttons {
        display: flex;
        gap: 10px;
        margin-top: 20px;
    }

    .reset-password-submit {
        flex: 1;
    }

    .reset-password-success {
        display: none;
    }

    .reset-password-success-content {
        text-align: center;
        padding: 40px 20px;
    }

    .reset-password-success-icon {
        width: 80px;
        height: 80px;
        background: linear-gradient(135deg, #10B981 0%, #059669 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 20px;
        box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    }

    .reset-password-success-icon i {
        font-size: 40px;
        color: white;
    }

    .reset-password-success-title {
        font-size: 22px;
        margin-bottom: 15px;
        color: var(--dark);
    }

    .reset-password-success-text {
        color: var(--gray);
        line-height: 1.6;
        margin-bottom: 10px;
    }

    .reset-password-email-display {
        font-weight: 600;
        color: var(--primary);
        font-size: 16px;
        margin-bottom: 25px;
    }

    .reset-password-warning {
        text-align: left;
        font-size: 14px;
    }

    .reset-password-back {
        margin-top: 20px;
        width: 100%;
    }

    /* Contenedor relativo para posicionar la lista */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

/* El input dentro del wrapper */
.autocomplete-wrapper input {
    width: 100%;
}

/* La lista de sugerencias flotante */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none; /* Oculto por defecto */
}

/* Items de la lista */
.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
    color: #333;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f0f7ff; /* Color al pasar el mouse */
}

/* Iconos dentro de la lista para diferenciar */
.autocomplete-item i {
    margin-right: 8px;
    color: #666;
}

/* ========================================
   OPTIMIZACIÓN VIRTUAL SCROLL MÓVILES
   ======================================== */

/* Contenedor principal con aceleración GPU */
.table-responsive {
    -webkit-overflow-scrolling: touch; /* Scroll nativo iOS */
    will-change: scroll-position;
    contain: layout style paint;
}

/* Filas con transición suave */
#assetsTableBody tr {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0); /* Forzar GPU */
    transition: none; /* Eliminar transiciones que causen parpadeo */
}

/* Prevenir reflow durante scroll */
#assetsTableBody {
    contain: layout style;
}

/* Optimización para render en lotes */
.table-responsive table {
    border-collapse: separate; /* Mejora performance */
    border-spacing: 0;
}

/* Indicador de carga suave */
#loadingIndicator {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#loadingIndicator[style*="display: block"] {
    opacity: 1;
}

/* =========================================
   NUEVA SECCIÓN DE PERFIL (SIDEBAR)
   ========================================= */
.user-profile-container {
    position: relative;
    margin-top: auto; /* Empuja al fondo del sidebar */
    padding: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.user-profile:hover, .user-profile.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.avatar-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1em;
    margin-right: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--dark); /* O blanco si el sidebar es oscuro */
}

.user-role {
    font-size: 0.75em;
    color: var(--gray);
}

.toggle-icon {
    font-size: 0.8em;
    color: var(--gray);
    transition: transform 0.3s ease;
}

.user-profile.active .toggle-icon {
    transform: rotate(90deg);
}

/* MENÚ DESPLEGABLE */
.profile-dropdown {
    position: absolute;
    bottom: 80px; /* Ajustar según altura del footer */
    left: 10px;
    width: calc(100% - 20px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    border: 1px solid var(--border);
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 8px 16px;
    font-size: 0.75em;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.5px;
    font-weight: 600;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background-color: var(--light);
    color: var(--primary);
}

.dropdown-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.text-danger {
    color: var(--danger) !important;
}

.text-danger:hover {
    background-color: #FEF2F2;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border);
    margin: 6px 0;
}

/* =========================================
   MODAL DE CONFIGURACIÓN
   ========================================= */
.config-modal-content {
    max-width: 500px; /* Un poco más ancho */
    padding: 0;
    overflow: hidden;
}

.config-header {
    padding: 20px 25px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.config-header h2 {
    font-size: 1.25em;
    color: var(--dark);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-header p {
    font-size: 0.9em;
    color: var(--gray);
}

/* PESTAÑAS */
.config-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: white;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: var(--primary);
    background-color: #f8fafc;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: #eef2ff;
}

.tab-content {
    display: none;
    padding: 25px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* ESTILOS PESTAÑA PLAN */
.plan-card {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.plan-header {
    margin-bottom: 20px;
}

.plan-icon {
    width: 60px;
    height: 60px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    margin: 0 auto 15px;
}

.badge-pro {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7em;
    vertical-align: middle;
}

.plan-details ul {
    list-style: none;
    text-align: left;
    margin: 20px 0;
    padding: 0 10px;
}

.plan-details li {
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 0.95em;
}

.plan-details li i {
    color: var(--success);
    margin-right: 10px;
}

.btn-upgrade {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
    transition: transform 0.2s;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(79, 70, 229, 0.4);
}

.small-text {
    font-size: 0.75em;
    color: var(--gray);
    margin-top: 10px;
}

/* ESTILOS PESTAÑA SOPORTE */
.row {
    display: flex;
    gap: 15px;
}
.col-half {
    flex: 1;
}
.btn-primary-full {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
}
.btn-primary-full:hover {
    background-color: var(--primary-dark);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 1. Corrección del Modal y Botón Cerrar */
.config-modal-content {
    position: relative; /* CRUCIAL para que el botón X se posicione respecto a esto */
    max-width: 550px;
    padding: 0;
    border-radius: 12px;
    overflow: hidden; /* Asegura que nada se salga de los bordes redondeados */
}

/* Estilo profesional para el botón cerrar (X) */
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.close-modal-btn:hover {
    background-color: #f1f5f9;
    color: var(--danger);
    transform: rotate(90deg); /* Pequeña animación al pasar el mouse */
}

/* 2. Estilos para la Pestaña Historial */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.history-header h4 {
    font-size: 0.95em;
    color: var(--dark);
    margin: 0;
}

.btn-refresh {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9em;
    padding: 5px;
    border-radius: 4px;
}
.btn-refresh:hover { background: #eef2ff; }

.tickets-container {
    max-height: 300px;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #e2e8f0;
}

/* Scrollbar fina para la lista */
.tickets-container::-webkit-scrollbar {
    width: 6px;
}
.tickets-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

/* =========================================
   CORRECCIÓN RESPONSIVE: PERFIL Y MODAL
   ========================================= */

@media (max-width: 768px) {
    
    /* 1. Ajuste del Contenedor del Perfil en el Sidebar */
    .user-profile-container {
        position: static; /* Importante: permite que el dropdown hijo escape si usamos fixed */
        margin-top: 10px;
        padding: 5px;
    }

    .user-profile {
        padding: 10px;
        background: transparent; /* Más limpio en móvil */
        border: none;
    }

    /* Ocultar nombre y rol en móvil si el sidebar es muy estrecho */
    .sidebar.collapsed .user-info {
        display: none;
    }

    /* 2. TRANSFORMACIÓN A "BOTTOM SHEET" (Hoja Inferior) */
    /* En vez de flotar al lado, se pega al fondo de la pantalla */
    .profile-dropdown {
        position: fixed !important; /* Salir del flujo del sidebar */
        bottom: 0;
        left: 0;
        width: 100% !important;
        background: white;
        border-radius: 20px 20px 0 0; /* Bordes redondeados solo arriba */
        box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
        padding: 20px 0 30px 0; /* Padding extra abajo para seguridad en iPhone */
        z-index: 9999; /* Por encima de TODO */
        
        /* Animación de deslizamiento hacia arriba */
        transform: translateY(120%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        opacity: 1;
        visibility: visible;
        border: none;
    }

    .profile-dropdown.show {
        transform: translateY(0); /* Deslizar hacia arriba */
    }

    /* Elementos del menú más grandes para el dedo (Touch targets) */
    .dropdown-item {
        padding: 15px 25px;
        font-size: 1.1em; /* Texto más grande */
        border-bottom: 1px solid #f1f5f9;
    }

    .dropdown-header {
        padding: 10px 25px;
        font-size: 0.9em;
        text-align: center; /* Centrado en móvil */
        color: var(--primary);
    }

    /* Fondo oscuro detrás del menú cuando se abre */
    .profile-dropdown.show::before {
        content: '';
        position: fixed;
        top: -100vh;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: -1;
        pointer-events: none; /* Dejar pasar clicks para cerrar */
    }

    /* 3. Ajuste del MODAL DE CONFIGURACIÓN en Móvil */
    .config-modal-content {
        width: 95% !important;
        margin: 10% auto; /* Centrado */
        max-height: 85vh;
        display: flex;
        flex-direction: column;
    }

    .config-tabs {
        flex-wrap: nowrap;
        overflow-x: auto; /* Scroll horizontal si no caben las pestañas */
    }

    .tab-btn {
        padding: 10px;
        font-size: 0.9em;
        white-space: nowrap;
    }

    .tab-content {
        overflow-y: auto; /* Scroll interno para el contenido */
        flex: 1;
        padding: 15px;
    }
    
    /* Ajuste del formulario en una sola columna */
    .row {
        flex-direction: column;
        gap: 0;
    }
    
    .col-half {
        width: 100%;
    }
}

.ticket-header-info {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.chat-container {
    border: 1px solid #e5e7eb !important;
    background: #f9fafb;
    border-radius: 10px;
}

.ticket-reply-input {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ticket-reply-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
}

/* Estilos para el buscador predictivo */
.search-results-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 8px 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1050;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.search-result-item:hover {
    background-color: #f8fafc;
}
.search-result-item strong { display: block; color: #1e293b; font-size: 14px; }
.search-result-item small { color: #64748b; font-size: 12px; }