@keyframes slide {
    0% { transform: translateX(-25%); }
    100% { transform: translateX(25%); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-page-root {
    position: fixed;
    inset: 0;
    background: #001233;
    overflow: hidden;
}

.login-bg-wave {
    animation: slide 3s ease-in-out alternate;
    background-image: linear-gradient(-60deg, #001F3F 50%, #001A38 50%, #001233 50%);
    bottom: 0;
    left: -50%;
    opacity: .5;
    position: absolute;
    right: -50%;
    top: 0;
}

.login-center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 10vmin;
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.login-title {
    font-family: 'Poppins', 'Montserrat', sans-serif;
    color: white;
    font-size: 45px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -1px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25);
    padding: 40px;
    width: 500px;
    max-width: 95vw;
    text-align: left;
}

.login-form-header {
    margin-bottom: 28px;
}

.login-form-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px 0;
    font-family: 'Montserrat', sans-serif;
}

.login-form-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    font-family: 'Roboto', sans-serif;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form .form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-family: 'Roboto', sans-serif;
}

.login-form .form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    background: white;
    color: #111827;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}

.login-form .form-control:focus {
    border-color: #3a7d44;
    box-shadow: 0 0 0 3px rgba(58, 125, 68, 0.12);
}

.login-form .form-control.is-invalid {
    border-color: #ef4444;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.password-toggle:hover { color: #374151; }

.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
}

.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #3a7d44 0%, #4e9e5a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Roboto', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(58, 125, 68, 0.4);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
