/* 
 * Beautiful Card Styles for Inventory Management System
 * Restored original styling - large icons with proper colors
 */

/* Base Card Styles */
.card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.2s ease-in-out;
    background-color: #fff;
}

.card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Card Headers */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #495057;
}

.card-header h5, 
.card-header h6 {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

/* Stats Cards - Beautiful Dashboard Cards with Left Border */
.stats-card {
    border-top: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    background-color: #fff;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Stats Card Color Variants - 6px Left Border matching icon colors */
div.card.stats-card.primary {
    border-left: 6px solid #007bff !important;
}

div.card.stats-card.success {
    border-left: 6px solid #28a745 !important;
}

div.card.stats-card.warning {
    border-left: 6px solid #ffc107 !important;
}

div.card.stats-card.danger {
    border-left: 6px solid #dc3545 !important;
}

div.card.stats-card.info {
    border-left: 6px solid #17a2b8 !important;
}

/* Stats Card Icons - LARGE and COLORED */
.stats-card .stats-icon i {
    font-size: 3rem !important;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.stats-card:hover .stats-icon i {
    opacity: 1;
    transform: scale(1.1);
}

/* Stats Card Icon Colors - Make them colorful! */
.stats-card.primary i {
    color: #007bff !important;
}

.stats-card.success i {
    color: #28a745 !important;
}

.stats-card.warning i {
    color: #ffc107 !important;
}

.stats-card.danger i {
    color: #dc3545 !important;
}

.stats-card.info i {
    color: #17a2b8 !important;
}

/* Stats Card Content */
.stats-card .card-body {
    padding: 1.5rem;
}

.stats-card .card-title {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-card h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #343a40;
}

.stats-card small {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Table Action Buttons - Small and clean with proper borders */
.table .btn {
    padding: 0.25rem 0.5rem;
    margin: 0;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.table .btn i {
    font-size: 0.875rem !important;
}

.table .btn-outline-primary {
    color: #007bff;
    border: 1px solid #007bff;
}

.table .btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.table .btn-outline-success {
    color: #28a745;
    border: 1px solid #28a745;
}

.table .btn-outline-success:hover {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.table .btn-outline-danger {
    color: #dc3545;
    border: 1px solid #dc3545;
}

.table .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.table .btn-outline-warning {
    color: #ffc107;
    border: 1px solid #ffc107;
}

.table .btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.table .btn-outline-secondary {
    color: #6c757d;
    border: 1px solid #6c757d;
}

.table .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Unified Table Styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
    background-color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 1rem 0.75rem;
    border-top: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.table tbody td {
    padding: 0.875rem 0.75rem;
    border-top: 1px solid #dee2e6;
    vertical-align: middle;
}

/* Remove table striping - all rows have same background */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: transparent;
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Responsive table wrapper */
.table-responsive {
    border-radius: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* General table improvements */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

/* Text utilities for tables */
.text-wrap {
    white-space: normal !important;
    word-wrap: break-word !important;
}

.text-break {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

.text-nowrap {
    white-space: nowrap !important;
}

/* Email and long text in tables */
.table td a {
    word-break: break-all;
}

.table td.text-wrap,
.table td .text-wrap {
    max-width: 250px;
    white-space: normal;
    word-wrap: break-word;
}

/* Action buttons in tables */
.table .btn-group {
    display: inline-flex;
    gap: 2px;
    white-space: nowrap;
}

.table .btn-group .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

.table .btn-group-sm .btn {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
}

/* Navigation and Sidebar Icons */
.sidebar .nav-link i {
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
}

/* Button Icons */
.btn i {
    font-size: 1rem;
}

.btn-lg i {
    font-size: 1.1rem;
}

.btn-sm i {
    font-size: 0.875rem;
}

/* Ensure all outline buttons have visible borders */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info {
    border-width: 1px !important;
    border-style: solid !important;
}

/* Enhanced button group styling */
.btn-group .btn {
    border-width: 1px;
    margin-left: -1px;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

/* Special handling for small button groups */
.btn-group-sm .btn {
    border-width: 1px !important;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Ensure table button groups maintain borders */
.table .btn-group .btn {
    border-width: 1px !important;
}

/* Fix button group borders in tables */
.table .btn-group .btn-outline-primary + .btn-outline-primary,
.table .btn-group .btn-outline-secondary + .btn-outline-secondary,
.table .btn-group .btn-outline-success + .btn-outline-success,
.table .btn-group .btn-outline-danger + .btn-outline-danger,
.table .btn-group .btn-outline-warning + .btn-outline-warning {
    border-left-width: 0;
}

.table .btn-group .btn:first-child {
    border-left-width: 1px !important;
}

/* Header Icons */
h1 i, h2 i, h3 i, h4 i, h5 i, h6 i {
    margin-right: 0.5rem;
    font-size: 0.9em;
}

/* Clickable Cards */
.clickable-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.clickable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.clickable-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Enhanced stats card clickable effects */
.stats-card.clickable-card {
    position: relative;
    overflow: hidden;
}

.stats-card.clickable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.stats-card.clickable-card:hover::before {
    left: 100%;
}

/* Notification dropdown styling */
.notification-dropdown {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.notification-item {
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-dropdown .btn-outline-secondary {
    padding: 2px 6px;
    font-size: 0.75rem;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.notification-dropdown .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Pulse animation for notifications */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Additional clickable card effects for purchases page */
.clickable-card:hover small {
    opacity: 1;
    color: rgba(255, 255, 255, 1) !important;
}

.clickable-card:hover .fas {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Table warning row styling */
.table-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.table-warning:hover {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

/* Small table variations */
.table-sm thead th {
    padding: 0.5rem 0.5rem;
    font-size: 0.875rem;
}

.table-sm tbody td {
    padding: 0.5rem 0.5rem;
    font-size: 0.875rem;
}

/* Table improvements for different contexts */
.table-sm th {
    font-weight: 600;
    color: #495057;
    border-top: none;
}

/* Borderless tables for detail views */
.table-borderless thead th,
.table-borderless tbody td {
    border: none;
    background: transparent;
}

.table-borderless thead th {
    font-weight: 600;
    color: #6c757d;
    padding: 0.5rem 0.5rem;
}

.table-borderless tbody td {
    padding: 0.5rem 0.5rem;
}

/* Dark table headers for special sections */
.table-dark {
    background-color: #343a40;
    color: #fff;
}

.table-dark th {
    background-color: #343a40;
    border-color: #454d55;
    color: #fff;
}

/* Layout and Sidebar Styles */
.sidebar {
    min-height: 100vh;
    background-color: #343a40;
    position: relative;
    transition: width 0.3s ease, flex 0.3s ease, max-width 0.3s ease, min-width 0.3s ease;
}

/* Prevent transitions during user interaction */
.sidebar.collapsed:active,
.sidebar.collapsed *:active {
    transition: none !important;
}

/* Sidebar toggle button */
.btn-sidebar-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: auto;
}

.btn-sidebar-toggle:hover {
    background-color: #0b5ed7;
}

.btn-sidebar-toggle i {
    font-size: 14px;
    pointer-events: none;
}

/* Collapsed sidebar state */
.sidebar.collapsed {
    width: 70px !important;
    max-width: 70px;
    min-width: 70px;
    flex: 0 0 70px;
}

/* Expand main content when sidebar is collapsed */
.sidebar.collapsed ~ .main-content {
    flex: 0 0 calc(100% - 70px) !important;
    max-width: calc(100% - 70px) !important;
}

/* For extra large screens, use proper flex calculation */
@media (min-width: 1200px) {
    .sidebar {
        flex: 0 0 15%;
        max-width: 15%;
    }
    
    .sidebar.collapsed {
        flex: 0 0 70px;
        max-width: 70px;
    }
    
    .main-content {
        flex: 0 0 85%;
        max-width: 85%;
        transition: all 0.3s ease;
    }
    
    .sidebar.collapsed ~ .main-content {
        flex: 0 0 calc(100% - 70px) !important;
        max-width: calc(100% - 70px) !important;
    }
}

.sidebar.collapsed .sidebar-logo-area h6,
.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .sidebar-logo {
    width: 40px;
    height: 60px;
    margin: 20px 0 0 auto;
    padding: 5px;
}

.sidebar.collapsed .sidebar-logo-area {
    padding: 0.5rem 0;
}

.sidebar.collapsed .nav-link {
    text-align: center;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    position: relative;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0 !important;
    font-size: 1.2rem;
    transition: none !important; /* Disable transition to prevent zoom effect on click */
}

/* Disable transitions when clicking */
.sidebar.collapsed .nav-link:active,
.sidebar.collapsed .nav-link:active i {
    transition: none !important;
    transform: none !important;
}

/* Pure CSS Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-link::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 15px;
    padding: 0.5rem 0.75rem;
    background-color: #212529;
    color: white;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1050;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Triangle/arrow for tooltip */
.sidebar.collapsed .nav-link::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 7px solid #212529;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1050;
}

/* Show tooltip on hover */
.sidebar.collapsed .nav-link:hover::after,
.sidebar.collapsed .nav-link:hover::before {
    opacity: 1;
}

.sidebar-logo-area {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem !important;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 10px;
    transition: all 0.3s ease;
}

.sidebar-logo a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.sidebar-logo-area h6 {
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.85rem;
    margin: 0.5rem 0 0 0;
}

/* Responsive logo sizing */
@media (max-width: 1200px) {
    .sidebar-logo {
        max-width: 100px;
    }
    
    .sidebar-logo-area h6 {
        font-size: 0.8rem;
    }
}

@media (max-width: 992px) {
    .sidebar-logo {
        max-width: 90px;
    }
    
    .sidebar-logo-area {
        padding: 0.75rem 0;
    }
    
    .sidebar-logo-area h6 {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .sidebar-logo {
        max-width: 80px;
    }
    
    .sidebar-logo-area h6 {
        font-size: 0.7rem;
    }
}

.sidebar .nav-link {
    color: #adb5bd;
    border-radius: 0.375rem;
    margin: 0.125rem 0;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: #0d6efd;
}

/* Prevent any animation jank when clicking in collapsed state */
.sidebar.collapsed .nav-link:active {
    transition: none !important;
}

.sidebar.collapsed .nav-link:active * {
    transition: none !important;
}

.main-content {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 100px;
    margin-bottom: 30px;
}

.top-bar {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    border-radius: 0.375rem 0.375rem 0 0;
}

.profile-dropdown .dropdown-toggle::after {
    display: none;
}

.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: #343a40;
    color: #fff;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

/* Utility Styles */
.low-stock {
    color: #dc3545;
    font-weight: bold;
}

/* Dashboard Icon Colors */
.dashboard-icon-warning {
    color: #ffc107 !important;
}

.dashboard-icon-danger {
    color: #dc3545 !important;
}

.dashboard-icon-success {
    color: #28a745 !important;
}

.dashboard-icon-info {
    color: #17a2b8 !important;
}

.dashboard-icon-primary {
    color: #007bff !important;
}

.scanner-interface {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
}

.product-card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 0.5rem 0;
    background: white;
}

.barcode {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

/* Products Page Styles */
.clickable-stat {
    cursor: pointer;
    transition: all 0.3s ease;
}

.clickable-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.clickable-stat.active {
    border: 1px solid #007bff;
    box-shadow: 0 0 10px rgba(0,123,255,0.3);
}

.clickable-stat.active .card-body {
    background: linear-gradient(135deg, rgba(0,123,255,0.1) 0%, rgba(0,123,255,0.05) 100%);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-card .stats-icon i {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 768px) {
    .stats-card .stats-icon i {
        font-size: 2rem !important;
    }
}

/* Settings page styles */
.nav-tabs .nav-link {
    border-radius: 0.375rem 0.375rem 0 0;
    border: 1px solid transparent;
    margin-right: 0.25rem;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    border-bottom: 1px solid #fff;
}

.form-control-color {
    max-width: 60px;
}

.current-file {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

/* Dashboard page styles */
/* Notification dropdown styling */
.notification-dropdown {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.notification-item {
    padding: 12px 16px;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: rgba(0,0,0,0.05);
}

.notification-dropdown .dropdown-header {
    background-color: #f8f9fa;
    padding: 10px 16px;
    border-bottom: 1px solid #dee2e6;
}

.notification-dropdown .btn-outline-secondary {
    padding: 2px 6px;
    font-size: 0.75rem;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.notification-dropdown .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Enhanced clickable stats cards styling */
.clickable-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.clickable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.clickable-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Pulse animation for notifications */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Add some visual feedback for the cards */
.stats-card.clickable-card {
    position: relative;
    overflow: hidden;
}

.stats-card.clickable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.stats-card.clickable-card:hover::before {
    left: 100%;
}


/* Vendor view page styles */
/* Currency formatting */
.currency {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* Statistics cards */
.card-body .row.text-center h4 {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Empty state styling */
.text-center.py-4 i {
    opacity: 0.3;
}

/* Table improvements */
.table-sm th {
    font-weight: 600;
    color: #495057;
    border-top: none;
}

/* Badge improvements */
.badge {
    font-size: 0.75rem;
}

/* Authentication pages styles */
/* Login, forgot password, reset password pages */
body.auth-page {
    background: linear-gradient(135deg, 
        var(--primary-color, #0d6efd) 0%, 
        var(--sidebar-color, #343a40) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: 2rem;
}

.login-card {
    background: var(--card-bg, #ffffff);
    border-radius: var(--border-radius, 0.75rem);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 
                0 8px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--border-color, rgba(0,0,0,0.1));
    backdrop-filter: blur(10px);
}

.login-header {
    background: var(--card-bg, #ffffff);
    padding: 3rem 2rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.1));
}

.app-logo {
    width: 180px;
    height: 220px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 12px;
}

.app-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-logo i {
    color: white;
    font-size: 1.75rem;
}

.login-title {
    color: var(--text-color, #333);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-muted, #6c757d);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.login-body {
    padding: 2rem;
}

.auth-page .form-floating {
    margin-bottom: 1rem;
}

.auth-page .form-floating > .form-control {
    border: 1px solid var(--border-color, #e9ecef);
    border-radius: var(--border-radius, 0.5rem);
    background-color: var(--input-bg, #f8f9fa);
    transition: all 0.15s ease-in-out;
    height: 58px;
    line-height: 1.25;
    padding-left: 45px;
}

.auth-page .form-floating > .form-control:focus {
    border-color: var(--primary-color, #0d6efd);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-rgb, 13, 110, 253), 0.15);
    background-color: var(--card-bg, #ffffff);
}

.auth-page .form-floating > label {
    color: var(--text-muted, #6c757d);
    font-weight: 500;
    padding-left: 45px;
}

.auth-page .form-floating > .form-control:focus ~ label,
.auth-page .form-floating > .form-control:not(:placeholder-shown) ~ label {
    padding-left: 45px;
}

.btn-login {
    background: #d73a2a;
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: var(--border-radius, 0.5rem);
    font-size: 1rem;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: #b94639;
}

.btn-login:active {
    transform: translateY(0);
}

.auth-page .alert {
    border: none;
    border-radius: var(--border-radius, 0.5rem);
    font-weight: 500;
}

.auth-page .alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-left: 1px solid #dc3545;
}

.auth-page .alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
    border-left: 1px solid #28a745;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #6c757d);
    z-index: 5;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted, #6c757d);
    cursor: pointer;
    z-index: 5;
    padding: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--primary-color, #0d6efd);
    background-color: rgba(var(--primary-color-rgb, 13, 110, 253), 0.1);
}

.auth-page .form-floating > .form-control.with-toggle {
    padding-right: 50px;
}

.back-link {
    color: var(--primary-color, #0d6efd);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease-in-out;
}

.back-link:hover {
    color: var(--sidebar-color, #343a40);
    transform: translateX(-2px);
}

@media (max-width: 576px) {
    .login-container {
        margin: 1rem;
    }
    
    .login-header {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .login-body {
        padding: 1.5rem;
    }
}

/* Loading animation */
.btn-login.loading {
    position: relative;
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.form-floating>.form-control-plaintext~label::after, .form-floating>.form-control:focus~label::after, .form-floating>.form-control:not(:placeholder-shown)~label::after, .form-floating>.form-select~label::after {
    background-color: transparent!important;
}

/* Form Card Styles */
.form-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    background-color: #fff;
    margin-bottom: 1.5rem;
}

.form-card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #495057;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-card-header h5 {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.form-card-body {
    padding: 1.25rem;
}

/* Filters Section */
.filters-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.filters-form .form-row {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.filters-form .form-group {
    flex: 1;
    min-width: 150px;
}

.filters-form .form-group:last-child {
    flex: 0 0 auto;
}

/* Form Cards - For Invoice and Other Forms */
.form-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    background-color: #fff;
    margin-bottom: 1.5rem;
}

.form-card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-card-header h5 {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.form-card-body {
    padding: 1.5rem;
}

.form-actions {
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Filters Section */
.filters-section {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
}

.filters-form .form-row {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.filters-form .form-group {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 768px) {
    .filters-form .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filters-form .form-group {
        min-width: 100%;
    }
}

/* Clickable Card Styles - Interactive Stats Cards */
.clickable-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.clickable-card.active {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.clickable-card.active.primary {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.clickable-card.active.success {
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40,167,69,0.3);
}

.clickable-card.active.warning {
    border-color: #ffc107;
    box-shadow: 0 4px 15px rgba(255,193,7,0.3);
}

.clickable-card.active.danger {
    border-color: #dc3545;
    box-shadow: 0 4px 15px rgba(220,53,69,0.3);
}

.clickable-card.active.info {
    border-color: #17a2b8;
    box-shadow: 0 4px 15px rgba(23,162,184,0.3);
}

.clickable-card .card-body {
    position: relative;
}

.clickable-card.active .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

/* ===================================
   MOBILE RESPONSIVE STYLES
   =================================== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1050;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 10px 15px;
    display: none; /* Hidden by default */
}

/* Show hamburger menu on tablets and mobile (up to 1199px) */
@media (max-width: 1199px) {
    .mobile-menu-toggle {
        display: block !important;
    }
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Hide expand button on desktop */
@media (min-width: 1200px) {
    .card-expand-btn {
        display: none !important;
    }
}

/* Show expand button on mobile/tablet */
@media (max-width: 1199px) {
    .card-expand-btn {
        display: flex !important;
    }
}

/* ===================================
   RESPONSIVE TABLE - CARD LAYOUT ON MOBILE & TABLET
   Based on: https://codepen.io/AllThingsSmitty/pen/MyqmdM
   Extended to tablets for better UX
   =================================== */

/* Mobile and Tablet Responsive Table (max-width: 1199px) */
@media (max-width: 1199px) {
    /* Force table to not be like tables anymore */
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }
    
    /* Hide table headers (but not display: none;, for accessibility) */
    .table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    /* Card container - each row becomes a card with flexbox layout */
    .table-responsive tr {
        border: 1px solid #dee2e6;
        border-radius: 12px;
        margin-bottom: 1rem;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        overflow: visible;
        position: relative;
        padding: 1rem;
        display: flex !important;
        flex-wrap: wrap;
        align-items: flex-start;
        min-height: 100px;
    }
    
    /* Hide all TDs by default, we'll show specific ones */
    .table-responsive td {
        border: none;
        padding: 0 !important;
        margin: 0;
        display: none !important;
    }
    
    /* Image - fixed on the left side */
    .table-responsive td[data-label="Image"] {
        display: block !important;
        flex: 0 0 80px;
        width: 80px;
        height: 80px;
        margin-right: 1rem;
        order: 1;
    }
    
    .table-responsive td[data-label="Image"] img,
    .table-responsive td[data-label="Image"] > div {
        width: 80px !important;
        height: 80px !important;
        border-radius: 8px;
        object-fit: cover;
    }
    
    /* Content wrapper - takes remaining space */
    .table-responsive td[data-label="Name"],
    .table-responsive td[data-label="Price"],
    .table-responsive td[data-label="Total Stock"],
    .table-responsive td[data-label="Status"],
    .table-responsive td[data-label="Actions"] {
        display: block !important;
        flex: 1 1 calc(100% - 100px);
        max-width: calc(100% - 100px);
    }
    
    /* Product Name */
    .table-responsive td[data-label="Name"] {
        order: 2;
        margin-bottom: 0.5rem;
    }
    
    .table-responsive td[data-label="Name"] strong {
        font-size: 1.1rem;
        color: #212529;
        display: block;
        line-height: 1.3;
    }
    
    .table-responsive td[data-label="Name"] small {
        font-size: 0.85rem;
        color: #6c757d;
        display: block;
        margin-top: 0.25rem;
        line-height: 1.4;
    }
    
    /* Price */
    .table-responsive td[data-label="Price"] {
        order: 3;
        font-size: 1rem;
        color: #212529;
        margin-bottom: 0.25rem;
    }
    
    /* Stock */
    .table-responsive td[data-label="Total Stock"] {
        order: 4;
        font-size: 0.95rem;
        color: #495057;
        margin-bottom: 0.5rem;
    }
    
    /* Status badge */
    .table-responsive td[data-label="Status"] {
        order: 5;
        margin-bottom: 0.5rem;
    }
    
    /* Action buttons */
    .table-responsive td[data-label="Actions"] {
        order: 6;
    }
    
    .table-responsive td[data-label="Actions"] .btn-group {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    /* Secondary info - full width below when expanded */
    .table-responsive tr:not(.expanded) td.secondary-info {
        display: none !important;
    }
    
    .table-responsive tr.expanded td.secondary-info {
        display: block !important;
        flex: 1 1 100%;
        width: 100%;
        order: 7;
        padding: 0.75rem !important;
        margin-top: 0.5rem;
        background: #f8f9fa;
        border-radius: 6px;
        font-size: 0.9rem;
    }
    
    .table-responsive tr.expanded td.secondary-info:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #495057;
        margin-right: 0.5rem;
    }
    
    /* Hide the default label column */
    .table-responsive td:before {
        display: none;
    }
    
    /* Expand/Collapse button */
    .table-responsive .card-expand-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: #0d6efd;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 999;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    }
    
    .table-responsive .card-expand-btn:hover {
        background: #0b5ed7;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
    }
    
    .table-responsive .card-expand-btn i {
        font-size: 1.1rem;
        color: white;
        transition: transform 0.3s ease;
        pointer-events: none;
    }
    
    .table-responsive tr.expanded .card-expand-btn i {
        transform: rotate(180deg);
    }
    
    /* Smooth transitions for expanding */
    .table-responsive td.secondary-info {
        transition: all 0.3s ease;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    
    .table-responsive tr.expanded td.secondary-info {
        opacity: 1;
        max-height: 200px;
    }
    
    /* Action buttons styling */
    .table-responsive td[data-label="Actions"] .btn-group {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .table-responsive td[data-label="Actions"] .btn {
        flex: 0 0 auto;
    }
    
    /* Make sure action buttons display properly */
    .table-responsive td .btn-group {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .table-responsive td .btn-group .btn {
        flex: 0 0 auto;
    }
    
    /* Badges and status elements */
    .table-responsive td .badge {
        display: inline-block;
    }
    
    /* Links in mobile view */
    .table-responsive td a {
        word-break: break-word;
    }
    
    /* Images in cards */
    .table-responsive td img {
        max-width: 60px;
        height: auto;
    }
    
    /* Remove striping on mobile since it's card-based */
    .table-striped tbody tr:nth-of-type(odd) {
        background-color: white;
    }
    
    /* Hide elements marked as hide-mobile but keep their space in desktop */
    .table-responsive .hide-mobile {
        display: none !important;
    }
    
    .table-responsive .hide-tablet {
        display: flex !important;
    }
    
    /* Currency and numeric values */
    .table-responsive td.currency,
    .table-responsive td.low-stock {
        font-weight: 600;
        color: #28a745;
    }
    
    .table-responsive td.low-stock {
        color: #ffc107;
    }
    
    /* ==================================
       GENERIC RESPONSIVE TABLE STYLES
       Minimal, clean card-based layout for mobile
       =================================== */
    
    /* Ensure container fills width */
    .table-responsive {
        width: 100%;
        overflow-x: visible;
        padding: 0.25rem 0;
    }
    
    /* Hide table headers */
    .table-responsive table:not(.product-cards-table) thead {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    /* Reset table structure */
    .table-responsive table:not(.product-cards-table),
    .table-responsive table:not(.product-cards-table) tbody {
        display: block;
        width: 100%;
    }
    
    /* Each row becomes a clean minimal card */
    .table-responsive table:not(.product-cards-table) tbody tr {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        margin-bottom: 1rem;
        border: 1px solid #e8e8e8;
        border-radius: 0.75rem;
        background: #ffffff;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
        transition: all 0.25s ease;
        padding: 1rem;
        gap: 0.75rem 1.25rem;
    }
    
    /* Override Bootstrap table hover variable */
    .table-responsive table:not(.product-cards-table) {
        --bs-table-hover-bg: transparent;
        --bs-table-hover-color: inherit;
    }
    
    .table-responsive table:not(.product-cards-table) tbody tr:hover {
        border-color: #0d6efd;
        background-color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
        transform: translateY(-2px);
    }
    
    .table-responsive table:not(.product-cards-table) tbody tr:hover td {
        background-color: white !important;
    }
    
    /* Remove all other hover effects */
    .table-responsive table:not(.product-cards-table) a:hover {
        background-color: transparent !important;
    }
    
    .table-responsive table:not(.product-cards-table) td:hover {
        background-color: white !important;
    }
    
    /* Remove Bootstrap's table-hover class effect */
    .table-responsive table.table-hover:not(.product-cards-table) tbody tr:hover,
    .table-responsive table.table-hover:not(.product-cards-table) tbody tr:hover > * {
        background-color: white !important;
        --bs-table-bg-state: white;
        --bs-table-bg-type: white;
    }
    
    /* All cells as flex for perfect alignment with icons */
    .table-responsive table:not(.product-cards-table) td {
        display: flex !important;
        align-items: center;
        text-align: left !important;
        padding: 0.375rem 0 !important;
        border: none !important;
        background: transparent !important;
        box-sizing: border-box;
        flex: 0 0 auto;
        min-width: fit-content;
        font-size: 0.9375rem;
        line-height: 1.5;
    }
    
    /* First cell (Name/Title) - Full width header */
    .table-responsive table:not(.product-cards-table) td:first-child {
        flex: 1 1 100%;
        font-size: 1.125rem;
        font-weight: 600;
        color: #1a1a1a !important;
        padding: 0 0 0.875rem 0 !important;
        border-bottom: 2px solid #f5f5f5 !important;
        margin-bottom: 0.625rem;
        letter-spacing: -0.01em;
    }
    
    .table-responsive table:not(.product-cards-table) td:last-child {
        border-bottom: none !important;
    }
    
    /* Icon before each row (using Font Awesome) - No default icon */
    .table-responsive table:not(.product-cards-table) td[data-label]:not([data-label=""])::before {
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        color: #8b92a8;
        font-size: 0.875rem;
        text-align: center;
        width: 20px;
        display: inline-block;
        margin-right: 0.625rem;
        flex-shrink: 0;
        opacity: 0.9;
    }
    
    /* Specific icons for common fields */
    .table-responsive table:not(.product-cards-table) td[data-label*="Phone"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="phone"]::before {
        content: "\f095"; /* phone icon */
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label*="Email"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="email"]::before {
        content: "\f0e0"; /* envelope icon */
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label*="Address"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="address"]::before {
        content: "\f3c5"; /* map-marker icon */
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label*="Role"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="role"]::before {
        content: "\f0c0"; /* users icon */
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label*="Contact"]::before {
        content: "\f2bb"; /* address-card icon */
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label*="Person"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="person"]::before {
        content: "\f007"; /* user icon */
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label*="Date"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="Created"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="Login"]::before {
        content: "\f133"; /* calendar icon */
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label*="Description"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="description"]::before {
        content: "\f036"; /* align-left icon */
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label*="Products"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="Activities"]::before {
        content: "\f291"; /* shopping-basket icon */
    }
    
    /* Value container - only stretch text content, not badges or buttons */
    .table-responsive table:not(.product-cards-table) td > span:not(.badge),
    .table-responsive table:not(.product-cards-table) td > div:not(.btn-group):not(.d-flex) {
        flex: 1;
    }
    
    /* Keep badges and button groups compact */
    .table-responsive table:not(.product-cards-table) td .badge,
    .table-responsive table:not(.product-cards-table) td .btn-group,
    .table-responsive table:not(.product-cards-table) td .btn {
        flex: 0 0 auto;
    }
    
    .table-responsive table:not(.product-cards-table) td:first-child::before {
        color: #0d6efd;
        font-size: 1.125rem;
        opacity: 1;
    }
    
    /* Icon for first cell based on context */
    .table-responsive table:not(.product-cards-table) td[data-label*="User"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="Name"]::before,
    .table-responsive table:not(.product-cards-table) td[data-label*="Category"]::before {
        content: "\f2bd"; /* user-circle icon */
    }
    
    .table-responsive table:not(.product-cards-table) td:first-child * {
        color: #1a1a1a !important;
    }
    
    .table-responsive table:not(.product-cards-table) td:first-child .text-muted,
    .table-responsive table:not(.product-cards-table) td:first-child small {
        color: #6c757d !important;
        margin-top: 0.25rem;
        font-size: 0.8125rem;
        font-weight: 400;
        opacity: 0.85;
    }
    
    /* Actions column - full width at bottom */
    .table-responsive table:not(.product-cards-table) td[data-label="Actions"] {
        flex: 1 1 100%;
        padding: 0.875rem 0 0 0 !important;
        border-top: 2px solid #f5f5f5 !important;
        margin-top: 0.625rem;
        justify-content: flex-end;
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label="Actions"]::before {
        display: none;
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label="Actions"] .btn-group {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label="Actions"] .btn {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }
    
    .table-responsive table:not(.product-cards-table) td[data-label="Actions"] .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
    
    /* Status and other badges - inline in the flow */
    .table-responsive table:not(.product-cards-table) td[data-label*="Status"] {
        flex: 0 0 auto;
    }
    
    /* Badges - keep inline */
    .table-responsive table:not(.product-cards-table) td .badge {
        display: inline-block;
        flex: 0 0 auto;
        width: auto !important;
        padding: 0.375rem 0.75rem;
        font-weight: 500;
        font-size: 0.8125rem;
        letter-spacing: 0.01em;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }
    
    /* Status cell - keep badge inline */
    .table-responsive table:not(.product-cards-table) td[data-label*="Status"] {
        justify-content: flex-start;
    }
    
    /* User profile with avatar */
    .table-responsive table:not(.product-cards-table) td .d-flex.align-items-center {
        display: flex !important;
        align-items: center;
        gap: 0.75rem;
    }
    
    .table-responsive table:not(.product-cards-table) .avatar-sm {
        width: 45px;
        height: 45px;
        flex-shrink: 0;
    }
    
    .table-responsive table:not(.product-cards-table) .avatar-img,
    .table-responsive table:not(.product-cards-table) .avatar-placeholder {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        object-fit: cover;
    }
    
    .table-responsive table:not(.product-cards-table) .avatar-placeholder {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #e9ecef;
        color: #495057;
        font-weight: 600;
        font-size: 0.9rem;
    }
    
    /* Text content styling */
    .table-responsive table:not(.product-cards-table) td .fw-bold,
    .table-responsive table:not(.product-cards-table) td strong {
        display: block;
        line-height: 1.4;
    }
    
    .table-responsive table:not(.product-cards-table) td small,
    .table-responsive table:not(.product-cards-table) td .text-muted {
        display: block;
        margin-top: 0.25rem;
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Links styling */
    .table-responsive table:not(.product-cards-table) td a {
        color: #0d6efd;
        text-decoration: none;
        word-break: break-word;
    }
    
    .table-responsive table:not(.product-cards-table) td a:hover {
        text-decoration: underline;
    }
    
    /* Icons in content */
    .table-responsive table:not(.product-cards-table) td i.fas:not(.fa-edit):not(.fa-eye):not(.fa-trash):not(.fa-times):not(.fa-check-circle):not(.fa-times-circle),
    .table-responsive table:not(.product-cards-table) td i.fab {
        margin-right: 0.5rem;
        color: #6c757d;
    }
    
    /* Hide less important info on very small screens */
    @media (max-width: 576px) {
        .table-responsive table:not(.product-cards-table) td[data-label="Created"],
        .table-responsive table:not(.product-cards-table) td[data-label="Last Login"],
        .table-responsive table:not(.product-cards-table) td[data-label="Activities"],
        .table-responsive table:not(.product-cards-table) .hide-mobile {
            display: none !important;
        }
    }
    
    /* Remove table-specific customizations - keep it generic and minimal */
}

/* Sidebar Mobile and Tablet Styles - Auto-collapse on non-desktop (up to 1199px) */
@media (max-width: 1199px) {
    .sidebar {
        position: fixed !important;
        top: 0;
        left: -100%;
        width: 250px;
        height: 100vh;
        z-index: 1045;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .btn-close-sidebar {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(255,255,255,0.1);
        border: none;
        color: white;
        padding: 8px 12px;
        border-radius: 5px;
        cursor: pointer;
        z-index: 10;
    }
    
    .btn-close-sidebar:hover {
        background: rgba(255,255,255,0.2);
    }
    
    /* Main content full width when sidebar is collapsed */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem !important;
    }
    
    /* Top bar responsive */
    .top-bar {
        flex-direction: row !important;
        gap: 1rem;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .profile-dropdown {
        margin-left: auto !important;
    }
    
    /* Stats cards responsive - Keep layout intact */
    .stats-card .d-flex {
        flex-direction: row !important;
        justify-content: space-between !important;
    }
    
    .stats-card .stats-content {
        flex: 1;
    }
    
    .stats-card .stats-icon {
        flex-shrink: 0;
        align-self: center !important;
    }
    
    .stats-card h3 {
        font-size: 1.75rem !important;
    }
    
    .stats-card .stats-icon i {
        font-size: 2rem !important;
    }
    
    /* Tables responsive */
    .table {
        font-size: 0.875rem;
        min-width: 100%;
    }
    
    /* Buttons responsive */
    .btn-group-sm > .btn, .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Cards responsive */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Modal responsive */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* Forms responsive */
    .form-group, .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    /* Dashboard header */
    .d-flex.justify-content-between {
        flex-direction: row !important;
        gap: 1rem;
    }
    
    /* Notification dropdown */
    .notification-dropdown {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
}

/* Tablet Specific Styles (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .stats-card h3 {
        font-size: 2rem !important;
    }
    
    .stats-card .stats-icon i {
        font-size: 2.5rem !important;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    /* Sidebar is still collapsed but slightly wider on larger tablets */
    .sidebar {
        width: 260px;
    }
}

/* Small Mobile Devices (max-width: 576px) */
@media (max-width: 576px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Even smaller stats on very small screens */
    .stats-card h3 {
        font-size: 1.5rem !important;
    }
    
    .stats-card .stats-icon i {
        font-size: 1.75rem !important;
    }
    
    .stats-card .card-title {
        font-size: 0.875rem;
    }
    
    .stats-card small {
        font-size: 0.75rem;
    }
    
    /* Buttons full width on small screens when in groups */
    .d-flex.gap-2 {
        flex-direction: column !important;
    }
    
    .d-flex.gap-2 .btn {
        width: 100%;
    }
    
    /* Action buttons in tables - stack vertically */
    .btn-group {
        display: flex;
        flex-direction: row !important;
        gap: 2px;
    }
    
    .btn-group .btn {
        flex: 1;
        padding: 0.25rem 0.4rem !important;
        font-size: 0.7rem;
    }
    
    /* Hide columns on mobile */
    .table .hide-mobile,
    .hide-mobile {
        display: none !important;
    }
    
    /* Chart container */
    .chart-container {
        height: 250px !important;
    }
}

/* Tablet and Medium Screens (max-width: 768px) */
@media (max-width: 768px) {
    .hide-tablet {
        display: none !important;
    }
    
    /* Text wrapping and breaking */
    .text-wrap {
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .text-break {
        word-break: break-all !important;
    }
}

/* Landscape Mobile (max-height: 500px) */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        padding: 0.5rem !important;
    }
    
    .sidebar-logo-area {
        margin-bottom: 1rem !important;
    }
    
    .nav-link {
        padding: 0.5rem !important;
        font-size: 0.875rem;
    }
}

/* Print Styles Enhancement */
@media print {
    .mobile-menu-toggle,
    .mobile-overlay,
    .btn-close-sidebar {
        display: none !important;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        width: 100% !important;
    }
}

/* ==================================
   GLOBAL SEARCH STYLES
   =================================== */

.global-search {
    position: relative;
}

.global-search .form-control {
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.global-search .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    border-color: #0d6efd;
}

.global-search .input-group-text {
    border-radius: 0.5rem 0 0 0.5rem;
}

.global-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1050;
}

.search-result-item {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.search-result-icon.product {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.search-result-icon.vendor {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.search-result-icon.purchase {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.search-result-icon.invoice {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.8125rem;
    color: #6c757d;
}

.search-result-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.search-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.search-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.search-empty i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.search-category-header {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ==================================
   TOAST NOTIFICATIONS
   =================================== */

.toast {
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 0.5rem;
}

.toast-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 0.75rem 1rem;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.toast-body {
    padding: 0.875rem 1rem;
}

.toast-time {
    color: #6c757d;
    font-size: 0.75rem;
}

/* ==================================
   LOADING OVERLAY
   =================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    backdrop-filter: blur(4px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

.loading-spinner p {
    margin-top: 1rem;
    margin-bottom: 0;
    color: #495057;
    font-weight: 500;
}

/* ==================================
   BUTTON LOADING STATES
   =================================== */

.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    color: inherit;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================================
   SKELETON LOADERS
   =================================== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 0.25rem;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: 0.5rem;
}

/* ==================================
   PHASE 2: BULK OPERATIONS STYLES
   =================================== */

.bulk-action-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-action-count {
    font-size: 1rem;
    font-weight: 500;
}

.bulk-action-count strong {
    font-size: 1.25rem;
    font-weight: 700;
}

.bulk-action-bar .btn {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transition: all 0.2s ease;
}

.bulk-action-bar .btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Checkbox styling */
.product-checkbox,
#selectAll {
    width: 18px;
    height: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-checkbox:hover,
#selectAll:hover {
    transform: scale(1.1);
}

/* Selected row highlighting */
tr:has(.product-checkbox:checked) {
    background-color: rgba(102, 126, 234, 0.08) !important;
}

tr:has(.product-checkbox:checked):hover {
    background-color: rgba(102, 126, 234, 0.12) !important;
}

/* ==================================
   PHASE 2: INLINE EDITING STYLES
   =================================== */

.editable-field {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    position: relative;
    display: inline-block;
    min-width: 60px;
}

.editable-field:hover {
    background-color: #f8f9fa;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.editable-field::after {
    content: "\f304"; /* FontAwesome edit icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #667eea;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.editable-field:hover::after {
    opacity: 0.6;
}

.inline-edit-input {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse animation for successful edit */
@keyframes editSuccess {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(40, 167, 69, 0.2);
    }
}

.edit-success {
    animation: editSuccess 0.6s ease;
}

/* ==================================
   PHASE 2: KEYBOARD SHORTCUTS HELP
   =================================== */

.keyboard-shortcuts-help {
    max-width: 500px;
}

.keyboard-shortcuts-help h5 {
    margin-bottom: 1rem;
    color: #495057;
    font-weight: 600;
}

.keyboard-shortcuts-help table {
    margin-bottom: 0;
}

.keyboard-shortcuts-help td {
    padding: 0.5rem 0.75rem;
    border: none;
}

.keyboard-shortcuts-help td:first-child {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.keyboard-shortcuts-help kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-family: ui-monospace, monospace;
    color: #212529;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0 0.125rem;
}

/* ==================================
   PHASE 2: ENHANCED MOBILE TABLE
   =================================== */

@media (max-width: 991.98px) {
    /* Hide checkbox column on mobile */
    .product-cards-table thead th:first-child,
    .product-cards-table tbody td:first-child {
        display: none;
    }
    
    /* Hide bulk action bar on mobile */
    .bulk-action-bar {
        display: none !important;
    }
    
    /* Adjust editable field hover effect for touch devices */
    .editable-field:hover::after {
        opacity: 1;
    }
}

/* ==================================
   PHASE 2: BUTTON ENHANCEMENTS
   =================================== */

.btn-group .btn {
    transition: all 0.2s ease;
}

.btn-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-group .btn:active {
    transform: translateY(0);
}

/* ==================================
   PHASE 2: ACCESSIBILITY IMPROVEMENTS
   =================================== */

/* Focus styles for keyboard navigation */
.form-check-input:focus,
.btn:focus,
.editable-field:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .editable-field:hover {
        border: 2px solid currentColor;
    }
    
    .bulk-action-bar {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


