/**
 * ============================================================================
 * AUTH SCREEN STYLES
 * ============================================================================
 * Stili per la schermata di login/signup
 */

#auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 10000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-y: auto;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    margin: auto 0;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.auth-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 800;
}

.auth-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    font-weight: 500;
}

.auth-form {
    padding: 40px 30px;
}

.auth-form h2 {
    margin: 0 0 30px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

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

.form-group input::placeholder {
    color: #999;
}

.auth-error {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
    text-align: center;
}

.auth-success {
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
    text-align: center;
    line-height: 1.5;
}

.auth-subtitle {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: -10px 0 24px 0;
    line-height: 1.5;
}

.forgot-password-link {
    margin-bottom: 12px !important;
}

.forgot-password-link a {
    font-size: 13px;
    color: #667eea;
}

/* Password Field with Toggle */
.password-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field-wrapper input {
    width: 100%;
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.password-toggle i {
    font-size: 14px;
}

/* Password Requirements Checklist */
.password-requirements-list {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.requirement i {
    font-size: 12px;
    width: 14px;
    text-align: center;
}

.requirement.valid {
    color: #10b981;
}

.requirement.valid i {
    color: #10b981;
}

.requirement.invalid {
    color: #9ca3af;
}

.requirement.invalid i {
    color: #d1d5db;
}

.auth-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

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

.auth-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.auth-btn-secondary:hover {
    background: #f5f7ff;
    transform: translateY(-2px);
}

.auth-btn-google {
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
}

.auth-btn-google:hover {
    background: #f8f9fa;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-btn-google svg {
    flex-shrink: 0;
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Auth Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    position: relative;
    display: inline-block;
    padding: 0 16px;
    background: white;
    color: #999;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Magic Link Section */
.magic-link-section {
    margin: 0;
}

.magic-link-hint {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #999;
    text-align: center;
    font-style: italic;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
}

.auth-footer p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 500px) {
    .auth-container {
        padding: 10px;
    }

    .auth-header {
        padding: 30px 20px;
    }

    .auth-header h1 {
        font-size: 28px;
    }

    .auth-form {
        padding: 30px 20px;
    }

    .auth-form h2 {
        font-size: 20px;
    }
}

/* User info display nell'app */
#user-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

#user-info-bar .user-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

#user-info-bar .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

#user-info-bar .user-text {
    display: flex;
    flex-direction: column;
}

#user-info-bar .user-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
}

#user-info-bar .user-agency {
    font-size: 12px;
    color: #666;
}

#logout-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

#logout-btn:hover {
    background: #f5f5f5;
    color: #333;
    border-color: #ccc;
}
