/* Bytebalok System - Modern CSS Styles */

/* CSS Variables */
:root {
    --primary-color: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #86efac;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --white: #ffffff;
    --black: #000000;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Density Modes */
html.density-compact { font-size: 14px; }
html.density-compact .card-body { padding: 1rem; }
html.density-compact .card-header { padding: 0.875rem 1rem; }
html.density-compact .table th,
html.density-compact .table td { padding: 0.75rem; }
html.density-compact .stat-card { padding: 0.75rem 0.875rem; }
html.density-compact .stat-value { font-size: 1.25rem; }
html.density-compact .main-header { padding: 0.75rem 1rem; }

@media (min-width: 1280px) and (max-width: 1440px) {
    html:not(.density-comfort) { font-size: 15px; }
    html:not(.density-comfort) .card-body { padding: 1.25rem; }
    html:not(.density-comfort) .table th,
    html:not(.density-comfort) .table td { padding: 0.875rem; }
    html:not(.density-comfort) .stat-value { font-size: 1.375rem; }
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    pointer-events: auto;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 3rem 2rem;
    position: relative;
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.login-subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-label i {
    color: var(--gray-400);
    width: 16px;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--white);
    pointer-events: auto;
    cursor: text;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--gray-600);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    align-items: center;
    justify-content: center;
}

.login-footer {
    text-align: center;
    color: var(--gray-400);
    font-size: 0.75rem;
}

/* ========================================
   BACKGROUND DECORATIVE ELEMENTS - IMPROVED UI/UX
   ======================================== */

.login-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Clean, subtle gradient pattern - not distracting */
.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    animation: gentlePulse 15s ease-in-out infinite;
}

/* Smooth, gentle animation - barely noticeable */
@keyframes gentlePulse {
    0%, 100% {
        opacity: 0.08;
        transform: scale(1);
    }
    50% {
        opacity: 0.12;
        transform: scale(1.02);
    }
}

/* System Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--gray-50);
}

.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;                 /* enable vertical scrolling */
    -webkit-overflow-scrolling: touch;/* smooth scroll on iOS */
    overscroll-behavior: contain;     /* avoid scroll chaining */
    scrollbar-gutter: stable;         /* prevent layout shift when scrollbar appears */
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;   /* keep header visible while scrolling */
    top: 0;
    background: var(--white);
    z-index: 1;         /* above sidebar content */
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--gray-800);
}

.sidebar-logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Global logo image styling */
.logo-img {
    height: 24px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

.sidebar-logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

/* Global Mobile Close (X) button styling */
.sidebar-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: transparent;
    border: none;
    color: var(--gray-600);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.sidebar-close:hover { background: var(--gray-100); }
.sidebar-close i { font-size: 1rem; }

/* Global Sidebar overlay to catch outside clicks on mobile/tablet */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 900;
    display: none;
}
.sidebar-overlay.show { display: block; }

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin: 0.25rem 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.nav-link.active {
    background: var(--primary-color);
    color: var(--white);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
}

/* Desktop collapsed sidebar: icon-only mode */
@media (min-width: 1025px) {
    .sidebar.sidebar-collapsed { width: 72px; }
    .sidebar.sidebar-collapsed .sidebar-logo h1 { display: none; }
    .sidebar.sidebar-collapsed .nav-link span { display: none; }
    .sidebar.sidebar-collapsed .sidebar-role-banner { display: none; }
    .sidebar.sidebar-collapsed + .main-content { margin-left: 72px; }
}

.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Header layout helpers */
.main-header .header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.main-header .header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

/* Compact header variant for crowded pages */
.main-header.compact-header {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
}

.main-header.compact-header .header-left { flex: 1; min-width: 0; }
.main-header.compact-header .header-title {
    font-size: 1.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.main-header.compact-header .header-right { gap: 0.5rem; }

/* Unified header icon button styling */
.header-icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    position: relative;
}
.header-icon-btn:hover { background: var(--gray-100); }
.header-icon-btn i { font-size: 16px; }

/* Notification badge positioning */
.header-icon-btn .notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error-color);
    color: var(--white);
    border-radius: 999px;
    padding: 0 6px;
    height: 18px;
    line-height: 18px;
    font-size: 10px;
    box-shadow: var(--shadow);
}

/* Ensure notification badge stays anchored to bell icon */
#notificationsBtn .notification-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    z-index: 2;
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-button:hover {
    background: var(--gray-200);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
}

.content {
    padding: clamp(0.75rem, 1.2vw, 1.25rem);
}

/* Dashboard filter bar */
.filter-bar {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select,
.date-input {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 0.875rem;
    min-width: 180px;
    background: var(--white);
}

.filter-actions .btn-sm {
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

/* Card Header: actions alignment & responsive tweaks */
.card-header .card-actions { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    flex-wrap: wrap; 
}
.card-header .btn-sm { 
    padding: 0.375rem 0.625rem; /* 6px 10px */
}
.card-title i { 
    margin-right: 8px; 
    vertical-align: middle; 
}

@media (max-width: 480px) {
    .card-header { 
        padding: 1rem; 
        gap: 0.5rem; 
    }
    .card-title { 
        font-size: 1rem; 
    }
}

@media (max-width: 360px) {
    .card-header { 
        padding: 0.75rem; 
    }
    .card-title { 
        font-size: 0.95rem; 
    }
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Helpers */
.text-muted {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body.no-padding {
    padding: 0;
}

.col-actions { width: 220px; }

/* Status Tabs (Orders) */
.status-tabs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.status-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-700);
    border-radius: 10px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-tab-btn i { color: var(--gray-600); }
.status-tab-btn:hover { background: #f3f4f6; }
.status-tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.status-tab-btn.active i { color: #fff; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--gray-200);
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1;
}
.badge-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.badge-success { background: var(--success-color); border-color: var(--success-color); color: var(--white); }
.badge-warning { background: var(--warning-color); border-color: var(--warning-color); color: var(--white); }
.badge-danger  { background: var(--error-color);   border-color: var(--error-color);   color: var(--white); }
.badge-info    { background: var(--info-color);    border-color: var(--info-color);    color: var(--white); }
.badge-secondary { background: var(--gray-200); border-color: var(--gray-300); color: var(--gray-800); }

/* Larger badge variant for count indicators */
.badge-lg {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 0.875rem 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    margin: 0;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    line-height: 1.1;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.375rem;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--error-color);
}

/* Colored Stat Card Variants */
.stat-card.stat-primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    border-color: transparent;
}
.stat-card.stat-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-color: transparent;
}
.stat-card.stat-info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border-color: transparent;
}
.stat-card.stat-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border-color: transparent;
}
.stat-card.stat-primary::before,
.stat-card.stat-success::before,
.stat-card.stat-info::before,
.stat-card.stat-warning::before { display: none; }
.stat-card.stat-primary .stat-icon,
.stat-card.stat-success .stat-icon,
.stat-card.stat-info .stat-icon,
.stat-card.stat-warning .stat-icon { background: rgba(255,255,255,0.2); }
.stat-card.stat-primary .stat-value,
.stat-card.stat-success .stat-value,
.stat-card.stat-info .stat-value,
.stat-card.stat-warning .stat-value { color: #fff; }
.stat-card.stat-primary .stat-label,
.stat-card.stat-success .stat-label,
.stat-card.stat-info .stat-label,
.stat-card.stat-warning .stat-label { color: rgba(255,255,255,0.9); }
.stat-card.stat-primary .stat-change,
.stat-card.stat-success .stat-change,
.stat-card.stat-info .stat-change,
.stat-card.stat-warning .stat-change { color: rgba(255,255,255,0.9); }

/* Stat card size variants */
.stat-card--compact { padding: 0.75rem 0.875rem; }
.stat-card--compact .stat-icon { width: 32px; height: 32px; font-size: 0.875rem; }
.stat-card--compact .stat-value { font-size: 1.25rem; }
.stat-card--compact .stat-label { font-size: 0.8125rem; }

.stat-card--regular { padding: 1.25rem; }
.stat-card--regular .stat-icon { width: 40px; height: 40px; font-size: 1.25rem; }
.stat-card--regular .stat-value { font-size: 2rem; }
.stat-card--regular .stat-label { font-size: 0.875rem; }

/* Stats grid wide variant for analytics pages */
.stats-grid--wide { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }

/* Activity List */
.activity-list { display: grid; gap: 12px; }
.activity-item { display: flex; gap: 12px; align-items: flex-start; }
.activity-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-info { background: #e3f2fd; color: #1976d2; }
.activity-success { background: #e8f5e9; color: #388e3c; }
.activity-warning { background: #fff3e0; color: #f57c00; }
.activity-error { background: #ffebee; color: #d32f2f; }
.activity-text { font-size: 14px; color: var(--gray-800); margin-bottom: 4px; }
.activity-time { font-size: 12px; color: var(--gray-500); }

/* List Group */
.list-group { display: grid; gap: 8px; }
.list-group-item { border: 1px solid var(--gray-200); padding: 16px; border-radius: 8px; background: var(--white); }
.list-group-item:hover { background: var(--gray-50); }

/* Product list helpers */
.product-rank { width: 28px; height: 28px; border-radius: 6px; background: var(--gray-100); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; color: var(--gray-700); }
.product-name { font-weight: 600; color: var(--gray-800); }
.product-stats { font-size: 12px; color: var(--gray-600); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-info {
    background: var(--info-color);
    color: var(--white);
}

.btn-warning {
    background: var(--warning-color);
    color: var(--white);
}

.btn-error {
    background: var(--error-color);
    color: var(--white);
}

.btn-danger {
    background: var(--error-color);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
}

/* Generic responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes tablePulse {
    0% { box-shadow: var(--shadow-sm); }
    50% { box-shadow: var(--shadow-md); }
    100% { box-shadow: var(--shadow-sm); }
}
#ordersTable.table-refresh {
    animation: tablePulse 240ms ease-out;
}

.action-buttons .btn {
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.action-buttons .btn:active {
    transform: scale(0.96);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

/* Wide tables: ensure horizontal scroll available for many columns */
.table.table--wide { min-width: 1000px; }

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Toast Notifications */
/* Legacy toast styles - kept for backward compatibility */
.toast-legacy {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: var(--white);
    font-weight: 500;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast-legacy.show {
    transform: translateX(0);
}

.toast-legacy.toast-success {
    background: var(--success-color);
}

.toast-legacy.toast-error {
    background: var(--error-color);
}

.toast-legacy.toast-warning {
    background: var(--warning-color);
}

.toast-legacy.toast-info {
    background: var(--info-color);
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        /* ensure scroll on mobile, including landscape */
        overflow-y: auto;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .main-header {
        padding: 1rem;
    }
    
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem 1rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }

.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
/* ============================================
   CUSTOMERS PAGE ENHANCEMENTS
   ============================================ */

/* Enhanced Modal Styles with Blur Backdrop */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: modalFadeIn 0.3s ease forwards;
}

.modal-dialog {
    width: 90%;
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 1001;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-dialog {
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-height: 90vh;
    overflow-y: auto;
    margin: 2rem;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal.closing {
    animation: modalFadeOut 0.2s ease forwards;
}

.modal.closing .modal-dialog {
    animation: modalSlideDown 0.2s ease forwards;
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modalSlideDown {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
}

/* Add Customer Inline Form */
#addCustomerCard {
    display: none;
    animation: slideDown 0.3s ease;
}

#addCustomerCard .toggle-slider input:checked + .toggle-slider > div {
    transform: translateX(24px);
}

#addCustomerCard .toggle-slider input:checked + .toggle-slider {
    background-color: #10b981;
}

/* Table Actions Dropdown */
.table-actions-dropdown {
    position: relative;
    display: inline-block;
}


.table-actions-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.table-actions-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(22, 163, 74, 0.3);
}

.table-actions-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

.table-actions-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.table-actions-menu-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
    color: #374151;
}

.table-actions-menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.table-actions-menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.table-actions-menu-item:hover {
    background: #f3f4f6;
}

.table-actions-menu-item i {
    width: 16px;
    text-align: center;
}

.table-actions-menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.25rem 0;
}

.table-actions-menu-item.danger:hover {
    background: #fee2e2;
    color: #ef4444;
}

.table-actions-menu-item.info {
    color: #3b82f6;
}

.table-actions-menu-item.warning {
    color: #f59e0b;
}

.table-actions-menu-item.danger {
    color: #ef4444;
}

/* Sticky Table Header */
.table-container {
    position: relative;
}

#customersTable thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(to bottom, #f9fafb 0%, #f3f4f6 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#customersTable thead th {
    background: transparent;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6b7280;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

#customersTable thead th:first-child {
    border-radius: 8px 0 0 0;
}

#customersTable thead th:last-child {
    border-radius: 0 8px 0 0;
}

/* Sticky Search Bar */
.card-header.sticky-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

/* Floating Action Button (FAB) */
.fab-add-customer {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}

.fab-add-customer:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.5);
}

.fab-add-customer:active {
    transform: scale(0.95) rotate(90deg);
}

.fab-add-customer.hide {
    transform: translateY(100px);
    opacity: 0;
}

@media (max-width: 768px) {
    .fab-add-customer {
        display: flex;
    }
    
    #addCustomerBtn {
        display: none !important;
    }
}

/* Toast Notifications - Bottom Right */
#toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 420px;
    min-width: 320px;
}

.toast {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 5px solid;
    position: relative;
    backdrop-filter: blur(10px);
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    border-radius: 14px 0 0 14px;
}

.toast.success {
    border-left-color: #10b981;
    background: linear-gradient(to right, rgba(16, 185, 129, 0.08) 0%, white 15%);
}

.toast.success::before {
    background: linear-gradient(to bottom, #10b981 0%, #059669 100%);
}

.toast.error {
    border-left-color: #ef4444;
    background: linear-gradient(to right, rgba(239, 68, 68, 0.08) 0%, white 15%);
}

.toast.error::before {
    background: linear-gradient(to bottom, #ef4444 0%, #dc2626 100%);
}

.toast.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.08) 0%, white 15%);
}

.toast.warning::before {
    background: linear-gradient(to bottom, #f59e0b 0%, #d97706 100%);
}

.toast.info {
    border-left-color: #3b82f6;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.08) 0%, white 15%);
}

.toast.info::before {
    background: linear-gradient(to bottom, #3b82f6 0%, #2563eb 100%);
}

/* Toast Icon Styling */
.toast-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.toast.success .toast-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.toast.error .toast-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.toast.warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.toast.info .toast-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Toast Content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.125rem;
}

.toast-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    margin: 0;
}

.toast-message {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
}

/* Toast Close Button */
.toast-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: #6b7280;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(0,0,0,0.1);
    color: #374151;
    transform: scale(1.1);
}

.toast-close:active {
    transform: scale(0.95);
}

/* Toast Animations */
@keyframes toastSlideIn {
    from {
        transform: translateX(450px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.toast.removing {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(450px) scale(0.95);
        opacity: 0;
    }
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.2) 100%);
    border-radius: 0 0 14px 14px;
    animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Toast Responsive Design */
@media (max-width: 768px) {
    #toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        min-width: auto;
    }
    
    .toast {
        padding: 1rem 1.25rem;
        border-radius: 12px;
        gap: 0.875rem;
    }
    
    .toast-icon {
        width: 38px;
        height: 38px;
        font-size: 1.125rem;
    }
    
    .toast-title {
        font-size: 0.9375rem;
    }
    
    .toast-message {
        font-size: 0.875rem;
    }
    
    .toast-close {
        width: 26px;
        height: 26px;
        font-size: 1rem;
        top: 0.625rem;
        right: 0.625rem;
    }
}

@media (max-width: 480px) {
    #toast-container {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
    }
    
    .toast {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .toast-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .toast-title {
        font-size: 0.875rem;
    }
    
    .toast-message {
        font-size: 0.8125rem;
    }
}

/* Filter Chips Base Styles */
.filter-chip-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-size: 0.875rem;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg fill='%236b7280' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Filter Chips Hover Effects */
.filter-chip-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.filter-chip-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Smooth Animations - Global */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stat Cards Animations */
.stat-card {
    animation: fadeInUp 0.5s ease both;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Card Animations */
.card {
    animation: fadeInUp 0.5s ease both;
    transition: all 0.3s ease;
}

/* Table Row Animations */
#customersTable tbody tr {
    animation: fadeIn 0.3s ease both;
    transition: all 0.2s ease;
}

#customersTable tbody tr:hover {
    background: #f9fafb;
    transform: scale(1.005);
}

/* Button Hover Effects */
.btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* Input Focus Effects */
.form-control:focus,
.form-select:focus {
    transition: all 0.2s ease;
    box-shadow: 0 0 0 3px rgba(102, 110, 234, 0.1);
}

/* Loading Spinner Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Pulse Animation for Badges */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.status-badge {
    transition: all 0.2s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Page Transition */
.content {
    animation: fadeIn 0.4s ease;
}

/* Skeleton Loading Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Responsive Mobile Card View for Customers */
@media (max-width: 768px) {
    #customersTable {
        display: none;
    }
    
    #customersTable tbody {
        display: block;
    }
    
    .customer-mobile-card {
        background: white;
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        border-left: 4px solid #667eea;
    }
    
    .customer-mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: start;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .customer-mobile-card-title {
        font-weight: 600;
        font-size: 1rem;
        color: #1f2937;
    }
    
    .customer-mobile-card-code {
        font-size: 0.75rem;
        color: #667eea;
        font-weight: 600;
    }
    
    .customer-mobile-card-body {
        display: grid;
        gap: 0.5rem;
        font-size: 0.875rem;
    }
    
    .customer-mobile-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .customer-mobile-card-label {
        color: #6b7280;
        font-weight: 500;
    }
    
    .customer-mobile-card-value {
        color: #374151;
        text-align: right;
        word-break: break-word;
        max-width: 60%;
    }
    
    .customer-mobile-card-actions {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e5e7eb;
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .customer-mobile-card-actions .btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        justify-content: center;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination-controls {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   PRODUCTS PAGE ENHANCEMENTS
   ============================================ */

/* Add Product Inline Form */
#addProductCard {
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#addProductCard .toggle-slider input:checked + .toggle-slider > div {
    transform: translateX(24px);
}

#addProductCard .toggle-slider input:checked + .toggle-slider {
    background-color: #10b981;
}

/* ============================================
   PRODUCTS TABLE
   ============================================ */
.product-row {
    transition: all 0.2s ease;
}

.product-row:hover {
    background-color: #f9fafb !important;
    transform: translateX(2px);
}

.product-row.low-stock-row {
    background-color: #fef2f2;
}

.product-row.low-stock-row:hover {
    background-color: #fee2e2 !important;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.action-buttons .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.product-image-cell {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.product-image-cell:hover {
    transform: scale(1.05);
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

kbd {
    padding: 0.375rem 0.75rem;
    background: linear-gradient(to bottom, #fff, #f0f0f0);
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
    display: inline-block;
    min-width: 2.5rem;
    text-align: center;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

/* Action buttons container for tidy spacing in tables */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .action-buttons {
        flex-direction: column !important;
        gap: 0.25rem !important;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 800px;
    }
    
    .pagination {
        flex-direction: column;
    }
    
    .pagination-controls {
        width: 100%;
        justify-content: center;
    }
}
/* Small bounce animation for newly enabled CTAs */
.cta-bounce { animation: ctaBounce 0.6s ease-out; }
@keyframes ctaBounce {
  0%   { transform: scale(0.98); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
