/* ============================================================
   sign_in.css — Stili pagine login e registrazione
   Sito: Lavanderia L'ApeGreen
   Percorso: lavanderialapegreen/css/sign_in.css
   ============================================================ */

@import url('style.css');

/* ------------------------------------------------------------
   PAGINA — sfondo a schermo intero
   ------------------------------------------------------------ */
.login-page {
    background-color: #EEF0F5;
    min-height: calc(100vh);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem var(--spacing-md);
}

.login-wrapper,
.reg-wrapper {
    width: 100%;
    max-width: 420px;
}

.reg-wrapper { max-width: 560px; }

/* ------------------------------------------------------------
   LOGO SOPRA LA CARD
   ------------------------------------------------------------ */
.login-logo {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

.login-logo span { color: var(--btn-bg); }

/* ------------------------------------------------------------
   CARD
   ------------------------------------------------------------ */
.login-card,
.reg-card {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 100%;
    padding: 1.8rem 1.8rem;
}

/* ------------------------------------------------------------
   HEADER
   ------------------------------------------------------------ */
.login-header { text-align: center; margin-bottom: 1.2rem; }

.login-icon {
    width: 220px;
    max-width: 80%;
    height: auto;
    margin: 0 auto 0.8rem;
}

.login-icon img {
    display: block;
    width: 100%;
    height: auto;
}

.login-header h1 { font-size: 1.2rem; font-weight: 700; color: var(--color-text); margin-bottom: 0; }
.login-header p { font-size: 13px; color: var(--color-text-muted); }

/* ------------------------------------------------------------
   FORM LOGIN
   ------------------------------------------------------------ */
.login-form { display: flex; flex-direction: column; gap: 0.7rem; }

.login-field { display: flex; flex-direction: column; gap: 4px; }

.login-field label { font-size: 13px; font-weight: 600; color: var(--color-text); }

.login-input-wrapper { position: relative; display: flex; align-items: center; }

.login-input-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px; color: var(--color-text);
    background: #FAFAFA; outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input-wrapper input:focus {
    border-color: var(--btn-bg);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #FFFFFF;
}

.input-icon-right {
    position: absolute; right: 12px;
    color: #9B9B9B; font-size: 14px;
    pointer-events: none;
}

.input-icon-toggle {
    position: absolute; right: 12px;
    color: #9B9B9B; font-size: 14px;
    cursor: pointer; background: none; border: none;
    padding: 4px; transition: color 0.2s ease;
}
.input-icon-toggle:hover { color: var(--btn-bg); }

.login-forgot { text-align: right; font-size: 12px; }
.login-forgot a { color: var(--btn-bg); text-decoration: none; }

/* ------------------------------------------------------------
   PULSANTI
   ------------------------------------------------------------ */
.login-btn {
    background: var(--btn-bg); color: #FFFFFF;
    border: none; border-radius: 8px;
    padding: 11px; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: background 0.2s ease, transform 0.15s ease;
    margin-top: 0.3rem;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; text-decoration: none;
}
.login-btn:hover { background: var(--btn-bg-hover); transform: translateY(-1px); }

.login-btn-outline {
    background: transparent; color: var(--btn-bg);
    border: 1.5px solid var(--btn-bg); border-radius: 8px;
    padding: 10px; font-size: 14px; font-weight: 500;
    cursor: pointer; font-family: inherit;
    transition: background 0.2s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; text-decoration: none;
}
.login-btn-outline:hover { background: #EFF6FF; }

/* ------------------------------------------------------------
   DIVIDER
   ------------------------------------------------------------ */
.login-divider {
    display: flex; align-items: center; gap: 0.8rem; margin: 0.3rem 0;
}
.login-divider hr { flex: 1; border: none; border-top: 0.5px solid var(--border-color); }
.login-divider span { font-size: 11px; color: #9B9B9B; }

/* ------------------------------------------------------------
   ALERT
   ------------------------------------------------------------ */
.login-alert {
    background: #FEE2E2; color: #991B1B;
    border: 1px solid #FCA5A5; border-radius: 8px;
    padding: 0.7rem 1rem; font-size: 13px;
    display: none; align-items: center; gap: 8px; margin-bottom: 0.8rem;
}

.login-alert-success {
    background: #D1FAE5; color: #065F46;
    border: 1px solid #6EE7B7; border-radius: 8px;
    padding: 0.7rem 1rem; font-size: 13px;
    display: none; align-items: center; gap: 8px; margin-bottom: 0.8rem;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.login-footer { text-align: center; margin-top: 0.8rem; font-size: 12px; color: #9B9B9B; }
.login-footer a { color: var(--btn-bg); text-decoration: none; }

/* ============================================================
   FORM REGISTRAZIONE
   ============================================================ */
.reg-form { display: flex; flex-direction: column; gap: 0; }

.reg-section { margin-bottom: 1.5rem; }

.reg-section-title {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--btn-bg); margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #EEF0F5;
    display: flex; align-items: center; gap: 6px;
}

.reg-grid { display: flex; flex-direction: column; gap: 0.8rem; }
.reg-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

.reg-field { display: flex; flex-direction: column; gap: 4px; }

.reg-field label {
    font-size: 12px; font-weight: 600; color: var(--color-text);
    display: flex; align-items: center; gap: 4px;
}

.reg-required { color: #DC2626; }
.reg-optional { color: #9B9B9B; font-weight: 400; font-size: 11px; }

.reg-input-wrapper { position: relative; display: flex; align-items: center; }

.reg-input-wrapper input,
.reg-input-wrapper select {
    width: 100%;
    padding: 9px 36px 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px; color: var(--color-text);
    background: #FAFAFA; outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
}

.reg-input-wrapper input:focus,
.reg-input-wrapper select:focus {
    border-color: var(--btn-bg);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #FFFFFF;
}

.input-readonly {
    background: #F0F7FF !important;
    color: #1E40AF !important;
    font-weight: 500 !important;
}

.input-autofilled {
    background: #F0F7FF !important;
    border-color: #93C5FD !important;
    color: #1E40AF !important;
    font-weight: 500 !important;
}

.input-icon {
    position: absolute; right: 10px;
    color: #9B9B9B; font-size: 13px;
    pointer-events: none;
}

/* Autocomplete */
.autocomplete-list {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 160px; overflow-y: auto;
    z-index: 100; display: none;
}

.autocomplete-list.open { display: block; }

.autocomplete-item {
    padding: 8px 12px;
    font-size: 13px; color: var(--color-text);
    cursor: pointer;
    transition: background 0.15s ease;
}
.autocomplete-item:hover { background: #EEF0F5; color: var(--btn-bg); }

/* CF note */
.reg-cf-note {
    font-size: 11px; color: var(--color-text-muted);
    margin-top: 3px; display: flex; align-items: center; gap: 4px;
}

/* Password strength */
.pwd-strength {
    margin-top: 5px;
    display: flex; gap: 4px; align-items: center;
}

.pwd-strength-bar {
    flex: 1; height: 4px; border-radius: 2px;
    background: var(--border-color);
    transition: background 0.3s ease;
}

.pwd-strength-label {
    font-size: 11px; color: #9B9B9B;
    white-space: nowrap; min-width: 50px; text-align: right;
}

.strength-1 .pwd-strength-bar:nth-child(1) { background: #EF4444; }
.strength-1 .pwd-strength-label { color: #EF4444; }
.strength-2 .pwd-strength-bar:nth-child(-n+2) { background: #F59E0B; }
.strength-2 .pwd-strength-label { color: #F59E0B; }
.strength-3 .pwd-strength-bar:nth-child(-n+3) { background: #3B82F6; }
.strength-3 .pwd-strength-label { color: #3B82F6; }
.strength-4 .pwd-strength-bar { background: #10B981; }
.strength-4 .pwd-strength-label { color: #10B981; }

/* ------------------------------------------------------------
   MESSAGGI VALIDAZIONE CAMPI
   ------------------------------------------------------------ */
.reg-field-msg {
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

.msg-success { color: #065F46; }
.msg-error   { color: #991B1B; }
.msg-warning { color: #92400E; }

/* ------------------------------------------------------------
   CHECKBOX CONSENSO PRIVACY
   ------------------------------------------------------------ */
.reg-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
    font-weight: 400 !important;
}

.reg-checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--btn-bg);
    cursor: pointer;
}

.reg-checkbox-label a {
    color: var(--btn-bg);
    text-decoration: underline;
}

/* ------------------------------------------------------------
   RESPONSIVE — MOBILE
   ------------------------------------------------------------ */
@media (max-width: 575px) {
    .reg-grid-2 { grid-template-columns: 1fr; }
    .login-page { align-items: flex-start; padding-top: 1.5rem; }
}