@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ─── CSS Variables ──────────────────────────────────────────── */
:root {
     --primary: #6C3FE8;
     --primary-dark: #5530C9;
     --primary-light: #E8E1FF;
     --secondary: #F59E0B;
     --accent: #10B981;
     --danger: #EF4444;
     --warning: #F59E0B;
     --info: #3B82F6;

     --bg: #0F0F1A;
     --bg-card: #1A1A2E;
     --bg-sidebar: #12121F;
     --bg-input: #232340;
     --border: #2D2D50;
     --border-light: #3A3A60;

     --text: #E8E8F0;
     --text-muted: #e8e8f0 !important;
     --text-light: #C0C0D8;

     --sidebar-w: 260px;
     --topbar-h: 64px;
     --radius: 12px;
     --radius-sm: 8px;
     --radius-lg: 16px;
     --shadow: 0 4px 24px rgba(0, 0, 0, .4);
     --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
     --transition: all .2s ease;
}

/* ─── Reset ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
     box-sizing: border-box;
     margin: 0;
     padding: 0;
}

body {
     font-family: 'Inter', sans-serif;
     background: var(--bg);
     color: var(--text);
     min-height: 100vh;
     line-height: 1.6;
     font-size: 14px;
     width: 100%;
     overflow-x: hidden;
}

a {
     color: var(--primary);
     text-decoration: none;
}

a:hover {
     color: var(--primary-dark);
}

img {
     max-width: 100%;
}

ul {
     list-style: none;
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar {
     width: 6px;
     height: 6px;
}

::-webkit-scrollbar-track {
     background: var(--bg-card);
}

::-webkit-scrollbar-thumb {
     background: var(--border-light);
     border-radius: 3px;
}

/* ─── Layout ──────────────────────────────────────────────────── */
.app-wrapper {
     display: flex;
     min-height: 100vh;
     width: 100vw;
     max-width: 100%;
     overflow-x: hidden;
}

/* ─── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
     width: var(--sidebar-w);
     background: var(--bg-sidebar);
     border-right: 1px solid var(--border);
     display: flex;
     flex-direction: column;
     position: fixed;
     top: 0;
     left: 0;
     bottom: 0;
     z-index: 100;
     transition: var(--transition);
}

.sidebar-brand {
     padding: 20px 20px 16px;
     border-bottom: 1px solid var(--border);
     display: flex;
     align-items: center;
     gap: 12px;
}

.brand-icon {
     width: 40px;
     height: 40px;
     background: linear-gradient(135deg, var(--primary), #A855F7);
     border-radius: 10px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 18px;
     flex-shrink: 0;
}

.brand-text h2 {
     font-size: 15px;
     font-weight: 700;
     color: var(--text);
     font-family: 'Plus Jakarta Sans', sans-serif;
}

.brand-text span {
     font-size: 11px;
     color: var(--text-muted);
}

.sidebar-nav {
     flex: 1;
     padding: 12px 12px;
     overflow-y: auto;
}

.nav-section {
     margin-bottom: 20px;
}

.nav-section-label {
     font-size: 10px;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: 1px;
     color: var(--text-muted);
     padding: 0 8px 6px;
}

.nav-item {
     display: flex;
     align-items: center;
     gap: 10px;
     padding: 10px 12px;
     border-radius: var(--radius-sm);
     color: var(--text-muted);
     font-size: 13.5px;
     font-weight: 500;
     cursor: pointer;
     transition: var(--transition);
     text-decoration: none;
     margin-bottom: 2px;
}

.nav-item:hover {
     background: var(--bg-card);
     color: var(--text);
}

.nav-item.active {
     background: linear-gradient(135deg, rgba(108, 63, 232, .25), rgba(168, 85, 247, .15));
     color: var(--primary-light);
     border: 1px solid rgba(108, 63, 232, .3);
}

.nav-item .nav-icon {
     width: 18px;
     text-align: center;
     font-size: 15px;
}

.nav-badge {
     margin-left: auto;
     background: var(--primary);
     color: #fff;
     font-size: 10px;
     font-weight: 700;
     padding: 2px 7px;
     border-radius: 20px;
}

.sidebar-footer {
     padding: 12px;
     border-top: 1px solid var(--border);
}

/* ─── Main Content ────────────────────────────────────────────── */
.main-content {
     margin-left: var(--sidebar-w);
     flex: 1;
     display: flex;
     flex-direction: column;
     min-height: 100vh;
}

/* ─── Topbar ──────────────────────────────────────────────────── */
.topbar {
     height: var(--topbar-h);
     background: var(--bg-card);
     border-bottom: 1px solid var(--border);
     display: flex;
     align-items: center;
     padding: 0 24px;
     gap: 16px;
     position: sticky;
     top: 0;
     z-index: 50;
}

#menu-toggle {
     display: none;
}

.topbar-title {
     font-size: 18px;
     font-weight: 700;
     color: var(--text);
     font-family: 'Plus Jakarta Sans', sans-serif;
     flex: 1;
}

.topbar-actions {
     display: flex;
     align-items: center;
     gap: 10px;
}

.user-avatar {
     width: 36px;
     height: 36px;
     background: linear-gradient(135deg, var(--primary), #A855F7);
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     font-weight: 700;
     font-size: 14px;
     color: #fff;
     cursor: pointer;
}

/* ─── Page Content ────────────────────────────────────────────── */
.page-content {
     padding: 24px;
     flex: 1;
}

/* ─── Cards ───────────────────────────────────────────────────── */
.card {
     background: var(--bg-card);
     border: 1px solid var(--border);
     border-radius: var(--radius);
     overflow: hidden;
     display: flex;
     flex-direction: column;
}

.card-header {
     padding: 16px 20px;
     border-bottom: 1px solid var(--border);
     display: flex;
     align-items: center;
     gap: 12px;
}

.card-header h3 {
     font-size: 15px;
     font-weight: 600;
     color: var(--text);
}

.card-body {
     padding: 20px;
     flex: 1;
}

.card-body canvas {
     width: 100% !important;
     height: 100% !important;
}

@media (max-width: 768px) {
     .card-body {
          padding: 15px;
          min-height: 250px;
     }
}

.card-footer {
     padding: 14px 20px;
     border-top: 1px solid var(--border);
     background: rgba(255, 255, 255, .02);
}

/* ─── Stat Cards ──────────────────────────────────────────────── */
.stats-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
     gap: 16px;
     margin-bottom: 24px;
}

.stat-card {
     background: var(--bg-card);
     border: 1px solid var(--border);
     border-radius: var(--radius);
     padding: 20px;
     display: flex;
     align-items: flex-start;
     gap: 16px;
     transition: var(--transition);
     position: relative;
     overflow: hidden;
}

.stat-card::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     height: 3px;
}

.stat-card.purple::before {
     background: linear-gradient(90deg, var(--primary), #A855F7);
}

.stat-card.amber::before {
     background: linear-gradient(90deg, #F59E0B, #EF4444);
}

.stat-card.green::before {
     background: linear-gradient(90deg, #10B981, #06B6D4);
}

.stat-card.red::before {
     background: linear-gradient(90deg, #EF4444, #F59E0B);
}

.stat-card.blue::before {
     background: linear-gradient(90deg, #3B82F6, #6C3FE8);
}

.stat-card:hover {
     border-color: var(--border-light);
     transform: translateY(-2px);
     box-shadow: var(--shadow);
}

.stat-icon {
     width: 48px;
     height: 48px;
     border-radius: var(--radius-sm);
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 20px;
     flex-shrink: 0;
}

.stat-icon.purple {
     background: rgba(108, 63, 232, .2);
}

.stat-icon.amber {
     background: rgba(245, 158, 11, .2);
}

.stat-icon.green {
     background: rgba(16, 185, 129, .2);
}

.stat-icon.red {
     background: rgba(239, 68, 68, .2);
}

.stat-icon.blue {
     background: rgba(59, 130, 246, .2);
}

.stat-info h4 {
     font-size: 22px;
     font-weight: 800;
     color: var(--text);
     line-height: 1.2;
}

.stat-info p {
     font-size: 12px;
     color: var(--text-muted);
     margin-top: 2px;
}

.stat-sub {
     font-size: 11px;
     color: var(--accent);
     margin-top: 4px;
     font-weight: 500;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
     display: inline-flex;
     align-items: center;
     gap: 6px;
     padding: 8px 16px;
     border-radius: var(--radius-sm);
     font-size: 13px;
     font-weight: 600;
     cursor: pointer;
     border: none;
     transition: var(--transition);
     white-space: nowrap;
     text-decoration: none;
     font-family: inherit;
}

.btn-primary {
     background: linear-gradient(135deg, var(--primary), #A855F7);
     color: #fff;
}

.btn-primary:hover {
     opacity: .85;
     color: #fff;
     transform: translateY(-1px);
}

.btn-secondary {
     background: var(--bg-input);
     color: var(--text);
     border: 1px solid var(--border-light);
}

.btn-secondary:hover {
     background: var(--border);
     color: var(--text);
}

.btn-success {
     background: var(--accent);
     color: #fff;
}

.btn-success:hover {
     opacity: .85;
     color: #fff;
}

.btn-danger {
     background: var(--danger);
     color: #fff;
}

.btn-danger:hover {
     opacity: .85;
     color: #fff;
}

.btn-warning {
     background: var(--warning);
     color: #000;
}

.btn-info {
     background: var(--info);
     color: #fff;
}

.btn-sm {
     padding: 5px 10px;
     font-size: 12px;
}

.btn-lg {
     padding: 12px 24px;
     font-size: 15px;
}

.btn-outline {
     background: transparent;
     border: 1px solid var(--border-light);
     color: var(--text-muted);
}

.btn-outline:hover {
     border-color: var(--primary);
     color: var(--primary);
     background: rgba(108, 63, 232, .08);
}

.btn-icon {
     padding: 7px;
     border-radius: var(--radius-sm);
}

/* ─── Tables ──────────────────────────────────────────────────── */
.table-wrapper {
     overflow-x: auto;
}

.data-table {
     width: 100%;
     border-collapse: collapse;
     font-size: 13.5px;
}

.data-table th {
     padding: 11px 14px;
     text-align: left;
     font-size: 11px;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: .7px;
     color: var(--text-muted);
     background: rgba(255, 255, 255, .03);
     border-bottom: 1px solid var(--border);
     white-space: nowrap;
}

.data-table td {
     padding: 12px 14px;
     border-bottom: 1px solid rgba(255, 255, 255, .04);
     color: var(--text-light);
     vertical-align: middle;
}

.data-table tr:last-child td {
     border-bottom: none;
}

.data-table tr:hover td {
     background: rgba(255, 255, 255, .02);
}

.data-table .actions {
     display: flex;
     gap: 6px;
     align-items: center;
}

/* ─── Badges / Pills ──────────────────────────────────────────── */
.badge {
     display: inline-flex;
     align-items: center;
     gap: 4px;
     padding: 3px 10px;
     border-radius: 20px;
     font-size: 11px;
     font-weight: 600;
}

.badge-success {
     background: rgba(16, 185, 129, .15);
     color: #10B981;
     border: 1px solid rgba(16, 185, 129, .3);
}

.badge-danger {
     background: rgba(239, 68, 68, .15);
     color: #EF4444;
     border: 1px solid rgba(239, 68, 68, .3);
}

.badge-warning {
     background: rgba(245, 158, 11, .15);
     color: #F59E0B;
     border: 1px solid rgba(245, 158, 11, .3);
}

.badge-info {
     background: rgba(59, 130, 246, .15);
     color: #60A5FA;
     border: 1px solid rgba(59, 130, 246, .3);
}

.badge-purple {
     background: rgba(108, 63, 232, .2);
     color: #A78BFA;
     border: 1px solid rgba(108, 63, 232, .3);
}

.badge-secondary {
     background: rgba(255, 255, 255, .08);
     color: var(--text-muted);
     border: 1px solid var(--border);
}

/* ─── Forms ───────────────────────────────────────────────────── */
.form-grid {
     display: grid;
     gap: 20px;
}

.form-grid-2 {
     grid-template-columns: 1fr 1fr;
}

.form-grid-3 {
     grid-template-columns: 1fr 1fr 1fr;
}

.form-row {
     display: flex;
     gap: 16px;
     flex-wrap: wrap;
}

.form-group {
     display: flex;
     flex-direction: column;
     gap: 6px;
     flex: 1;
     min-width: 200px;
}

.form-group-full {
     grid-column: 1 / -1;
}

.form-label {
     font-size: 12px;
     font-weight: 600;
     color: var(--text-muted);
     text-transform: uppercase;
     letter-spacing: .5px;
}

.form-control,
.form-select,
.form-textarea {
     background: var(--bg-input);
     border: 1px solid var(--border);
     border-radius: var(--radius-sm);
     padding: 9px 12px;
     color: var(--text);
     font-size: 13.5px;
     font-family: inherit;
     width: 100%;
     transition: var(--transition);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
     outline: none;
     border-color: var(--primary);
     box-shadow: 0 0 0 3px rgba(108, 63, 232, .15);
}

.form-textarea {
     resize: vertical;
     min-height: 90px;
}

.form-select {
     cursor: pointer;
}

.form-hint {
     font-size: 11px;
     color: var(--text-muted);
}

.form-check {
     display: flex;
     align-items: center;
     gap: 8px;
     cursor: pointer;
}

.form-check input {
     width: 16px;
     height: 16px;
     accent-color: var(--primary);
     cursor: pointer;
}

/* ─── Alerts ──────────────────────────────────────────────────── */
.alert {
     padding: 12px 16px;
     border-radius: var(--radius-sm);
     display: flex;
     align-items: center;
     gap: 10px;
     font-size: 13.5px;
     margin-bottom: 16px;
}

.alert-success {
     background: rgba(16, 185, 129, .12);
     border: 1px solid rgba(16, 185, 129, .3);
     color: #10B981;
}

.alert-danger {
     background: rgba(239, 68, 68, .12);
     border: 1px solid rgba(239, 68, 68, .3);
     color: #EF4444;
}

.alert-warning {
     background: rgba(245, 158, 11, .12);
     border: 1px solid rgba(245, 158, 11, .3);
     color: #F59E0B;
}

.alert-info {
     background: rgba(59, 130, 246, .12);
     border: 1px solid rgba(59, 130, 246, .3);
     color: #60A5FA;
}

/* ─── Search / Filter Bar ─────────────────────────────────────── */
.filter-bar {
     display: flex;
     align-items: center;
     gap: 10px;
     flex-wrap: wrap;
     margin-bottom: 20px;
}

.search-box {
     position: relative;
     flex: 1;
     min-width: 240px;
}

.search-box input {
     padding-left: 36px;
     background: var(--bg-card);
     border: 1px solid var(--border);
     border-radius: var(--radius-sm);
     color: var(--text);
     font-size: 13.5px;
     width: 100%;
     padding: 9px 12px 9px 36px;
}

.search-box input:focus {
     outline: none;
     border-color: var(--primary);
}

.search-icon {
     position: absolute;
     left: 11px;
     top: 50%;
     transform: translateY(-50%);
     color: var(--text-muted);
     font-size: 14px;
}

/* ─── Pagination ──────────────────────────────────────────────── */
.pagination {
     display: flex;
     align-items: center;
     gap: 6px;
     margin-top: 20px;
}

.page-btn {
     min-width: 34px;
     height: 34px;
     display: flex;
     align-items: center;
     justify-content: center;
     border-radius: var(--radius-sm);
     font-size: 13px;
     font-weight: 500;
     cursor: pointer;
     border: 1px solid var(--border);
     background: var(--bg-card);
     color: var(--text-muted);
     text-decoration: none;
     transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
     background: var(--primary);
     border-color: var(--primary);
     color: #fff;
}

.page-info {
     color: var(--text-muted);
     font-size: 12px;
     margin-left: auto;
}

/* ─── Tabs ────────────────────────────────────────────────────── */
.tabs {
     display: flex;
     gap: 0;
     border-bottom: 1px solid var(--border);
     margin-bottom: 20px;
}

.tab-btn {
     padding: 10px 18px;
     font-size: 13.5px;
     font-weight: 500;
     color: var(--text-muted);
     border: none;
     background: transparent;
     cursor: pointer;
     border-bottom: 2px solid transparent;
     margin-bottom: -1px;
     transition: var(--transition);
     font-family: inherit;
}

.tab-btn:hover {
     color: var(--text);
}

.tab-btn.active {
     color: var(--primary);
     border-bottom-color: var(--primary);
}

.tab-content {
     display: none;
}

.tab-content.active {
     display: block;
}

/* ─── Bill Table ──────────────────────────────────────────────── */
.items-table {
     width: 100%;
     border-collapse: collapse;
}

.items-table th {
     background: rgba(255, 255, 255, .04);
     padding: 9px 10px;
     text-align: left;
     font-size: 11px;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: .6px;
     color: var(--text-muted);
     border-bottom: 1px solid var(--border);
}

.items-table td {
     padding: 8px 10px;
     border-bottom: 1px solid rgba(255, 255, 255, .04);
     vertical-align: middle;
}

.items-table tr:last-child td {
     border-bottom: none;
}

.items-table input,
.items-table select {
     background: var(--bg-input);
     border: 1px solid var(--border);
     color: var(--text);
     padding: 6px 8px;
     border-radius: 6px;
     font-size: 13px;
     width: 100%;
     font-family: inherit;
}

.items-table input:focus,
.items-table select:focus {
     outline: none;
     border-color: var(--primary);
}

.line-total {
     font-weight: 600;
     color: var(--text);
}

.add-row-btn {
     display: inline-flex;
     align-items: center;
     gap: 6px;
     padding: 8px 14px;
     border-radius: var(--radius-sm);
     background: rgba(108, 63, 232, .15);
     color: var(--primary);
     border: 1px dashed var(--primary);
     font-size: 13px;
     cursor: pointer;
     margin-top: 10px;
     font-weight: 500;
     font-family: inherit;
}

.add-row-btn:hover {
     background: rgba(108, 63, 232, .25);
}

.remove-row {
     background: none;
     border: none;
     color: var(--danger);
     cursor: pointer;
     padding: 4px 6px;
     border-radius: 4px;
}

.remove-row:hover {
     background: rgba(239, 68, 68, .15);
}

/* ─── Totals Block ────────────────────────────────────────────── */
.totals-block {
     background: var(--bg-input);
     border: 1px solid var(--border);
     border-radius: var(--radius-sm);
     padding: 16px;
     min-width: 280px;
}

.totals-row {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 6px 0;
     font-size: 13.5px;
}

.totals-row:not(:last-child) {
     border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.totals-label {
     color: var(--text-muted);
}

.totals-value {
     font-weight: 600;
     color: var(--text);
}

.totals-row.grand-total .totals-label {
     font-size: 15px;
     font-weight: 700;
     color: var(--text);
}

.totals-row.grand-total .totals-value {
     font-size: 18px;
     font-weight: 800;
     color: var(--primary);
}

/* ─── Detail Sections ─────────────────────────────────────────── */
.detail-grid {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 20px;
     margin-bottom: 20px;
}

.detail-section {
     padding: 16px;
     background: var(--bg-input);
     border-radius: var(--radius-sm);
     border: 1px solid var(--border);
}

.detail-section h4 {
     font-size: 12px;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: .7px;
     color: var(--text-muted);
     margin-bottom: 12px;
}

.detail-row {
     display: flex;
     gap: 8px;
     padding: 5px 0;
     font-size: 13px;
     border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.detail-row:last-child {
     border-bottom: none;
}

.detail-label {
     color: var(--text-muted);
     min-width: 120px;
}

.detail-value {
     color: var(--text);
     font-weight: 500;
}

/* ─── Product Card ────────────────────────────────────────────── */
.product-card {
     background: var(--bg-card);
     border: 1px solid var(--border);
     border-radius: var(--radius);
     overflow: hidden;
     transition: var(--transition);
     cursor: default;
}

.product-card:hover {
     border-color: var(--primary);
     transform: translateY(-2px);
     box-shadow: var(--shadow);
}

.product-card-img {
     height: 160px;
     background: linear-gradient(135deg, rgba(108, 63, 232, .15), rgba(168, 85, 247, .1));
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 48px;
     position: relative;
     overflow: hidden;
}

.product-card-img img {
     width: 100%;
     height: 100%;
     object-fit: cover;
}

.product-card-body {
     padding: 14px;
}

.product-sku {
     font-size: 10px;
     font-weight: 600;
     text-transform: uppercase;
     color: var(--primary);
     letter-spacing: .8px;
     margin-bottom: 4px;
}

.product-name {
     font-size: 14px;
     font-weight: 600;
     color: var(--text);
     margin-bottom: 6px;
}

.product-price {
     font-size: 16px;
     font-weight: 700;
     color: var(--accent);
}

.product-price span {
     font-size: 12px;
     color: var(--text-muted);
     font-weight: 400;
     text-decoration: line-through;
}

/* ─── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
     position: fixed;
     inset: 0;
     background: rgba(0, 0, 0, .7);
     backdrop-filter: blur(4px);
     z-index: 200;
     display: none;
     align-items: center;
     justify-content: center;
}

.modal-overlay.open {
     display: flex;
}

.modal {
     background: var(--bg-card);
     border: 1px solid var(--border);
     border-radius: var(--radius-lg);
     padding: 28px;
     width: 90%;
     max-width: 520px;
     max-height: 90vh;
     overflow-y: auto;
     animation: slideUp .2s ease;
}

@keyframes slideUp {
     from {
          transform: translateY(20px);
          opacity: 0;
     }

     to {
          transform: translateY(0);
          opacity: 1;
     }
}

.modal-header {
     display: flex;
     align-items: center;
     justify-content: space-between;
     margin-bottom: 20px;
}

.modal-title {
     font-size: 17px;
     font-weight: 700;
     color: var(--text);
}

.modal-close {
     background: none;
     border: none;
     color: var(--text-muted);
     font-size: 20px;
     cursor: pointer;
}

.modal-close:hover {
     color: var(--danger);
}

/* ─── Empty State ─────────────────────────────────────────────── */
.empty-state {
     text-align: center;
     padding: 60px 20px;
     color: var(--text-muted);
}

.empty-state .empty-icon {
     font-size: 60px;
     margin-bottom: 16px;
     opacity: .4;
}

.empty-state h3 {
     font-size: 17px;
     font-weight: 600;
     color: var(--text);
     margin-bottom: 8px;
}

.empty-state p {
     font-size: 13.5px;
     margin-bottom: 20px;
}

/* ─── Page Header ─────────────────────────────────────────────── */
.page-header {
     display: flex;
     align-items: center;
     justify-content: space-between;
     margin-bottom: 24px;
     flex-wrap: wrap;
     gap: 12px;
}

.page-header h1 {
     font-size: 22px;
     font-weight: 800;
     color: var(--text);
     font-family: 'Plus Jakarta Sans', sans-serif;
}

.page-header p {
     font-size: 13px;
     color: var(--text-muted);
     margin-top: 2px;
}

.header-actions {
     display: flex;
     gap: 10px;
     align-items: center;
}

/* ─── Invoice/Quote Print ─────────────────────────────────────── */
.print-doc {
     max-width: 820px;
     margin: 20px auto;
}

.print-header {
     display: flex;
     justify-content: space-between;
     align-items: flex-start;
     margin-bottom: 30px;
}

.print-company h1 {
     font-size: 24px;
     font-weight: 800;
     color: var(--primary);
}

.print-company p {
     color: var(--text-muted);
     font-size: 13px;
     margin-top: 2px;
}

.print-doc-info {
     text-align: right;
}

.print-doc-number {
     font-size: 22px;
     font-weight: 800;
     color: var(--text);
}

.print-doc-date {
     font-size: 13px;
     color: var(--text-muted);
}

.print-parties {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 20px;
     margin-bottom: 24px;
}

.print-party {
     padding: 14px;
     background: var(--bg-input);
     border-radius: var(--radius-sm);
}

.print-party h4 {
     font-size: 11px;
     font-weight: 600;
     text-transform: uppercase;
     color: var(--text-muted);
     margin-bottom: 8px;
}

.print-party p {
     font-size: 13px;
     color: var(--text);
     line-height: 1.6;
}

/* ─── Status colors ───────────────────────────────────────────── */
.status-dot {
     width: 7px;
     height: 7px;
     border-radius: 50%;
     display: inline-block;
     margin-right: 4px;
}

.status-dot.paid,
.status-dot.accepted,
.status-dot.active {
     background: var(--accent);
}

.status-dot.unpaid,
.status-dot.draft {
     background: var(--text-muted);
}

.status-dot.partial,
.status-dot.sent {
     background: var(--info);
}

.status-dot.overdue,
.status-dot.rejected {
     background: var(--danger);
}

.status-dot.converted {
     background: var(--secondary);
}

.status-dot.cancelled,
.status-dot.inactive {
     background: var(--danger);
}

/* ─── Utilities ───────────────────────────────────────────────── */
.d-flex {
     display: flex;
}

.align-center {
     align-items: center;
}

.justify-between {
     justify-content: space-between;
}

.gap-2 {
     gap: 8px;
}

.gap-3 {
     gap: 12px;
}

.gap-4 {
     gap: 16px;
}

.mt-2 {
     margin-top: 8px;
}

.mt-4 {
     margin-top: 16px;
}

.mb-4 {
     margin-bottom: 16px;
}

.text-muted {
     color: var(--text-muted);
}

.text-success {
     color: var(--accent);
}

.text-danger {
     color: var(--danger);
}

.text-primary {
     color: var(--primary);
}

.text-right {
     text-align: right;
}

.text-center {
     text-align: center;
}

.fw-bold {
     font-weight: 700;
}

.fw-medium {
     font-weight: 500;
}

.truncate {
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
}

.grid-2 {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 16px;
}

.grid-3 {
     display: grid;
     grid-template-columns: 1fr 1fr 1fr;
     gap: 16px;
}

.w-full {
     width: 100%;
}

.divider {
     border: none;
     border-top: 1px solid var(--border);
     margin: 16px 0;
}

/* ─── Tabs Bar (Settings) ─────────────────────────────────────── */
.tabs-bar {
     display: flex;
     gap: 4px;
     padding: 4px;
     background: var(--bg-card);
     border: 1px solid var(--border);
     border-radius: var(--radius);
     margin-bottom: 20px;
}

.tab-link {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     padding: 9px 18px;
     border-radius: calc(var(--radius) - 4px);
     font-size: 13.5px;
     font-weight: 500;
     color: var(--text-muted);
     text-decoration: none;
     transition: var(--transition);
}

.tab-link:hover {
     color: var(--text);
     background: rgba(255, 255, 255, .05);
}

.tab-link.active {
     background: linear-gradient(135deg, var(--primary), #A855F7);
     color: #fff;
}

/* ─── Additional Utilities ────────────────────────────────────── */
.text-info {
     color: var(--info);
}

.text-light {
     color: var(--text-light);
}

.text-muted {
     color: var(--text-muted);
}

.align-center {
     align-items: center;
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991px) {
     .sidebar {
          transform: translateX(-100%);
          width: 280px;
          box-shadow: 20px 0 30px rgba(0, 0, 0, 0.5);
     }

     .sidebar.open {
          transform: translateX(0);
     }

     .sidebar-overlay {
          display: none;
          position: fixed;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: rgba(0, 0, 0, 0.6);
          backdrop-filter: blur(4px);
          z-index: 99;
     }

     .sidebar.open+.sidebar-overlay {
          display: block;
     }

     .main-content {
          margin-left: 0 !important;
     }

     #menu-toggle {
          display: flex;
     }

     .topbar {
          padding: 0 16px;
     }

     .topbar-title {
          font-size: 15px;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
     }

     .topbar-actions .btn span {
          display: none;
     }

     .page-content {
          padding: 15px;
     }

     /* Table responsiveness */
     .table-wrapper {
          margin: 0 -15px;
          padding: 0 15px;
          width: calc(100% + 30px);
          border-radius: 0;
     }

     .data-table {
          min-width: 650px;
     }
}

@media (max-width: 576px) {
     .page-header {
          flex-direction: column;
          align-items: flex-start !important;
          gap: 15px;
     }

     .header-actions {
          width: 100%;
          display: flex;
          flex-direction: column;
          gap: 10px;
     }

     .header-actions .btn {
          width: 100%;
          justify-content: center;
     }

     .stat-card {
          padding: 15px;
     }

     .stat-info h4 {
          font-size: 18px;
     }

     .card-header {
          padding: 12px 15px;
     }

     .topbar-actions .user-avatar {
          width: 32px;
          height: 32px;
          font-size: 12px;
     }
}

@media print {

     .sidebar,
     .topbar,
     .no-print {
          display: none !important;
     }

     .main-content {
          margin-left: 0;
     }

     body {
          background: #fff;
          color: #000;
     }

     .card {
          border: 1px solid #ddd;
     }
}