:root {
    --erp-bg: #eef3f8;
    --erp-surface: #ffffff;
    --erp-sidebar: #0b1f36;
    --erp-sidebar-soft: #122c49;
    --erp-primary: #1f7a8c;
    --erp-primary-soft: #e8f6f9;
    --erp-text: #1e293b;
    --erp-muted: #64748b;
    --erp-border: #dbe4ef;
    --erp-danger: #e11d48;
}

* {
    font-family: "Manrope", sans-serif;
}

body.erp-body {
    background:
        radial-gradient(circle at 20% 0%, #dff2ff 0%, transparent 35%),
        radial-gradient(circle at 80% 10%, #ecffe8 0%, transparent 30%),
        var(--erp-bg);
    color: var(--erp-text);
    min-height: 100vh;
}

.erp-layout {
    display: flex;
    min-height: 100vh;
}

.erp-sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--erp-sidebar), #0f223b 60%, #0d1d33);
    color: #fff;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1030;
    transition: width 0.2s ease, padding 0.2s ease;
}

.erp-sidebar::-webkit-scrollbar {
    width: 8px;
}

.erp-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
}

.erp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.erp-brand img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.brand-title {
    display: block;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.brand-subtitle {
    display: block;
    font-size: 12px;
    opacity: 0.75;
}

.erp-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.erp-nav-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.6);
    margin: 14px 10px 4px;
}

.erp-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 14px;
}

.erp-nav-item i {
    font-size: 16px;
    min-width: 18px;
}

.erp-nav-item:hover,
.erp-nav-item.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.erp-nav-item.nav-danger {
    color: #ffd7e0;
}

.erp-sidebar-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 10px;
}

.erp-main {
    flex: 1;
    min-width: 0;
    margin-left: 280px;
    width: calc(100% - 280px);
}

.erp-topbar {
    height: 70px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--erp-border);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.erp-topbar-right {
    margin-left: auto;
}

.erp-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #13314f;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.2px;
    padding: 4px 8px;
    border-radius: 10px;
}

.erp-topbar-brand:hover {
    background: rgba(15, 61, 88, 0.08);
    color: #0f3050;
}

.erp-topbar-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.erp-topbar-brand span {
    line-height: 1;
}

.erp-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--erp-border);
    border-radius: 999px;
    padding: 6px 12px 6px 6px;
}

.erp-user-chip img,
.erp-user-chip span {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--erp-primary);
    color: #fff;
    font-weight: 700;
}

.erp-user-chip strong {
    display: block;
    font-size: 13px;
    line-height: 1.1;
}

.erp-user-chip small {
    display: block;
    font-size: 10px;
    color: var(--erp-muted);
}

.erp-content {
    padding: 24px;
}

body.erp-sidebar-compact .erp-sidebar {
    width: 88px;
    padding-left: 10px;
    padding-right: 10px;
}

body.erp-sidebar-compact .erp-main {
    margin-left: 88px;
    width: calc(100% - 88px);
}

body.erp-sidebar-compact .erp-brand {
    justify-content: center;
}

body.erp-sidebar-compact .erp-brand > div,
body.erp-sidebar-compact .erp-nav-label,
body.erp-sidebar-compact .erp-nav-item span {
    white-space: nowrap;
}

body.erp-sidebar-compact .erp-brand > div {
    display: none;
}

body.erp-sidebar-compact .erp-nav-item {
    justify-content: center;
    font-size: 0;
    gap: 0;
    color: rgba(255, 255, 255, 0.96);
}

body.erp-sidebar-compact .erp-nav-item i {
    font-size: 18px;
}

body.erp-sidebar-compact .erp-nav-label {
    display: none;
}

.erp-mobile-shortcut {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: rgba(11, 31, 54, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.erp-mobile-shortcut .shortcut-item {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 62px;
    font-size: 11px;
    font-weight: 700;
}

.erp-mobile-shortcut .shortcut-item i {
    font-size: 17px;
}

.erp-mobile-shortcut .shortcut-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

#mobileSidebar .offcanvas-header,
#mobileSidebar .offcanvas-body {
    background: linear-gradient(180deg, var(--erp-sidebar), #0f223b 60%, #0d1d33);
    color: #ffffff;
}

#mobileSidebar .offcanvas-title {
    color: #ffffff;
}

#mobileSidebar .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

#mobileSidebar .erp-nav-item {
    color: rgba(255, 255, 255, 0.95);
}

#mobileSidebar .erp-nav-item.nav-danger {
    color: #ffd7e0;
}

.card,
.erp-card {
    border: 1px solid var(--erp-border);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(13, 31, 49, 0.04);
}

.quick-menu {
    text-decoration: none;
    color: inherit;
}

.quick-menu .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-menu .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(12, 30, 55, 0.12);
}

.profile-avatar-sm,
.profile-avatar-lg {
    border-radius: 999px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(15, 32, 56, 0.2);
}

.profile-avatar-sm {
    width: 54px;
    height: 54px;
}

.profile-avatar-lg {
    width: 120px;
    height: 120px;
}

.profile-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--erp-primary), #36a3b8);
    color: #fff;
    font-weight: 700;
    font-size: 28px;
}

.dashboard-header {
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(120deg, #0f3d58, #1f7a8c 50%, #37a3b7);
    color: #fff;
    margin-bottom: 20px;
}

.dashboard-stat-card {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: 14px;
    padding: 16px;
    height: 100%;
}

.dashboard-stat-card h6 {
    color: var(--erp-muted);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dashboard-stat-card h4 {
    margin: 0;
    font-weight: 800;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, #d8ecff 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, #dfffe7 0%, transparent 35%),
        linear-gradient(145deg, #f3f8ff, #eef6ff);
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-wrap {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(20, 36, 55, 0.18);
    border: 1px solid #d9e6f5;
}

.login-panel-brand {
    background: linear-gradient(145deg, #0b1f36, #1f7a8c);
    color: #fff;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.login-panel-brand h1 {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
}

.login-panel-brand p {
    color: rgba(255, 255, 255, 0.82);
}

.login-panel-form {
    background: #fff;
    padding: 36px;
}

.login-heading {
    color: #0f3050;
    font-weight: 800;
}

.table thead th a {
    color: inherit;
}

@media (max-width: 991.98px) {
    .erp-sidebar {
        display: none;
    }

    .erp-main {
        margin-left: 0;
        width: 100%;
    }

    body.erp-sidebar-compact .erp-main {
        margin-left: 0;
        width: 100%;
    }

    .erp-content {
        padding: 16px;
        padding-bottom: 88px;
    }

    .login-wrap {
        grid-template-columns: 1fr;
    }

    .login-panel-brand {
        padding: 26px;
    }

    .login-brand-logo {
        width: 96px;
        height: 96px;
    }

    .login-panel-form {
        padding: 24px;
    }

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