/* =====================================
   RESET BASE
===================================== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100vh; background: linear-gradient(135deg, #0e4166, #09293f); display: flex; justify-content: center; align-items: center; padding: 20px; }

/* =====================================
   LAYOUT PRINCIPALE
===================================== */
.auth-layout {
    width: 100%;
    max-width: 440px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* =====================================
   HEADER PRODUZIONE E DISCLAIMER LEGALE
===================================== */
.top-header-prod {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 15px;
    margin-bottom: 25px;
    animation: fadeSlide .5s ease;
}

.nav-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-switcher:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: #fff;
}

.legal-copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.15); /* Leggero sfondino per staccarlo dallo sfondo */
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}
.legal-copyright strong { color: rgba(255, 255, 255, 0.95); }

.legal-details {
    margin-top: 6px;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.85);
}

.legal-fineprint {
    margin-top: 8px;
    font-size: 9px;
    opacity: 0.6;
    letter-spacing: 0.2px;
    line-height: 1.3;
}

/* =====================================
   CARD E FORM
===================================== */
.auth-card {
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    overflow: hidden;
    animation: fadeSlide .45s ease;
}

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

.auth-tabs { display: flex; border-bottom: 1px solid #ddd; background: #f6f7f9; }
.auth-tabs .tab { flex: 1; padding: 14px; font-size: 15px; font-weight: 600; text-align: center; border: none; background: transparent; cursor: pointer; color: #555; transition: all .2s ease; }
.auth-tabs .tab:hover { background: #eaecef; }
.auth-tabs .tab.active { background: #ffffff; color: #0e4166; border-bottom: 3px solid #0e4166; }

.auth-form { padding: 26px 24px 30px; display: none; }
.auth-form.active { display: block; }
.auth-form h2 { text-align: center; font-size: 20px; margin-bottom: 24px; color: #0e4166; }

.field { position: relative; margin-bottom: 22px; }
.field input, .field select { width: 100%; padding: 14px 12px; font-size: 15px; border-radius: 12px; border: 1px solid #ccc; outline: none; background: #fff; appearance: none; }
.field input:focus, .field select:focus { border-color: #0e4166; }
.field label { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #777; pointer-events: none; background: #fff; padding: 0 6px; transition: .2s ease; }
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: -7px; font-size: 12px; color: #0e4166; }

.auth-form button { width: 100%; padding: 13px; border: none; border-radius: 14px; font-size: 15px; font-weight: bold; background: #0e4166; color: #fff; cursor: pointer; transition: .2s; }
.auth-form button:hover { background: #09293f; }

.feedback { margin-top: 16px; text-align: center; font-size: 14px; min-height: 18px; }
.feedback.success { color: #2e8b57; }
.feedback.error { color: #d9534f; }

.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.toggle-password { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); cursor: pointer; font-size: 16px; color: #0e4166; opacity: 0.6; user-select: none; }
.toggle-password:hover { opacity: 1; }

@media (max-width: 480px) {
    body { align-items: flex-start; }
    .auth-layout { margin-top: 20px; }
    .auth-form { padding: 22px 18px; }
}