/*
 * login.css - Allineato al nuovo Brand Style
 * Percorso: public/assets/css/login.css
 */

/* Variabili del nuovo stile applicate al contesto login */
:root {
    --ink:       #1c2b3a;
    --ink-light: #4a6070;
    --ink-faint: #8fa5b4;
    --sage:      #4a8c6f;
    --sage-light:#e8f3ee;
    --sage-mid:  #c2ddd0;
    --paper:     #fafaf8;
    --card:      #ffffff;
    --rule:      #e5e8ea;
    --warn-bg:   #fffbf0;
    --warn-bdr:  #e8c84a;
    --radius:    10px;
    --shadow:    0 2px 12px rgba(28,43,58,.07);
    --shadow-lg: 0 6px 32px rgba(28,43,58,.10);
    --font-main: 'DM Sans', sans-serif;
    --font-serif: 'Libre Baskerville', serif;
}

/* ================================================================
   LAYOUT PAGINA LOGIN
   ================================================================ */
body.page-login {
    background: var(--paper); /* Sostituito gradiente blu con sfondo paper */
    font-family: var(--font-main);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px 0;
}

/* Texture di sfondo opzionale simile all'header strip */
body.page-login::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 300px;
    background: var(--ink);
    z-index: -1;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 0% 100%);
}

/* ================================================================
   WRAPPER CENTRATO
   ================================================================ */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 0 15px;
    margin: 0 auto;
    position: relative;
}

/* ================================================================
   LOGO / INTESTAZIONE
   ================================================================ */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
    color: #fff; /* Resta bianco per contrasto con la fascia scura top */
}
.login-logo i {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    color: var(--sage-mid);
}
.login-logo h2 {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}
.login-logo small {
    font-size: 14px;
    opacity: 0.8;
    display: block;
    font-weight: 300;
}

/* ================================================================
   PANEL LOGIN (CARD)
   ================================================================ */
.login-panel {
    background: var(--card);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-panel .panel-heading {
    background: var(--sage-light);
    color: var(--sage);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    padding: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--rule);
}

.login-panel .panel-body {
    padding: 32px 28px;
    background: var(--card);
}

/* ================================================================
   FORM CONTROLS
   ================================================================ */
.login-panel .form-group {
    margin-bottom: 20px;
}

.login-panel .form-control {
    height: 48px;
    background: var(--paper);
    border: 1.5px solid var(--rule);
    border-radius: 7px;
    font-family: var(--font-main);
    font-size: 14px;
    color: var(--ink);
    padding: 10px 15px;
    transition: border-color .18s, box-shadow .18s;
}

.login-panel .form-control:focus {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px var(--sage-light);
    outline: none;
}

 
/* ================================================================
   ALERT ERRORE (STYLE WARN)
   ================================================================ */
.login-alert {
    background: var(--warn-bg);
    border: 1px solid var(--warn-bdr);
    border-left: 4px solid var(--warn-bdr);
    border-radius: 6px;
    font-size: 13px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #7a6000;
}
.login-alert i { margin-right: 8px; }

/* ================================================================
   PULSANTE ACCEDI (STYLE SAGE)
   ================================================================ */
.btn-login {
    width: 100%;
    height: 50px;
    background: var(--sage);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .18s, transform .1s, box-shadow .18s;
    box-shadow: 0 3px 12px rgba(74,140,111,.2);
    margin-top: 10px;
}

.btn-login:hover {
    background: #3d7a5f;
    box-shadow: 0 5px 18px rgba(74,140,111,.3);
}

.btn-login:active {
    transform: scale(.98);
}

/* ================================================================
   FOOTER PANEL
   ================================================================ */
.login-footer {
    text-align: center;
    color: var(--ink-faint);
    font-size: 13px;
    margin-top: 24px;
}

.login-footer a {
    color: var(--ink-light);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    color: var(--sage);
}