/* ============================================
   ROOT VARIABLES (Modern Color Palette)
   ============================================ */
:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-gradient: linear-gradient(135deg, #0d6efd 0%, #6f42c1 100%);
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #212529;
    --gray-100: #f7f8fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --gray-900: #1a1a2e;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-xl: 0 12px 48px rgba(0,0,0,0.16);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.25s ease;
}

/* ============================================
   GLOBAL RESET & BODY
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--gray-100);
    color: var(--dark);
    padding-top: 80px;  /* for fixed navbar */
    line-height: 1.6;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.2rem;
    color: var(--gray-900);
}

/* ============================================
   NAVBAR (Dark Glassmorphism)
   ============================================ */
.navbar {
    background: rgba(26, 26, 46, 0.92) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar .nav-link {
    color: rgba(255,255,255,0.75) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}

.navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
}

/* User display & logout */
#userDisplay {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.btn-outline-light {
    border-color: rgba(255,255,255,0.3);
    color: #fff;
    transition: var(--transition);
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.6);
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */
.card {
    background: #fff;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 2px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--gray-900);
}

.card-body {
    padding: 1.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.35);
    background: var(--primary-gradient);
    filter: brightness(1.05);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.35);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    border: none;
    color: #212529;
}
.btn-danger {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    border: none;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.35);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: var(--gray-900);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    border: none;
    padding: 0.75rem 1rem;
}

.table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background: rgba(13, 110, 253, 0.04);
    transform: scale(1.003);
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* low stock highlight */
.low-stock {
    background: #fff3cd !important;
}
.low-stock td:first-child {
    border-left: 4px solid var(--warning);
}

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    transition: var(--transition);
    background: #fff;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* ============================================
   LOGIN PAGE SPECIFIC
   ============================================ */
.card.shadow {
    border-radius: var(--radius);
}

.card-header.bg-primary {
    background: var(--primary-gradient) !important;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1.5rem;
}

.card-header h4 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ============================================
   DASHBOARD CHARTS
   ============================================ */
.chart-container {
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    height: 300px;
}

/* ============================================
   MISC UTILITIES
   ============================================ */
.badge {
    font-weight: 500;
    padding: 0.35rem 0.7rem;
    border-radius: 50px;
}

pre {
    background: var(--gray-100);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    max-height: 120px;
    overflow: auto;
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    .navbar-brand {
        font-size: 1.2rem;
    }
    .card-body {
        padding: 1rem;
    }
    .table-responsive {
        border-radius: var(--radius);
    }
    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}
.stat-card {
    border: none;
    background: #fff;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-card .card-body {
    padding: 1.5rem 1rem;
}
.stat-card h2 {
    font-weight: 700;
}/* ===== RECEIPT STYLES ===== */
#receiptContainer {
    font-family: 'Courier New', monospace;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #333;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.receipt-header img {
    max-width: 120px;
    height: auto;
    margin-bottom: 5px;
}
.receipt-header h3 {
    margin: 5px 0;
    font-weight: bold;
}
.receipt-details {
    font-size: 14px;
    margin-bottom: 10px;
}
.receipt-details .row {
    margin-bottom: 4px;
}
.receipt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.receipt-table th, .receipt-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
}
.receipt-table th {
    background: #f2f2f2;
    text-align: left;
}
.receipt-totals {
    margin-top: 10px;
    text-align: right;
    font-size: 16px;
}
.receipt-totals .total {
    font-size: 20px;
    font-weight: bold;
}
.paid-stamp {
    border: 3px solid #28a745;
    color: #28a745;
    padding: 8px 20px;
    display: inline-block;
    font-weight: bold;
    font-size: 24px;
    transform: rotate(-15deg);
    margin-top: 10px;
    border-radius: 4px;
}
.receipt-footer {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 15px;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
}
/* ===== RECEIPT STYLES ===== */
#receiptContainer {
    font-family: 'Courier New', monospace;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #333;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.receipt-header img {
    max-width: 120px;
    height: auto;
    margin-bottom: 5px;
}
.receipt-header h3 {
    margin: 5px 0;
    font-weight: bold;
}
.receipt-details {
    font-size: 14px;
    margin-bottom: 10px;
}
.receipt-details .row {
    margin-bottom: 4px;
}
.receipt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.receipt-table th, .receipt-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
}
.receipt-table th {
    background: #f2f2f2;
    text-align: left;
}
.receipt-totals {
    margin-top: 10px;
    text-align: right;
    font-size: 16px;
}
.receipt-totals .total {
    font-size: 20px;
    font-weight: bold;
}
.paid-stamp {
    border: 3px solid #28a745;
    color: #28a745;
    padding: 8px 20px;
    display: inline-block;
    font-weight: bold;
    font-size: 24px;
    transform: rotate(-15deg);
    margin-top: 10px;
    border-radius: 4px;
}
.receipt-footer {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 15px;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
}
:root {
  --bg-body: #f8f9fa;
  --bg-card: #fff;
  --text-color: #212529;
  --border-color: #e9ecef;
}
body.dark-mode {
  --bg-body: #1a1a2e;
  --bg-card: #2d2d44;
  --text-color: #e8e8e8;
  --border-color: #3d3d5c;
}
body {
  background: var(--bg-body);
  color: var(--text-color);
}
.card {
  background: var(--bg-card);
  border-color: var(--border-color);
}
/* ... override other elements as needed */