/* ========================================================
   MEATDISTRIBUTOR PRO - MASTER STYLESHEET (VANILLA CSS)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Theme Palette */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: #1e293b;
  --bg-sidebar-active: #dc2626;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;

  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Semantic Colors */
  --primary: #dc2626;
  --primary-hover: #b91c1c;
  --primary-light: #fef2f2;
  --primary-border: #fecaca;

  --emerald: #059669;
  --emerald-light: #ecfdf5;
  --emerald-border: #a7f3d0;

  --blue: #2563eb;
  --blue-light: #eff6ff;
  --blue-border: #bfdbfe;

  --amber: #d97706;
  --amber-light: #fffbeb;
  --amber-border: #fde68a;

  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --purple-border: #ddd6fe;

  --rose: #e11d48;
  --rose-light: #fff1f2;
  --rose-border: #fecdd3;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout App Structure */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 50;
  transition: width var(--transition-normal);
}

.sidebar-brand {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.sidebar-brand:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.sidebar-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212, 175, 55, 0.7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
  background: #080d1a;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.sidebar-brand:hover .sidebar-brand-logo {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 10px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.08em;
  padding: 12px 12px 6px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  font-weight: 500;
  font-size: 13.5px;
  transition: all var(--transition-fast);
}

.nav-item:hover {
  background-color: var(--bg-sidebar-hover);
  color: #ffffff;
  transform: translateX(2px);
}

.nav-item.active {
  background-color: var(--bg-sidebar-active);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  display: inline-flex;
  justify-content: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.2);
}

.hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.hub-indicator {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

/* Top Navbar */
.top-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  width: 320px;
}

.header-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text-main);
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Page Content Container */
.content-body {
  padding: 32px;
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

/* Page Headers */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title-group h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.page-title-group p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1.2;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-success {
  background-color: var(--emerald);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #047857;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-danger {
  background-color: var(--rose);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #be123c;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* Cards & Containers */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background-color: #ffffff;
}

.card-header h2, .card-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.card-body {
  padding: 24px;
}

/* Stat Cards (KPIs) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.kpi-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.kpi-icon.sales { background: var(--emerald-light); color: var(--emerald); }
.kpi-icon.purchases { background: var(--blue-light); color: var(--blue); }
.kpi-icon.expenses { background: var(--amber-light); color: var(--amber); }
.kpi-icon.waste { background: var(--rose-light); color: var(--rose); }
.kpi-icon.payroll { background: var(--purple-light); color: var(--purple); }
.kpi-icon.profit { background: linear-gradient(135deg, #059669, #10b981); color: #ffffff; }

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.kpi-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
}

.badge-success { background-color: var(--emerald-light); color: var(--emerald); border: 1px solid var(--emerald-border); }
.badge-danger { background-color: var(--rose-light); color: var(--rose); border: 1px solid var(--rose-border); }
.badge-warning { background-color: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.badge-info { background-color: var(--blue-light); color: var(--blue); border: 1px solid var(--blue-border); }
.badge-purple { background-color: var(--purple-light); color: var(--purple); border: 1px solid var(--purple-border); }
.badge-neutral { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* ========================================================
   PAGINATION (MODERN VANILLA STYLING FOR LARAVEL PAGINATION)
   ======================================================== */
nav[role="navigation"],
nav.d-flex,
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 4px 10px 4px;
  margin-top: 10px;
  width: 100%;
}

/* Showing text info */
nav[role="navigation"] p,
nav.d-flex p,
.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

nav[role="navigation"] p span,
nav.d-flex p span {
  font-weight: 700;
  color: var(--text-main);
}

/* List & Links */
.pagination {
  display: inline-flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 5px;
  flex-wrap: wrap;
}

.pagination .page-item {
  display: inline-block;
}

.pagination .page-link,
nav[role="navigation"] a,
nav[role="navigation"] span[aria-current="page"] span,
nav[role="navigation"] span[aria-disabled="true"] span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  line-height: 1;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.pagination .page-link:hover,
nav[role="navigation"] a:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--primary);
}

/* Active page */
.pagination .page-item.active .page-link,
nav[role="navigation"] span[aria-current="page"] span {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.25);
  cursor: default;
}

/* Disabled page */
.pagination .page-item.disabled .page-link,
nav[role="navigation"] span[aria-disabled="true"] span {
  color: var(--text-light);
  background-color: #f8fafc;
  border-color: var(--border-light);
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
  pointer-events: none;
}

/* Universal safety constraint for any SVG inside pagination (kills giant arrows) */
nav svg,
.pagination svg,
nav[role="navigation"] svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  flex-shrink: 0;
}

/* Bootstrap 5 helper classes used by Laravel Paginator */
.d-flex { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-items-center { justify-items: center !important; }
.align-items-center { align-items: center !important; }
.flex-fill { flex: 1 1 auto !important; }
.text-muted { color: var(--text-muted) !important; }
.small { font-size: 13px !important; }
.fw-semibold { font-weight: 600 !important; color: var(--text-main) !important; }

/* Responsive toggles for pagination */
@media (max-width: 768px) {
  .d-sm-none { display: flex !important; width: 100%; justify-content: space-between; }
  .d-sm-flex { display: none !important; }
  .sm\:hidden { display: flex !important; width: 100%; justify-content: space-between; }
  .sm\:flex { display: none !important; }
  nav[role="navigation"] .hidden { display: none !important; }
}
@media (min-width: 769px) {
  .d-sm-none { display: none !important; }
  .d-none { display: none; }
  .d-sm-flex { display: flex !important; align-items: center; justify-content: space-between; width: 100%; }
  .sm\:hidden { display: none !important; }
  .sm\:flex { display: flex !important; align-items: center; justify-content: space-between; width: 100%; }
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  font-size: 13.5px;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

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

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
}

.alert-success {
  background-color: var(--emerald-light);
  color: #065f46;
  border: 1px solid var(--emerald-border);
}

.alert-danger {
  background-color: var(--rose-light);
  color: #9f1239;
  border: 1px solid var(--rose-border);
}

/* Dynamic Item Row Repeater for Purchases, Distributions, Sales */
.repeater-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.repeater-table th {
  padding: 10px 14px;
  background-color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  border: 1px solid var(--border-color);
}

.repeater-table td {
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
}

/* Voucher & Invoice Print Styles */
.printable-voucher {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 850px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.voucher-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.voucher-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

.voucher-summary {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.summary-box {
  width: 320px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13.5px;
}

.summary-row.total {
  background-color: #0f172a;
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  border: none;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background-color: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Responsive */
@media screen and (max-width: 1024px) {
  .sidebar {
    width: 72px;
  }
  .sidebar .brand-info, .sidebar .nav-item span, .sidebar .nav-section-title, .sidebar-footer {
    display: none;
  }
  .sidebar .nav-item {
    justify-content: center;
    padding: 12px;
  }
  .content-body {
    padding: 20px;
  }
}

/* ========================================================
   iOS MOBILE-FRIENDLY UI & OWNER LAUNCHER (APPLE HIG)
   ======================================================== */

/* Safe Area Inset & Mobile Viewport Support */
:root {
  --ios-safe-bottom: env(safe-area-inset-bottom, 16px);
  --ios-safe-top: env(safe-area-inset-top, 0px);
  --ios-card-radius: 20px;
  --ios-btn-radius: 14px;
}

/* Hide desktop sidebar & top header on mobile */
@media screen and (max-width: 768px) {
  body {
    background-color: #f8fafc;
    padding-bottom: calc(75px + var(--ios-safe-bottom));
  }
  .top-header {
    display: none !important;
  }
  .main-wrapper {
    width: 100% !important;
    min-width: 100% !important;
  }
  .content-body {
    padding: 14px 16px calc(20px + var(--ios-safe-bottom)) 16px !important;
    max-width: 100% !important;
  }
  .page-header {
    display: none !important;
  }
  /* Single column layout for KPI cards */
  .kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  /* Hide desktop-only tables and charts on mobile */
  .desktop-only {
    display: none !important;
  }
}

/* iOS Top Bar (Visible on Mobile) */
.ios-mobile-topbar {
  display: none;
}
@media screen and (max-width: 768px) {
  .ios-mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  }
}

/* Hamburger Button & Drawer */
.ios-hamburger-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #0f172a;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease, background 0.15s ease;
}

.ios-hamburger-btn:active {
  transform: scale(0.92);
  background: #e2e8f0;
}

.ios-drawer-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 98;
}

@media screen and (max-width: 768px) {
  .sidebar {
    display: flex !important;
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px !important;
    height: 100vh !important;
    z-index: 99 !important;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .ios-drawer-backdrop.active {
    display: block;
  }
  .sidebar .brand-info, .sidebar .nav-item span, .sidebar .nav-section-title, .sidebar-footer {
    display: flex !important;
  }
  .sidebar .nav-item {
    justify-content: flex-start !important;
    padding: 10px 14px !important;
  }
}

.ios-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.ios-brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(212, 175, 55, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  background: #080d1a;
}

.ios-brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.3);
}

.ios-brand-text h2 {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.ios-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #f1f5f9;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  border: 1px solid #e2e8f0;
}

/* iOS Screen Navigation Header (Sub-screens) */
.ios-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.ios-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #dc2626;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  transition: transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.ios-back-btn:active {
  transform: scale(0.95);
  background: #fee2e2;
}

.ios-screen-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

/* 2-Column iOS Owner Launcher Grid (Icon + Name Below Small Font) */
.ios-owner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.ios-launcher-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 105px;
  padding: 16px 10px;
  background: #ffffff;
  border-radius: var(--ios-card-radius);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  text-decoration: none;
  color: #0f172a;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}

.ios-launcher-btn:active {
  transform: scale(0.94);
  background: #f8fafc;
}

.ios-launcher-btn:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

/* Launcher Icons (Compact & Centered) */
.ios-btn-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 8px;
}

.ios-btn-icon.stock {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.ios-btn-icon.grn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

.ios-btn-icon.distribute {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.3);
}

.ios-btn-icon.sales {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.ios-btn-icon.pos {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}

.pos-launcher-featured {
  background: linear-gradient(145deg, #ffffff, #f0f7ff);
  border: 1.5px solid rgba(59, 130, 246, 0.35);
}

@media (max-width: 640px) {
  .pos-launcher-featured {
    grid-column: span 2;
    flex-direction: row;
    gap: 14px;
    padding: 12px 18px;
    text-align: left;
    min-height: 72px;
  }
  .pos-launcher-featured .ios-btn-icon {
    margin-bottom: 0;
    flex-shrink: 0;
  }
}

@media (min-width: 768px) {
  .ios-owner-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.ios-btn-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.ios-btn-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: -0.01em;
}

/* Central HUB Status Banner (iPhone Dashboard) */
.ios-hub-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-radius: var(--ios-card-radius);
  color: #ffffff;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(49, 46, 129, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  gap: 12px;
}

.ios-hub-status-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ios-hub-icon-bubble {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #a5b4fc;
  flex-shrink: 0;
}

.ios-hub-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #c7d2fe;
  text-transform: uppercase;
}

.ios-hub-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-top: 1px;
}

.ios-hub-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: #3b82f6;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.ios-hub-quick-btn:active {
  transform: scale(0.95);
  background: #2563eb;
}

/* Floating iOS Bottom Tab Bar */
.ios-tab-bar {
  display: none;
}

@media screen and (max-width: 768px) {
  .ios-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    padding: 8px 12px calc(8px + var(--ios-safe-bottom)) 12px;
    z-index: 70;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
  }
}

.ios-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 10px;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  flex: 1;
}

.ios-tab-item i {
  font-size: 18px;
  transition: transform 0.15s ease;
}

.ios-tab-item:active {
  transform: scale(0.92);
}

.ios-tab-item.active {
  color: #dc2626;
  font-weight: 700;
}

.ios-tab-item.active i {
  transform: scale(1.1);
  color: #dc2626;
}

/* iOS Cards for Shop Stock and Sales */
.ios-shop-card {
  background: #ffffff;
  border-radius: var(--ios-card-radius);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.ios-shop-card-header {
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ios-shop-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.ios-shop-pill {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
}

.ios-shop-pill.hub {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.ios-shop-pill.branch {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.ios-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
}

.ios-item-row:last-child {
  border-bottom: none;
}

.ios-item-name {
  font-weight: 600;
  color: #1e293b;
}

.ios-item-qty {
  font-weight: 800;
  font-size: 14.5px;
  color: #0f172a;
}

.ios-item-qty.low {
  color: #dc2626;
  background: #fef2f2;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

/* iOS Big Action Button */
.ios-action-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--ios-btn-radius);
  border: none;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}

.ios-action-button:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

.ios-action-button.blue {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.ios-action-button.purple {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.ios-action-button.green,
.ios-action-button.emerald {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.mobile-only {
  display: none !important;
}

@media screen and (max-width: 768px) {
  .mobile-only {
    display: flex !important;
  }
}

/* iOS List Group & Mobile List Cards */
.ios-list-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.ios-list-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.ios-list-card:active {
  transform: scale(0.98);
  background: #f8fafc;
}

.ios-list-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ios-list-code {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ios-list-date {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
}

.ios-list-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
}

.ios-list-highlight {
  font-size: 16px;
  font-weight: 800;
}

/* Added Items List (for Modal-driven forms) */
.ios-item-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.ios-item-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  animation: itemSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes itemSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ios-item-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ios-item-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.ios-item-card-meta {
  font-size: 12px;
  color: #64748b;
}

.ios-item-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ios-item-card-weight {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  text-align: right;
}

.ios-empty-state {
  text-align: center;
  padding: 30px 20px;
  color: #94a3b8;
  background: #f8fafc;
  border: 2px dashed #e2e8f0;
  border-radius: 16px;
  margin-bottom: 14px;
}

.ios-empty-state i {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* ========================================================
   GLOBAL PRINT MEDIA STYLES (STRICT FINANCIAL REPORT OUTPUT)
   ======================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm 12mm 12mm;
  }

  *, *:before, *:after {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body, html {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 9pt !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Strict suppression of ALL UI elements, buttons, sidebars, navigations, floating bars */
  .no-print,
  .sidebar,
  .top-header,
  .page-header,
  .ios-mobile-topbar,
  .ios-tab-bar,
  .ios-drawer-backdrop,
  .ios-screen-header,
  .mobile-only,
  .btn,
  button,
  input[type="button"],
  input[type="submit"],
  .alert,
  nav,
  aside,
  header,
  footer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-container,
  .main-wrapper,
  .content-body {
    display: block !important;
    min-height: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  /* Strip card UI containers, drop-shadows, and web card frames */
  .card {
    border: 1px solid #444444 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    page-break-inside: avoid !important;
  }

  .card-header,
  .card-body,
  .card-footer {
    padding: 8px 12px !important;
    border: none !important;
    background: transparent !important;
  }

  .printable-voucher,
  .report-document {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    background: transparent !important;
  }

  /* Formal Report Tables */
  table {
    border-collapse: collapse !important;
    width: 100% !important;
    page-break-inside: avoid !important;
  }

  table th {
    background-color: #f1f5f9 !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
    font-weight: 700 !important;
    font-size: 8.5pt !important;
    padding: 5px 8px !important;
  }

  table td {
    border: 1px solid #444444 !important;
    color: #000000 !important;
    font-size: 8.5pt !important;
    padding: 4px 8px !important;
  }

  .badge {
    border: none !important;
    background: transparent !important;
    color: #000000 !important;
    font-weight: 700 !important;
    padding: 0 !important;
    font-size: 8.5pt !important;
  }
}

/* ==========================================================================
   SUPERMARKET POINT OF SALE (POS) TERMINAL SYSTEM (KEELLS / FOOD CITY STYLE)
   ========================================================================== */
.pos-terminal-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -10px;
}

/* Top Terminal Status Bar */
.pos-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--ios-card-radius);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
  gap: 12px;
  flex-wrap: wrap;
}

.pos-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pos-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-brand-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(212, 175, 55, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  background: #080d1a;
}

.pos-logo {
  font-size: 24px;
}

.pos-brand-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #f8fafc;
  display: block;
  line-height: 1.1;
}

.pos-brand-tag {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pos-shop-selector-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pos-label-sm {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin: 0;
  white-space: nowrap;
}

.pos-shop-badge {
  font-size: 12.5px;
  font-weight: 700;
  color: #38bdf8;
}

.pos-shop-select {
  background: #1e293b !important;
  color: #ffffff !important;
  border: 1px solid #334155 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  height: 28px !important;
  border-radius: 6px !important;
}

.pos-topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pos-invoice-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  padding: 6px 14px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.pos-invoice-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #bfdbfe;
  letter-spacing: 0.05em;
}

.pos-invoice-no {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.pos-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pos-clock-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 5px 10px;
  border-radius: 8px;
}

.pos-cashier-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #f1f5f9;
}

/* Keyboard Shortcuts Strip */
.pos-shortcuts-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 6px;
  -webkit-overflow-scrolling: touch;
}

.pos-sc-chip {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.pos-sc-chip kbd {
  background: #e2e8f0;
  color: #0f172a;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* POS Main Workspace */
.pos-workspace {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  min-height: 600px;
}

@media screen and (max-width: 992px) {
  .pos-workspace {
    grid-template-columns: 1fr;
  }
}

/* Left Panel: Scanner, Bill Table, Totals */
.pos-left-panel {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: var(--ios-card-radius);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.pos-scanner-box {
  padding: 14px 16px 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.pos-scanner-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 4px 6px 4px 12px;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.pos-scanner-icon {
  font-size: 20px;
  color: #3b82f6;
}

.pos-scanner-input {
  border: none !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  padding: 6px 0 !important;
  height: 38px !important;
}

.pos-scanner-input:focus {
  outline: none !important;
}

.pos-scan-btn {
  border-radius: 8px !important;
  font-weight: 800 !important;
  padding: 7px 14px !important;
  font-size: 13px !important;
  white-space: nowrap;
}

.pos-scanner-hint {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.3;
}

/* Bill Table */
.pos-bill-table-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 280px;
  max-height: 380px;
  position: relative;
}

.pos-bill-table {
  width: 100%;
  border-collapse: collapse;
}

.pos-bill-table thead th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  z-index: 10;
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}

.pos-bill-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.pos-cart-row:hover {
  background: #fafafa;
}

.pos-qty-inline {
  width: 75px !important;
  text-align: right !important;
  font-weight: 800 !important;
  font-size: 13.5px !important;
  padding: 4px 6px !important;
  height: 32px !important;
  border-radius: 6px !important;
}

.pos-row-del-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pos-row-del-btn:hover {
  background: #fee2e2;
}

.pos-empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 260px;
  text-align: center;
  padding: 20px;
}

/* Bill Summary & Net Total Card */
.pos-bill-summary-card {
  padding: 14px 18px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

.pos-summary-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #cbd5e1;
}

.pos-summary-sublabel {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.pos-net-payable-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.3);
}

.pos-net-title {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #a7f3d0;
}

.pos-net-amount {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Right Panel: Catalog, Numpad, Payment */
.pos-right-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Category Tabs */
.pos-catalog-header {
  background: #ffffff;
  border-radius: var(--ios-card-radius);
  padding: 8px 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.pos-category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pos-cat-tab {
  background: #f1f5f9;
  border: none;
  color: #475569;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.pos-cat-tab.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* Touch Catalog Grid */
.pos-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.pos-touch-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 70px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

.pos-touch-card:active {
  transform: scale(0.96);
  background: #f0fdf4;
  border-color: #10b981;
}

.pos-touch-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.12);
}

.pos-touch-name {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.pos-touch-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
}

.pos-touch-price {
  font-weight: 800;
  color: #2563eb;
}

.pos-touch-stock {
  font-weight: 600;
  color: #059669;
}

.pos-touch-stock.out {
  color: #dc2626;
  font-weight: 700;
}

/* Checkout Controls & Payment */
.pos-checkout-controls {
  background: #ffffff;
  border-radius: var(--ios-card-radius);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.pos-payment-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.pos-pay-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.pos-pay-btn i {
  font-size: 16px;
}

.pos-pay-btn.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1e40af;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* Cash Tender Box */
.pos-cash-tender-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
}

.pos-quick-cash-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  overflow-x: auto;
}

.pos-cash-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  white-space: nowrap;
}

.pos-cash-chip:active {
  background: #e2e8f0;
}

.pos-tender-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.pos-tender-field label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 3px;
  display: block;
}

.pos-tender-input {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  height: 38px !important;
  border-radius: 8px !important;
}

.pos-change-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  min-height: 48px;
}

.pos-change-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.pos-change-val {
  font-size: 17px;
  font-weight: 900;
  color: #10b981;
}

/* Action Buttons Row */
.pos-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pos-void-btn {
  border-radius: 12px !important;
  font-weight: 800 !important;
  padding: 14px 16px !important;
  color: #ef4444 !important;
  border-color: #fecaca !important;
  background: #fee2e2 !important;
  white-space: nowrap;
}

.pos-complete-btn {
  flex: 1;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.pos-complete-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.pos-complete-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pos-complete-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.pos-complete-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-align: left;
}

.pos-complete-sub {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
  text-align: left;
}

/* POS Floating Toast & Shake Feedback */
@keyframes posShakeAnim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.pos-shake {
  animation: posShakeAnim 0.4s ease-in-out !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;
}

.pos-floating-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-25px);
  background: #f59e0b;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pos-floating-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.pos-btn-disabled {
  opacity: 0.65 !important;
  filter: saturate(60%);
}

/* Golden Fresh Universal Logo & Brand Styling */
.login-logo-img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid rgba(212, 175, 55, 0.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(212, 175, 55, 0.25);
  margin-bottom: 14px;
  display: inline-block;
  background: #060913;
  transition: transform 0.3s ease;
}

.login-logo-img:hover {
  transform: scale(1.04);
}

.voucher-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(212, 175, 55, 0.8);
  display: inline-block;
  vertical-align: middle;
  background: #080d1a;
}
