* {
    box-sizing: border-box;
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #172033;
    font-size: 15px;
}

a {
    color: inherit;
}

.erp-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}

.erp-sidebar {
    background: #123d73;
    color: white;
    padding: 22px 16px;
    min-height: 100vh;
}

.erp-brand {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 24px;
}

.erp-company {
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 10px;
    background: rgba(255,255,255,.10);
}

.erp-company small {
    display: block;
    margin-top: 4px;
    color: #dbeafe;
}

.erp-menu {
    display: grid;
    gap: 6px;
}

.erp-menu a {
    display: block;
    color: #dbeafe;
    text-decoration: none;
    padding: 11px 13px;
    border-radius: 9px;
}

.erp-menu a:hover,
.erp-menu a.active {
    background: rgba(255,255,255,.15);
    color: white;
}

.erp-main {
    min-width: 0;
}

.erp-topbar {
    min-height: 66px;
    background: white;
    border-bottom: 1px solid #e5eaf1;
    padding: 13px 24px;
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.erp-title {
    margin: 0;
    font-size: 21px;
}

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

.erp-content {
    padding: 22px;
}

.erp-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.erp-card {
    background: white;
    border: 1px solid #e7ebf1;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 5px 18px rgba(20, 40, 80, .05);
}

.erp-stat-label {
    color: #64748b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.erp-stat-value {
    margin-top: 8px;
    font-size: 29px;
    font-weight: 800;
}

.erp-section {
    margin-top: 20px;
}

.erp-section-title {
    margin: 0 0 12px;
    font-size: 18px;
}

.erp-btn {
    border: 0;
    border-radius: 9px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.erp-btn-primary {
    background: #2563eb;
    color: white;
}

.erp-btn-danger {
    background: #fff1f2;
    color: #b42318;
}

.erp-input {
    width: 100%;
    height: 47px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 0 13px;
    font-size: 15px;
    background: white;
}

.erp-input:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, .10);
}

.erp-label {
    display: block;
    margin: 15px 0 7px;
    font-weight: 700;
}

.password-wrap {
    position: relative;
}

.password-wrap .erp-input {
    padding-right: 78px;
}

.password-toggle {
    position: absolute;
    top: 7px;
    right: 7px;
    height: 33px;
    padding: 0 11px;
    border: 0;
    border-radius: 7px;
    background: #e8eef7;
    cursor: pointer;
}

.erp-alert {
    padding: 12px;
    border-radius: 9px;
    margin-bottom: 15px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.erp-table-wrap {
    overflow-x: auto;
}

.erp-table {
    width: 100%;
    border-collapse: collapse;
}

.erp-table th,
.erp-table td {
    padding: 12px;
    border-bottom: 1px solid #edf0f5;
    text-align: left;
    white-space: nowrap;
}

.erp-table th {
    color: #64748b;
    font-size: 13px;
}

.mobile-menu-btn {
    display: none;
}

@media (max-width: 1000px) {
    .erp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .erp-shell {
        display: block;
    }

    .erp-sidebar {
        position: fixed;
        top: 0;
        left: -270px;
        width: 250px;
        height: 100%;
        z-index: 1000;
        transition: left .2s ease;
        overflow-y: auto;
    }

    body.menu-open .erp-sidebar {
        left: 0;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .erp-topbar {
        padding: 11px 13px;
    }

    .erp-title {
        font-size: 18px;
    }

    .erp-content {
        padding: 14px;
    }

    .erp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .erp-card {
        padding: 14px;
    }

    .erp-stat-value {
        font-size: 25px;
    }
}

@media (max-width: 460px) {
    .erp-grid {
        grid-template-columns: 1fr 1fr;
    }

    .erp-user-name {
        display: none;
    }
}
