/* ========================================
   LuckyMall ERP - Professional Styles
   ======================================== */

/* Import Professional Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    /* Primary Colors */
    --primary-color: #1A73E8;
    --primary-hover: #1557b0;
    --primary-light: #e8f0fe;
    --primary-dark: #0d47a1;
    
    /* Status Colors */
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --info-color: #3b82f6;
    --info-light: #dbeafe;
    
    /* Sidebar */
    --sidebar-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --sidebar-hover: #334155;
    --sidebar-text: #cbd5e1;
    --sidebar-active: rgba(26, 115, 232, 0.15);
    
    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Background */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    
    /* Border */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-radius: 0.75rem;
    --border-radius-sm: 0.5rem;
    --border-radius-lg: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

/* ========================================
   Global Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* ========================================
   Top Navbar
   ======================================== */
.navbar {
    padding: 1rem 1.5rem;
    z-index: 1040;
    box-shadow: var(--shadow);
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
}

.navbar-brand {
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    font-weight: 700;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.015em;
    padding: 0;
    transition: opacity 0.2s ease;
}

.navbar-brand:hover {
    opacity: 0.75;
}

.navbar-brand i {
    font-size: clamp(1.3rem, 2vw, 1.5rem);
    color: var(--primary-color);
}

/* Brand segmented styling - minimalist professional */
.brand-logo .brand-text { 
    display: flex; 
    gap: 0.25rem; 
    font-weight: 700;
}

.brand-logo .brand-my { 
    color: var(--text-secondary); 
    font-weight: 500;
}

.brand-logo .brand-lucky { 
    color: var(--primary-color); 
    font-weight: 700;
}

.brand-logo .brand-mall { 
    color: var(--primary-color);
    font-weight: 700;
}

.brand-logo .brand-erp { 
    color: var(--text-secondary); 
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.05em;
}

@media (max-width: 520px) {
    .brand-logo .brand-mall { display: none; }
}

.navbar .btn-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
}

.navbar .btn-link:hover {
    background-color: var(--bg-primary);
}

.navbar .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.625rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-base);
    position: relative;
}

.navbar .nav-link:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.navbar .nav-link .badge {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.6875rem;
    padding: 0.2rem 0.4rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.navbar .dropdown-menu {
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xl);
    border-radius: var(--border-radius-lg);
    margin-top: 0.5rem;
    padding: 0.75rem;
    min-width: 200px;
}

.navbar .dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
}

.navbar .dropdown-item:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transform: translateX(2px);
}

.navbar .dropdown-item i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    height: calc(100vh - 70px);
    width: 260px;
    background: var(--sidebar-bg);
    padding-top: 0;
    padding-bottom: 1rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1030;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-lg);
}

.sidebar.collapsed {
    transform: translateX(-260px);
}

.sidebar-header {
    padding: 0.75rem 1rem 0.625rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.5rem;
}

.sidebar-header h5 {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: #94a3b8;
    margin: 0;
}

.sidebar .nav-item {
    margin: 0.15rem 0.625rem;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.625rem 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    border: none;
    border-left: 3px solid transparent;
    margin-left: -3px;
    white-space: nowrap;
}

.sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar .nav-link.active {
    background-color: var(--sidebar-active);
    color: #ffffff;
    border-left-color: var(--primary-color);
}

.sidebar .nav-link i {
    margin-right: 0.625rem;
    width: 18px;
    font-size: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar .nav-link .bi-chevron-down {
    margin-left: auto;
    margin-right: 0;
    transition: transform 0.2s;
    font-size: 0.7rem;
    opacity: 0.5;
}

.sidebar .nav-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar .collapse {
    margin-left: 2.5rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(148, 163, 184, 0.2);
}

.sidebar .collapse .nav-link {
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 400;
    color: #94a3b8;
    position: relative;
    margin-left: -0.75rem;
    padding-left: 1.75rem;
    border-left: none;
}

.sidebar .collapse .nav-link::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background-color: rgba(148, 163, 184, 0.4);
    border-radius: 50%;
    transition: all 0.2s;
}

.sidebar .collapse .nav-link:hover::before {
    background-color: rgba(255, 255, 255, 0.7);
    width: 6px;
    height: 6px;
}

.sidebar .collapse .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(0);
}

.sidebar .collapse .nav-link.active {
    color: #ffffff;
    background-color: rgba(26, 115, 232, 0.15);
}

.sidebar .collapse .nav-link.active::before {
    background-color: var(--primary-color);
    width: 6px;
    height: 6px;
}

/* Scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Main Content Area
   ======================================== */
.main-content {
    margin-left: 260px;
    margin-top: 70px;
    padding: 0 2.5rem 2rem;
    transition: margin-left var(--transition-slow);
    min-height: calc(100vh - 70px);
    background-color: var(--bg-primary);
}

.main-content.expanded {
    margin-left: 0;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h1 i {
    color: var(--primary-color);
    font-size: 1.75rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    border-bottom: none;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    letter-spacing: -0.02em;
}

.page-header h1 i {
    color: var(--primary-color);
    font-size: 1.75rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* ========================================
   Cards
   ======================================== */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    background: var(--bg-secondary);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-light);
}

.card-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.card-body {
    padding: 0;
}

.card-footer {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.card-body {
    padding: 1.5rem;
}

/* ===== Warehouses Enhancements ===== */
.warehouse-card .warehouse-accent {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.warehouse-card .accent-primary { background: var(--primary-color); }
.warehouse-card .accent-success { background: var(--success-color); }
.warehouse-card .accent-info { background: var(--info-color); }

.capacity-wrapper .capacity-bar { background-color: #eef2f7; }
.capacity-wrapper .progress-bar { box-shadow: inset 0 0 1px rgba(0,0,0,0.1); }

.filters-section .form-label { font-weight: 600; }
.filters-section .form-text { color: var(--text-muted); }

.bg-primary-subtle { background-color: rgba(26,115,232,0.12) !important; }
.bg-success-subtle { background-color: rgba(52,168,83,0.12) !important; }
.bg-warning-subtle { background-color: rgba(251,188,4,0.12) !important; }
.bg-danger-subtle { background-color: rgba(234,67,53,0.12) !important; }
.bg-info-subtle { background-color: rgba(66,133,244,0.12) !important; }
.bg-secondary-subtle { background-color: rgba(100,116,139,0.12) !important; }

.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: #92400e !important; }
.text-danger { color: var(--danger-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-secondary { color: #475569 !important; }

.bg-light-subtle { background-color: #f8fafc; }

/* ========================================
   KPI Cards
   ======================================== */
.kpi-card {
    position: relative;
    overflow: visible;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #4285F4 100%);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.kpi-card.success::before {
    background: linear-gradient(90deg, var(--success-color) 0%, #10b981 100%);
}

.kpi-card.warning::before {
    background: linear-gradient(90deg, var(--warning-color) 0%, #f59e0b 100%);
}

.kpi-card.info::before {
    background: linear-gradient(90deg, var(--info-color) 0%, #60a5fa 100%);
}

.kpi-card .card-body {
    padding: 1.75rem 1.5rem;
}

.kpi-card h6 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.kpi-card h2,
.kpi-card h3 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    transition: var(--transition-base);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-hover);
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

.btn-warning {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
}

.btn-danger {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-ghost {
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--text-secondary);
    padding: 0.5rem;
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: none;
    box-shadow: none;
}

/* ========================================
   KPI Cards Continued
   ======================================== */
.kpi-card small {
    font-size: 0.875rem;
    font-weight: 600;
}

.kpi-card .text-success {
    color: var(--success-color) !important;
}

.kpi-card .text-danger {
    color: var(--danger-color) !important;
}

.kpi-card i:not(.bi-arrow-up):not(.bi-arrow-down) {
    font-size: 2.75rem;
    opacity: 0.15;
}

/* ========================================
   Tables
   ======================================== */
.table-responsive-wrapper {
    position: relative;
}

.table-responsive {
    border-radius: 0;
    overflow-x: auto;
    margin: 0;
    -webkit-overflow-scrolling: touch;
}

.table {
    background-color: var(--bg-secondary);
    margin-bottom: 0;
    font-size: 0.9375rem;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table thead th {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    border-top: none;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.075em;
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table thead th:first-child {
    padding-left: 1.5rem;
}

.table thead th:last-child {
    padding-right: 1.5rem;
}

.table tbody td {
    padding: 1.25rem 1.5rem;
    vertical-align: middle;
    color: var(--text-primary);
    border-bottom: 1px solid #f1f5f9;
    border-top: none;
    font-size: 0.9375rem;
    background-color: white;
}

.table tbody td:first-child {
    padding-left: 1.5rem;
}

.table tbody td:last-child {
    padding-right: 1.5rem;
}

.table tbody td strong {
    font-weight: 600;
    color: var(--text-primary);
}

.table-hover tbody tr {
    transition: all 0.15s ease;
    position: relative;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

.table-hover tbody tr:hover td {
    background-color: #f8fafc;
    border-bottom-color: #e2e8f0;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive table adjustments */
@media (max-width: 1200px) {
    .table thead th,
    .table tbody td {
        padding: 1rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .table thead th:first-child,
    .table tbody td:first-child {
        padding-left: 1.25rem;
    }
    
    .table thead th:last-child,
    .table tbody td:last-child {
        padding-right: 1.25rem;
    }
}

@media (max-width: 768px) {
    .table thead th,
    .table tbody td {
        padding: 0.875rem 1rem;
        font-size: 0.8125rem;
    }
    
    .table thead th {
        font-size: 0.6875rem;
    }
    
    .table thead th:first-child,
    .table tbody td:first-child {
        padding-left: 1rem;
    }
    
    .table thead th:last-child,
    .table tbody td:last-child {
        padding-right: 1rem;
    }
    
    .status-badge {
        min-width: 70px;
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: transparent;
}

/* Action buttons in tables */
.table tbody td .action-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    margin: 0 0.15rem;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: white;
}

.table tbody td:last-child {
    white-space: nowrap;
}

.table tbody td .action-btn i {
    font-size: 0.875rem;
}

.table tbody td .btn-outline-primary.action-btn {
    color: var(--primary-color);
    border-color: rgba(26, 115, 232, 0.25);
    background: rgba(26, 115, 232, 0.04);
}

.table tbody td .btn-outline-primary.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.25);
}

.table tbody td .btn-outline-secondary.action-btn {
    color: var(--text-secondary);
    border-color: rgba(100, 116, 139, 0.25);
    background: rgba(100, 116, 139, 0.04);
}

.table tbody td .btn-outline-secondary.action-btn:hover {
    background: var(--text-secondary);
    color: white;
    border-color: var(--text-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.table tbody td .btn-outline-danger.action-btn {
    color: var(--danger-color);
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.04);
}

.table tbody td .btn-outline-danger.action-btn:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}

/* Dropdown in table - prevent overflow issues */
.table tbody td .dropdown {
    position: static;
}

.table tbody td .dropdown-menu {
    position: absolute;
    z-index: 1050;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    min-width: 160px;
}

.table tbody td .dropdown-menu .dropdown-item {
    padding: 0.5rem 0.875rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.table tbody td .dropdown-menu .dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.table tbody td .dropdown-menu .dropdown-item i {
    width: 18px;
    margin-right: 0.5rem;
    text-align: center;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
    font-size: 0.9375rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(26, 115, 232, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.3);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
}

.action-btn {
    padding: 0.375rem 0.625rem;
    margin: 0 0.125rem;
}

/* ========================================
   Badges
   ======================================== */
.badge {
    font-weight: 600;
    padding: 0.4em 0.75em;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
}

/* ========================================
   Badges & Status Indicators
   ======================================== */
.badge {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge-lg {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.status-badge {
    font-weight: 600;
    padding: 0.5rem 1.125rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 85px;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.status-active {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.status-active:hover {
    background-color: #a7f3d0;
}

.status-inactive {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.status-inactive:hover {
    background-color: #fecaca;
}

.status-pending {
    background-color: var(--warning-light);
    color: #92400e;
    border-color: #fcd34d;
}

.status-approved {
    background-color: var(--info-light);
    color: #1e40af;
    border-color: #93c5fd;
}

.status-completed {
    background-color: var(--success-light);
    color: #065f46;
    border-color: #86efac;
}

.status-rejected {
    background-color: var(--danger-light);
    color: #991b1b;
    border-color: #fca5a5;
}

/* ========================================
   Forms
   ======================================== */
.form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-base);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.08);
    background-color: var(--bg-secondary);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.input-group-text {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
}

.form-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

/* ========================================
   Filters Section
   ======================================== */
.filters-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.filters-section .form-label {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.375rem;
}

.filters-section .input-group-text {
    border-color: var(--border-color);
    color: var(--text-muted);
}

.filters-section .form-control:focus + .input-group-text,
.filters-section .input-group-text + .form-control:focus {
    border-color: var(--primary-color);
}

.filters-section .form-select,
.filters-section .form-control {
    font-size: clamp(0.9rem, 0.4vw + 0.85rem, 1rem);
    height: auto;              /* allow natural height */
    min-height: 44px;          /* accessible touch target */
    line-height: 1.4;          /* prevent text cropping */
    padding: 0.625rem 0.875rem;/* balanced vertical padding */
}

/* keep input group text aligned with controls */
.filters-section .input-group-text {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* ========================================
   Chart Container
   ======================================== */
.chart-container {
    position: relative;
    height: 300px;
    padding: 1rem;
}

/* ================================
   Dashboard Responsive Sizing
   - Scales typography, paddings, and charts
   - Ensures layout adapts to different screens
   ================================ */
.dashboard-page .container-fluid {
    padding-left: clamp(0.75rem, 1.8vw, 2rem);
    padding-right: clamp(0.75rem, 1.8vw, 2rem);
}

.dashboard-page .page-header h1 {
    font-size: clamp(1.25rem, 1.2vw + 1rem, 2rem);
}

.dashboard-page .card-header {
    padding: clamp(0.75rem, 1.2vw, 1.25rem) clamp(1rem, 1.4vw, 1.5rem);
}

.dashboard-page .card-body {
    padding: clamp(1rem, 1.2vw, 1.5rem);
}

.dashboard-page .kpi-card h2,
.dashboard-page .kpi-card h3 {
    font-size: clamp(1.25rem, 2.2vw, 2.25rem);
}

/* Make chart containers adapt to viewport height */
.dashboard-page .chart-container {
    height: clamp(220px, 40vh, 380px);
}

/* Ensure canvases fill their containers for responsive charts */
.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .dashboard-page .kpi-card h2,
    .dashboard-page .kpi-card h3 {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
    }
}

/* ========================================
   Quick Actions
   ======================================== */
.btn-outline-primary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-secondary,
.btn-outline-dark {
    font-weight: 600;
    border-width: 2px;
    transition: all 0.2s;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-outline-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.3);
}

.btn-outline-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 188, 4, 0.3);
}

/* ========================================
   Modals
   ======================================== */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    background-color: #f8fafc;
}

.modal-title {
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    background-color: #f8fafc;
}

/* ========================================
   Kanban Board
   ======================================== */
.kanban-column {
    background-color: #f1f5f9;
    border-radius: var(--border-radius);
    padding: 1rem;
    min-height: 500px;
}

.kanban-header {
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.kanban-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    cursor: move;
    transition: all 0.2s;
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-260px);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .kpi-card h2,
    .kpi-card h3 {
        font-size: 1.75rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .sidebar,
    .navbar,
    .action-btn,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary-light {
    background-color: var(--primary-light) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* ========================================
   Inventory - Stock Module Enhancements
   ======================================== */
.stock-kpi-card {
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}
.stock-kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1A73E8 0%, #34A853 50%, #FBBC04 100%);
}
.stock-kpi-card .icon-wrap {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

/* Quantity visualization */
.quantity-bar {
    width: 90px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}
.quantity-bar span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-color);
    border-radius: inherit;
}

/* Stock state badges */
.reorder-badge,
.aging-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    min-width: 65px;
}

.reorder-badge {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Add subtle borders to reorder badges */
.bg-success-subtle.reorder-badge {
    border: 1px solid rgba(52, 168, 83, 0.3);
}

.bg-warning-subtle.reorder-badge {
    border: 1px solid rgba(251, 188, 4, 0.3);
}

.bg-danger-subtle.reorder-badge {
    border: 1px solid rgba(234, 67, 53, 0.3);
}

/* Add subtle borders to aging badges */
.bg-info-subtle.aging-badge {
    border: 1px solid rgba(66, 133, 244, 0.3);
}

.bg-secondary-subtle.aging-badge {
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.bg-danger-subtle.aging-badge {
    border: 1px solid rgba(234, 67, 53, 0.3);
}

/* Filter chip buttons */
.filter-chip {
    border-radius: 999px;
    padding: 0.375rem 0.875rem;
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #fff;
    border: 1.5px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all .2s ease;
    color: var(--text-secondary);
}
.filter-chip i {
    font-size: 0.875rem;
    opacity: 0.8;
}
.filter-chip:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(26,115,232,0.2);
}
.filter-chip:hover i {
    opacity: 1;
}
.filter-chip:active {
    transform: translateY(0);
}
.filter-chip[aria-pressed="true"],
.filter-chip.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1557b0 100%);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 3px 8px rgba(26,115,232,0.4);
}
.filter-chip.active i {
    opacity: 1;
}

/* Filters action area */
.filters-actions .btn {
    height: 44px;
    display: inline-flex;
    align-items: center;
}
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-ghost:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .filters-section .row > [class*='col-'] { 
        flex: 0 0 100%; 
        max-width: 100%; 
    }
    .filters-section .d-flex.gap-2 {
        flex-direction: column;
    }
    .filters-section .d-flex.gap-2 .btn {
        width: 100%;
    }
}

/* Bulk actions toolbar */
.bulk-action-toolbar {
    display: flex;
    gap: 0.5rem;
}

/* Table tweaks for stock page */
table.table.align-middle td,
table.table.align-middle th {
    vertical-align: middle;
}

@media (max-width: 992px) {
    .quantity-bar { width: 72px; }
}

/* ========================================
   Timeline Movement Log (Stock Movement Page)
   ======================================== */
.timeline-container {
    position: relative;
    padding: 1.5rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 1.5rem;
    border-left: 2px solid #e9ecef;
    margin-left: 1rem;
}

.timeline-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -0.5rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px currentColor;
}

.timeline-marker.bg-success { box-shadow: 0 0 0 2px #34a853; }
.timeline-marker.bg-info { box-shadow: 0 0 0 2px #4285f4; }
.timeline-marker.bg-warning { box-shadow: 0 0 0 2px #fbbc04; }
.timeline-marker.bg-danger { box-shadow: 0 0 0 2px #ea4335; }
.timeline-marker.bg-primary { box-shadow: 0 0 0 2px #1a73e8; }

.timeline-content {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.timeline-content:hover {
    background: #fff;
    box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.075);
    transform: translateX(2px);
}

.alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

/* ========================================
   Chart of Accounts - Hierarchical Tree
   ======================================== */
.account-tree {
    font-size: 0.875rem;
    background: white;
}

.account-category,
.account-group {
    margin-bottom: 3rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.account-category:last-child {
    margin-bottom: 0;
}

.account-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem 3rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    cursor: pointer;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: 0.05em;
    transition: var(--transition-base);
    border: none;
    border-bottom: 3px solid var(--border-color);
}

.account-header:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    box-shadow: inset 0 -3px 0 0 var(--primary-color);
}

.account-type-badge {
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.075em;
    min-width: 100px;
    text-align: center;
    text-transform: uppercase;
}

.account-row {
    display: grid;
    grid-template-columns: 28px 120px 1fr 180px 120px;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    border: 1px solid transparent;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
    font-size: 0.875rem;
    background: white;
}

.account-row:last-child {
    border-bottom: none;
}

.account-row:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

.account-row.level-1 {
    padding: 2.25rem 3rem;
    padding-left: 4rem;
    font-weight: 700;
    font-size: 1.05rem;
    background: #fafbfc;
    cursor: pointer;
    border: none;
    border-bottom: 2px solid #e5e7eb;
    border-radius: 0;
    margin: 0;
    grid-template-columns: 28px 100px 1fr 220px 160px;
    gap: 1.5rem;
}

.account-row.level-1:hover {
    background: #f1f5f9;
    border-bottom-color: var(--primary-color);
    box-shadow: inset 0 -2px 0 0 var(--primary-color);
}

.account-row.level-2 {
    padding: 2rem 3rem;
    padding-left: 7rem;
    grid-template-columns: 100px 1fr 220px 160px;
    gap: 1.5rem;
    background: white;
    margin: 0;
    border-bottom: 1px solid #f3f4f6;
}

.account-row.level-2:last-child {
    border-bottom: none;
    margin-bottom: 1rem;
}

.account-row.level-2:hover {
    background: #fafbfc;
    transform: translateX(8px);
    border-left: 3px solid var(--primary-color);
    padding-left: calc(7rem - 3px);
}

.account-row.level-2 .account-code {
    grid-column: 1;
    font-size: 0.8125rem;
}

.account-row.level-3 {
    padding-left: 7rem;
    font-size: 0.8125rem;
    margin-left: 2rem;
}

.account-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    background: rgba(26, 115, 232, 0.08);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
    min-width: 60px;
    text-align: center;
    border: 1px solid rgba(26, 115, 232, 0.15);
    font-size: 0.8125rem;
    color: var(--primary-color);
}

.account-row.level-1 .account-code {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.12) 0%, rgba(26, 115, 232, 0.08) 100%);
    color: var(--primary-color);
    font-weight: 800;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border: 1px solid rgba(26, 115, 232, 0.2);
}

.account-row.level-2 .account-code {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
    background: rgba(26, 115, 232, 0.06);
    border: 1px solid rgba(26, 115, 232, 0.12);
}

.account-name {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.6;
    font-size: 1rem;
}

.account-row.level-1 .account-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.account-balance {
    text-align: right;
    font-weight: 700;
    font-family: 'Inter', system-ui;
    font-size: 1rem;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.account-row.level-1 .account-balance {
    font-size: 1.25rem;
    font-weight: 800;
}

.account-row.level-2 .account-balance {
    font-size: 0.9375rem;
    font-weight: 600;
}

.account-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    opacity: 0;
    transition: var(--transition-fast);
}

.account-row:hover .account-actions {
    opacity: 1;
}

.toggle-icon {
    font-size: 0.75rem;
    transition: var(--transition-base);
    cursor: pointer;
    color: var(--text-secondary);
}

.toggle-icon:hover {
    color: var(--primary-color);
}

.account-children {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.account-category.collapsed > .account-children,
.account-group.collapsed > .account-children {
    max-height: 0;
}

.account-category.collapsed .account-header .toggle-icon,
.account-group.collapsed > .account-row .toggle-icon {
    transform: rotate(-90deg);
}

/* ========================================
   General Ledger - Double Entry Table
   ======================================== */
.table-ledger {
    font-size: 0.9rem;
}

.table-ledger thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    padding: 0.875rem 1rem;
}

.table-ledger tbody tr {
    border-bottom: 1px solid #f1f3f5;
}

.table-ledger tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.table-ledger code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    color: #475569;
}

.entry-group-header td {
    padding: 0.75rem 1rem !important;
    font-weight: 500;
}

.entry-total {
    background: #f8f9fa;
    border-top: 2px solid #dee2e6 !important;
    border-bottom: 2px solid #dee2e6 !important;
}

.entry-total td {
    padding: 0.625rem 1rem !important;
}

/* ========================================
   Accounts Payable - Aging & Schedule
   ======================================== */
.aging-buckets {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.aging-bucket {
    display: grid;
    grid-template-columns: 100px 1fr 180px;
    align-items: center;
    gap: 1rem;
}

.aging-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #64748b;
}

.aging-bar {
    height: 24px;
    background: #f1f3f5;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.aging-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.aging-fill.bg-orange {
    background: #ff8c00;
}

.aging-amount {
    font-weight: 600;
    text-align: right;
}

.payment-schedule {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s;
}

.schedule-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.schedule-date {
    text-align: center;
    min-width: 50px;
}

.date-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary-color);
}

.date-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
}

.schedule-details {
    flex-grow: 1;
}

.table-danger-light {
    background-color: rgba(234, 67, 53, 0.05) !important;
}

.table-warning-light {
    background-color: rgba(251, 188, 4, 0.05) !important;
}

.table-success-light {
    background-color: rgba(52, 168, 83, 0.05) !important;
}

/* ========================================
   Bank Reconciliation - Matching Interface
   ======================================== */
.reconcile-list {
    max-height: 500px;
    overflow-y: auto;
}

.reconcile-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #f1f3f5;
    transition: all 0.2s;
}

.reconcile-item:hover {
    background: #f8f9fa;
}

.reconcile-item.matched {
    background: rgba(52, 168, 83, 0.03);
}

.reconcile-checkbox {
    padding-top: 0.25rem;
}

.reconcile-content {
    flex-grow: 1;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.avatar-circle:hover {
    transform: scale(1.05);
}

/* ========================================
   Financial Statements
   ======================================== */
.nav-tabs-custom {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs-custom .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s;
}

.nav-tabs-custom .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: rgba(26, 115, 232, 0.3);
}

.nav-tabs-custom .nav-link.active {
    color: var(--primary-color);
    background: none;
    border-bottom-color: var(--primary-color);
}

.financial-statement {
    padding: 1.5rem;
}

.statement-section {
    margin-bottom: 1.5rem;
}

.statement-header {
    font-weight: 700;
    font-size: 0.9375rem;
    color: #1e293b;
    padding: 0.75rem 0;
    border-bottom: 2px solid #334155;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.statement-subheader {
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
    padding: 0.5rem 0 0.5rem 1rem;
    margin-top: 0.5rem;
}

.statement-row {
    display: flex;
    justify-content: between;
    padding: 0.625rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.statement-row.small-row {
    padding: 0.4rem 0;
    font-size: 0.9375rem;
}

.statement-label {
    flex-grow: 1;
    color: #334155;
}

.statement-amount {
    min-width: 160px;
    text-align: right;
    font-weight: 600;
    font-family: 'Segoe UI', system-ui;
}

.statement-total {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    font-weight: 700;
    margin-top: 0.5rem;
}

.statement-total .statement-label {
    font-weight: 700;
}

.statement-total .statement-amount {
    font-weight: 700;
}

.statement-major-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    margin: 1rem 0;
    font-weight: 700;
    font-size: 1.0625rem;
}

.statement-final-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white;
    border-radius: 6px;
    margin-top: 1rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.statement-final-total .statement-amount {
    color: white;
}

/* ========================================
   Sales Pipeline - Kanban Board
   ======================================== */
.sales-pipeline {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.pipeline-stage {
    min-width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.pipeline-header {
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-light);
}

.pipeline-body {
    padding: 1rem;
    flex-grow: 1;
    max-height: 700px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.lead-card {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 1.125rem;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.lead-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.lead-card.border-success {
    border-color: var(--success-color) !important;
    border-width: 2px;
}

.lead-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.lead-score {
    padding: 0.375rem 0.625rem;
    border-radius: 999px;
.lead-score {
    padding: 0.375rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Customer Cards - 360° View */
.customer-card {
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
}

.customer-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--primary-color);
}

.customer-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
}

.metric-box {
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.metric-box:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* Quote Builder */
.quote-builder-sidebar {
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - 70px);
    padding: 1.5rem;
}

.quote-line-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
    margin-bottom: 0.875rem;
    transition: var(--transition-base);
}

.quote-line-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.quote-total-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
}

/* Order Timeline */
.order-timeline {
    position: relative;
    padding-left: 2.5rem;
}

.order-timeline::before {
    content: '';
    position: absolute;
    left: 0.875rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -1.75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 3px solid;
    z-index: 1;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.timeline-icon:hover {
    transform: scale(1.1);
}

.order-status-badge {
    padding: 0.5rem 1.125rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.025em;
}

/* Invoice Dashboard */
.invoice-stat-card {
    border-left: 4px solid;
    transition: var(--transition-base);
}

.invoice-stat-card:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

.invoice-table .invoice-row {
    cursor: pointer;
    transition: var(--transition-fast);
}

.invoice-table .invoice-row:hover {
    background: var(--bg-tertiary);
}

.payment-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.625rem;
    box-shadow: var(--shadow-sm);
}

/* Support Tickets */
.ticket-queue {
    max-height: 600px;
    overflow-y: auto;
}

.ticket-item {
    border-left: 4px solid;
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
    margin-bottom: 0.875rem;
    cursor: pointer;
    transition: var(--transition-base);
    border: 1px solid var(--border-light);
}

.ticket-item:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

.priority-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.sla-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.agent-avatar-group {
    display: flex;
    align-items: center;
}

.agent-avatar-group .avatar-circle {
    margin-left: -10px;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.agent-avatar-group .avatar-circle:first-child {
    margin-left: 0;
}

.agent-avatar-group .avatar-circle:hover {
    z-index: 10;
    transform: scale(1.1);
}

/* ========================================
   List Groups
   ======================================== */
.list-group-item {
    border-color: var(--border-light);
    padding: 1rem 1.25rem;
    transition: var(--transition-base);
    background-color: var(--bg-secondary);
}

.list-group-item:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
}

.list-group-item-action {
    cursor: pointer;
}

.list-group-item-action:hover {
    transform: translateX(4px);
}

.list-group-item-action.active {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    gap: 0.375rem;
}

.page-item .page-link {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.875rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition-fast);
    margin: 0;
}

.page-item .page-link:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.page-item.disabled .page-link {
    background-color: var(--bg-tertiary);
    border-color: var(--border-light);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ========================================
   Utilities & Helpers
   ======================================== */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fw-semibold {
    font-weight: 600 !important;
}

.shadow-hover:hover {
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}

.border-start-4 {
    border-left-width: 4px !important;
}

.rounded-pill {
    border-radius: 999px !important;
}

/* Spacing Utilities */
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

/* ========================================
   Dashboard Professional Enhancements
   ======================================== */

/* Dashboard KPI Cards */
.dashboard-kpi-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f8fafc 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dashboard-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-kpi-card:hover::before {
    opacity: 1;
}

.dashboard-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(26, 115, 232, 0.25);
    border-color: var(--primary-color);
}

.dashboard-kpi-card .kpi-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 24px;
    transition: all 0.3s ease;
}

.dashboard-kpi-card:hover .kpi-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Channel Status Cards */
.channel-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.channel-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(180deg, transparent, rgba(26, 115, 232, 0.05));
    transition: height 0.3s ease;
}

.channel-card:hover::after {
    height: 100%;
}

.channel-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px -6px rgba(26, 115, 232, 0.2);
    transform: translateY(-2px);
}

.channel-card .spinner-border {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Warehouse Capacity Cards */
.warehouse-capacity-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.warehouse-capacity-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.warehouse-capacity-card .progress {
    border-radius: 999px;
    overflow: hidden;
    background: #f1f5f9;
}

.warehouse-capacity-card .progress-bar {
    transition: width 0.6s ease;
    background: linear-gradient(90deg, #10b981, #059669);
}

.warehouse-capacity-card .progress-bar.bg-warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.warehouse-capacity-card .progress-bar.bg-danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Metric Cards with Icons */
.metric-icon-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.metric-icon-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.metric-icon-card i {
    transition: all 0.3s ease;
}

.metric-icon-card:hover i {
    transform: scale(1.15);
}

/* Live Clock Styling */
#liveTime {
    font-family: 'Inter', 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

#liveDate {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stock Alert Badges */
.stock-alert-panel {
    background: linear-gradient(135deg, #f8fafc 0%, white 100%);
    border-radius: var(--border-radius-sm);
}

.stock-alert-item {
    transition: all 0.3s ease;
}

.stock-alert-item:hover {
    background: rgba(26, 115, 232, 0.05);
    border-radius: 8px;
}

/* Cash Flow Summary */
.cash-flow-item {
    transition: all 0.3s ease;
    padding: 0.75rem;
    border-radius: 8px;
}

.cash-flow-item:hover {
    background: var(--bg-tertiary);
}

.cash-flow-highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 2px solid rgba(16, 185, 129, 0.2);
}

/* Enhanced Progress Bars */
.progress.enhanced {
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress.enhanced .progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    box-shadow: 0 2px 4px rgba(26, 115, 232, 0.3);
}

/* Card Headers */
.card-header.dashboard-header {
    background: linear-gradient(135deg, #f8fafc 0%, white 100%);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 1.25rem;
}

.card-header.dashboard-header h5 {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}

.card-header.dashboard-header i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Stat Circles (SVG Gauges) */
.stat-circle-wrapper {
    position: relative;
    display: inline-block;
}

.stat-circle-wrapper svg circle {
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Badge Enhancements */
.badge.status-live {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1); }
}

/* Glassmorphism Effect for Premium Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Number Counter Animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-number {
    animation: countUp 0.6s ease-out;
}

/* Dashboard Grid Enhancements */
.dashboard-grid {
    display: grid;
    gap: 1.5rem;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .dashboard-kpi-card h2 {
        font-size: 1.75rem;
    }
    
    #liveTime {
        font-size: 0.9rem;
    }
}
