/* login.css - Stili per la pagina di login */
/* Basato sullo stile ufficiale UNINT (www.unint.eu) */

@import url('../vendor/fonts/fonts.css'); /* Inter + Lato locali, no CDN latency */

:root {
    --primary-color: #0076CC;
    --secondary-color: #C1001F;
    --bg-dark: #171720;
    --text-color: #000000;
    --text-muted: #707071;
    --border-color: #dee2e6;
    --transition-speed: 0.3s;
}

/* Reset e box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Stili del body */
body {
    font-family: 'Inter', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* Pattern di sfondo come UNINT */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

/* Container principale del login */
.login-container {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 440px;
    animation: slideUp 0.6s ease-out;
    position: relative;
    z-index: 1;
}

/* Animazione slide up */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del login */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 2.25rem;
    margin-bottom: 10px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
}

/* Form group */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 118, 204, 0.1);
}

/* Pulsante login */
.btn-login {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover {
    background-color: #005aa3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 118, 204, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* Messaggi di errore */
.error-message {
    background-color: #fee;
    color: #c33;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
}

/* Animazione shake per errori */
@keyframes shake {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
}

/* Footer del login */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.login-footer p {
    color: #666;
    font-size: 12px;
}

/* Icone nei campi input */
.input-icon {
    position: relative;
}

.input-icon input {
    padding-left: 45px;
}

.input-icon::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-size: contain;
    opacity: 0.5;
}

/* Icona utente */
.input-icon.user::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z' /%3E%3C/svg%3E");
}

/* Icona password */
.input-icon.password::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z' /%3E%3C/svg%3E");
}

/* Media query per mobile */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
        margin: 10px;
    }

    .login-header h1 {
        font-size: 24px;
    }
}
