:root {
    color-scheme: light;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --erp-panel: #fff;
    --erp-panel-soft: #f8fafb;
    --erp-line: #e8edef;
    --erp-text: #24313b;
    --erp-muted: #829099;
    --erp-teal: #168f86;
    --erp-teal-dark: #11776f;
    --erp-teal-pale: #e9f6f4;
    --erp-brand-background: linear-gradient(135deg, #0f625c 0%, #168f86 56%, #48aa99 100%);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --erp-panel: #192329;
    --erp-panel-soft: #202c32;
    --erp-line: #2b393f;
    --erp-text: #e4ecee;
    --erp-muted: #95a5aa;
    --erp-teal: #4dc3b6;
    --erp-teal-dark: #69d1c6;
    --erp-teal-pale: #173936;
    --erp-brand-background: linear-gradient(135deg, #102f30 0%, #124b47 56%, #17655b 100%);
}

body.erp-login-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--erp-text);
    background: var(--erp-brand-background);
}

.erp-login-page *,
.erp-login-page *::before,
.erp-login-page *::after {
    box-sizing: border-box;
}

.erp-login-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background: var(--erp-brand-background);
}

.erp-product-header {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px max(22px, calc((100% - 1280px) / 2));
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    color: #fff;
}

.erp-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px;
    color: inherit;
    text-decoration: none;
}

.erp-brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, #37b9aa, #14796f);
    box-shadow: 0 5px 13px rgba(22, 143, 134, .2);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -2px;
}

.erp-brand strong,
.erp-brand small {
    display: block;
}

.erp-brand strong {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.35px;
}

.erp-brand small {
    margin-top: 3px;
    color: rgba(255, 255, 255, .8);
    font-size: 10px;
}

.erp-product-header > nav {
    display: flex;
    align-items: center;
    gap: 9px;
}

.erp-product-header > nav > a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 7px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.erp-product-header > nav > a:hover {
    background: rgba(255, 255, 255, .2);
}

.erp-login-screen {
    display: grid;
    min-height: 0;
    flex: 1 0 auto;
    place-items: center;
    padding: 30px 24px;
    background: radial-gradient(ellipse at 12% 98%, rgba(72, 170, 153, .38), transparent 45%);
}

.erp-login-card {
    width: min(100%, 410px);
    padding: 36px;
    border: 1px solid var(--erp-line);
    border-radius: 10px;
    color: var(--erp-text);
    background: var(--erp-panel);
    box-shadow: 0 20px 70px rgba(8, 51, 49, .2);
}

:root[data-theme="dark"] .erp-login-card {
    box-shadow: 0 20px 70px rgba(0, 0, 0, .3);
}

.erp-login-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 37px;
}

.erp-card-brand {
    padding: 0;
    color: var(--erp-text);
}

.erp-card-brand small {
    color: var(--erp-muted);
}

.erp-theme-toggle {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid var(--erp-line) !important;
    border-radius: 9px;
    color: var(--erp-teal-dark) !important;
    background: var(--erp-panel-soft) !important;
    cursor: pointer;
    font-size: 19px;
}

.erp-theme-toggle:hover {
    background: var(--erp-teal-pale) !important;
}

.erp-eyebrow {
    margin: 0 0 9px;
    color: var(--erp-teal-dark);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.3px;
}

.erp-login-card h1 {
    margin: 0;
    color: var(--erp-text);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.8px;
    line-height: 1.25;
}

.erp-login-description {
    margin: 8px 0 24px;
    color: var(--erp-muted);
    font-size: 12px;
    line-height: 1.6;
}

.erp-login-form {
    display: grid;
    gap: 9px;
}

.erp-login-form label {
    margin-top: 3px;
    color: var(--erp-text);
    font-size: 12px;
    font-weight: 600;
}

.erp-login-form input[type="email"],
.erp-login-form input[type="password"] {
    width: 100%;
    min-height: 44px;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid var(--erp-line);
    border-radius: 8px;
    outline: none;
    color: var(--erp-text);
    background: var(--erp-panel-soft);
    font: inherit;
    font-size: 13px;
}

.erp-login-form input:focus {
    border-color: var(--erp-teal);
    box-shadow: 0 0 0 3px rgba(22, 143, 134, .13);
}

.erp-form-error {
    margin: 0 0 3px;
    color: #bd4d4d;
    font-size: 11px;
    line-height: 1.5;
}

.erp-login-button {
    display: flex;
    width: 100%;
    min-height: 45px;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border: 0 !important;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(125deg, #168f86, #24a99d) !important;
    box-shadow: 0 4px 11px rgba(8, 70, 65, .2);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.erp-login-button:hover {
    background: #11776f !important;
}

.erp-login-button span {
    font-size: 18px;
}

.erp-login-footnote {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 6px;
    margin: 20px 0 0;
    color: var(--erp-muted);
    text-align: center;
    font-size: 10px;
    line-height: 1.6;
}

.erp-login-footnote a {
    color: var(--erp-teal-dark);
    font-weight: 700;
    text-decoration: none;
}

.erp-login-footnote a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.erp-product-footer {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 17px 22px;
    border-top: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .82);
    background: var(--erp-brand-background);
    text-align: center;
    font-size: 10px;
}

.erp-product-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 11px;
}

.erp-product-footer a {
    color: #fff;
    text-decoration: none;
}

.erp-product-footer a:hover {
    color: #d8f4ee;
    text-decoration: underline;
}

@media (max-width: 620px) {
    .erp-product-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
        padding: 11px 14px;
    }

    .erp-product-header > nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }

    .erp-product-header > nav > a {
        min-height: 34px;
        padding: 0 9px;
        font-size: 10px;
    }

    .erp-login-screen {
        padding: 24px 14px;
    }

    .erp-login-card {
        padding: 27px 22px;
    }

    .erp-login-card-header {
        margin-bottom: 30px;
    }

    .erp-product-footer {
        padding: 14px 12px;
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .erp-login-page *,
    .erp-login-page *::before,
    .erp-login-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
