:root {
    /* Shared Brand Colors */
    --primary-orange: #f58220;
    --primary-orange-light: #fff5e6;
    --brand-pink: #e12d86; /* Brand Pink token addition */
    --text-dark: #333333;
    --text-grey: #666666;
    --text-light-grey: #999999;
    --text-white: #ffffff;
    --border-grey: #e0e0e0;
    --bg-light: #ffffff;

    /* Shadows & Border Radius */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-content: 0 8px 20px rgba(0,0,0,0.03);
    --radius-md: 10px;
    --radius-lg: 15px;
}

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

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
    background: var(--bg-light);
}

/* ============================================================
   SPLIT-SCREEN LOGIN LAYOUT
   ============================================================ */
.login-page {
    display: flex;
    height: 100vh;
    width: 100%;
    /* One full-page artwork: white left side with its dot patterns, the
       CDRRMO photo and orange wave on the right. Anchored LEFT so the white
       area (the left ~38% of the art) always sits under the form column —
       cover only ever crops the photo side. */
    background: #fff url('../images/login/login-screen.png') left center / cover no-repeat;
}

/* ---- Left panel: brand + form ---- */
.login-left {
    flex: 0 0 40%;
    max-width: 560px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 30px;
}

.login-left-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.login-header-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto 22px;
    display: block;
}

.welcome-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 6px;
    text-align: left;
}

.welcome-subtitle {
    color: var(--text-grey);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 26px;
    text-align: left;
}

/* ---- Input fields ---- */
.form-group {
    position: relative;
    margin-bottom: 18px;
    text-align: left;
}

.input-icon-img {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.65;
}

.form-input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-grey);
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
}

.form-input::placeholder { color: var(--text-light-grey); }

.form-input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 4px 12px rgba(245, 130, 32, 0.06);
}

.form-input:focus ~ .input-icon-img { opacity: 1; }

/* Password Toggle Icon Alignment */
.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light-grey);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--brand-pink);
}

/* Remember Me and Forgot Password Sub-Row Options */
.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 500;
}

.remember-me {
    display: flex;
    align-items: center;
    color: var(--text-grey);
    cursor: pointer;
    user-select: none;
}

.remember-me input {
    margin-right: 8px;
    accent-color: var(--primary-orange);
    width: 16px;
    height: 16px;
}

.forgot-password {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--text-dark);
    text-decoration: underline;
}

/* Primary Action Login Button */
.login-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-orange);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-btn-icon { width: 16px; height: 16px; }

.login-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
    box-shadow: 0 6px 18px rgba(245, 130, 32, 0.25);
}

.login-btn:active {
    transform: translateY(1px);
}

.login-footer-note {
    margin-top: 26px;
    font-size: 11.5px;
    color: var(--text-light-grey);
}

/* Dynamic Restriction/Error Msg Card Alert Box CSS */
.login-error-msg-box {
    color: #D32F2F;
    background: #FFEBEE;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #FFCDD2;
}

/* ---- Right panel: branded photo ---- */
.login-right {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
    /* The photo is part of .login-page's background; this panel only
       positions the seals over it. */
    background: transparent;
}

.login-seals {
    position: absolute;
    top: 24px;
    right: 30px;
    display: flex;
    gap: 12px;
    z-index: 3;
}

.login-seals img {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ============================================================
   PHONE SCREENS — the photo panel doesn't fit a portrait phone,
   so the form takes the full viewport as a single scrollable column.
   ============================================================ */
@media (max-width: 900px) {
    body { overflow-y: auto; height: auto; min-height: 100vh; }

    .login-page { flex-direction: column; height: auto; min-height: 100vh; }

    .login-left {
        flex: 1 1 auto;
        max-width: 100%;
        min-height: 100vh;
        padding: 40px 24px;
    }

    .login-right { display: none; }
}

@media (max-width: 420px) {
    .login-header-img { max-width: 230px; }
    .welcome-title { font-size: 21px; }
}

/* ===== Login OTP step ===== */
.otp-note {
    font-size: 14px;
    color: var(--text-grey);
    margin: 0 0 18px;
    line-height: 1.5;
}
.otp-note strong { color: var(--text-dark); }
.otp-input { letter-spacing: 6px; font-weight: 600; }
.otp-timer { font-size: 13px; color: var(--text-grey); }
.otp-timer strong { color: var(--primary-orange); }
.otp-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-orange);
    cursor: pointer;
}
.otp-link:disabled { color: var(--text-light-grey); cursor: default; }
.otp-back { display: block; margin: 16px auto 0; color: var(--text-grey); }
