
:root {
    --erp-orange: #f56600;
    --erp-orange-dark: #d95500;
    --erp-sidebar: #17191d;
    --erp-sidebar-muted: #a7adb7;
    --erp-bg: #f4f6fa;
    --erp-text: #1c2430;
    --erp-sidebar-width: 268px;
}

* {
    box-sizing: border-box;
}

body.erp-body {
    margin: 0;
    background: var(--erp-bg);
    color: var(--erp-text);
    font-family: "Segoe UI", Arial, sans-serif;
}

.erp-shell {
    min-height: 100vh;
}

/* SIDEBAR */

.erp-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1045;

    width: var(--erp-sidebar-width);

    display: flex;
    flex-direction: column;

    background: var(--erp-sidebar);
    color: #fff;

    box-shadow: 8px 0 30px rgba(17, 24, 39, .08);

    overflow-y: auto;
    transition: transform .25s ease;
}

/* BRAND */

.sidebar-brand {
    min-height: 82px;

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

    padding: 18px 20px;

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

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

    color: #fff;
    text-decoration: none;
}

.brand-symbol {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    border-radius: 12px;
    background: var(--erp-orange);

    font-size: 24px;

    box-shadow: 0 6px 16px rgba(245,102,0,.24);
}

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

.brand-copy strong {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .7px;
}

.brand-copy small {
    margin-top: 4px;
    color: #ff9b58;
    font-size: 10px;
    letter-spacing: 1.6px;
}

.sidebar-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 30px;
}

/* COMPANY DETAILS */

.sidebar-company {
    margin: 18px 15px 16px;
    padding: 14px;

    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;

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

.company-name {
    font-size: 13px;
    font-weight: 750;
}

.company-address,
.company-phone {
    margin-top: 5px;
    color: var(--erp-sidebar-muted);
    font-size: 11px;
    line-height: 1.6;
}

.company-phone {
    color: #ffad77;
}

/* MENU */

.sidebar-section-label {
    padding: 7px 23px 9px;

    color: #737b87;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;

    padding: 0 12px 20px;
}

.sidebar-link {
    position: relative;

    display: flex;
    align-items: center;
    gap: 13px;

    min-height: 46px;
    padding: 11px 13px;

    border-radius: 9px;

    color: #c3c8d0;
    text-decoration: none;

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

    transition: background .15s ease, color .15s ease;
}

.sidebar-link:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(
        100deg,
        rgba(245,102,0,.23),
        rgba(245,102,0,.09)
    );

    color: #fff;
}

.sidebar-link.active::before {
    content: "";

    position: absolute;
    left: -12px;
    top: 8px;
    bottom: 8px;

    width: 3px;

    background: var(--erp-orange);
    border-radius: 0 3px 3px 0;
}

.sidebar-icon {
    width: 22px;
    flex: 0 0 22px;

    text-align: center;
    font-size: 19px;

    color: #929aa6;
}

.sidebar-link.active .sidebar-icon {
    color: #ff8b42;
}

.active-indicator {
    width: 6px;
    height: 6px;

    margin-left: auto;

    border-radius: 50%;
    background: #ff8b42;
}

/* USER / LOGOUT */

.sidebar-bottom {
    margin-top: auto;
    padding: 14px 15px 17px;

    border-top: 1px solid rgba(255,255,255,.09);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 3px 3px 13px;
    min-width: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;

    display: grid;
    place-items: center;

    border-radius: 50%;
    background: #343941;

    color: #ff9b58;
    font-weight: 800;
}

.user-meta {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-meta strong {
    max-width: 175px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 12px;
}

.user-meta small {
    color: #929aa6;
    font-size: 11px;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;

    border-radius: 8px;

    background: rgba(255,255,255,.055);
    color: #d5d9df;

    text-decoration: none;
    font-size: 12px;
    font-weight: 650;
}

.sidebar-logout:hover {
    background: rgba(245,102,0,.18);
    color: #fff;
}

/* MAIN CONTENT */

.erp-main {
    min-height: 100vh;
    min-width: 0;

    margin-left: var(--erp-sidebar-width);

    display: flex;
    flex-direction: column;
}

/* TOP HEADER */

.erp-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;

    min-height: 78px;

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

    padding: 13px 30px;

    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #e7eaf0;
    backdrop-filter: blur(10px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.topbar-eyebrow {
    color: #9299a5;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.topbar-title {
    margin-top: 3px;

    color: #202733;
    font-size: 17px;
    font-weight: 750;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;

    color: #7a8290;
    font-size: 11px;
    white-space: nowrap;
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 7px;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: #26b36b;

    box-shadow: 0 0 0 3px rgba(38,179,107,.12);
}

.sidebar-toggle {
    display: none;

    width: 40px;
    height: 38px;
    padding: 9px;

    border: 1px solid #e3e7ee;
    border-radius: 9px;

    background: #fff;
}

.sidebar-toggle span {
    display: block;

    width: 18px;
    height: 2px;

    margin: 3px auto;

    border-radius: 2px;
    background: #252b35;
}

/* PAGE HEADING */

.erp-content {
    width: 100%;
    max-width: 1800px;

    flex: 1;

    padding: 27px 30px 35px;
}

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

    margin-bottom: 22px;
}

.content-kicker {
    margin-bottom: 5px;

    color: var(--erp-orange);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.content-heading h1 {
    margin: 0;

    color: #202733;
    font-size: 25px;
    line-height: 1.25;
    font-weight: 800;
}

.content-heading p {
    margin: 7px 0 0;

    color: #858d9a;
    font-size: 11px;
}

/* EXISTING MODULE CARDS / TABLES */

.erp-content .card {
    border: 1px solid #edf0f5;
    border-radius: 13px;

    box-shadow: 0 4px 18px rgba(28,36,48,.035);
}

.erp-content .btn-primary {
    background: var(--erp-orange);
    border-color: var(--erp-orange);
}

.erp-content .btn-primary:hover {
    background: var(--erp-orange-dark);
    border-color: var(--erp-orange-dark);
}

.erp-content .table thead th {
    background: #f2f4f8;
    color: #586171;

    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: nowrap;
}

.erp-content .table td {
    vertical-align: middle;
    font-size: 13px;
}

.erp-content .form-label {
    color: #444d5b;
    font-size: 12px;
    font-weight: 700;
}

/* FOOTER */

.erp-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    padding: 15px 30px;

    border-top: 1px solid #e7eaf0;
    background: #fff;

    color: #969daa;
    font-size: 10px;
}

/* MOBILE BACKDROP */

.sidebar-backdrop {
    display: none;
}

/* TABLET AND SMALL LAPTOP */

@media (max-width: 1199.98px) {

    :root {
        --erp-sidebar-width: 245px;
    }

    .erp-topbar {
        padding-left: 22px;
        padding-right: 22px;
    }

    .erp-content {
        padding-left: 22px;
        padding-right: 22px;
    }

}

/* MOBILE NAVIGATION */

@media (max-width: 991.98px) {

    .erp-sidebar {
        width: min(290px, 86vw);

        transform: translateX(-105%);
    }

    .erp-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .erp-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-backdrop.backdrop-visible {
        display: block;

        position: fixed;
        inset: 0;
        z-index: 1040;

        background: rgba(10,14,20,.55);
    }

    body.sidebar-mobile-open {
        overflow: hidden;
    }

    .erp-topbar {
        min-height: 70px;
        padding: 12px 17px;
    }

    .topbar-right {
        gap: 10px;
    }

    .topbar-status {
        display: none;
    }

    .erp-content {
        padding: 22px 17px 28px;
    }

    .erp-footer {
        padding: 13px 17px;
    }

}

/* SMALL PHONES */

@media (max-width: 575.98px) {

    .topbar-eyebrow {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .topbar-title {
        font-size: 15px;
    }

    .topbar-date {
        font-size: 10px;
    }

    .content-heading h1 {
        font-size: 21px;
    }

    .content-heading p {
        max-width: 290px;
        line-height: 1.5;
    }

    .erp-footer {
        flex-direction: column;
        gap: 4px;
    }

}

/* PRINT */

@media print {

    .erp-sidebar,
    .erp-topbar,
    .erp-footer,
    .sidebar-backdrop,
    .no-print {
        display: none !important;
    }

    .erp-main {
        margin: 0 !important;
    }

    .erp-content {
        max-width: none;
        padding: 0 !important;
    }

    body.erp-body {
        background: #fff;
    }

    .erp-content .card {
        box-shadow: none;
    }

}
