/* public/css/utenti.css - LCARS Terminal Profile & Login */

body {
    background-color: #000 !important;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Inizia dall'alto per permettere lo scroll */
    padding: 40px 20px;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: #fff;
}

/* Contenitore Flessibile */
.form-container {
    width: 100%;
    max-width: 900px; /* Allargato per il profilo */
    background: #0a0a0a;
    padding: 40px;
    border-radius: 2px 40px 40px 2px;
    border-left: 20px solid #00cfb4;
    border-top: 1px solid #333;
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    box-shadow: 0 20px 50px rgba(235, 113, 14, 0.699);
}

/* Se è il login, lo teniamo stretto */
.login-terminal {
    max-width: 450px;
}

/* Impedisce al pulsante di logout di spezzarsi su due righe */
.header-actions a.btn-logout-white {
    white-space: nowrap;      /* Regola fondamentale: non andare mai a capo */
    display: inline-flex;     /* Allinea meglio testo e icona */
    align-items: center;      /* Centra verticalmente icona e testo */
    justify-content: center;
    min-width: fit-content;   /* Si assicura che il bordo segua il contenuto */
    color: #ff4d4d; 
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 5px 12px;
    border: 1px solid #ff4d4d;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

/* Ottimizzazione per schermi molto piccoli (sotto i 480px) */
@media (max-width: 480px) {
    .profile-header {
        flex-direction: column; /* Mette titolo e pulsante uno sopra l'altro */
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-actions a.btn-logout-white {
        margin-left: 0; /* Rimuove il margine se sono incolonnati */
        width: 100%;    /* Opzionale: rende il pulsante largo quanto il contenitore */
    }
}

.header-actions a.btn-logout-white:hover {
    background: #ff4d4d;
    color: #000;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.welcome-title {
    font-family: 'Courier New', monospace;
    color: #00cfb4;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    font-size: 1.6rem;
}

/* --- LA GRIGLIA (Il pezzo mancante) --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Due colonne */
    gap: 25px;
    margin-bottom: 10px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ff9d00 !important;
    font-weight: bold;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}
.admin-selector {
    color: #888;
}
/* Input e Select */
input, select {
    width: 100%;
    padding: 12px;
    background: #050505;
    color: #ffffff;
    border: 1px solid #00cfb4;
    border-radius: 0 12px 0 12px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: 0.3s;
}

input:focus, select:focus {
    border-color: #ff9d00;
    outline: none;
    box-shadow: 0 0 8px rgba(255, 157, 0, 0.4);
}

input[readonly] {
    background: #111;
    border-color: #333;
    color: #888;
    cursor: not-allowed;
}

/* Azioni */
.form-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.btn-save {
    flex: 2;
    background: #00cfb4;
    color: black;
    font-weight: bold;
    padding: 16px;
    border: none;
    border-radius: 0 0 20px 1px;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-save:hover { background: #ff9d00; }

.btn-delete {
    flex: 1;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    text-align: center;
    text-decoration: none;
    padding: 16px;
    border-radius: 12px 0 12px 0;
    font-weight: bold;
}

/* Modal Password */
.modal-overlay {
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.85);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}
.modal-content {
    background: #0a0a0a;
    padding: 30px;
    border-left: 15px solid #ff9d00;
    width: 90%; max-width: 400px;
}
.input-dark { margin-bottom: 15px; }
.btn-action {
    width: 100%; background: #ff9d00; color: #000;
    padding: 12px; border: none; cursor: pointer; font-weight: bold;
}

/* Rimuovi eventuali stili inline o sovrascrivi il bottone di reset */
.btn-link-pwd {
    display: inline-block;
    background: transparent !important; /* Forza la rimozione dello sfondo bianco */
    color: #00cfb4 !important;
    border: 1px solid #00cfb4 !important;
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px 0 12px 0;
}

.btn-link-pwd:hover {
    color: #ff9d00 !important;
    border-color: #ff9d00 !important;
    background: rgba(255, 157, 0, 0.1) !important;
    box-shadow: 0 0 15px rgba(255, 157, 0, 0.3);
}
/* --- 1. SISTEMAZIONE OCCHIO PASSWORD --- */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 45px; /* Spazio per l'occhio */
}

.eye-icon {
    position: absolute;
    right: 15px;
    cursor: pointer;
    user-select: none;
    color: #00cfb4;
    font-size: 1.2rem;
}

/* --- 2. SISTEMAZIONE CHECKBOX --- */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

/* Impedisce al checkbox di ereditare il width 100% degli input di testo */
.checkbox-group input[type="checkbox"] {
    width: auto; 
    margin: 0;
    cursor: pointer;
}

.remember-me-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #fff;
    font-size: 0.9rem;
}

.custom-label {
    margin-left: 10px;
    text-transform: none; /* Rende più leggibile il "Ricordami" */
    font-family: 'Inter', sans-serif;
}

/* --- 3. SISTEMAZIONE LINK REGISTRATI --- */
.link-footer-lcars {
    margin-top: 25px;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    font-family: 'Courier New', monospace;
}

.link-footer-lcars a {
    color: #00cfb4;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.link-footer-lcars a:hover {
    color: #ff9d00;
    border-bottom: 1px solid #ff9d00;
}
.system-footer {
    color: #888;
    text-align: center;
    margin-top: 10px;
    padding-top: 5px;
}
/* Responsive */
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column; }
}