/* Accesso staff — direzione "Power": la foto della sala pesi a sinistra, il modulo a destra */
:root {
    --fuoco: #ff5a1f;
    --grad-fuoco: linear-gradient(135deg, #ff5a1f, #e8112d);
    --obliquo: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    color-scheme: dark;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: #0c0c0d;
    color: #f5f5f5;
    font-family: 'Barlow', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.ico {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.accesso {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr);
}

/* ── Foto ──────────────────────────────────────────────────── */
.accesso-foto {
    position: relative;
    background: #1a1a1c var(--foto) center / cover;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px 56px;
    /* Il bordo verso il modulo è obliquo, come i pulsanti */
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}
.accesso-foto::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(12, 12, 13, 0.92) 8%, rgba(12, 12, 13, 0.15) 60%),
        linear-gradient(120deg, transparent 55%, rgba(232, 17, 45, 0.35));
}
.accesso-foto > * { position: relative; }

.accesso-marchio {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'Barlow Condensed', sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: 3.6rem;
    line-height: 1;
    text-transform: uppercase;
}
.logo-tessera {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: var(--grad-fuoco);
    display: grid;
    place-items: center;
    transform: skewX(-8deg);
    flex: none;
}
.logo-tessera .ico { width: 36px; height: 36px; color: #fff; transform: skewX(8deg); }
.logo-immagine { width: 72px; height: 72px; object-fit: contain; flex: none; }

.accesso-motto {
    margin: 14px 0 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-style: italic;
    font-weight: 800;
    font-size: 1.6rem;
    text-transform: uppercase;
    color: var(--fuoco);
    max-width: 30ch;
}

/* ── Modulo ────────────────────────────────────────────────── */
.accesso-pannello {
    display: grid;
    place-items: center;
    padding: 48px 40px;
}
.accesso-modulo { width: 100%; max-width: 380px; }

.accesso-modulo h1 {
    margin: 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: 2.8rem;
    line-height: 1;
    text-transform: uppercase;
}
.accesso-sotto { color: #a1a1a6; margin: 10px 0 28px; line-height: 1.5; }

.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(232, 17, 45, 0.12);
    color: #ff6b62;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    color: #d1d1d6;
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 7px;
}
.campo { position: relative; }
.campo .ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8e8e93;
    pointer-events: none;
}
.form-input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    background: #1c1c1f;
    border: 1px solid #2a2a2e;
    border-radius: 10px;
    color: #f5f5f5;
    font: inherit;
    font-size: 1rem;
}
.form-input:focus {
    outline: none;
    border-color: var(--fuoco);
    box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.2);
}
.campo:focus-within .ico { color: var(--fuoco); }

.btn-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    padding: 15px;
    border: none;
    background: var(--grad-fuoco);
    color: #fff;
    font-family: 'Barlow Condensed', sans-serif;
    font-style: italic;
    font-weight: 800;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    clip-path: var(--obliquo);
}
.btn-login:hover { filter: brightness(1.08); }
.btn-login:focus-visible { clip-path: none; outline: 2px solid #fff; outline-offset: 2px; }

/* Lingue da destra a sinistra */
[dir="rtl"] .accesso-foto { clip-path: polygon(0 0, 100% 0, 100% 100%, 8% 100%); }
[dir="rtl"] .campo .ico { left: auto; right: 14px; }
[dir="rtl"] .form-input { padding: 13px 44px 13px 14px; }

/* Schermi stretti: la foto diventa una fascia in alto */
@media (max-width: 860px) {
    .accesso { grid-template-columns: 1fr; }
    .accesso-foto, [dir="rtl"] .accesso-foto {
        min-height: 240px;
        padding: 28px 24px;
        clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%);
    }
    .accesso-marchio { font-size: 2.4rem; }
    .logo-tessera { width: 48px; height: 48px; }
    .logo-tessera .ico { width: 26px; height: 26px; }
    .logo-immagine { width: 52px; height: 52px; }
    .accesso-motto { font-size: 1.2rem; }
    .accesso-pannello { padding: 28px 20px 40px; }
}
