: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);
}

: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;
    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: hidden;
}

.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);
}

: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;
}

.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) {
    .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);
}

.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: 10mm;
    }

    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .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;
    }

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

    .erp-invoice {
        margin: 0 !important;
        padding: 1rem !important;
        box-shadow: none !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.35rem 0.5rem !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;
    }
}
