/* ============================================
   3NCOUNT DESIGN SYSTEM & CUSTOM STYLES
   ============================================ */

/* ============================================
   CSS VARIABLES - DESIGN SYSTEM
   ============================================ */
:root {
    /* Primary Brand Colors */
    --primary: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Success Colors */
    --success: #10b981;
    --success-light: #34d399;
    --success-dark: #059669;
    
    /* Warning Colors */
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-dark: #d97706;
    
    /* Danger Colors */
    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-dark: #dc2626;
    
    /* Info Colors */
    --info: #0ea5e9;
    --info-light: #38bdf8;
    --info-dark: #0284c7;
    
    /* Neutral Gray Scale */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Soft/Pastel Backgrounds for Better Readability */
    --bg-soft-primary: #f0f3ff;
    --bg-soft-success: #f0fdf4;
    --bg-soft-warning: #fffbeb;
    --bg-soft-danger: #fef2f2;
    --bg-soft-info: #f0f9ff;
    
    /* Text Colors for Soft Backgrounds */
    --text-on-soft-primary: #1e293b;
    --text-on-soft-success: #1e293b;
    --text-on-soft-warning: #1e293b;
    --text-on-soft-danger: #1e293b;
    --text-on-soft-info: #1e293b;
    
    /* Spacing Scale */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 3rem;      /* 48px */
    --spacing-3xl: 4rem;      /* 64px */
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.12);
    --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-index layers */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================
   SOFT BACKGROUND CLASSES - BETTER READABILITY
   ============================================ */
.bg-soft-primary {
    background-color: var(--bg-soft-primary) !important;
    color: var(--text-on-soft-primary) !important;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.bg-soft-success {
    background-color: var(--bg-soft-success) !important;
    color: var(--text-on-soft-success) !important;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.bg-soft-warning {
    background-color: var(--bg-soft-warning) !important;
    color: var(--text-on-soft-warning) !important;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.bg-soft-danger {
    background-color: var(--bg-soft-danger) !important;
    color: var(--text-on-soft-danger) !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.bg-soft-info {
    background-color: var(--bg-soft-info) !important;
    color: var(--text-on-soft-info) !important;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

/* Headings in soft backgrounds */
.bg-soft-primary h1,
.bg-soft-primary h2,
.bg-soft-primary h3,
.bg-soft-primary h4,
.bg-soft-primary h5,
.bg-soft-primary h6,
.bg-soft-success h1,
.bg-soft-success h2,
.bg-soft-success h3,
.bg-soft-success h4,
.bg-soft-success h5,
.bg-soft-success h6,
.bg-soft-warning h1,
.bg-soft-warning h2,
.bg-soft-warning h3,
.bg-soft-warning h4,
.bg-soft-warning h5,
.bg-soft-warning h6,
.bg-soft-danger h1,
.bg-soft-danger h2,
.bg-soft-danger h3,
.bg-soft-danger h4,
.bg-soft-danger h5,
.bg-soft-danger h6,
.bg-soft-info h1,
.bg-soft-info h2,
.bg-soft-info h3,
.bg-soft-info h4,
.bg-soft-info h5,
.bg-soft-info h6 {
    color: var(--gray-900) !important;
}

/* Icon colors in soft backgrounds */
.bg-soft-primary .text-primary {
    color: var(--primary) !important;
}

.bg-soft-success .text-success {
    color: var(--success-dark) !important;
}

.bg-soft-warning .text-warning {
    color: var(--warning-dark) !important;
}

.bg-soft-danger .text-danger {
    color: var(--danger-dark) !important;
}

.bg-soft-info .text-info {
    color: var(--info-dark) !important;
}

/* ============================================
   ALERT & NOTIFICATION RULES - NO AUTO DISMISS
   ============================================ */
.alert {
    opacity: 1 !important;
    transition: none !important;
    display: block !important;
    border-radius: var(--radius-lg);
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
}

.alert.fade {
    opacity: 1 !important;
    transition: none !important;
}

.alert.show {
    opacity: 1 !important;
    display: block !important;
}

.alert .btn-close {
    cursor: pointer;
}

.alert-success {
    border-left-color: var(--success);
    background-color: #d1fae5;
}

.alert-warning {
    border-left-color: var(--warning);
    background-color: #fef3c7;
}

.alert-danger {
    border-left-color: var(--danger);
    background-color: #fee2e2;
}

.alert-info {
    border-left-color: var(--info);
    background-color: #dbeafe;
}

/* ============================================
   TYPOGRAPHY ENHANCEMENTS
   ============================================ */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.section-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--gray-200);
}

.subheader {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   ENHANCED CARD STYLES
   ============================================ */
.card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
    background: white;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Card variants with colored borders */
.card-primary {
    border-left: 4px solid var(--primary);
}

.card-success {
    border-left: 4px solid var(--success);
}

.card-warning {
    border-left: 4px solid var(--warning);
}

.card-danger {
    border-left: 4px solid var(--danger);
}

.card-info {
    border-left: 4px solid var(--info);
}

/* Enhanced card headers */
.card-header {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-header.bg-primary {
    background: var(--primary-gradient);
    color: white;
    border-bottom: none;
}

.card-body {
    padding: var(--spacing-xl);
}

/* Dashboard stat cards */
.dashboard-card {
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Stat card components */
.stat-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
}

.stat-icon.danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-900);
    word-break: break-word;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Gradient text for special numbers */
.stat-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   ENHANCED BUTTON STYLES - REDUCED SIZES
   ============================================ */
.btn {
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: none;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #653a96 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
}

/* Icon buttons */
.btn i {
    transition: transform var(--transition-fast);
}

.btn:hover i {
    transform: scale(1.1);
}

/* ============================================
   TABLE ACTION BUTTONS - COMPACT SIZE
   ============================================ */
.table .btn-group .btn,
.table .btn-group-sm .btn {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.8125rem !important;
    min-width: 34px;
    min-height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.table .btn-group .btn i,
.table .btn-group-sm .btn i {
    font-size: 0.9375rem !important;
    margin: 0;
}

.table .btn-group {
    gap: 3px;
    display: flex;
    flex-wrap: nowrap;
}

.btn-ghost-primary {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.8125rem !important;
    transition: all var(--transition-base);
}

.btn-ghost-primary:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

/* ============================================
   MODERN TABLE DESIGN - IMPROVED RESPONSIVE
   ============================================ */
.table {
    border-spacing: 0;
}

.table thead {
    background: var(--primary-gradient);
    color: white;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
    padding: 0.875rem 0.75rem;
    border: none;
    white-space: nowrap;
}

.table tbody tr {
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: scale(1.001);
}

.table tbody tr:nth-child(even) {
    background-color: var(--gray-50);
}

.table tbody tr:nth-child(even):hover {
    background-color: var(--gray-100);
}

.table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Sticky table headers */
.table-sticky thead {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-sm);
}

/* Table responsive wrapper - FIXED OVERFLOW */
.table-responsive {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.table-vcenter td,
.table-vcenter th {
    vertical-align: middle;
}

/* Ensure action column is visible */
.table th.w-1,
.table td.w-1 {
    width: 1%;
    white-space: nowrap;
}

/* ============================================
   ENHANCED FORM STYLES
   ============================================ */
.form-label {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-label.required::after {
    content: '*';
    color: var(--danger);
    margin-left: 0.25rem;
}

.form-control,
.form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.625rem 0.875rem;
    transition: all var(--transition-base);
    font-size: 0.9375rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-control:hover,
.form-select:hover {
    border-color: var(--gray-400);
}

/* Form validation states */
.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--success);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
}

.invalid-feedback {
    color: var(--danger);
    font-size: 0.8125rem;
    margin-top: var(--spacing-xs);
}

.valid-feedback {
    color: var(--success);
    font-size: 0.8125rem;
    margin-top: var(--spacing-xs);
}

/* Form hints */
.form-hint {
    color: var(--gray-500);
    font-size: 0.8125rem;
    margin-top: var(--spacing-xs);
    display: block;
}

/* ============================================
   ENHANCED BADGE STYLES
   ============================================ */
.badge {
    font-weight: 600;
    padding: 0.3em 0.65em;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge:hover {
    transform: scale(1.05);
}

/* Badge variants */
.badge-success {
    background-color: var(--success);
    color: white;
}

.badge-warning {
    background-color: var(--warning);
    color: white;
}

.badge-danger {
    background-color: var(--danger);
    color: white;
}

.badge-info {
    background-color: var(--info);
    color: white;
}

/* Invoice/Bill status badges */
.badge-draft {
    background-color: var(--gray-500);
    color: white;
}

.badge-sent {
    background-color: #0054a6;
    color: white;
}

.badge-partial {
    background-color: var(--warning);
    color: white;
}

.badge-paid {
    background-color: var(--success);
    color: white;
}

.badge-overdue {
    background-color: var(--danger);
    color: white;
}

/* Contact type badges */
.badge-customer {
    background-color: #0054a6;
    color: white;
}

.badge-supplier {
    background-color: #7952b3;
    color: white;
}

.badge-both {
    background-color: #20c997;
    color: white;
}

/* Light variants */
.badge.bg-success-lt {
    background-color: #d1fae5;
    color: var(--success-dark);
}

.badge.bg-warning-lt {
    background-color: #fef3c7;
    color: var(--warning-dark);
}

.badge.bg-danger-lt {
    background-color: #fee2e2;
    color: var(--danger-dark);
}

/* ============================================
   ENHANCED NAVIGATION
   ============================================ */
.navbar {
    background: linear-gradient(135deg, #ffffff 0%, var(--gray-50) 100%);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-200);
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition-base);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary) !important;
}

.nav-link.active {
    background-color: var(--primary);
    color: white !important;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
}

/* Dropdown menus */
.dropdown-menu {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    padding: var(--spacing-sm);
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.625rem 0.875rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background-color: var(--gray-100);
    color: var(--primary);
    transform: translateX(4px);
}

.dropdown-divider {
    border-top: 1px solid var(--gray-200);
    margin: var(--spacing-sm) 0;
}

/* ============================================
   CURRENCY & NUMBERS
   ============================================ */
.currency {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1em;
}

/* ============================================
   STATUS INDICATORS
   ============================================ */
.status-success {
    color: var(--success);
    font-weight: 600;
}

.status-warning {
    color: var(--warning);
    font-weight: 600;
}

.status-danger {
    color: var(--danger);
    font-weight: 600;
}

.status-info {
    color: var(--info);
    font-weight: 600;
}

/* ============================================
   ACCOUNT TYPE STYLING
   ============================================ */
.account-asset {
    color: #0054a6;
    font-weight: 600;
}

.account-liability {
    color: var(--danger);
    font-weight: 600;
}

.account-equity {
    color: #7952b3;
    font-weight: 600;
}

.account-income {
    color: var(--success);
    font-weight: 600;
}

.account-expense {
    color: var(--warning);
    font-weight: 600;
}

/* ============================================
   CHART & VISUALIZATION CONTAINERS
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-radius: var(--radius-lg);
}

/* ============================================
   LOADING & ANIMATION STATES
   ============================================ */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Page load animation */
.page-wrapper {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Pulse animation for loading */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress {
    border-radius: var(--radius-full);
    overflow: hidden;
    height: 1rem;
    background-color: var(--gray-200);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    transition: width 0.6s ease;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl) 0;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--gray-200);
}

.page-header .page-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty {
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    color: var(--gray-500);
}

.empty-icon {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: var(--spacing-lg);
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-sm);
}

.empty-subtitle {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   TRANSACTION LIST IMPROVEMENTS
   ============================================ */
.transaction-row {
    transition: all var(--transition-fast);
}

.transaction-row:hover {
    background-color: var(--gray-50);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
    .table-responsive {
        border: 0;
        border-radius: 0;
    }
    
    .btn-list {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .btn-list .btn {
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }
    
    .stat-card {
        margin-bottom: var(--spacing-md);
    }
    
    .card {
        margin-bottom: var(--spacing-md);
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .table thead th {
        font-size: 0.75rem;
        padding: 0.625rem 0.5rem;
    }
    
    .table tbody td {
        padding: 0.625rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    .table .btn-group .btn {
        padding: 0.25rem 0.375rem !important;
        font-size: 0.75rem !important;
        min-width: 28px;
        min-height: 28px;
    }
    
    .table .btn-group .btn i {
        font-size: 0.875rem !important;
    }
}

@media (max-width: 992px) {
    .btn {
        padding: 0.45rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .btn-sm {
        padding: 0.3125rem 0.625rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .d-print-none,
    .navbar,
    .footer,
    .btn,
    .page-header {
        display: none !important;
    }
    
    .page-body {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid var(--gray-300) !important;
    }
    
    .table {
        border: 1px solid var(--gray-300);
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.clickable {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.clickable:hover {
    opacity: 0.8;
}

.clickable:active {
    transform: scale(0.98);
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
    color: white;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Hover lift effect */
.hover-lift {
    transition: all var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Border utilities */
.border-start-primary {
    border-left: 4px solid var(--primary);
}

.border-start-success {
    border-left: 4px solid var(--success);
}

.border-start-warning {
    border-left: 4px solid var(--warning);
}

.border-start-danger {
    border-left: 4px solid var(--danger);
}

/* ============================================
   TOOLTIPS & POPOVERS
   ============================================ */
.tooltip {
    z-index: var(--z-tooltip);
}

.popover {
    z-index: var(--z-popover);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   MODAL ENHANCEMENTS
   ============================================ */
.modal-content {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    border: none;
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-bottom: none;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: var(--spacing-lg);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
    transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ============================================
   END OF CUSTOM STYLES
   ============================================ */