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

:root {
    --yellow-accent: #f5b042;
    --yellow-dark: #e09d2c;
    --green-primary: #1f7b4d;
    --green-dark: #0e5a36;
    --green-light: #d0f0e0;
    --black-rich: #111827;
    --black-soft: #1f2a3e;
    --gray-mid: #5b6e8c;
    --gray-light: #f3f5f9;
    --white-solid: #ffffff;
    --border-light: #cccccc;
    --shadow-xl: 2px 2px 5px rgba(0, 0, 0, 0.2);
    --shadow-md: 1px 1px 3px rgba(0, 0, 0, 0.1);
    --radius-card: 0.5rem;
    --radius-input: 0.35rem;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-image: url('../img/background.png');
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: cover;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* animated background shapes (floating engineering / gear motifs) */
.floating-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.float-item {
    position: absolute;
    background: rgba(31, 123, 77, 0.08);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--green-primary);
    animation: floatSlow 18s infinite alternate ease-in-out;
    width: 70px;
    height: 70px;
}

.float-item i {
    opacity: 0.5;
}

@keyframes floatSlow {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(35px, -25px) rotate(12deg);
    }
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    z-index: 2;
}

.glass-panel {
    max-width: 1050px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--white-solid);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

/* LEFT SIDE - HERO + SLIDER BACKGROUND (modern carousel) */
.hero-side {
    background: linear-gradient(125deg, #0f2c1f 0%, #1a4a32 100%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    color: white;
}

.hero-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(245, 176, 66, 0.2), transparent 70%);
    pointer-events: none;
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Spreads left and right items */
    gap: 1rem;
    margin-bottom: 1.0rem;
    position: relative;
    z-index: 2;
}

/* Left side - Organization logo */
.logo-circle {
    background: white;
    border-radius: 0.5rem;
    padding: 0.5rem;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
}

.logo-circle img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Center titles */
.org-titles {
    flex: 1;
    /* Takes remaining space */
    text-align: center;
    /* Centers the text */
}

.org-titles h4 {
    font-size: 1.3rem;
    letter-spacing: 2px;
    font-weight: 500;
    opacity: 0.9;
    margin: 0;
}

.org-titles h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--yellow-accent);
    margin: 0;
}

.org-titles small {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Right side - Government logo */
.govt-logo-circle {
    background: white;
    border-radius: 0.5rem;
    padding: 0.1rem;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
}

.govt-logo-circle img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* MODERN BACKGROUND SLIDER (carousel as ambient backdrop) */
.bg-slider-wrapper {
    position: relative;
    flex: 1;
    min-height: 230px;
    margin: 1rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.bg-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.bg-slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 0, 0, 0.089), rgba(0, 0, 0, 0.1));
    z-index: 3;
}

.carousel-caption-text {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 5;
    color: white;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.6);
    padding: 0.4rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-description {
    margin-top: 0.8rem;
    font-size: 1.2rem;
    line-height: 1.5;
    opacity: 0.9;
    border-left: 3px solid var(--yellow-accent);
    padding-left: 1rem;
    position: relative;
    z-index: 2;
}

/* RIGHT SIDE - LOGIN FORM MODERN */
.login-side {
    padding: 1.5rem 2rem;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.badge-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.badge-dot {
    width: 12px;
    height: 12px;
    background: var(--green-primary);
    border-radius: 50%;
    display: inline-block;
}

.badge-text {
    font-size: 1.0rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--green-primary);
    text-transform: uppercase;
}

.login-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--black-rich);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-sub {
    color: var(--gray-mid);
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.status-box {
    padding: 0.7rem 1rem;
    border-radius: 0.4rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-box.error {
    background: #ffe6e5;
    color: #b91c1c;
    border-left: 4px solid #dc2626;
}

.status-box.success {
    background: #e0f2e9;
    color: #0a5c3e;
    border-left: 4px solid var(--green-primary);
}

#togglePassword {
    position: absolute;
    right: 14px;
    top: 27px;
    cursor: pointer;
    background: #e4e8f7;
    padding: 10px;
    border-radius: 0.35rem;
    border: 1px solid #ccc;
}

.field {
    margin-bottom: 0.9rem;
    position: relative;
}

.field label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--black-soft);
    display: block;
    margin-bottom: 0.35rem;
}

.field input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-input);
    border: 1px solid #e2e8f0;
    background: #fefefe;
    font-size: 1.05rem;
    transition: all 0.2s;
    font-family: inherit;
}

.field input:focus {
    outline: none;
    border-color: var(--yellow-accent);
    box-shadow: 0 0 0 4px rgba(245, 176, 66, 0.2);
}

/* captcha styling */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.captcha-code {
    background: #f1f5f9;
    font-family: 'Courier New', monospace;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 5px;
    padding: 0.55rem 1rem;
    border-radius: 0.35rem;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    background: #eef2ff;
    min-width: 110px;
    text-align: center;
}

.captcha-refresh {
    background: #eef2ff;
    border: 1px solid #cbd5e1;
    width: 42px;
    height: 42px;
    border-radius: 0.35rem;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.2rem;
    color: #1f7b4d;
}

.captcha-refresh:hover {
    background: #cbd5e1;
}

.captcha-row input {
    flex: 1;
    min-width: 130px;
}

.form-foot {
    display: flex;
    justify-content: flex-end;
    margin: 0.6rem 0 1.2rem;
}

.forgot-link {
    color: var(--green-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

.forgot-link:hover {
    color: var(--yellow-accent);
}

.btn-submit {
    width: 100%;
    background: var(--green-primary);
    border: 1px solid var(--green-dark);
    padding: 0.85rem;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    border-radius: 0.35rem;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-submit:hover:not(:disabled) {
    background: var(--yellow-accent);
    border-color: var(--yellow-dark);
    transform: translateY(-1px);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.note-link {
    text-align: center;
    margin: 1rem 0 1rem;
    font-size: 0.95rem;
}

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

/* partner & govt logos */
.login-footer {
    margin-top: 0;
    padding-top: 1rem;
    border-top: 1px solid #e9edf2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Each block (Powered by / Tech Partner) */
.footer-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Label text */
.footer-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Govt logos row */
.govt-logos {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

/* Individual logo box */
.govt-icon {
    background: #fff;
    border-radius: 0.25rem;
    border: 1px solid #e9edf2;
    padding: 2px;
}

.govt-icon img {
    max-height: 30px;
    width: auto;
    display: block;
}

/* Tech partner badge */
.partner-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    /* border: 1px solid #e9edf2; */
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    padding: 2px;
}

.partner-badge img {
    height: 30px;
    width: auto;
}

.footer-note {
    font-size: 0.9rem;
    text-align: center;
    margin-top: 12px;
    color: #748aa1;
}

/* responsive */
@media (max-width: 1000px) {
    .glass-panel {
        grid-template-columns: 1fr;
        max-width: 550px;
    }

    .hero-side {
        display: none;
    }

    .mobile-brand {
        display: flex;
    }

    .login-side {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 520px) {
    .login-container {
        padding: 1rem;
    }

    .login-side {
        padding: 1.5rem;
    }

    .login-title {
        display: none;
    }

    .captcha-row {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    .captcha-refresh {
        width: 42px;
    }

    .captcha-code {
        flex: 0 0 auto;
        min-width: 80px;
        padding: 0.5rem;
        font-size: 1.2rem;
    }

    .captcha-row input {
        flex: 1;
        min-width: 0;
    }

    .login-footer {
        /* flex-direction: column; */
        align-items: center;
    }

    .footer-note {
        display: none;
    }

    .partner-label {
        display: none;
    }
}

/* animations */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-side {
    animation: fadeSlideIn 0.5s ease-out;
}

.otp-note {
    font-size: 0.8rem;
    color: var(--gray-mid);
    text-align: center;
    margin-top: 0.4rem;
}

/* Resend OTP button */
.otp-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-resend {
    background: none;
    border: 1px solid var(--green-primary);
    color: var(--green-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-resend:hover {
    background: var(--green-primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 1px 1px 3px rgba(31, 123, 77, 0.3);
}

.btn-resend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-resend i {
    font-size: 0.85rem;
}

.resend-timer {
    font-size: 0.78rem;
    color: var(--gray-mid);
    font-weight: 500;
}

/* Toggle Login Mode Animation */
.toggle-login-mode {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    color: var(--green-primary);
    background: rgba(31, 123, 77, 0.05);
    border-radius: 0.35rem;
    border: 1px solid var(--green-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}
.toggle-login-mode:hover {
    background: rgba(31, 123, 77, 0.1);
    color: var(--green-dark);
}
.toggle-login-mode i {
    transition: transform 0.3s ease;
}
.toggle-login-mode.toggled i {
    transform: rotate(180deg);
}

#username-login-section {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}
#username-login-section.show {
    max-height: 200px;
    opacity: 1;
    overflow: visible;
}

.digit-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.digit-box {
    width: 3rem !important;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem !important;
    font-weight: 700;
    border-radius: 0.35rem !important;
    padding: 0 !important;
}
.digit-box:focus {
    border-color: var(--green-primary) !important;
    box-shadow: 0 0 0 4px rgba(31, 123, 77, 0.2) !important;
}

