/* ==========================================================================
   Stratum Core v2 — Template "login" backoffice (pagina fuori area)
   Shell dedicato, senza sidebar/menu: solo la card di accesso centrata.
   Bootstrap 5.3 fa da base; qui l'identità visiva e il form.
   ========================================================================== */

:root {
    --st-accent: #059669 !important;          /* indaco (coerente col tema default) */
    --st-accent-700: #4f46e5;
    --st-bg-1: #0f172a;            /* slate 900 */
    --st-bg-2: #111827;
    --st-card-bg: #ffffff;
    --st-fg: #1f2937;
    --st-muted: #6b7280;
    --st-border: #e5e7eb;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

.st-login-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--st-fg);
    background: radial-gradient(1200px 600px at 50% -10%, #1e293b 0%, var(--st-bg-1) 45%, var(--st-bg-2) 100%);
}

.st-login-card {
    width: 100%;
    max-width: 400px;
    background: var(--st-card-bg);
    border-radius: 1rem;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .45);
    padding: 2.25rem 2rem;
}

.st-login-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}
.st-login-brand img { height: 30px; }
.st-login-brand .st-login-name {
    font-weight: 700;
    letter-spacing: .14em;
    font-size: .95rem;
    margin-top: .5rem;
    color: #111827;
}
.st-login-brand .st-login-sub {
    font-size: .78rem;
    color: var(--st-muted);
}

/* Il frammento del componente usa .login-cpanel; lo stiliamo qui. */
.login-cpanel h1 {
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 1.25rem;
    color: #059669;
}
.login-cpanel form { display: flex; flex-direction: column; gap: .9rem; }
.login-cpanel label {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .82rem;
    font-weight: 500;
    color: #059669 !important;
}
.login-cpanel input {
    width: 100%;
    padding: .62rem .8rem;
    border: 1px solid var(--st-border);
    border-radius: .55rem;
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s;
}
.login-cpanel input:focus {
    outline: none;
    border-color: var(--st-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}
.login-cpanel button {
    margin-top: .4rem;
    padding: .7rem 1rem;
    border: 0;
    border-radius: .55rem;
    background: var(--st-accent);
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: background .15s;
}
.login-cpanel button:hover { background: var(--st-accent-700); }

#login-msg {
    margin: 1rem 0 0;
    text-align: center;
    font-size: .85rem;
    min-height: 1.2em;
    color: #b91c1c;
}

/* "Accedi con il telefono" (WebAuthn), mostrato solo quando previsto. */
.pk-wrap { margin-top: 1.1rem; }
.pk-sep {
    display: flex; align-items: center; gap: .6rem;
    color: var(--st-muted); font-size: .75rem; margin: .4rem 0 .9rem;
}
.pk-sep::before, .pk-sep::after {
    content: ""; flex: 1; height: 1px; background: var(--st-border);
}
.pk-btn {
    width: 100%;
    padding: .7rem 1rem;
    border: 1px solid var(--st-accent);
    border-radius: .55rem;
    background: #fff;
    color: var(--st-accent-700);
    font-weight: 600; font-size: .95rem;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    transition: background .15s, color .15s;
}
.pk-btn:hover { background: var(--st-accent); color: #fff; }

.st-login-foot {
    margin-top: 1.5rem;
    text-align: center;
    font-size: .75rem;
    color: var(--st-muted);
}

.st-login-lang { max-width: 220px; margin-left: auto; margin-right: auto; }
