:root {
    --primary-color: #E1212B;
    --primary-hover: #C11B24;
    --secondary-color: #2D2D2D;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;
    --white: #FFFFFF;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
}

/* ===== WRAPPER ===== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ===== LEFT SECTION (Image) ===== */
.image-section {
    position: relative;
    width: 60%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    background-color: #111;
}

.bg-train {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    animation: slowZoom 20s infinite alternate;
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.20) 0%,
        rgba(0,0,0,0.10) 40%,
        rgba(0,0,0,0.65) 100%
    );
    z-index: 2;
}

.brand-floating {
    position: relative;
    z-index: 3;
    padding: 2.5rem 3rem;
    width: 100%;
}

.logo-box {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.brand-logo-img {
    height: 82px;
    width: auto;
    filter: brightness(0) invert(1); /* Make logo white */
    object-fit: contain;
}

.brand-tagline {
    color: rgba(255,255,255,0.95);
    font-size:  1.275rem;
    /* 1.125rem; */
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

@keyframes slowZoom {
    from { transform: scale(1.0); }
    to   { transform: scale(1.08); }
}

/* ===== RIGHT SECTION (Form) ===== */
.form-section {
    width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    padding: 4rem 5rem;
    position: relative;
    overflow: hidden;
}

.right-mask-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 350px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    transform: rotate(10deg);
}

.form-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    animation: fadeSlideIn 0.6s ease-out;
}

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

/* ===== HEADER ===== */
.header {
    margin-bottom: 2.25rem;
}

.welcome-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.header-logo-img {
    height: 46px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

.header p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-top: 0.25rem;
}

/* ===== FORM ===== */
.input-group {
    margin-bottom: 1.375rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 2.75rem;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: var(--font-main);
    color: var(--text-main);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.input-wrapper input::placeholder {
    color: #9CA3AF;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(225, 33, 43, 0.12);
}

.input-wrapper input:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

/* Toggle password button */
.toggle-password {
    position: absolute;
    right: 0.9rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2;
}

.toggle-password:hover {
    color: var(--text-main);
}

/* Error message */
.form-error-msg {
    font-size: 0.8125rem;
    color: var(--primary-color);
    margin-top: 0.4rem;
    padding-left: 0.25rem;
}

/* ===== BUTTON ===== */
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.btn-login {
    width: 100%;
    padding: 0.9375rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    letter-spacing: 0.02em;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(225, 33, 43, 0.3);
}

.btn-login:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(225, 33, 43, 0.4);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(225, 33, 43, 0.3);
}

/* ===== DIVIDER ===== */
.divider-line {
    margin: 2rem 0 0;
    height: 1px;
    background: var(--border-color);
}

/* ===== FOOTER NOTE ===== */
.footer-note {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-note a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .image-section {
        display: none;
    }
    .form-section {
        width: 100%;
        padding: 3rem 2rem;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 2rem 1.25rem;
    }
    .welcome-heading {
        font-size: 1.6rem;
    }
    .header-logo-img {
        height: 28px;
    }
}
