:root {
    --erp-bg: #f4f7fb;
    --erp-panel: #ffffff;
    --erp-text: #1b2430;
    --erp-muted: #657085;
    --erp-border: #d9e2ef;
    --erp-primary: #0d6efd;
    --erp-primary-soft: #e8f1ff;
    --erp-sidebar: #0e1b2d;
    --erp-sidebar-soft: #173152;
    --erp-success: #0f9d58;
    --erp-danger: #d93025;
    --erp-warning: #f9ab00;
}

:root[data-theme='dark'] {
    --erp-bg: #070d1a;
    --erp-panel: #0f172a;
    --erp-text: #e5e7eb;
    --erp-muted: #94a3b8;
    --erp-border: rgba(148, 163, 184, 0.18);
    --erp-primary: #4f8cff;
    --erp-primary-soft: rgba(79, 140, 255, 0.16);
    --erp-sidebar: #050b17;
    --erp-sidebar-soft: #0b1630;
    --erp-success: #3ddc84;
    --erp-danger: #ff6b5a;
    --erp-warning: #ffd166;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at 18% 12%, #dbe9ff 0%, transparent 35%),
        radial-gradient(circle at 88% 2%, #e5fff5 0%, transparent 30%),
        var(--erp-bg);
    color: var(--erp-text);
    overflow-x: hidden;
}

:root[data-theme='dark'] body {
    background:
        radial-gradient(circle at 18% 12%, rgba(79, 140, 255, 0.16) 0%, transparent 42%),
        radial-gradient(circle at 88% 2%, rgba(61, 220, 132, 0.12) 0%, transparent 40%),
        var(--erp-bg);
    color-scheme: dark;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Sora', sans-serif;
}

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

.erp-sidebar {
    width: 272px;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #081223 0%, var(--erp-sidebar) 65%, var(--erp-sidebar-soft) 100%);
    color: #d9e3f2;
    padding: 1.25rem 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.erp-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
}

.erp-brand-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.13);
    color: #8ec5ff;
    font-size: 1.1rem;
}

.erp-brand h2 {
    margin: 0;
    font-size: 1.05rem;
    color: #fff;
}

.erp-brand small {
    color: #9bb0c9;
}

.erp-nav {
    display: grid;
    gap: 0.38rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
    align-content: start;
    grid-auto-rows: max-content;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.erp-nav::-webkit-scrollbar {
    width: 10px;
}

.erp-nav::-webkit-scrollbar-track {
    background: transparent;
}

.erp-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.erp-nav::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.32);
}

.erp-nav-link {
    text-decoration: none;
    color: #c3d2e6;
    padding: 0.62rem 0.7rem;
    border-radius: 0.7rem;
    display: flex;
    gap: 0.65rem;
    align-items: center;
    transition: all 0.2s ease;
    font-weight: 600;
}

.erp-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.erp-nav-link.active {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.45), rgba(13, 110, 253, 0.2));
    border: 1px solid rgba(126, 181, 255, 0.35);
    color: #fff;
}

.erp-sidebar-footer {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.9rem;
    padding: 0.8rem;
}

.erp-sidebar-footer p {
    margin: 0;
    font-size: 0.75rem;
    color: #93a6be;
}

.erp-sidebar-footer strong {
    font-size: 0.95rem;
    color: #fff;
}

.erp-main {
    flex: 1;
    margin-left: 272px;
    display: flex;
    flex-direction: column;
}

.erp-topbar {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--erp-border);
    padding: 0.9rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

:root[data-theme='dark'] .erp-topbar {
    background: rgba(15, 23, 42, 0.78);
}

:root[data-theme='dark'] .bg-light,
:root[data-theme='dark'] .bg-light-subtle,
:root[data-theme='dark'] .bg-white {
    background-color: rgba(15, 23, 42, 0.42) !important;
    color: var(--erp-text);
    backdrop-filter: blur(10px);
}

:root[data-theme='dark'] .text-bg-light {
    background-color: rgba(15, 23, 42, 0.42) !important;
    color: var(--erp-text) !important;
    border: 1px solid var(--erp-border);
    backdrop-filter: blur(10px);
}

:root[data-theme='dark'] .btn-outline-dark {
    color: var(--erp-text);
    border-color: rgba(148, 163, 184, 0.35);
}

:root[data-theme='dark'] .btn-outline-dark:hover,
:root[data-theme='dark'] .btn-outline-dark:focus {
    background-color: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.55);
    color: var(--erp-text);
}

:root[data-theme='dark'] .text-dark {
    color: var(--erp-text) !important;
}

:root[data-theme='dark'] .bg-warning.text-dark {
    color: rgba(27, 36, 48, 0.92) !important;
}

:root[data-theme='dark'] .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(148, 163, 184, 0.06);
    --bs-table-hover-bg: rgba(79, 140, 255, 0.08);
    --bs-table-color: var(--erp-text);
    --bs-table-border-color: var(--erp-border);
    color: var(--erp-text);
}

:root[data-theme='dark'] .form-control,
:root[data-theme='dark'] .form-select {
    background-color: rgba(15, 23, 42, 0.35);
    border-color: rgba(148, 163, 184, 0.25);
    color: var(--erp-text);
}

:root[data-theme='dark'] .form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e5e7eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

:root[data-theme='dark'] .form-select option,
:root[data-theme='dark'] .form-select optgroup {
    background-color: #0f172a;
    color: var(--erp-text);
}

:root[data-theme='dark'] .form-control::placeholder {
    color: rgba(148, 163, 184, 0.8);
}

.dropdown-menu {
    background-color: var(--erp-panel);
    border-color: var(--erp-border);
    box-shadow: 0 18px 40px -28px rgba(19, 35, 66, 0.8);
}

:root[data-theme='dark'] .dropdown-menu {
    --bs-dropdown-bg: rgba(15, 23, 42, 0.96);
    --bs-dropdown-border-color: var(--erp-border);
    --bs-dropdown-color: var(--erp-text);
    --bs-dropdown-link-color: var(--erp-text);
    --bs-dropdown-link-hover-color: var(--erp-text);
    --bs-dropdown-link-hover-bg: rgba(79, 140, 255, 0.18);
    --bs-dropdown-link-active-color: var(--erp-text);
    --bs-dropdown-link-active-bg: rgba(79, 140, 255, 0.28);
    --bs-dropdown-divider-bg: var(--erp-border);
    background-color: rgba(15, 23, 42, 0.96);
}

.dropdown-item {
    color: var(--erp-text);
}

:root[data-theme='dark'] .dropdown-item {
    color: var(--erp-text);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(13, 110, 253, 0.12);
    color: var(--erp-text);
}

:root[data-theme='dark'] .dropdown-item:hover,
:root[data-theme='dark'] .dropdown-item:focus {
    background-color: rgba(79, 140, 255, 0.18);
}

.dropdown-divider {
    border-top-color: var(--erp-border);
}

.erp-sidebar-footer .form-select {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.erp-sidebar-footer .form-select:focus {
    border-color: rgba(79, 140, 255, 0.7);
    box-shadow: 0 0 0 0.25rem rgba(79, 140, 255, 0.18);
}

.erp-sidebar-footer .form-select option {
    background-color: #ffffff;
    color: #1b2430;
}

:root[data-theme='dark'] .erp-sidebar-footer .form-select option {
    background-color: #0f172a;
    color: var(--erp-text);
}

.erp-page-title {
    margin: 0;
    font-size: 1.2rem;
}

.erp-page-subtitle {
    margin: 0;
    color: var(--erp-muted);
    font-size: 0.86rem;
}

.erp-user-badge {
    background: var(--erp-panel);
    border: 1px solid var(--erp-border);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

:root[data-theme='dark'] .erp-user-badge {
    background: rgba(15, 23, 42, 0.9);
}

.erp-content {
    padding: 1.4rem;
}

.erp-panel {
    background: var(--erp-panel);
    border: 1px solid var(--erp-border);
    border-radius: 1rem;
    box-shadow: 0 14px 24px -22px rgba(19, 35, 66, 0.85);
}

.erp-stat-card {
    padding: 1rem;
    border-radius: 1rem;
    background: var(--erp-panel);
    border: 1px solid var(--erp-border);
    box-shadow: 0 20px 30px -28px rgba(17, 30, 53, 0.72);
}

.erp-stat-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.erp-stat-card-link:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.35);
    outline-offset: 3px;
}

.erp-stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex: 0 0 auto;
}

:root[data-theme='dark'] .erp-panel,
:root[data-theme='dark'] .erp-stat-card {
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.erp-panel,
.erp-stat-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
    .erp-panel:hover,
    .erp-stat-card:hover {
        transform: translateY(-2px);
        border-color: rgba(13, 110, 253, 0.22);
        box-shadow: 0 26px 40px -34px rgba(17, 30, 53, 0.75);
    }
}

.erp-stat-card .label {
    color: var(--erp-muted);
    font-weight: 600;
    font-size: 0.88rem;
}

.erp-stat-card .value {
    font-family: 'Sora', sans-serif;
    font-size: 1.65rem;
    margin: 0.35rem 0 0;
}

@media (max-width: 575.98px) {
    .erp-stat-card .value {
        font-size: 1.45rem;
    }

    .erp-stat-icon {
        width: 2.45rem;
        height: 2.45rem;
        border-radius: 0.9rem;
        font-size: 1.1rem;
    }
}

.erp-chart {
    width: 100%;
    min-height: 220px;
}

.erp-chart .apexcharts-canvas {
    margin: 0 auto;
}

:root[data-theme='dark'] .apexcharts-tooltip,
:root[data-theme='dark'] .apexcharts-menu {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
    color: var(--erp-text) !important;
    backdrop-filter: blur(10px);
}

:root[data-theme='dark'] .apexcharts-tooltip-title {
    background: rgba(148, 163, 184, 0.12) !important;
    border-bottom-color: rgba(148, 163, 184, 0.18) !important;
    color: var(--erp-text) !important;
}

:root[data-theme='dark'] .apexcharts-menu-item:hover {
    background: rgba(79, 140, 255, 0.14) !important;
}

.erp-list-clean {
    margin: 0;
    padding: 0;
    list-style: none;
}

.erp-list-clean li {
    padding: 0.68rem 0;
    border-bottom: 1px solid var(--erp-border);
}

.erp-list-clean li:last-child {
    border-bottom: 0;
}

.erp-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 30, 0.45);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.badge-soft-success {
    background: rgba(15, 157, 88, 0.14);
    color: var(--erp-success);
}

.badge-soft-danger {
    background: rgba(217, 48, 37, 0.13);
    color: var(--erp-danger);
}

.badge-soft-warning {
    background: rgba(249, 171, 0, 0.15);
    color: #8a5b00;
}

.erp-passport-box {
    width: 100%;
    max-width: 160px;
    aspect-ratio: 3 / 4;
    border: 2px dashed rgba(101, 112, 133, 0.35);
    border-radius: 0.9rem;
    background: rgba(13, 110, 253, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.erp-passport-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.erp-calendar-table {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.85);
}

:root[data-theme='dark'] .erp-calendar-table {
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid var(--erp-border);
}

.erp-calendar.table {
    table-layout: fixed;
    border-color: var(--erp-border);
}

.erp-calendar.table > :not(caption) > * > * {
    vertical-align: top;
}

.erp-calendar thead th {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--erp-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.55rem 0;
    background: rgba(101, 112, 133, 0.06);
    border-color: var(--erp-border);
}

.erp-calendar thead th.weekend {
    color: var(--erp-primary);
}

.erp-calendar td {
    padding: 0;
    border-color: var(--erp-border);
    background: transparent;
}

.erp-calendar td.is-today-cell {
    position: relative;
}

.erp-calendar td.is-today-cell::after {
    content: '';
    position: absolute;
    inset: -1px;
    pointer-events: none;
    border: 2px solid rgba(13, 110, 253, 0.26);
}

.erp-calendar-day {
    border: 0;
    border-radius: 0;
    padding: 0.72rem 0.72rem 0.62rem;
    background: rgba(255, 255, 255, 0.92);
    min-height: 118px;
    height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

:root[data-theme='dark'] .erp-calendar-day {
    background: rgba(15, 23, 42, 0.92);
    color: var(--erp-text);
}

.erp-calendar-day::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.erp-calendar-day:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 16px 26px -28px rgba(19, 35, 66, 0.9);
    transform: translateY(-1px);
    z-index: 1;
}

:root[data-theme='dark'] .erp-calendar-day:hover {
    background: rgba(30, 41, 59, 0.92);
    box-shadow: 0 16px 26px -28px rgba(0, 0, 0, 0.9);
}

.erp-calendar-day.is-today {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(255, 255, 255, 0.92) 60%);
    box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.38), 0 10px 18px -28px rgba(13, 110, 253, 0.95);
}

:root[data-theme='dark'] .erp-calendar-day.is-today {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.24), rgba(15, 23, 42, 0.92) 60%);
    box-shadow: inset 0 0 0 2px rgba(79, 140, 255, 0.34), 0 10px 18px -28px rgba(79, 140, 255, 0.65);
}

.erp-calendar-day.is-today:hover {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(255, 255, 255, 1) 60%);
    box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.38), 0 16px 26px -28px rgba(19, 35, 66, 0.9);
}

:root[data-theme='dark'] .erp-calendar-day.is-today:hover {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.28), rgba(15, 23, 42, 0.98) 60%);
}

.erp-calendar-day.is-today .erp-calendar-day-number {
    color: var(--erp-primary);
}

.erp-calendar-day.is-today .erp-calendar-day-meta {
    color: rgba(13, 110, 253, 0.95);
    background: rgba(13, 110, 253, 0.12);
    border: 1px solid rgba(13, 110, 253, 0.22);
    padding: 0.16rem 0.4rem;
    border-radius: 999px;
    font-size: 0.68rem;
}

.erp-calendar-day.out-month.is-today {
    opacity: 0.85;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(101, 112, 133, 0.04) 60%);
}

:root[data-theme='dark'] .erp-calendar-day.out-month.is-today {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.16), rgba(148, 163, 184, 0.06) 60%);
}

.erp-calendar-day.is-today.is-weekend:not(.out-month) {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(13, 110, 253, 0.035) 52%, rgba(255, 255, 255, 0.92) 100%);
}

:root[data-theme='dark'] .erp-calendar-day.is-today.is-weekend:not(.out-month) {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.26), rgba(79, 140, 255, 0.08) 52%, rgba(15, 23, 42, 0.92) 100%);
}

.erp-calendar-day.is-today.is-weekend:not(.out-month):hover {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(13, 110, 253, 0.045) 52%, rgba(255, 255, 255, 1) 100%);
}

:root[data-theme='dark'] .erp-calendar-day.is-today.is-weekend:not(.out-month):hover {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.3), rgba(79, 140, 255, 0.1) 52%, rgba(15, 23, 42, 0.98) 100%);
}

.erp-calendar-day.out-month {
    opacity: 0.35;
    background: rgba(101, 112, 133, 0.04);
}

:root[data-theme='dark'] .erp-calendar-day.out-month {
    opacity: 0.5;
    background: rgba(148, 163, 184, 0.06);
}

.erp-calendar-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.erp-calendar-day-number {
    font-family: 'Sora', sans-serif;
    font-size: 1.05rem;
}

.erp-calendar-day-meta {
    color: var(--erp-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erp-calendar-day.is-weekend .erp-calendar-day-meta {
    color: rgba(13, 110, 253, 0.95);
}

.erp-calendar-day.is-weekend:not(.out-month) {
    background: rgba(13, 110, 253, 0.035);
}

.erp-calendar-day.status-present::before {
    background: radial-gradient(circle at 12% 14%, rgba(15, 157, 88, 0.18), transparent 56%);
}

.erp-calendar-day.status-present {
    border-left: 4px solid rgba(15, 157, 88, 0.55);
}

.erp-calendar-day.status-absent::before {
    background: radial-gradient(circle at 12% 14%, rgba(13, 110, 253, 0.2), transparent 58%);
}

.erp-calendar-day.status-absent {
    border-left: 4px solid rgba(13, 110, 253, 0.6);
}

.erp-calendar-day.status-late::before {
    background: radial-gradient(circle at 12% 14%, rgba(249, 171, 0, 0.22), transparent 60%);
}

.erp-calendar-day.status-late {
    border-left: 4px solid rgba(249, 171, 0, 0.75);
}

.erp-calendar-day.status-unmarked::before {
    background: radial-gradient(circle at 12% 14%, rgba(101, 112, 133, 0.12), transparent 56%);
}

.erp-calendar-day.status-unmarked {
    border-left: 4px solid rgba(101, 112, 133, 0.28);
}

.erp-calendar-day.status-holiday::before {
    background: radial-gradient(circle at 12% 14%, rgba(217, 48, 37, 0.18), transparent 56%);
}

.erp-calendar-day.status-holiday {
    border-left: 4px solid rgba(217, 48, 37, 0.6);
}

.erp-att-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    padding: 0.32rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
    width: fit-content;
    border: 1px solid transparent;
}

.erp-att-badge.present {
    background: rgba(15, 157, 88, 0.14);
    color: var(--erp-success);
    border-color: rgba(15, 157, 88, 0.22);
}

.erp-att-badge.absent {
    background: rgba(13, 110, 253, 0.14);
    color: var(--erp-primary);
    border-color: rgba(13, 110, 253, 0.25);
}

.erp-att-badge.late {
    background: rgba(249, 171, 0, 0.15);
    color: #8a5b00;
    border-color: rgba(249, 171, 0, 0.25);
}

.erp-att-badge.holiday {
    background: rgba(217, 48, 37, 0.12);
    color: var(--erp-danger);
    border-color: rgba(217, 48, 37, 0.2);
}

.erp-att-badge.unmarked {
    background: rgba(101, 112, 133, 0.12);
    color: var(--erp-muted);
    border-color: rgba(101, 112, 133, 0.18);
}

.erp-holiday-titles {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.erp-holiday-chip {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.22rem 0.45rem;
    border-radius: 0.55rem;
    background: rgba(217, 48, 37, 0.12);
    color: var(--erp-danger);
    border: 1px solid rgba(217, 48, 37, 0.18);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-holiday-more {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--erp-muted);
}

@media (max-width: 575.98px) {
    .erp-calendar.table {
        min-width: 640px;
    }

    .erp-calendar-day {
        min-height: 96px;
        height: 96px;
        padding: 0.55rem 0.55rem 0.5rem;
        border-radius: 0;
    }

    .erp-att-badge {
        font-size: 0.72rem;
        padding: 0.28rem 0.5rem;
    }
}

@media (max-width: 991.98px) {
    body.erp-sidebar-open {
        overflow: hidden;
    }

    .erp-sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s ease;
    }

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

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

    body.erp-sidebar-open .erp-mobile-backdrop {
        opacity: 1;
        visibility: visible;
    }
}

/* ---------------------------
   3D Auth (Login)
---------------------------- */

body.erp-auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.4rem;
    background:
        radial-gradient(circle at 18% 10%, rgba(13, 110, 253, 0.22) 0%, transparent 40%),
        radial-gradient(circle at 88% 8%, rgba(15, 157, 88, 0.15) 0%, transparent 36%),
        radial-gradient(circle at 62% 86%, rgba(249, 171, 0, 0.14) 0%, transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 247, 251, 0.96)),
        var(--erp-bg);
    overflow: hidden;
}

:root[data-theme='dark'] body.erp-auth-body {
    background:
        radial-gradient(circle at 18% 10%, rgba(79, 140, 255, 0.2) 0%, transparent 42%),
        radial-gradient(circle at 88% 8%, rgba(61, 220, 132, 0.14) 0%, transparent 40%),
        radial-gradient(circle at 62% 86%, rgba(255, 209, 102, 0.12) 0%, transparent 44%),
        linear-gradient(180deg, rgba(7, 13, 26, 0.9), rgba(7, 13, 26, 0.98)),
        var(--erp-bg);
    color: var(--erp-text);
    color-scheme: dark;
}

.erp-auth-scene {
    width: min(980px, 100%);
    position: relative;
    perspective: 1200px;
    display: grid;
    place-items: center;
}

.erp-auth-backdrop {
    position: absolute;
    inset: -180px;
    pointer-events: none;
    transform-style: preserve-3d;
    z-index: 0;
}

.erp-auth-grid {
    position: absolute;
    inset: -140px;
    background-image:
        linear-gradient(rgba(13, 110, 253, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 110, 253, 0.14) 1px, transparent 1px);
    background-size: 64px 64px;
    background-position: center;
    opacity: 0.38;
    transform: translateZ(-360px) rotateX(70deg) rotateZ(12deg);
    mask-image: radial-gradient(circle at center, #000 18%, transparent 72%);
    animation: erp-auth-grid 18s linear infinite;
}

@keyframes erp-auth-grid {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 0 220px, 220px 0;
    }
}

.erp-auth-orb {
    position: absolute;
    border-radius: 999px;
    filter: saturate(1.15);
    opacity: 0.55;
    transform: translateZ(-140px);
    animation: erp-auth-float 10s ease-in-out infinite;
}

.erp-auth-orb.orb-1 {
    width: 280px;
    height: 280px;
    left: 6%;
    top: 10%;
    background: radial-gradient(circle at 30% 30%, rgba(13, 110, 253, 0.55), transparent 60%);
    animation-duration: 11s;
}

.erp-auth-orb.orb-2 {
    width: 340px;
    height: 340px;
    right: 2%;
    top: 22%;
    background: radial-gradient(circle at 40% 40%, rgba(15, 157, 88, 0.42), transparent 62%);
    animation-duration: 13s;
    animation-delay: -2.2s;
}

.erp-auth-orb.orb-3 {
    width: 260px;
    height: 260px;
    left: 50%;
    bottom: 6%;
    transform: translate3d(-50%, 0, -180px);
    background: radial-gradient(circle at 36% 36%, rgba(249, 171, 0, 0.4), transparent 62%);
    animation-duration: 12s;
    animation-delay: -4.2s;
}

@keyframes erp-auth-float {
    0%,
    100% {
        transform: translate3d(0, 0, -160px);
    }
    50% {
        transform: translate3d(0, -14px, -160px);
    }
}

.erp-auth-card {
    --rx: 0deg;
    --ry: 0deg;
    --mx: 50%;
    --my: 50%;
    width: min(460px, 100%);
    border-radius: 1.35rem;
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform 180ms ease, box-shadow 180ms ease;
    background:
        linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)) padding-box,
        linear-gradient(135deg, rgba(13, 110, 253, 0.55), rgba(15, 157, 88, 0.3), rgba(249, 171, 0, 0.22)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 26px 44px -34px rgba(5, 12, 24, 0.78);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

:root[data-theme='dark'] .erp-auth-card {
    background:
        linear-gradient(rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.78)) padding-box,
        linear-gradient(135deg, rgba(79, 140, 255, 0.55), rgba(61, 220, 132, 0.28), rgba(255, 209, 102, 0.18)) border-box;
    box-shadow: 0 26px 44px -34px rgba(0, 0, 0, 0.72);
}

.erp-auth-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease;
    background:
        radial-gradient(circle at var(--mx) var(--my), rgba(13, 110, 253, 0.28), transparent 45%),
        radial-gradient(circle at calc(var(--mx) + 12%) calc(var(--my) + 18%), rgba(255, 255, 255, 0.55), transparent 42%);
}

:root[data-theme='dark'] .erp-auth-card::before {
    background:
        radial-gradient(circle at var(--mx) var(--my), rgba(79, 140, 255, 0.22), transparent 45%),
        radial-gradient(circle at calc(var(--mx) + 12%) calc(var(--my) + 18%), rgba(229, 231, 235, 0.16), transparent 42%);
}

.erp-auth-card.is-tilting::before {
    opacity: 1;
}

.erp-auth-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0.85;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%);
}

:root[data-theme='dark'] .erp-auth-card::after {
    opacity: 0.42;
    background: linear-gradient(135deg, rgba(229, 231, 235, 0.22), rgba(229, 231, 235, 0) 55%);
}

.erp-auth-card-inner {
    position: relative;
    padding: 1.55rem 1.55rem 1.4rem;
}

.erp-auth-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.erp-auth-logo {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.42), transparent 55%),
        linear-gradient(135deg, rgba(13, 110, 253, 0.98), rgba(15, 157, 88, 0.85));
    box-shadow: 0 18px 28px -22px rgba(13, 110, 253, 0.95);
    transform: translateZ(36px);
}

.erp-auth-title {
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 10px 24px rgba(19, 35, 66, 0.12);
}

.erp-auth-subtitle {
    margin: 0;
    color: var(--erp-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.erp-auth-addon {
    border-radius: 0.95rem 0 0 0.95rem !important;
    border-color: rgba(217, 226, 239, 0.95);
    background: rgba(13, 110, 253, 0.06);
    color: rgba(13, 110, 253, 0.9);
}

:root[data-theme='dark'] .erp-auth-addon {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(79, 140, 255, 0.12);
    color: rgba(229, 231, 235, 0.92);
}

.erp-auth-control {
    border-radius: 0 0.95rem 0.95rem 0 !important;
    border-color: rgba(217, 226, 239, 0.95);
    box-shadow: none !important;
}

:root[data-theme='dark'] .erp-auth-control {
    border-color: rgba(148, 163, 184, 0.25);
}

.erp-auth-control:focus {
    border-color: rgba(13, 110, 253, 0.45);
}

:root[data-theme='dark'] .erp-auth-control:focus {
    border-color: rgba(79, 140, 255, 0.5);
}

.erp-auth-btn {
    border-radius: 0.95rem;
    padding: 0.72rem 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 18px 26px -22px rgba(13, 110, 253, 0.95);
    transform: translateZ(18px);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.erp-auth-btn:hover {
    transform: translate3d(0, -1px, 18px);
    box-shadow: 0 24px 34px -28px rgba(13, 110, 253, 0.95);
}

.erp-auth-footer {
    border-top: 1px solid rgba(217, 226, 239, 0.85);
}

:root[data-theme='dark'] .erp-auth-footer {
    border-top-color: rgba(148, 163, 184, 0.25);
}

@media (max-width: 575.98px) {
    .erp-auth-card-inner {
        padding: 1.25rem 1.2rem 1.15rem;
    }

    .erp-auth-title {
        font-size: 1.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .erp-auth-grid,
    .erp-auth-orb {
        animation: none !important;
    }

    .erp-auth-card {
        transform: none !important;
        transition: none !important;
    }
}

/* ---------------------------
   Invoice / Print
---------------------------- */

.erp-invoice-body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    background: var(--erp-bg);
    color: var(--erp-text);
}

.erp-invoice-shell {
    min-height: 100vh;
    padding: 1.4rem;
}

.erp-invoice-actions {
    max-width: 920px;
    margin: 0 auto 0.9rem;
}

.erp-invoice {
    max-width: 920px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--erp-border);
    border-radius: 1rem;
    padding: 1.4rem;
    box-shadow: 0 16px 30px -28px rgba(19, 35, 66, 0.85);
}

:root[data-theme='dark'] .erp-invoice {
    background: rgba(15, 23, 42, 0.72);
    color: var(--erp-text);
    backdrop-filter: blur(10px);
}

.erp-invoice-brand {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
}

.erp-invoice-logo {
    height: 54px;
    width: auto;
    object-fit: contain;
    flex: 0 0 auto;
}

.erp-invoice-sign-img {
    height: 64px;
    width: auto;
    object-fit: contain;
}

.erp-invoice-section-title {
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    margin-bottom: 0.5rem;
}

.erp-invoice-kv {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(217, 226, 239, 0.95);
}

:root[data-theme='dark'] .erp-invoice-kv {
    border-bottom: 1px dashed rgba(148, 163, 184, 0.28);
}

.erp-invoice-kv:last-child {
    border-bottom: 0;
}

.erp-invoice-kv .key {
    color: var(--erp-muted);
    font-size: 0.86rem;
}

.erp-invoice-kv .value {
    font-weight: 700;
    text-align: right;
}

.erp-invoice-table thead th {
    background: rgba(101, 112, 133, 0.06);
    color: rgba(27, 36, 48, 0.92);
}

:root[data-theme='dark'] .erp-invoice-table thead th {
    background: rgba(148, 163, 184, 0.1);
    color: var(--erp-text);
}

.erp-invoice-note {
    background: rgba(13, 110, 253, 0.04);
    border: 1px solid rgba(13, 110, 253, 0.12);
    border-radius: 0.9rem;
    padding: 0.9rem;
}

:root[data-theme='dark'] .erp-invoice-note {
    background: rgba(79, 140, 255, 0.1);
    border-color: rgba(79, 140, 255, 0.22);
}

.erp-invoice-sign {
    border: 1px solid var(--erp-border);
    border-radius: 0.9rem;
    padding: 0.9rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.erp-invoice-sign-line {
    margin-top: 2.2rem;
    border-top: 2px solid rgba(27, 36, 48, 0.4);
}

:root[data-theme='dark'] .erp-invoice-sign-line {
    border-top-color: rgba(229, 231, 235, 0.35);
}

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

.erp-chat-sidebar,
.erp-chat-window {
    overflow: hidden;
    height: 100%;
    min-height: 68vh;
}

.erp-chat-sidebar.erp-panel:hover,
.erp-chat-window.erp-panel:hover {
    transform: none;
}

.erp-chat-sidebar {
    display: flex;
    flex-direction: column;
}

.erp-chat-search .input-group-text {
    background: transparent;
    border-color: var(--erp-border);
    color: var(--erp-muted);
}

.erp-chat-search .form-control {
    border-color: var(--erp-border);
}

.erp-chat-search .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
    border-color: rgba(13, 110, 253, 0.3);
}

.erp-chat-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(101, 112, 133, 0.35) transparent;
}

.erp-chat-list::-webkit-scrollbar {
    width: 10px;
}

.erp-chat-list::-webkit-scrollbar-track {
    background: transparent;
}

.erp-chat-list::-webkit-scrollbar-thumb {
    background-color: rgba(101, 112, 133, 0.2);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.erp-chat-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(101, 112, 133, 0.3);
}

:root[data-theme='dark'] .erp-chat-list::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.18);
}

:root[data-theme='dark'] .erp-chat-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(148, 163, 184, 0.28);
}

.erp-chat-contact {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0.75rem;
    border-radius: 0.95rem;
    border: 1px solid transparent;
    align-items: flex-start;
    background: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.erp-chat-contact:hover {
    background: rgba(13, 110, 253, 0.06);
    border-color: rgba(13, 110, 253, 0.16);
}

:root[data-theme='dark'] .erp-chat-contact:hover {
    background: rgba(79, 140, 255, 0.1);
    border-color: rgba(79, 140, 255, 0.18);
}

.erp-chat-contact.active {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.13), transparent);
    border-color: rgba(13, 110, 253, 0.26);
}

:root[data-theme='dark'] .erp-chat-contact.active {
    background: rgba(79, 140, 255, 0.12);
    border-color: rgba(79, 140, 255, 0.22);
}

.erp-chat-contact.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.erp-chat-contact.is-disabled:hover {
    background: transparent;
    border-color: transparent;
}

.erp-chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
    color: rgba(13, 110, 253, 0.92);
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.14), rgba(15, 157, 88, 0.12));
    border: 1px solid rgba(13, 110, 253, 0.18);
}

:root[data-theme='dark'] .erp-chat-avatar {
    color: rgba(229, 231, 235, 0.92);
    background: rgba(79, 140, 255, 0.14);
    border-color: rgba(148, 163, 184, 0.18);
}

.erp-chat-name {
    font-weight: 800;
    line-height: 1.15;
    margin-top: 0.05rem;
}

.erp-chat-preview {
    color: var(--erp-muted);
    font-size: 0.84rem;
    margin-top: 0.12rem;
}

.erp-chat-sub {
    color: var(--erp-muted);
    font-size: 0.74rem;
    margin-top: 0.35rem;
}

.erp-chat-time {
    color: var(--erp-muted);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.erp-chat-header {
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.05), transparent 70%);
}

:root[data-theme='dark'] .erp-chat-header {
    background: rgba(79, 140, 255, 0.08);
}

.erp-chat-messages {
    padding: 1rem;
    overflow-y: auto;
    min-height: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(13, 110, 253, 0.07) 0%, transparent 42%),
        radial-gradient(circle at 88% 2%, rgba(15, 157, 88, 0.06) 0%, transparent 40%),
        transparent;
    scrollbar-width: thin;
    scrollbar-color: rgba(101, 112, 133, 0.35) transparent;
}

:root[data-theme='dark'] .erp-chat-messages {
    background:
        radial-gradient(circle at 18% 12%, rgba(79, 140, 255, 0.16) 0%, transparent 42%),
        radial-gradient(circle at 88% 2%, rgba(61, 220, 132, 0.12) 0%, transparent 40%),
        transparent;
}

.erp-chat-messages::-webkit-scrollbar {
    width: 10px;
}

.erp-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.erp-chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(101, 112, 133, 0.2);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.erp-chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: rgba(101, 112, 133, 0.3);
}

:root[data-theme='dark'] .erp-chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.18);
}

:root[data-theme='dark'] .erp-chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: rgba(148, 163, 184, 0.28);
}

.erp-chat-row {
    display: flex;
    padding: 0.18rem 0;
}

.erp-chat-row.mine {
    justify-content: flex-end;
}

.erp-chat-row.theirs {
    justify-content: flex-start;
}

.erp-chat-bubble {
    max-width: min(520px, 85%);
    padding: 0.7rem 0.85rem;
    border-radius: 1.1rem;
    box-shadow: 0 16px 30px -26px rgba(17, 30, 53, 0.75);
}

.erp-chat-bubble.mine {
    color: #fff;
    background: linear-gradient(135deg, var(--erp-primary), rgba(13, 110, 253, 0.85));
    border-bottom-right-radius: 0.45rem;
}

.erp-chat-bubble.theirs {
    color: var(--erp-text);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--erp-border);
    border-bottom-left-radius: 0.45rem;
}

:root[data-theme='dark'] .erp-chat-bubble.theirs {
    background: rgba(15, 23, 42, 0.62);
}

/* ============================================================
   MODERN PREMIUM ENHANCEMENTS
   ============================================================ */

/* Premium Card Enhancements */
.erp-panel {
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(13, 110, 253, 0.08);
}

.erp-panel:hover {
    border-color: rgba(13, 110, 253, 0.15);
    box-shadow: 0 32px 50px -32px rgba(13, 110, 253, 0.15);
}

.erp-stat-card {
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.erp-stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.1), transparent 70%);
    pointer-events: none;
    transition: all 0.6s ease;
    opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
    .erp-stat-card:hover::before {
        opacity: 1;
        top: -20%;
        right: -20%;
    }
}

/* Button Enhancements */
.btn-primary {
    background: linear-gradient(135deg, var(--erp-primary), #0b5ed7);
    border: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(13, 110, 253, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

/* Modern Input Styling */
.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid var(--erp-border);
    border-radius: 0.7rem;
    padding: 0.65rem 0.85rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    background: white;
}

:root[data-theme='dark'] .form-control,
:root[data-theme='dark'] .form-select {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.2);
}

:root[data-theme='dark'] .form-control:focus,
:root[data-theme='dark'] .form-select:focus {
    border-color: var(--erp-primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 0.2rem rgba(79, 140, 255, 0.2);
}

/* Badge Enhancements */
.badge {
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.text-bg-primary {
    background: linear-gradient(135deg, var(--erp-primary), #0b5ed7) !important;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.25);
}

/* Link Enhancements */
a {
    transition: color 0.2s ease;
}

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

/* Table Enhancements */
.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.9rem;
    overflow: hidden;
    background: transparent;
}

.table th {
    background: var(--erp-primary-soft);
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-size: 0.8rem;
    border: none;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--erp-border);
}

@media (hover: hover) and (pointer: fine) {
    .table tbody tr:hover {
        background: var(--erp-primary-soft);
    }
}

.table td {
    border: none;
    padding: 0.85rem;
    vertical-align: middle;
}

/* Sidebar Enhancements */
.erp-nav-link {
    position: relative;
    padding-left: 0.7rem;
}

.erp-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, var(--erp-primary), #0b5ed7);
    border-radius: 3px;
    transition: height 0.3s ease;
}

.erp-nav-link:hover::before {
    height: 50%;
}

.erp-nav-link.active::before {
    height: 100%;
}

/* Modal Enhancements */
.modal-content {
    border: 1px solid rgba(13, 110, 253, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

:root[data-theme='dark'] .modal-content {
    background: rgba(15, 23, 42, 0.95);
    border-color: var(--erp-border);
}

.modal-header {
    border-bottom: 1px solid rgba(13, 110, 253, 0.08);
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(13, 110, 253, 0.08);
    padding: 1.5rem;
    background: var(--erp-primary-soft);
}

:root[data-theme='dark'] .modal-footer {
    background: rgba(79, 140, 255, 0.08);
}

/* Alert Enhancements */
.alert {
    border: 1px solid;
    border-radius: 0.8rem;
    padding: 1rem;
    backdrop-filter: blur(8px);
}

.alert-success {
    background: rgba(15, 157, 88, 0.1);
    border-color: rgba(15, 157, 88, 0.3);
    color: var(--erp-success);
}

.alert-danger {
    background: rgba(217, 48, 37, 0.1);
    border-color: rgba(217, 48, 37, 0.3);
    color: var(--erp-danger);
}

.alert-warning {
    background: rgba(249, 171, 0, 0.1);
    border-color: rgba(249, 171, 0, 0.3);
    color: #8a5b00;
}

.alert-info {
    background: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.3);
    color: var(--erp-primary);
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton-loading {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Smooth Page Transition */
@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.erp-content {
    animation: fadeInPage 0.3s ease;
}

/* Focus Visible Styling */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--erp-primary);
    outline-offset: 2px;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   SHORTCUTS DISPLAY PANEL (DASHBOARD)
   ============================================================ */

.shortcuts-display-panel {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid var(--erp-primary);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.shortcuts-display-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1), transparent 70%);
    pointer-events: none;
}

.shortcuts-display-panel > * {
    position: relative;
    z-index: 1;
}

.shortcuts-display-panel h5 {
    color: var(--erp-primary);
    font-weight: 700;
}

.shortcuts-display-panel kbd {
    background: white;
    color: var(--erp-primary);
    border: 1px solid rgba(13, 110, 253, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin: 0 0.15rem;
}

:root[data-theme='dark'] .shortcuts-display-panel {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-color: rgba(79, 140, 255, 0.4);
}

:root[data-theme='dark'] .shortcuts-display-panel kbd {
    background: rgba(15, 23, 42, 0.8);
    color: #4f8cff;
    border-color: rgba(79, 140, 255, 0.3);
}

/* Shortcuts Grid */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.shortcuts-grid::-webkit-scrollbar {
    width: 8px;
}

.shortcuts-grid::-webkit-scrollbar-track {
    background: transparent;
}

.shortcuts-grid::-webkit-scrollbar-thumb {
    background-color: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

.shortcuts-grid::-webkit-scrollbar-thumb:hover {
    background-color: rgba(102, 126, 234, 0.5);
}

.shortcuts-grid.expanded {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    max-height: none;
}

/* Shortcut Tile */
.shortcut-tile {
    background: white;
    border: 2px solid var(--erp-border);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 130px;
}

.shortcut-tile::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15), transparent 70%);
    pointer-events: none;
    transition: all 0.4s ease;
    opacity: 0;
}

.shortcut-tile:hover::before {
    opacity: 1;
    top: -25%;
    left: -25%;
}

.shortcut-tile > * {
    position: relative;
    z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
    .shortcut-tile:hover {
        border-color: var(--erp-primary);
        background: rgba(102, 126, 234, 0.05);
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
    }
}

.shortcut-tile.highlight {
    background: linear-gradient(135deg, var(--erp-primary) 0%, #0b5ed7 100%);
    color: white;
    border: none;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.25);
}

@media (hover: hover) and (pointer: fine) {
    .shortcut-tile.highlight:hover {
        transform: translateY(-6px);
        box-shadow: 0 15px 40px rgba(13, 110, 253, 0.35);
    }
}

:root[data-theme='dark'] .shortcut-tile {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(79, 140, 255, 0.2);
}

:root[data-theme='dark'] .shortcut-tile:hover {
    background: rgba(79, 140, 255, 0.15);
    border-color: rgba(79, 140, 255, 0.5);
}

/* Shortcut Tile Components */
.shortcut-tile-key {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.key-alt,
.key-letter {
    background: var(--erp-primary-soft);
    color: var(--erp-primary);
    padding: 0.35rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    border: 1px solid rgba(13, 110, 253, 0.2);
    font-family: 'Courier New', monospace;
    min-width: 2rem;
    text-align: center;
}

.key-plus {
    color: var(--erp-muted);
    font-size: 0.9rem;
}

.shortcut-tile.highlight .key-alt,
.shortcut-tile.highlight .key-letter {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

:root[data-theme='dark'] .key-alt,
:root[data-theme='dark'] .key-letter {
    background: rgba(79, 140, 255, 0.2);
    color: #4f8cff;
    border-color: rgba(79, 140, 255, 0.3);
}

.shortcut-tile-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--erp-text);
    margin-bottom: 0.5rem;
}

.shortcut-tile.highlight .shortcut-tile-label {
    color: white;
}

:root[data-theme='dark'] .shortcut-tile-label {
    color: var(--erp-text);
}

.shortcut-tile-icon {
    font-size: 1.5rem;
    color: var(--erp-primary);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.shortcut-tile:hover .shortcut-tile-icon {
    opacity: 1;
    transform: scale(1.15) rotate(5deg);
}

.shortcut-tile.highlight .shortcut-tile-icon {
    color: white;
    opacity: 1;
}

/* Shortcuts Footer */
.shortcuts-footer {
    color: var(--erp-muted);
    font-size: 0.85rem;
}

.shortcuts-footer kbd {
    background: rgba(102, 126, 234, 0.1);
    color: var(--erp-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(13, 110, 253, 0.2);
    display: inline-block;
    margin: 0 0.2rem;
}

:root[data-theme='dark'] .shortcuts-footer kbd {
    background: rgba(79, 140, 255, 0.15);
    color: #4f8cff;
    border-color: rgba(79, 140, 255, 0.3);
}

/* ============================================================
   RESPONSIVE PREMIUM ENHANCEMENTS
   ============================================================ */

@media (max-width: 768px) {
    .erp-panel {
        box-shadow: 0 10px 20px -10px rgba(19, 35, 66, 0.6);
    }

    .btn-primary {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .form-control,
    .form-select {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }

    .table {
        font-size: 0.9rem;
    }

    .table td {
        padding: 0.7rem;
    }

    /* Shortcuts Panel Mobile */
    .shortcuts-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        max-height: 200px;
        gap: 0.75rem;
    }

    .shortcut-tile {
        padding: 0.75rem;
        min-height: 110px;
    }

    .shortcut-tile-key {
        margin-bottom: 0.5rem;
    }

    .key-alt,
    .key-letter {
        padding: 0.25rem 0.45rem;
        font-size: 0.75rem;
        min-width: 1.75rem;
    }

    .shortcut-tile-icon {
        font-size: 1.25rem;
    }

    .shortcuts-display-panel {
        padding: 1rem !important;
    }

    .shortcuts-display-panel h5 {
        font-size: 1.05rem;
    }
}

.erp-chat-text {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.35;
    font-size: 0.95rem;
}

.erp-chat-bubble-meta {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    opacity: 0.75;
    text-align: right;
}

.erp-chat-bubble.theirs .erp-chat-bubble-meta {
    opacity: 0.7;
}

.erp-chat-composer {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
}

:root[data-theme='dark'] .erp-chat-composer {
    background: rgba(15, 23, 42, 0.78);
}

.erp-chat-composer .form-control {
    border-color: var(--erp-border);
    padding: 0.7rem 0.85rem;
    border-radius: 0.95rem 0 0 0.95rem;
}

.erp-chat-composer .btn {
    border-radius: 0 0.95rem 0.95rem 0;
    padding: 0 1rem;
    min-width: 52px;
}

.erp-chat-composer .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
    border-color: rgba(13, 110, 253, 0.35);
}

.erp-chat-empty i {
    font-size: 2rem;
    opacity: 0.55;
}

@media (max-width: 991.98px) {
    .erp-chat-sidebar,
    .erp-chat-window {
        min-height: 60vh;
    }
}

@media (max-width: 575.98px) {
    .erp-chat-messages {
        padding: 0.75rem;
    }

    .erp-chat-bubble {
        max-width: 92%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .erp-chat-contact {
        transition: none;
    }
}

.erp-video-modal-frame {
    background: #000;
    border-radius: 1.1rem;
    overflow: hidden;
}

.erp-video-thumb {
    width: min(200px, 100%);
    aspect-ratio: 1 / 1;
    border-radius: 1.1rem;
    border: 1px solid var(--erp-border);
    background:
        radial-gradient(circle at 22% 18%, rgba(13, 110, 253, 0.18) 0%, transparent 55%),
        radial-gradient(circle at 84% 10%, rgba(15, 157, 88, 0.14) 0%, transparent 58%),
        rgba(255, 255, 255, 0.75);
    box-shadow: 0 22px 36px -32px rgba(17, 30, 53, 0.72);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.erp-video-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    z-index: 0;
}

:root[data-theme='dark'] .erp-video-thumb {
    background:
        radial-gradient(circle at 22% 18%, rgba(79, 140, 255, 0.22) 0%, transparent 60%),
        radial-gradient(circle at 84% 10%, rgba(61, 220, 132, 0.14) 0%, transparent 64%),
        rgba(15, 23, 42, 0.72);
}

.erp-video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(27, 36, 48, 0.06) 100%);
    pointer-events: none;
    z-index: 1;
}

:root[data-theme='dark'] .erp-video-thumb::after {
    background: linear-gradient(180deg, transparent 0%, rgba(229, 231, 235, 0.06) 100%);
}

.erp-video-thumb-play {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 110, 253, 0.16);
    border: 1px solid rgba(13, 110, 253, 0.22);
    color: rgba(13, 110, 253, 0.95);
    position: relative;
    z-index: 2;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    font-size: 2rem;
}

:root[data-theme='dark'] .erp-video-thumb-play {
    background: rgba(79, 140, 255, 0.18);
    border-color: rgba(79, 140, 255, 0.22);
    color: rgba(229, 231, 235, 0.92);
}

.erp-video-thumb:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.28);
    outline-offset: 3px;
}

.erp-video-thumb:hover .erp-video-thumb-play {
    transform: translateY(-1px) scale(1.03);
    background: rgba(13, 110, 253, 0.2);
    border-color: rgba(13, 110, 253, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    .erp-video-thumb-play {
        transition: none;
    }
}

@media print {
    @page {
        size: A4;
        margin: 8mm;
    }

    :root {
        color-scheme: light;
    }

    html,
    body {
        height: auto !important;
    }

    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        margin: 0 !important;
        background: #fff !important;
        color: #000 !important;
    }

    .erp-sidebar,
    .erp-topbar,
    .erp-mobile-backdrop {
        display: none !important;
    }

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

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

    .erp-panel,
    .erp-stat-card {
        box-shadow: none !important;
        transform: none !important;
        border-color: rgba(217, 226, 239, 0.95) !important;
    }

    .erp-invoice-shell {
        min-height: auto !important;
        padding: 0 !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .erp-invoice-note,
    .erp-invoice-sign,
    .erp-invoice-kv {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .erp-invoice {
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
        padding: 0.75rem !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: #fff !important;
        color: #000 !important;
    }

    .erp-invoice hr {
        margin: 0.65rem 0 !important;
    }

    .erp-invoice .g-3 {
        --bs-gutter-x: 0.75rem !important;
        --bs-gutter-y: 0.75rem !important;
    }

    .erp-invoice .mb-4 {
        margin-bottom: 1rem !important;
    }

    .erp-invoice .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    .erp-invoice .mt-4 {
        margin-top: 1rem !important;
    }

    .erp-invoice .table > :not(caption) > * > * {
        padding: 0.25rem 0.4rem !important;
    }

    .erp-invoice-brand {
        font-size: 1.05rem !important;
    }

    .erp-invoice-logo {
        height: 46px !important;
    }

    .erp-invoice-table {
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .erp-invoice-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .erp-invoice-table thead {
        display: table-header-group;
    }

    .erp-invoice-table tfoot {
        display: table-footer-group;
    }

    .erp-invoice-table thead th {
        background: rgba(101, 112, 133, 0.06) !important;
        color: rgba(27, 36, 48, 0.92) !important;
    }
}
