:root {
    --green-950: #103d20;
    --green-800: #185e2e;
    --green-700: #217238;
    --green-600: #2b8443;
    --green-100: #e7f2e9;
    --text: #1c241f;
    --muted: #727a74;
    --line: #dfe4df;
    --surface: #ffffff;
    --danger: #a7342c;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    height: 100%;
    overflow: hidden;
}

body {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: clamp(10px, 2.2vh, 24px);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--text);
    font-family: "Inter", Arial, sans-serif;
    background:
        radial-gradient(circle at 12% 10%, rgba(190, 210, 178, 0.32), transparent 24rem),
        radial-gradient(circle at 90% 88%, rgba(210, 220, 201, 0.38), transparent 25rem),
        #f4f5f1;
}

button,
input {
    font: inherit;
}

.login-shell {
    width: min(1180px, 100%);
    height: 100%;
    max-height: 760px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    overflow: hidden;
    border: 1px solid rgba(26, 64, 36, 0.08);
    border-radius: 4px;
    background: #f9faf7;
    box-shadow: 0 28px 70px rgba(31, 45, 34, 0.15);
}

.auth-page {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.auth-panel {
    width: min(720px, 100%);
    height: 100%;
    max-height: 760px;
    border: 1px solid rgba(26, 64, 36, 0.08);
    border-radius: 4px;
    box-shadow: 0 28px 70px rgba(31, 45, 34, 0.12);
}

.store-visual {
    position: relative;
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(150deg, #526641, #1b3b26);
}

.store-visual__photo {
    position: absolute;
    inset: 0;
    z-index: -3;
    background-image: url("../images/toko-rempak-tani.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    transform: scale(1.015);
}

.store-visual__shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(7, 31, 15, 0.06) 30%, rgba(7, 31, 15, 0.78) 100%),
        linear-gradient(90deg, rgba(8, 33, 16, 0.18), transparent 58%);
}

.store-visual__content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: clamp(32px, 5vw, 66px);
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.store-visual__badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-bottom: 16px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(15, 65, 31, 0.58);
    backdrop-filter: blur(8px);
}

.store-visual__content h1 {
    max-width: 510px;
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.store-visual__content p {
    max-width: 510px;
    margin: 0;
    color: rgba(255, 255, 255, 0.91);
    font-size: 1rem;
    line-height: 1.7;
}

.login-panel {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: clamp(18px, 4vh, 48px) clamp(24px, 4vw, 54px);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(247, 249, 244, 0.94)),
        radial-gradient(circle at 85% 10%, rgba(90, 133, 79, 0.13), transparent 17rem);
}

.login-panel::before,
.login-panel::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    pointer-events: none;
    opacity: 0.28;
    background:
        radial-gradient(ellipse at 32% 50%, transparent 28%, #bacbb3 30%, #bacbb3 32%, transparent 34%),
        radial-gradient(ellipse at 68% 30%, #d5dfd0 0 18%, transparent 19%),
        radial-gradient(ellipse at 72% 68%, #d5dfd0 0 17%, transparent 18%);
    transform: rotate(-24deg);
}

.login-panel::before {
    top: -28px;
    right: -25px;
}

.login-panel::after {
    bottom: -45px;
    left: -42px;
    transform: rotate(148deg);
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    max-height: 100%;
    padding: clamp(24px, 3.5vh, 42px) clamp(26px, 3.5vw, 42px);
    border: 1px solid rgba(22, 65, 34, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 55px rgba(38, 55, 42, 0.14);
}

.login-header {
    margin-bottom: clamp(18px, 2.8vh, 28px);
    text-align: center;
}

.brand-logo {
    width: clamp(60px, 9vh, 82px);
    height: clamp(60px, 9vh, 82px);
    margin: 0 auto 5px;
    color: var(--green-700);
}

.brand-logo svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.brand-name {
    margin: 0 0 clamp(8px, 1.5vh, 14px);
    color: var(--green-800);
    font-size: 1.2rem;
    font-weight: 800;
}

.login-header h2 {
    margin: 0;
    color: #171c19;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.14;
    letter-spacing: -0.04em;
}

.login-subtitle {
    max-width: 350px;
    margin: clamp(7px, 1.4vh, 12px) auto 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: clamp(11px, 1.8vh, 18px);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #252c27;
    font-size: 0.84rem;
    font-weight: 700;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    height: clamp(44px, 6vh, 50px);
    margin: 0;
    padding: 0 45px 0 43px;
    border: 1px solid #d7ddd8;
    border-radius: 9px;
    outline: none;
    color: var(--text);
    font-size: 0.9rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(21, 52, 30, 0.02);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap input::placeholder {
    color: #a0a6a1;
}

.input-wrap input:focus {
    border-color: var(--green-600);
    box-shadow: 0 0 0 4px rgba(43, 132, 67, 0.12);
}

/* Keep only the custom password visibility button. */
.input-wrap input[type="password"]::-ms-reveal,
.input-wrap input[type="password"]::-ms-clear {
    display: none;
}

.input-wrap input[type="password"]::-webkit-credentials-auto-fill-button,
.input-wrap input[type="password"]::-webkit-contacts-auto-fill-button {
    position: absolute;
    right: 0;
    visibility: hidden;
    pointer-events: none;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 20px;
    height: 20px;
    color: #929993;
    transform: translateY(-50%);
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: #939a94;
    cursor: pointer;
    background: transparent;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--green-700);
    background: var(--green-100);
    outline: none;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: -2px;
    font-size: 0.82rem;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #565e58;
    cursor: pointer;
}

.remember-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--green-700);
}

.form-options a {
    color: var(--green-700);
    font-weight: 600;
    text-decoration: none;
}

.form-options a:hover {
    color: var(--green-950);
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    min-height: clamp(46px, 6.2vh, 52px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
    padding: 12px 20px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(100deg, #1c682f, #2d873f);
    box-shadow: 0 12px 24px rgba(31, 111, 51, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.login-btn:hover {
    filter: brightness(1.04);
    box-shadow: 0 14px 28px rgba(31, 111, 51, 0.25);
    transform: translateY(-1px);
}

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

.login-btn:focus-visible {
    outline: 3px solid rgba(43, 132, 67, 0.25);
    outline-offset: 3px;
}

.login-btn svg {
    width: 21px;
    height: 21px;
}

.message {
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 9px;
    font-size: 0.82rem;
    line-height: 1.45;
}

.message p {
    margin: 0;
}

.message--info {
    border-color: #cbdccb;
    color: #2d6438;
    background: #f0f7f0;
}

.message--success {
    border-color: #badbc2;
    color: #216632;
    background: #eff8f1;
}

.message--error {
    border-color: #ecc7c2;
    color: var(--danger);
    background: #fff3f1;
}

.login-footer {
    margin-top: clamp(16px, 2.8vh, 28px);
    color: #8b928c;
    text-align: center;
}

.leaf-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: clamp(8px, 1.5vh, 14px);
}

.leaf-divider span {
    height: 1px;
    flex: 1;
    background: var(--line);
}

.leaf-divider svg {
    width: 22px;
    height: 22px;
    fill: #aeb7af;
}

.login-footer p {
    margin: 0;
    font-size: 0.78rem;
}

.reset-card {
    width: min(460px, 100%);
}

.reset-page {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.reset-panel {
    width: min(720px, 100%);
    height: 100%;
    max-height: 760px;
    border: 1px solid rgba(26, 64, 36, 0.08);
    border-radius: 4px;
    box-shadow: 0 28px 70px rgba(31, 45, 34, 0.12);
}

.reset-header {
    margin-bottom: clamp(20px, 3vh, 30px);
}

.reset-icon {
    width: clamp(62px, 9vh, 78px);
    height: clamp(62px, 9vh, 78px);
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    border-radius: 22px;
    color: var(--green-700);
    background: linear-gradient(145deg, #edf7ef, #dceee0);
    box-shadow: inset 0 0 0 1px rgba(33, 114, 56, 0.1);
}

.reset-icon svg {
    width: 40px;
    height: 40px;
}

.reset-eyebrow {
    margin: 0 0 7px;
    color: var(--green-700);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.reset-form {
    gap: clamp(14px, 2vh, 20px);
}

.reset-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid #d8e7db;
    border-radius: 10px;
    color: #536b59;
    background: #f4f9f5;
}

.reset-info svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    color: var(--green-700);
}

.reset-info p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
}

.reset-message {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 16px;
}

.reset-message svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.reset-footer {
    margin-top: clamp(20px, 3vh, 30px);
    padding-top: clamp(16px, 2.2vh, 22px);
    border-top: 1px solid var(--line);
    text-align: center;
}

.back-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--green-700);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.back-login:hover {
    color: var(--green-950);
    text-decoration: underline;
}

.back-login svg {
    width: 18px;
    height: 18px;
}

.reset-footer p {
    margin: 14px 0 0;
    color: #919892;
    font-size: 0.76rem;
}

@media (max-width: 920px) {
    body {
        padding: 0;
    }

    .login-shell {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(150px, 28vh) minmax(0, 1fr);
        border: 0;
        border-radius: 0;
    }

    .store-visual {
        min-height: 0;
    }

    .store-visual__content {
        padding: 22px clamp(24px, 7vw, 60px);
    }

    .store-visual__content h1 {
        margin-bottom: 8px;
        font-size: clamp(1.55rem, 5vw, 2.4rem);
    }

    .login-panel {
        min-height: 0;
        padding: clamp(12px, 2vh, 22px) 18px;
    }

    .login-card {
        width: min(440px, 100%);
        padding-top: clamp(16px, 2.4vh, 26px);
        padding-bottom: clamp(16px, 2.4vh, 26px);
    }

    .reset-page {
        padding: 0;
    }

    .auth-page {
        padding: 0;
    }

    .auth-panel,
    .reset-panel {
        width: 100%;
        max-height: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

@media (max-width: 540px) {
    .login-shell {
        grid-template-rows: minmax(112px, 20vh) minmax(0, 1fr);
    }

    .store-visual__badge {
        display: none;
    }

    .store-visual__content {
        padding: 16px 20px;
    }

    .store-visual__content h1 {
        margin: 0;
        font-size: clamp(1.35rem, 6vw, 1.75rem);
    }

    .store-visual__content p {
        display: none;
    }

    .login-panel {
        min-height: auto;
        padding: 10px 12px;
    }

    .login-card {
        padding: clamp(14px, 2.5vh, 24px) 20px;
        border-radius: 16px;
    }

    .brand-logo {
        width: clamp(46px, 8vh, 60px);
        height: clamp(46px, 8vh, 60px);
    }

    .form-options {
        align-items: flex-start;
    }
}

@media (max-height: 720px) {
    .login-card {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .login-header {
        margin-bottom: 14px;
    }

    .brand-logo {
        width: 52px;
        height: 52px;
    }

    .brand-name {
        margin-bottom: 6px;
        font-size: 1rem;
    }

    .login-header h2 {
        font-size: 1.55rem;
    }

    .login-subtitle {
        margin-top: 6px;
        font-size: 0.77rem;
        line-height: 1.4;
    }

    .login-form {
        gap: 10px;
    }

    .form-group label {
        margin-bottom: 5px;
    }

    .input-wrap input {
        height: 42px;
    }

    .login-btn {
        min-height: 43px;
    }

    .login-footer {
        margin-top: 12px;
    }

    .leaf-divider {
        margin-bottom: 6px;
    }

    .reset-icon {
        width: 52px;
        height: 52px;
        margin-bottom: 7px;
        border-radius: 16px;
    }

    .reset-icon svg {
        width: 31px;
        height: 31px;
    }

    .reset-header {
        margin-bottom: 14px;
    }

    .reset-footer {
        margin-top: 13px;
        padding-top: 12px;
    }

    .reset-footer p {
        margin-top: 8px;
    }
}

@media (max-width: 540px) and (max-height: 650px) {
    .login-shell {
        grid-template-rows: 90px minmax(0, 1fr);
    }

    .store-visual__content {
        padding: 12px 18px;
    }

    .brand-logo,
    .login-subtitle,
    .leaf-divider {
        display: none;
    }

    .brand-name {
        margin-bottom: 4px;
    }

    .login-header {
        margin-bottom: 10px;
    }

    .login-footer {
        margin-top: 8px;
    }

    .reset-footer p {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
