:root {
    --forest-950: #203b33;
    --forest-900: #2c5147;
    --forest-800: #3f6f61;
    --emerald-600: #5d887b;
    --emerald-500: #71998c;
    --emerald-100: #e8f0ed;
    --cream: #f5f2eb;
    --paper: #fffdf9;
    --ink: #242d2a;
    --muted: #747e7a;
    --line: #e1e5e1;
    --amber: #b48745;
    --danger: #b65a55;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    background: #ffffff;
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(480px, 1.08fr) minmax(460px, .92fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.login-showcase {
    position: relative;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    color: var(--ink);
    background:
        radial-gradient(circle at 92% 10%, rgba(113, 153, 140, .13), transparent 28%),
        radial-gradient(circle at 0 86%, rgba(180, 135, 69, .07), transparent 24%),
        linear-gradient(145deg, #fafaf7, #eef2ef);
    border-right: 1px solid #e1e5e1;
}

.login-showcase::before {
    position: absolute;
    right: -170px;
    bottom: -195px;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(93, 136, 123, .1);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(93, 136, 123, .025), 0 0 0 115px rgba(93, 136, 123, .018);
    content: "";
}

.showcase-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 42px clamp(46px, 7vw, 108px) 34px;
}

.showcase-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    pointer-events: none;
}

.showcase-glow-one {
    top: 26%;
    right: -70px;
    width: 210px;
    height: 210px;
    background: rgba(113, 153, 140, .08);
}

.showcase-glow-two {
    bottom: 20%;
    left: -100px;
    width: 250px;
    height: 250px;
    background: rgba(180, 135, 69, .06);
}

.brand,
.mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
}

.brand {
    align-self: center;
    color: var(--forest-900);
    text-decoration: none;
}

.brand:hover {
    color: var(--forest-900);
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--forest-900);
    box-shadow: 0 9px 22px rgba(44, 81, 71, .17);
    font-size: 20px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-copy strong {
    color: inherit;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.35px;
}

.brand-copy small {
    margin-top: 5px;
    color: #74847b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.45px;
    text-transform: uppercase;
}

.showcase-message {
    margin-top: clamp(46px, 7vh, 76px);
    width: 100%;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--emerald-600);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .9px;
    text-transform: uppercase;
}

.showcase-message h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(40px, 3.7vw, 58px);
    font-weight: 800;
    letter-spacing: -2.9px;
    line-height: 1.06;
}

.showcase-message h1 span {
    color: var(--emerald-600);
}

.showcase-message p {
    max-width: 520px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
}

.preview-wrap {
    position: relative;
    width: min(100%, 505px);
    margin-top: clamp(26px, 4vh, 40px);
}

.ledger-preview {
    width: 100%;
    padding: 18px 22px 13px;
    border: 1px solid #dce9e1;
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 24px 65px rgba(43, 70, 61, .1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e9efeb;
}

.preview-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #526159;
    font-size: 11px;
    font-weight: 800;
}

.preview-title i {
    color: var(--emerald-600);
}

.notification-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #5f7167;
    background: #f1f6f3;
    font-size: 12px;
}

.notification-icon b {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border: 2px solid #f1f6f3;
    border-radius: 50%;
    background: #e28b27;
}

.ledger-head,
.ledger-row {
    display: flex;
    align-items: center;
}

.ledger-head {
    justify-content: space-between;
}

.ledger-head div {
    display: flex;
    flex-direction: column;
}

.ledger-head small,
.ledger-row small {
    color: #8a9690;
    font-size: 11px;
}

.ledger-head strong {
    margin-top: 5px;
    color: var(--ink);
    font-size: 25px;
    letter-spacing: -.6px;
}

.preview-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.preview-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e8efeb;
    border-radius: 12px;
    background: #fbfdfc;
}

.preview-stat > span:last-child {
    display: flex;
    flex-direction: column;
}

.preview-stat small {
    color: #8a9690;
    font-size: 9px;
}

.preview-stat strong {
    margin-top: 2px;
    color: #35463e;
    font-size: 11px;
}

.stat-icon {
    display: inline-flex;
    flex: 0 0 31px;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border-radius: 9px;
    font-size: 11px;
}

.stat-icon.customers {
    color: var(--forest-800);
    background: var(--emerald-100);
}

.stat-icon.due {
    color: #b66c19;
    background: #fff1dd;
}

.ledger-status {
    padding: 7px 10px;
    border-radius: 9px;
    color: var(--forest-800);
    background: var(--emerald-100);
    font-size: 11px;
    font-weight: 800;
}

.ledger-divider {
    height: 1px;
    margin: 13px 0 4px;
    background: #e4ebe7;
}

.ledger-row {
    min-height: 50px;
}

.floating-note {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 7px 0 2px;
    padding: 11px 13px;
    border: 1px solid #dce9e1;
    border-radius: 14px;
    background: #f7fbf8;
    box-shadow: none;
}

.floating-note > span {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--forest-800);
    background: var(--emerald-100);
    font-size: 16px;
}

.floating-note div {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.floating-note strong {
    color: #33483e;
    font-size: 10px;
}

.floating-note small {
    margin-top: 2px;
    color: #8b9791;
    font-size: 8px;
}

.floating-note > i {
    color: #9aa69f;
    font-size: 8px;
}

.ledger-icon {
    display: inline-flex;
    flex: 0 0 35px;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    margin-right: 12px;
    border-radius: 10px;
    font-size: 12px;
}

.ledger-icon.debt {
    color: #bd7420;
    background: #fff2df;
}

.ledger-icon.payment {
    color: var(--forest-800);
    background: var(--emerald-100);
}

.ledger-row > span:nth-child(2) {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.ledger-row strong {
    color: #3b4a43;
    font-size: 12px;
}

.ledger-row b {
    font-size: 12px;
}

.amount-debt {
    color: #b96c17;
}

.amount-payment {
    color: var(--forest-800);
}

.showcase-points {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 24px;
    color: #738078;
    font-size: 11px;
    font-weight: 700;
}

.showcase-points span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.showcase-points i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: var(--emerald-600);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 4px 12px rgba(25, 75, 52, .06);
    font-size: 10px;
}

.showcase-points b {
    font-weight: 700;
}

.login-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 42px clamp(38px, 6vw, 90px) 24px;
    background:
        radial-gradient(circle at 100% 0, rgba(93, 136, 123, .055), transparent 25%),
        #ffffff;
}

.mobile-brand {
    display: none;
}

.login-card {
    width: 100%;
    max-width: 475px;
    padding: 38px;
    border: 1px solid #e4ebe7;
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 28px 70px rgba(22, 62, 44, .09);
}

.login-heading {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.login-heading > div {
    flex: 1;
}

.login-symbol {
    display: inline-flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid #d5e1dc;
    border-radius: 14px;
    color: var(--emerald-600);
    background: linear-gradient(145deg, #f5f8f6, var(--emerald-100));
    font-size: 18px;
}

.welcome-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 0;
    border-radius: 0;
    color: var(--forest-800);
    background: transparent;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .75px;
    text-transform: uppercase;
}

.login-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(27px, 2.1vw, 34px);
    font-weight: 800;
    letter-spacing: -1.35px;
    line-height: 1.15;
}

.login-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 23px;
    padding: 13px 14px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.55;
}

.login-alert i {
    margin-top: 3px;
}

.login-alert-error {
    border-color: #efd0d0;
    color: #8f3636;
    background: #fff2f2;
}

.login-alert-success {
    border-color: #cce8d8;
    color: #226c48;
    background: #eefaf3;
}

.login-alert-info {
    border-color: #d5e1dc;
    color: #49665a;
    background: #f2f7f4;
}

.login-form {
    margin-top: 29px;
}

.form-group-modern {
    margin-bottom: 21px;
}

.form-group-modern label {
    margin: 0 0 9px;
    color: #34473f;
    font-size: 12px;
    font-weight: 800;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    height: 56px;
    padding: 0 48px 0 47px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    color: var(--ink);
    background: var(--paper);
    box-shadow: 0 3px 12px rgba(21, 48, 36, .025);
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

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

.input-wrap input:focus {
    border-color: var(--emerald-600);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(93, 136, 123, .12);
}

.input-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 17px;
    color: #829087;
    font-size: 15px;
    transform: translateY(-50%);
}

.input-wrap:focus-within .input-icon {
    color: var(--emerald-600);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    outline: none;
    color: #829087;
    background: transparent;
    transform: translateY(-50%);
    transition: color .2s ease, background .2s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--forest-800);
    background: #edf3ef;
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 57px;
    margin-top: 7px;
    padding: 0 21px 0 24px;
    border: 0;
    border-radius: 12px;
    outline: none;
    color: #fff;
    background: var(--forest-800);
    box-shadow: 0 12px 28px rgba(44, 81, 71, .2);
    font-size: 14px;
    font-weight: 800;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.login-button:hover {
    color: #fff;
    background: var(--forest-900);
    box-shadow: 0 15px 32px rgba(44, 81, 71, .24);
    transform: translateY(-1px);
}

.login-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(93, 136, 123, .2), 0 12px 28px rgba(44, 81, 71, .2);
}

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

.login-security {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 30px;
    padding-top: 23px;
    border-top: 1px solid var(--line);
}

.security-icon {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--emerald-600);
    background: var(--emerald-100);
    font-size: 12px;
}

.login-security p {
    flex: 1;
    margin: 0;
    color: #89928d;
    font-size: 10px;
    line-height: 1.55;
}

.security-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    border-radius: 8px;
    color: var(--forest-800);
    background: var(--emerald-100);
    font-size: 9px;
    font-weight: 800;
}

.login-security strong {
    color: #53625b;
    font-size: 11px;
}

.login-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    width: 100%;
    max-width: 475px;
    margin: 0;
    padding: 0;
    color: #9aa39e;
    font-size: 10px;
    text-align: center;
    transform: translateX(-50%);
}

@media (min-width: 821px) {
    html,
    body.login-page {
        height: 100%;
        overflow: hidden;
    }

    .login-layout,
    .login-showcase,
    .login-panel {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
    }

    .showcase-content {
        height: 100%;
        min-height: 0;
    }
}

@media (min-width: 821px) and (max-height: 800px) {
    .showcase-content {
        padding-top: 26px;
        padding-bottom: 22px;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 17px;
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .showcase-message {
        margin-top: 25px;
    }

    .eyebrow {
        margin-bottom: 11px;
        font-size: 10px;
    }

    .showcase-message h1 {
        font-size: clamp(35px, 3.25vw, 49px);
    }

    .showcase-message p {
        margin-top: 10px;
        font-size: 14px;
        line-height: 1.55;
    }

    .preview-wrap {
        margin-top: 18px;
    }

    .ledger-preview {
        padding: 13px 18px 9px;
    }

    .preview-toolbar {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .ledger-head strong {
        font-size: 21px;
    }

    .preview-stats {
        margin-top: 10px;
    }

    .preview-stat {
        padding: 7px 9px;
    }

    .ledger-divider {
        margin-top: 9px;
    }

    .ledger-row {
        min-height: 42px;
    }

    .ledger-icon {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
    }

    .floating-note {
        bottom: 25px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .showcase-points {
        padding-top: 12px;
    }

    .login-panel {
        padding-top: 22px;
        padding-bottom: 16px;
    }

    .login-card {
        padding: 30px 34px;
    }

    .login-form {
        margin-top: 23px;
    }

    .form-group-modern {
        margin-bottom: 16px;
    }

    .input-wrap input,
    .login-button {
        height: 52px;
    }

    .login-security {
        margin-top: 22px;
        padding-top: 17px;
    }

    .login-footer {
        bottom: 14px;
    }
}

@media (min-width: 821px) and (max-height: 650px) {
    .showcase-points,
    .floating-note {
        display: none;
    }

    .showcase-message {
        margin-top: 18px;
    }

    .preview-wrap {
        margin-top: 12px;
    }

    .login-symbol {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .login-heading h2 {
        font-size: 27px;
    }

    .login-heading p {
        margin-top: 6px;
    }

    .login-form {
        margin-top: 17px;
    }

    .login-security {
        margin-top: 16px;
        padding-top: 13px;
    }
}

@media (max-width: 1050px) {
    .login-layout {
        grid-template-columns: minmax(390px, .9fr) minmax(420px, 1.1fr);
    }

    .showcase-content {
        padding-right: 45px;
        padding-left: 45px;
    }

    .showcase-message h1 {
        font-size: 46px;
    }

}

@media (max-width: 820px) {
    .login-layout {
        display: block;
    }

    .login-showcase {
        display: none;
    }

    .login-panel {
        justify-content: flex-start;
        padding: 34px 24px 24px;
        background:
            radial-gradient(circle at 100% 0, rgba(93, 136, 123, .11), transparent 30%),
            var(--cream);
    }

    .mobile-brand {
        display: flex;
        align-self: flex-start;
        color: var(--forest-900);
    }

    .mobile-brand .brand-mark {
        width: 43px;
        height: 43px;
        border: 0;
        border-radius: 12px;
        color: #fff;
        background: var(--forest-900);
        font-size: 17px;
    }

    .mobile-brand .brand-copy small {
        color: #75827b;
    }

    .login-card {
        margin: 11vh auto 0;
        padding: 34px;
    }

    .login-footer {
        position: static;
        margin: auto auto 0;
        padding-top: 32px;
        transform: none;
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 25px 20px 20px;
    }

    .login-card {
        margin-top: 8vh;
        padding: 27px 22px;
        border-radius: 20px;
    }

    .login-symbol {
        display: none;
    }

    .login-heading h2 {
        font-size: 29px;
    }

    .login-heading p {
        font-size: 13px;
    }

    .login-form {
        margin-top: 27px;
    }

    .input-wrap input,
    .login-button {
        height: 54px;
    }

    .login-footer {
        padding-top: 35px;
    }
}

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