/* --- VARIABILI (Estratte dal tuo style.css originale) --- */
:root {
    --primary: #0f172a;       
    --accent: #2563eb;        
    --accent-hover: #1d4ed8;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --font-family: 'Inter', sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --success: #10b981; /* Aggiunto per feedback positivo */
}

/* --- BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font-family); }

body { 
    background: var(--bg-body); 
    color: var(--text-main); 
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Texture di sfondo professionale */
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
    padding: 20px;
}

/* --- CONTENITORE CARD --- */
.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

/* Header */
.auth-header { text-align: center; margin-bottom: 2rem; }

.logo-box {
    height: 50px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo-box img { height: 100%; }

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- FORM STYLES (Coerenti con Pagina Profilo) --- */
.form-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1.2rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Input Styles */
.styled-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--primary);
    background: #f8fafc;
    transition: var(--transition);
}

.styled-input:focus {
    background: white;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Icon Management */
.input-with-icon { position: relative; }

.input-with-icon svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2;
    pointer-events: none;
    transition: stroke 0.2s;
}

.styled-input.pl-icon { padding-left: 42px; }
.styled-input:focus + svg { stroke: var(--accent); }

/* Checkbox Terms */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.form-check a { color: var(--accent); text-decoration: none; font-weight: 500; }
.form-check a:hover { text-decoration: underline; }

/* Button */
.btn-full {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-full:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.25);
}

.btn-full:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Footer Link */
.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

/* Animazioni */
.fade-in { animation: fadeInUp 0.5s ease-out; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media(max-width: 480px) {
    .form-grid-row { grid-template-columns: 1fr; }
    .auth-card { padding: 1.5rem; }
}