:root {
    --primary-blue: #1848a0;
    --light-bg: #e1ecf7;
    --text-dark: #001f65;
    --gradient-btn: linear-gradient(180deg, #001f65 0%, #6895fd 100%);
    --emergency-red: linear-gradient(180deg, #d9534f 0%, #ff4d4d 100%);
    --success-green: #2e7d32;
    /* Font sizes default */
    --fs-h1: 2.2rem;
    --fs-h2: 1.6rem;
    --fs-body: 1rem;
    --fs-small: 0.85rem;
}

/* 1. Base Setup & Responsive Font Root */
html {
    font-size: 16px;
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    :root {
        --fs-h1: 1.8rem;
        --fs-h2: 1.4rem;
    }
}

body, html {
    margin: 0; padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--light-bg);
    min-height: 100vh;
    color: var(--text-dark);
}

/* 2. Header Section */
.header {
    background-color: var(--primary-blue);
    min-height: 30vh;
    height: auto;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.logo-img {
    width: clamp(120px, 40vw, 200px);
    height: auto;
}

.header-text h1 {
    margin: 0;
    font-size: var(--fs-h1);
    font-weight: 800;
    line-height: 1;
}

.text-now { color: #bfe5ef; }
.header-text p { opacity: 0.9; font-size: var(--fs-small); margin: 5px 0 0; }

@media (min-width: 768px) {
    .header-content { flex-direction: row; text-align: left; }
    .header { height: 35vh; }
}

/* 3. Login Card Section */
.login-container {
    display: flex;
    justify-content: center;
    margin-top: -60px;
    padding: 0 15px 40px;
}

.login-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-sizing: border-box;
}

.welcome-title {
    color: var(--text-dark);
    font-size: var(--fs-h2);
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    margin-bottom: 25px;
    font-size: var(--fs-small);
}

/* 4. Inputs & Icons */
.input-group {
    position: relative;
    margin-bottom: 15px;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-group svg:not(.eye-icon) {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: var(--primary-blue);
    z-index: 2;
}

.input-group input {
    width: 100%;
    padding: 12px 45px 12px 45px; 
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    font-size: var(--fs-body);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

/* Eye Icon logic */
.eye-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    fill: #ccc !important;
    z-index: 3;
    opacity: 0; /* Sorok masa awal */
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Class 'active' dipanggil oleh JavaScript */
.eye-icon.active {
    opacity: 1;
    pointer-events: auto;
}

/* 5. Links & Buttons */
.forgot-link {
    display: block;
    text-align: right;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.8rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 30px;
    background: var(--gradient-btn);
    color: white;
    font-size: var(--fs-body);
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.login-btn:hover { transform: scale(1.02); }
.login-btn:active { transform: scale(0.98); }

.signup-text {
    margin-top: 20px;
    font-size: var(--fs-small);
    color: #666;
}

.signup-text a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: bold;
}

/* 6. Status Modal (Consistent with Signup/Search) */
.modal {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: none; /* Controlled via JS */
    justify-content: center; align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
    padding: 20px;
    box-sizing: border-box;
}

.status-card {
    background: white;
    padding: 2rem;
    border-radius: 25px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.status-icon-circle {
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: white;
}

.status-error-bg { background-color: #dc3545; }
.status-success-bg { background-color: #28a745; }

.status-btn {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 30px;
    background: var(--primary-blue);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

/* Error Message Inline */
.error-msg {
    display: none;
    color: #d9534f;
    background: #f9f2f2;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.8rem;
    border: 1px solid #ffcccc;
}