/* ===== Tullabona School Management System ===== */
/* Design System - Replicating original Tailwind look */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Segoe UI', Tahoma, sans-serif; background: #f5f5f0; color: #3d3d3a; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
:root {
  --primary-50: #eff6ff; --primary-100: #dbeafe; --primary-200: #bfdbfe;
  --primary-300: #93c5fd; --primary-400: #60a5fa; --primary-500: #3b82f6;
  --primary-600: #2563eb; --primary-700: #1d4ed8; --primary-800: #1e40af; --primary-900: #1e3a5f;
  --neutral-50: #fafaf9; --neutral-100: #f5f5f4; --neutral-200: #e7e5e4;
  --neutral-300: #d6d3d1; --neutral-400: #a8a29e; --neutral-500: #78716c;
  --neutral-600: #57534e; --neutral-700: #44403c; --neutral-800: #292524; --neutral-900: #1c1917;
  --success-50: #f0fdf4; --success-100: #dcfce7; --success-200: #bbf7d0;
  --success-500: #22c55e; --success-600: #16a34a; --success-700: #15803d;
  --error-50: #fef2f2; --error-100: #fee2e2; --error-200: #fecaca;
  --error-500: #ef4444; --error-600: #dc2626; --error-700: #b91c1c;
  --warning-50: #fffbeb; --warning-100: #fef3c7; --warning-200: #fde68a;
  --warning-500: #f59e0b; --warning-600: #d97706; --warning-700: #b45309;
  --info-50: #f0f9ff; --info-100: #e0f2fe; --info-200: #bae6fd;
  --info-500: #0ea5e9; --info-600: #0284c7; --info-700: #0369a1;
  --gold-50: #fffbeb; --gold-100: #fef3c7; --gold-200: #fde68a;
  --gold-300: #fcd34d; --gold-500: #eab308; --gold-600: #ca8a04; --gold-700: #a16207;
  --radius: 8px; --radius-lg: 12px; --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --shadow-modal: 0 20px 25px -5px rgba(0,0,0,0.15);
}

/* === Typography === */
.text-title { font-size: 28px; font-weight: 700; line-height: 1.2; }
.text-title-mobile { font-size: 22px; font-weight: 700; }
.text-h2 { font-size: 20px; font-weight: 700; }
.text-h3 { font-size: 18px; font-weight: 600; }
.text-subtitle { font-size: 16px; font-weight: 600; }
.text-body { font-size: 15px; }
.text-body-large { font-size: 17px; }
.text-small { font-size: 13px; }
.text-caption { font-size: 12px; }
@media (max-width: 768px) {
  .text-title { font-size: 22px; }
  .text-h2 { font-size: 18px; }
  .text-subtitle { font-size: 14px; }
}

/* === Layout === */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.p-1 { padding: 4px; } .p-2 { padding: 8px; } .p-3 { padding: 12px; } .p-4 { padding: 16px; } .p-6 { padding: 24px; }
.px-2 { padding-left: 8px; padding-right: 8px; } .px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; } .py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; }
.space-y-2 > * + * { margin-top: 8px; } .space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; } .space-y-6 > * + * { margin-top: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.relative { position: relative; }
.hidden { display: none !important; }

/* === Grid === */
.grid { display: grid; }
.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); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.gap-4 { gap: 16px; } .gap-6 { gap: 24px; }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .md\:hidden { display: none !important; }
  .md\:block { display: block !important; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
  .lg\:block { display: block !important; }
  .lg\:hidden { display: none !important; }
  .lg\:mr-80 { margin-right: 320px; }
  .lg\:mr-64 { margin-right: 256px; }
}

/* === Colors === */
.bg-primary-50 { background: var(--primary-50); } .bg-primary-100 { background: var(--primary-100); }
.bg-primary-500 { background: var(--primary-500); } .bg-primary-600 { background: var(--primary-600); }
.bg-primary-700 { background: var(--primary-700); } .bg-primary-900 { background: var(--primary-900); }
.bg-neutral-50 { background: var(--neutral-50); } .bg-neutral-100 { background: var(--neutral-100); }
.bg-neutral-200 { background: var(--neutral-200); } .bg-neutral-300 { background: var(--neutral-300); }
.bg-success-50 { background: var(--success-50); } .bg-success-100 { background: var(--success-100); }
.bg-error-50 { background: var(--error-50); } .bg-error-100 { background: var(--error-100); }
.bg-warning-50 { background: var(--warning-50); } .bg-warning-100 { background: var(--warning-100); }
.bg-info-50 { background: var(--info-50); } .bg-info-100 { background: var(--info-100); }
.bg-gold-50 { background: var(--gold-50); } .bg-gold-100 { background: var(--gold-100); }
.bg-gold-500 { background: var(--gold-500); }
.bg-white { background: #fff; }
.bg-black { background: #000; }
.bg-opacity-50 { opacity: 0.5; }
.bg-opacity-60 { opacity: 0.6; }
.bg-opacity-75 { opacity: 0.75; }

.text-primary-500 { color: var(--primary-500); } .text-primary-600 { color: var(--primary-600); }
.text-primary-700 { color: var(--primary-700); } .text-primary-900 { color: var(--primary-900); }
.text-neutral-500 { color: var(--neutral-500); } .text-neutral-600 { color: var(--neutral-600); }
.text-neutral-700 { color: var(--neutral-700); }
.text-success-500 { color: var(--success-500); } .text-success-600 { color: var(--success-600); }
.text-success-700 { color: var(--success-700); }
.text-error-500 { color: var(--error-500); } .text-error-600 { color: var(--error-600); }
.text-error-700 { color: var(--error-700); }
.text-warning-500 { color: var(--warning-500); } .text-warning-600 { color: var(--warning-600); }
.text-warning-700 { color: var(--warning-700); }
.text-info-500 { color: var(--info-500); } .text-info-600 { color: var(--info-600); }
.text-info-700 { color: var(--info-700); }
.text-gold-300 { color: var(--gold-300); } .text-gold-500 { color: var(--gold-500); }
.text-gold-600 { color: var(--gold-600); } .text-gold-700 { color: var(--gold-700); }
.text-white { color: #fff; }
.text-black { color: #000; }

.border-primary-200 { border-color: var(--primary-200); }
.border-primary-500 { border-color: var(--primary-500); }
.border-neutral-200 { border-color: var(--neutral-200); }
.border-neutral-300 { border-color: var(--neutral-300); }
.border-success-200 { border-color: var(--success-200); }
.border-error-200 { border-color: var(--error-200); } .border-error-500 { border-color: var(--error-500); }
.border-warning-200 { border-color: var(--warning-200); }
.border-info-200 { border-color: var(--info-200); }

/* === Components === */

/* Card */
.card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--neutral-200);
}
.card-body { padding: 16px; }
.card-body-lg { padding: 24px; }
.card-hover:hover { box-shadow: var(--shadow-md); transition: box-shadow 0.2s; }

/* Button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
  transition: all 0.15s; min-height: 44px;
}
.btn-primary { background: var(--primary-500); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-secondary { background: var(--neutral-100); color: var(--neutral-700); border: 1px solid var(--neutral-200); }
.btn-secondary:hover { background: var(--neutral-200); }
.btn-success { background: var(--success-500); color: #fff; }
.btn-success:hover { background: var(--success-600); }
.btn-error { background: var(--error-500); color: #fff; }
.btn-error:hover { background: var(--error-600); }
.btn-ghost { background: transparent; color: var(--neutral-600); }
.btn-ghost:hover { background: var(--neutral-100); }
.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 36px; }
.btn-lg { padding: 14px 28px; font-size: 16px; min-height: 52px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* Input */
.input-group { display: flex; flex-direction: column; gap: 4px; }
.input-label { font-size: 13px; font-weight: 600; color: var(--neutral-700); }
.input-field {
  width: 100%; padding: 10px 14px; border: 1px solid var(--neutral-200);
  border-radius: var(--radius); background: #fff; font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-field:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.input-field::placeholder { color: var(--neutral-400); }
textarea.input-field { min-height: 80px; resize: vertical; }
select.input-field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23575734e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-left: 36px; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge-primary { background: var(--primary-100); color: var(--primary-700); }
.badge-success { background: var(--success-100); color: var(--success-700); }
.badge-error { background: var(--error-100); color: var(--error-700); }
.badge-warning { background: var(--warning-100); color: var(--warning-700); }
.badge-info { background: var(--info-100); color: var(--info-700); }
.badge-gold { background: var(--gold-100); color: var(--gold-700); }
.badge-neutral { background: var(--neutral-100); color: var(--neutral-600); }

/* Spinner */
.spinner { animation: spin 1s linear infinite; border-radius: 999px; border: 3px solid var(--neutral-200); border-top-color: var(--primary-500); }
.spinner-sm { width: 20px; height: 20px; border-width: 2px; display:inline-block; vertical-align:middle; }
.spinner-md { width: 40px; height: 40px; border-width: 3px; }
.spinner-lg { width: 48px; height: 48px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Disabled button */
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Modal / Overlay */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 16px; overflow-y: auto;
}
.modal-content {
  background: #fff; border-radius: var(--radius-lg);
  max-width: 560px; width: 100%; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-modal);
}

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--neutral-200); }
table { width: 100%; border-collapse: collapse; }
table th {
  background: var(--neutral-100); padding: 12px 16px; font-size: 13px;
  font-weight: 600; color: var(--neutral-600); text-align: right;
  border-bottom: 1px solid var(--neutral-200); white-space: nowrap;
}
table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--neutral-100); }
table tr:last-child td { border-bottom: none; }
table tr:hover { background: var(--neutral-50); }

/* Toggle Switch */
.toggle {
  position: relative; width: 44px; height: 24px; flex-shrink: 0;
  border-radius: 999px; background: var(--neutral-300); cursor: pointer;
  transition: background 0.2s;
}
.toggle.active { background: var(--success-500); }
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 999px; background: #fff;
  transition: transform 0.2s;
}
.toggle.active .toggle-thumb { transform: translateX(-20px); }

/* Progress Bar */
.progress-bar { height: 8px; background: var(--neutral-200); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; transition: width 0.3s; }

/* Tab Navigation */
.tabs { display: flex; gap: 4px; }
.tab {
  padding: 8px 20px; border-radius: var(--radius); font-size: 14px;
  font-weight: 600; color: var(--neutral-600); cursor: pointer;
  transition: all 0.15s;
}
.tab.active { background: var(--primary-500); color: #fff; }
.tab:hover:not(.active) { background: var(--neutral-100); }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; }
.page-btn {
  padding: 8px 14px; border-radius: var(--radius); font-size: 14px;
  color: var(--neutral-600); background: var(--neutral-100);
  transition: all 0.15s;
}
.page-btn:hover { background: var(--neutral-200); }
.page-btn.active { background: var(--primary-500); color: #fff; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Gradient Backgrounds */
.bg-gradient-primary { background: linear-gradient(135deg, var(--primary-900), var(--primary-600)); }
.bg-gradient-primary-right { background: linear-gradient(to left, var(--primary-900), var(--primary-700), var(--primary-500)); }
.bg-gradient-warm { background: linear-gradient(135deg, #fef3c7, #eff6ff, #f5f5f4); }

/* Border styles */
.border { border: 1px solid var(--neutral-200); }
.border-b { border-bottom: 1px solid var(--neutral-200); }
.border-t { border-top: 1px solid var(--neutral-200); }
.border-r-4 { border-right-width: 4px; border-right-style: solid; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 999px; }
.rounded-md { border-radius: 6px; }

/* Utility */
.object-cover { object-fit: cover; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whitespace-nowrap { white-space: nowrap; }
.cursor-pointer { cursor: pointer; }
.transition-all { transition: all 0.2s; }
.transition-shadow { transition: box-shadow 0.2s; }
.sticky { position: sticky; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.z-10 { z-index: 10; } .z-20 { z-index: 20; } .z-30 { z-index: 30; } .z-40 { z-index: 40; } .z-50 { z-index: 50; }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.backdrop-blur { backdrop-filter: blur(4px); }

/* Drag and drop upload zone */
.upload-zone {
  border: 2px dashed var(--neutral-300); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; cursor: pointer;
  transition: border-color 0.2s;
}
.upload-zone:hover { border-color: var(--primary-500); }
.upload-zone.dragover { border-color: var(--primary-500); background: var(--primary-50); }

/* Sidebar */
.sidebar { position: fixed; right: 0; top: 0; height: 100vh; width: 320px; background: var(--primary-900); padding: 24px; box-shadow: var(--shadow-lg); z-index: 50; overflow-y: auto; }
.sidebar-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); color: var(--neutral-300); transition: all 0.15s; }
.sidebar-link:hover { background: var(--primary-700); color: #fff; }
.sidebar-link.active { background: var(--gold-500); color: var(--primary-900); font-weight: 600; }

/* Mobile Header */
.mobile-header { position: fixed; top: 0; left: 0; right: 0; height: 64px; background: var(--primary-900); z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.mobile-header-spacer { height: 64px; }
.mobile-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 90vw; max-width: 320px; background: #fff; z-index: 50; transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto; }
.parent-header-actions { position: relative; display: flex; align-items: center; justify-content: space-between; background: rgba(30, 58, 95, 0.84); backdrop-filter: blur(10px); border-radius: 16px; padding: 12px 16px; margin-bottom: 16px; }
.header-action-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #fff; transition: background 0.2s ease; }
.header-action-btn:hover { background: rgba(255,255,255,0.2); }
.header-action-btn .hdr-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--error-500); color: #fff; font-size: 11px; display: none; align-items: center; justify-content: center; }
.mobile-drawer.open { transform: translateX(0); }
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 40; backdrop-filter: blur(4px); }

/* Bottom Nav (Parent) */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--neutral-200); z-index: 40; display: flex; height: 64px; }
.bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--neutral-600); font-size: 11px; position: relative; }
.bottom-nav-item.active { color: var(--primary-600); }
.bottom-nav-item.active::before { content: ''; position: absolute; top: 0; width: 48px; height: 3px; background: var(--gold-500); border-radius: 0 0 8px 8px; }
.bottom-nav-spacer { height: 64px; }

/* Stat Cards */
.stat-card { text-align: center; padding: 20px; }
.stat-card-icon { width: 48px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.stat-number { font-size: 28px; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--neutral-500); margin-top: 4px; }

/* Photo Grid */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.photo-card { overflow: hidden; }
.photo-card img { width: 100%; height: 200px; object-fit: cover; }

/* Icon sizes */
.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }
.icon-20 { width: 20px; height: 20px; }
.icon-24 { width: 24px; height: 24px; }
.icon-32 { width: 32px; height: 32px; }
.icon-48 { width: 48px; height: 48px; }

/* RTL support */
[dir="rtl"] { direction: rtl; text-align: right; }
[dir="ltr"] { direction: ltr; text-align: left; }
body { direction: rtl; }

/* Toast */
.toast-container { position: fixed; top: 80px; right: 16px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px; border-radius: var(--radius); font-size: 14px;
  box-shadow: var(--shadow-md); animation: slideIn 0.3s ease; max-width: 360px;
}
.toast-success { background: var(--success-500); color: #fff; }
.toast-error { background: var(--error-500); color: #fff; }
.toast-info { background: var(--primary-500); color: #fff; }
@keyframes slideIn { from { transform: translateX(50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Loading container */
.loading-container { display: flex; align-items: center; justify-content: center; min-height: 60vh; flex-direction: column; gap: 16px; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--neutral-400); }
.empty-state-icon { width: 64px; height: 64px; margin: 0 auto 16px; opacity: 0.4; }

/* Touch-friendly */
.touch-target { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

/* Mobile responsive */
@media (max-width: 1023px) {
  .sidebar { display: none; }
  .desktop-only { display: none !important; }
}
@media (min-width: 1024px) {
  .mobile-only { display: none !important; }
}

/* Confirm Dialog */
.confirm-dialog { max-width: 400px; }
.confirm-dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* Filter pills */
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pill {
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--neutral-100); color: var(--neutral-600); cursor: pointer;
  transition: all 0.15s; border: 1px solid var(--neutral-200);
}
.filter-pill.active { background: var(--primary-500); color: #fff; border-color: var(--primary-500); }
.filter-pill:hover:not(.active) { background: var(--neutral-200); }

/* Discount badge */
.discount-badge {
  position: absolute; top: 8px; left: 8px; background: var(--error-500);
  color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; z-index: 10;
}

/* Price display */
.price-original { text-decoration: line-through; color: var(--neutral-400); font-size: 13px; }
.price-final { color: var(--gold-600); font-weight: 700; font-size: 16px; }
.price-final-error { color: var(--error-600); font-weight: 700; }

/* Status indicator */
.status-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.status-dot-success { background: var(--success-500); }
.status-dot-error { background: var(--error-500); }
.status-dot-warning { background: var(--warning-500); }

/* Image container */
.img-container { width: 100%; height: 160px; overflow: hidden; background: var(--neutral-100); border-radius: var(--radius); }
.img-container img { width: 100%; height: 100%; object-fit: cover; }

/* Responsive helpers */
@media (max-width: 639px) {
  .sm\:hidden { display: none !important; }
}
@media (min-width: 640px) {
  .sm\:block { display: block !important; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* PWA & Mobile enhancements */
@supports (padding-top: env(safe-area-inset-top)) {
  .mobile-header { padding-top: env(safe-area-inset-top); height: calc(64px + env(safe-area-inset-top)); }
  .mobile-header-spacer { height: calc(64px + env(safe-area-inset-top)); }
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav-spacer { height: calc(64px + env(safe-area-inset-bottom)); }
}

/* Touch-friendly tap targets */
.btn, .sidebar-link, .bottom-nav-item, .autocomplete-item, .filter-pill, .tab {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Prevent zoom on input focus for iOS */
input, select, textarea { font-size: 16px !important; }

/* Smooth transitions */
.card, .btn { -webkit-font-smoothing: antialiased; }

/* Sticky order button for cart page on mobile */
.sticky-order-btn-container {
  position: fixed;
  bottom: 64px;
  left: 0;
  right: 0;
  z-index: 45;
  background: #fff;
  padding: 12px 16px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  border-top: 1px solid var(--neutral-200);
  display: none;
}

.sticky-order-btn-container.show {
  display: block;
}

@media (min-width: 1024px) {
  .sticky-order-btn-container {
    display: none !important;
  }
}

/* Fix cart bar overlap on mobile */
@media (max-width: 1023px) {
  .bottom-nav + .cart-bar-fix { margin-bottom: 64px; }
}

/* Autocomplete dropdown styles */
.autocomplete-item:hover { background: var(--primary-50); }
.autocomplete-item:active { background: var(--primary-100); }

/* Responsive table scroll on mobile */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 650px; }
@media (max-width: 768px) {
  .table-wrap table { min-width: 550px; }
  .card-body-lg { padding: 8px !important; }
  .stat-card { padding: 10px !important; }
  .stat-number { font-size: 18px !important; }
  .grid.gap-4 { gap: 8px; }
}
body { overflow-x: hidden; width: 100%; }
.cat-scroll::-webkit-scrollbar { height: 6px; }
.cat-scroll::-webkit-scrollbar-track { background: var(--neutral-100); border-radius: 3px; }
.cat-scroll::-webkit-scrollbar-thumb { background: var(--neutral-300); border-radius: 3px; }
.cat-scroll::-webkit-scrollbar-thumb:hover { background: var(--neutral-400); }
img { max-width: 100%; height: auto; }
