/* ================================================================
   Base styles — SCE
   Colori primari definiti da include/theme.php via CSS custom props.
   Usare sempre var(--color-primary, fallback) nei nuovi stili.
   ================================================================ */

/* === Reset === */

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

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

/* === Environment banner (visibile solo in DEV) === */

.env-banner {
    background: var(--color-primary, #1d4ed8);
    color: #ffffff;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    letter-spacing: 0.02em;
}

.env-banner strong {
    font-weight: 700;
    letter-spacing: 0.05em;
}

.warning-banner {
    background: #854d0e;
    color: #ffffff;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
}

.warning-banner a {
    color: #fef9c3;
    text-decoration: underline;
    font-weight: 600;
}

.warning-banner a:focus-visible {
    outline: 2px solid #fef9c3;
    outline-offset: 2px;
    border-radius: 2px;
}

/* === Layout === */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 24px;
}

.login-box,
.page-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 32px;
}

/* === Headings === */

.login-box h1,
.page-card h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    line-height: 1.2;
}

/* === Typography helpers === */

.subtitle {
    margin: 0 0 24px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.help-text {
    margin-top: 18px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.password-hint {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

.mt-24 {
    margin-top: 24px;
}

/* === Links === */

a {
    color: var(--color-primary, #1d4ed8);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible {
    outline: 2px solid var(--color-primary, #1d4ed8);
    outline-offset: 2px;
    border-radius: 2px;
}

/* === Forms === */

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="tel"],
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: #1f2937;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--color-primary, #1d4ed8);
    box-shadow: 0 0 0 3px var(--color-focus-ring, rgba(37, 99, 235, 0.12));
}

/* === Buttons === */

.btn-login,
.btn-link,
.btn-primary {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    background: var(--color-primary, #1d4ed8);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 16px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    line-height: 1.4;
    font-family: inherit;
}

.btn-login {
    width: 100%;
}

.btn-login:hover,
.btn-link:hover,
.btn-primary:hover {
    background: var(--color-primary-hover, #1e40af);
    text-decoration: none;
}

.btn-login:focus-visible,
.btn-link:focus-visible,
.btn-primary:focus-visible {
    outline: 3px solid var(--color-primary, #1d4ed8);
    outline-offset: 3px;
}

/* === Alert boxes === */

.error-box {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-size: 14px;
}

.info-box,
.success-box {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 14px;
}
