/* ── LOGIN / REGISTER CARD ─────────────────────────────────────────────────
   Usato da login.php e register.php. Stesso linguaggio visivo del resto del
   sito (Exo 2 / Orbitron, sfondo #000008, accento viola). */

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

body {
    background: #000008;
    font-family: 'Exo 2', sans-serif;
    overflow-x: hidden;
}

.login-stage {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    overflow: hidden;
    background: #000008;
}

#stars-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 44px 40px 40px;
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.login-card-head {
    text-align: center;
    margin-bottom: 30px;
}

.login-orb {
    width: 44px;
    height: 44px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 32%, rgba(160, 140, 255, 0.9), rgba(70, 50, 180, 0.4) 60%, transparent 100%);
    box-shadow: 0 0 30px rgba(140, 120, 255, 0.35);
}

.login-card-head h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 10px;
}

.login-card-head p {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    margin: 0;
}

/* ── Form ─────────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-field-label {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.login-field input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 13px 16px;
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-field input::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

.login-field input:focus {
    border-color: rgba(140, 120, 255, 0.55);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(140, 120, 255, 0.12);
}

.login-pwd-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-pwd-wrap input {
    padding-right: 46px;
}

.login-pwd-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.login-pwd-toggle:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
}

.login-submit {
    width: 100%;
    margin-top: 6px;
    background: linear-gradient(135deg, rgba(140, 120, 255, 0.9), rgba(100, 80, 220, 0.9));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 30px rgba(120, 100, 240, 0.25);
}

.login-submit:hover {
    opacity: 0.92;
    box-shadow: 0 10px 36px rgba(120, 100, 240, 0.4);
}

.login-submit:active {
    transform: scale(0.98);
}

.login-error {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.25);
    border-radius: 10px;
    padding: 12px 16px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.75rem;
    color: #ff6b76;
    margin-bottom: 20px;
    line-height: 1.5;
}

.login-footnote {
    text-align: center;
    margin-top: 26px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.76rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.35);
}

.login-footnote a {
    color: rgba(180, 160, 255, 0.85);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
}

.login-footnote a:hover {
    color: #fff;
}

.login-forgot-link {
    display: inline-block;
    margin-top: 8px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-forgot-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* ── Register.php — campi aggiuntivi ─────────────────────────────────────── */
.login-card-wide {
    max-width: 480px;
}

.entity-toggle {
    display: flex;
    gap: 8px;
}

.entity-toggle-btn {
    flex: 1;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.74rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
}

.entity-toggle-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.entity-toggle-btn.active {
    background: rgba(140, 120, 255, 0.14);
    border-color: rgba(140, 120, 255, 0.5);
    color: #fff;
}

/* Contiene i due campi "Tipo di codice" e "Codice di fatturazione" - senza
   questo gap i due .login-field interni restano appiccicati, dato che il
   gap di .login-form si applica solo ai suoi figli diretti. */
#tax-id-block {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Testo fisso al posto del select quando c'è un solo tipo disponibile per
   il paese scelto - stessa dimensione/font dell'input, ma non interattivo. */
.login-fixed-value {
    display: block;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
}

.login-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 13px 16px;
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    color-scheme: dark;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-select option {
    background: #0a0a14;
    color: #fff;
}

.login-select:focus {
    border-color: rgba(140, 120, 255, 0.55);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(140, 120, 255, 0.12);
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 480px) {
    .login-stage { padding: 100px 16px 60px; }
    .login-card { padding: 32px 24px 28px; border-radius: 18px; }
    .login-card-head h1 { font-size: 1.25rem; }
}