:root {
    --brand-primary: #f97316;
    --brand-primary-hover: #ea580c;
    --brand-primary-light: #fff7ed;
    --brand-primary-glow: rgba(249, 115, 22, 0.25);
    --brand-dark: #0f172a;
    --brand-slate: #334155;
    --brand-muted: #64748b;
    --brand-border: #e2e8f0;
    --brand-card-bg: rgba(255, 255, 255, 0.98);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    background-image: 
        radial-gradient(at 0% 0%, rgba(249, 115, 22, 0.09) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.07) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(249, 115, 22, 0.05) 0px, transparent 50%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--brand-dark);
    overflow-x: hidden;
    position: relative;
}

/* Subtle pattern overlay */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(#cbd5e1 0.75px, transparent 0.75px);
    background-size: 24px 24px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* Top Navigation Header */
.login-header {
    position: relative;
    z-index: 2;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.header-brand-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.06));
    border-radius: 8px;
}

.header-brand-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-brand-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-primary), #fb923c);
    color: #fff;
    padding: 3px 9px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-badge-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid #a7f3d0;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.7; }
}

/* Main Container */
.login-main {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 30px 40px;
}

.login-layout {
    width: 100%;
    max-width: 1140px;
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 52px;
    align-items: center;
}

/* Left Side: Hero & Illustration */
.hero-section {
    padding: 10px 10px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #fed7aa;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.08);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 18px;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.22;
    color: var(--brand-dark);
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-title span {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--brand-muted);
    line-height: 1.6;
    margin-bottom: 26px;
    max-width: 530px;
}

/* Illustration Visual Card */
.illustration-wrapper {
    position: relative;
    background: #ffffff;
    border-radius: 28px;
    padding: 14px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.85);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.illustration-wrapper:hover {
    transform: translateY(-3px);
}

.illustration-img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

/* Value Badges Below Illustration */
.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.feature-pill-item {
    background: #ffffff;
    border: 1px solid var(--brand-border);
    padding: 9px 16px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--brand-slate);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
}

.feature-pill-item:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}

.feature-pill-item i {
    color: var(--brand-primary);
    font-size: 0.95rem;
}

/* Right Side: Form Card */
.login-card-container {
    display: flex;
    justify-content: center;
}

.login-card {
    background: var(--brand-card-bg);
    border-radius: 28px;
    padding: 42px 38px 36px;
    box-shadow: 
        0 25px 50px -12px rgba(15, 23, 42, 0.12),
        0 0 0 1px rgba(226, 232, 240, 0.85);
    width: 100%;
    max-width: 440px;
    position: relative;
    backdrop-filter: blur(16px);
}

/* Top Logo Branding in Card */
.card-brand-header {
    text-align: center;
    margin-bottom: 28px;
}

.card-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 24px;
    background: #fff;
    padding: 6px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.14), 0 0 0 1px rgba(249, 115, 22, 0.15);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-logo-wrap:hover {
    transform: scale(1.05) rotate(1deg);
}

.card-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 18px;
}

.card-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.card-subtitle {
    font-size: 0.88rem;
    color: var(--brand-muted);
    font-weight: 500;
}

/* Form Controls */
.form-group-item {
    margin-bottom: 20px;
}

.input-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.input-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-slate);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}

.badge-code-hint {
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #ffedd5;
}

.forgot-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

.input-field-box {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s;
}

.modern-input {
    width: 100%;
    padding: 13px 46px 13px 46px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--brand-dark);
    background: #f8fafc;
    border: 1.5px solid var(--brand-border);
    border-radius: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.modern-input:focus {
    background: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--brand-primary-glow);
}

.modern-input:focus + .input-icon-left,
.input-field-box:focus-within .input-icon-left {
    color: var(--brand-primary);
}

/* Password Show/Hide Toggle Button */
.password-toggle-btn {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 10px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: var(--brand-dark);
    background: #f1f5f9;
}

.password-toggle-btn:focus {
    outline: none;
    color: var(--brand-primary);
}

.field-subtext {
    font-size: 0.74rem;
    color: #94a3b8;
    margin-top: 6px;
    padding-left: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Options Row: Remember Me */
.form-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.custom-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox-wrap input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--brand-primary);
    cursor: pointer;
    border-radius: 4px;
}

.custom-checkbox-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--brand-slate);
    cursor: pointer;
    margin: 0;
}

/* Submit Button */
.btn-submit-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.42);
    filter: brightness(1.03);
}

.btn-submit-login:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.3);
}

.btn-submit-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error/Status Alert */
#loginMessage {
    margin-top: 14px;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 0;
}

#loginMessage.has-error {
    padding: 12px 16px;
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Card Security Footer */
.card-security-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--brand-border);
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.card-security-footer i {
    color: #10b981;
}

/* Page Bottom Footer */
.login-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 16px 24px;
    font-size: 0.82rem;
    color: #94a3b8;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .login-layout {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 500px;
    }
    .hero-section {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-title {
        font-size: 2.1rem;
    }
    .feature-pills {
        justify-content: center;
    }
    .illustration-wrapper {
        max-width: 440px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .login-header {
        padding: 16px 20px;
    }
    .header-badge-status {
        display: none;
    }
    .login-card {
        padding: 30px 22px 26px;
        border-radius: 22px;
    }
    .hero-title {
        font-size: 1.7rem;
    }
    .hero-desc {
        font-size: 0.92rem;
    }
    .hero-section {
        padding: 0;
    }
}

/* ==========================================================================
   FORGOT PASSWORD MODAL STYLES (VIDYA SETU 3-STEP FLOW)
   ========================================================================== */
.modal-backdrop-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop-custom.active {
    display: flex;
    opacity: 1;
}

.forgot-modal-card {
    background: #ffffff;
    border-radius: 28px;
    width: 100%;
    max-width: 480px;
    padding: 38px 36px 32px;
    position: relative;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop-custom.active .forgot-modal-card {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.modal-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #fff7ed;
    color: #f97316;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
    border: 1px solid #fed7aa;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.15);
}

.modal-header-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.modal-header-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 24px;
}

.masked-email-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
}

.otp-digit-input {
    width: 100%;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 12px;
    text-align: center;
    padding: 14px;
    border: 2px solid #fed7aa;
    border-radius: 16px;
    background: #fffaf5;
    color: #ea580c;
    outline: none;
    font-family: 'Courier New', Courier, monospace;
    transition: all 0.2s;
}

.otp-digit-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2);
    background: #ffffff;
}

.resend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 0.82rem;
    color: #64748b;
}

.btn-resend-otp {
    background: none;
    border: none;
    color: #f97316;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-size: 0.82rem;
}

.btn-resend-otp:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.btn-resend-otp:not(:disabled):hover {
    text-decoration: underline;
}

.step-back-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color 0.2s;
}

.step-back-link:hover {
    color: #0f172a;
}

.password-strength-box {
    margin-top: 6px;
    display: flex;
    gap: 4px;
    height: 4px;
}

.strength-bar {
    flex: 1;
    height: 100%;
    border-radius: 2px;
    background: #e2e8f0;
    transition: background 0.3s;
}

.strength-bar.weak { background: #ef4444; }
.strength-bar.medium { background: #f59e0b; }
.strength-bar.strong { background: #10b981; }

.success-check-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #10b981;
    font-size: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid #a7f3d0;
    animation: scaleCheck 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleCheck {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 576px) {
    .forgot-modal-card {
        padding: 30px 22px 24px;
        border-radius: 22px;
    }
    .otp-digit-input {
        font-size: 1.6rem;
        letter-spacing: 8px;
    }
}

