@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 14px;
    background: #f4f6f9;
}

/* ── Full viewport wrapper ── */
.login-page-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ══════════════════════════════
   LEFT PANEL — Form Side
══════════════════════════════ */
.login-left {
    width: 440px;
    min-width: 360px;
    max-width: 460px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.12);
    z-index: 10;
    overflow-y: auto;
}

/* Government top bar */
.gov-topbar {
    background: #01411C;
    padding: 7px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 3px solid #ffd700;
    flex-shrink: 0;
}

.gov-topbar .gov-emblem {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.gov-topbar .gov-text {
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.gov-topbar .gov-text span {
    display: block;
    color: #ffd700;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Logo + org name block */
.login-brand {
    padding: 16px 36px 14px;
    text-align: center;
    border-bottom: 1px solid #eef0f3;
    flex-shrink: 0;
}

.login-brand img.ahpc-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid #01411C;
    padding: 4px;
    background: #f8f9fa;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(1,65,28,0.15);
}

.login-brand .org-name {
    font-size: 1rem;
    font-weight: 700;
    color: #01411C;
    line-height: 1.3;
    margin: 0 0 4px 0;
}

.login-brand .org-abbr {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
    background: #01411C;
    letter-spacing: 2px;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 3px;
}

.login-brand .portal-label {
    font-size: 0.73rem;
    color: #6c757d;
    margin: 4px 0 0;
}

/* Form area */
.login-form-area {
    padding: 18px 36px;
    flex: 1;
}

.login-form-area h5 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.login-form-area h5::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #01411C;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 2px;
}

.login-form-area .form-group {
    margin-bottom: 12px;
}

.login-form-area .form-control {
    border: 1.5px solid #d0d5dd;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.88rem;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: auto;
}

.login-form-area .form-control:focus {
    border-color: #01411C;
    box-shadow: 0 0 0 3px rgba(1,65,28,0.1);
    outline: none;
}

.login-form-area .input-icon-wrapper {
    position: relative;
}

.login-form-area .input-icon-wrapper .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 0.85rem;
}

.login-form-area .input-icon-wrapper .form-control {
    padding-left: 36px;
}

.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.remember-row label {
    color: #555;
    font-size: 0.82rem;
    cursor: pointer;
    margin: 0;
}

.remember-row a {
    font-size: 0.82rem;
    color: #01411C;
    text-decoration: none;
    font-weight: 500;
}

.remember-row a:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #01411C 0%, #026b2f 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(1,65,28,0.3);
}

.btn-login:hover {
    background: linear-gradient(135deg, #026b2f 0%, #028a3d 100%);
    box-shadow: 0 6px 16px rgba(1,65,28,0.4);
    transform: translateY(-1px);
}

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

/* Footer inside left panel */
.login-footer {
    padding: 10px 36px;
    border-top: 1px solid #eef0f3;
    text-align: center;
    flex-shrink: 0;
}

.login-footer p {
    font-size: 0.72rem;
    color: #999;
    margin: 0;
    line-height: 1.6;
}

/* ══════════════════════════════
   RIGHT PANEL — Branding Side
══════════════════════════════ */
.login-right {
    flex: 1;
    background: linear-gradient(160deg, #01411C 0%, #012b12 60%, #001a0b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.login-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255,215,0,0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.03) 0%, transparent 50%);
}

.right-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
    max-width: 480px;
}

.right-content img.right-logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 50%;
    border: 5px solid rgba(255,215,0,0.6);
    padding: 10px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    margin-bottom: 28px;
}

.right-content .gold-bar {
    width: 60px;
    height: 3px;
    background: #ffd700;
    margin: 18px auto;
    border-radius: 2px;
}

.right-content h2 {
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
}

.right-content .right-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    margin: 0 0 24px;
}

.right-content .ministry-badge {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 8px;
    padding: 14px 20px;
    margin-top: 8px;
}

.right-content .ministry-badge p {
    color: rgba(255,255,255,0.7);
    font-size: 0.78rem;
    margin: 0;
    line-height: 1.6;
}

.right-content .ministry-badge strong {
    color: #ffd700;
    display: block;
    font-size: 0.82rem;
    margin-bottom: 4px;
}

/* Decorative circles */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,215,0,0.08);
}

.deco-circle.c1 { width: 300px; height: 300px; top: -80px; right: -80px; }
.deco-circle.c2 { width: 200px; height: 200px; bottom: -50px; left: -50px; }
.deco-circle.c3 { width: 150px; height: 150px; bottom: 80px; right: 40px; }

/* ── Responsive: mobile ── */
@media (max-width: 768px) {
    /* Allow page to scroll on small screens */
    html, body {
        height: auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .login-page-wrapper {
        flex-direction: column;
        height: auto !important;
        min-height: 100vh;
        overflow: visible !important;
    }

    /* Left panel fills screen and scrolls */
    .login-left {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        overflow-y: visible;
        box-shadow: none;
    }

    /* Hide decorative right panel completely on mobile */
    .login-right {
        display: none;
    }

    /* Reduce horizontal padding so inputs have room */
    .gov-topbar {
        padding: 8px 16px;
    }

    .login-brand {
        padding: 14px 20px 12px;
    }

    .login-brand img.ahpc-logo {
        width: 58px;
        height: 58px;
    }

    .login-form-area {
        padding: 16px 20px;
    }

    .login-form-area .form-control {
        font-size: 16px; /* prevents iOS auto-zoom on focus */
        padding: 11px 14px 11px 36px;
    }

    .login-footer {
        padding: 10px 20px;
    }

    .btn-login {
        padding: 13px;
        font-size: 0.95rem;
    }
}
