/**
 * Login/Registration Page Styles
 * Stile Josetta Saffirio - Design elegante e minimalista
 * Version: 1.5.0 - Icone email e lucchetto rimosse
 */

/* CSS Variables - Josetta Saffirio Style */
:root {
    --primary-beige: #EAE5D9;
    --accent-gold: #A39067;
    --text-dark: #333333;
    --text-light: #6B7280;
    --white: #FFFFFF;
    --border-light: #E5E7EB;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-elegant: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    background-color: var(--white);
    overflow: hidden;
}

.login-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    opacity: 1;
    z-index: 1;
}

.login-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
}

.login-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 3.5rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-elegant);
    border: 1px solid var(--border-light);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 3rem;
}

.login-logo {
    margin-bottom: 1.5rem;
    width: 120px;
    height: auto;
}

.login-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 3rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.setup-password-link {
    text-align: center;
    margin-bottom: 2rem;
}

.setup-link {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-gold);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-gold);
    border-radius: 20px;
    transition: all 0.3s ease;
    background: transparent;
}

.setup-link:hover {
    background: var(--accent-gold);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(163, 144, 103, 0.2);
}

.login-form {
    margin-bottom: 2.5rem;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-light);
    z-index: 2;
}

.form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(163, 144, 103, 0.1);
}

.form-control:focus + .input-icon {
    color: var(--accent-gold);
}

.form-control::placeholder {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Password Toggle Button - Elegant Style */
.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(163, 144, 103, 0.2);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.password-toggle:hover {
    background: rgba(163, 144, 103, 0.1);
    border-color: var(--accent-gold);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(163, 144, 103, 0.15);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.password-toggle:focus {
    outline: none;
    background: rgba(163, 144, 103, 0.1);
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(163, 144, 103, 0.1);
}

.eye-icon {
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 18px;
    height: 18px;
}

.password-toggle:hover .eye-icon {
    color: var(--accent-gold);
    transform: scale(1.1);
}

/* Adjust input padding when password toggle is present */
.input-with-icon:has(.password-toggle) .form-control {
    padding-right: 3.5rem;
}

/* Special styling for password field when focused */
.input-with-icon:has(.password-toggle) .form-control:focus {
    padding-right: 3.5rem;
}

/* Animation for password toggle state change */
.password-toggle.animating .eye-icon {
    animation: eyeBlink 0.3s ease-in-out;
}

@keyframes eyeBlink {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

/* Checkbox piccolissimo e rotondo - FORCE UPDATE */
.form-check-input {
    width: 0.75rem !important;
    height: 0.75rem !important;
    margin-right: 0.5rem;
    border: 1.5px solid var(--border-light);
    border-radius: 50% !important;
    background: var(--white);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.form-check-input:hover {
    border-color: var(--accent-gold);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(163, 144, 103, 0.15);
}

.form-check-input:checked {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(163, 144, 103, 0.3);
}

.form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 0.5rem;
    font-weight: bold;
    animation: checkmarkAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkmarkAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.form-check-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.form-check:hover .form-check-label {
    color: var(--accent-gold);
}

.login-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    background: var(--accent-gold);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: #8B7A5A;
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn::after {
    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::after {
    left: 100%;
}

.login-btn-text {
    position: relative;
    z-index: 1;
}

.login-links {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--accent-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: #8B7A5A;
    text-decoration: underline;
}

.login-separator {
    position: relative;
    text-align: center;
    margin: 2rem 0;
    color: var(--text-light);
}

.login-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-light);
}

.login-separator-text {
    background: var(--white);
    padding: 0 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text-light);
    position: relative;
    z-index: 1;
}

.register-cta {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.register-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.register-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-gold);
    background: transparent;
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.register-btn:hover {
    background: var(--accent-gold);
    color: var(--white);
    transform: translateY(-1px);
}

.register-btn:active {
    transform: translateY(0);
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: alertFadeIn 0.3s ease-out;
}

@keyframes alertFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert svg {
    flex-shrink: 0;
}

.alert-error {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.alert-success {
    background: #F0FDF4;
    color: #16A34A;
    border: 1px solid #BBF7D0;
}

.alert-info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.support-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--accent-gold);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    margin-top: 0.5rem;
}

.support-link:hover {
    color: #8B7A5A;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .login-btn {
        font-size: 0.85rem !important;
        padding: 0.85rem 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .login-container {
        margin: 1rem;
        padding: 2rem;
    }
    
    .login-title {
        font-size: 1.8rem;
    }
    
    .login-btn {
        font-size: 0.8rem !important;
        padding: 0.75rem 1.25rem !important;
    }
}

.login-decoration {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(163, 144, 103, 0.1);
    border-radius: 50%;
    z-index: 0;
    animation: rotate 20s linear infinite;
}

.login-decoration:nth-child(1) {
    top: 10%;
    left: 10%;
    width: 150px;
    height: 150px;
}

.login-decoration:nth-child(2) {
    bottom: 10%;
    right: 10%;
    width: 100px;
    height: 100px;
    animation-direction: reverse;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
