/* ===== Global ===== */
body {
    font-family:  'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ===== Standardized Button System ===== */
.btn-standard {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease-in-out;
    line-height: 1.4;
    white-space: nowrap;
    user-select: none;
}

.btn-standard:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-standard:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-standard:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Button Variants */
.btn-standard.btn-primary {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-standard.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
}

.btn-standard.btn-success {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-standard.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
}

.btn-standard.btn-warning {
    background-color: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

.btn-standard.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

.btn-standard.btn-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-standard.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
}

.btn-standard.btn-info {
    background-color: #17a2b8;
    color: white;
    border-color: #17a2b8;
}

.btn-standard.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
    color: white;
}

.btn-standard.btn-secondary {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-standard.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: white;
}

/* Outline Variants */
.btn-standard.btn-outline-primary {
    background-color: transparent;
    color: #007bff;
    border-color: #007bff;
}

.btn-standard.btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
}

.btn-standard.btn-outline-success {
    background-color: transparent;
    color: #28a745;
    border-color: #28a745;
}

.btn-standard.btn-outline-success:hover {
    background-color: #28a745;
    color: white;
}

.btn-standard.btn-outline-warning {
    background-color: transparent;
    color: #ffc107;
    border-color: #ffc107;
}

.btn-standard.btn-outline-warning:hover {
    background-color: #ffc107;
    color: #212529;
}

.btn-standard.btn-outline-danger {
    background-color: transparent;
    color: #dc3545;
    border-color: #dc3545;
}

.btn-standard.btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

.btn-standard.btn-outline-info {
    background-color: transparent;
    color: #17a2b8;
    border-color: #17a2b8;
}

.btn-standard.btn-outline-info:hover {
    background-color: #17a2b8;
    color: white;
}

.btn-standard.btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border-color: #6c757d;
}

.btn-standard.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

/* Button Sizes */
.btn-standard.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-standard.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
}

/* Action Button Variants */
.btn-action {
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    color: #495057;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.btn-action:hover {
    background-color: #e9ecef;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-view {
    background-color: #17a2b8;
    color: white;
    border-color: #17a2b8;
}

.btn-view:hover {
    background-color: #138496;
    color: white;
}

.btn-edit {
    background-color: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

.btn-edit:hover {
    background-color: #e0a800;
    color: #212529;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-delete:hover {
    background-color: #c82333;
    color: white;
}

.btn-archive {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-archive:hover {
    background-color: #5a6268;
    color: white;
}

.btn-create-invoice {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-create-invoice:hover {
    background-color: #218838;
    color: white;
}

.btn-add-payment {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-add-payment:hover {
    background-color: #0056b3;
    color: white;
}

/* Override any old sidebar styles */
.sidebar {
    display: none !important;
}

/* ===== Login Page Styling ===== */
.login-body {
    background: linear-gradient(135deg, #e9f2ff, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 15px;
}

.login-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in-out;
}

.login-title {
    text-align: center;
    margin-bottom: 25px;
    color: #155ba3;
    font-weight: 600;
}

.login-title i {
    color: #155ba3;
    margin-right: 8px;
}

.btn-login {
    background-color: #155ba3;
    color: white;
    font-weight: 500;
}

.btn-login:hover {
    background-color: #0e4b89;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

/* Optional animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ===== Top Navigation ===== */
.top-navigation {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
    padding: 0 1rem;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger-menu {
    color: #6b7280;
    font-size: 1.25rem;
    padding: 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.hamburger-menu:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.05);
}

.hamburger-menu:active {
    transform: scale(0.95);
}

.hamburger-menu i {
    transition: all 0.3s ease;
}

.hamburger-menu:hover i {
    transform: rotate(90deg);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    height: 40px;
}

.header-logo {
    height: 100%;
    width: auto;
    max-height: 40px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    color: #3b82f6;
    letter-spacing: 0.5px;
}

.logo-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
    line-height: 1.2;
}

.nav-center {
    display: flex;
    align-items: center;
}

.main-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: -0.025em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #3b82f6;
    background: #f1f5f9;
}

.nav-link.active {
    color: #3b82f6;
    background: #eff6ff;
}

.nav-link i {
    font-size: 1rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-btn {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.notification-btn:hover {
    background: #e9ecef;
    color: #374151;
    transform: translateY(-1px);
}

.notification-btn i {
    font-size: 1.1rem;
}

/* Badge placement and sizing */
#notificationBadge {
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 10px;
    padding: 0 3px;
    top: 2px !important;
    right: 2px !important;
}

.notification-dropdown {
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-dropdown {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    color: #374151;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
}

/* Ensure consistent alignment of the welcome dropdown container */
.nav-actions .dropdown .dropdown-menu {
    margin-top: 8px;
    border-radius: 10px;
}

.user-dropdown:hover {
    background: #e9ecef;
    color: #1e40af;
    transform: translateY(-1px);
}

.user-dropdown i {
    margin-right: 0.5rem;
}

/* Mobile adjustments for notification and user buttons */
@media (max-width: 768px) {
    .notification-btn {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }
    #notificationBadge {
        top: 0 !important;
        right: 0 !important;
        min-width: 14px;
        height: 14px;
        line-height: 14px;
        font-size: 9px;
    }
    .notification-dropdown {
        width: 90vw;
        max-width: 360px;
    }
    .user-dropdown {
        height: 40px;
        padding: 0.375rem 0.6rem;
        font-size: 0.9rem;
    }
}

/* ===== Hamburger Menu ===== */
.hamburger-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hamburger-menu-overlay.show {
    display: block;
    opacity: 1;
}

.hamburger-menu-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #ffffff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.hamburger-menu-overlay.show .hamburger-menu-content {
    transform: translateX(0);
}

.hamburger-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.hamburger-menu-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.close-menu-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-menu-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.hamburger-menu-items {
    padding: 1rem 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    margin: 0.125rem 0;
    position: relative;
}

.menu-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1e40af;
    border-left-color: #3b82f6;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.menu-item.active {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    border-left-color: #3b82f6;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.menu-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.menu-item:hover i {
    transform: scale(1.1);
    color: #3b82f6;
}

.menu-item.active i {
    color: #3b82f6;
    transform: scale(1.05);
}

.menu-item.logout {
    color: #dc2626;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.menu-item.logout:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-left-color: #dc2626;
}

.menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Fix main content scrolling when navigation is open */
body.menu-open .main {
    overflow-y: auto;
    height: calc(100vh - 70px);
    padding-right: 0;
}

/* Ensure proper scrolling for all content areas */
.main {
    overflow-y: auto;
    height: calc(100vh - 70px);
}

/* Fix container scrolling */
.container-fluid {
    overflow-y: auto;
    height: 100%;
}

/* Fix form section scrolling */
.form-section {
    overflow-y: auto;
    max-height: none;
}

/* ===== Navigation Dropdown ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.nav-dropdown .dropdown-icon {
    transition: transform 0.3s ease;
}

.nav-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-dropdown.active .nav-submenu {
    max-height: 200px;
}

.nav-submenu a {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #64748b;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
}

.nav-submenu a:hover {
    background: #f8fafc;
    color: #3b82f6;
}


/* ===== Main Area ===== */
.main {
    margin-top: 70px;
    padding: 0;
    width: 100%;
    min-height: calc(100vh - 70px);
    background: #f8fafc;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== Dashboard Header ===== */
.dashboard-header {
    margin-bottom: 2rem;
}

.greeting-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.greeting-content {
    flex: 1;
}

.greeting-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.greeting-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

.mood-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 1rem 1.5rem;
}

.mood-icon {
    font-size: 1.5rem;
}

.mood-text {
    font-weight: 600;
    color: #0369a1;
}

/* ===== Search Section ===== */
.search-section {
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.search-container .input-group {
    flex: 1;
}

.search-container .input-group-text {
    background: #f8fafc;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #6b7280;
}

.search-container .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
    border: 1px solid #d1d5db;
}

.search-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== KPI Section ===== */
.kpi-section {
    margin-bottom: 2rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.kpi-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
    border-color: #e2e8f0;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #3b82f6;
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: #f0fdf4;
    color: #16a34a;
}

.kpi-trend.negative {
    background: #fef2f2;
    color: #dc2626;
}

.kpi-trend i {
    font-size: 0.625rem;
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.kpi-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
}

/* ===== Charts Section ===== */
.charts-section {
    margin-bottom: 2rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 1.5rem;
}

.bottom-charts-section {
    margin-bottom: 2rem;
}

.bottom-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #e2e8f0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.chart-title i {
    color: #3b82f6;
    font-size: 1.125rem;
}

.chart-status {
    background: #f0fdf4;
    color: #16a34a;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid #dcfce7;
}

.chart-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chart-summary {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.summary-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
}

.chart-container {
    position: relative;
    height: 400px;
    flex: 1;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    min-height: 300px;
}

.chart-container canvas {
    max-height: 100%;
    width: 100% !important;
    height: 100% !important;
}

/* ===== Modern Chart Styling ===== */
.chart-container canvas {
    border-radius: 8px;
}

/* Chart.js custom styling */
.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0 1rem;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Loading overlay improvements */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}

.loading-overlay .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.2em;
}

.loading-overlay p {
    margin-top: 0.75rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== Dashboard Cards ===== */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #ffffff;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card h5 {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.125rem;
}

.card h3 {
    font-weight: 700;
    color: #1e293b;
}

/* ===== Modern Dashboard Styles ===== */
.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #3b82f6;
}

.stat-card.primary::before { background: #3b82f6; }
.stat-card.success::before { background: #10b981; }
.stat-card.warning::before { background: #f59e0b; }
.stat-card.danger::before { background: #ef4444; }
.stat-card.info::before { background: #06b6d4; }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #3b82f6;
    background: #eff6ff;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* ===== Chart Containers ===== */
.chart-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.chart-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

/* ===== Notifications Dropdown ===== */
.notification-dropdown {
    max-height: 300px;
    overflow-y: auto;
    min-width: 300px;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.notification-icon.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.notification-icon.danger {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.notification-icon.success {
    background: rgba(25, 135, 84, 0.2);
    color: #198754;
}

/* ===== Loading Animations ===== */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== Responsive Design ===== */

/* Tablet View (768px - 1024px) */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 0.25rem;
    }
    
    .nav-link span {
        display: none;
    }
    
    .nav-link {
        padding: 0.5rem;
        justify-content: center;
    }
    
    .nav-center {
        display: none;
    }
    
    .dashboard-container {
        padding: 1.5rem;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        padding: 1.5rem;
    }
}

/* Mobile View (up to 768px) */
@media (max-width: 768px) {
    .main {
        margin-top: 70px;
        padding: 0;
    }
    
    .dashboard-container {
        padding: 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-top: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        flex-direction: column;
        padding: 1rem;
        display: none;
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .nav-link span {
        display: inline;
    }
    
    .nav-center {
        display: none;
    }
    
    .brand-text {
        display: none;
    }
    
    #mobileMenuToggle {
        display: block !important;
    }
    
    /* Dashboard responsive adjustments */
    .greeting-section {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }
    
    .greeting-title {
        font-size: 1.5rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .search-actions {
        width: 100%;
        justify-content: center;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .kpi-card {
        min-height: 100px;
        padding: 1rem;
    }
    
    .kpi-value {
        font-size: 1.75rem;
    }
    
    .charts-grid,
    .bottom-charts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-container {
        height: 350px;
    }
    
    .chart-card {
        min-height: 450px;
    }
    
    /* Form responsive adjustments */
    .form-section {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 8px;
    }
    
    .form-title {
        font-size: 1.25rem;
        text-align: center;
    }
    
    .row {
        margin: 0;
    }
    
    .col-md-6,
    .col-md-4,
    .col-md-3,
    .col-lg-6,
    .col-lg-4,
    .col-lg-3 {
        padding: 0.5rem 0;
    }
    
    /* Line items table responsive */
    #line-items-table {
        font-size: 0.875rem;
    }
    
    #line-items-table th,
    #line-items-table td {
        padding: 0.5rem 0.25rem;
    }
    
    #line-items-table .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Table responsive */
    .table-responsive {
        border: none;
        overflow-x: auto;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .table-actions .btn {
        width: 100%;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Button groups responsive */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 4px !important;
        margin-bottom: 0.25rem;
    }
    
    /* Modal responsive */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    /* Card responsive */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
}

/* Small Mobile View (up to 480px) */
@media (max-width: 480px) {
    .main {
        padding: 0.5rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    .form-section {
        padding: 0.75rem;
        margin: 0.25rem;
    }
    
    .form-title {
        font-size: 1.125rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.25rem;
    }
    
    .hamburger-menu {
        padding: 0.5rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .brand-logo img {
        max-height: 30px;
    }
}


/* ===== Enhanced Form Optimization ===== */
.form-control {
    transition: all 0.3s ease;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Enhanced input groups */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px 0 0 8px;
}

.input-group .form-control {
    border-radius: 0 8px 8px 0;
    border-left: 0;
}

.input-group .form-control:focus {
    border-left: 1px solid #3b82f6;
}

/* Enhanced select styling */
select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Enhanced textarea styling */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Form validation states */
.form-control.is-valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='m2.3 6.73.94-.94 1.89-1.89.94-.94-.94-.94L3.24 1.3l-.94.94L.47 3.13l-.94.94.94.94z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4 1.4-1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Enhanced button styling */
.btn {
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active:before {
    width: 300px;
    height: 300px;
}

/* ===== Search and Filter Styles ===== */
.search-filter-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.search-input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.filter-btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
}

.filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.filter-btn:hover:not(.active) {
    background: #f9fafb;
    border-color: #9ca3af;
}

 
       .login-box {
    max-width: 400px;
    margin: 60px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 4px 20px rgba(0,0,0,0.1);
}

/* form css*/

.form-control:focus {
    box-shadow: none;
}

/* ===== Line Items Table Alignment ===== */
#line-items-table td {
    vertical-align: middle !important;
    padding: 0.75rem !important;
}

#line-items-table .form-control {
    margin-bottom: 0 !important;
}

#line-items-table .number-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
}

#line-items-table .spinner-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.1rem;
    align-items: center;
}

#line-items-table .spinner-btn {
    width: 24px;
    height: 24px;
    font-size: 10px;
    padding: 0;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#line-items-table .spinner-btn:hover {
    background: #e9ecef;
}

/* Ensure all input fields in line items are properly aligned */
#line-items-table input[type="number"],
#line-items-table input[type="text"],
#line-items-table select,
#line-items-table textarea {
    height: 38px;
    line-height: 1.5;
    vertical-align: middle;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
}

/* Quantity input specific styling */
#line-items-table input[name="quantity[]"] {
    flex: 1;
    min-width: 60px;
    text-align: center;
}

#line-items-table textarea {
    height: auto;
    min-height: 38px;
    resize: vertical;
}

/* Product description textarea specific styling */
.product-description {
    margin-top: 0.5rem !important;
    min-height: 60px;
}
        
.form-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.form-title {
    font-size: 1.5rem;
    color: #155ba3;
    font-weight: 600;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #444;
    margin-top: 30px;
    margin-bottom: 15px;
}

.product-row {
    border: 1px dashed #ccc;
    background: #f9f9f9;
}

.btn-outline-primary {
    color: #155ba3;
    border-color: #155ba3;
}

.btn-outline-primary:hover {
    background-color: #155ba3;
    color: white;
}

/* table css*/

.table thead {
    background-color: #155ba3;
    color: #fff;
}

.table td, .table th {
    vertical-align: middle;
}

/* ===== Action Button Hover Effects ===== */
.btn-action {
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-action:active {
    transform: translateY(0);
}

/* View Button */
.btn-view {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
}

.btn-view:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Edit Button */
.btn-edit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Delete Button */
.btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Create Invoice Button */
.btn-create-invoice {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    color: white;
}

.btn-create-invoice:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Add Payment Button */
.btn-add-payment {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: white;
}

.btn-add-payment:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Button ripple effect */
.btn-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-action:active::before {
    width: 300px;
    height: 300px;
}

/* Table action buttons container */
.table-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.table-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    min-width: 80px;
}

/* ===== Enhanced Notification Styles ===== */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px 8px;
}

.notification-item:hover {
    background-color: #f8fafc;
    transform: translateX(2px);
}

.notification-item.unread {
    background-color: rgba(59, 130, 246, 0.05);
    border-left: 3px solid #3b82f6;
    font-weight: 500;
}

.notification-item.urgent {
    border-left: 3px solid #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
}

.notification-item.high {
    border-left: 3px solid #f59e0b !important;
    background-color: rgba(245, 158, 11, 0.05) !important;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.notification-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notification-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.notification-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 4px;
    color: #1e293b;
    line-height: 1.4;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #94a3b8;
}

.notification-time {
    font-weight: 400;
}

/* ===== Touch-Friendly Mobile Improvements ===== */
@media (max-width: 768px) {
    /* Touch targets should be at least 44px */
    .btn,
    .form-control,
    .hamburger-menu,
    .menu-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improve touch scrolling */
    .main {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better spacing for touch */
    .btn-group .btn {
        margin-bottom: 0.5rem;
    }
    
    /* Improve form spacing on mobile */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
    }
    
    /* Better table scrolling on mobile */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        border: 1px solid #dee2e6;
        border-radius: 8px;
    }
    
    /* Improve modal on mobile */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    /* Better card spacing */
    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    /* Improve notification dropdown on mobile */
    .dropdown-menu {
        max-width: calc(100vw - 2rem);
        left: 1rem !important;
        right: 1rem !important;
        transform: none !important;
    }
    
    /* Better hamburger menu on mobile */
    .hamburger-menu-content {
        width: 100%;
        max-width: 320px;
    }
    
    .menu-item {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Improve line items table on mobile */
    #line-items-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #line-items-table thead,
    #line-items-table tbody,
    #line-items-table th,
    #line-items-table td,
    #line-items-table tr {
        display: block;
    }
    
    #line-items-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    #line-items-table tr {
        border: 1px solid #ccc;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        border-radius: 8px;
        background: #fff;
    }
    
    #line-items-table td {
        border: none;
        position: relative;
        padding: 0.5rem 0.5rem 0.5rem 50%;
        white-space: normal;
        text-align: left;
    }
    
    #line-items-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #374151;
    }
}

/* ===== Accessibility Improvements ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for keyboard navigation */
.btn:focus,
.form-control:focus,
.hamburger-menu:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid;
    }
    
    .form-control {
        border: 2px solid;
    }
    
    .card {
        border: 2px solid;
    }
}

html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.main, .container {
    height: auto;       /* Don’t force fixed height */
    overflow: visible;  /* Let content expand naturally */
}

/* Prevent page from shifting or double scrollbar */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden !important; /* kill horizontal scrollbar */
}

.quantity-spinner input[type="number"] {
    border-left: none;
    border-right: none;
    box-shadow: none !important;
    font-weight: bold;
    font-size: 1rem;
    padding: 0.25rem 0;
}
.quantity-spinner .btn {
    min-width: 32px;
    padding: 0 0.5rem;
}
.quantity-spinner .btn:focus {
    box-shadow: 0 0 0 0.15rem #0d6efd40;
}
.d-flex.gap-2 > * {
    margin-right: 0.5rem;
}
.d-flex.gap-2 > *:last-child {
    margin-right: 0;
}
#productTable thead th {
    position: sticky;
    top: 0;              /* change to 70px if you need offset for fixed navbar */
    background: #f8f9fa; /* match Bootstrap .table-light */
    z-index: 2;
}

/* ===== Standardized Action Button Group ===== */
.action-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid;
    background-color: #fff;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease-in-out;
    line-height: 1.4;
    white-space: nowrap;
    user-select: none;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Action Button Colors */
.action-btn.back {
    border-color: #FFC107;
    color: #FFC107;
}

.action-btn.back:hover {
    background-color: #FFC107;
    color: white;
}

.action-btn.create {
    border-color: #28A745;
    color: #28A745;
}

.action-btn.create:hover {
    background-color: #28A745;
    color: white;
}

.action-btn.pdf {
    border-color: #DC3545;
    color: #DC3545;
}

.action-btn.pdf:hover {
    background-color: #DC3545;
    color: white;
}

.action-btn.excel {
    border-color: #28A745;
    color: #28A745;
}

.action-btn.excel:hover {
    background-color: #28A745;
    color: white;
}

.action-btn.print {
    border-color: #007BFF;
    color: #007BFF;
}

.action-btn.print:hover {
    background-color: #007BFF;
    color: white;
}




