/*
 * CSU Florence - Portale di attivazione WiFi
 * Palette neutra sobria. Per ri-brandizzare, cambia le variabili in :root.
 */

:root {
    /* Palette - cambia questi valori con i colori del logo CSU */
    --brand:        #1f4e6b;   /* colore principale (header, bottoni) */
    --brand-dark:   #16394f;   /* hover bottoni */
    --brand-tint:   #eaf1f5;   /* sfondi tenui, focus */
    --ink:          #1b2733;   /* testo primario */
    --ink-soft:     #5a6b7a;   /* testo secondario */
    --line:         #d9e0e6;   /* bordi */
    --bg:           #f4f6f8;   /* sfondo pagina */
    --card:         #ffffff;   /* sfondo card */
    --ok:           #1d7a54;   /* successo */
    --ok-tint:      #e6f4ee;
    --err:          #b23b3b;   /* errore */
    --err-tint:     #fbeaea;
    --radius:       10px;
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(20, 40, 60, 0.04);
}

.card__header {
    background: var(--brand);
    color: #fff;
    padding: 28px 28px 22px;
    text-align: center;
}

.card__logo {
    max-height: 48px;
    margin-bottom: 12px;
}

.card__title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card__subtitle {
    font-size: 14px;
    opacity: 0.85;
    margin-top: 4px;
    font-weight: 400;
}

.card__body {
    padding: 28px;
}

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    font-size: 16px;   /* 16px evita lo zoom automatico su iOS */
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}

.btn {
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    padding: 13px 16px;
    border: none;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

.btn:hover { background: var(--brand-dark); }
.btn:focus-visible { outline: 3px solid var(--brand-tint); outline-offset: 2px; }

.msg {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 18px;
}

.msg--error {
    background: var(--err-tint);
    color: var(--err);
    border: 1px solid #f0cccc;
}

.msg--ok {
    background: var(--ok-tint);
    color: var(--ok);
    border: 1px solid #c6e6d6;
}

.hint {
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: -8px;
    margin-bottom: 18px;
}

.rules {
    list-style: none;
    font-size: 13px;
    color: var(--ink-soft);
    margin: -6px 0 18px;
    padding-left: 0;
}

.rules li { padding: 2px 0 2px 20px; position: relative; }
.rules li::before {
    content: "•";
    position: absolute;
    left: 6px;
    color: var(--ink-soft);
}

.success-box { text-align: center; }

.success-box .ssid {
    display: inline-block;
    font-weight: 600;
    font-size: 18px;
    color: var(--brand);
    background: var(--brand-tint);
    padding: 8px 16px;
    border-radius: 8px;
    margin: 12px 0;
}

.footer {
    margin-top: 20px;
    font-size: 12px;
    color: var(--ink-soft);
    text-align: center;
}
