/* css/login_standard.css - Modifierad för att centrera allt */

/* Grundläggande sidstil med gradient */
body.login-page {
    font-family: 'Nunito', sans-serif;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #81d4fa, #4fc3f7, #42a5f5);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-bottom: 0;
}

/* Behållare för inloggning */
.login-container {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center; /* <--- Denna centrerar allt */
    max-width: 380px;
    width: 95%;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Appens titel */
.app-title {
    color: #546e7a;
    margin-bottom: 0.2rem;
    font-size: 1.1em;
    font-weight: normal;
}

/* Ikonen */
.login-icon {
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
    color: #4fc3f7;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    line-height: 1;
    animation: pulseIcon 3s infinite ease-in-out;
}
.login-icon svg {
    stroke: currentColor; 
}


/* Rubrik H1 */
.login-container h1 {
    color: #37474f;
    margin-bottom: 0.4rem;
    font-size: 1.7rem;
}

/* Brödtext P */
.login-container p {
    color: #546e7a;
    margin-bottom: 1.5rem;
    font-size: 0.95em;
}

/* Formulärgruppering */
.login-form .form-group {
    margin-bottom: 1.2rem;
    /* ========================================================== */
    /* FIX: Raden 'text-align: left;' är borttagen här. */
    /* Nu ärvs 'text-align: center;' från .login-container. */
    /* ========================================================== */
}

/* Label */
.login-form label {
    display: block; 
    font-weight: 700; 
    margin-bottom: 0.4rem;
    color: #455a64;
    font-size: 0.85em;
}

/* Input-fält */
.login-form input[type="text"],
.login-form input[type="password"] {
    padding: 0.8rem 1rem;
    border: 1px solid #cfd8dc;
    /* VIKTIGT: Lägg till text-align: left; här så att texten inuti rutan */
    /* börjar från vänster som användaren förväntar sig. */
    text-align: left;
}

/* Input-fält fokus */
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.15);
}

/* Knapp */
.login-form button.login-submit-btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

/* Förbättrad Knapp Hover Effekt */
.login-form button.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
/* Knapp Active */
.login-form button.login-submit-btn:active {
    transform: scale(0.98);
    box-shadow: none;
}


/* --- Keyframes för animationer --- */
@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Applicera Entrance Animation på element med fördröjning --- */
.login-container > *:not(.error-message),
.login-form .form-group,
.login-form button {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}
.login-container .app-title { animation-delay: 0.1s; }
.login-container .login-icon { animation-delay: 0.2s; }
.login-container h1 { animation-delay: 0.3s; }
.login-container p { animation-delay: 0.4s; }
.login-container .error-message { opacity: 1; animation: none; }
.login-form .form-group:nth-of-type(1) { animation-delay: 0.5s; }
.login-form .form-group:nth-of-type(2) { animation-delay: 0.6s; }
.login-form button.login-submit-btn { animation-delay: 0.7s; }

