:root {
    --erp-bg: #f7f8fb;
    --erp-surface: #ffffff;
    --erp-surface-soft: #f0f4fa;

    --erp-text: #111827;
    --erp-muted: #667085;
    --erp-line: #e5e7eb;

    --erp-primary: #155eef;
    --erp-primary-dark: #123f9c;
    --erp-primary-soft: #eef4ff;

    --erp-success: #067647;
    --erp-warning: #b54708;

    --erp-dark: #0b1220;
    --erp-dark-soft: #111c30;

    --erp-radius-sm: 12px;
    --erp-radius-md: 18px;
    --erp-radius-lg: 28px;

    --erp-shadow:
        0 20px 55px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.polygon-erp-platform {
    margin: 0;
    background: var(--erp-bg);
    color: var(--erp-text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.55;
}

body.polygon-erp-platform a {
    color: inherit;
    text-decoration: none;
}

.erp-container {
    width: min(1220px, calc(100% - 36px));
    margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.erp-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255,255,255,.94);
    backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(229,231,235,.92);
}

.erp-nav {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 26px;
}

.erp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.erp-brand-mark {
    width: 42px;
    height: 42px;

    border-radius: 13px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            145deg,
            #155eef,
            #1849a9
        );

    color: #fff;

    font-size: 18px;
    font-weight: 900;

    box-shadow:
        0 9px 24px rgba(21,94,239,.22);
}

.erp-brand-name {
    display: flex;
    flex-direction: column;

    font-size: 16px;
    font-weight: 850;
    line-height: 1.05;
}

.erp-brand-name small {
    margin-top: 5px;

    color: var(--erp-muted);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .13em;
    text-transform: uppercase;
}

.erp-primary-nav {
    display: flex;
    align-items: center;

    gap: 28px;

    color: #475467;

    font-size: 13px;
    font-weight: 700;
}

.erp-nav-actions {
    display: flex;
    align-items: center;

    gap: 9px;
}


/*
 ============================================================
 NEW ERP SECTION MENU
 ============================================================

 Intentionally empty.

 Old CMS/menu/section structure is NOT reused.

 After the complete new public frontend is approved,
 we will design this system fresh.
*/

.erp-section-menu {
    display: none;
}


/* =========================================================
   BUTTONS
========================================================= */

.erp-btn {
    min-height: 44px;

    padding: 0 18px;

    border: 1px solid transparent;
    border-radius: 11px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    font-size: 13px;
    font-weight: 800;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.erp-btn:hover {
    transform: translateY(-1px);
}

.erp-btn-primary {
    background: var(--erp-primary);
    color: #fff;

    box-shadow:
        0 9px 24px rgba(21,94,239,.18);
}

.erp-btn-primary:hover {
    background: var(--erp-primary-dark);
}

.erp-btn-secondary {
    background: #fff;

    border-color: var(--erp-line);

    color: var(--erp-text);
}


/* =========================================================
   HERO
========================================================= */

.erp-hero {
    position: relative;

    overflow: hidden;

    padding:
        92px 0
        82px;

    background:
        radial-gradient(
            circle at 84% 10%,
            rgba(21,94,239,.12),
            transparent 30%
        ),
        radial-gradient(
            circle at 10% 85%,
            rgba(14,165,233,.07),
            transparent 25%
        ),
        linear-gradient(
            180deg,
            #ffffff,
            #f7f9fd
        );
}

.erp-hero-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(430px, .95fr);

    align-items: center;

    gap: 70px;
}

.erp-kicker {
    display: inline-flex;
    align-items: center;

    padding: 7px 11px;

    border:
        1px solid
        #d7e3ff;

    border-radius: 999px;

    background: var(--erp-primary-soft);

    color: var(--erp-primary);

    font-size: 11px;
    font-weight: 850;

    letter-spacing: .09em;
    text-transform: uppercase;
}

.erp-hero h1 {
    margin:
        22px 0
        20px;

    max-width: 760px;

    font-size:
        clamp(
            44px,
            6vw,
            72px
        );

    line-height: .99;

    letter-spacing: -.055em;
}

.erp-hero-copy {
    max-width: 650px;

    margin: 0;

    color: var(--erp-muted);

    font-size: 18px;
}

.erp-hero-actions {
    margin-top: 31px;

    display: flex;
    flex-wrap: wrap;

    gap: 11px;
}

.erp-hero-trust {
    margin-top: 23px;

    display: flex;
    flex-wrap: wrap;

    gap: 16px;

    color: #475467;

    font-size: 12px;
    font-weight: 650;
}

.erp-hero-trust span::before {
    content: "✓";

    margin-right: 6px;

    color: var(--erp-success);
}


/* =========================================================
   APPLICATION WORKSPACE PREVIEW
========================================================= */

.erp-app-shell {
    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,.1);

    border-radius: 26px;

    background: var(--erp-dark);

    box-shadow:
        0 32px 75px
        rgba(15,23,42,.22);
}

.erp-app-shell-top {
    min-height: 54px;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid
        rgba(255,255,255,.08);
}

.erp-app-shell-title {
    color: #d9e3f3;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .07em;
    text-transform: uppercase;
}

.erp-window-dots {
    display: flex;
    gap: 6px;
}

.erp-window-dots i {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: rgba(255,255,255,.28);
}

.erp-app-shell-body {
    display: grid;
    grid-template-columns: 155px 1fr;

    min-height: 400px;
}

.erp-shell-sidebar {
    padding: 20px 12px;

    background: #0d1728;

    border-right:
        1px solid
        rgba(255,255,255,.06);
}

.erp-shell-brand {
    margin-bottom: 23px;

    padding: 0 9px;

    color: #fff;

    font-size: 12px;
    font-weight: 850;
}

.erp-shell-link {
    margin-bottom: 5px;

    padding: 10px 11px;

    border-radius: 9px;

    color: #8493aa;

    font-size: 11px;
    font-weight: 700;
}

.erp-shell-link.active {
    background: rgba(21,94,239,.2);
    color: #eaf1ff;
}

.erp-shell-content {
    padding: 22px;

    background:
        linear-gradient(
            145deg,
            #111d31,
            #0c1525
        );
}

.erp-shell-greeting {
    color: #fff;

    font-size: 20px;
    font-weight: 800;
}

.erp-shell-subtitle {
    margin-top: 3px;

    color: #8493aa;

    font-size: 11px;
}

.erp-shell-metrics {
    margin-top: 21px;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 10px;
}

.erp-shell-metric {
    padding: 15px;

    border:
        1px solid
        rgba(255,255,255,.07);

    border-radius: 13px;

    background:
        rgba(255,255,255,.045);
}

.erp-shell-metric strong {
    display: block;

    color: #fff;

    font-size: 22px;
}

.erp-shell-metric span {
    display: block;

    margin-top: 4px;

    color: #8493aa;

    font-size: 10px;
}

.erp-shell-apps {
    margin-top: 17px;

    padding: 15px;

    border:
        1px solid
        rgba(255,255,255,.07);

    border-radius: 13px;

    background:
        rgba(255,255,255,.035);
}

.erp-shell-apps-title {
    margin-bottom: 10px;

    color: #cbd5e1;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .07em;
    text-transform: uppercase;
}

.erp-shell-app-row {
    display: flex;
    gap: 8px;
}

.erp-mini-app {
    flex: 1;

    padding: 11px;

    border-radius: 9px;

    background:
        rgba(21,94,239,.11);

    color: #dbe6ff;

    font-size: 10px;
    font-weight: 750;
}


/* =========================================================
   GENERAL SECTION
========================================================= */

.erp-section {
    padding: 84px 0;
}

.erp-section-white {
    background: var(--erp-surface);
}

.erp-section-head {
    max-width: 720px;

    margin-bottom: 33px;
}

.erp-section-head h2 {
    margin:
        10px 0
        11px;

    font-size:
        clamp(
            30px,
            4vw,
            45px
        );

    line-height: 1.07;

    letter-spacing: -.038em;
}

.erp-section-head p {
    margin: 0;

    color: var(--erp-muted);
}


/* =========================================================
   APPLICATION CATALOG
========================================================= */

.erp-app-grid {
    display: grid;
    grid-template-columns:
        repeat(4, 1fr);

    gap: 17px;
}

.erp-product {
    min-height: 310px;

    padding: 23px;

    border:
        1px solid
        var(--erp-line);

    border-radius: var(--erp-radius-md);

    background: var(--erp-surface);

    display: flex;
    flex-direction: column;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.erp-product:hover {
    transform: translateY(-4px);

    border-color: #cbd5e1;

    box-shadow: var(--erp-shadow);
}

.erp-product-icon {
    width: 47px;
    height: 47px;

    border-radius: 13px;

    display: grid;
    place-items: center;

    background: var(--erp-primary-soft);

    color: var(--erp-primary);

    font-size: 12px;
    font-weight: 900;

    letter-spacing: .04em;
}

.erp-product h3 {
    margin:
        18px 0
        7px;

    font-size: 18px;
}

.erp-product p {
    margin: 0;

    color: var(--erp-muted);

    font-size: 13px;
}

.erp-product ul {
    margin:
        16px 0
        22px;

    padding: 0;

    list-style: none;

    color: #475467;

    font-size: 12px;
}

.erp-product li {
    margin: 6px 0;
}

.erp-product li::before {
    content: "✓";

    margin-right: 7px;

    color: var(--erp-success);

    font-weight: 900;
}

.erp-product-footer {
    margin-top: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.erp-product-link {
    color: var(--erp-primary);

    font-size: 12px;
    font-weight: 850;
}

.erp-coming {
    padding: 4px 7px;

    border-radius: 999px;

    background: #f2f4f7;

    color: #667085;

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;
}


/* =========================================================
   PLATFORM CORE
========================================================= */

.erp-core-grid {
    display: grid;
    grid-template-columns:
        repeat(4, 1fr);

    gap: 16px;
}

.erp-core-card {
    padding: 22px;

    border:
        1px solid
        var(--erp-line);

    border-radius: 15px;

    background: var(--erp-surface);
}

.erp-core-card strong {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
}

.erp-core-card span {
    color: var(--erp-muted);

    font-size: 12px;
}


/* =========================================================
   DARK PLATFORM SECTION
========================================================= */

.erp-platform-band {
    background: var(--erp-dark);

    color: #fff;
}

.erp-platform-band .erp-section-head p {
    color: #9aacbf;
}

.erp-platform-columns {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);

    gap: 17px;
}

.erp-platform-card {
    min-height: 205px;

    padding: 25px;

    border:
        1px solid
        rgba(255,255,255,.08);

    border-radius: 17px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.07),
            rgba(255,255,255,.025)
        );
}

.erp-platform-card h3 {
    margin:
        0 0
        9px;

    font-size: 17px;
}

.erp-platform-card p {
    margin: 0;

    color: #9aacbf;

    font-size: 12px;
}


/* =========================================================
   CTA
========================================================= */

.erp-cta-wrap {
    padding: 80px 0;
}

.erp-cta {
    padding: 50px;

    border-radius: var(--erp-radius-lg);

    background:
        radial-gradient(
            circle at 90% 15%,
            rgba(255,255,255,.12),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #133b89,
            #155eef
        );

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 35px;
}

.erp-cta h2 {
    margin:
        0 0
        10px;

    font-size: 33px;

    letter-spacing: -.035em;
}

.erp-cta p {
    max-width: 650px;

    margin: 0;

    color: #d7e4ff;
}


/* =========================================================
   FOOTER
========================================================= */

.erp-footer {
    background: #fff;

    border-top:
        1px solid
        var(--erp-line);
}

.erp-footer-inner {
    min-height: 115px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.erp-footer-copy {
    margin-top: 4px;

    color: var(--erp-muted);

    font-size: 11px;
}

.erp-footer-links {
    display: flex;

    gap: 20px;

    color: #475467;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1050px) {

    .erp-primary-nav {
        display: none;
    }

    .erp-hero-grid {
        grid-template-columns: 1fr;
    }

    .erp-app-shell {
        max-width: 720px;
    }

    .erp-app-grid,
    .erp-core-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}

@media (max-width: 700px) {

    .erp-container {
        width:
            min(
                calc(100% - 22px),
                1220px
            );
    }

    .erp-nav {
        min-height: 64px;
    }

    .erp-brand-name small {
        display: none;
    }

    .erp-nav-actions .erp-btn-secondary {
        display: none;
    }

    .erp-hero {
        padding:
            58px 0
            50px;
    }

    .erp-hero h1 {
        font-size: 42px;
    }

    .erp-hero-copy {
        font-size: 15px;
    }

    .erp-app-grid,
    .erp-core-grid,
    .erp-platform-columns {
        grid-template-columns: 1fr;
    }

    .erp-app-shell-body {
        grid-template-columns: 1fr;
    }

    .erp-shell-sidebar {
        display: none;
    }

    .erp-cta {
        padding: 31px 24px;

        flex-direction: column;
        align-items: flex-start;
    }

    .erp-footer-inner {
        padding: 27px 0;

        align-items: flex-start;
        flex-direction: column;
    }

    .erp-footer-links {
        flex-wrap: wrap;
    }

}


/* =========================================================
   POLYGON ERP — VISUAL POLISH V1.1
========================================================= */


/*
 * Primary CTA contrast.
 *
 * More specific selector is required because:
 *
 * .polygon-erp-platform a
 *
 * has greater specificity than .erp-btn-primary.
 */

.polygon-erp-platform .erp-btn-primary {
    color: #ffffff;
}

.polygon-erp-platform .erp-btn-primary:visited,
.polygon-erp-platform .erp-btn-primary:hover,
.polygon-erp-platform .erp-btn-primary:focus {
    color: #ffffff;
}


/* ---------------------------------------------------------
   HEADER POLISH
--------------------------------------------------------- */

.erp-header {
    box-shadow:
        0 1px 0 rgba(15,23,42,.02),
        0 8px 28px rgba(15,23,42,.035);
}

.erp-nav {
    min-height: 70px;
}

.erp-primary-nav a {
    position: relative;

    transition:
        color .18s ease;
}

.erp-primary-nav a:hover {
    color: var(--erp-primary);
}


/* ---------------------------------------------------------
   HERO POLISH
--------------------------------------------------------- */

.erp-hero {
    padding:
        72px 0
        72px;
}

.erp-hero-grid {
    gap: 58px;
}

.erp-hero h1 {
    max-width: 690px;

    margin-top: 20px;

    font-size:
        clamp(
            45px,
            5.35vw,
            69px
        );

    letter-spacing: -.052em;
}

.erp-hero-copy {
    max-width: 650px;

    line-height: 1.7;
}

.erp-hero-actions {
    margin-top: 27px;
}


/* ---------------------------------------------------------
   WORKSPACE PREVIEW POLISH
--------------------------------------------------------- */

.erp-app-shell {
    border:
        1px solid
        rgba(148,163,184,.22);

    box-shadow:
        0 32px 80px
        rgba(15,23,42,.20),
        0 8px 28px
        rgba(15,23,42,.10);
}

.erp-app-shell-top {
    min-height: 52px;
}

.erp-app-shell-title {
    letter-spacing: .06em;
}

.erp-shell-content {
    padding: 24px;
}

.erp-shell-greeting {
    font-size: 21px;

    letter-spacing: -.015em;
}

.erp-shell-metric {
    min-height: 86px;

    transition:
        transform .18s ease,
        background .18s ease,
        border-color .18s ease;
}

.erp-shell-metric:hover {
    transform: translateY(-2px);

    border-color:
        rgba(96,165,250,.25);

    background:
        rgba(255,255,255,.06);
}

.erp-shell-apps {
    margin-top: 18px;
}

.erp-mini-app {
    min-height: 40px;

    display: flex;
    align-items: center;

    padding:
        10px 12px;
}


/* ---------------------------------------------------------
   PRODUCT CARDS
--------------------------------------------------------- */

.erp-product {
    position: relative;

    overflow: hidden;
}

.erp-product::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 3px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(21,94,239,.55),
            transparent
        );

    opacity: 0;

    transition:
        opacity .2s ease;
}

.erp-product:hover::after {
    opacity: 1;
}

.erp-product-icon {
    box-shadow:
        inset 0 0 0 1px
        rgba(21,94,239,.06);
}


/* ---------------------------------------------------------
   CORE CARDS
--------------------------------------------------------- */

.erp-core-card {
    min-height: 126px;

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.erp-core-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 16px 38px
        rgba(15,23,42,.07);
}


/* ---------------------------------------------------------
   MOBILE POLISH
--------------------------------------------------------- */

@media (max-width: 700px) {

    .erp-hero {
        padding:
            48px 0
            46px;
    }

    .erp-hero h1 {
        font-size: 39px;

        line-height: 1.02;
    }

    .erp-hero-actions {
        display: grid;

        grid-template-columns: 1fr;
    }

    .erp-hero-actions .erp-btn {
        width: 100%;
    }

    .erp-app-shell {
        border-radius: 20px;
    }

}


/* =========================================================
   POLYGON ERP MOBILE NAVIGATION V1
========================================================= */

.erp-mobile-toggle {
    width: 44px;
    height: 44px;

    padding: 0;

    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    gap: 5px;

    border: 1px solid var(--erp-line);
    border-radius: 11px;

    background: #ffffff;

    cursor: pointer;

    box-shadow:
        0 6px 18px rgba(15,23,42,.045);

    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.erp-mobile-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.erp-mobile-toggle span {
    width: 19px;
    height: 2px;

    display: block;

    border-radius: 999px;

    background: var(--erp-text);

    transition:
        transform .2s ease,
        opacity .2s ease;
}

.erp-mobile-toggle.is-open span:nth-child(1) {
    transform:
        translateY(7px)
        rotate(45deg);
}

.erp-mobile-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.erp-mobile-toggle.is-open span:nth-child(3) {
    transform:
        translateY(-7px)
        rotate(-45deg);
}


/* ---------------------------------------------------------
   MOBILE DRAWER
--------------------------------------------------------- */

.erp-mobile-nav {
    border-top:
        1px solid var(--erp-line);

    background:
        rgba(255,255,255,.985);

    box-shadow:
        0 20px 45px
        rgba(15,23,42,.10);
}

.erp-mobile-nav[hidden] {
    display: none !important;
}

.erp-mobile-nav-inner {
    padding-top: 12px;
    padding-bottom: 20px;
}

.erp-mobile-nav-link {
    min-height: 52px;

    padding: 0 4px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid #eef0f3;

    color: #344054;

    font-size: 14px;
    font-weight: 750;
}

.erp-mobile-nav-link:hover {
    color: var(--erp-primary);
}

.erp-mobile-nav-link span:last-child {
    color: #98a2b3;

    font-size: 16px;
}

.erp-mobile-nav-actions {
    padding-top: 16px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 9px;
}


/* ---------------------------------------------------------
   TABLET / MOBILE
--------------------------------------------------------- */

@media (max-width: 1050px) {

    .erp-mobile-toggle {
        display: flex;
    }

}


@media (max-width: 700px) {

    .erp-nav-actions {
        gap: 8px;
    }

    .erp-nav-actions > .erp-btn-primary {
        min-height: 42px;

        padding:
            0 15px;

        font-size: 12px;
    }

    .erp-mobile-toggle {
        width: 42px;
        height: 42px;
    }

    .erp-mobile-nav-actions {
        grid-template-columns: 1fr;
    }

    /*
     * Desktop-header Sign In remains hidden on mobile.
     * It is available inside the hamburger drawer.
     */
    .erp-nav-actions > .erp-btn-secondary {
        display: none;
    }

}


@media (max-width: 430px) {

    .erp-brand {
        gap: 9px;
    }

    .erp-brand-mark {
        width: 39px;
        height: 39px;

        border-radius: 11px;
    }

    .erp-brand-name {
        font-size: 14px;
    }

    .erp-nav-actions > .erp-btn-primary {
        padding:
            0 11px;
    }

}


/* =========================================================
   POLYGON ERP SECONDARY BUTTON CONTRAST FIX
========================================================= */

/*
 * Anchor color inheritance previously caused white text
 * inside white secondary buttons when placed in dark/blue
 * sections.
 */

.polygon-erp-platform a.erp-btn-secondary {
    color: var(--erp-text);
}

.polygon-erp-platform a.erp-btn-secondary:visited {
    color: var(--erp-text);
}

.polygon-erp-platform a.erp-btn-secondary:hover,
.polygon-erp-platform a.erp-btn-secondary:focus {
    color: var(--erp-primary);
}


/*
 * CTA button receives an explicit foreground/background
 * independent of the surrounding blue CTA text color.
 */

.polygon-erp-platform .erp-cta a.erp-btn-secondary {
    background: #ffffff;
    color: #111827;

    border-color:
        rgba(255,255,255,.92);

    box-shadow:
        0 8px 24px
        rgba(15,23,42,.14);
}

.polygon-erp-platform .erp-cta a.erp-btn-secondary:hover,
.polygon-erp-platform .erp-cta a.erp-btn-secondary:focus {
    background: #f8fafc;
    color: var(--erp-primary);
}
