/* The public admin and agency login page. Kept separate from dashboard styles. */
body.portal-login {
    margin: 0;
    min-width: 320px;
    color: #151b30;
    background: #fff;
    font-family: "Plus Jakarta Sans", Arial, sans-serif;
    font-size: 15px;
}

.portal-login * { box-sizing: border-box; }
.portal-login a { color: inherit; }
.portal-login button { font-family: inherit; }

.portal-header {
    position: relative;
    z-index: 2;
    background: #fff;
    box-shadow: 0 4px 20px rgba(25, 76, 18, .07);
}

.portal-header-inner,
.portal-shell,
.portal-footer-inner {
    width: min(100% - 80px, 1450px);
    margin-inline: auto;
}

.portal-header-inner {
    min-height: 116px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.portal-brand { display: block; flex: 0 1 590px; }
.portal-brand img { display: block; width: 100%; max-width: 590px; height: auto; }
.portal-nav { display: flex; align-items: center; gap: clamp(25px, 3vw, 54px); white-space: nowrap; }
.portal-nav a { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; text-decoration: none; }
.portal-nav a:hover, .portal-nav a:focus-visible { color: #126316; text-decoration: none; }
.portal-nav i { color: #075918; font-size: 23px; }

.portal-main {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: calc(100vh - 228px);
    padding: 58px 0 74px;
    background: linear-gradient(180deg, rgba(251, 254, 249, .84) 0%, rgba(247, 253, 240, .82) 48%, rgba(233, 251, 216, .72) 100%),
                url('../img/login-portal/mountain-landscape.jpg') center 55% / cover no-repeat,
                radial-gradient(circle at 90% 12%, #e4f9d2 0, transparent 30%),
                radial-gradient(circle at 15% 87%, #e2f4d4 0, transparent 35%),
                linear-gradient(110deg, #fbfefa 0%, #f7fdf0 55%, #e9fbd8 100%);
}

.portal-main::before,
.portal-main::after,
.portal-landscape::before,
.portal-landscape::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: -1;
}
.portal-main::before {
    right: -140px;
    top: 20px;
    width: 380px;
    height: 460px;
    border-radius: 48% 0 0 52%;
    transform: rotate(33deg);
    background: rgba(174, 232, 91, .35);
}
.portal-main::after {
    right: -90px;
    bottom: -180px;
    width: 750px;
    height: 380px;
    border-radius: 50%;
    background: #c8ef8c;
    transform: rotate(-16deg);
}
.portal-landscape::before {
    left: -15%;
    bottom: -210px;
    width: 90%;
    height: 385px;
    border-radius: 50% 50% 0 0;
    transform: rotate(8deg);
    background: linear-gradient(130deg, #0b7404, #70b907);
}
.portal-landscape::after {
    left: -12%;
    bottom: -225px;
    width: 65%;
    height: 320px;
    border-radius: 50% 50% 0 0;
    transform: rotate(20deg);
    background: linear-gradient(120deg, #004c1e, #118414);
}

.portal-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .97fr);
    align-items: center;
    gap: clamp(38px, 5vw, 94px);
}
.portal-story { min-width: 0; padding: 15px 0 0; }
.portal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 17px;
    margin-bottom: 31px;
    border-radius: 40px;
    background: #e6f6d1;
    color: #07561a;
    font-size: clamp(14px, 1.2vw, 18px);
    font-weight: 800;
}
.portal-eyebrow i { font-size: 23px; }
.portal-story h1 {
    margin: 0;
    font-size: clamp(33px, 3vw, 46px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.035em;
}
.portal-green, .portal-rupee { color: #116819; }
.portal-rule { display: block; width: 50px; height: 4px; margin: 20px 0; border-radius: 4px; background: #2f8014; }
.portal-story-copy { max-width: 570px; margin: 0 0 26px; color: #253048; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.55; }
.portal-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.portal-benefits > div {
    min-height: 110px;
    padding: 15px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #e5eae6;
    border-radius: 19px;
    background: rgba(255, 255, 255, .91);
    box-shadow: 0 5px 12px rgba(7, 69, 22, .1);
    color: #075518;
    text-align: center;
}
.portal-benefits i { font-size: 32px; }
.portal-benefits strong { font-size: clamp(12px, 1.15vw, 16px); font-weight: 800; }
.portal-apply {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 22px;
    padding: 10px 25px;
    border-radius: 28px;
    background: linear-gradient(100deg, #238d08, #05641d);
    box-shadow: 0 6px 16px rgba(9, 87, 20, .18);
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none !important;
}
.portal-apply:hover, .portal-apply:focus-visible { background: #075e1c; }
.portal-collage { display: flex; height: 278px; margin: 24px -3px 0 8px; align-items: flex-end; gap: 8px; }
.portal-photo {
    height: 86%;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 48px 48px 32px 32px;
    transform: skewX(-15deg) rotate(-4deg);
    box-shadow: 0 7px 22px rgba(8, 76, 23, .14);
    background: #e6f1d7;
}
.portal-photo:nth-child(2) { height: 100%; transform: skewX(-15deg) rotate(-2deg); }
.portal-photo:nth-child(3) { height: 77%; transform: skewX(-15deg) rotate(5deg); }
.portal-photo img { display: block; width: 130%; height: 100%; margin-left: -15%; object-fit: cover; transform: skewX(15deg) scale(1.05); }
.portal-photo:nth-child(3) img { transform: skewX(15deg) scale(1.22); }

.portal-card {
    min-width: 0;
    min-height: 716px;
    padding: clamp(30px, 3.5vw, 54px);
    border: 1px solid #d9e5d8;
    border-radius: 30px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 18px 36px rgba(32, 85, 28, .1);
    display: flex;
    flex-direction: column;
}
.portal-card h2 { margin: 0; font-size: clamp(31px, 2.7vw, 42px); font-weight: 800; letter-spacing: -.04em; }
.portal-card h2 span { color: #277b13; }
.portal-card .portal-rule { margin: 14px 0 35px; }
.portal-form.user { display: flex; flex: 1; flex-direction: column; height: auto; }
.portal-login-types { display: flex; gap: 12px; margin-bottom: 28px; }
.portal-type-btn {
    min-height: 54px;
    flex: 1;
    border: 1px solid #d8dfeb;
    border-radius: 40px;
    background: #fff;
    color: #171d2e;
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .04);
    cursor: pointer;
}
.portal-type-btn i { margin-right: 7px; color: #07651e; font-size: 17px; }
.portal-type-btn.active { border-color: #288b02; background: linear-gradient(105deg, #349f02, #147006); color: #fff; }
.portal-type-btn.active i { color: #fff; }
.portal-type-btn:hover { border-color: #278815; }
.portal-field { margin-bottom: 19px; }
.portal-field label { display: block; margin-bottom: 9px; font-size: 14px; font-weight: 800; }
.portal-field label i { width: 22px; margin-right: 4px; color: #075d22; font-size: 17px; }
.portal-input.form-control {
    display: block;
    width: 100%;
    height: 50px;
    padding: 12px 21px;
    border: 1px solid #cbd4e5;
    border-radius: 28px;
    background: #f0f5ff;
    box-shadow: none;
    color: #172039;
    font-size: 14px;
    font-weight: 600;
}
.portal-input::placeholder { color: #9aa8bd; font-weight: 400; }
.portal-input:focus { border-color: #218325; background: #fff; box-shadow: 0 0 0 3px rgba(48, 143, 39, .13); }
.portal-password-wrap { position: relative; }
.portal-password-wrap .portal-input { padding-right: 55px; }
.portal-password-toggle { position: absolute; top: 0; right: 8px; height: 100%; width: 45px; border: 0; background: transparent; color: #66758b; cursor: pointer; }
.portal-captcha-row, .portal-otp-row { display: flex; align-items: center; gap: 12px; }
.portal-captcha-row .portal-input { min-width: 0; flex: 1; background: #fff; }
.portal-captcha-row img { width: 126px; height: 48px; object-fit: contain; background: #e7f4df; border-radius: 6px; }
.portal-refresh { flex: 0 0 48px; height: 48px; border: 1px solid #cbd4e5; border-radius: 50%; background: #fff; color: #075a1e; cursor: pointer; }
.portal-otp-row .portal-input { min-width: 0; flex: 1; }
.portal-otp-send { flex: 0 0 auto; padding: 12px 16px; border: 0; border-radius: 25px; background: #e5f4d8; color: #075518; font-weight: 800; cursor: pointer; }
.portal-form-options { display: flex; justify-content: space-between; gap: 15px; margin: 4px 0 30px; font-size: 13px; }
.portal-remember { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.portal-remember input { width: 18px; height: 18px; margin: 0; accent-color: #17731b; }
.portal-form-options a { color: #21781d; font-weight: 800; text-decoration: none; white-space: nowrap; }
.portal-form-options a:hover { text-decoration: underline; }
.portal-form-actions { margin-top: auto; padding-top: 10px; }
.portal-login-btn {
    display: block;
    width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 34px;
    background: linear-gradient(100deg, #007021, #004f11);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}
.portal-login-btn i { margin-right: 12px; }
.portal-login-btn:hover { background: #086a22; }
.portal-login-btn:disabled { opacity: .6; cursor: not-allowed; }
.portal-error { margin: 5px 0 0 17px; color: #b12d2d; font-size: 12px; }

.portal-footer { position: relative; z-index: 1; background: #fff; }
.portal-footer-inner { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.portal-footer img { display: block; width: 240px; max-height: 76px; object-fit: contain; object-position: left center; }
.portal-footer p { margin: 0; text-align: center; font-size: 13px; }
.portal-footer a { font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.portal-footer a:hover { color: #136e1a; text-decoration: underline; }

@media (max-width: 1200px) {
    .portal-header-inner, .portal-shell, .portal-footer-inner { width: min(100% - 48px, 1120px); }
    .portal-shell { gap: 30px; }
    .portal-brand { flex-basis: 490px; }
    .portal-nav { gap: 18px; }
    .portal-nav a { font-size: 14px; gap: 7px; }
    .portal-card { padding: 32px; }
    .portal-login-types { flex-direction: column; }
    .portal-collage { height: 235px; }
    .portal-footer img { width: 170px; }
}

@media (max-width: 850px) {
    .portal-header-inner { min-height: 100px; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 14px 0; }
    .portal-brand { flex-basis: 500px; }
    .portal-nav { justify-content: center; flex-wrap: wrap; gap: 20px; }
    .portal-main { padding: 40px 0 60px; }
    .portal-shell { max-width: 620px; grid-template-columns: 1fr; gap: 40px; }
    .portal-story { padding: 0; }
    .portal-card { min-height: 0; }
    .portal-login-types { flex-direction: row; }
    .portal-footer-inner { flex-wrap: wrap; justify-content: center; padding: 18px 0; gap: 12px 25px; }
    .portal-footer p { order: 2; width: 100%; }
}

@media (max-width: 560px) {
    .portal-header-inner, .portal-shell, .portal-footer-inner { width: calc(100% - 32px); }
    .portal-header-inner { min-height: 0; }
    .portal-brand { flex-basis: 100%; }
    .portal-nav { width: 100%; gap: 10px; justify-content: space-between; }
    .portal-nav a { font-size: 12px; gap: 5px; }
    .portal-nav i { font-size: 16px; }
    .portal-main { padding: 32px 0 45px; }
    .portal-eyebrow { margin-bottom: 22px; padding: 7px 12px; font-size: 12px; gap: 7px; }
    .portal-eyebrow i { font-size: 17px; }
    .portal-story h1 { font-size: clamp(27px, 7vw, 36px); }
    .portal-story-copy { font-size: 15px; }
    .portal-benefits { gap: 7px; }
    .portal-benefits > div { min-height: 90px; border-radius: 14px; padding: 9px 4px; }
    .portal-benefits i { font-size: 22px; }
    .portal-benefits strong { font-size: 10px; }
    .portal-apply { min-height: 44px; margin-top: 18px; padding: 8px 20px; font-size: 13px; }
    .portal-collage { height: 170px; margin: 20px 0 0; gap: 4px; }
    .portal-photo { border-width: 3px; border-radius: 25px; }
    .portal-card { padding: 25px 18px; border-radius: 24px; }
    .portal-card h2 { font-size: 31px; }
    .portal-card .portal-rule { margin-bottom: 25px; }
    .portal-login-types { gap: 8px; margin-bottom: 22px; }
    .portal-type-btn { min-height: 56px; padding: 6px; font-size: 10px; white-space: normal; }
    .portal-type-btn i { display: block; margin: 0 auto 2px; font-size: 14px; }
    .portal-captcha-row { gap: 6px; }
    .portal-captcha-row .portal-input { padding: 10px; font-size: 12px; }
    .portal-captcha-row img { width: 78px; height: 42px; }
    .portal-refresh { flex-basis: 42px; height: 42px; }
    .portal-form-options { flex-wrap: wrap; }
    .portal-footer img { width: 130px; }
    .portal-footer a, .portal-footer p { font-size: 11px; }
}
