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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
}

.login-wrapper {
    display: flex;
    height: 100vh;
}

/* Lado izquierdo - Imagen completa */
.login-left {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.login-background {
    width: 100%;
    height: 100%;
}

.login-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay inferior con texto y hora - Pasa por encima del sidebar */
.login-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.login-overlay-text h2 {
    font-size: 1.3rem;
    font-weight: 300;
    margin: 0;
    line-height: 1.4;
}

.login-overlay-time {
    text-align: right;
}

.login-overlay-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.login-overlay-time .time {
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1;
}

.login-overlay-time .date {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-top: 5px;
}

/* Sidebar derecho - Formulario */
.login-sidebar {
    width: 420px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2), -5px 0 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

/* Header del sidebar con botones */
.sidebar-header {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.sidebar-header-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.sidebar-header-btn:hover {
    background: #f0f0f0;
}

.sidebar-header-btn i {
    font-size: 1.2rem;
}

/* Contenido del formulario */
.login-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 30px;
    overflow-y: auto;
}

/* Caja flotante del formulario */
.login-form-box {
    background: white;
    padding: 40px 35px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
    max-width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header .logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-header .logo i {
    font-size: 2rem;
    color: white;
}

.login-header h2 {
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
    margin: 0;
}

/* Formulario */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.9rem;
}

.input-with-icon input {
    width: 100%;
    padding: 13px 12px 13px 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-with-icon input::placeholder {
    color: #9ca3af;
}

.forgot-password {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 20px;
}

.forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
}

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

.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-login:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-login i {
    font-size: 1.1rem;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.d-none {
    display: none;
}

/* ========================================
   MODAL DE RECUPERACIÓN DE CONTRASEÑA
   ======================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.modal-container {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-close i {
    font-size: 1rem;
}

/* Modal Body */
.modal-body {
    padding: 30px 25px;
}

.modal-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Email Confirmation */
.email-confirmation {
    text-align: center;
}

.email-display {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 600;
    margin: 20px 0;
}

.confirmation-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.btn-confirm-yes,
.btn-confirm-no {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-confirm-yes {
    background: #28a745;
    color: white;
}

.btn-confirm-yes:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-confirm-no {
    background: #6c757d;
    color: white;
}

.btn-confirm-no:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.success-message,
.error-message,
.glpi-redirect {
    text-align: center;
    padding: 20px;
}

.success-message p,
.error-message p,
.glpi-redirect p {
    margin: 10px 0;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.text-warning {
    color: #ffc107;
}

.text-muted {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    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, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }
    
    .login-left {
        height: 40vh;
    }
    
    .login-sidebar {
        width: 100%;
        flex: 1;
    }
    
    .login-overlay {
        padding: 20px;
    }
    
    .login-overlay-time .time {
        font-size: 3rem;
    }
    
    .login-form-container {
        padding: 30px 20px;
    }
    
    /* Modal responsive */
    .modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 25px 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}
/* 
========================================
   ESTILOS PARA RECUPERACIÓN DE CONTRASEÑA
   ======================================== */

/* Spinner personalizado */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(79, 70, 229, 0.1);
    border-top: 4px solid #4F46E5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Info del usuario */
.user-info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.user-info-box > i {
    font-size: 40px;
    opacity: 0.9;
    flex-shrink: 0;
}

.user-info-box > div {
    flex: 1;
}

.user-info-box strong {
    font-size: 17px;
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: white;
}

.user-info-box small {
    font-size: 14px;
    opacity: 1;
    display: block;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

/* Toggle password button */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.toggle-password:hover {
    color: #4F46E5;
}

.toggle-password i {
    font-size: 18px;
    pointer-events: none;
}

/* Input con toggle password */
.input-with-icon.has-toggle input {
    padding-right: 45px;
}

/* Deshabilitar el icono de ojo del navegador (Edge, Chrome) */
.input-with-icon.has-toggle input::-ms-reveal,
.input-with-icon.has-toggle input::-ms-clear {
    display: none;
}

.input-with-icon.has-toggle input::-webkit-credentials-auto-fill-button,
.input-with-icon.has-toggle input::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
}

/* Form hint */
.form-hint {
    display: block;
    margin-top: 8px;
    color: #6b7280;
    font-size: 13px;
}

.form-hint i {
    margin-right: 5px;
}

/* Error box */
.error-box {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
}

.error-box i {
    font-size: 50px;
    color: #dc2626;
    margin-bottom: 15px;
    display: block;
}

.error-box p {
    color: #991b1b;
    font-size: 15px;
    margin: 0;
    line-height: 1.6;
}

/* Success box */
.success-box {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
}

.success-box i {
    font-size: 50px;
    color: #059669;
    margin-bottom: 15px;
    display: block;
    animation: successPulse 0.6s ease-in-out;
}

.success-box p {
    color: #065f46;
    font-size: 15px;
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.success-box small {
    color: #047857;
    font-size: 13px;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Logo variants */
.logo.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.logo.error i {
    color: #dc2626;
}

.logo.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.logo.success i {
    color: #059669;
}

/* Alert styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert i {
    font-size: 18px;
}

.alert.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert.d-none {
    display: none !important;
}

/* Text utilities */
.text-muted {
    color: #6b7280;
}

.text-center {
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-info-box {
        flex-direction: column;
        text-align: center;
    }
    
    .error-box,
    .success-box {
        padding: 20px;
    }
    
    .error-box i,
    .success-box i {
        font-size: 40px;
    }
}
