/* =========================================================================
 * ARBIMASTER - LOGIN STYLES
 * File: assets/css/login-styles.css
 * Versione: 2.0 - Modulare e ottimizzata
 * ========================================================================= */

/* === LAYOUT PRINCIPALE === */
.login-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: calc(100vh - 80px);
    position: relative;
    overflow: hidden;
}

/* === BACKGROUND EFFECTS === */
.login-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.floating-orb:nth-child(1) {
    top: 10%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: rgba(59, 130, 246, 0.6);
    animation-delay: 0s;
}

.floating-orb:nth-child(2) {
    top: 60%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: rgba(147, 51, 234, 0.6);
    animation-delay: 2s;
}

.floating-orb:nth-child(3) {
    bottom: 10%;
    left: 50%;
    width: 250px;
    height: 250px;
    background: rgba(236, 72, 153, 0.6);
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* === CARD E HEADER === */
.login-card {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.login-icon-container {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 0 auto 24px;
}

.gradient-text { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text; 
}

/* === FORM INPUTS === */
.input-field {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e5e7eb;
    background: #f9fafb;
}

.input-field:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    background: #ffffff;
    outline: none;
}

.input-field:hover {
    border-color: #d1d5db;
}

.password-toggle {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 6px;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* === BOTTONI === */
.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: none;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

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

.login-btn:hover:not(:disabled)::before {
    left: 100%;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

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

/* === ALERTS === */
.alert {
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

.alert-critical {
    background: rgba(220, 38, 38, 0.1);
    border: 2px solid rgba(220, 38, 38, 0.5);
    color: #dc2626;
}

.alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* === DEMO ACCOUNTS === */
.demo-account {
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.demo-account:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.demo-account:active {
    transform: translateY(0);
}

/* === FORM ELEMENTS === */
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid #d1d5db;
    accent-color: #667eea;
}

.form-checkbox:checked {
    background: #667eea;
    border-color: #667eea;
}

.form-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.form-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* === LOADING STATES === */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .login-section {
        padding: 20px 16px;
        min-height: calc(100vh - 60px);
    }
    
    .floating-orb {
        display: none;
    }
    
    .login-card {
        padding: 24px;
        margin: 0;
        border-radius: 20px;
    }
    
    .login-icon-container {
        width: 60px;
        height: 60px;
        border-radius: 16px;
        margin-bottom: 16px;
    }
    
    .gradient-text {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .input-field {
        padding: 12px 16px;
    }
    
    .login-btn {
        padding: 14px;
        font-size: 16px;
    }
    
    .demo-account {
        padding: 10px;
        margin-bottom: 8px;
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .input-field {
        background: rgba(55, 65, 81, 0.5);
        border-color: rgba(75, 85, 99, 0.5);
        color: white;
    }
    
    .input-field::placeholder {
        color: rgba(156, 163, 175, 0.8);
    }
    
    .form-label {
        color: #f3f4f6;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    .floating-orb,
    .input-field,
    .login-btn,
    .demo-account {
        animation: none;
        transition: none;
    }
    
    .login-btn::before {
        display: none;
    }
}

/* === FOCUS INDICATORS === */
.input-field:focus,
.login-btn:focus,
.form-checkbox:focus,
.password-toggle:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* === HIGH CONTRAST === */
@media (prefers-contrast: high) {
    .login-card {
        border: 3px solid #000;
        background: #fff;
    }
    
    .input-field {
        border: 2px solid #000;
        background: #fff;
    }
    
    .login-btn {
        background: #000;
        border: 2px solid #000;
    }
}