/* ====================================================================
   LaptopPOS — Pre-compiled stylesheet
   Navy brand color: #1e3a8a (navy-800), #1e40af (navy-700)
   Fonts: system sans
   ==================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 14px;
  color: #1f2937;
  background: #f9fafb;
  line-height: 1.5;
  min-height: 100vh;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
[x-cloak] { display: none !important; }

/* ========== Brand colors ========== */
.bg-navy-50 { background-color: #eff6ff; }
.bg-navy-100 { background-color: #dbeafe; }
.bg-navy-600 { background-color: #2563eb; }
.bg-navy-700 { background-color: #1d4ed8; }
.bg-navy-800 { background-color: #1e3a8a; }
.bg-navy-900 { background-color: #172554; }
.text-navy-600 { color: #2563eb; }
.text-navy-700 { color: #1d4ed8; }
.text-navy-800 { color: #1e3a8a; }
.border-navy-200 { border-color: #bfdbfe; }
.border-navy-500 { border-color: #3b82f6; }
.hover\:bg-navy-100:hover { background-color: #dbeafe; }
.hover\:text-navy-700:hover { color: #1d4ed8; }
.hover\:text-navy-800:hover { color: #1e3a8a; }
.ring-navy-200:focus { --tw-ring-color: #bfdbfe; }
.focus\:ring-navy-200:focus { box-shadow: 0 0 0 3px #bfdbfe; }
.focus\:border-navy-500:focus { border-color: #3b82f6; }

.from-navy-900 { background-image: linear-gradient(135deg, #172554 0%, #1e3a8a 100%); }
.to-navy-800 { /* handled by gradient above */ }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to)); }
.bg-gradient-to-br.from-navy-900.to-navy-800 {
  background: linear-gradient(135deg, #172554 0%, #1e40af 100%);
}

/* ========== Base colors ========== */
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-900 { background-color: #111827; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-red-50 { background-color: #fef2f2; }
.bg-yellow-50 { background-color: #fffbeb; }
.bg-blue-50 { background-color: #eff6ff; }

.text-white { color: #ffffff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-red-800 { color: #991b1b; }
.text-green-500 { color: #22c55e; }
.text-green-600 { color: #16a34a; }
.text-green-700 { color: #15803d; }
.text-green-800 { color: #166534; }
.text-yellow-700 { color: #a16207; }
.text-yellow-800 { color: #854d0e; }
.text-blue-900 { color: #1e3a8a; }

.border { border-width: 1px; border-style: solid; border-color: #d1d5db; }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: #e5e7eb; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e5e7eb; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-800 { border-color: #1f2937; }
.border-red-500 { border-color: #ef4444; }
.border-green-500 { border-color: #22c55e; }
.border-yellow-500 { border-color: #eab308; }
.border-blue-500 { border-color: #3b82f6; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.rounded-r { border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem; }

/* ========== Layout ========== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

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

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:block { display: block; }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
}

/* ========== Spacing ========== */
.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; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-5 { margin-left: 1.25rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mr-2 { margin-right: 0.5rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* ========== Sizing ========== */
.w-3 { width: 0.75rem; } .h-3 { height: 0.75rem; }
.w-8 { width: 2rem; } .h-8 { height: 2rem; }
.w-12 { width: 3rem; } .h-12 { height: 3rem; }
.w-48 { width: 12rem; }
.w-56 { width: 14rem; }
.w-64 { width: 16rem; }
.w-full { width: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }

/* ========== Typography ========== */
.text-xs { font-size: 0.75rem; line-height: 1.1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.whitespace-nowrap { white-space: nowrap; }
.font-sans { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* ========== Borders / shadows ========== */
.shadow { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow-lg { box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 12px 24px rgba(0,0,0,0.15); }
.cursor-pointer { cursor: pointer; }
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }

/* ========== Position ========== */
.relative { position: relative; }
.absolute { position: absolute; }
.z-50 { z-index: 50; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }

/* ========== Inputs (override for consistency) ========== */
input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: inherit;
  background: #f9fafb;
}
input[type="checkbox"] { width: 14px; height: 14px; accent-color: #1d4ed8; }
input:focus, select:focus, textarea:focus { outline: none; }
.focus\:outline-none:focus { outline: none; }
.focus\:bg-white:focus { background-color: #ffffff; }

/* ========== Buttons ========== */
.btn-primary {
  display: inline-block;
  padding: 10px 16px;
  background-color: #1e40af;
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn-primary:hover { background-color: #1e3a8a; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== Sidebar nav ========== */
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  color: #9ca3af;
  font-size: 13px;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background-color 0.1s;
}
.nav-link:hover { background-color: #1f2937; color: #ffffff; }
.nav-active {
  background-color: #1e3a8a;
  color: #bfdbfe;
  border-left-color: #3b82f6;
  font-weight: 500;
}
.nav-section {
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 16px 5px;
  font-weight: 600;
}
.nav-dot { opacity: 0.7; font-size: 11px; }

/* ========== KPI cards ========== */
.kpi-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 14px 16px;
}
.kpi-label {
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.kpi-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
  color: #111827;
  line-height: 1.2;
}
.kpi-sub {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

/* ========== Panels ========== */
.panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}
.panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-title { font-size: 13px; font-weight: 600; }

/* ========== Tables ========== */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  background: #f9fafb;
  padding: 9px 12px;
  text-align: left;
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}
.tbl td {
  padding: 10px 12px;
  font-size: 12px;
  border-bottom: 1px solid #f3f4f6;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #f9fafb; }
.tbl tr.row-unpaid td {
  background: #fef2f2 !important;
  color: #991b1b;
}
.tbl tr.row-unpaid td strong { color: #dc2626; }
.tbl tr.row-unpaid:hover td { background: #fee2e2 !important; }

/* ========== Badges ========== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-unpaid { background: #fee2e2; color: #991b1b; }
.badge-partial { background: #fef3c7; color: #92400e; }

/* ========== Utility extras ========== */
code {
  font-family: "Courier New", monospace;
  font-size: 12px;
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
}
.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-red-50:hover { background-color: #fef2f2; }
.list-disc { list-style-type: disc; }

/* ========== Session 3 additions ========== */

/* Small action buttons for tables */
.btn-sm {
  display: inline-block;
  padding: 4px 10px;
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.1s;
}
.btn-sm:hover { background-color: #e5e7eb; }

.btn-danger-sm {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
}
.btn-danger-sm:hover { background-color: #fee2e2; }

.btn-ghost {
  display: inline-block;
  padding: 10px 16px;
  background-color: transparent;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost:hover { background-color: #f9fafb; }

.mono { font-family: "Courier New", Menlo, monospace; }

/* Tailwind-ish utilities used in new views */
.object-cover { object-fit: cover; }
.w-10 { width: 2.5rem; }
.h-9 { height: 2.25rem; }
.w-20 { width: 5rem; } .h-20 { height: 5rem; }
.w-32 { width: 8rem; }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.capitalize { text-transform: capitalize; }
.ring-2 { box-shadow: 0 0 0 2px currentColor; }
.ring-offset-2 { outline-offset: 2px; }
.ring-navy-600 { box-shadow: 0 0 0 2px #1e40af; }
.border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; }
.border-navy-600 { border-color: #1e40af; }
.border-transparent { border-color: transparent; }
.-mb-px { margin-bottom: -1px; }
.border-white\/10 { border-color: rgba(255,255,255,0.1); }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.gap-6 { gap: 1.5rem; }
.max-w-4xl { max-width: 56rem; }
.border-l-2 { border-left-width: 2px; border-left-style: solid; }
.space-y-4 > * + * { margin-top: 1rem; }
.rounded { border-radius: 0.25rem; }


/* ========== Session 3 hotfix — store form enhancements ========== */
.border-2 { border-width: 2px; border-style: solid; }
.border-dashed { border-style: dashed; }
.object-contain { object-fit: contain; }
.max-h-40 { max-height: 10rem; }
.cursor-pointer { cursor: pointer; }
.w-12 { width: 3rem; } .h-12 { height: 3rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.text-gray-400 { color: #9ca3af; }
@media (min-width: 768px) {
  .md\:col-span-1 { grid-column: span 1 / span 1; }
  .md\:col-span-3 { grid-column: span 3 / span 3; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ========== Session 3B-1 — Expandable sidebar + Settings layout ========== */

/* Expandable sidebar */
.nav-group {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: none;
  width: 100%;
  padding: 8px 16px;
  font-size: 13px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.nav-group:hover { background-color: rgba(255,255,255,0.06); }
.nav-chevron {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 14px;
  opacity: 0.6;
  line-height: 1;
}
.nav-chevron.rotate-90 { transform: rotate(90deg); }
.nav-sub {
  padding-left: 0;
}
.nav-link-sub {
  padding-left: 40px !important;
  font-size: 12.5px;
}

/* Settings layout helpers */
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.align-start { align-items: flex-start; }
.space-y-0\.5 > * + * { margin-top: 0.125rem; }
.max-w-full { max-width: 100%; }
.max-h-full { max-height: 100%; }
.w-32 { width: 8rem; }
.h-32 { height: 8rem; }
.last\:border-0:last-child { border-bottom-width: 0; }
.pb-4 { padding-bottom: 1rem; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:col-span-1 { grid-column: span 1 / span 1; }
  .md\:col-span-3 { grid-column: span 3 / span 3; }
  .md\:col-span-4 { grid-column: span 4 / span 4; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.badge-stock { background: #dbeafe; color: #1e40af; }

/* ========== Filter banner (session 3B-1a hotfix) ========== */
.bg-yellow-50 { background-color: #fefce8; }
.bg-yellow-200 { background-color: #fef08a; }
.border-yellow-200 { border-color: #fef08a; }
.text-yellow-800 { color: #854d0e; }
.text-yellow-900 { color: #713f12; }
.hover\:text-yellow-900:hover { color: #713f12; }
.underline { text-decoration: underline; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
