:root {
  --app-bg: #F6F8FB;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #0F172A;
  --primary: #2563EB;
  --coffee: #4b2f24;
  --espresso: #241713;
  --dark: #150d0a;
  --cream: #fff7e8;
  --paper: #fffdf8;
  --beige: #e8d3b0;
  --sage: #16A34A;
  --danger: #DC2626;
  --ink: #2a211d;
  --muted: #64748B;
  --line: #eadbc4;
  --shadow: 0 18px 50px rgba(36, 23, 19, .12);
  --shadow-strong: 0 28px 80px rgba(36, 23, 19, .18);
  --page-bg: #F6F8FB;
  --page-bg-secondary: #F6F8FB;
  --sidebar-bg: #2E211B;
  --sidebar-secondary: #3A2A22;
  --sidebar-text: #F8F1E7;
  --sidebar-muted: #CDBEAF;
  --sidebar-active-bg: #CCFBF1;
  --sidebar-active-text: #0F172A;
  --navbar-bg: #FFFDF9;
  --navbar-text: #2D211B;
  --card-bg: #FFFFFF;
  --card-bg-soft: #FAF7F2;
  --card-border: #DED5CA;
  --card-shadow: 0 8px 24px rgba(53, 39, 31, 0.08);
  --text-primary: #2C211B;
  --text-secondary: #6F6259;
  --text-muted: #92857B;
  --accent: #0F766E;
  --accent-hover: #0D5F59;
  --accent-soft: #CCFBF1;
  --input-bg: #FFFFFF;
  --input-border: #E2E8F0;
  --input-text: #2C211B;
  --input-placeholder: #94A3B8;
  --input-focus: #0F766E;
  --table-header-bg: #F9FAFB;
  --table-row-bg: #FFFFFF;
  --table-row-hover: #F0FDFA;
  --table-border: #E2E8F0;
  --dropdown-bg: #FFFFFF;
  --dropdown-text: #2C211B;
  --dropdown-hover: #F3F4F6;
  --dropdown-border: #E2E8F0;
  --success-bg: #DCFCE7;
  --success-text: #16A34A;
  --warning-bg: #FEF3C7;
  --warning-text: #D97706;
  --danger-bg: #FEE2E2;
  --danger-text: #DC2626;
  --info-bg: #CCFBF1;
  --info-text: #0284C7;
  --scrollbar-track: #E2E8F0;
  --scrollbar-thumb: #0F766E;
  --scrollbar-hover: #0D5F59;
  --section-bg: #FAF7F2;
  --hover-bg: #F3F4F6;
  --active-bg: #CCFBF1;
  --text-color: #2C211B;
  --muted-text: #6F6259;
  --border-color: #DED5CA;
  --accent-color: #0F766E;
  --dark-brown: #2D211B;
}

/* Suppliers, purchases, and compact activity filters */
.supplier-summary-grid,
.purchase-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.supplier-filter-bar,
.purchase-filter-bar,
.activity-filter-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px !important;
  align-items: end !important;
  margin: 14px 0 18px !important;
}

.activity-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}

.filter-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
}

.filter-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: -6px 0 16px !important;
}

.supplier-form-card,
.purchase-form-card {
  max-width: 1120px !important;
  margin-inline: auto !important;
}

.supplier-form-grid,
.purchase-form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px !important;
  align-items: start !important;
}

.supplier-wide,
.purchase-wide {
  grid-column: 1 / -1;
}

.supplier-detail-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px !important;
}

.supplier-detail-grid > div {
  display: grid !important;
  gap: 5px !important;
  padding: 12px !important;
  background: #F8FAFC !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px !important;
}

.supplier-detail-grid span {
  color: #6B7280 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.supplier-detail-grid strong {
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  word-break: normal !important;
  overflow-wrap: anywhere;
}

.purchase-lines {
  display: grid !important;
  gap: 10px !important;
  margin-top: 16px !important;
}

.purchase-lines-head,
.purchase-line-row {
  display: grid !important;
  grid-template-columns: minmax(220px, 1.4fr) minmax(76px, .35fr) minmax(70px, .3fr) minmax(110px, .55fr) minmax(110px, .55fr) auto;
  gap: 10px !important;
  align-items: center !important;
}

.purchase-unit {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #374151;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.supplier-material-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.supplier-material-native-select {
  display: none !important;
}

.supplier-material-chip-list {
  align-items: center;
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
}

.supplier-material-chip {
  align-items: center;
  background: #DCFCE7;
  border: 1px solid #BBF7D0;
  border-radius: 999px;
  color: #166534;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  line-height: 1;
  padding: 7px 9px 7px 12px;
}

.supplier-material-chip button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #166534;
  cursor: pointer;
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  height: 16px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 16px;
}

.supplier-existing-material-panel {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  margin-top: 12px;
  padding: 14px;
}

.supplier-existing-material-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.supplier-existing-material-list label {
  align-items: center;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  padding: 9px 10px;
}

.supplier-existing-material-list input[type="checkbox"] {
  height: 16px !important;
  min-width: 16px;
  width: 16px !important;
}

.supplier-raw-material-panel {
  margin-top: 16px;
  padding: 16px;
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
}

.supplier-raw-material-panel .section-head {
  margin-bottom: 12px;
}

.supplier-name-only-grid {
  grid-template-columns: minmax(240px, 420px) !important;
}


.purchase-lines-head {
  color: #6B7280 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

.purchase-line-row {
  padding: 10px !important;
  background: #F8FAFC !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px !important;
}

.purchase-material-select {
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  color: #111827 !important;
  cursor: pointer !important;
  display: block !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
  width: 100% !important;
}

.purchase-status-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.statement-table td,
.supplier-table td,
.purchase-table td {
  white-space: nowrap !important;
}

.purchase-table .purchase-items-cell {
  min-width: 170px !important;
  white-space: normal !important;
}

.purchase-table .purchase-items-cell div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.purchase-table .purchase-items-cell span {
  color: #64748B;
  font-size: 12px;
}

@media (max-width: 1200px) {
  .supplier-summary-grid,
  .purchase-summary-grid,
  .supplier-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .supplier-filter-bar,
  .purchase-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* POS search-only display and equal compact spacing */
body.pos-mode [hidden],
body.pos-mode .pos-result-header[hidden] {
  display: none !important;
}

body.pos-mode .pos-cashier-workspace {
  gap: 8px !important;
  padding: 8px !important;
}

body.pos-mode .pos-search-bar,
body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow,
body.pos-mode .pos-payment-fields,
body.pos-mode .pos-actions.pos-main-actions {
  justify-content: flex-start !important;
  align-items: flex-end !important;
  gap: 8px !important;
}

body.pos-mode .pos-search-bar {
  max-width: 540px !important;
}

body.pos-mode .pos-search-icon,
body.pos-mode .pos-search-bar input,
body.pos-mode .pos-search-add,
body.pos-mode .pos-customer-details input,
body.pos-mode .pos-customer-details select,
body.pos-mode .pos-customer-details textarea,
body.pos-mode .pos-cart input,
body.pos-mode .pos-cart select,
body.pos-mode .pos-payment-workflow input,
body.pos-mode .pos-payment-workflow select {
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-icon {
  width: 30px !important;
  flex-basis: 30px !important;
}

body.pos-mode .pos-search-bar input[data-pos-search] {
  width: 300px !important;
  max-width: 300px !important;
  flex: 0 0 300px !important;
}

body.pos-mode .pos-search-qty {
  width: 60px !important;
  max-width: 60px !important;
  flex: 0 0 60px !important;
}

body.pos-mode .pos-search-add {
  width: 64px !important;
  max-width: 64px !important;
  flex: 0 0 64px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-search-bar label,
body.pos-mode .pos-customer-details label,
body.pos-mode .pos-payment-methods label > span,
body.pos-mode .pos-payment-fields small,
body.pos-mode .pos-cart label {
  margin-bottom: 3px !important;
  color: #334155 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

body.pos-mode .pos-result-header,
body.pos-mode .pos-product {
  grid-template-columns: minmax(180px, 1.35fr) minmax(90px, .75fr) 78px 82px 84px !important;
}

body.pos-mode .pos-result-header {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-products {
  max-height: 120px !important;
  min-height: 0 !important;
  margin: 0 !important;
}

body.pos-mode .pos-product {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 10px !important;
}

body.pos-mode .pos-empty {
  min-height: 26px !important;
  margin: 0 !important;
  padding: 6px 10px !important;
  border: 1px dashed #CBD5E1 !important;
  border-radius: 8px !important;
  color: #64748B !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart.current-order-panel,
body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow {
  padding: 8px !important;
  margin: 0 !important;
  border-radius: 10px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  max-height: 210px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.pos-mode .pos-cart-table {
  min-width: 820px !important;
}

body.pos-mode .pos-cart-table th {
  height: 30px !important;
  padding: 4px 6px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-cart-table td {
  height: 36px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-qty {
  grid-template-columns: 24px 40px 24px !important;
  gap: 3px !important;
}

body.pos-mode .pos-cart-qty button {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
}

body.pos-mode .pos-cart-qty input {
  width: 40px !important;
  height: 28px !important;
  min-height: 28px !important;
}

body.pos-mode .pos-cart-remove {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-summary-line {
  min-height: 34px !important;
  margin: 0 !important;
  padding: 6px 8px !important;
}

body.pos-mode .pos-summary-line strong,
body.pos-mode .pos-summary-line span {
  font-size: 11px !important;
}

body.pos-mode .pos-summary-line b {
  font-size: 12px !important;
}

body.pos-mode .pos-customer-details [data-pos-customer-name] { width: 210px !important; }
body.pos-mode .pos-customer-details [data-pos-customer-phone] { width: 150px !important; }
body.pos-mode .pos-customer-details [data-pos-type] { width: 150px !important; }
body.pos-mode .pos-customer-details [data-pos-table-list] {
  width: 180px !important;
  max-height: 84px !important;
}
body.pos-mode .pos-customer-details [data-pos-delivery-address] { width: 200px !important; }

body.pos-mode .pos-payment-methods select[data-pos-payment-type-select] { width: 160px !important; }
body.pos-mode .pos-payment-methods select[data-pos-payment-method-select] { width: 150px !important; }
body.pos-mode .pos-payment-fields input[data-pos-cash-received] { width: 120px !important; }
body.pos-mode .pos-payment-fields input[data-pos-reference] { width: 110px !important; }

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  width: 130px !important;
  min-width: 130px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

@media (max-width: 768px) {
  .supplier-form-grid,
  .purchase-form-grid,
  .supplier-filter-bar,
  .purchase-filter-bar,
  .supplier-detail-grid,
  .supplier-summary-grid,
  .purchase-summary-grid,
  .purchase-detail-layout {
    grid-template-columns: 1fr !important;
  }

  .purchase-lines-head {
    display: none !important;
  }

  .purchase-line-row {
    grid-template-columns: 1fr !important;
  }

  .filter-actions {
    align-items: stretch !important;
    flex-direction: column !important;
  }
}

/* Premium paid-SaaS UI layer */
:root {
  --saas-bg: #F6F8FB;
  --saas-surface: #FFFFFF;
  --saas-surface-soft: #F8FAFC;
  --saas-primary: #2563EB;
  --saas-primary-hover: #1D4ED8;
  --saas-primary-active: #1E40AF;
  --saas-secondary: #0F766E;
  --saas-success: #16A34A;
  --saas-warning: #D97706;
  --saas-danger: #DC2626;
  --saas-info: #0284C7;
  --saas-heading: #111827;
  --saas-body: #374151;
  --saas-muted: #6B7280;
  --saas-subtle: #94A3B8;
  --saas-border: #E5E7EB;
  --saas-soft-border: #EEF2F7;
  --saas-hover: #F3F4F6;
  --saas-selected: #EEF2FF;
  --saas-input-border: #D1D5DB;
  --saas-radius: 14px;
  --saas-shadow: 0 4px 16px rgba(15, 23, 42, .05);
  --saas-shadow-lg: 0 16px 40px rgba(15, 23, 42, .08);
}

html {
  background: var(--saas-bg) !important;
  scrollbar-width: thin;
  scrollbar-color: #9CA3AF var(--saas-bg);
}

body:not(.auth-page):not(.login-page) {
  min-width: 0;
  color: var(--saas-body) !important;
  background: var(--saas-bg) !important;
  background-image: none !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 14px;
  line-height: 1.5;
}

body:not(.auth-page):not(.login-page)::before,
body:not(.auth-page):not(.login-page)::after,
.hero-band::before,
.hero-band::after,
.stat-card::before,
.stat-card::after,
.card::before,
.card::after,
.premium-panel::before,
.premium-panel::after {
  content: none !important;
  display: none !important;
}

body::-webkit-scrollbar,
.main::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

body::-webkit-scrollbar-track,
.main::-webkit-scrollbar-track {
  background: var(--saas-bg);
}

body::-webkit-scrollbar-thumb,
.main::-webkit-scrollbar-thumb {
  background: #9CA3AF;
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb:hover,
.main::-webkit-scrollbar-thumb:hover {
  background: #6B7280;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  background: var(--saas-bg) !important;
  background-image: none !important;
}

.main {
  min-width: 0;
  padding: 24px !important;
  background: transparent !important;
}

.page-enter {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.sidebar,
.sidebar-scroll {
  width: 240px !important;
  max-height: 100vh;
  padding: 16px 12px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  color: var(--saas-body) !important;
  background: var(--saas-surface) !important;
  background-image: none !important;
  border-right: 1px solid var(--saas-border) !important;
  box-shadow: none !important;
  scrollbar-width: thin;
  scrollbar-color: #9CA3AF transparent;
}

.sidebar::-webkit-scrollbar,
.sidebar-scroll::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #9CA3AF;
  border-radius: 999px;
}

.brand {
  min-height: 56px;
  gap: 10px;
  margin: 0 0 12px !important;
  padding: 0 8px 14px !important;
  color: var(--saas-heading) !important;
  border-bottom: 1px solid var(--saas-soft-border);
  font-size: 15px !important;
  font-weight: 750 !important;
  letter-spacing: -.02em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: #6B7280;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.user-menu-dropdown a,
.user-menu-dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 10px;
  color: #374151;
  background: transparent;
  border: 0;
  border-radius: 8px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover {
  color: #2563EB;
  background: #EEF2FF;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: #F8FAFC;
  border: 1px solid #EEF2F7;
  border-radius: 14px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  color: #FFFFFF;
  background: #2563EB;
  border-radius: 18px;
  font-size: 26px;
  font-weight: 900;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-mark,
.topbar-logo,
.login-mark {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  display: inline-grid !important;
  place-items: center;
  border-radius: 10px !important;
  color: #FFFFFF !important;
  background: var(--saas-primary) !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 800;
}

.brand-mark img,
.topbar-logo img,
.login-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.nav {
  gap: 4px !important;
}

.nav::before,
.nav::after {
  display: block;
  padding: 10px 12px 5px;
  color: var(--saas-subtle);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav::before {
  content: "Navigation";
}

.nav::after {
  content: "Account";
  order: 98;
}

.nav form {
  order: 99;
  margin-top: 4px;
}

.nav a,
.nav button {
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  color: var(--saas-muted) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

.nav a span,
.nav button span {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  display: inline-grid !important;
  place-items: center;
  color: var(--saas-subtle) !important;
  background: #F9FAFB !important;
  border: 1px solid var(--saas-soft-border) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 800;
}

.nav a:hover,
.nav button:hover {
  color: var(--saas-body) !important;
  background: var(--saas-hover) !important;
}

.nav a.active {
  color: var(--saas-primary) !important;
  background: var(--saas-selected) !important;
}

.nav a.active span {
  color: var(--saas-primary) !important;
  background: #E0E7FF !important;
  border-color: #C7D2FE !important;
}

.topbar {
  min-height: 68px;
  margin: -24px -24px 24px !important;
  padding: 14px 24px !important;
  position: sticky;
  top: 0;
  z-index: 9000;
  overflow: visible;
  color: var(--saas-body) !important;
  background: rgba(255, 255, 255, .96) !important;
  background-image: none !important;
  border-bottom: 1px solid var(--saas-border) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
  backdrop-filter: none !important;
}

.topbar-heading {
  min-width: 0;
  gap: 12px !important;
}

.page-title {
  margin: 0;
  color: var(--saas-heading) !important;
  font-size: clamp(24px, 2.2vw, 32px) !important;
  line-height: 1.15;
  font-weight: 750 !important;
  letter-spacing: -.035em;
}

.eyebrow {
  color: var(--saas-primary) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar small,
.muted,
.card p,
.premium-panel p {
  color: var(--saas-muted) !important;
}

.user-pill {
  min-height: 44px !important;
  padding: 5px 9px 5px 5px !important;
  color: var(--saas-heading) !important;
  background: #FFFFFF !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

.user-pill > span {
  width: 34px !important;
  height: 34px !important;
  color: #FFFFFF !important;
  background: var(--saas-primary) !important;
  border-radius: 999px !important;
}

.user-menu-dropdown {
  z-index: 100000 !important;
  min-width: 180px;
  padding: 6px;
  color: var(--saas-body) !important;
  background: #FFFFFF !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: 12px !important;
  box-shadow: var(--saas-shadow-lg) !important;
}

.card,
.premium-panel,
.invoice-card,
.chart-card,
.report-content .card,
.menu-product,
.table-card,
.kot-card,
.user-management-card {
  color: var(--saas-body) !important;
  background: var(--saas-surface) !important;
  background-image: none !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: var(--saas-radius) !important;
  box-shadow: var(--saas-shadow) !important;
}

.card,
.premium-panel {
  padding: 20px;
  overflow: visible;
}

.section-head {
  align-items: center;
  margin: 0 0 14px;
}

.section-head h2,
.card h2,
.premium-panel h2,
.kitchen-column h2 {
  margin: 0;
  color: var(--saas-heading) !important;
  font-size: clamp(18px, 1.6vw, 22px) !important;
  font-weight: 750 !important;
  letter-spacing: -.025em;
}

.hero-band,
.premium-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  padding: 24px !important;
  color: var(--saas-body) !important;
  background: #FFFFFF !important;
  background-image: none !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--saas-shadow) !important;
}

.hero-band h2,
.premium-hero h2 {
  margin: 4px 0 8px;
  color: var(--saas-heading) !important;
  font-size: clamp(24px, 2.6vw, 34px) !important;
  font-weight: 800 !important;
  letter-spacing: -.04em;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  color: var(--saas-heading) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.hero-total,
.util-ring {
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 18px;
  color: var(--saas-heading) !important;
  background: var(--saas-surface-soft) !important;
  background-image: none !important;
  border: 1px solid var(--saas-soft-border) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  font-size: 26px;
  font-weight: 800;
}

.hero-total span,
.util-ring span {
  margin-top: 4px;
  color: var(--saas-muted) !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.quick-actions a,
.btn,
a.btn,
button.btn,
button[type="submit"]:not(.sidebar button):not(.nav button) {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 9px !important;
  border: 1px solid transparent !important;
  font-size: 14px;
  font-weight: 700 !important;
  cursor: pointer;
}

.quick-actions a:first-child,
.btn:not(.ghost):not(.secondary):not(.danger),
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.secondary):not(.danger) {
  color: #FFFFFF !important;
  background: var(--saas-primary) !important;
  background-image: none !important;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .18) !important;
}

.quick-actions a:first-child:hover,
.btn:not(.ghost):not(.secondary):not(.danger):hover {
  background: var(--saas-primary-hover) !important;
}

.quick-actions a:nth-child(n+2),
.btn.ghost,
.btn.secondary,
a.btn.ghost,
button.btn.ghost,
button.btn.secondary {
  color: var(--saas-body) !important;
  background: #FFFFFF !important;
  background-image: none !important;
  border-color: var(--saas-border) !important;
  box-shadow: none !important;
}

.btn.danger,
button.danger {
  color: #FFFFFF !important;
  background: var(--saas-danger) !important;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px !important;
  margin-bottom: 20px;
}

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

.stat-card {
  position: relative;
  min-height: 124px !important;
  display: grid;
  align-content: space-between;
  padding: 20px !important;
  color: var(--saas-body) !important;
  background: #FFFFFF !important;
  background-image: none !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: 14px !important;
  box-shadow: var(--saas-shadow) !important;
}

.stat-card small {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 !important;
  color: var(--saas-primary) !important;
  background: var(--saas-selected) !important;
  border-radius: 10px !important;
  font-size: 11px;
  font-weight: 800;
}

.stat-card span {
  color: var(--saas-muted) !important;
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong,
.metric {
  color: var(--saas-heading) !important;
  font-size: clamp(26px, 2.2vw, 34px) !important;
  line-height: 1.1;
  font-weight: 800 !important;
  letter-spacing: -.04em;
}

.stat-card.danger small {
  color: var(--saas-danger) !important;
  background: #FEE2E2 !important;
}

.stat-card.occupied small {
  color: var(--saas-warning) !important;
  background: #FEF3C7 !important;
}

.grid {
  gap: 16px;
}

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

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

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

.table-responsive,
.card:has(table),
.report-content {
  overflow-x: auto;
}

.table,
table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
  color: var(--saas-body) !important;
  background: #FFFFFF !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.table th,
table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px !important;
  color: var(--saas-muted) !important;
  background: #F8FAFC !important;
  border-bottom: 1px solid var(--saas-border) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td,
table td {
  padding: 13px 14px !important;
  color: var(--saas-body) !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid var(--saas-soft-border) !important;
  vertical-align: middle !important;
}

.table tr:hover td,
table tr:hover td {
  background: #F9FAFB !important;
}

.field {
  gap: 7px !important;
  margin-bottom: 14px !important;
}

.field label,
label {
  color: var(--saas-heading) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

input,
select,
textarea,
.ts-control {
  min-height: 44px;
  width: 100%;
  color: var(--saas-heading) !important;
  background: #FFFFFF !important;
  border: 1px solid var(--saas-input-border) !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}

input,
select,
textarea {
  padding: 10px 12px;
}

textarea {
  min-height: 96px;
}

input::placeholder,
textarea::placeholder {
  color: var(--saas-subtle) !important;
}

input:focus,
select:focus,
textarea:focus,
.ts-wrapper.focus .ts-control {
  border-color: var(--saas-primary) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
}

.ts-dropdown {
  z-index: 100000 !important;
  color: var(--saas-heading) !important;
  background: #FFFFFF !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: 10px !important;
  box-shadow: var(--saas-shadow-lg) !important;
}

.ts-dropdown .option,
.ts-dropdown .no-results {
  color: var(--saas-heading) !important;
  padding: 10px 12px !important;
}

.ts-dropdown .active {
  color: var(--saas-primary-active) !important;
  background: var(--saas-selected) !important;
}

.badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

.badge.available,
.badge.ready,
.badge.paid,
.badge.completed {
  color: #166534 !important;
  background: #DCFCE7 !important;
}

.badge.booked,
.badge.pending,
.badge.preparing {
  color: #92400E !important;
  background: #FEF3C7 !important;
}

.badge.occupied,
.badge.danger,
.badge.cancelled {
  color: #991B1B !important;
  background: #FEE2E2 !important;
}

.badge.sent_to_kitchen,
.badge.served,
.badge.reserved {
  color: #075985 !important;
  background: #E0F2FE !important;
}

.action-buttons {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.action-buttons form,
.action-buttons details {
  display: inline-flex !important;
  margin: 0 !important;
}

.action-btn,
a.action-btn,
button.action-btn,
summary.action-btn {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  flex: 0 0 36px !important;
  padding: 8px !important;
  color: #4B5563 !important;
  background: #F3F4F6 !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.action-btn svg,
.action-btn i {
  width: 19px !important;
  height: 19px !important;
  font-size: 19px !important;
}

.action-btn[title*="View" i] { color: var(--saas-primary) !important; background: #DBEAFE !important; border-color: #BFDBFE !important; }
.action-btn[title*="Edit" i] { color: var(--saas-success) !important; background: #DCFCE7 !important; border-color: #BBF7D0 !important; }
.action-btn.danger,
.action-btn[title*="Delete" i] { color: var(--saas-danger) !important; background: #FEE2E2 !important; border-color: #FECACA !important; }
.action-btn[title*="Print" i] { color: var(--saas-warning) !important; background: #FEF3C7 !important; border-color: #FDE68A !important; }
.action-btn[title*="Download" i],
.action-btn[title*="PDF" i] { color: var(--saas-info) !important; background: #E0F2FE !important; border-color: #BAE6FD !important; }
.action-btn.success,
.action-btn[title*="Payment" i],
.action-btn[title*="Activate" i] { color: var(--saas-secondary) !important; background: #CCFBF1 !important; border-color: #99F6E4 !important; }
.action-btn[title*="Invoice" i] { color: #4F46E5 !important; background: #EDE9FE !important; border-color: #DDD6FE !important; }

.menu-toolbar {
  margin-bottom: 16px;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid var(--saas-border);
  border-radius: 14px;
  box-shadow: var(--saas-shadow);
}

.chip-row {
  gap: 8px !important;
}

.chip {
  min-height: 34px;
  padding: 7px 12px !important;
  color: var(--saas-muted) !important;
  background: #FFFFFF !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: 999px !important;
  font-weight: 700;
}

.chip.active,
.chip:hover {
  color: var(--saas-primary) !important;
  background: var(--saas-selected) !important;
  border-color: #C7D2FE !important;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.menu-product {
  overflow: hidden;
  padding: 0 !important;
}

.menu-product img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto !important;
  object-fit: cover;
  background: #F3F4F6;
}

.menu-product-body {
  padding: 16px;
}

.menu-product h3 {
  margin: 8px 0 3px;
  color: var(--saas-heading);
  font-size: 16px;
  font-weight: 750;
}

.menu-product strong {
  color: var(--saas-heading);
  font-size: 18px;
}

.menu-product.disabled {
  opacity: .64;
  background: #F8FAFC !important;
}

.order-layout {
  grid-template-columns: minmax(0, 1fr) 360px !important;
  align-items: start;
  gap: 20px !important;
}

.current-order-panel,
.cart-panel {
  position: sticky !important;
  top: 92px !important;
  max-height: calc(100vh - 116px) !important;
  display: grid;
  overflow: hidden !important;
}

.current-order-items {
  max-height: calc(100vh - 330px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #9CA3AF #F3F4F6;
}

.current-order-items::-webkit-scrollbar {
  width: 6px;
}

.current-order-items::-webkit-scrollbar-track {
  background: #F3F4F6;
  border-radius: 999px;
}

.current-order-items::-webkit-scrollbar-thumb {
  background: #9CA3AF;
  border-radius: 999px;
}

[data-cart-line] {
  padding: 14px !important;
  margin-bottom: 10px;
  background: #F8FAFC !important;
  border-color: var(--saas-soft-border) !important;
  box-shadow: none !important;
}

.table-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.table-card {
  padding: 16px !important;
  border-left: 4px solid var(--saas-info) !important;
}

.table-card.available { border-left-color: var(--saas-success) !important; }
.table-card.booked { border-left-color: var(--saas-warning) !important; }
.table-card.occupied { border-left-color: var(--saas-danger) !important; }
.table-card.reserved { border-left-color: var(--saas-info) !important; }

.status-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 16px;
  overflow-x: auto;
}

.kitchen-column {
  min-width: 260px;
}

.kot-card {
  border-top: 4px solid var(--saas-primary) !important;
}

.report-filters,
.report-actions {
  gap: 12px;
}

.chart-canvas-wrap,
.chart-empty {
  min-height: 300px;
  background: #FFFFFF !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: 12px !important;
}

.alert {
  padding: 12px 14px !important;
  color: #166534 !important;
  background: #ECFDF5 !important;
  border: 1px solid #BBF7D0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.alert.error {
  color: #991B1B !important;
  background: #FEF2F2 !important;
  border-color: #FECACA !important;
}

.menu-empty,
.empty,
td[colspan] {
  color: var(--saas-muted) !important;
}

.auth-page,
.login-page {
  background: url("../images/login-bg.jpg") center/cover no-repeat fixed !important;
}

.auth-page .login-overlay,
.login-overlay {
  background: rgba(15, 23, 42, .34) !important;
}

.auth-page .login-card,
.login-card {
  width: min(440px, calc(100vw - 32px)) !important;
  padding: 34px !important;
  color: var(--saas-heading) !important;
  background: rgba(255, 255, 255, .96) !important;
  border: 1px solid rgba(255, 255, 255, .72) !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24) !important;
  backdrop-filter: none !important;
}

.auth-page .login-card h1,
.login-card h1 {
  color: var(--saas-heading) !important;
  font-size: 32px !important;
  font-weight: 800 !important;
  letter-spacing: -.04em;
}

.auth-page .login-card p,
.auth-page .login-card label,
.auth-page .login-link,
.auth-page .check-row,
.login-card p,
.login-card label,
.login-link {
  color: var(--saas-body) !important;
}

.auth-page .btn,
.login-page .btn {
  color: #FFFFFF !important;
  background: var(--saas-primary) !important;
  border-color: var(--saas-primary) !important;
}

*:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .18) !important;
  outline-offset: 2px;
}

@media (max-width: 1200px) {
  .stat-grid,
  .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 992px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }

  .sidebar,
  .sidebar-scroll {
    width: min(260px, 88vw) !important;
    z-index: 100000;
  }

  .main {
    padding: 18px !important;
  }

  .topbar {
    margin: -18px -18px 18px !important;
    padding: 12px 18px !important;
  }

  .hero-band,
  .premium-hero,
  .ops-grid,
  .order-layout {
    grid-template-columns: 1fr !important;
  }

  .stat-grid,
  .stat-grid.compact,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .current-order-panel,
  .cart-panel {
    position: static !important;
    max-height: none !important;
  }

  .current-order-items {
    max-height: 60vh;
  }
}

@media (max-width: 768px) {
  .main {
    padding: 14px !important;
  }

  .topbar {
    margin: -14px -14px 14px !important;
    padding: 12px 14px !important;
  }

  .topbar-logo {
    display: none !important;
  }

  .stat-grid,
  .stat-grid.compact,
  .grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .hero-panel,
  .menu-grid,
  .table-board {
    grid-template-columns: 1fr !important;
  }

  .card,
  .premium-panel,
  .hero-band,
  .premium-hero {
    padding: 16px !important;
  }

  .quick-actions a,
  .btn,
  button.btn {
    width: 100%;
  }

  .action-buttons .action-btn,
  a.action-btn,
  button.action-btn,
  summary.action-btn {
    width: 36px !important;
    min-width: 36px !important;
  }

  table {
    min-width: 760px;
  }
}

:root {
  --page-bg: #F4F1EC;
  --page-bg-secondary: #ECE6DE;
  --sidebar-bg: #2E211B;
  --sidebar-secondary: #3A2A22;
  --sidebar-text: #F8F1E7;
  --sidebar-muted: #CDBEAF;
  --sidebar-active-bg: #CCFBF1;
  --sidebar-active-text: #0F172A;
  --navbar-bg: #FFFDF9;
  --navbar-text: #2D211B;
  --card-bg: #FFFFFF;
  --card-bg-soft: #FAF7F2;
  --card-border: #DED5CA;
  --card-shadow: 0 8px 24px rgba(53, 39, 31, 0.08);
  --text-primary: #2C211B;
  --text-secondary: #6F6259;
  --text-muted: #92857B;
  --accent: #0F766E;
  --accent-hover: #0D5F59;
  --accent-soft: #CCFBF1;
  --input-bg: #FFFFFF;
  --input-border: #E2E8F0;
  --input-text: #2C211B;
  --input-placeholder: #94A3B8;
  --input-focus: #0F766E;
  --table-header-bg: #F9FAFB;
  --table-row-bg: #FFFFFF;
  --table-row-hover: #F0FDFA;
  --table-border: #E2E8F0;
  --dropdown-bg: #FFFFFF;
  --dropdown-text: #2C211B;
  --dropdown-hover: #F3F4F6;
  --dropdown-border: #E2E8F0;
  --success-bg: #DCFCE7;
  --success-text: #16A34A;
  --warning-bg: #FEF3C7;
  --warning-text: #D97706;
  --danger-bg: #FEE2E2;
  --danger-text: #DC2626;
  --info-bg: #CCFBF1;
  --info-text: #0284C7;
  --scrollbar-track: #E2E8F0;
  --scrollbar-thumb: #0F766E;
  --scrollbar-hover: #0D5F59;
  --section-bg: #FAF7F2;
  --hover-bg: #F3F4F6;
  --active-bg: #CCFBF1;
  --text-color: #2C211B;
  --muted-text: #6F6259;
  --border-color: #DED5CA;
  --accent-color: #0F766E;
  --dark-brown: #2D211B;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--app-bg);
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: transparent;
  z-index: -1;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: url("../images/login-bg.jpg") center/cover no-repeat fixed;
  position: relative;
}
.login-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 118, 110, .55), rgba(15, 118, 110, .40));
}
.glass-card {
  background: rgba(10, 38, 35, .72);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: 0 28px 80px rgba(7, 47, 43, .36);
  backdrop-filter: blur(18px);
}
.login-card {
  width: min(440px, 100%);
  position: relative;
  z-index: 1;
  border-radius: 18px;
  padding: 34px;
  color: #fff8ea;
}
.login-mark, .brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #99F6E4);
  color: var(--espresso);
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(20, 184, 166, .30);
}
.login-mark img, .brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}
.login-card h1 { margin: 18px 0 8px; font-size: 34px; }
.login-card p { color: rgba(255, 248, 234, .82); line-height: 1.6; }
.login-hint { text-align: center; font-size: 13px; margin-bottom: 0; }
.icon-field { position: relative; }
.icon-field span {
  position: absolute;
  left: 13px;
  bottom: 13px;
  color: var(--accent);
  font-weight: 900;
}
.icon-field input { padding-left: 12px; }
.check-row { display: flex; gap: 8px; align-items: center; color: rgba(255, 248, 234, .86); }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}
.sidebar {
  background: linear-gradient(180deg, var(--espresso), var(--dark));
  color: var(--cream);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 14px 0 50px rgba(21, 13, 10, .22);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 28px;
}
.nav { display: grid; gap: 8px; }
.nav a, .nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  color: var(--cream);
  background: transparent;
  padding: 12px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
}
.nav a span, .nav button span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .09);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}
.nav a:hover, .nav button:hover, .nav .active {
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 3px 0 0 var(--accent);
}
.main { padding: 26px; min-width: 0; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(234, 219, 196, .82);
  border-radius: 20px;
  background: rgba(255, 253, 248, .74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 9998;
  overflow: visible;
}
.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 900;
  color: var(--accent);
}
.page-title { margin: 0; font-size: clamp(24px, 3vw, 34px); color: var(--coffee); }
.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, .76);
  box-shadow: var(--shadow);
}
.user-pill > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--coffee);
  color: var(--accent);
  font-weight: 900;
  overflow: hidden;
}
.user-pill > span img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.user-pill small { display: block; color: var(--muted); }
.user-menu {
  position: relative;
  z-index: 99999;
  overflow: visible;
}
.user-menu summary { cursor: pointer; list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu-dropdown {
  position: absolute;
  right: 0;
  z-index: 100001;
  width: 170px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: #2c2c2c;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.user-menu-dropdown a,
.user-menu-dropdown button {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}
.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover { background: #0F766E; color: #ffffff; }
.login-link { display: inline-block; margin-top: 10px; color: var(--cream); font-weight: 800; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card, .stat-card, .table-card, .menu-product {
  background: rgba(255, 253, 248, .9);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.hero-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
  padding: 24px;
  border-radius: 20px;
  color: var(--cream);
  background: linear-gradient(135deg, rgba(36, 23, 19, .96), rgba(75, 47, 36, .9)), url("../images/coffee-placeholder.jpg") center/cover;
  box-shadow: var(--shadow);
}
.premium-hero {
  position: relative;
  overflow: hidden;
  min-height: 230px;
}
.premium-hero:after {
  content: "";
  position: absolute;
  inset: -80px -120px auto auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, .20), transparent 68%);
}
.hero-copy, .hero-panel { position: relative; z-index: 1; }
.hero-band h2 { margin: 0; font-size: 30px; }
.hero-panel {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 18px;
  align-items: center;
}
.hero-total { font-size: 28px; font-weight: 900; text-align: right; color: var(--accent); }
.hero-total span { display: block; color: var(--cream); font-size: 13px; }
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.quick-actions a {
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, .1);
  color: var(--cream);
  font-weight: 900;
}
.quick-actions a:hover {
  background: rgba(255, 255, 255, .18);
}
.util-ring {
  --value: 0;
  width: 128px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--espresso) 0 58%, transparent 59%),
    conic-gradient(var(--accent) calc(var(--value) * 1%), rgba(255, 255, 255, .16) 0);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 16px 36px rgba(0,0,0,.22);
}
.util-ring strong { color: var(--accent); font-size: 24px; line-height: 1; }
.util-ring span { color: var(--cream); font-size: 12px; font-weight: 900; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-grid.compact { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stat-card { position: relative; overflow: hidden; min-height: 132px; }
.stat-card:before {
  content: "";
  position: absolute;
  inset: auto -30px -45px auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(20, 184, 166, .16);
}
.stat-card span { color: var(--muted); font-weight: 800; }
.stat-card small {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #f4e7d2;
  color: var(--coffee);
  font-weight: 900;
}
.stat-card strong { display: block; margin-top: 9px; font-size: 30px; color: var(--coffee); }
.stat-card.occupied { border-color: rgba(184, 74, 59, .32); }
.stat-card.danger strong, .stat-card.occupied strong { color: var(--danger); }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin: 18px 0 12px;
}
.section-head h2 { margin: 0; color: var(--coffee); }
.ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 16px;
  margin-bottom: 20px;
}
.premium-panel {
  background: rgba(255, 253, 248, .94);
  box-shadow: var(--shadow-strong);
}
.order-list, .stock-line {
  display: grid;
  gap: 10px;
}
.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto minmax(210px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf0;
}
.order-row:hover {
  border-color: rgba(15, 118, 110, .35);
}
.order-row span, .stock-line span { display: block; color: var(--muted); font-size: 13px; }
.stock-line {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf0;
}
.status-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 12px;
}
.status-strip div {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffaf0, #f4e6d0);
  border: 1px solid var(--line);
}
.status-strip span {
  display: block;
  color: var(--muted);
  text-transform: capitalize;
  font-size: 12px;
  font-weight: 900;
}
.status-strip strong {
  display: block;
  margin-top: 6px;
  color: var(--coffee);
  font-size: 28px;
}

.table-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.table-card { border-left: 6px solid var(--sage); }
.table-tile { position: relative; z-index: 1; }
.table-tile.dropdown-parent-open { z-index: 100004; }
.table-card.occupied { border-left-color: var(--danger); }
.table-card.reserved { border-left-color: var(--accent); }
.table-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.table-card p { color: var(--coffee); font-weight: 800; }
.table-card small { color: var(--muted); }

.muted { color: var(--muted); }
.metric { font-size: 28px; font-weight: 900; color: var(--coffee); margin-top: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 11px;
  padding: 10px 14px;
  background: var(--coffee);
  color: #fff;
  cursor: pointer;
  min-height: 40px;
}
.btn.secondary { background: var(--accent); color: var(--espresso); }
.btn.ghost { background: #f1e4cf; color: var(--coffee); }
.btn.danger { background: var(--danger); }
.btn.is-disabled, .btn:disabled { pointer-events: none; opacity: .55; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-weight: 800; font-size: 13px; color: var(--coffee); }
.login-card .field label { color: var(--cream); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  background: #fff;
  width: 100%;
}
.field .demo-video-remove {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.field .demo-video-remove input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #dc2626;
}
.error-text {
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}
.plan-edit-page {
  min-height: 100vh;
  overflow-y: visible;
  overflow-x: hidden;
  padding-bottom: 120px;
}
.plan-form-card {
  height: auto;
  max-height: none;
  overflow: visible;
}
.plan-edit-grid {
  align-items: start;
}
.plan-form-actions {
  gap: 10px;
  margin-top: 10px;
}
.login-card .field input {
  background: rgba(255, 255, 255, .9);
  border-color: rgba(255, 255, 255, .35);
  color: var(--espresso);
}
.login-card .field input::placeholder {
  color: rgba(43, 28, 23, .58);
}
.payment-dialog {
  width: min(480px, calc(100% - 32px));
  border: 1px solid var(--line);
  color: var(--ink);
}
.payment-dialog::backdrop { background: rgba(21, 13, 10, .72); }
.settings-logo-preview,
.invoice-logo {
  width: 72px;
  height: 72px;
  display: block;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 14px; overflow: hidden; }
.table th, .table td { padding: 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: #f2e4cf; color: var(--coffee); }
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.action-buttons form {
  display: inline-flex;
  margin: 0;
}
.action-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--accent);
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(31, 41, 55, .06);
}
.action-btn:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}
.action-btn.success { color: var(--success-text); }
.action-btn.success:hover { color: #ffffff; background: var(--success-text); border-color: var(--success-text); }
.action-btn.danger { color: var(--danger-text); }
.action-btn.danger:hover { color: #ffffff; background: var(--danger-text); border-color: var(--danger-text); }
.action-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  background: #efe0c6;
  color: var(--coffee);
}
.badge.ready, .badge.available, .badge.paid, .badge.completed { background: #2f6b3c; color: #fff; }
.badge.pending, .badge.reserved { background: #c86b12; color: #fff; }
.badge.sent_to_kitchen { background: #315b7d; color: #fff; }
.badge.preparing { background: #9a6b12; color: #fff; }
.badge.served { background: #357066; color: #fff; }
.badge.danger, .badge.occupied, .badge.cancelled { background: #a8392d; color: #fff; }
.order-status-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}
.order-status-edit select {
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.menu-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 253, 248, .82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.search-field { margin-bottom: 0; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: #fffaf0;
  color: var(--coffee);
  cursor: pointer;
  font-weight: 900;
}
.chip:hover, .chip.active { background: var(--coffee); color: var(--cream); border-color: var(--coffee); }
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.menu-product { padding: 0; overflow: hidden; }
.menu-product.disabled { opacity: .55; filter: grayscale(.35); }
.menu-product img {
  width: 100%;
  height: 158px;
  object-fit: cover;
  display: block;
  background: var(--beige);
}
.menu-product-body { display: grid; gap: 8px; padding: 16px; }
.menu-product h3 { margin: 0; color: var(--coffee); }
.menu-product p { margin: 0; color: var(--muted); }
.menu-product strong { font-size: 20px; color: var(--coffee); }
.order-layout { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.cart-panel { position: sticky; top: 90px; align-self: start; }
.current-order-panel {
  max-height: calc(100vh - 120px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.current-order-items {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  margin-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: #14B8A6 #1b0f0a;
  overscroll-behavior: contain;
}
.current-order-items::-webkit-scrollbar { width: 10px; }
.current-order-items::-webkit-scrollbar-track { background: #1b0f0a; border-radius: 10px; }
.current-order-items::-webkit-scrollbar-thumb { background: #14B8A6; border-radius: 10px; }
.current-order-items [data-cart-line] { margin-bottom: 12px; }
.unit-label {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1e4cf;
  color: var(--coffee);
  font-weight: 900;
}
.stock-bar {
  height: 10px;
  min-width: 110px;
  border-radius: 999px;
  overflow: hidden;
  background: #eadbc4;
}
.stock-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--danger), var(--accent), var(--sage));
}
.status-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  overflow-x: auto;
}
.kitchen-column h2 { color: var(--coffee); }
.kot-card { border-top: 5px solid var(--accent); }
.kot-card.pending { border-top-color: #d78d36; }
.kot-card.preparing { border-top-color: var(--accent); }
.kot-card.ready { border-top-color: var(--sage); }
.receipt { max-width: 760px; margin: 0 auto; }
.receipt-header { text-align: center; border-bottom: 1px dashed var(--line); padding-bottom: 14px; }
.alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: #e5f0dc; color: #305a35; }
.alert.error { background: #f8d9d2; color: #7d3026; }
/* Client-ready UI polish layer */
:root {
  --client-bg: #F4F8F7;
  --client-surface: #FFFFFF;
  --client-surface-soft: #F8FBFA;
  --client-border: #DCE7E4;
  --client-text: #102A2A;
  --client-muted: #647875;
  --client-accent: #0F766E;
  --client-accent-dark: #0B5E58;
  --client-accent-soft: #DDF7F2;
  --client-warning: #D97706;
  --client-danger: #DC2626;
  --client-success: #16A34A;
  --client-radius: 18px;
  --client-shadow: 0 16px 45px rgba(15, 47, 45, .08);
  --client-shadow-soft: 0 8px 22px rgba(15, 47, 45, .06);
}

body:not(.auth-page) {
  color: var(--client-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(244, 248, 247, .96)),
    radial-gradient(circle at 16% 8%, rgba(15, 118, 110, .12), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(20, 184, 166, .10), transparent 26%),
    var(--client-bg);
}

body:not(.auth-page)::before {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, .035) 1px, transparent 1px),
    linear-gradient(rgba(15, 118, 110, .035) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: .55;
}

.app-shell {
  background: transparent;
}

.sidebar {
  border-right: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 18px 0 45px rgba(16, 42, 42, .12);
}

.brand {
  letter-spacing: -.02em;
}

.brand span:last-child {
  line-height: 1.15;
}

.nav a,
.nav button {
  border: 1px solid transparent;
  border-radius: 14px;
}

.nav a span,
.nav button span {
  color: #0B5E58;
  background: rgba(221, 247, 242, .94);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .10);
}

.nav a:hover,
.nav button:hover,
.nav a.active {
  color: #FFFFFF;
  background: rgba(15, 118, 110, .30);
  border-color: rgba(255, 255, 255, .14);
}

.nav a.active span {
  color: #FFFFFF;
  background: var(--client-accent);
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 9000;
  overflow: visible;
  margin: -24px -24px 24px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(220, 231, 228, .88);
  box-shadow: 0 10px 34px rgba(16, 42, 42, .06);
  backdrop-filter: blur(18px);
}

.topbar-heading {
  min-width: 0;
}

.page-title,
.section-head h2,
.card h2,
.premium-panel h2 {
  color: var(--client-text);
  letter-spacing: -.035em;
}

.eyebrow {
  color: var(--client-accent);
  font-weight: 800;
  letter-spacing: .08em;
}

.topbar small,
.muted,
.card p {
  color: var(--client-muted);
}

.user-pill {
  min-height: 50px;
  color: var(--client-text);
  background: #FFFFFF;
  border: 1px solid var(--client-border);
  box-shadow: var(--client-shadow-soft);
}

.user-pill > span {
  overflow: hidden;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--client-accent), #22C6B8);
}

.user-pill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-menu {
  position: relative;
  z-index: 99999;
}

.user-menu-dropdown {
  z-index: 100000;
  min-width: 190px;
  background: #FFFFFF;
  border: 1px solid var(--client-border);
  box-shadow: 0 18px 45px rgba(16, 42, 42, .18);
}

.card,
.premium-panel,
.invoice-card,
.report-content .card {
  color: var(--client-text);
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--client-border);
  border-radius: var(--client-radius);
  box-shadow: var(--client-shadow);
}

.premium-panel,
.card {
  overflow: visible;
}

.hero-band,
.premium-hero {
  color: var(--client-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(239, 253, 250, .96)),
    radial-gradient(circle at 92% 12%, rgba(15, 118, 110, .16), transparent 30%);
  border: 1px solid var(--client-border);
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(15, 47, 45, .10);
}

.hero-band h2,
.premium-hero h2 {
  color: var(--client-text);
}

.hero-band p,
.premium-hero p {
  color: var(--client-muted);
}

.hero-panel,
.hero-total,
.util-ring {
  color: var(--client-text);
  background: rgba(255, 255, 255, .78);
  border-color: rgba(15, 118, 110, .14);
}

.quick-actions a,
.btn,
button.btn,
a.btn,
button[type="submit"]:not(.sidebar button):not(.nav button) {
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
}

.quick-actions a,
.btn:not(.ghost):not(.danger),
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger) {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--client-accent), var(--client-accent-dark));
  box-shadow: 0 12px 24px rgba(15, 118, 110, .20);
}

.btn.ghost,
a.btn.ghost,
button.btn.ghost,
.quick-actions a:nth-child(n+2) {
  color: var(--client-accent-dark);
  background: var(--client-accent-soft);
  border-color: rgba(15, 118, 110, .18);
  box-shadow: none;
}

.btn.danger,
button.danger {
  color: #FFFFFF;
  background: var(--client-danger);
}

.stat-grid {
  gap: 18px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  color: var(--client-text);
  background: linear-gradient(145deg, #FFFFFF, #F8FCFB);
  border: 1px solid var(--client-border);
  border-radius: 22px;
  box-shadow: var(--client-shadow);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(15, 118, 110, .12);
  pointer-events: none;
}

.stat-card small {
  color: var(--client-accent);
  background: var(--client-accent-soft);
  border-radius: 999px;
  padding: 4px 10px;
}

.stat-card span {
  color: var(--client-muted);
  font-weight: 800;
}

.stat-card strong,
.metric {
  color: var(--client-text);
  letter-spacing: -.04em;
}

.stat-card.danger::after {
  background: rgba(220, 38, 38, .11);
}

.stat-card.occupied::after,
.stat-card.warning::after {
  background: rgba(217, 119, 6, .13);
}

.ops-grid,
.grid,
.table-board,
.menu-grid,
.report-chart-grid {
  align-items: stretch;
}

.section-head {
  margin-bottom: 14px;
}

.order-row,
.stock-line,
.payment-row,
.summary-row {
  background: var(--client-surface-soft);
  border: 1px solid var(--client-border);
  border-radius: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.badge.pending,
.badge.sent_to_kitchen,
.badge.danger {
  color: #9A3412;
  background: #FFEDD5;
}

.badge.preparing,
.badge.occupied,
.badge.booked {
  color: #92400E;
  background: #FEF3C7;
}

.badge.ready,
.badge.served,
.badge.completed,
.badge.paid,
.badge.available {
  color: #166534;
  background: #DCFCE7;
}

.badge.cancelled,
.badge.out,
.badge.unavailable {
  color: #991B1B;
  background: #FEE2E2;
}

.table,
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-responsive,
.card:has(table) {
  overflow-x: auto;
}

table th {
  color: #475569;
  background: #F8FAFC;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

table th,
table td {
  border-bottom: 1px solid var(--client-border);
  padding: 13px 14px;
  vertical-align: middle;
}

table tr:last-child td {
  border-bottom: 0;
}

.field label,
label {
  color: var(--client-text);
  font-weight: 800;
}

input,
select,
textarea,
.ts-control {
  color: var(--client-text);
  background: #FFFFFF;
  border: 1px solid var(--client-border);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(16, 42, 42, .03);
}

input:focus,
select:focus,
textarea:focus,
.ts-wrapper.focus .ts-control {
  border-color: var(--client-accent);
  outline: 3px solid rgba(15, 118, 110, .13);
}

input::placeholder,
textarea::placeholder {
  color: #94A3B8;
}

.ts-dropdown,
.dropdown-menu,
.user-menu-dropdown {
  z-index: 100000 !important;
  color: var(--client-text);
  background: #FFFFFF;
  border: 1px solid var(--client-border);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(16, 42, 42, .18);
}

.ts-dropdown .active,
.dropdown-menu a:hover,
.dropdown-menu button:hover,
.user-menu-dropdown button:hover {
  color: #FFFFFF;
  background: var(--client-accent);
}

.menu-product,
.table-card,
.kot-card,
.user-management-card {
  color: var(--client-text);
  background: #FFFFFF;
  border: 1px solid var(--client-border);
  border-radius: 20px;
  box-shadow: var(--client-shadow-soft);
}

.menu-product img,
.menu-product .menu-image {
  border-radius: 16px;
}

.menu-product.disabled {
  opacity: .62;
  background: #F8FAFC;
}

.table-card.available {
  border-left: 5px solid var(--client-success);
}

.table-card.booked {
  border-left: 5px solid var(--client-warning);
}

.table-card.occupied {
  border-left: 5px solid var(--client-danger);
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--client-accent-dark);
  background: var(--client-accent-soft);
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 12px;
}

.profile-card,
.danger-zone,
.invoice-card {
  max-width: 100%;
}

.current-order-panel,
.cart-panel {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 124px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--client-accent) #E2E8F0;
}

.current-order-panel::-webkit-scrollbar,
.cart-panel::-webkit-scrollbar {
  width: 9px;
}

.current-order-panel::-webkit-scrollbar-track,
.cart-panel::-webkit-scrollbar-track {
  background: #E2E8F0;
  border-radius: 999px;
}

.current-order-panel::-webkit-scrollbar-thumb,
.cart-panel::-webkit-scrollbar-thumb {
  background: var(--client-accent);
  border-radius: 999px;
}

.auth-page .login-card,
.login-page .login-card {
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(7, 47, 43, .36);
}

.auth-page .field input,
.login-page .field input {
  min-height: 48px;
}

.alert {
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, .16);
  background: #ECFDF5;
  color: #166534;
  box-shadow: var(--client-shadow-soft);
}

.alert.error {
  border-color: rgba(220, 38, 38, .16);
  background: #FEF2F2;
  color: #991B1B;
}

.payment-dialog {
  z-index: 100001;
  border: 1px solid var(--client-border);
}

@media (max-width: 1200px) {
  .stat-grid,
  .grid-4,
  .menu-grid,
  .table-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    z-index: 100000;
  }

  .main {
    padding: 18px;
  }

  .topbar {
    margin: -18px -18px 18px;
    padding: 14px 18px;
  }

  .hero-band,
  .ops-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid,
  .grid-3,
  .grid-4,
  .menu-grid,
  .table-board,
  .report-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .current-order-panel,
  .cart-panel {
    position: static;
    max-height: 70vh;
  }
}

@media (max-width: 768px) {
  .topbar {
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-heading {
    width: 100%;
  }

  .topbar-actions {
    align-self: flex-end;
  }

  .page-title {
    font-size: 24px;
  }

  .hero-band,
  .premium-hero,
  .card,
  .premium-panel,
  .stat-card {
    border-radius: 16px;
  }

  .stat-grid,
  .grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .menu-grid,
  .table-board,
  .ops-grid,
  .report-chart-grid {
    grid-template-columns: 1fr;
  }

  .order-row,
  .section-head,
  .form-actions {
    align-items: stretch;
  }

  .order-row,
  .form-actions {
    flex-direction: column;
  }

  .btn,
  button,
  .quick-actions a {
    width: 100%;
    justify-content: center;
  }

  .action-buttons .action-btn,
  .sidebar-toggle {
    width: auto;
  }

  table {
    min-width: 720px;
  }
}

@media (max-width: 576px) {
  .main {
    padding: 14px;
  }

  .topbar {
    margin: -14px -14px 14px;
    padding: 12px 14px;
  }

  .login-card {
    padding: 24px;
  }

  .login-card h1 {
    font-size: 28px;
  }

  .card,
  .premium-panel,
  .stat-card,
  .hero-band,
  .premium-hero {
    padding: 16px;
  }

  .user-pill div {
    display: none;
  }

  .user-menu-dropdown {
    right: 0;
    left: auto;
  }
}

/* Feature polish: compact POS products and permission trees */
.order-layout .menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)) !important;
}

.order-layout .menu-product {
  min-height: 0 !important;
}

.order-layout .menu-product img {
  height: 165px !important;
  max-height: 180px !important;
  width: 100% !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  border-radius: 12px 12px 0 0 !important;
}

.order-layout .menu-product-body {
  padding: 12px !important;
  gap: 7px !important;
}

.order-layout .menu-product-body h3 {
  font-size: 15px !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

.order-layout .menu-product-body p {
  margin: 0 !important;
  font-size: 12px !important;
}

.order-layout .menu-product-body strong {
  font-size: 16px !important;
}

.order-layout .menu-product-body .btn {
  min-height: 36px !important;
}

.user-permission-panel {
  grid-column: 1 / -1 !important;
}

.user-permission-tree,
.create-cafe-permission-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.permission-mini-module {
  border: 1px solid var(--cc-border, #E2E8F0) !important;
  border-radius: 14px !important;
  background: var(--cc-surface, #FFFFFF) !important;
  overflow: hidden !important;
}

.permission-mini-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 11px 13px !important;
  background: var(--cc-soft, #F8FAFC) !important;
  border-bottom: 1px solid var(--cc-border, #E2E8F0) !important;
}

.permission-mini-head strong {
  color: var(--cc-text, #0F172A) !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}

.permission-mini-head small {
  color: var(--cc-text-3, #64748B) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.permission-mini-list {
  display: grid !important;
  gap: 0 !important;
}

.permission-mini-row {
  display: flex !important;
  align-items: flex-start !important;
  gap: 9px !important;
  padding: 9px 13px !important;
  border-bottom: 1px solid #EEF2F7 !important;
  color: var(--cc-text, #0F172A) !important;
}

.permission-mini-row:last-child {
  border-bottom: 0 !important;
}

.permission-mini-row span {
  display: grid !important;
  gap: 1px !important;
}

.permission-mini-row strong {
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
}

.permission-mini-row small {
  color: var(--cc-text-3, #64748B) !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.permission-mini-toolbar {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  margin-bottom: 14px !important;
}

.permission-mini-toolbar .field {
  min-width: min(360px, 100%) !important;
}

.permission-mini-module.is-collapsed .permission-mini-list {
  display: none !important;
}

.cafe-management-table .nowrap {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.cafe-management-table .email-col {
  min-width: 180px !important;
}

.cafe-management-table .phone-col {
  min-width: 140px !important;
}

.cafe-management-table .plan-col {
  min-width: 120px !important;
}

.cafe-management-table .expiry-col {
  min-width: 110px !important;
}

.cafe-management-table .actions-col {
  min-width: 140px !important;
}

.create-cafe-permissions {
  margin-top: 22px !important;
  padding-top: 20px !important;
  border-top: 1px solid var(--cc-border, #E2E8F0) !important;
}

@media (min-width: 1500px) {
  .order-layout .menu-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1200px) {
  .order-layout .menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .order-layout .menu-grid,
  .user-permission-tree,
  .create-cafe-permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .order-layout .menu-product img {
    height: 145px !important;
  }
}

@media (max-width: 480px) {
  .order-layout .menu-grid,
  .user-permission-tree,
  .create-cafe-permission-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Table management edit flow and polished table cards */
.table-page-header,
.table-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.table-page-header h2,
.table-edit-header h2 {
  margin: 2px 0 6px;
}

.table-status-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.table-status-summary span {
  min-width: 86px;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  color: var(--text-muted);
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.table-status-summary strong {
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1;
}

.table-status-summary .available strong { color: var(--success); }
.table-status-summary .booked strong { color: var(--warning); }
.table-status-summary .occupied strong { color: var(--danger); }
.table-status-summary .reserved strong { color: var(--info); }

.table-create-form,
.table-filter-bar {
  align-items: end;
}

.table-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 220px) minmax(180px, 240px) auto;
  gap: 16px;
}

.table-form-submit,
.table-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.table-management-card,
.table-tile.table-management-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 16px !important;
  overflow: visible !important;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-left-width: 5px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
}

.table-management-card.available { border-left-color: var(--success) !important; }
.table-management-card.booked { border-left-color: var(--warning) !important; }
.table-management-card.occupied { border-left-color: var(--danger) !important; }
.table-management-card.reserved { border-left-color: var(--info) !important; }

.table-management-card.dropdown-parent-open {
  z-index: 100004 !important;
}

.table-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.table-card-top h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 800;
}

.table-card-meta {
  display: grid;
  gap: 8px;
}

.table-card-meta span,
.table-edit-summary span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  font-size: 13px;
}

.table-card-meta strong,
.table-edit-summary strong {
  color: var(--text-primary);
  font-weight: 750;
}

.table-card-actions {
  margin-top: auto;
  padding-top: 2px;
}

.table-quick-edit {
  position: relative;
}

.table-card-actions .action-btn-edit {
  position: relative;
  z-index: 3;
  pointer-events: auto !important;
}

.table-card-actions .action-btn-edit svg {
  pointer-events: none !important;
}

.table-quick-edit > form,
.table-management-card .independent-dropdown > form {
  width: min(340px, calc(100vw - 32px));
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  z-index: 100005 !important;
  padding: 14px !important;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16) !important;
}

.table-empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 32px !important;
  text-align: center;
}

.table-empty-state svg {
  width: 42px;
  height: 42px;
  color: var(--primary);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-edit-form {
  display: grid;
  gap: 20px;
}

.table-edit-summary {
  display: grid;
  gap: 8px;
}

.table-edit-actions {
  display: flex;
  justify-content: flex-end;
}

.badge.available {
  color: var(--success) !important;
  background: var(--success-soft) !important;
}

.badge.booked {
  color: var(--warning) !important;
  background: var(--warning-soft) !important;
}

.badge.occupied {
  color: var(--danger) !important;
  background: var(--danger-soft) !important;
}

.badge.reserved {
  color: var(--info) !important;
  background: var(--info-soft) !important;
}

@media (max-width: 1100px) {
  .table-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .table-page-header,
  .table-edit-header {
    align-items: stretch;
    flex-direction: column;
  }

  .table-status-summary {
    justify-content: stretch;
  }

  .table-status-summary span {
    flex: 1 1 120px;
  }

  .table-card-grid,
  .table-filter-bar {
    grid-template-columns: 1fr;
  }

  .table-filter-actions,
  .table-form-submit,
  .table-edit-actions {
    justify-content: stretch;
  }

  .table-filter-actions .btn,
  .table-form-submit .btn,
  .table-edit-actions .btn {
    flex: 1 1 0;
  }
}
+

/* Super Admin profile */
.superadmin-profile-page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.superadmin-profile-page .superadmin-profile-head {
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}
.superadmin-profile-head h2 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 22px;
  letter-spacing: 0;
}
.superadmin-profile-head .muted {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
}
.superadmin-profile-head .btn {
  min-width: 122px;
  height: 38px;
  min-height: 38px;
  padding: 8px 14px;
}
.superadmin-profile-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: stretch;
}
.superadmin-profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px;
  border-right: 1px solid #e2e8f0;
  text-align: center;
}
.superadmin-profile-avatar {
  width: 88px;
  height: 88px;
  min-width: 88px;
  border: 4px solid #eff6ff;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .16);
}
.superadmin-profile-copy {
  width: 100%;
  margin-top: 14px;
}
.superadmin-profile-copy h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  letter-spacing: 0;
}
.superadmin-profile-copy p {
  margin: 4px 0 10px;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.superadmin-role-badge {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
.superadmin-profile-meta {
  width: 100%;
  margin: 22px 0 0;
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.superadmin-profile-meta div {
  display: grid;
  gap: 4px;
}
.superadmin-profile-meta dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.superadmin-profile-meta dd {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
}
.superadmin-photo-field {
  width: 100%;
  margin: 18px 0 0;
  text-align: left;
}
.superadmin-photo-field input[type="file"] {
  min-height: 42px;
  padding: 5px;
  color: #64748b;
  font-size: 11px;
}
.superadmin-photo-field input[type="file"]::file-selector-button {
  height: 30px;
  margin-right: 8px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.superadmin-photo-field > small {
  font-size: 11px;
}
.superadmin-profile-form {
  min-width: 0;
  padding: 26px 28px 28px;
}
.superadmin-profile-section-head {
  margin-bottom: 16px;
}
.superadmin-profile-section-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  letter-spacing: 0;
}
.superadmin-profile-section-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}
.superadmin-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 16px;
}
.superadmin-profile-grid .field {
  min-width: 0;
  margin: 0;
}
.superadmin-profile-grid .field > label {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}
.superadmin-profile-grid input,
.superadmin-profile-grid select {
  height: 44px;
  min-height: 44px;
  border-color: #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  font-size: 13px;
}
.superadmin-profile-grid input:focus,
.superadmin-profile-grid select:focus {
  border-color: #2563eb;
  outline: 3px solid rgba(37, 99, 235, .12);
}
.superadmin-role-input:disabled {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
  opacity: 1;
}
.superadmin-profile-security {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #e2e8f0;
}
@media (max-width: 850px) {
  .superadmin-profile-page .superadmin-profile-head {
    align-items: flex-start;
  }
  .superadmin-profile-layout {
    grid-template-columns: 1fr;
  }
  .superadmin-profile-identity {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }
  .superadmin-profile-meta,
  .superadmin-photo-field {
    max-width: 440px;
  }
}
@media (max-width: 600px) {
  .superadmin-profile-page .superadmin-profile-head {
    flex-direction: column;
    padding: 18px;
  }
  .superadmin-profile-head .btn {
    width: 100%;
  }
  .superadmin-profile-identity,
  .superadmin-profile-form {
    padding: 22px 18px;
  }
  .superadmin-profile-grid {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }
}


/* Final premium SaaS polish pass */
:root {
  --surface-muted: #F1F5F9;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.page-content {
  padding: 0 !important;
}

.page-content > .card,
.page-content > .premium-panel,
.page-content > .hero-band,
.page-content > .premium-hero,
.page-content > .dashboard-hero,
.page-content > form.card {
  margin-top: 0;
}

.page-content > * + * {
  margin-top: 20px !important;
}

.card h3,
.premium-panel h3,
.receipt h3,
form.card h3 {
  margin: 0 0 12px;
  color: var(--text-primary) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.25;
}

.card p,
.premium-panel p {
  margin-top: 0;
}

.grid {
  align-items: start;
}

.grid-1,
.grid-2,
.grid-3,
.grid-4 {
  min-width: 0;
}

.stat-card,
a.stat-card {
  text-decoration: none !important;
  border-radius: 14px !important;
}

.stat-card small {
  color: var(--text-subtle) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.stat-card span {
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.stat-card strong {
  color: var(--text-primary) !important;
  font-size: clamp(27px, 2.4vw, 34px) !important;
  line-height: 1.05 !important;
}

.quick-actions a,
.chip,
.login-link,
.nav a,
.action-btn,
.btn {
  text-decoration: none !important;
}

.chip-row {
  gap: 8px !important;
}

.chip {
  min-height: 36px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px !important;
  color: var(--text-secondary) !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.chip.active,
.chip:hover {
  color: var(--primary) !important;
  background: var(--primary-soft) !important;
  border-color: #C7D2FE !important;
}

.menu-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
}

.menu-toolbar .search-field {
  width: min(420px, 100%);
}

.menu-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
  gap: 16px !important;
}

.menu-product {
  overflow: hidden !important;
}

.menu-product > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-muted);
}

.menu-product-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.menu-product-body h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 750;
}

.menu-product-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.menu-product-body strong {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 800;
}

.menu-product.disabled {
  opacity: .66;
}

.menu-empty,
.permission-empty-state,
.table-empty-state,
[data-chart-empty] {
  color: var(--text-muted) !important;
  background: var(--surface-soft) !important;
  border: 1px dashed #CBD5E1 !important;
  border-radius: var(--radius-md) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.order-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px) !important;
  gap: 18px !important;
}

.current-order-panel,
.cart-panel {
  position: sticky !important;
  top: 88px !important;
  display: flex !important;
  flex-direction: column !important;
  max-height: calc(100vh - 112px) !important;
  overflow: hidden !important;
}

.current-order-panel h2 {
  margin-bottom: 12px !important;
}

.current-order-items {
  flex: 1 1 auto;
  max-height: none !important;
  min-height: 120px;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding-right: 6px !important;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--surface-soft);
}

.current-order-items::-webkit-scrollbar {
  width: 8px !important;
}

.current-order-items::-webkit-scrollbar-track {
  background: var(--surface-soft) !important;
  border-radius: 999px !important;
}

.current-order-items::-webkit-scrollbar-thumb {
  background: var(--primary) !important;
  border-radius: 999px !important;
}

.current-order-items [data-cart-line] {
  padding: 14px !important;
  margin: 0 0 10px !important;
  border-radius: var(--radius-md) !important;
}

.current-order-items label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.receipt-header {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.receipt-header h2 {
  margin: 0;
}

.invoice-logo {
  max-width: 72px;
  max-height: 72px;
  object-fit: contain;
}

.invoice-totals {
  max-width: 520px;
  margin-left: auto;
}

.invoice-totals th {
  width: 56%;
}

.invoice-totals td {
  text-align: right;
  font-weight: 750;
}

.invoice-totals .grand th,
.invoice-totals .grand td {
  color: #FFFFFF !important;
  background: var(--primary) !important;
  font-size: 16px !important;
}

.payment-preview {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px !important;
  color: var(--text-secondary) !important;
  background: var(--surface-soft) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-sm) !important;
}

.payment-preview strong {
  color: var(--text-primary) !important;
}

.report-chart-grid {
  gap: 16px !important;
}

.chart-card {
  min-height: 280px;
  display: grid;
  gap: 12px;
  align-content: stretch;
}

.chart-card canvas {
  min-height: 220px;
}

.report-table {
  min-width: 760px;
}

.profile-summary,
.table-edit-summary,
.permission-sticky-actions {
  background: var(--surface-soft) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-lg) !important;
}

.profile-avatar {
  background: var(--primary) !important;
}

.independent-dropdown,
.independent-dropdown > summary,
.user-menu {
  position: relative;
}

.independent-dropdown[open],
.dropdown-parent-open {
  z-index: 100004 !important;
}

.independent-dropdown > form,
.user-menu-dropdown {
  z-index: 100005 !important;
}

dialog,
.modal,
.payment-dialog {
  z-index: 100010 !important;
}

.select2-container--open,
.select2-dropdown {
  z-index: 100006 !important;
}

.select2-results__option {
  min-height: 34px !important;
}

.table th,
.table td {
  overflow-wrap: anywhere;
}

.table-responsive .table {
  min-width: 720px;
}

.permissions-toolbar,
.report-filters,
.table-filter-bar,
.menu-toolbar {
  overflow: visible !important;
}

@media (max-width: 992px) {
  .menu-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .menu-toolbar .search-field {
    width: 100%;
  }

  .order-layout {
    grid-template-columns: 1fr !important;
  }

  .current-order-panel,
  .cart-panel {
    position: static !important;
    max-height: none !important;
  }

  .current-order-items {
    max-height: 58vh !important;
  }
}

@media (max-width: 768px) {
  .page-content > * + * {
    margin-top: 16px !important;
  }

  .topbar-heading {
    align-items: flex-start !important;
  }

  .page-title {
    font-size: 24px !important;
  }

  .table-responsive .table,
  .report-table {
    min-width: 680px;
  }

  .invoice-totals {
    max-width: 100%;
  }

  .payment-preview {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .menu-grid {
    grid-template-columns: 1fr !important;
  }

  .quick-actions,
  .form-actions,
  .action-buttons:not(.table-card-actions) {
    align-items: stretch;
    flex-direction: column;
  }

  .table-card-actions,
  td .action-buttons,
  .table .action-buttons {
    flex-direction: row !important;
  }

  .user-pill > div {
    display: none;
  }

  .user-menu-dropdown {
    right: 0 !important;
    left: auto !important;
    max-width: calc(100vw - 24px);
  }
}

/* Decorative background cleanup: keep UI clean, white, and client-ready */
html,
body:not(.auth-page):not(.login-page) {
  background: #F5F6FA !important;
  background-image: none !important;
}

body:not(.auth-page):not(.login-page)::before,
body:not(.auth-page):not(.login-page)::after,
:root body:not(.auth-page):not(.login-page)::before,
:root body:not(.auth-page):not(.login-page)::after,
body:not(.login-page)::before,
body:not(.login-page)::after {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
}

.app-shell,
.main,
.page-enter,
.report-content,
.ops-grid,
.table-board,
.status-columns {
  background: transparent !important;
  background-image: none !important;
}

.topbar,
.navbar {
  background: #FFFFFF !important;
  background-image: none !important;
  border-color: #E5E7EB !important;
}

.sidebar {
  color: #1F2937 !important;
  background: #FFFFFF !important;
  background-image: none !important;
  border-right: 1px solid #E5E7EB !important;
}

.sidebar .brand,
.sidebar .nav a,
.sidebar .nav button {
  color: #1F2937 !important;
}

.sidebar .nav a:hover,
.sidebar .nav button:hover,
.sidebar .nav a.active {
  color: #0F766E !important;
  background: #ECFDF5 !important;
  background-image: none !important;
}

.card,
.premium-panel,
.stat-card,
.table-card,
.menu-product,
.kot-card,
.user-management-card,
.invoice-card,
.chart-card,
.hero-band,
.premium-hero,
.hero-panel,
.hero-total,
.report-content .card {
  background: #FFFFFF !important;
  background-image: none !important;
  border-color: #E5E7EB !important;
  box-shadow: 0 10px 28px rgba(17, 24, 39, .08) !important;
}

.hero-band::before,
.hero-band::after,
.premium-hero::before,
.premium-hero::after,
.stat-card::before,
.stat-card::after,
.card::before,
.card::after,
.premium-panel::before,
.premium-panel::after,
.table-card::before,
.table-card::after,
.menu-product::before,
.menu-product::after,
.dashboard-shape,
.hero-shape,
.background-shape,
.bg-decoration,
.bg-circle,
.floating-circle,
.circle,
.circle-1,
.circle-2,
.blob,
.shape {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
  box-shadow: none !important;
}

.util-ring {
  background: #FFFFFF !important;
  background-image: none !important;
  border: 1px solid #E5E7EB !important;
}

.quick-actions a:nth-child(n),
.btn:not(.danger),
button[type="submit"]:not(.sidebar button):not(.nav button):not(.danger),
.auth-page .btn,
:root .auth-page .btn {
  background: #0F766E !important;
  background-image: none !important;
}

.btn.ghost,
.btn.secondary,
.quick-actions a:nth-child(n+2),
.auth-page .btn.ghost,
.auth-page .btn.secondary,
:root .auth-page .btn.ghost,
:root .auth-page .btn.secondary {
  color: #0F172A !important;
  background: #F8FAFC !important;
  background-image: none !important;
}

.login-page,
.auth-page,
:root .auth-page {
  background: url("../images/login-bg.jpg") center/cover no-repeat fixed !important;
}

.login-page::before,
.login-page::after,
.auth-page::before,
.auth-page::after,
:root .auth-page::before,
:root .auth-page::after {
  content: none !important;
  display: none !important;
}

.login-overlay,
.auth-page .login-overlay,
:root .auth-page .login-overlay {
  background: rgba(15, 118, 110, .48) !important;
  background-image: none !important;
}

.glass-card,
.login-card,
.auth-page .login-card,
:root .auth-page .login-card {
  background: rgba(255, 255, 255, .94) !important;
  background-image: none !important;
  color: #0F172A !important;
  border-color: rgba(255, 255, 255, .70) !important;
}

.login-card h1,
.login-card p,
.login-card label,
.login-card .check-row,
.login-card .login-link,
.login-card .login-hint,
.auth-page .login-card h1,
.auth-page .login-card p,
.auth-page .login-card label,
.auth-page .check-row,
.auth-page .login-link,
.auth-page .login-hint {
  color: #0F172A !important;
}

.login-mark,
.brand-mark,
.auth-page .login-mark,
:root .auth-page .login-mark {
  background: #0F766E !important;
  background-image: none !important;
  color: #FFFFFF !important;
}

/* Professional action icon buttons */
.action-buttons,
td .action-buttons,
th .action-buttons {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  min-width: max-content;
}

.action-buttons form,
.action-buttons details {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
}

.action-btn,
a.action-btn,
button.action-btn,
summary.action-btn {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 40px !important;
  padding: 8px !important;
  border-radius: 10px !important;
  border: 1px solid #E5E7EB !important;
  color: #4B5563 !important;
  background: #F3F4F6 !important;
  background-image: none !important;
  box-shadow: 0 4px 12px rgba(17, 24, 39, .06) !important;
  cursor: pointer !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease !important;
}

.action-btn svg,
a.action-btn svg,
button.action-btn svg,
summary.action-btn svg {
  width: 21px !important;
  height: 21px !important;
  min-width: 21px !important;
  min-height: 21px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.25 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}

.action-btn i {
  font-size: 21px !important;
  line-height: 1 !important;
  color: currentColor !important;
  pointer-events: none !important;
}

.action-btn:hover,
a.action-btn:hover,
button.action-btn:hover,
summary.action-btn:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 8px 18px rgba(17, 24, 39, .14) !important;
}

.action-btn[title*="View" i] {
  color: #2563EB !important;
  background: #DBEAFE !important;
  border-color: #BFDBFE !important;
}

.action-btn[title*="View" i]:hover {
  background: #BFDBFE !important;
}

.action-btn[title*="Edit" i] {
  color: #16A34A !important;
  background: #DCFCE7 !important;
  border-color: #BBF7D0 !important;
}

.action-btn[title*="Edit" i]:hover {
  background: #BBF7D0 !important;
}

.action-btn.danger,
.action-btn[title*="Delete" i],
.action-btn[title*="Remove" i] {
  color: #DC2626 !important;
  background: #FEE2E2 !important;
  border-color: #FECACA !important;
}

.action-btn.danger:hover,
.action-btn[title*="Delete" i]:hover,
.action-btn[title*="Remove" i]:hover {
  background: #FECACA !important;
}

.action-btn[title*="Print" i] {
  color: #D97706 !important;
  background: #FEF3C7 !important;
  border-color: #FDE68A !important;
}

.action-btn[title*="Print" i]:hover {
  background: #FDE68A !important;
}

.action-btn[title*="Download" i],
.action-btn[title*="PDF" i] {
  color: #0284C7 !important;
  background: #E0F2FE !important;
  border-color: #BAE6FD !important;
}

.action-btn[title*="Download" i]:hover,
.action-btn[title*="PDF" i]:hover {
  background: #BAE6FD !important;
}

.action-btn.success,
.action-btn[title*="Payment" i],
.action-btn[title*="Paid" i],
.action-btn[title*="Activate" i] {
  color: #15803D !important;
  background: #DCFCE7 !important;
  border-color: #BBF7D0 !important;
}

.action-btn.success:hover,
.action-btn[title*="Payment" i]:hover,
.action-btn[title*="Paid" i]:hover,
.action-btn[title*="Activate" i]:hover {
  background: #BBF7D0 !important;
}

.action-btn[title*="Invoice" i] {
  color: #7C3AED !important;
  background: #EDE9FE !important;
  border-color: #DDD6FE !important;
}

.action-btn[title*="Invoice" i]:hover {
  background: #DDD6FE !important;
}

.action-btn[title*="Status" i],
.action-btn[title*="Suspend" i],
.action-btn[title*="Deactivate" i] {
  color: #4B5563 !important;
  background: #F3F4F6 !important;
  border-color: #E5E7EB !important;
}

.action-btn[title*="Status" i]:hover,
.action-btn[title*="Suspend" i]:hover,
.action-btn[title*="Deactivate" i]:hover {
  background: #E5E7EB !important;
}

td:has(.action-buttons),
td:has(.action-btn) {
  white-space: nowrap !important;
}

.table-responsive,
.card:has(.action-buttons),
.card:has(.action-btn) {
  overflow-x: auto;
}

@media (max-width: 768px) {
  .action-buttons,
  td .action-buttons {
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .action-buttons .action-btn,
  a.action-btn,
  button.action-btn,
  summary.action-btn {
    width: 40px !important;
    min-width: 40px !important;
  }
}

/* PKR/logo/sidebar refinement */
html {
  scrollbar-width: thin;
  scrollbar-color: #9CA3AF #F5F6FA;
}

body::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

body::-webkit-scrollbar-track {
  background: #F5F6FA;
}

body::-webkit-scrollbar-thumb {
  background: #9CA3AF;
  border-radius: 10px;
}

body::-webkit-scrollbar-thumb:hover {
  background: #6B7280;
}

.app-shell {
  grid-template-columns: 248px 1fr !important;
}

.sidebar,
.sidebar-scroll {
  width: 248px;
  max-height: 100vh;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: #6B7280 transparent;
  padding: 18px 12px !important;
  color: #4B5563 !important;
  background: #FFFFFF !important;
  border-right: 1px solid #E5E7EB !important;
  box-shadow: none !important;
}

.sidebar-scroll::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar-scroll::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: #6B7280;
  border-radius: 10px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
  background: #4B5563;
}

.brand {
  min-height: 54px;
  margin: 0 0 14px !important;
  padding: 0 8px 14px;
  color: #111827 !important;
  border-bottom: 1px solid #F3F4F6;
  font-size: 15px !important;
  font-weight: 800 !important;
}

.brand-mark,
.topbar-logo {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 10px !important;
  color: #FFFFFF !important;
  background: #6366F1 !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 900;
}

.brand-mark img,
.topbar-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.topbar-logo {
  display: inline-grid;
  place-items: center;
}

.nav {
  gap: 3px !important;
}

.nav::before,
.nav::after {
  display: block;
  padding: 10px 12px 5px;
  color: #9CA3AF;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav::before {
  content: "Navigation";
}

.nav::after {
  content: "Account";
  order: 98;
}

.nav a,
.nav button {
  min-height: 44px !important;
  padding: 9px 12px !important;
  color: #6B7280 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.nav a span,
.nav button span {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  color: #9CA3AF !important;
  background: #F9FAFB !important;
  border: 1px solid #F3F4F6 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

.nav a:hover,
.nav button:hover {
  color: #374151 !important;
  background: #F9FAFB !important;
}

.nav a.active {
  color: #6366F1 !important;
  background: #EEF2FF !important;
}

.nav a.active span {
  color: #6366F1 !important;
  background: #E0E7FF !important;
  border-color: #C7D2FE !important;
}

.nav form {
  order: 99;
  margin-top: 4px;
}

.topbar {
  min-height: 72px;
}

.topbar-heading {
  gap: 12px;
}

.settings-logo-preview {
  width: 86px;
  height: 86px;
  display: inline-grid;
  place-items: center;
  object-fit: cover;
  border-radius: 16px;
  color: #FFFFFF;
  background: #6366F1;
  border: 1px solid #E5E7EB;
  font-size: 24px;
  font-weight: 900;
}

.logo-upload-preview {
  margin-bottom: 10px;
}

.ts-control,
.ts-dropdown {
  color: #111827 !important;
  background: #FFFFFF !important;
  border-color: #D1D5DB !important;
  box-shadow: none !important;
}

.ts-wrapper.focus .ts-control {
  border-color: #6366F1 !important;
  outline: 3px solid rgba(99, 102, 241, .14) !important;
}

.ts-dropdown {
  z-index: 100000 !important;
  box-shadow: 0 16px 35px rgba(17, 24, 39, .14) !important;
}

.ts-dropdown .active {
  color: #111827 !important;
  background: #EEF2FF !important;
}

.action-btn,
a.action-btn,
button.action-btn,
summary.action-btn {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  flex-basis: 38px !important;
}

.action-btn svg,
a.action-btn svg,
button.action-btn svg,
summary.action-btn svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
}

@media (max-width: 992px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }

  .sidebar,
  .sidebar-scroll {
    width: min(260px, 88vw) !important;
  }
}

@media (max-width: 576px) {
  .topbar-logo {
    display: none;
  }
}

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .app-shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
}

/* Premium teal white POS theme */
body:not(.login-page) {
  color: #f7ead4;
  background:
    radial-gradient(circle at 18% 10%, rgba(20, 184, 166, .16), transparent 26%),
    radial-gradient(circle at 92% 0%, rgba(111, 66, 37, .18), transparent 30%),
    linear-gradient(135deg, #120a07 0%, #21130f 44%, #3a2117 100%);
}
body:not(.login-page):before {
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 34px 34px;
}
.main { background: transparent; }
.topbar,
.card,
.stat-card,
.table-card,
.menu-product,
.menu-toolbar,
.premium-panel,
.user-pill {
  color: #f7ead4;
  background: linear-gradient(145deg, rgba(58, 33, 23, .78), rgba(24, 14, 10, .82));
  border-color: rgba(232, 211, 176, .18);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(16px);
}
.page-title,
.section-head h2,
.menu-product h3,
.menu-product strong,
.table-card p,
.metric,
.stat-card strong,
.status-strip strong,
.field label,
.kitchen-column h2 {
  color: #ffe6b0;
}
.muted,
.table-card small,
.menu-product p,
.order-row span,
.stock-line span,
.user-pill small,
.stat-card span {
  color: rgba(255, 247, 232, .68);
}
.sidebar {
  background:
    linear-gradient(180deg, rgba(21, 13, 10, .98), rgba(36, 23, 19, .98)),
    radial-gradient(circle at top, rgba(20, 184, 166, .18), transparent 34%);
}
.nav a:hover,
.nav button:hover,
.nav .active {
  background: linear-gradient(90deg, rgba(20, 184, 166, .18), rgba(255,255,255,.06));
  box-shadow: inset 3px 0 0 var(--accent), 0 0 24px rgba(20, 184, 166, .18);
}
.hero-band {
  border: 1px solid rgba(232, 211, 176, .18);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .34);
}
.stat-card:before { background: rgba(20, 184, 166, .12); }
.stat-card small,
.chip,
.field input,
.field select,
.field textarea,
.table th,
.order-row,
.stock-line,
.status-strip div,
.payment-preview,
.unit-label {
  color: #f7ead4;
  background: rgba(255, 247, 232, .08);
  border-color: rgba(232, 211, 176, .18);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 247, 232, .48); }
.chip:hover,
.chip.active {
  background: linear-gradient(135deg, var(--accent), #99F6E4);
  color: #21130f;
  box-shadow: 0 0 24px rgba(15, 118, 110, .20);
}
.table { background: rgba(24, 14, 10, .68); }
.table th,
.table td { border-bottom-color: rgba(232, 211, 176, .14); }
.table th { color: #ffe6b0; }
.btn {
  background: linear-gradient(135deg, #6a3e29, #3a2117);
  box-shadow: 0 10px 26px rgba(0,0,0,.2);
}
.btn.secondary {
  background: linear-gradient(135deg, var(--accent), #99F6E4);
  color: #21130f;
}
.btn.ghost {
  color: #ffe6b0;
  background: rgba(255, 247, 232, .09);
  border: 1px solid rgba(232, 211, 176, .18);
}
.btn:hover {
  box-shadow: 0 10px 26px rgba(0,0,0,.2);
}
.menu-product img { border-bottom: 1px solid rgba(232, 211, 176, .14); }
.menu-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed rgba(232, 211, 176, .32);
  border-radius: 16px;
  text-align: center;
  color: #ffe6b0;
  background: rgba(255, 247, 232, .06);
}
.invoice-card {
  max-width: 860px;
  color: #2a211d;
  background: #fffdf8;
}
.invoice-card .table,
.invoice-card .table th {
  color: #2a211d;
  background: #fffdf8;
}
.invoice-card .muted { color: #77665d; }
.invoice-totals {
  max-width: 460px;
  margin: 18px 0 18px auto;
}
.payment-preview {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
}
.invoice-totals th,
.invoice-totals td { color: #2a211d; }
.invoice-totals .grand th,
.invoice-totals .grand td {
  background: #241713;
  color: #ffe6b0;
  font-size: 20px;
}
.payment-preview {
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(240px, .42fr) 1fr;
  gap: 18px;
}
.profile-card {
  text-align: center;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), #2DD4BF);
  color: var(--espresso);
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(15, 118, 110, .22);
  overflow: hidden;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.inline-toggle {
  position: static;
  width: max-content;
  margin-top: 2px;
  background: rgba(20, 184, 166, .16);
  color: var(--cream);
  border: 1px solid rgba(20, 184, 166, .28);
  border-radius: 999px;
  padding: 7px 12px;
}
.form-actions {
  display: flex;
  align-items: end;
}
.danger-zone {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(184, 74, 59, .45);
}
.user-directory {
  margin-top: 18px;
}
.user-management-list {
  display: grid;
  gap: 14px;
}
.user-management-card {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) 1.6fr auto;
  gap: 14px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, .20);
  border-radius: 16px;
  background: rgba(255, 247, 232, .06);
}
.user-summary {
  display: grid;
  gap: 7px;
  align-self: center;
}
.user-list-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--coffee);
  color: var(--accent);
  font-weight: 900;
}
.user-list-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.user-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.user-edit-form .field {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .profile-grid,
  .user-management-card,
  .user-edit-form {
    grid-template-columns: 1fr;
  }
  .danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .invoice-card,
  .invoice-card .table,
  .invoice-card .table th {
    color: #111;
    background: #fff;
    box-shadow: none;
  }
}

.topbar-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-heading > div { min-width: 0; }
.sidebar-toggle,
.sidebar-backdrop {
  display: none;
}
.sidebar-toggle {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid rgba(232, 211, 176, .2);
  border-radius: 11px;
  background: rgba(255, 247, 232, .08);
  cursor: pointer;
}
.sidebar-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--accent);
}

@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .sidebar { padding-inline: 14px; }
  .main { padding: 22px; }
  .order-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .ops-grid { grid-template-columns: minmax(0, 1fr); }
  .order-row { grid-template-columns: minmax(180px, 1fr) auto auto; }
  .order-row .order-status-edit { grid-column: 1 / -1; }
  .status-strip { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
  .user-management-card { grid-template-columns: minmax(190px, .7fr) 1.5fr; }
  .user-management-card > form:last-child { grid-column: 2; }
  .table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 992px) {
  .app-shell { display: block; }
  .main {
    width: 100%;
    min-width: 0;
    padding: 20px;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 -105%;
    z-index: 12001;
    width: min(320px, 86vw);
    height: 100dvh;
    padding: 22px 18px;
    overflow-y: auto;
  }
  .sidebar.is-open { left: 0; }
  .sidebar-toggle { display: block; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 12000;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(9, 5, 3, .7);
  }
  body.sidebar-open {
    overflow: hidden;
    touch-action: none;
  }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .nav { display: grid; grid-template-columns: 1fr; }
  .topbar { overflow: visible; }
  .user-menu,
  .user-menu-dropdown { z-index: 10000; }
  .grid-4,
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid,
  .stat-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-grid,
  .profile-grid,
  .order-layout { grid-template-columns: 1fr; }
  .cart-panel {
    position: static;
    width: 100%;
  }
  .current-order-panel {
    max-height: none;
  }
  .current-order-items {
    max-height: 55vh;
  }
  .hero-panel {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .hero-total { text-align: left; }
  .status-columns {
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    padding-bottom: 8px;
  }
  .table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table th,
  .table td { white-space: nowrap; }
  .invoice-card .table th,
  .invoice-card .table td { white-space: normal; }
  .card,
  .premium-panel,
  .menu-product,
  .table-card { min-width: 0; }
  .user-management-card,
  .user-edit-form { grid-template-columns: 1fr; }
  .user-management-card > form:last-child { grid-column: auto; }
}

@media (max-width: 768px) {
  .login-page,
  .auth-page,
  :root .auth-page {
    background-attachment: scroll;
  }

  .main { padding: 16px; }
  .topbar {
    align-items: center;
    flex-wrap: wrap;
    padding: 14px;
  }
  .topbar-heading {
    flex: 1 1 280px;
    align-items: flex-start;
  }
  .topbar-heading small {
    display: block;
    max-width: 100%;
    line-height: 1.45;
  }
  .user-menu { margin-left: auto; }
  .user-menu-dropdown {
    position: absolute;
    right: 0;
    left: auto;
  }
  .hero-band,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero-band { padding: 20px; }
  .hero-band h2 { font-size: 26px; }
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-row { grid-template-columns: 1fr auto; }
  .order-row .order-status-edit { grid-column: 1 / -1; }
  .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-actions,
  .order-status-edit,
  .quick-actions {
    flex-wrap: wrap;
  }
  .payment-preview { width: 100%; }
  .invoice-card {
    width: 100%;
    padding: 14px;
  }
  .invoice-totals {
    width: 100%;
    max-width: none;
  }
  .danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .main { padding: 12px; }
  .topbar {
    gap: 12px;
    margin-bottom: 14px;
    border-radius: 14px;
  }
  .topbar-heading { flex-basis: 100%; }
  .page-title { font-size: 24px; }
  .user-menu { width: 100%; }
  .user-pill {
    width: 100%;
    box-shadow: none;
  }
  .user-menu-dropdown {
    width: 100%;
    min-width: 0;
  }
  .login-page { padding: 14px; }
  .login-card {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    min-width: 0;
    padding: 22px 18px;
    border-radius: 14px;
  }
  .login-card .field,
  .login-card input { min-width: 0; }
  .login-card p { overflow-wrap: anywhere; }
  .login-card h1 { font-size: 28px; }
  .hero-band {
    min-height: 0;
    padding: 18px;
  }
  .hero-panel { width: 100%; }
  .hero-total { font-size: 24px; }
  .util-ring { width: 108px; }
  .stat-grid,
  .stat-grid.compact,
  .menu-grid,
  .table-board { grid-template-columns: 1fr; }
  .card,
  .stat-card,
  .table-card { padding: 14px; }
  .stat-card { min-height: 112px; }
  .stat-card strong { font-size: 26px; }
  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }
  .chip { flex: 0 0 auto; }
  .menu-product img { height: 180px; }
  .order-row { grid-template-columns: 1fr; }
  .order-status-edit {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .order-status-edit select,
  .order-status-edit .btn { width: 100%; }
  .current-order-panel {
    padding: 14px;
  }
  .current-order-items { max-height: 55vh; }
  .form-actions { width: 100%; }
  .form-actions > *,
  .form-actions .btn,
  .danger-zone .btn { width: 100%; }
  .payment-dialog { padding: 18px; }
  .status-strip { grid-template-columns: 1fr 1fr; }
  .receipt-header { text-align: left; }
}

/* Dropdown visibility and clickability fixes */
.app-shell,
.main,
.page-enter,
.topbar,
.topbar-heading,
.grid,
.stat-grid,
.menu-grid,
.table-board,
.ops-grid,
.profile-grid,
.section-head,
.card,
.stat-card,
.table-card,
.table-tile,
.menu-product,
.menu-product-body,
.premium-panel,
.order-row,
.user-management-card {
  overflow: visible;
}

.topbar {
  z-index: 10000;
}

.sidebar {
  z-index: 9000;
}

.independent-dropdown {
  position: relative;
  display: inline-block;
  z-index: 99999;
  overflow: visible;
}

.independent-dropdown[open] {
  z-index: 100002;
}

.independent-dropdown summary {
  cursor: pointer;
  list-style: none;
}

.independent-dropdown summary::-webkit-details-marker {
  display: none;
}

.independent-dropdown > form {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(340px, calc(100vw - 32px));
  max-height: min(74vh, 620px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: #2c2c2c;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.independent-dropdown > form .field label,
.independent-dropdown > form label {
  color: #ffffff;
}

.independent-dropdown > form input,
.independent-dropdown > form select,
.independent-dropdown > form textarea,
select {
  color: #ffffff;
  background-color: #2c2c2c;
  border-color: rgba(255, 255, 255, .18);
}

.independent-dropdown > form option,
select option {
  color: #ffffff;
  background-color: #2c2c2c;
}

.independent-dropdown > form input::placeholder,
.independent-dropdown > form textarea::placeholder {
  color: rgba(255, 255, 255, .58);
}

.independent-dropdown .btn:hover,
.independent-dropdown > form .btn:hover {
  background: #0F766E;
  color: #ffffff;
}

dialog {
  z-index: 100000;
}

dialog::backdrop {
  z-index: 99999;
}

@media (max-width: 768px) {
  .report-chart-grid {
    grid-template-columns: 1fr;
  }

  .plan-edit-page {
    padding-bottom: 96px;
  }

  .plan-edit-grid {
    grid-template-columns: 1fr;
  }

  .independent-dropdown {
    width: 100%;
  }

  .independent-dropdown > summary.btn,
  .independent-dropdown > form {
    width: 100%;
  }

  .independent-dropdown > form {
    right: auto;
    left: 0;
    max-height: 70vh;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-to-superadmin-form {
  margin: 0;
}

.back-to-superadmin-btn {
  height: 38px !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
  border: 1px solid #D1D5DB !important;
  border-color: #D1D5DB !important;
  border-radius: 8px !important;
  color: #374151 !important;
  background: #FFFFFF !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.back-to-superadmin-btn:hover {
  background: #F9FAFB !important;
  color: #111827 !important;
  border-color: #9CA3AF !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08) !important;
}

.back-to-superadmin-btn:active {
  background: #F3F4F6 !important;
  color: #111827 !important;
  border-color: #9CA3AF !important;
  box-shadow: none !important;
}

.back-to-admin-form {
  margin: 0;
}

.back-to-admin-btn {
  height: 38px !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
  border: 1px solid #D1D5DB !important;
  border-color: #D1D5DB !important;
  border-radius: 8px !important;
  color: #374151 !important;
  background: #FFFFFF !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.back-to-admin-btn:hover {
  background: #F9FAFB !important;
  color: #111827 !important;
  border-color: #9CA3AF !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08) !important;
}

.back-to-admin-btn:active {
  background: #F3F4F6 !important;
  color: #111827 !important;
  border-color: #9CA3AF !important;
  box-shadow: none !important;
}

.admin-user-view-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #BFDBFE;
  border-radius: 999px;
  background: #EFF6FF;
  color: #1F2937;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.pos-shell {
  height: calc(100vh - 122px);
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  gap: 10px;
}

.main:has(.pos-shell) {
  height: 100vh !important;
  overflow: hidden !important;
}

.page-content:has(.pos-shell) {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.pos-header,
.pos-panel {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.pos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  overflow: hidden;
}

.pos-brand,
.pos-header-search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pos-logo {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #F3F4F6;
  color: #111827;
  font-weight: 800;
  overflow: hidden;
}

.pos-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pos-brand strong,
.pos-brand small {
  display: block;
  white-space: nowrap;
}

.pos-brand small,
.pos-header-search span {
  color: #6B7280;
  font-size: 12px;
}

.pos-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(180px, 18%) minmax(360px, 1fr) minmax(330px, 31%);
  gap: 10px;
  overflow: hidden;
}

.pos-panel {
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.pos-left,
.pos-cart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pos-left .field,
.pos-cart .field {
  margin-bottom: 0;
}

.pos-left label,
.pos-cart label {
  margin-bottom: 4px;
  font-size: 12px;
}

.pos-left input,
.pos-left select,
.pos-left textarea,
.pos-cart input {
  min-height: 36px;
  height: 36px;
  padding: 8px 10px;
}

.pos-left textarea {
  min-height: 64px;
  height: 64px;
}

.pos-table-list {
  display: grid;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.pos-table,
.pos-payment-methods button {
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  background: #FFFFFF;
  color: #374151;
  padding: 7px 9px;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
}

.pos-table.active,
.pos-payment-methods button.active {
  border-color: #2563EB;
  background: #EFF6FF;
  color: #1D4ED8;
}

.pos-table.available { border-left: 4px solid #16A34A; }
.pos-table.booked { border-left: 4px solid #F59E0B; }
.pos-table.occupied { border-left: 4px solid #DC2626; opacity: .72; }

.pos-center {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.pos-search-bar {
  flex-shrink: 0;
}

.pos-search-bar input {
  width: 100%;
  height: 42px;
}

.pos-products {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  align-content: start;
  gap: 10px;
  padding-right: 4px;
}

.pos-product {
  min-height: 176px;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  background: #FFFFFF;
  color: #111827;
  padding: 9px;
  text-align: left;
  cursor: pointer;
}

.pos-product img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 6px;
}

.pos-product strong,
.pos-product small,
.pos-product b {
  display: block;
}

.pos-product strong {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.25;
  min-height: 34px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pos-product small {
  color: #6B7280;
  font-size: 12px;
}

.pos-product b {
  margin-top: 3px;
  color: #111827;
}

.pos-product.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}

.pos-product.is-focused,
.pos-cart-line.is-focused {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}

.pos-cart-head,
.pos-payment-methods {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pos-cart-head {
  justify-content: space-between;
  flex-shrink: 0;
}

.pos-cart-head h2 {
  margin: 0;
  font-size: 18px;
}

.pos-cart-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 4px;
}

.current-order-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.current-order-footer {
  flex-shrink: 0;
  display: grid;
  gap: 8px;
  background: #FFFFFF;
  border-top: 1px solid #E5E7EB;
  padding-top: 8px;
}

.pos-cart-controls {
  display: grid;
  grid-template-columns: minmax(92px, .42fr) minmax(0, 1fr);
  gap: 8px;
}

.pos-cart-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 8px;
}

.pos-cart-line img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 9px;
}

.pos-cart-info {
  min-width: 0;
}

.pos-cart-info strong,
.pos-cart-info small {
  display: block;
}

.pos-cart-info input {
  height: 32px;
  margin-top: 6px;
  font-size: 12px;
}

.pos-modifiers {
  display: grid;
  gap: 3px;
  margin-top: 5px;
  font-size: 11px;
}

.pos-qty {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.pos-qty button {
  min-width: 28px;
  min-height: 28px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #F9FAFB;
}

.pos-totals {
  display: grid;
  gap: 4px;
}

.pos-totals span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pos-totals small {
  color: #6B7280;
}

.pos-totals .grand {
  font-size: 20px;
  font-weight: 800;
  padding-top: 5px;
  border-top: 1px solid #E5E7EB;
}

.pos-payment-methods button {
  flex: 1 1 92px;
  text-align: center;
  min-height: 34px;
}

.pos-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pos-actions .btn {
  min-height: 36px;
  padding: 8px 10px;
  white-space: nowrap;
}

.pos-message {
  border-radius: 10px;
  padding: 10px;
  background: #DCFCE7;
  color: #166534;
  font-weight: 700;
}

.pos-message.error {
  background: #FEE2E2;
  color: #991B1B;
}

.pos-empty,
.pos-cart-empty {
  padding: 16px;
  text-align: center;
  color: #6B7280;
  align-self: center;
  justify-self: center;
}

.pos-actions .disabled {
  pointer-events: none;
  opacity: .45;
}

@media (max-width: 992px) {
  .pos-shell {
    height: calc(100vh - 96px);
    min-height: 0;
    overflow: hidden;
  }

  .pos-layout {
    grid-template-columns: minmax(160px, .75fr) minmax(260px, 1fr) minmax(300px, 1fr);
    overflow: hidden;
  }

  .pos-products,
  .pos-cart-items {
    max-height: none;
  }

  .pos-payment-methods button {
    flex-basis: 80px;
  }
}

@media (max-width: 768px) {
  .pos-shell {
    height: auto;
    overflow: visible;
  }

  .pos-layout {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .pos-products,
  .pos-cart-items,
  .pos-table-list {
    max-height: 42vh;
  }

  .current-order-panel {
    height: auto;
  }
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.report-print-header {
  display: none;
}

.report-table th,
.report-table td {
  white-space: nowrap;
}

.report-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.chart-card {
  min-width: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.chart-card h2 {
  margin-bottom: 4px;
}

.chart-canvas-wrap {
  position: relative;
  min-height: 320px;
  height: 320px;
  margin-top: 14px;
}

.chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
}

:root body:not(.login-page) {
  color: var(--text-color);
  background: var(--page-bg);
}

:root body:not(.login-page):before {
  background: none;
}

:root .topbar,
:root .card,
:root .stat-card,
:root .table-card,
:root .menu-product,
:root .menu-toolbar,
:root .premium-panel,
:root .user-pill {
  color: #25170f;
  background: var(--card-bg);
  border-color: var(--border-color);
  box-shadow: 0 18px 50px rgba(36, 23, 19, .12);
}

:root .topbar {
  background: var(--navbar-bg);
}

:root .sidebar {
  color: var(--text-color);
  background: var(--sidebar-bg);
}

:root .brand,
:root .nav a span,
:root .nav button span {
  color: var(--accent-color);
}

:root .nav a,
:root .nav button {
  color: var(--text-color);
}

:root .nav a:hover,
:root .nav button:hover,
:root .nav .active {
  background: var(--hover-bg);
  box-shadow: inset 3px 0 0 var(--accent-color);
}

:root .page-title,
:root .section-head h2,
:root .menu-product h3,
:root .menu-product strong,
:root .table-card p,
:root .metric,
:root .stat-card strong,
:root .status-strip strong,
:root .field label,
:root .kitchen-column h2 {
  color: var(--dark-brown);
}

:root .muted,
:root .table-card small,
:root .menu-product p,
:root .order-row span,
:root .stock-line span,
:root .user-pill small,
:root .stat-card span {
  color: var(--muted-text);
}

:root .stat-card small,
:root .chip,
:root .field input,
:root .field select,
:root .field textarea,
:root .table th,
:root .order-row,
:root .stock-line,
:root .status-strip div,
:root .payment-preview,
:root .unit-label {
  color: var(--text-color);
  background: var(--section-bg);
  border-color: var(--border-color);
}

:root .table {
  color: var(--text-color);
  background: var(--card-bg);
}

:root .table th {
  color: var(--dark-brown);
  background: var(--navbar-bg);
}

:root .table td {
  border-bottom-color: var(--border-color);
}

:root select,
:root select option,
:root .independent-dropdown > form input,
:root .independent-dropdown > form select,
:root .independent-dropdown > form textarea {
  color: var(--text-color);
  background: var(--input-bg);
}

:root .independent-dropdown > form {
  color: var(--text-color);
  background: var(--card-bg);
  border-color: var(--border-color);
}

:root .independent-dropdown > form .field label,
:root .independent-dropdown > form label {
  color: var(--dark-brown);
}

:root .user-menu-dropdown {
  color: var(--text-color);
  background: var(--card-bg);
  border-color: var(--border-color);
}

:root .user-menu-dropdown button,
:root .user-menu-dropdown a {
  color: var(--text-color);
}

:root .user-menu-dropdown button:hover,
:root .user-menu-dropdown a:hover,
:root .independent-dropdown .btn:hover,
:root .independent-dropdown > form .btn:hover {
  background: var(--hover-bg);
  color: var(--text-color);
}

:root .btn.ghost {
  color: var(--dark-brown);
  background: var(--navbar-bg);
  border-color: var(--border-color);
}

:root .alert {
  background: var(--success-bg);
  color: #305a35;
}

:root .alert.error {
  background: var(--danger-bg);
  color: #7d3026;
}

:root .badge.pending,
:root .badge.reserved {
  background: var(--warning-bg);
  color: var(--dark-brown);
}

:root body:not(.login-page) {
  color: var(--text-primary);
  background: linear-gradient(135deg, #F7F4EF 0%, #EFE9E1 100%);
}

:root .login-card {
  color: var(--text-primary);
  background: rgba(255, 253, 249, .94);
  border-color: rgba(255, 255, 255, .55);
  box-shadow: var(--card-shadow), 0 28px 80px rgba(43, 31, 24, .18);
}

:root .login-card h1,
:root .login-card .field label {
  color: var(--text-primary);
}

:root .login-card p,
:root .check-row,
:root .login-link,
:root .login-hint {
  color: var(--text-secondary);
}

:root .login-card .field input {
  color: var(--input-text);
  background: var(--input-bg);
  border-color: var(--input-border);
}

:root .login-card .field input::placeholder {
  color: var(--input-placeholder);
}

:root .login-card .btn {
  background: var(--accent);
  color: var(--sidebar-active-text);
  box-shadow: var(--card-shadow);
}

:root .login-card .btn.ghost,
:root .login-card .btn.secondary {
  color: var(--text-primary);
  background: var(--accent-soft);
  border: 1px solid var(--input-border);
}

:root .topbar {
  color: var(--navbar-text);
  background: var(--navbar-bg);
  border-color: var(--card-border);
  box-shadow: var(--card-shadow);
}

:root .sidebar {
  color: var(--sidebar-text);
  background:
    linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-secondary));
  box-shadow: 14px 0 40px rgba(53, 39, 31, .14);
}

:root .brand {
  color: var(--accent);
}

:root .nav a,
:root .nav button {
  color: var(--sidebar-text);
}

:root .nav a span,
:root .nav button span {
  color: var(--accent);
  background: rgba(255, 255, 255, .08);
}

:root .nav a:hover,
:root .nav button:hover {
  color: var(--sidebar-text);
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 3px 0 0 var(--accent);
}

:root .nav .active {
  color: var(--sidebar-active-text);
  background: var(--sidebar-active-bg);
  box-shadow: none;
}

:root .nav .active span {
  color: var(--sidebar-active-text);
  background: rgba(31, 21, 15, .08);
}

:root .card,
:root .stat-card,
:root .table-card,
:root .menu-product,
:root .menu-toolbar,
:root .premium-panel,
:root .user-pill,
:root .invoice-card,
:root .current-order-panel,
:root .kot-card {
  color: var(--text-primary);
  background: var(--card-bg);
  border-color: var(--card-border);
  box-shadow: var(--card-shadow);
}

:root .page-title,
:root .section-head h2,
:root .menu-product h3,
:root .table-card p,
:root .metric,
:root .stat-card strong,
:root .status-strip strong,
:root .field label,
:root .kitchen-column h2,
:root h1,
:root h2,
:root h3 {
  color: var(--text-primary);
}

:root .muted,
:root .table-card small,
:root .menu-product p,
:root .order-row span,
:root .stock-line span,
:root .user-pill small,
:root .stat-card span,
:root small {
  color: var(--text-secondary);
}

:root .menu-product strong,
:root .eyebrow,
:root .hero-total,
:root .unit-label,
:root .invoice-totals .grand th,
:root .invoice-totals .grand td {
  color: var(--accent);
}

:root .stat-card small,
:root .chip,
:root .order-row,
:root .stock-line,
:root .status-strip div,
:root .payment-preview,
:root .unit-label,
:root .menu-empty,
:root [data-cart-line] {
  color: var(--text-primary);
  background: var(--card-bg-soft);
  border-color: var(--card-border);
}

:root .field input,
:root .field select,
:root .field textarea,
:root select,
:root .form-select {
  color: var(--input-text);
  background: var(--input-bg);
  border-color: var(--input-border);
}

:root .field input::placeholder,
:root .field textarea::placeholder {
  color: var(--input-placeholder);
}

:root .field input:focus,
:root .field select:focus,
:root .field textarea:focus,
:root select:focus,
:root .form-select:focus {
  border-color: var(--input-focus);
  outline: 2px solid rgba(15, 118, 110, .18);
  outline-offset: 1px;
}

:root .btn {
  color: var(--sidebar-active-text);
  background: var(--accent);
  box-shadow: var(--card-shadow);
}

:root .btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

:root .btn.secondary,
:root .btn.ghost {
  color: var(--text-primary);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

:root .btn.danger {
  color: var(--danger-text);
  background: var(--danger-bg);
  border: 1px solid rgba(150, 59, 50, .22);
}

:root .table,
:root .invoice-card .table {
  color: var(--text-primary);
  background: var(--table-row-bg);
}

:root .table th,
:root .invoice-card .table th {
  color: var(--text-primary);
  background: var(--table-header-bg);
}

:root .table td,
:root .table th {
  border-bottom-color: var(--table-border);
}

:root .table tr:hover td {
  background: var(--table-row-hover);
}

:root .dropdown-menu,
:root .user-menu-dropdown,
:root .independent-dropdown > form,
:root select option {
  color: var(--dropdown-text);
  background: var(--dropdown-bg);
  border-color: var(--dropdown-border);
}

:root .dropdown-menu,
:root .user-menu-dropdown,
:root .independent-dropdown > form {
  z-index: 99999;
  box-shadow: 0 12px 28px rgba(43, 31, 24, .16);
}

:root .dropdown-item:hover,
:root .user-menu-dropdown a:hover,
:root .user-menu-dropdown button:hover,
:root .independent-dropdown .btn:hover,
:root .independent-dropdown > form .btn:hover {
  color: var(--dropdown-text);
  background: var(--dropdown-hover);
}

:root .payment-dialog,
:root dialog {
  color: var(--text-primary);
  background: var(--card-bg);
  border-color: var(--card-border);
  box-shadow: 0 18px 50px rgba(43, 31, 24, .18);
}

:root .alert {
  color: var(--success-text);
  background: var(--success-bg);
}

:root .alert.error,
:root .badge.danger,
:root .badge.cancelled {
  color: var(--danger-text);
  background: var(--danger-bg);
}

:root .badge.ready,
:root .badge.available,
:root .badge.paid,
:root .badge.completed {
  color: var(--success-text);
  background: var(--success-bg);
}

:root .badge.pending,
:root .badge.reserved,
:root .badge.preparing {
  color: var(--warning-text);
  background: var(--warning-bg);
}

:root .badge.sent_to_kitchen,
:root .badge.served {
  color: var(--info-text);
  background: var(--info-bg);
}

:root .badge.occupied,
:root .table-card.occupied {
  color: var(--danger-text);
}

:root .table-card.available {
  border-left-color: var(--success-text);
}

:root .table-card.reserved {
  border-left-color: var(--info-text);
}

:root .table-card.occupied {
  border-left-color: var(--danger-text);
}

:root .table-card.booked {
  border-left-color: var(--warning-text);
}

:root .current-order-items {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

:root .current-order-items::-webkit-scrollbar,
:root ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

:root .current-order-items::-webkit-scrollbar-track,
:root ::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

:root .current-order-items::-webkit-scrollbar-thumb,
:root ::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
}

:root .current-order-items::-webkit-scrollbar-thumb:hover,
:root ::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-hover);
}

/* Premium white-first teal theme */
:root {
  --page-bg: #F8FAFC;
  --page-bg-secondary: #F1F5F9;
  --sidebar-bg: #FFFFFF;
  --sidebar-secondary: #FFFFFF;
  --sidebar-text: #0F172A;
  --sidebar-muted: #64748B;
  --sidebar-active-bg: #F0FDFA;
  --sidebar-active-text: #0F172A;
  --navbar-bg: #FFFFFF;
  --navbar-text: #0F172A;
  --card-bg: #FFFFFF;
  --card-bg-soft: #F9FAFB;
  --card-border: #E2E8F0;
  --card-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --accent: #0F766E;
  --accent-hover: #0D5F59;
  --accent-soft: #F0FDFA;
  --input-bg: #FFFFFF;
  --input-border: #E2E8F0;
  --input-text: #0F172A;
  --input-placeholder: #94A3B8;
  --input-focus: #0F766E;
  --table-header-bg: #F9FAFB;
  --table-row-bg: #FFFFFF;
  --table-row-hover: #F5F5F5;
  --table-border: #E2E8F0;
  --dropdown-bg: #FFFFFF;
  --dropdown-text: #0F172A;
  --dropdown-hover: #F3F4F6;
  --dropdown-border: #E2E8F0;
  --success-bg: #DCFCE7;
  --success-text: #16A34A;
  --warning-bg: #FEF3C7;
  --warning-text: #D97706;
  --danger-bg: #FEE2E2;
  --danger-text: #DC2626;
  --info-bg: #CCFBF1;
  --info-text: #0284C7;
  --scrollbar-track: #E2E8F0;
  --scrollbar-thumb: #0F766E;
  --scrollbar-hover: #0D5F59;
  --section-bg: #F9FAFB;
  --hover-bg: #F3F4F6;
  --active-bg: #F0FDFA;
  --text-color: #0F172A;
  --muted-text: #64748B;
  --border-color: #E2E8F0;
  --accent-color: #0F766E;
  --dark-brown: #0F172A;
  --coffee: #0F172A;
  --espresso: #FFFFFF;
  --cream: #FFFFFF;
  --paper: #FFFFFF;
  --line: #E2E8F0;
  --ink: #0F172A;
  --muted: #64748B;
}

:root body,
:root body:not(.login-page) {
  color: var(--text-primary);
  background: var(--page-bg);
}

:root body:before,
:root body:not(.login-page):before {
  background: none;
}

:root .main,
:root .page-enter {
  background: transparent;
}

:root .sidebar {
  color: var(--sidebar-text);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--card-border);
  box-shadow: 8px 0 26px rgba(31, 41, 55, .06);
}

:root .brand {
  color: var(--text-primary);
}

:root .brand-mark,
:root .login-mark {
  color: #FFFFFF;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(15, 118, 110, .22);
}

:root .nav a,
:root .nav button {
  color: var(--sidebar-text);
}

:root .nav a span,
:root .nav button span {
  color: #4B5563;
  background: #F3F4F6;
}

:root .nav a:hover,
:root .nav button:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
  box-shadow: none;
}

:root .nav .active {
  color: var(--sidebar-active-text);
  background: var(--sidebar-active-bg);
  box-shadow: inset 3px 0 0 var(--accent);
}

:root .nav .active span {
  color: var(--accent);
  background: #FFFFFF;
}

:root .topbar {
  color: var(--navbar-text);
  background: var(--navbar-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 18px rgba(31, 41, 55, .08);
}

:root .topbar small,
:root .user-pill small,
:root .muted,
:root small {
  color: var(--text-secondary);
}

:root .card,
:root .stat-card,
:root .table-card,
:root .menu-product,
:root .menu-toolbar,
:root .premium-panel,
:root .invoice-card,
:root .current-order-panel,
:root .kot-card,
:root .chart-card,
:root .payment-preview,
:root .status-strip div,
:root .stock-line,
:root .order-row,
:root [data-cart-line],
:root .menu-empty {
  color: var(--text-primary);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}

:root .stat-card {
  border-radius: 16px;
}

:root .card h1,
:root .card h2,
:root .card h3,
:root .page-title,
:root .section-head h2,
:root .metric,
:root .stat-card strong,
:root .menu-product h3,
:root .menu-product strong,
:root .table-card p,
:root .field label,
:root .kitchen-column h2 {
  color: var(--text-primary);
}

:root .eyebrow,
:root .hero-total,
:root .invoice-totals .grand th,
:root .invoice-totals .grand td {
  color: var(--accent);
}

:root .field input,
:root .field select,
:root .field textarea,
:root select,
:root .form-select {
  color: var(--input-text);
  background: var(--input-bg);
  border-color: var(--input-border);
}

:root .field input:focus,
:root .field select:focus,
:root .field textarea:focus,
:root select:focus,
:root .form-select:focus {
  border-color: var(--input-focus);
  outline: 3px solid rgba(20, 184, 166, .18);
}

:root .btn {
  color: #FFFFFF;
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 6px 16px rgba(15, 118, 110, .22);
}

:root .btn:hover {
  color: #FFFFFF;
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

:root .btn.secondary,
:root .btn.ghost,
:root .login-card .btn.ghost,
:root .login-card .btn.secondary {
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 14px rgba(31, 41, 55, .06);
}

:root .btn.secondary:hover,
:root .btn.ghost:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
  border-color: var(--card-border);
}

:root .btn.danger {
  color: #FFFFFF;
  background: var(--danger-text);
  border-color: var(--danger-text);
}

:root .table,
:root .invoice-card .table {
  color: var(--text-primary);
  background: var(--table-row-bg);
  border: 1px solid var(--table-border);
  box-shadow: none;
}

:root .table th,
:root .invoice-card .table th {
  color: var(--text-primary);
  background: var(--table-header-bg);
  border-bottom-color: var(--table-border);
}

:root .table td {
  color: var(--text-primary);
  background: var(--table-row-bg);
  border-bottom-color: var(--table-border);
}

:root .table tr:hover td {
  background: var(--table-row-hover);
}

:root .dropdown-menu,
:root .user-menu-dropdown,
:root .independent-dropdown > form,
:root select option {
  color: var(--dropdown-text);
  background: var(--dropdown-bg);
  border-color: var(--dropdown-border);
}

:root .dropdown-menu,
:root .user-menu-dropdown,
:root .independent-dropdown > form {
  box-shadow: 0 12px 30px rgba(31, 41, 55, .14);
}

:root .dropdown-item:hover,
:root .user-menu-dropdown a:hover,
:root .user-menu-dropdown button:hover,
:root .independent-dropdown .btn:hover,
:root .independent-dropdown > form .btn:hover {
  color: var(--dropdown-text);
  background: var(--dropdown-hover);
}

:root .user-pill {
  color: var(--text-primary);
  background: #FFFFFF;
  border-color: var(--card-border);
  box-shadow: 0 4px 14px rgba(31, 41, 55, .08);
}

:root .user-pill > span {
  color: #FFFFFF;
  background: var(--accent);
}

:root .login-card {
  color: var(--text-primary);
  background: rgba(255, 255, 255, .96);
  border-color: rgba(229, 231, 235, .86);
  box-shadow: 0 20px 55px rgba(31, 41, 55, .18);
}

:root .login-card h1,
:root .login-card p,
:root .login-card .field label,
:root .check-row,
:root .login-link,
:root .login-hint {
  color: var(--text-primary);
}

:root .login-card p,
:root .login-hint {
  color: var(--text-secondary);
}

:root .login-card .btn:not(.ghost):not(.secondary) {
  color: #FFFFFF;
  background: var(--accent);
  border-color: var(--accent);
}

:root .chart-canvas-wrap,
:root .chart-empty {
  color: var(--text-secondary);
  background: #FFFFFF;
  border-color: var(--card-border);
}

:root .payment-dialog,
:root dialog {
  color: var(--text-primary);
  background: #FFFFFF;
  border-color: var(--card-border);
}

:root .badge.available,
:root .badge.ready,
:root .badge.paid,
:root .badge.completed {
  color: var(--success-text);
  background: var(--success-bg);
}

:root .badge.booked,
:root .badge.pending,
:root .badge.preparing {
  color: #92400E;
  background: var(--warning-bg);
}

:root .badge.occupied,
:root .badge.danger,
:root .badge.cancelled {
  color: var(--danger-text);
  background: var(--danger-bg);
}

:root .badge.reserved,
:root .badge.sent_to_kitchen,
:root .badge.served {
  color: var(--info-text);
  background: var(--info-bg);
}

:root .table-card.available {
  border-left-color: var(--success-text);
}

:root .table-card.booked {
  border-left-color: var(--warning-text);
}

:root .table-card.occupied {
  border-left-color: var(--danger-text);
}

:root .table-card.reserved {
  border-left-color: var(--info-text);
}

:root .hero-band.premium-hero {
  color: #0F172A;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

:root .hero-band.premium-hero:after {
  background: radial-gradient(circle, rgba(15, 118, 110, .12), transparent 68%);
}

:root .hero-band.premium-hero .eyebrow {
  color: #64748B;
  font-weight: 500;
}

:root .hero-band.premium-hero h2 {
  color: #0F172A;
  font-weight: 700;
}

:root .hero-band.premium-hero p,
:root .hero-band.premium-hero .hero-total span,
:root .hero-band.premium-hero .util-ring span {
  color: #64748B;
}

:root .hero-band.premium-hero .hero-total,
:root .hero-band.premium-hero .util-ring strong {
  color: #0F766E;
}

:root .hero-band.premium-hero .quick-actions a {
  color: #0F172A;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 12px rgba(31, 41, 55, .06);
}

:root .hero-band.premium-hero .quick-actions a:hover {
  color: #0F172A;
  background: #F0FDFA;
  border-color: rgba(15, 118, 110, .30);
}

:root .hero-band.premium-hero .util-ring {
  background:
    radial-gradient(circle at center, #FFFFFF 0 58%, transparent 59%),
    conic-gradient(#0F766E calc(var(--value) * 1%), #E2E8F0 0);
  box-shadow: inset 0 0 0 1px #E2E8F0, 0 8px 20px rgba(31, 41, 55, .08);
}

.auth-theme-login {
  --auth-page-bg: #F8FAFC;
  --auth-card-bg: rgba(10, 38, 35, .76);
  --auth-card-border: rgba(255, 255, 255, .30);
  --auth-text-primary: #FFFFFF;
  --auth-text-secondary: rgba(240, 253, 250, .82);
  --auth-input-bg: rgba(255, 255, 255, .94);
  --auth-input-border: rgba(204, 251, 241, .62);
  --auth-input-text: #FFFFFF;
  --auth-placeholder: #64748B;
  --auth-accent: #0F766E;
  --auth-accent-hover: #2DD4BF;
}

.auth-page,
:root .auth-page {
  color: var(--auth-text-primary);
  background: url("../images/login-bg.jpg") center/cover no-repeat fixed;
}

.auth-page .login-overlay,
:root .auth-page .login-overlay {
  background: linear-gradient(135deg, rgba(15, 118, 110, .55), rgba(15, 118, 110, .40));
}

.auth-page .login-card,
:root .auth-page .login-card {
  color: var(--auth-text-primary);
  background: var(--auth-card-bg);
  border-color: var(--auth-card-border);
  box-shadow: 0 28px 80px rgba(7, 47, 43, .36);
  backdrop-filter: blur(20px);
}

.auth-page .login-card h1,
.auth-page .login-card .field label,
:root .auth-page .login-card h1,
:root .auth-page .login-card .field label {
  color: var(--auth-text-primary);
}

.auth-page .login-card p,
.auth-page .check-row,
.auth-page .login-link,
.auth-page .login-hint,
:root .auth-page .login-card p,
:root .auth-page .check-row,
:root .auth-page .login-link,
:root .auth-page .login-hint {
  color: var(--auth-text-secondary);
}

.auth-page .field input,
.auth-page .field select,
.auth-page .field textarea,
:root .auth-page .field input,
:root .auth-page .field select,
:root .auth-page .field textarea {
  color: #0F172A;
  background: var(--auth-input-bg);
  border-color: var(--auth-input-border);
}

.auth-page .field input::placeholder,
.auth-page .field textarea::placeholder,
:root .auth-page .field input::placeholder,
:root .auth-page .field textarea::placeholder {
  color: var(--auth-placeholder);
}

.auth-page .field input:focus,
.auth-page .field select:focus,
.auth-page .field textarea:focus,
:root .auth-page .field input:focus,
:root .auth-page .field select:focus,
:root .auth-page .field textarea:focus {
  border-color: var(--auth-accent);
  outline: 3px solid rgba(20, 184, 166, .18);
}

.auth-page .btn,
:root .auth-page .btn {
  color: #120C09;
  background: var(--auth-accent);
  border: 1px solid var(--auth-accent);
  box-shadow: 0 10px 24px rgba(20, 184, 166, .22);
}

.auth-page .btn:hover,
:root .auth-page .btn:hover {
  color: #120C09;
  background: var(--auth-accent-hover);
  border-color: var(--auth-accent-hover);
}

.auth-page .btn.ghost,
.auth-page .btn.secondary,
:root .auth-page .btn.ghost,
:root .auth-page .btn.secondary {
  color: var(--auth-text-primary);
  background: rgba(255, 248, 237, .10);
  border: 1px solid var(--auth-input-border);
  box-shadow: none;
}

.auth-page .btn.ghost:hover,
.auth-page .btn.secondary:hover,
:root .auth-page .btn.ghost:hover,
:root .auth-page .btn.secondary:hover {
  color: var(--auth-text-primary);
  background: rgba(20, 184, 166, .18);
  border-color: var(--auth-card-border);
}

.auth-page .login-mark,
:root .auth-page .login-mark {
  color: #120C09;
  background: linear-gradient(135deg, var(--auth-accent), #99F6E4);
  box-shadow: 0 12px 28px rgba(20, 184, 166, .25);
}

.ts-wrapper {
  width: 100%;
}

.ts-wrapper,
.ts-wrapper *,
.ts-dropdown {
  transition: none;
  animation: none;
}

.ts-control,
.ts-dropdown {
  border-color: rgba(255, 255, 255, .18);
  background: #2c2c2c;
  color: #ffffff;
}

.ts-control {
  min-height: 42px;
  border-radius: 11px;
  padding: 8px 10px;
}

.ts-control input {
  color: inherit;
}

.ts-dropdown {
  z-index: 99999;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.ts-dropdown .option,
.ts-dropdown .no-results {
  color: #ffffff;
  padding: 10px;
}

.ts-dropdown .active {
  color: #ffffff;
  background: #0F766E;
}

.ts-wrapper.single .ts-control:after {
  border-color: #ffffff transparent transparent transparent;
}

:root .ts-control,
:root .ts-dropdown {
  color: var(--dropdown-text);
  background: var(--dropdown-bg);
  border-color: var(--dropdown-border);
}

:root .ts-dropdown {
  box-shadow: 0 12px 30px rgba(31, 41, 55, .14);
}

:root .ts-dropdown .option,
:root .ts-dropdown .no-results,
:root .ts-control input {
  color: var(--dropdown-text);
}

:root .ts-dropdown .active {
  color: var(--dropdown-text);
  background: var(--dropdown-hover);
}

:root .ts-wrapper.single .ts-control:after {
  border-color: var(--dropdown-text) transparent transparent transparent;
}

@media print {
  .sidebar,
  .navbar,
  .topbar,
  .report-actions,
  button,
  .no-print {
    display: none !important;
  }

  .app-shell,
  .main,
  .page-enter {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    background: #fff !important;
    color: #000 !important;
  }

  .report-content,
  .report-content .card,
  .report-content .table,
  .report-content .table th,
  .report-content .table td {
    width: 100%;
    color: #000 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .report-print-header {
    display: block;
  }

  .report-content .card {
    border: 1px solid #ccc;
    margin: 0 0 12px !important;
    break-inside: avoid;
  }

  .report-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .chart-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .chart-canvas-wrap {
    height: 260px;
    min-height: 260px;
  }

  .report-content .table {
    display: table;
    border-collapse: collapse;
  }

  .report-content .table th,
  .report-content .table td {
    border: 1px solid #777;
    white-space: normal;
  }
}

/* Final premium SaaS override - keep this last */
body:not(.auth-page):not(.login-page) {
  color: #374151 !important;
  background: #F6F8FB !important;
  background-image: none !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body:not(.auth-page):not(.login-page)::before,
body:not(.auth-page):not(.login-page)::after,
.hero-band::before,
.hero-band::after,
.stat-card::before,
.stat-card::after,
.card::before,
.card::after,
.premium-panel::before,
.premium-panel::after {
  content: none !important;
  display: none !important;
}

.app-shell {
  grid-template-columns: 240px minmax(0, 1fr) !important;
  background: #F6F8FB !important;
}

.main {
  min-width: 0;
  padding: 24px !important;
  background: transparent !important;
}

.page-enter {
  max-width: 1600px;
  margin: 0 auto;
}

.sidebar,
.sidebar-scroll {
  width: 240px !important;
  padding: 16px 12px !important;
  color: #374151 !important;
  background: #FFFFFF !important;
  border-right: 1px solid #E5E7EB !important;
  box-shadow: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: #9CA3AF transparent;
}

.sidebar::-webkit-scrollbar,
.sidebar-scroll::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #9CA3AF;
  border-radius: 999px;
}

.brand {
  min-height: 56px;
  margin: 0 0 12px !important;
  padding: 0 8px 14px !important;
  color: #111827 !important;
  border-bottom: 1px solid #EEF2F7;
  font-size: 15px !important;
  font-weight: 750 !important;
}

.brand-mark,
.topbar-logo,
.login-mark {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  display: inline-grid !important;
  place-items: center;
  color: #FFFFFF !important;
  background: #2563EB !important;
  background-image: none !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.brand-mark img,
.topbar-logo img,
.login-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.nav {
  gap: 4px !important;
}

.nav::before,
.nav::after {
  display: block;
  padding: 10px 12px 5px;
  color: #94A3B8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav::before { content: "Navigation"; }
.nav::after { content: "Account"; order: 98; }
.nav form { order: 99; margin-top: 4px; }

.nav a,
.nav button {
  min-height: 42px !important;
  padding: 8px 10px !important;
  color: #6B7280 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

.nav a span,
.nav button span {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  color: #94A3B8 !important;
  background: #F9FAFB !important;
  border: 1px solid #EEF2F7 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.nav a:hover,
.nav button:hover {
  color: #374151 !important;
  background: #F3F4F6 !important;
}

.nav a.active {
  color: #2563EB !important;
  background: #EEF2FF !important;
}

.nav a.active span {
  color: #2563EB !important;
  background: #E0E7FF !important;
  border-color: #C7D2FE !important;
}

.topbar {
  min-height: 68px;
  margin: -24px -24px 24px !important;
  padding: 14px 24px !important;
  color: #374151 !important;
  background: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid #E5E7EB !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.04) !important;
  backdrop-filter: none !important;
}

.page-title,
.section-head h2,
.card h2,
.premium-panel h2,
.kitchen-column h2 {
  color: #111827 !important;
  font-weight: 750 !important;
  letter-spacing: -.035em;
}

.page-title {
  font-size: clamp(24px, 2.2vw, 32px) !important;
}

.eyebrow {
  color: #2563EB !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.muted,
.topbar small,
.card p {
  color: #6B7280 !important;
}

.card,
.premium-panel,
.invoice-card,
.chart-card,
.report-content .card,
.menu-product,
.table-card,
.kot-card,
.user-management-card,
.stat-card,
.hero-band,
.premium-hero {
  color: #374151 !important;
  background: #FFFFFF !important;
  background-image: none !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(15,23,42,.05) !important;
}

.card,
.premium-panel {
  padding: 20px;
}

.hero-band,
.premium-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 20px;
  padding: 24px !important;
  margin-bottom: 20px;
}

.hero-band h2,
.premium-hero h2 {
  color: #111827 !important;
  font-size: clamp(24px, 2.6vw, 34px) !important;
  font-weight: 800 !important;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.hero-total,
.util-ring {
  min-height: 112px;
  padding: 18px;
  color: #111827 !important;
  background: #F8FAFC !important;
  background-image: none !important;
  border: 1px solid #EEF2F7 !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.quick-actions a,
.btn,
a.btn,
button.btn,
button[type="submit"]:not(.sidebar button):not(.nav button) {
  min-height: 42px;
  border-radius: 9px !important;
  font-weight: 700 !important;
}

.quick-actions a:first-child,
.btn:not(.ghost):not(.secondary):not(.danger),
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.secondary):not(.danger) {
  color: #FFFFFF !important;
  background: #2563EB !important;
  border-color: #2563EB !important;
  box-shadow: 0 6px 14px rgba(37,99,235,.18) !important;
}

.btn.ghost,
.btn.secondary,
.quick-actions a:nth-child(n+2) {
  color: #374151 !important;
  background: #FFFFFF !important;
  border-color: #E5E7EB !important;
  box-shadow: none !important;
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px !important;
  margin-bottom: 20px;
}

.stat-card {
  min-height: 124px !important;
  padding: 20px !important;
}

.stat-card small {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #2563EB !important;
  background: #EEF2FF !important;
  border-radius: 10px !important;
}

.stat-card span {
  color: #6B7280 !important;
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong,
.metric {
  color: #111827 !important;
  font-size: clamp(26px, 2.2vw, 34px) !important;
  font-weight: 800 !important;
}

.table-responsive,
.card:has(table),
.report-content {
  overflow-x: auto;
}

.table,
table {
  border-collapse: separate !important;
  border-spacing: 0;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.table th,
table th {
  padding: 12px 14px !important;
  color: #6B7280 !important;
  background: #F8FAFC !important;
  border-bottom: 1px solid #E5E7EB !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.table td,
table td {
  padding: 13px 14px !important;
  color: #374151 !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid #EEF2F7 !important;
}

.table tr:hover td,
table tr:hover td {
  background: #F9FAFB !important;
}

input,
select,
textarea,
.ts-control {
  min-height: 44px;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}

input:focus,
select:focus,
textarea:focus,
.ts-wrapper.focus .ts-control {
  border-color: #2563EB !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important;
}

.ts-dropdown {
  z-index: 100000 !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 10px !important;
  box-shadow: 0 16px 40px rgba(15,23,42,.08) !important;
}

.ts-dropdown .active {
  color: #1E40AF !important;
  background: #EEF2FF !important;
}

.badge.available,
.badge.ready,
.badge.paid,
.badge.completed { color: #166534 !important; background: #DCFCE7 !important; }
.badge.booked,
.badge.pending,
.badge.preparing { color: #92400E !important; background: #FEF3C7 !important; }
.badge.occupied,
.badge.danger,
.badge.cancelled { color: #991B1B !important; background: #FEE2E2 !important; }
.badge.sent_to_kitchen,
.badge.served,
.badge.reserved { color: #075985 !important; background: #E0F2FE !important; }

.action-buttons {
  gap: 6px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.action-btn,
a.action-btn,
button.action-btn,
summary.action-btn {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  color: #4B5563 !important;
  background: #F3F4F6 !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.action-btn svg,
.action-btn i {
  width: 19px !important;
  height: 19px !important;
  font-size: 19px !important;
}

.menu-toolbar {
  margin-bottom: 16px;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(15,23,42,.05);
}

.chip {
  color: #6B7280 !important;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 999px !important;
}

.chip.active,
.chip:hover {
  color: #2563EB !important;
  background: #EEF2FF !important;
  border-color: #C7D2FE !important;
}

.menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.menu-product {
  overflow: hidden;
  padding: 0 !important;
}

.menu-product img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto !important;
  object-fit: cover;
  background: #F3F4F6;
}

.menu-product-body {
  padding: 16px;
}

.order-layout {
  grid-template-columns: minmax(0, 1fr) 360px !important;
  gap: 20px !important;
}

.current-order-panel,
.cart-panel {
  position: sticky !important;
  top: 92px !important;
  max-height: calc(100vh - 116px) !important;
  overflow: hidden !important;
}

.current-order-items {
  max-height: calc(100vh - 330px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #9CA3AF #F3F4F6;
}

.current-order-items::-webkit-scrollbar {
  width: 6px;
}

.current-order-items::-webkit-scrollbar-thumb {
  background: #9CA3AF;
  border-radius: 999px;
}

.auth-page,
.login-page {
  background: url("../images/login-bg.jpg") center/cover no-repeat fixed !important;
}

.login-overlay {
  background: rgba(15,23,42,.34) !important;
}

.auth-page .login-card,
.login-card {
  color: #111827 !important;
  background: rgba(255,255,255,.96) !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 70px rgba(15,23,42,.24) !important;
  backdrop-filter: none !important;
}

.auth-page .login-card h1,
.login-card h1,
.auth-page .login-card label,
.login-card label,
.auth-page .login-link,
.login-link {
  color: #111827 !important;
}

*:focus-visible {
  outline: 3px solid rgba(37,99,235,.18) !important;
  outline-offset: 2px;
}

@media (max-width: 1200px) {
  .stat-grid,
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (max-width: 992px) {
  .app-shell { grid-template-columns: 1fr !important; }
  .sidebar,
  .sidebar-scroll { width: min(260px, 88vw) !important; }
  .hero-band,
  .premium-hero,
  .ops-grid,
  .order-layout { grid-template-columns: 1fr !important; }
  .stat-grid,
  .grid-3,
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .current-order-panel,
  .cart-panel { position: static !important; max-height: none !important; }
  .current-order-items { max-height: 60vh; }
}

@media (max-width: 768px) {
  .main { padding: 14px !important; }
  .topbar { margin: -14px -14px 14px !important; padding: 12px 14px !important; }
  .topbar-logo { display: none !important; }
  .stat-grid,
  .grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .hero-panel,
  .menu-grid,
  .table-board { grid-template-columns: 1fr !important; }
  .quick-actions a,
  .btn,
  button.btn { width: 100%; }
  table { min-width: 760px; }
}

.auth-page .login-brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
}

.auth-page .login-brand-logo {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

.auth-page .login-brand-copy h1 {
  margin: 0;
  font-size: 40px !important;
  line-height: 1.08;
  font-weight: 700 !important;
  color: #111827 !important;
  letter-spacing: 0;
}

.auth-page .login-brand-copy p {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;
  color: #6B7280 !important;
}

@media (max-width: 576px) {
  .auth-page .login-brand-row {
    gap: 12px;
    margin-bottom: 22px;
  }

  .auth-page .login-brand-logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .auth-page .login-brand-copy h1 {
    font-size: 32px !important;
  }

  .auth-page .login-brand-copy p {
    font-size: 14px;
  }
}

.topbar,
.topbar-actions,
.user-menu {
  overflow: visible !important;
}

.topbar {
  position: relative;
  z-index: 1000;
}

.user-menu {
  position: relative;
  z-index: 100100 !important;
}

.user-pill {
  position: relative;
  cursor: pointer;
  pointer-events: auto;
}

.user-pill::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.user-menu-dropdown {
  position: absolute !important;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100200 !important;
  pointer-events: auto;
}

.user-menu-dropdown a,
.user-menu-dropdown button {
  text-align: left;
}

.permission-card .check-row {
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
}

.permission-card .section-head {
  align-items: flex-start;
}

.permission-form .form-actions {
  flex-wrap: wrap;
}

.nav a,
.nav button,
.user-menu-dropdown a,
.user-menu-dropdown button {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.nav .nav-icon,
.user-menu-dropdown .nav-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  color: #6B7280 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.nav .nav-text,
.user-menu-dropdown .nav-text {
  flex: 1;
  min-width: 0;
}

.nav a.active,
.nav a.active .nav-icon {
  color: #2563EB !important;
}

.nav a.active {
  background: #EEF2FF !important;
}

.nav a:not(.active),
.nav button {
  color: #4B5563 !important;
}

.nav a:hover,
.nav button:hover {
  color: #374151 !important;
  background: #F3F4F6 !important;
}

.nav a:hover .nav-icon,
.nav button:hover .nav-icon,
.user-menu-dropdown a:hover .nav-icon,
.user-menu-dropdown button:hover .nav-icon {
  color: #374151 !important;
}

.permission-tree-icon {
  width: 18px;
  height: 18px;
  color: currentColor;
}

.nav .nav-text,
.nav a.active .nav-text,
.nav button .nav-text,
.user-menu-dropdown .nav-text {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  display: inline !important;
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.permission-module-icon {
  width: 34px !important;
  height: 34px !important;
  color: #2563EB !important;
  background: #EEF2FF !important;
  border-radius: 10px !important;
}

.permission-module-icon .permission-tree-icon {
  width: 18px;
  height: 18px;
}

.permission-page {
  padding-bottom: 92px;
}

.permission-shell,
.permission-cafe-summary,
.permission-toolbar,
.permission-tree-card,
.permission-sticky-actions {
  color: #111827;
  background: #FFFFFF;
  border-color: #DCE4EC;
}

.permission-page-head {
  margin-bottom: 12px;
}

.permission-cafe-selector {
  align-items: end;
}

.permission-cafe-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(360px, 2fr);
  gap: 18px;
  margin-top: 16px;
}

.permission-cafe-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.permission-cafe-logo {
  width: 64px;
  height: 64px;
  min-width: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #FFFFFF;
  background: #2563EB;
  border-radius: 14px;
  font-weight: 800;
}

.permission-cafe-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.permission-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.permission-summary-grid div {
  padding: 12px;
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
}

.permission-summary-grid span {
  display: block;
  color: #64748B;
  font-size: 12px;
  font-weight: 700;
}

.permission-summary-grid strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 15px;
}

.permission-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.permission-search-field {
  margin: 0;
}

.permission-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-tree-form {
  margin-top: 16px;
}

.permission-tree-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.permission-tree-card {
  padding: 0;
  overflow: visible;
}

.permission-module-header {
  display: grid;
  grid-template-columns: 34px 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: #F8FAFC;
  border-bottom: 1px solid #DCE4EC;
  border-radius: inherit;
}

.permission-tree-card:not(.is-collapsed) .permission-module-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.permission-module-toggle,
.permission-module-title {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.permission-module-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #2563EB;
  border: 1px solid #DCE4EC;
  border-radius: 9px;
}

.permission-chevron::before {
  content: "v";
  font-weight: 900;
}

.permission-tree-card.is-collapsed .permission-chevron::before {
  content: ">";
}

.permission-module-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  background: #2563EB;
  border-radius: 12px;
  font-weight: 900;
}

.permission-module-title {
  min-width: 0;
  padding: 0;
  text-align: left;
}

.permission-module-title strong,
.permission-module-title small {
  display: block;
}

.permission-module-title strong {
  color: #111827;
  font-size: 17px;
}

.permission-module-title small {
  margin-top: 3px;
  color: #64748B;
  font-weight: 700;
}

.permission-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748B;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.permission-switch input {
  width: 18px;
  height: 18px;
}

.permission-module-body {
  padding: 12px 14px 16px 54px;
}

.permission-module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.permission-tree-list {
  position: relative;
  display: grid;
  gap: 8px;
}

.permission-tree-list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 17px;
  left: -22px;
  border-left: 1px solid #D9E1EA;
}

.permission-tree-row {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  cursor: pointer;
}

.permission-tree-row::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -22px;
  width: 22px;
  border-top: 1px solid #D9E1EA;
}

.permission-tree-row:hover {
  background: #F8FAFC;
}

.permission-tree-row.is-checked {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.permission-row-content {
  min-width: 0;
}

.permission-row-content strong,
.permission-row-content small,
.permission-row-content code {
  display: block;
}

.permission-row-content strong {
  color: #111827;
  font-size: 14px;
}

.permission-row-content small {
  margin-top: 2px;
  color: #64748B;
  font-size: 12px;
}

.permission-row-content code {
  margin-top: 3px;
  color: #64748B;
  font-size: 11px;
  white-space: normal;
}

.permission-empty-state {
  margin-top: 16px;
  text-align: center;
  color: #64748B;
}

.permission-sticky-actions {
  position: sticky;
  right: 0;
  bottom: 14px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #DCE4EC;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
}

.permission-sticky-actions strong {
  color: #DC2626;
}

@media (max-width: 1200px) {
  .permission-tree-grid,
  .permission-cafe-summary,
  .permission-toolbar {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .permission-module-header {
    grid-template-columns: 34px 38px minmax(0, 1fr);
  }

  .permission-switch {
    grid-column: 1 / -1;
  }

  .permission-module-body {
    padding-left: 38px;
  }

  .permission-sticky-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .permission-summary-grid {
    grid-template-columns: 1fr;
  }

  .permission-tree-row {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .permission-tree-row .badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* CafeCore maintenance layer: local phone forms, compact controls, clean SaaS finish */
input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  accent-color: #2563EB;
  cursor: pointer;
}

label:has(> input[type="checkbox"]),
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 14px;
  line-height: 1.35;
}

.permission-switch {
  gap: 7px !important;
  font-size: 12px !important;
}

.permission-switch input {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
}

.permission-module-header {
  min-height: 50px;
  grid-template-columns: 30px 36px minmax(0, 1fr) auto !important;
  gap: 8px !important;
  padding: 10px 12px !important;
}

.permission-module-toggle {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
}

.permission-module-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 9px !important;
}

.permission-module-title strong {
  font-size: 15px !important;
}

.permission-module-title small {
  font-size: 11px !important;
}

.permission-module-body {
  padding: 10px 12px 12px 46px !important;
}

.permission-module-actions .btn,
.permission-filter-row .chip,
.permission-sticky-actions .btn {
  min-height: 34px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
}

.permission-tree-list {
  gap: 6px !important;
}

.permission-tree-row {
  grid-template-columns: 20px minmax(0, 1fr) auto !important;
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 9px !important;
}

.permission-row-content strong {
  font-size: 13px !important;
}

.permission-row-content small,
.permission-row-content code {
  font-size: 11px !important;
}

.permission-sticky-actions {
  padding: 10px 12px !important;
}

.card,
.premium-panel {
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .05) !important;
}

.section-head,
.page-head {
  margin-bottom: 16px;
}

.field {
  gap: 7px;
}

.field label {
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.ts-control {
  min-height: 42px;
  border: 1px solid #D1D5DB !important;
  border-radius: 10px !important;
  background: #FFFFFF !important;
  color: #111827 !important;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.ts-control:focus-within {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
  outline: none !important;
}

.btn,
button.btn,
a.btn {
  min-height: 40px !important;
  border-radius: 10px !important;
}

.btn:not(.ghost):not(.secondary):not(.danger),
button.btn:not(.ghost):not(.secondary):not(.danger),
a.btn:not(.ghost):not(.secondary):not(.danger) {
  color: #FFFFFF !important;
  background: #2563EB !important;
  border-color: #2563EB !important;
}

.btn.secondary,
.btn.ghost,
a.btn.secondary,
a.btn.ghost,
button.btn.secondary,
button.btn.ghost {
  color: #374151 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
}

.table-responsive {
  overflow-x: auto;
}

.table {
  overflow: hidden;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px;
  font-size: 14px;
}

.table th {
  color: #374151 !important;
  background: #F9FAFB !important;
  font-weight: 750;
}

.table th,
.table td {
  padding: 11px 12px !important;
  border-bottom: 1px solid #E5E7EB !important;
}

.dropdown-menu,
.user-menu-dropdown,
.independent-dropdown > form,
.ts-dropdown {
  z-index: 99999 !important;
  background: #FFFFFF !important;
  color: #111827 !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14) !important;
}

.ts-wrapper,
.ts-control,
.ts-dropdown {
  width: 100% !important;
}

.ts-dropdown,
.select2-container--open {
  z-index: 99999 !important;
}

.ts-dropdown {
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12) !important;
}

.ts-dropdown .option.active,
.ts-dropdown .option:hover {
  color: #1D4ED8 !important;
  background: #EEF2FF !important;
}

.ts-dropdown .no-results {
  padding: 10px 12px;
  color: #6B7280;
}

.dropdown-item:hover,
.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover,
.ts-dropdown .option:hover {
  color: #111827 !important;
  background: #EFF6FF !important;
}

.auth-page,
:root .auth-page {
  display: grid !important;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: url("../images/login-bg.jpg") center/cover no-repeat fixed !important;
}

.auth-page .login-overlay,
:root .auth-page .login-overlay {
  background: linear-gradient(rgba(15, 23, 42, .46), rgba(15, 23, 42, .46)) !important;
}

.auth-page .login-card,
:root .auth-page .login-card {
  width: min(100%, 450px) !important;
  padding: 34px !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .12) !important;
  backdrop-filter: none !important;
}

.auth-page .login-brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.auth-page .login-brand-logo {
  width: 60px !important;
  height: 60px !important;
  object-fit: contain;
}

.auth-page .login-brand-copy h1,
:root .auth-page .login-brand-copy h1 {
  margin: 0 !important;
  color: #111827 !important;
  font-size: 31px !important;
  font-weight: 700 !important;
  line-height: 1.1;
}

.auth-page .login-brand-copy p,
:root .auth-page .login-brand-copy p {
  margin: 5px 0 0 !important;
  color: #6B7280 !important;
  font-size: 14px !important;
  font-weight: 500;
}

.auth-page .login-card .field label,
:root .auth-page .login-card .field label {
  color: #374151 !important;
}

.auth-page .field input,
:root .auth-page .field input {
  height: 48px !important;
  padding: 0 14px !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 10px !important;
}

.auth-page .field input::placeholder,
:root .auth-page .field input::placeholder {
  color: #9CA3AF !important;
}

.auth-page .field input:focus,
:root .auth-page .field input:focus {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
  outline: none !important;
}

.auth-page .login-link,
:root .auth-page .login-link {
  color: #2563EB !important;
  font-size: 13px !important;
  font-weight: 700;
}

.auth-page .btn,
:root .auth-page .btn {
  height: 48px !important;
  color: #FFFFFF !important;
  background: #2563EB !important;
  border-color: #2563EB !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

@media (max-width: 768px) {
  .auth-page,
  :root .auth-page {
    padding: 16px;
  }

  .auth-page .login-card,
  :root .auth-page .login-card {
    padding: 28px !important;
  }

  .permission-module-header {
    grid-template-columns: 30px 34px minmax(0, 1fr) !important;
  }

  .permission-tree-row {
    grid-template-columns: 20px minmax(0, 1fr) !important;
  }
}

@media (max-width: 576px) {
  .auth-page .login-brand-logo {
    width: 54px !important;
    height: 54px !important;
  }

  .auth-page .login-brand-copy h1,
  :root .auth-page .login-brand-copy h1 {
    font-size: 27px !important;
  }

  .auth-page .login-card,
  :root .auth-page .login-card {
    padding: 24px !important;
  }
}

/* Focused fixes: menu checkboxes, discount inputs, compact permissions */
.compact-checkbox {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 4px 0 !important;
  color: #374151 !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.compact-checkbox input[type="hidden"] {
  display: none !important;
}

.compact-checkbox .form-check-input {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer !important;
  accent-color: #2563EB;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
}

.compact-checkbox .form-check-label {
  margin: 0 !important;
  cursor: pointer;
  color: #374151 !important;
  font-weight: 600 !important;
}

.permission-card {
  padding: 14px !important;
  border-radius: 12px !important;
}

.permission-card .section-head {
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.permission-card .section-head h2 {
  font-size: 16px !important;
  line-height: 1.25 !important;
}

.permission-card .section-head .muted {
  font-size: 12px !important;
}

.permission-card .grid {
  gap: 7px !important;
}

.permission-card .check-row {
  min-height: 42px !important;
  padding: 8px 10px !important;
  gap: 9px !important;
  border: 1px solid #DCE6F2 !important;
  border-radius: 8px !important;
  background: #F8FBFF !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.permission-card .check-row input[type="checkbox"],
.permission-tree-row input[type="checkbox"],
.permission-switch input[type="checkbox"],
input[data-permission-checkbox],
input[data-module-toggle] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  margin: 0 !important;
  accent-color: #2563EB;
}

.permission-module-header {
  min-height: 48px !important;
  padding: 9px 12px !important;
  gap: 8px !important;
}

.permission-module-title strong {
  font-size: 15px !important;
  font-weight: 700 !important;
}

.permission-module-title small {
  font-size: 11px !important;
  line-height: 1.25 !important;
}

.permission-tree-card {
  border-radius: 12px !important;
}

.permission-tree-list {
  gap: 6px !important;
}

.permission-tree-row {
  min-height: 46px !important;
  padding: 8px 12px !important;
  gap: 9px !important;
  border-radius: 8px !important;
}

.permission-row-content strong {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
}

.permission-row-content small {
  margin-top: 1px !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
}

.permission-row-content code {
  margin-top: 1px !important;
  font-size: 10px !important;
}

.permission-tree-row .badge,
.permission-card .badge {
  padding: 3px 8px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

/* Final checkbox and permission density correction */
input[type="hidden"] {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
  border-radius: 4px;
  box-shadow: none !important;
  accent-color: #2563EB;
  cursor: pointer;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
}

input[type="radio"] {
  border-radius: 50%;
  -webkit-appearance: radio !important;
}

.field input[type="checkbox"],
.field input[type="radio"],
.independent-dropdown > form input[type="checkbox"],
.independent-dropdown > form input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  padding: 0 !important;
  background: initial !important;
  color: initial !important;
}

.field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.independent-dropdown > form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
}

.compact-checkbox {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: auto !important;
  min-height: 20px !important;
  margin: 4px 0 !important;
  padding: 0 !important;
}

.compact-checkbox .form-check-input {
  flex: 0 0 16px !important;
}

.compact-checkbox .form-check-label {
  display: inline !important;
  line-height: 1.2 !important;
}

.permission-tree-grid,
.permission-form > .grid.grid-2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(280px, 1fr)) !important;
  gap: 8px !important;
  align-items: start !important;
}

@media (min-width: 1400px) {
  .permission-tree-grid,
  .permission-form > .grid.grid-2 {
    grid-template-columns: repeat(3, minmax(260px, 1fr)) !important;
  }
}

.permission-tree-card,
.permission-card {
  padding: 0 !important;
  overflow: visible !important;
}

.permission-card {
  padding: 12px !important;
}

.permission-module-header {
  min-height: 46px !important;
  padding: 8px 12px !important;
  grid-template-columns: 28px 32px minmax(0, 1fr) auto !important;
}

.permission-module-icon {
  width: 32px !important;
  height: 32px !important;
}

.permission-module-toggle {
  width: 28px !important;
  height: 28px !important;
}

.permission-module-body {
  padding: 8px 10px 10px 40px !important;
}

.permission-tree-row {
  min-height: 52px !important;
  padding: 8px 10px !important;
  grid-template-columns: 15px minmax(0, 1fr) auto !important;
  gap: 8px !important;
  border: 1px solid #D7E3F3 !important;
  border-radius: 8px !important;
  background: #F8FBFF !important;
}

.permission-card .check-row {
  min-height: 40px !important;
  padding: 7px 9px !important;
}

.permission-card .check-row input[type="checkbox"],
.permission-tree-row input[type="checkbox"],
.permission-switch input[type="checkbox"],
input[data-permission-checkbox],
input[data-module-toggle] {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
  flex: 0 0 15px !important;
}

.permission-module-title strong,
.permission-row-content strong {
  margin: 0 !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.permission-module-title small,
.permission-row-content small {
  margin: 2px 0 0 !important;
  color: #64748B !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

.permission-row-content code {
  margin-top: 2px !important;
  color: #64748B !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

.permission-tree-row .badge,
.permission-card .badge,
.permission-row-content + .badge {
  flex: 0 0 auto !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

@media (max-width: 900px) {
  .permission-tree-grid,
  .permission-form > .grid.grid-2 {
    grid-template-columns: 1fr !important;
  }
}

/* Professional searchable dropdowns: Select2 single-library styling */
select.searchable-select {
  width: 100% !important;
}

.select2-container {
  width: 100% !important;
  max-width: 100% !important;
  font-size: 14px !important;
}

.select2-container,
.select2-container *,
.select2-dropdown {
  transition: none !important;
  animation: none !important;
}

.select2-container--default .select2-selection--single {
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  outline: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  width: 100% !important;
  padding-left: 12px !important;
  padding-right: 36px !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 42px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #6B7280 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px !important;
  right: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  height: 42px !important;
  margin-right: 24px !important;
  color: #6B7280 !important;
  font-size: 18px !important;
  line-height: 40px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .10) !important;
}

.select2-container--default .select2-selection--multiple {
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  padding: 4px 8px !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  margin-top: 3px !important;
  color: #1D4ED8 !important;
  background: #E0E7FF !important;
  border: 1px solid #C7D2FE !important;
  border-radius: 6px !important;
  font-size: 12px !important;
}

.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
  height: 28px !important;
  margin-top: 3px !important;
  color: #111827 !important;
  font-size: 14px !important;
}

.select2-container--open {
  z-index: 99999 !important;
}

.select2-dropdown {
  z-index: 99999 !important;
  overflow: hidden !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12) !important;
}

.select2-search--dropdown {
  display: block !important;
  padding: 8px !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid #E5E7EB !important;
}

.select2-dropdown .select2-search--dropdown.select2-search--hide,
.select2-dropdown .select2-search--hide {
  display: block !important;
}

.select2-search--dropdown .select2-search__field {
  display: block !important;
  width: 100% !important;
  height: 36px !important;
  padding: 0 10px !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  outline: none !important;
}

.select2-search--dropdown .select2-search__field::placeholder {
  color: #9CA3AF !important;
}

.select2-search--dropdown .select2-search__field:focus {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .08) !important;
}

.select2-results__options {
  max-height: 240px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 4px 0 !important;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 #FFFFFF;
}

.select2-results__options::-webkit-scrollbar {
  width: 7px;
}

.select2-results__options::-webkit-scrollbar-track {
  background: #FFFFFF;
}

.select2-results__options::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 999px;
}

.select2-results__option {
  min-height: 36px !important;
  padding: 9px 12px !important;
  color: #374151 !important;
  background: #FFFFFF !important;
  border: 0 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  cursor: pointer !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  color: #2563EB !important;
  background: #EEF2FF !important;
}

.select2-container--default .select2-results__option--selected {
  color: #1D4ED8 !important;
  background: #E0E7FF !important;
}

.select2-results__message {
  min-height: 0 !important;
  padding: 12px !important;
  color: #6B7280 !important;
  font-size: 13px !important;
  cursor: default !important;
}

.select2-container--default.select2-container--disabled .select2-selection--single,
.select2-container--default.select2-container--disabled .select2-selection--multiple {
  color: #9CA3AF !important;
  background: #F9FAFB !important;
  cursor: not-allowed !important;
}

dialog,
.modal,
.payment-dialog,
.independent-dropdown,
.independent-dropdown > form,
.card,
.premium-panel,
.table-responsive {
  overflow: visible;
}

@media (max-width: 576px) {
  .select2-dropdown {
    max-width: calc(100vw - 24px) !important;
  }

  .select2-results__option {
    min-height: 40px !important;
  }
}

.table-responsive {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.grid-span-2 {
  grid-column: 1 / -1;
}

.menu-edit-preview {
  display: block;
  width: min(220px, 100%);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: #F3F4F6;
}

.menu-product.disabled .action-buttons,
.menu-product.disabled .action-btn {
  pointer-events: auto !important;
}

.menu-product .action-buttons {
  position: relative;
  z-index: 3;
}

/* Final menu checkbox rendering fix */
.card input[type="hidden"],
.field input[type="hidden"],
.form-check input[type="hidden"],
.compact-checkbox input[type="hidden"],
input[type="hidden"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  pointer-events: none !important;
}

.form-check.compact-checkbox,
.compact-checkbox.d-flex {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: fit-content !important;
  min-height: 20px !important;
  margin: 6px 0 !important;
  padding: 0 !important;
  color: #374151 !important;
  line-height: 1.2 !important;
}

.form-check.compact-checkbox::before,
.form-check.compact-checkbox::after,
.compact-checkbox::before,
.compact-checkbox::after {
  content: none !important;
  display: none !important;
}

.form-check.compact-checkbox input[type="checkbox"],
.form-check.compact-checkbox input[type="radio"],
.compact-checkbox input[type="checkbox"],
.compact-checkbox input[type="radio"],
input.form-check-input[type="checkbox"],
input.form-check-input[type="radio"] {
  display: inline-block !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
  color: initial !important;
  background: initial !important;
  border: initial !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  outline: none;
  accent-color: #2563EB;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  cursor: pointer !important;
}

.form-check.compact-checkbox input[type="radio"],
.compact-checkbox input[type="radio"],
input.form-check-input[type="radio"] {
  border-radius: 50% !important;
  -webkit-appearance: radio !important;
}

.form-check.compact-checkbox .form-check-label,
.compact-checkbox .form-check-label {
  display: inline-block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #374151 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
}

/* Create Cafe Account form polish */
.create-cafe-shell {
  width: min(100%, 1100px);
  margin: 30px auto !important;
}

.create-cafe-form {
  width: 100% !important;
  max-width: 1100px !important;
  display: grid !important;
  gap: 20px !important;
  margin: 0 auto !important;
  padding: 24px !important;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06) !important;
}

.create-cafe-form h2 {
  color: #111827 !important;
  font-size: 22px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

.create-cafe-grid,
.cafe-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px !important;
  align-items: start;
}

.create-cafe-column,
.cafe-form-column {
  display: flex;
  flex-direction: column;
  gap: 16px !important;
  min-width: 0;
  align-content: start;
}

.create-cafe-form .field,
.create-cafe-form .cafe-form-group {
  display: flex !important;
  flex-direction: column;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.create-cafe-form .field label,
.create-cafe-form .cafe-form-group label {
  margin: 0 !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.create-cafe-form .form-control:not(textarea),
.create-cafe-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.create-cafe-form .select2-container--default .select2-selection--single {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 14px !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  line-height: 44px !important;
}

.create-cafe-form input[type="file"].form-control,
.create-cafe-form input[type="file"] {
  width: 100% !important;
  min-height: 44px !important;
  padding: 9px 14px !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  font-size: 14px !important;
}

.create-cafe-form .form-control::placeholder,
.create-cafe-form input::placeholder,
.create-cafe-form textarea::placeholder {
  color: #9CA3AF !important;
}

.create-cafe-form .form-control:not(textarea):focus,
.create-cafe-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.create-cafe-form textarea.form-control:focus,
.create-cafe-form textarea:focus {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10) !important;
  outline: none !important;
}

.create-cafe-form textarea.form-control,
.create-cafe-form textarea {
  width: 100% !important;
  height: 90px !important;
  min-height: 90px !important;
  max-height: 90px !important;
  padding: 12px 14px !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  resize: vertical;
}

.create-cafe-form .form-address textarea {
  min-height: 88px !important;
  max-height: 100px !important;
}

.create-cafe-form .create-cafe-logo-field {
  width: 100%;
  min-height: 0 !important;
}

.create-cafe-form .logo-upload-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 0;
}

.create-cafe-form .logo-upload-control {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: min(100%, 360px);
}

.create-cafe-form .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 42px !important;
}

.create-cafe-form .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px !important;
}

.create-cafe-form .select2-container,
.create-cafe-form .ts-wrapper,
.create-cafe-form .choices,
.create-cafe-form .searchable-select-wrapper {
  margin: 0 !important;
  min-height: 44px !important;
}

.create-cafe-form .logo-upload-preview {
  display: block;
  flex: 0 0 72px;
  margin: 0 !important;
}

.create-cafe-form .settings-logo-preview {
  width: 72px !important;
  height: 72px !important;
  display: grid !important;
  place-items: center;
  object-fit: cover;
  border-radius: 12px !important;
  margin: 0 !important;
}

.create-cafe-form .muted {
  margin-top: 0 !important;
  font-size: 12px !important;
}

.create-cafe-gst-field {
  width: 220px;
  max-width: 100%;
}

.create-cafe-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.create-cafe-actions .btn {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 18px !important;
  line-height: 42px !important;
}

@media (max-width: 768px) {
  .create-cafe-shell {
    margin: 20px auto !important;
  }

  .create-cafe-form {
    padding: 22px !important;
  }

  .create-cafe-grid {
    grid-template-columns: 1fr;
    gap: 16px !important;
  }

  .create-cafe-column,
  .cafe-form-column {
    gap: 16px !important;
  }

  .create-cafe-form .logo-upload-group {
    align-items: flex-start;
  }

  .create-cafe-actions {
    justify-content: stretch;
  }

  .create-cafe-actions .btn {
    flex: 1 1 0;
  }
}

/* Global form spacing rhythm */
form .field {
  display: grid !important;
  gap: 6px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

form .field > label {
  margin: 0 0 6px !important;
}

form .grid {
  column-gap: 24px !important;
  row-gap: 18px !important;
}

form.card {
  padding: 24px !important;
}

form textarea {
  min-height: 90px;
}

form .form-actions {
  margin-top: 24px;
}

/* End-of-file UI consistency guard */
:root {
  --surface-muted: #F1F5F9;
}

.invoice-totals .grand th,
.invoice-totals .grand td {
  color: #FFFFFF !important;
  background: var(--primary, #2563EB) !important;
}

.current-order-panel,
.cart-panel {
  position: sticky !important;
  top: 88px !important;
  max-height: calc(100vh - 112px) !important;
  overflow: hidden !important;
}

.current-order-items {
  flex: 1 1 auto;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: var(--primary, #2563EB) var(--surface-soft, #F8FAFC);
}

.current-order-items::-webkit-scrollbar {
  width: 8px !important;
}

.current-order-items::-webkit-scrollbar-track {
  background: var(--surface-soft, #F8FAFC) !important;
  border-radius: 999px !important;
}

.current-order-items::-webkit-scrollbar-thumb {
  background: var(--primary, #2563EB) !important;
  border-radius: 999px !important;
}

.chart-card,
.report-chart-grid .card {
  background: var(--surface, #FFFFFF) !important;
  border: 1px solid var(--border, #E5E7EB) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(15, 23, 42, 0.04)) !important;
}

.menu-empty,
.permission-empty-state,
.table-empty-state,
[data-chart-empty] {
  background: var(--surface-soft, #F8FAFC) !important;
  border: 1px dashed #CBD5E1 !important;
  border-radius: 12px !important;
  color: var(--text-muted, #6B7280) !important;
}

@media (max-width: 992px) {
  .current-order-panel,
  .cart-panel {
    position: static !important;
    max-height: none !important;
  }

  .current-order-items {
    max-height: 58vh !important;
  }
}

/* ACTUAL EOF OVERRIDE: compact Admin Menu item cards after every global card/image rule */
.menu-management-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: start !important;
}

.menu-management-grid .menu-item-card {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  border-radius: 12px !important;
}

.menu-management-grid .menu-item-card > img,
.menu-management-grid .menu-item-card > img.menu-product-image {
  display: block !important;
  width: 100% !important;
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 10px !important;
  flex: 0 0 100px !important;
}

.menu-management-grid .menu-item-card .menu-product-body {
  display: grid !important;
  gap: 4px !important;
  padding: 10px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

.menu-management-grid .menu-item-card .badge {
  justify-self: start !important;
  min-height: 0 !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

.menu-management-grid .menu-item-card h3 {
  margin: 0 !important;
  min-height: 0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.18 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.menu-management-grid .menu-item-card p {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.menu-management-grid .menu-item-card p.muted {
  display: none !important;
}

.menu-management-grid .menu-item-card strong {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

.menu-management-grid .menu-item-card .btn {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  margin: 3px 0 0 !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 32px !important;
}

.menu-management-grid .menu-item-card .action-buttons {
  margin-top: 2px !important;
  gap: 6px !important;
}

.menu-management-grid .menu-item-card .action-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
}

@media (min-width: 1600px) {
  .menu-management-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1399px) and (min-width: 993px) {
  .menu-management-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 992px) and (min-width: 577px) {
  .menu-management-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 576px) {
  .menu-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .menu-management-grid .menu-item-card > img,
  .menu-management-grid .menu-item-card > img.menu-product-image {
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    flex-basis: 92px !important;
  }
}

/* TRUE FINAL OVERRIDE: compact Admin Menu cards after all global .menu-product rules */
.menu-management-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: start !important;
}

.menu-management-grid .menu-item-card {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  border-radius: 12px !important;
}

.menu-management-grid .menu-item-card > img,
.menu-management-grid .menu-item-card > img.menu-product-image {
  display: block !important;
  width: 100% !important;
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 10px !important;
  flex: 0 0 100px !important;
}

.menu-management-grid .menu-item-card .menu-product-body {
  display: grid !important;
  gap: 4px !important;
  padding: 10px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

.menu-management-grid .menu-item-card .badge {
  justify-self: start !important;
  min-height: 0 !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

.menu-management-grid .menu-item-card h3 {
  margin: 0 !important;
  min-height: 0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.18 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.menu-management-grid .menu-item-card p {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.menu-management-grid .menu-item-card p.muted {
  display: none !important;
}

.menu-management-grid .menu-item-card strong {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

.menu-management-grid .menu-item-card .btn {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  margin: 3px 0 0 !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 32px !important;
}

.menu-management-grid .menu-item-card .action-buttons {
  margin-top: 2px !important;
  gap: 6px !important;
}

.menu-management-grid .menu-item-card .action-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
}

@media (min-width: 1600px) {
  .menu-management-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1399px) and (min-width: 993px) {
  .menu-management-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 992px) and (min-width: 577px) {
  .menu-management-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 576px) {
  .menu-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .menu-management-grid .menu-item-card > img,
  .menu-management-grid .menu-item-card > img.menu-product-image {
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    flex-basis: 92px !important;
  }
}

/* Final override: Admin Menu cards must stay compact like a POS grid.
   This is intentionally last because older global .menu-product rules above set aspect-ratio and larger heights. */
.menu-management-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: start !important;
}

.menu-management-grid .menu-item-card,
.menu-management-grid .menu-product.menu-item-card,
.menu-management-grid article.menu-item-card {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  border-radius: 12px !important;
}

.menu-management-grid .menu-item-card > img.menu-product-image,
.menu-management-grid .menu-item-card > img,
.menu-management-grid .menu-product.menu-item-card > img,
.menu-management-grid article.menu-item-card > img {
  display: block !important;
  width: 100% !important;
  height: 100px !important;
  min-height: 0 !important;
  max-height: 100px !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 10px !important;
  flex: 0 0 100px !important;
}

.menu-management-grid .menu-item-card .menu-product-body {
  display: grid !important;
  gap: 4px !important;
  padding: 10px !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

.menu-management-grid .menu-item-card .badge {
  padding: 3px 7px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  min-height: 0 !important;
  justify-self: start !important;
}

.menu-management-grid .menu-item-card h3 {
  margin: 0 !important;
  min-height: 0 !important;
  color: var(--text-primary, #111827) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.18 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.menu-management-grid .menu-item-card p {
  margin: 0 !important;
  color: var(--text-muted, #6B7280) !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.menu-management-grid .menu-item-card p.muted {
  display: none !important;
}

.menu-management-grid .menu-item-card strong {
  margin: 0 !important;
  color: var(--text-primary, #111827) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

.menu-management-grid .menu-item-card .btn {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  margin: 3px 0 0 !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 32px !important;
}

.menu-management-grid .menu-item-card .action-buttons {
  margin-top: 2px !important;
  gap: 6px !important;
}

.menu-management-grid .menu-item-card .action-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
}

@media (min-width: 1600px) {
  .menu-management-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1399px) and (min-width: 993px) {
  .menu-management-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 992px) and (min-width: 577px) {
  .menu-management-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 576px) {
  .menu-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .menu-management-grid .menu-item-card > img.menu-product-image,
  .menu-management-grid .menu-item-card > img,
  .menu-management-grid .menu-product.menu-item-card > img,
  .menu-management-grid article.menu-item-card > img {
    height: 92px !important;
    max-height: 92px !important;
    flex-basis: 92px !important;
  }
}

/* Subscription plan table polish */
.plan-limit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 300px;
}

.plan-limit-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  color: var(--text, #111827);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 9px;
  white-space: nowrap;
}

.plan-limit-chip strong {
  color: #2563eb;
  font-weight: 800;
}

/* Cafe admin user management */
.admin-users-page .section-head {
  align-items: flex-start;
}

.compact-action {
  min-height: 38px;
  white-space: nowrap;
}

.user-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(160px, .8fr) minmax(150px, .7fr) auto;
  gap: 14px;
  align-items: end;
  margin: 18px 0;
}

.user-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.compact-user-table .table th {
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.compact-user-table .table td,
.compact-user-table .table th {
  padding-top: 14px;
  padding-bottom: 14px;
  vertical-align: middle;
}

.compact-user-table td small,
.user-cell small {
  display: block;
  color: var(--text-muted, #6B7280);
  font-size: 12px;
  margin-top: 3px;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.user-list-avatar,
.user-detail-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--primary-soft, rgba(37, 99, 235, .12));
  color: var(--primary, #2563EB);
  font-weight: 800;
  flex: 0 0 auto;
}

.user-list-avatar {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.user-list-avatar img,
.user-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.permission-summary-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(20, 184, 166, .12);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
}

.muted-badge {
  background: #E5E7EB !important;
  color: #374151 !important;
}

.user-form-layout {
  display: grid;
  gap: 16px;
}

.user-form-layout .premium-panel {
  margin: 0;
}

.user-form-layout .field {
  margin-bottom: 0;
}

.user-detail-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.user-profile-summary {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 14px;
  background: var(--surface-soft, #F8FAFC);
  text-align: center;
}

.user-detail-avatar {
  width: 84px;
  height: 84px;
  font-size: 28px;
}

.permission-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 992px) {
  .user-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-filter-actions {
    justify-content: flex-start;
  }

  .user-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .admin-users-page .section-head,
  .user-filter-bar {
    grid-template-columns: 1fr;
  }

  .user-filter-bar {
    display: grid;
  }

  .compact-action,
  .user-filter-actions .btn {
    width: 100%;
  }

  .user-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Premium login page polish */
body.auth-page.login-page {
  font-family: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  background-image: url("../images/login-bg.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

.auth-page .login-overlay {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .48), rgba(15, 118, 110, .34)),
    rgba(0, 0, 0, .16) !important;
}

.auth-page .login-card,
.login-page .login-card {
  width: min(460px, 95vw) !important;
  padding: 36px !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22), 0 8px 24px rgba(15, 23, 42, .08) !important;
  color: #111827 !important;
  backdrop-filter: blur(8px);
}

.auth-page .login-brand-row {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  margin-bottom: 28px !important;
}

.auth-page .login-brand-logo {
  width: 76px !important;
  height: 76px !important;
  flex: 0 0 76px !important;
  object-fit: contain !important;
}

.auth-page .login-brand-copy h1 {
  margin: 0 !important;
  color: #111827 !important;
  font-size: 36px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.02em !important;
}

.auth-page .login-brand-copy p {
  margin: 7px 0 0 !important;
  color: #64748B !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
}

.auth-page .login-card .field {
  position: relative !important;
  margin-bottom: 15px !important;
}

.auth-page .login-card .field label {
  display: block !important;
  margin-bottom: 7px !important;
  color: #1F2937 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.auth-page .login-card .field input {
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 10px !important;
  background: #FFFFFF !important;
  color: #111827 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  padding: 0 14px !important;
  outline: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-page .login-card .field input::placeholder {
  color: #94A3B8 !important;
  font-weight: 400 !important;
}

.auth-page .login-card .field input:focus {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .13), 0 1px 2px rgba(15, 23, 42, .04) !important;
}

.auth-page .login-link {
  display: inline-flex !important;
  margin-top: 0 !important;
  color: #2563EB !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.auth-page .login-link:hover,
.auth-page .login-link:focus-visible {
  text-decoration: underline !important;
  outline: none !important;
}

.auth-page .login-submit-btn {
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  margin-top: 18px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #2563EB !important;
  color: #FFFFFF !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22) !important;
  cursor: pointer !important;
  transition: background-color .15s ease, box-shadow .15s ease;
}

.auth-page .login-submit-btn:hover,
.auth-page .login-submit-btn:focus-visible {
  background: #1D4ED8 !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .28) !important;
  outline: none !important;
}

.auth-page .login-submit-btn:disabled {
  cursor: wait !important;
  opacity: .82 !important;
}

.auth-page .login-btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #FFFFFF;
  border-radius: 50%;
}

.auth-page .login-submit-btn.is-loading .login-btn-spinner {
  display: inline-block;
  animation: loginSpinner .75s linear infinite;
}

@keyframes loginSpinner {
  to { transform: rotate(360deg); }
}

.auth-page .login-trust {
  margin: 16px 0 0 !important;
  color: #64748B !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  text-align: center !important;
}

.auth-page .login-trust::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #10B981;
}

.auth-page .login-footer {
  margin: 18px 0 0 !important;
  padding-top: 16px !important;
  border-top: 1px solid #E5E7EB !important;
  color: #94A3B8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-align: center !important;
}

@media (max-width: 576px) {
  body.auth-page.login-page {
    background-attachment: scroll !important;
  }

  .auth-page .login-card,
  .login-page .login-card {
    width: 95vw !important;
    padding: 24px !important;
    border-radius: 18px !important;
  }

  .auth-page .login-brand-row {
    gap: 13px !important;
    margin-bottom: 22px !important;
  }

  .auth-page .login-brand-logo {
    width: 62px !important;
    height: 62px !important;
    flex-basis: 62px !important;
  }

  .auth-page .login-brand-copy h1 {
    font-size: 30px !important;
  }

  .auth-page .login-brand-copy p {
    font-size: 14px !important;
  }
}

/* Compact POS menu and order product cards */
.menu-management-grid,
.order-menu-grid,
.order-layout .order-menu-grid {
  display: grid !important;
  gap: 16px !important;
}

.menu-management-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
}

.order-menu-grid,
.order-layout .order-menu-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
}

.menu-product,
.menu-management-product,
.order-menu-product {
  overflow: hidden !important;
  min-height: 0 !important;
  max-height: none !important;
  border-radius: 14px !important;
}

.menu-management-product {
  display: flex !important;
  flex-direction: column !important;
}

.order-menu-product {
  display: flex !important;
  flex-direction: column !important;
}

.menu-management-product .menu-product-image,
.menu-management-product > img {
  width: 100% !important;
  height: 170px !important;
  max-height: 180px !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 12px !important;
  display: block !important;
}

.order-menu-product .menu-product-image,
.order-menu-product > img,
.order-layout .order-menu-product > img {
  width: 100% !important;
  height: 140px !important;
  max-height: 150px !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 10px !important;
  display: block !important;
}

.menu-management-product .menu-product-body,
.order-menu-product .menu-product-body,
.order-layout .order-menu-product .menu-product-body {
  display: grid !important;
  gap: 6px !important;
  padding: 16px !important;
}

.order-menu-product .menu-product-body,
.order-layout .order-menu-product .menu-product-body {
  padding: 12px !important;
  gap: 5px !important;
}

.menu-management-product .menu-product-body h3,
.order-menu-product .menu-product-body h3,
.order-layout .order-menu-product .menu-product-body h3 {
  margin: 0 !important;
  color: var(--text-primary, #111827) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
}

.menu-management-product .menu-product-body p,
.order-menu-product .menu-product-body p,
.order-layout .order-menu-product .menu-product-body p {
  margin: 0 !important;
  color: var(--text-muted, #6B7280) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.menu-management-product .menu-product-body .muted {
  display: none !important;
}

.menu-management-product .menu-product-body strong,
.order-menu-product .menu-product-body strong,
.order-layout .order-menu-product .menu-product-body strong {
  margin-top: 0 !important;
  color: var(--text-primary, #111827) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

.menu-management-product .badge,
.order-menu-product .badge {
  justify-self: start !important;
  padding: 5px 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

.menu-management-product .btn,
.order-menu-product .btn,
.order-layout .order-menu-product .btn {
  min-height: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.menu-management-product .action-buttons {
  margin-top: 4px !important;
}

@media (min-width: 1400px) {
  .menu-management-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .order-menu-grid,
  .order-layout .order-menu-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1399px) and (min-width: 993px) {
  .menu-management-grid,
  .order-menu-grid,
  .order-layout .order-menu-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 992px) and (min-width: 577px) {
  .menu-management-grid,
  .order-menu-grid,
  .order-layout .order-menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 576px) {
  .menu-management-grid,
  .order-menu-grid,
  .order-layout .order-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .menu-management-product .menu-product-image,
  .menu-management-product > img {
    height: 130px !important;
  }

  .order-menu-product .menu-product-image,
  .order-menu-product > img,
  .order-layout .order-menu-product > img {
    height: 118px !important;
  }

  .menu-management-product .menu-product-body,
  .order-menu-product .menu-product-body,
  .order-layout .order-menu-product .menu-product-body {
    padding: 10px !important;
  }
}

/* Menu item card compact POS sizing */
.menu-management-grid {
  gap: 16px !important;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)) !important;
}

.menu-item-card {
  min-height: 240px !important;
  max-height: 270px !important;
}

.menu-item-card .menu-product-image,
.menu-item-card > img,
.menu-management-product.menu-item-card > img {
  width: 100% !important;
  height: 130px !important;
  max-height: 130px !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 12px !important;
}

.menu-item-card .menu-product-body {
  padding: 14px !important;
  gap: 5px !important;
}

.menu-item-card .menu-product-body h3 {
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.22 !important;
  min-height: 0 !important;
  margin: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
}

.menu-item-card .menu-product-body p {
  font-size: 12px !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

.menu-item-card .badge {
  padding: 4px 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

.menu-item-card .menu-product-body strong {
  font-size: 16px !important;
  line-height: 1.15 !important;
  margin: 0 !important;
}

.menu-item-card .btn {
  height: 36px !important;
  min-height: 36px !important;
  margin-top: 4px !important;
}

@media (min-width: 1400px) {
  .menu-management-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1399px) and (min-width: 993px) {
  .menu-management-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 992px) and (min-width: 577px) {
  .menu-management-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 576px) {
  .menu-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .menu-item-card .menu-product-image,
  .menu-item-card > img,
  .menu-management-product.menu-item-card > img {
    height: 118px !important;
    max-height: 118px !important;
  }

  .menu-item-card .menu-product-body {
    padding: 10px !important;
  }
}

/* Final presentation polish */
:root {
  --cc-bg: #F4F7FB;
  --cc-surface: #FFFFFF;
  --cc-soft: #F8FAFC;
  --cc-muted: #F1F5F9;
  --cc-border: #E2E8F0;
  --cc-border-strong: #CBD5E1;
  --cc-text: #0F172A;
  --cc-text-2: #475569;
  --cc-text-3: #64748B;
  --cc-primary: #2563EB;
  --cc-primary-soft: #EFF6FF;
  --cc-success: #15803D;
  --cc-success-soft: #DCFCE7;
  --cc-warning: #B45309;
  --cc-warning-soft: #FEF3C7;
  --cc-danger: #B91C1C;
  --cc-danger-soft: #FEE2E2;
  --cc-info: #0369A1;
  --cc-info-soft: #E0F2FE;
  --cc-radius: 14px;
  --cc-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

body:not(.auth-page):not(.login-page) {
  background: var(--cc-bg) !important;
  color: var(--cc-text) !important;
  font-family: Inter, "Plus Jakarta Sans", Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.main,
.page-content {
  min-width: 0 !important;
}

.page-content {
  max-width: 1600px !important;
  margin: 0 auto !important;
  padding: 24px !important;
}

.sidebar,
.topbar,
.topbar-actions,
.user-menu,
.table-card-grid,
.table-board,
.card,
.premium-panel {
  overflow: visible !important;
}

.sidebar {
  background: var(--cc-surface) !important;
  border-right: 1px solid var(--cc-border) !important;
  box-shadow: none !important;
}

.brand,
.nav a,
.nav button,
.topbar,
.user-pill,
.card,
.premium-panel,
.stat-card,
.menu-product,
.table-card,
.kot-card,
.receipt,
.invoice-card,
.create-cafe-form,
.table-management-card {
  border-color: var(--cc-border) !important;
}

.topbar {
  background: rgba(255, 255, 255, .97) !important;
  border-bottom: 1px solid var(--cc-border) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .03) !important;
  z-index: 1100 !important;
}

.brand,
.nav a,
.nav button {
  color: var(--cc-text-2) !important;
}

.nav a,
.nav button {
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

.nav a:hover,
.nav button:hover,
.nav a.active,
.nav button.active {
  background: var(--cc-primary-soft) !important;
  color: var(--cc-primary) !important;
}

.page-title,
.card h2,
.card h3,
.section-head h2,
.hero-band h2,
.premium-hero h2,
.dashboard-hero h2 {
  color: var(--cc-text) !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
}

.page-title {
  font-size: clamp(22px, 2vw, 30px) !important;
  font-weight: 750 !important;
}

.card h2,
.section-head h2 {
  font-size: clamp(18px, 1.6vw, 22px) !important;
  font-weight: 725 !important;
}

.card h3 {
  font-size: 16px !important;
  font-weight: 700 !important;
}

.eyebrow,
.muted,
.topbar small,
.card small,
.menu-product p,
.hero-band p,
.premium-hero p,
.dashboard-hero p {
  color: var(--cc-text-3) !important;
}

.card,
.premium-panel,
.receipt,
.invoice-card,
.create-cafe-form,
.table-management-card {
  background: var(--cc-surface) !important;
  border: 1px solid var(--cc-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--cc-shadow) !important;
  padding: 22px !important;
}

.stat-card,
.menu-product,
.table-card,
.kot-card,
.order-row,
.stock-line,
.permission-module,
.permission-card,
.plan-card {
  background: var(--cc-surface) !important;
  border: 1px solid var(--cc-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .04) !important;
}

.hero-band,
.premium-hero,
.dashboard-hero {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%) !important;
  border: 1px solid var(--cc-border) !important;
  border-radius: 20px !important;
  box-shadow: var(--cc-shadow) !important;
  color: var(--cc-text) !important;
}

.grid,
.grid-2,
.grid-3,
.grid-4,
.stat-grid,
.ops-grid,
.menu-grid,
.table-card-grid,
.table-board,
.report-chart-grid,
.cafe-form-grid,
.create-cafe-grid {
  gap: 18px !important;
}

.section-head,
.menu-toolbar,
.permissions-toolbar {
  margin: 0 0 18px !important;
  gap: 14px !important;
}

.stat-card {
  min-height: 120px !important;
}

.stat-card span,
.stat-card .muted {
  color: var(--cc-text-2) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

.stat-card strong,
.metric,
.hero-total {
  color: var(--cc-text) !important;
  font-size: clamp(28px, 3vw, 36px) !important;
  font-weight: 780 !important;
  line-height: 1.05 !important;
}

.field {
  gap: 6px !important;
  margin: 0 !important;
}

.field + .field {
  margin-top: 0 !important;
}

.field label,
label {
  color: var(--cc-text) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

.field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.field select,
.form-control:not(textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-select,
select,
.select2-container .select2-selection--single {
  height: 44px !important;
  min-height: 44px !important;
  border: 1px solid var(--cc-border-strong) !important;
  border-radius: 9px !important;
  background: #FFFFFF !important;
  color: var(--cc-text) !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

.field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.field select,
.form-control:not(textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-select,
select {
  padding: 0 12px !important;
}

.field textarea,
textarea.form-control {
  min-height: 96px !important;
  max-height: 130px !important;
  padding: 12px !important;
  border: 1px solid var(--cc-border-strong) !important;
  border-radius: 9px !important;
  background: #FFFFFF !important;
  color: var(--cc-text) !important;
  resize: vertical !important;
}

input[type="checkbox"],
input[type="radio"],
.form-check-input {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  appearance: auto !important;
  accent-color: var(--cc-primary) !important;
}

input[type="hidden"] {
  display: none !important;
}

.form-check,
.compact-checkbox,
.current-order-items label:has(input[type="checkbox"]) {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 24px !important;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-control:focus,
.form-select:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--cc-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
  outline: none !important;
}

.btn,
a.btn,
button.btn,
.quick-actions a {
  min-height: 40px !important;
  border-radius: 9px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: var(--cc-primary) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--cc-primary) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.btn.ghost,
.btn.secondary,
a.btn.ghost,
a.btn.secondary,
.quick-actions a {
  background: var(--cc-surface) !important;
  color: var(--cc-text) !important;
  border-color: var(--cc-border) !important;
}

.btn.danger,
button.btn.danger {
  background: var(--cc-danger) !important;
  color: #FFFFFF !important;
  border-color: var(--cc-danger) !important;
}

.action-buttons {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.action-btn,
a.action-btn,
button.action-btn,
summary.action-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 9px !important;
  border: 1px solid var(--cc-border) !important;
  background: var(--cc-surface) !important;
  color: var(--cc-text-2) !important;
  box-shadow: none !important;
}

.action-btn svg,
.nav-icon {
  width: 18px !important;
  height: 18px !important;
}

.table-responsive {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  border: 1px solid var(--cc-border) !important;
  border-radius: 16px !important;
  background: var(--cc-surface) !important;
}

.table {
  width: 100% !important;
  min-width: 720px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.table th {
  background: var(--cc-soft) !important;
  color: var(--cc-text-2) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: .02em !important;
  text-transform: uppercase !important;
}

.table th,
.table td {
  padding: 12px 14px !important;
  border-bottom: 1px solid #EEF2F7 !important;
  vertical-align: middle !important;
}

.badge {
  min-height: 24px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  text-transform: capitalize !important;
}

.badge.ready,
.badge.success,
.badge.paid,
.badge.completed,
.badge.available {
  color: var(--cc-success) !important;
  background: var(--cc-success-soft) !important;
  border-color: #BBF7D0 !important;
}

.badge.pending,
.badge.booked,
.badge.preparing,
.badge.warning {
  color: var(--cc-warning) !important;
  background: var(--cc-warning-soft) !important;
  border-color: #FDE68A !important;
}

.badge.danger,
.badge.occupied,
.badge.cancelled,
.badge.out,
.badge.out-of-stock {
  color: var(--cc-danger) !important;
  background: var(--cc-danger-soft) !important;
  border-color: #FECACA !important;
}

.badge.info,
.badge.sent_to_kitchen,
.badge.served,
.badge.reserved {
  color: var(--cc-info) !important;
  background: var(--cc-info-soft) !important;
  border-color: #BAE6FD !important;
}

.user-menu-dropdown,
.dropdown-menu,
.select2-dropdown,
.select2-container--open {
  z-index: 99999 !important;
}

.user-menu-dropdown,
.dropdown-menu {
  background: #2C2C2C !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35) !important;
}

.user-menu-dropdown a,
.user-menu-dropdown button,
.dropdown-menu a,
.dropdown-menu button {
  color: #FFFFFF !important;
  padding: 10px 12px !important;
}

.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover,
.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: var(--cc-primary) !important;
  color: #FFFFFF !important;
}

.menu-empty,
.permission-empty-state,
.table-empty-state,
[data-chart-empty] {
  background: var(--cc-soft) !important;
  border: 1px dashed var(--cc-border-strong) !important;
  border-radius: 14px !important;
  color: var(--cc-text-3) !important;
  padding: 18px !important;
}

.alert {
  border-radius: 12px !important;
  border: 1px solid #BBF7D0 !important;
  background: var(--cc-success-soft) !important;
  color: var(--cc-success) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04) !important;
}

.alert.error {
  border-color: #FECACA !important;
  background: var(--cc-danger-soft) !important;
  color: var(--cc-danger) !important;
}

.modal,
dialog,
.payment-dialog {
  z-index: 100000 !important;
  border: 1px solid var(--cc-border) !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .22) !important;
}

.auth-page .login-card,
.login-card {
  width: min(100%, 430px) !important;
  max-width: calc(100vw - 32px) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, .98) !important;
  border: 1px solid var(--cc-border) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .16) !important;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28) !important;
  outline-offset: 2px !important;
}

@media (max-width: 1200px) {
  .page-content {
    padding: 22px !important;
  }

  .grid-4,
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 992px) {
  .page-content {
    padding: 20px !important;
  }

  .grid-3,
  .grid-4,
  .stat-grid,
  .ops-grid,
  .report-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .current-order-panel,
  .cart-panel {
    position: static !important;
    max-height: none !important;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 16px !important;
  }

  .grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .stat-grid,
  .ops-grid,
  .menu-grid,
  .table-card-grid,
  .table-board,
  .create-cafe-grid,
  .cafe-form-grid,
  .report-chart-grid {
    grid-template-columns: 1fr !important;
  }

  .card,
  .premium-panel,
  .receipt,
  .invoice-card,
  .create-cafe-form,
  .table-management-card {
    padding: 18px !important;
  }

  .menu-toolbar,
  .section-head,
  .permissions-toolbar {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .form-actions,
  .create-cafe-actions,
  .permission-sticky-actions {
    justify-content: stretch !important;
    flex-wrap: wrap !important;
  }
}

@media (max-width: 576px) {
  .page-content {
    padding: 14px !important;
  }

  .topbar small,
  .user-pill div {
    display: none !important;
  }

  .btn,
  a.btn,
  button.btn,
  .quick-actions a {
    width: 100% !important;
  }

  .action-btn,
  a.action-btn,
  button.action-btn,
  summary.action-btn {
    width: 36px !important;
    min-width: 36px !important;
  }
}

/* Client delivery UI polish layer */
:root {
  --bg-page: #F4F7FB;
  --bg-surface: #FFFFFF;
  --bg-soft: #F8FAFC;
  --bg-muted: #F1F5F9;
  --bg-hover: #F8FAFC;
  --border-default: #E2E8F0;
  --border-soft: #EEF2F7;
  --border-strong: #CBD5E1;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --brand-primary: #2563EB;
  --brand-hover: #1D4ED8;
  --brand-soft: #EFF6FF;
  --success: #15803D;
  --success-soft: #DCFCE7;
  --warning: #B45309;
  --warning-soft: #FEF3C7;
  --danger: #B91C1C;
  --danger-soft: #FEE2E2;
  --info: #0369A1;
  --info-soft: #E0F2FE;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, .05);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, .08);
  --control-height: 44px;
  --button-height: 40px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body:not(.auth-page):not(.login-page) {
  background: var(--bg-page) !important;
  color: var(--text-primary) !important;
  font-family: Inter, "Plus Jakarta Sans", Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.page-content {
  max-width: 1600px !important;
  margin: 0 auto !important;
  padding: 24px !important;
}

.main {
  background: var(--bg-page) !important;
  min-width: 0 !important;
}

.sidebar {
  width: 240px !important;
  background: var(--bg-surface) !important;
  border-right: 1px solid var(--border-default) !important;
  box-shadow: none !important;
  z-index: 1200 !important;
}

.brand {
  min-height: 68px !important;
  padding: 14px 16px !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-soft) !important;
}

.brand-mark,
.topbar-logo,
.user-pill > span {
  background: var(--brand-soft) !important;
  color: var(--brand-primary) !important;
  border: 1px solid #DBEAFE !important;
  box-shadow: none !important;
}

.nav {
  padding: 14px 10px !important;
  gap: 4px !important;
}

.nav a,
.nav button {
  position: relative !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  color: var(--text-secondary) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: transparent !important;
}

.nav a:hover,
.nav button:hover {
  background: var(--bg-hover) !important;
  color: var(--brand-primary) !important;
}

.nav a.active,
.nav button.active {
  background: var(--brand-soft) !important;
  color: var(--brand-primary) !important;
  font-weight: 700 !important;
}

.nav a.active::before,
.nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: var(--brand-primary);
}

.nav-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
}

.topbar {
  min-height: 68px !important;
  background: rgba(255, 255, 255, .96) !important;
  border-bottom: 1px solid var(--border-default) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .03) !important;
  z-index: 1100 !important;
  overflow: visible !important;
}

.topbar-heading,
.topbar-actions,
.user-menu {
  overflow: visible !important;
}

.page-title {
  color: var(--text-primary) !important;
  font-size: clamp(22px, 2vw, 30px) !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

.eyebrow,
.muted,
.topbar small,
.card small {
  color: var(--text-muted) !important;
}

.user-pill {
  min-height: 44px !important;
  padding: 5px 10px 5px 6px !important;
  border-radius: 999px !important;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-default) !important;
  box-shadow: var(--shadow-xs) !important;
}

.user-menu-dropdown,
.dropdown-menu,
.select2-container--open,
.select2-dropdown {
  z-index: 99999 !important;
}

.user-menu-dropdown,
.dropdown-menu {
  background: #2C2C2C !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35) !important;
  overflow: visible !important;
}

.user-menu-dropdown a,
.user-menu-dropdown button,
.dropdown-menu a,
.dropdown-menu button {
  color: #FFFFFF !important;
  padding: 10px 12px !important;
}

.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover,
.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: #2563EB !important;
  color: #FFFFFF !important;
}

.card,
.premium-panel,
.receipt,
.invoice-card,
.table-management-card,
.create-cafe-form {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 22px !important;
}

.card h2,
.card h3,
.section-head h2 {
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

.grid,
.grid-2,
.grid-3,
.grid-4,
.stat-grid,
.ops-grid,
.menu-grid,
.table-card-grid,
.table-board,
.report-chart-grid,
.create-cafe-grid,
.cafe-form-grid {
  gap: 18px !important;
  min-width: 0 !important;
}

.stat-card {
  min-height: 128px !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--bg-surface) !important;
  box-shadow: var(--shadow-sm) !important;
  color: var(--text-primary) !important;
}

.stat-card small {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--text-subtle) !important;
}

.stat-card span,
.stat-card .muted {
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

.stat-card strong,
.metric,
.hero-total {
  color: var(--text-primary) !important;
  font-size: clamp(28px, 3vw, 36px) !important;
  font-weight: 750 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

.hero-band,
.premium-hero,
.dashboard-hero {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: 20px !important;
  box-shadow: var(--shadow-md) !important;
  color: var(--text-primary) !important;
}

.hero-band h2,
.premium-hero h2,
.dashboard-hero h2 {
  color: var(--text-primary) !important;
  font-size: clamp(26px, 3vw, 34px) !important;
  font-weight: 750 !important;
}

.hero-band p,
.premium-hero p,
.dashboard-hero p {
  color: var(--text-secondary) !important;
}

.quick-actions a,
.btn,
button.btn,
a.btn {
  min-height: var(--button-height) !important;
  border-radius: 9px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: 1px solid transparent !important;
  background: var(--brand-primary) !important;
  color: #FFFFFF !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.btn.secondary,
.btn.ghost,
a.btn.secondary,
a.btn.ghost,
.quick-actions a {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-default) !important;
}

.btn.danger,
button.btn.danger {
  background: var(--danger) !important;
  color: #FFFFFF !important;
  border-color: var(--danger) !important;
}

.btn:disabled,
.btn.is-disabled,
.menu-product.disabled .btn {
  cursor: not-allowed !important;
  opacity: .58 !important;
}

.action-buttons {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.action-btn,
a.action-btn,
button.action-btn,
summary.action-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 9px !important;
  border: 1px solid var(--border-default) !important;
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
}

.action-btn:hover,
a.action-btn:hover,
button.action-btn:hover,
summary.action-btn:hover {
  color: var(--brand-primary) !important;
  border-color: #BFDBFE !important;
  background: var(--brand-soft) !important;
}

.field {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
  min-width: 0 !important;
}

.field label,
label {
  color: var(--text-primary) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

.field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea,
.form-control:not(textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-select,
select,
textarea.form-control {
  width: 100% !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 9px !important;
  background: #FFFFFF !important;
  color: var(--text-primary) !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

.field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.field select,
.form-control:not(textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form-select,
select {
  height: var(--control-height) !important;
  min-height: var(--control-height) !important;
  padding: 0 12px !important;
}

.field textarea,
textarea.form-control {
  min-height: 96px !important;
  max-height: 130px !important;
  padding: 12px !important;
  resize: vertical !important;
}

input[type="checkbox"],
input[type="radio"],
.form-check-input {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  appearance: auto !important;
  accent-color: var(--brand-primary) !important;
}

input[type="hidden"] {
  display: none !important;
}

.form-check,
.compact-checkbox,
.current-order-items label:has(input[type="checkbox"]) {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 24px !important;
  margin: 0 !important;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-control:focus,
.form-select:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
  outline: none !important;
}

.form-actions,
.create-cafe-actions,
.permission-sticky-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 18px !important;
}

.table-responsive {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--bg-surface) !important;
}

.table {
  width: 100% !important;
  min-width: 720px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: var(--text-primary) !important;
}

.table th {
  background: var(--bg-soft) !important;
  color: var(--text-secondary) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: .02em !important;
  text-transform: uppercase !important;
}

.table th,
.table td {
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--border-soft) !important;
  vertical-align: middle !important;
}

.badge {
  min-height: 24px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  text-transform: capitalize !important;
}

.badge.ready,
.badge.success,
.badge.paid,
.badge.completed,
.badge.available {
  color: var(--success) !important;
  background: var(--success-soft) !important;
  border-color: #BBF7D0 !important;
}

.badge.pending,
.badge.booked,
.badge.preparing,
.badge.warning {
  color: var(--warning) !important;
  background: var(--warning-soft) !important;
  border-color: #FDE68A !important;
}

.badge.danger,
.badge.occupied,
.badge.cancelled,
.badge.out,
.badge.out-of-stock {
  color: var(--danger) !important;
  background: var(--danger-soft) !important;
  border-color: #FECACA !important;
}

.badge.info,
.badge.sent_to_kitchen,
.badge.served,
.badge.reserved {
  color: var(--info) !important;
  background: var(--info-soft) !important;
  border-color: #BAE6FD !important;
}

.badge.free-trial {
  color: #1D4ED8 !important;
  background: #DBEAFE !important;
  border-color: #BFDBFE !important;
}

.menu-toolbar,
.section-head,
.permissions-toolbar {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  margin-bottom: 18px !important;
}

.search-field {
  min-width: min(320px, 100%) !important;
}

.chip-row {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.chip {
  min-height: 36px !important;
  padding: 0 14px !important;
  border: 1px solid var(--border-default) !important;
  border-radius: 999px !important;
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  font-weight: 700 !important;
}

.chip.active,
.chip:hover {
  background: var(--brand-soft) !important;
  color: var(--brand-primary) !important;
  border-color: #BFDBFE !important;
}

.menu-product,
.table-card,
.kot-card,
.order-row,
.stock-line,
.permission-card,
.permission-module,
.plan-card {
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--bg-surface) !important;
  box-shadow: var(--shadow-xs) !important;
}

.menu-product img {
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
  background: var(--bg-muted) !important;
}

.menu-product-body,
.table-card,
.kot-card,
.order-row,
.stock-line {
  gap: 10px !important;
}

.menu-product.disabled {
  opacity: .68 !important;
  filter: grayscale(.2) !important;
}

.current-order-panel,
.cart-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.current-order-items {
  min-height: 120px !important;
}

.payment-preview,
.invoice-totals,
.receipt-header {
  background: var(--bg-soft) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-md) !important;
  padding: 14px !important;
}

.invoice-totals .grand th,
.invoice-totals .grand td {
  font-size: 18px !important;
  font-weight: 800 !important;
}

.alert {
  border-radius: var(--radius-md) !important;
  border: 1px solid #BBF7D0 !important;
  background: var(--success-soft) !important;
  color: var(--success) !important;
  box-shadow: var(--shadow-xs) !important;
}

.alert.error {
  border-color: #FECACA !important;
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
}

.modal,
dialog,
.payment-dialog {
  z-index: 100000 !important;
  border: 1px solid var(--border-default) !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .22) !important;
}

.select2-container {
  width: 100% !important;
}

.select2-container .select2-selection--single {
  height: var(--control-height) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 9px !important;
  background: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-primary) !important;
  line-height: var(--control-height) !important;
  padding-left: 12px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--brand-primary) !important;
  color: #FFFFFF !important;
}

.auth-page .login-card {
  width: 430px !important;
  max-width: calc(100vw - 32px) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, .98) !important;
  border: 1px solid var(--border-default) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .16) !important;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28) !important;
  outline-offset: 2px !important;
}

@media (max-width: 1200px) {
  .page-content {
    padding: 22px !important;
  }

  .grid-4,
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 992px) {
  .page-content {
    padding: 20px !important;
  }

  .grid-3,
  .grid-4,
  .stat-grid,
  .ops-grid,
  .report-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    transform: translateX(-100%) !important;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0) !important;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 16px !important;
  }

  .topbar {
    padding: 12px 16px !important;
  }

  .topbar-heading {
    min-width: 0 !important;
  }

  .grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .stat-grid,
  .ops-grid,
  .menu-grid,
  .table-card-grid,
  .table-board,
  .create-cafe-grid,
  .cafe-form-grid,
  .report-chart-grid {
    grid-template-columns: 1fr !important;
  }

  .card,
  .premium-panel,
  .receipt,
  .invoice-card,
  .table-management-card,
  .create-cafe-form {
    padding: 18px !important;
  }

  .menu-toolbar,
  .section-head,
  .permissions-toolbar {
    align-items: stretch !important;
  }

  .search-field {
    width: 100% !important;
  }

  .form-actions,
  .create-cafe-actions,
  .permission-sticky-actions {
    justify-content: stretch !important;
    flex-wrap: wrap !important;
  }
}

@media (max-width: 576px) {
  .page-content {
    padding: 14px !important;
  }

  .topbar {
    gap: 10px !important;
  }

  .topbar small,
  .user-pill div {
    display: none !important;
  }

  .page-title {
    font-size: 21px !important;
  }

  .stat-card {
    min-height: 112px !important;
  }

  .btn,
  button.btn,
  a.btn,
  .quick-actions a {
    width: 100% !important;
  }

  .action-btn,
  a.action-btn,
  button.action-btn,
  summary.action-btn {
    width: 36px !important;
    min-width: 36px !important;
  }

  .table {
    min-width: 680px !important;
  }
}

/* Coordinator-ready UI polish layer */
:root {
  --page-bg: #F6F8FB;
  --surface: #FFFFFF;
  --surface-soft: #F8FAFC;
  --border: #E5E7EB;
  --border-soft: #EEF2F7;
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-subtle: #94A3B8;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: #EEF2FF;
  --success: #16A34A;
  --success-soft: #DCFCE7;
  --warning: #D97706;
  --warning-soft: #FEF3C7;
  --danger: #DC2626;
  --danger-soft: #FEE2E2;
  --info: #0284C7;
  --info-soft: #E0F2FE;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
}

body:not(.auth-page):not(.login-page) {
  color: var(--text-secondary) !important;
  background: var(--page-bg) !important;
  font-family: Inter, Manrope, "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.page-content {
  max-width: 1600px;
  margin: 0 auto;
}

.page-content > * + * {
  margin-top: 20px;
}

.main {
  padding: 24px !important;
}

.topbar {
  min-height: 66px !important;
  margin: -24px -24px 24px !important;
  padding: 12px 24px !important;
  background: rgba(255, 255, 255, .98) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  z-index: 9000 !important;
}

.page-title {
  color: var(--text-primary) !important;
  font-size: clamp(25px, 2vw, 31px) !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
}

.eyebrow {
  color: var(--primary) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.sidebar,
.sidebar-scroll {
  width: 240px !important;
  padding: 14px 10px !important;
  background: var(--surface) !important;
  border-right: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.app-shell {
  grid-template-columns: 240px minmax(0, 1fr) !important;
}

.brand {
  min-height: 54px !important;
  padding: 0 8px 12px !important;
  margin-bottom: 10px !important;
  color: var(--text-primary) !important;
}

.brand-mark,
.topbar-logo {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 10px !important;
}

.nav {
  gap: 4px !important;
}

.nav a,
.nav button {
  min-height: 42px !important;
  padding: 8px 10px !important;
  gap: 10px !important;
  color: var(--text-muted) !important;
  background: transparent !important;
  border-radius: var(--radius-sm) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

.nav a:hover,
.nav button:hover {
  color: var(--text-primary) !important;
  background: var(--surface-soft) !important;
}

.nav a.active {
  color: var(--primary) !important;
  background: var(--primary-soft) !important;
}

.nav .nav-icon,
.user-menu-dropdown .nav-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  color: currentColor !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.nav .nav-text,
.user-menu-dropdown .nav-text {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  display: inline !important;
  place-items: initial !important;
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  font-weight: inherit !important;
}

.card,
.premium-panel,
.invoice-card,
.chart-card,
.report-content .card,
.menu-product,
.table-card,
.kot-card,
.user-management-card,
.stat-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-sm) !important;
}

.card,
.premium-panel,
.stat-card {
  padding: 20px !important;
}

.grid,
.table-board,
.menu-grid,
.report-grid,
.dashboard-grid {
  gap: 18px !important;
}

.grid-4 > .card,
.grid-4 > a.card,
.stat-card {
  min-height: 118px;
  display: grid;
  align-content: center;
}

.metric {
  color: var(--text-primary) !important;
  font-size: clamp(25px, 2.5vw, 34px) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

.muted,
.card small,
.topbar small,
.section-head p {
  color: var(--text-muted) !important;
}

.section-head {
  gap: 12px !important;
  margin-bottom: 14px !important;
}

.section-head h2,
.card h2,
.premium-panel h2,
.chart-card h2 {
  color: var(--text-primary) !important;
  font-size: clamp(18px, 1.5vw, 22px) !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
}

.hero-band,
.premium-hero,
.dashboard-hero {
  margin-bottom: 20px !important;
  padding: 24px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
}

form.card,
.form-page-container,
.create-cafe-form,
.edit-cafe-form {
  max-width: 1100px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.field,
.cafe-form-group,
.form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
}

.field + .field,
.form-group + .form-group {
  margin-top: 16px !important;
}

.grid .field + .field,
.create-cafe-column .field + .field,
.cafe-form-column .field + .field {
  margin-top: 0 !important;
}

.field label,
.form-group label,
.cafe-form-group label {
  margin: 0 !important;
  color: var(--text-primary) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
select,
textarea,
.form-control,
.form-select {
  width: 100%;
  color: var(--text-primary) !important;
  background: var(--surface) !important;
  border: 1px solid #D1D5DB !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
  font-size: 14px !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
select,
.form-control:not(textarea),
.form-select {
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
}

textarea,
textarea.form-control {
  min-height: 88px !important;
  max-height: 120px !important;
  padding: 11px 12px !important;
  resize: vertical;
}

input[type="file"],
input.form-control[type="file"] {
  min-height: 44px !important;
  padding: 9px 12px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: var(--radius-sm) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-subtle) !important;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10) !important;
  outline: none !important;
}

input[type="checkbox"],
input[type="radio"],
.form-check-input {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
  accent-color: var(--primary);
}

input[type="hidden"] {
  display: none !important;
}

.btn,
a.btn,
button.btn,
button[type="submit"]:not(.nav button):not(.sidebar button) {
  min-height: 40px !important;
  height: auto;
  padding: 9px 14px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.btn:not(.ghost):not(.secondary):not(.danger),
a.btn:not(.ghost):not(.secondary):not(.danger),
button.btn:not(.ghost):not(.secondary):not(.danger) {
  color: #FFFFFF !important;
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.btn.ghost,
.btn.secondary,
a.btn.ghost,
a.btn.secondary,
button.btn.ghost,
button.btn.secondary {
  color: #374151 !important;
  background: var(--surface) !important;
  border: 1px solid #D1D5DB !important;
}

.btn.danger,
button.btn.danger {
  color: #FFFFFF !important;
  background: var(--danger) !important;
  border-color: var(--danger) !important;
}

.form-actions,
.action-buttons,
.create-cafe-actions {
  gap: 8px !important;
}

.action-buttons {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

.action-btn,
a.action-btn,
button.action-btn,
summary.action-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border-radius: var(--radius-sm) !important;
}

.action-btn svg,
a.action-btn svg,
button.action-btn svg,
summary.action-btn svg {
  width: 18px !important;
  height: 18px !important;
}

.table-responsive {
  width: 100%;
  overflow-x: auto !important;
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  color: var(--text-secondary) !important;
  background: var(--surface) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 14px !important;
}

.table th {
  padding: 11px 13px !important;
  color: var(--text-secondary) !important;
  background: var(--surface-soft) !important;
  border-bottom: 1px solid var(--border) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.table td {
  padding: 12px 13px !important;
  border-bottom: 1px solid var(--border-soft) !important;
  vertical-align: middle !important;
}

.table tr:hover td {
  background: #FAFBFF !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
}

.badge.ready,
.badge.success,
.badge.paid,
.badge.available {
  color: var(--success) !important;
  background: var(--success-soft) !important;
}

.badge.pending,
.badge.booked,
.badge.warning {
  color: var(--warning) !important;
  background: var(--warning-soft) !important;
}

.badge.danger,
.badge.occupied,
.badge.out,
.badge.out-of-stock {
  color: var(--danger) !important;
  background: var(--danger-soft) !important;
}

.badge.info,
.badge.preparing,
.badge.sent_to_kitchen {
  color: var(--info) !important;
  background: var(--info-soft) !important;
}

.alert {
  margin: 0 0 16px !important;
  padding: 12px 14px !important;
  color: #166534 !important;
  background: var(--success-soft) !important;
  border: 1px solid #BBF7D0 !important;
  border-radius: var(--radius-md) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

.alert.error {
  color: #991B1B !important;
  background: var(--danger-soft) !important;
  border-color: #FECACA !important;
}

.user-pill {
  min-height: 42px !important;
  padding: 4px 10px 4px 4px !important;
  border-radius: 999px !important;
}

.user-menu-dropdown {
  z-index: 100000 !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-md) !important;
}

.select2-container {
  margin: 0 !important;
}

.select2-container--default .select2-selection--single {
  height: 44px !important;
  border-color: #D1D5DB !important;
  border-radius: var(--radius-sm) !important;
}

.select2-dropdown {
  z-index: 99999 !important;
  border-color: #D1D5DB !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md) !important;
}

.select2-search--dropdown .select2-search__field {
  height: 36px !important;
  border-radius: 7px !important;
}

.permission-tree-grid,
.permission-form > .grid.grid-2 {
  gap: 10px !important;
}

.permission-tree-row {
  min-height: 48px !important;
  padding: 8px 10px !important;
}

.permission-module-header {
  min-height: 44px !important;
}

.auth-page {
  min-height: 100vh !important;
  display: grid !important;
  place-items: center !important;
  padding: 24px !important;
}

.auth-page .login-card,
.login-card {
  width: min(100%, 450px) !important;
  padding: 32px !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .12) !important;
}

.auth-page .login-brand-row {
  gap: 16px !important;
  margin-bottom: 24px !important;
}

.auth-page .login-brand-logo {
  width: 60px !important;
  height: 60px !important;
  object-fit: contain !important;
}

.auth-page .login-brand-copy h1 {
  color: var(--text-primary) !important;
  font-size: clamp(32px, 4vw, 40px) !important;
  font-weight: 750 !important;
}

.auth-page .login-brand-copy p {
  color: var(--text-muted) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
}

.auth-page .field {
  margin-top: 0 !important;
  margin-bottom: 14px !important;
}

.auth-page .login-link {
  display: inline-flex;
  margin-top: 0 !important;
  color: var(--primary) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

@media (max-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 992px) {
  .app-shell {
    display: block !important;
  }

  .sidebar,
  .sidebar-scroll {
    width: min(280px, 86vw) !important;
  }

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

@media (max-width: 768px) {
  .main {
    padding: 16px !important;
  }

  .topbar {
    margin: -16px -16px 18px !important;
    padding: 12px 16px !important;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .cafe-form-grid,
  .create-cafe-grid {
    grid-template-columns: 1fr !important;
  }

  .card,
  .premium-panel,
  .stat-card {
    padding: 18px !important;
  }

  .hero-band,
  .premium-hero,
  .dashboard-hero {
    grid-template-columns: 1fr !important;
    padding: 20px !important;
  }

  .action-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {
  .auth-page {
    padding: 16px !important;
  }

  .auth-page .login-card,
  .login-card {
    padding: 24px !important;
  }

  .auth-page .login-brand-row {
    align-items: center !important;
  }

  .auth-page .login-brand-logo {
    width: 52px !important;
    height: 52px !important;
  }

  .auth-page .login-brand-copy h1 {
    font-size: 30px !important;
  }

  .table th,
  .table td {
    white-space: nowrap;
  }

  .invoice-card .table th,
  .invoice-card .table td {
    white-space: normal;
  }

  .btn,
  button.btn,
  a.btn {
    width: 100%;
  }

  .action-btn,
  a.action-btn,
  button.action-btn,
  summary.action-btn {
    width: 36px !important;
    min-width: 36px !important;
  }
}

/* True final UI consistency guard */
:root {
  --surface-muted: #F1F5F9;
}

.invoice-totals .grand th,
.invoice-totals .grand td {
  color: #FFFFFF !important;
  background: var(--primary, #2563EB) !important;
}

.current-order-panel,
.cart-panel {
  position: sticky !important;
  top: 88px !important;
  max-height: calc(100vh - 112px) !important;
  overflow: hidden !important;
}

.current-order-items {
  flex: 1 1 auto;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: var(--primary, #2563EB) var(--surface-soft, #F8FAFC);
}

.current-order-items::-webkit-scrollbar {
  width: 8px !important;
}

.current-order-items::-webkit-scrollbar-track {
  background: var(--surface-soft, #F8FAFC) !important;
  border-radius: 999px !important;
}

.current-order-items::-webkit-scrollbar-thumb {
  background: var(--primary, #2563EB) !important;
  border-radius: 999px !important;
}

.chart-card,
.report-chart-grid .card {
  background: var(--surface, #FFFFFF) !important;
  border: 1px solid var(--border, #E5E7EB) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(15, 23, 42, 0.04)) !important;
}

.menu-empty,
.permission-empty-state,
.table-empty-state,
[data-chart-empty] {
  background: var(--surface-soft, #F8FAFC) !important;
  border: 1px dashed #CBD5E1 !important;
  border-radius: 12px !important;
  color: var(--text-muted, #6B7280) !important;
}

@media (max-width: 992px) {
  .current-order-panel,
  .cart-panel {
    position: static !important;
    max-height: none !important;
  }

  .current-order-items {
    max-height: 58vh !important;
  }
}

/* ACTUAL EOF OVERRIDE: compact Admin Menu item cards after every global card/image rule */
.menu-management-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: start !important;
}

.menu-management-grid .menu-item-card {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  border-radius: 12px !important;
}

.menu-management-grid .menu-item-card > img,
.menu-management-grid .menu-item-card > img.menu-product-image {
  display: block !important;
  width: 100% !important;
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 10px !important;
  flex: 0 0 100px !important;
}

.menu-management-grid .menu-item-card .menu-product-body {
  display: grid !important;
  gap: 4px !important;
  padding: 10px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

.menu-management-grid .menu-item-card .badge {
  justify-self: start !important;
  min-height: 0 !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

.menu-management-grid .menu-item-card h3 {
  margin: 0 !important;
  min-height: 0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.18 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.menu-management-grid .menu-item-card p {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.menu-management-grid .menu-item-card p.muted {
  display: none !important;
}

.menu-management-grid .menu-item-card strong {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

.menu-management-grid .menu-item-card .btn {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  margin: 3px 0 0 !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 32px !important;
}

.menu-management-grid .menu-item-card .action-buttons {
  margin-top: 2px !important;
  gap: 6px !important;
}

.menu-management-grid .menu-item-card .action-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
}

@media (min-width: 1600px) {
  .menu-management-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1399px) and (min-width: 993px) {
  .menu-management-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 992px) and (min-width: 577px) {
  .menu-management-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 576px) {
  .menu-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .menu-management-grid .menu-item-card > img,
  .menu-management-grid .menu-item-card > img.menu-product-image {
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    flex-basis: 92px !important;
  }
}

/* ACTUAL EOF REFINEMENT: action icons overlay so cards stay near POS height */
.menu-management-grid .menu-item-card {
  position: relative !important;
}

.menu-management-grid .menu-item-card .action-buttons {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  z-index: 3 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 5px !important;
  background: rgba(255, 255, 255, .88) !important;
  border: 1px solid rgba(226, 232, 240, .9) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12) !important;
}

.menu-management-grid .menu-item-card .action-buttons form {
  margin: 0 !important;
}

.menu-management-grid .menu-item-card .action-btn {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  border-radius: 8px !important;
}

.menu-management-grid .menu-item-card .action-btn svg {
  width: 15px !important;
  height: 15px !important;
}

.menu-management-grid .menu-item-card .badge {
  position: absolute !important;
  left: 8px !important;
  top: 8px !important;
  z-index: 2 !important;
  background: rgba(220, 252, 231, .94) !important;
}

.menu-management-grid .menu-item-card .menu-product-body {
  padding: 8px 10px 10px !important;
  gap: 3px !important;
}

.menu-management-grid .menu-item-card h3 {
  line-height: 1.12 !important;
}

.menu-management-grid .menu-item-card .btn {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  line-height: 28px !important;
  margin-top: 2px !important;
}

/* ACTUAL EOF REFINEMENT 2: put category and price on one row */
.menu-management-grid .menu-item-card .menu-product-body {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
}

.menu-management-grid .menu-item-card h3,
.menu-management-grid .menu-item-card .btn {
  grid-column: 1 / -1 !important;
}

.menu-management-grid .menu-item-card p:not(.muted) {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.menu-management-grid .menu-item-card strong {
  justify-self: end !important;
  white-space: nowrap !important;
}

/* Super Admin reports overflow fix */
.reports-page-content,
.report-content.reports-page-content {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

body:has(.reports-page-content),
.main:has(.reports-page-content),
.app-shell:has(.reports-page-content) {
  overflow-x: hidden !important;
}

.reports-page-content *,
.reports-page-content .card,
.reports-page-content .chart-card,
.reports-page-content .report-card {
  min-width: 0;
}

.revenue-report-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
  align-items: start !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-top: 16px !important;
  overflow: visible !important;
}

.reports-page-content .report-card,
.revenue-report-grid .report-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 16px !important;
  transform: none !important;
}

.report-card-header {
  padding: 20px 20px 10px !important;
}

.report-card-header h2 {
  margin: 0 !important;
}

.report-table-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
}

.reports-page-content .report-table-wrapper .report-table,
.reports-page-content .report-table {
  width: 100% !important;
  min-width: 620px !important;
  max-width: none !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
}

.reports-page-content .revenue-table {
  min-width: 560px !important;
}

.reports-page-content .report-table th,
.reports-page-content .report-table td {
  padding: 14px 16px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.reports-page-content .report-table th {
  font-weight: 700 !important;
}

@media (max-width: 1100px) {
  .revenue-report-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .reports-page-content .report-table-wrapper .report-table,
  .reports-page-content .report-table {
    min-width: 560px !important;
  }

  .reports-page-content .revenue-table {
    min-width: 520px !important;
  }
}

[data-currency-preview] {
  color: var(--primary, #2563EB);
  font-weight: 800;
}

/* Dedicated password visibility control */
.password-wrapper {
  position: relative;
  width: 100%;
  overflow: visible !important;
}

.password-wrapper .password-has-eye {
  padding-right: 45px !important;
}

.password-wrapper .password-eye-button {
  position: absolute !important;
  top: 50% !important;
  right: 12px !important;
  bottom: auto !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #64748b !important;
  cursor: pointer !important;
  z-index: 10 !important;
  line-height: 1 !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.password-wrapper .password-eye-button::before,
.password-wrapper .password-eye-button::after {
  display: none !important;
  content: none !important;
}

.password-wrapper .password-eye-button svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  stroke: currentColor !important;
  fill: none !important;
  pointer-events: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.password-wrapper .password-eye-button svg[hidden] {
  display: none !important;
}

.software-footer {
  margin-top: 24px;
  padding: 14px 0 6px;
  border-top: 1px solid rgba(148, 163, 184, .24);
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.billing-document-footer {
  margin-top: 24px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

@media print {
  .billing-document-footer {
    display: block !important;
    margin-top: 18px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 10px;
    text-align: center;
  }
}

.super-admin-viewing-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  margin-left: auto;
}

.super-admin-viewing-notice strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}

.inline-enter-cafe-form {
  margin: 0;
}

.user-menu-dropdown form {
  margin: 0;
}

.super-admin-enter-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100000;
  max-width: min(360px, calc(100vw - 28px));
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
  transition: opacity .2s ease;
}

.super-admin-enter-toast.is-hiding {
  opacity: 0;
}

.link-button.cafe-name-enter {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.link-button.cafe-name-enter:hover {
  color: var(--primary, #2563EB);
  text-decoration: underline;
}

@media (max-width: 576px) {
  .super-admin-viewing-notice {
    flex: 1 1 100%;
    margin-left: 0;
    max-width: 100%;
    white-space: normal;
  }
}

/* Final placement and color fixes for Super Admin viewing notice and footer */
.main {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}

.page-content {
  width: 100% !important;
}

.super-admin-viewing-notice {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: auto !important;
  padding: 8px 12px !important;
  border: 1px solid #fca5a5 !important;
  border-radius: 10px !important;
  background: #fee2e2 !important;
  color: #b91c1c !important;
  box-shadow: 0 8px 20px rgba(220, 38, 38, .10) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.super-admin-viewing-notice strong {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 999px !important;
  background: #dc2626 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  flex: 0 0 auto !important;
}

.super-admin-viewing-notice span {
  color: #b91c1c !important;
}

.software-footer {
  width: 100% !important;
  max-width: 1600px !important;
  margin: auto auto 0 !important;
  padding: 18px 24px 8px !important;
  border-top: 1px solid rgba(148, 163, 184, .24) !important;
  color: #6b7280 !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

@media (max-width: 768px) {
  .super-admin-viewing-notice {
    flex: 1 1 100% !important;
    margin-left: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
  }

  .software-footer {
    padding-inline: 14px !important;
  }
}

/* Keep Super Admin cafe names horizontal in Cafe Management */
.cafe-management-table .cafe-name-cell {
  width: 220px !important;
  min-width: 220px !important;
  max-width: 280px !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  text-align: left !important;
  vertical-align: middle !important;
}

.cafe-management-table .cafe-name-cell .inline-enter-cafe-form {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.cafe-management-table button.link-button.cafe-name-enter,
.cafe-management-table .link-button.cafe-name-enter {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  line-height: 1.4 !important;
  text-align: left !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  cursor: pointer !important;
}

.cafe-management-table .cafe-name {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: left !important;
  color: inherit !important;
  line-height: 1.4 !important;
}

.cafe-management-table button.link-button.cafe-name-enter:hover,
.cafe-management-table .link-button.cafe-name-enter:hover {
  background: transparent !important;
  color: var(--primary, #2563EB) !important;
  text-decoration: underline !important;
}

@media (max-width: 576px) {
  .cafe-management-table .cafe-name-cell {
    width: 170px !important;
    min-width: 170px !important;
    max-width: 210px !important;
  }
}

.cafe-management-table td.cafe-name-cell,
.cafe-management-table td.cafe-name-cell *,
.cafe-management-table td.cafe-name-cell button,
.cafe-management-table td.cafe-name-cell span {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: nowrap !important;
}

.cafe-management-table td.cafe-name-cell button.cafe-name-enter {
  all: unset !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  cursor: pointer !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: left !important;
  line-height: 1.4 !important;
}

/* Final footer cleanup */
.main > .software-footer {
  width: 100% !important;
  max-width: 1600px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  margin: 24px auto 0 !important;
  padding: 18px 16px 8px !important;
  text-align: center !important;
}

.billing-document-footer {
  margin-top: 24px !important;
  padding-top: 10px !important;
  border-top: 1px solid #e5e7eb !important;
  color: #374151 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

@media print {
  .billing-document-footer {
    display: block !important;
    color: #111827 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-align: center !important;
  }
}

/* Super Admin dashboard clickable compact cards */
.superadmin-stat-grid {
  gap: 14px !important;
}

.superadmin-stat-grid .dashboard-stat-card {
  display: block !important;
  min-height: 105px !important;
  padding: 18px 20px !important;
  border-radius: 12px !important;
  color: inherit !important;
  text-decoration: none !important;
  cursor: pointer !important;
  overflow: hidden !important;
}

.superadmin-stat-grid .dashboard-stat-card:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08) !important;
}

.superadmin-stat-grid .dashboard-stat-card:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 2px !important;
}

.superadmin-stat-grid .dashboard-stat-card .metric {
  margin-top: 6px !important;
  font-size: clamp(22px, 2vw, 27px) !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.superadmin-stat-grid .dashboard-stat-card .muted {
  font-size: 13px !important;
  line-height: 1.35 !important;
}

/* Keep the shared app footer centered inside the main content area */
.main > .software-footer {
  align-self: center !important;
  width: 100% !important;
  max-width: 1600px !important;
  margin: 24px auto 0 !important;
  padding: 18px 16px 8px !important;
  text-align: center !important;
}

@media (max-width: 992px) {
  .superadmin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 576px) {
  .superadmin-stat-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Activity logs */
.activity-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  margin-bottom: 18px !important;
}

.activity-status-success {
  background: #dcfce7 !important;
  color: #166534 !important;
}

.activity-status-failed {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

.activity-status-warning {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.activity-status-info {
  background: #dbeafe !important;
  color: #1e40af !important;
}

.activity-detail-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.activity-detail-grid div {
  display: grid !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.activity-detail-grid strong {
  color: #111827 !important;
  font-size: 13px !important;
}

.activity-detail-grid span {
  color: #4b5563 !important;
  word-break: break-word !important;
}

.activity-detail-wide {
  grid-column: 1 / -1 !important;
}

.activity-json {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-radius: 10px !important;
  padding: 14px !important;
  max-height: 420px !important;
  overflow: auto !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

.activity-feed {
  display: grid !important;
  gap: 10px !important;
}

.activity-feed-item {
  display: flex !important;
  justify-content: space-between !important;
  gap: 14px !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

.activity-feed-item:last-child {
  border-bottom: 0 !important;
}

.activity-feed-item strong {
  display: block !important;
  color: #111827 !important;
  font-size: 14px !important;
}

.activity-feed-item span,
.activity-feed-item small {
  color: #6b7280 !important;
  font-size: 12px !important;
}

.activity-page-card {
  max-width: 980px !important;
  margin: 0 auto !important;
}

.activity-search-form {
  margin: 14px 0 22px !important;
}

.activity-search-form input {
  width: 100% !important;
  max-width: 420px !important;
}

.activity-date-group {
  margin-top: 20px !important;
}

.activity-date-group h3 {
  margin: 0 0 10px !important;
  color: #6b7280 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
}

.activity-message-list {
  display: grid !important;
  gap: 10px !important;
}

.activity-message-card {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .04) !important;
}

.activity-message-icon {
  width: 34px !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
}

.activity-message-icon svg {
  width: 17px !important;
  height: 17px !important;
}

.activity-tone-success { color: #16a34a !important; }
.activity-tone-info { color: #2563eb !important; }
.activity-tone-warning { color: #d97706 !important; }
.activity-tone-danger { color: #dc2626 !important; }

.activity-message-body {
  min-width: 0 !important;
}

.activity-message-body strong {
  display: block !important;
  color: #111827 !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.activity-message-body span,
.activity-message-body small {
  display: block !important;
  color: #6b7280 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

@media (max-width: 768px) {
  .activity-detail-grid {
    grid-template-columns: 1fr !important;
  }

  .activity-feed-item {
    flex-direction: column !important;
    gap: 4px !important;
  }

  .activity-message-card {
    grid-template-columns: 34px minmax(0, 1fr) !important;
  }

  .activity-message-card > .badge {
    grid-column: 2 !important;
    justify-self: start !important;
  }
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.permission-mini-module.is-collapsed .permission-mini-list {
  display: none !important;
}

.permission-mini-module.is-collapsed .permission-mini-head {
  border-bottom: 0 !important;
}

.permission-mini-head {
  display: grid !important;
  grid-template-columns: minmax(140px, 1fr) auto auto !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
}

.permission-mini-title {
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  text-align: left !important;
  cursor: pointer !important;
}

.permission-mini-title strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.permission-mini-head small {
  white-space: nowrap !important;
}

.permission-mini-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.permission-mini-arrow {
  width: 30px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  background: #FFFFFF !important;
  color: #374151 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.permission-mini-module:not(.is-collapsed) .permission-mini-arrow {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .permission-mini-head {
    grid-template-columns: 1fr auto !important;
  }

  .permission-mini-actions {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
}

.permission-tree-card .permission-module-header {
  grid-template-columns: 34px 42px minmax(180px, 1fr) auto !important;
  cursor: pointer !important;
}

.permission-module-controls {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.permission-module-controls .badge {
  min-height: 24px !important;
  padding: 5px 9px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

.permission-module-controls .badge.warning {
  color: #92400E !important;
  background: #FEF3C7 !important;
  border: 1px solid #FDE68A !important;
}

.permission-module-action {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  background: #FFFFFF !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

.permission-module-action.enable {
  color: #047857 !important;
  background: #ECFDF5 !important;
  border-color: #A7F3D0 !important;
}

.permission-module-action.disable {
  color: #B91C1C !important;
  background: #FEF2F2 !important;
  border-color: #FECACA !important;
}

.permission-tree-card.is-collapsed .permission-module-header {
  border-bottom: 0 !important;
  border-bottom-left-radius: inherit !important;
  border-bottom-right-radius: inherit !important;
}

.permission-tree-card.is-collapsed .permission-module-body {
  display: none !important;
}

.permission-module-title small {
  white-space: nowrap !important;
}

@media (max-width: 768px) {
  .permission-tree-card .permission-module-header {
    grid-template-columns: 34px 38px minmax(0, 1fr) !important;
  }

  .permission-module-controls {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
}

.billing-inline-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  width: auto !important;
  min-width: max-content !important;
  margin: 0 !important;
}

.billing-inline-actions .btn,
.billing-inline-actions a.btn,
.billing-inline-actions button.btn {
  width: auto !important;
  min-width: 64px !important;
  max-width: none !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  text-align: center !important;
}

td:has(.billing-inline-actions) {
  min-width: 240px !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

@media (max-width: 576px) {
  .billing-inline-actions {
    min-width: 0 !important;
    overflow-x: auto !important;
    max-width: 100% !important;
  }

  .billing-inline-actions .btn,
  .billing-inline-actions a.btn,
  .billing-inline-actions button.btn {
    flex: 0 0 auto !important;
  }
}

/* Super Admin Billing */
body:not(.pos-mode) .page-content:has(.billing-page) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 16px 20px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

.billing-page {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  justify-items: stretch;
  box-sizing: border-box;
  overflow-x: hidden;
}

.billing-page-head {
  width: 100%;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 0 !important;
}

.billing-page > .card,
.billing-page > .section-head {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

.billing-filter-card,
.billing-activation-row,
.renewal-filter-card {
  display: grid;
  align-items: end;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.billing-filter-card {
  grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) minmax(170px, 1fr) auto;
  padding: 18px !important;
}

.renewal-filter-card {
  grid-template-columns: minmax(260px, 1fr) auto;
  padding: 18px !important;
}

.billing-activation-card,
.billing-table-card {
  padding: 18px !important;
  min-width: 0 !important;
  overflow: hidden;
}

.billing-activation-row {
  grid-template-columns: minmax(220px, 1.6fr) minmax(105px, .7fr) minmax(135px, .9fr) repeat(3, minmax(140px, 1fr)) minmax(120px, .8fr) 105px;
}

.billing-filter-card label,
.billing-activation-row label,
.renewal-filter-card label,
.renewal-inline-form label {
  margin-bottom: 5px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.2;
}

.billing-filter-card .form-control,
.billing-filter-card .form-select,
.billing-activation-row .form-control,
.billing-activation-row .form-select,
.renewal-filter-card .form-control,
.renewal-inline-form .form-control,
.renewal-inline-form .form-select {
  min-height: 38px !important;
  height: 38px !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  width: 100%;
  min-width: 0;
}

.billing-filter-actions,
.billing-activation-action {
  display: flex;
  gap: 8px;
  align-items: center;
}

.billing-filter-actions .btn,
.billing-activation-action .btn {
  min-height: 38px !important;
  height: 38px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  white-space: nowrap;
}

.billing-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: visible !important;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
}

.billing-table {
  width: max-content;
  min-width: 1250px !important;
  margin: 0 !important;
  font-size: 12px !important;
}

.billing-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #F8FAFC !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  padding: 10px 12px !important;
}

.billing-table td {
  vertical-align: middle !important;
  white-space: nowrap;
  padding: 9px 10px !important;
}

.billing-table .billing-inline-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.billing-table .billing-inline-actions .btn {
  min-height: 32px !important;
  height: 32px !important;
  padding: 7px 10px !important;
  font-size: 11px !important;
}

.billing-table td strong,
.billing-table td small {
  display: block;
}

.renewal-details {
  position: relative;
}

.renewal-details > summary {
  list-style: none;
}

.renewal-details > summary::-webkit-details-marker {
  display: none;
}

.renewal-inline-form {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(520px, 88vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, .14);
}

.renewal-inline-form .btn {
  grid-column: 1 / -1;
}

.renewal-dialog {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  overflow: visible;
}

.renewal-dialog::backdrop {
  background: rgba(15, 23, 42, .34);
}

.renewal-dialog-panel {
  width: 100%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 22px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
}

.renewal-dialog-head,
.renewal-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.renewal-dialog-head {
  margin-bottom: 16px;
}

.renewal-dialog-head h2 {
  margin: 0;
}

.renewal-dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  background: #FFFFFF;
  color: #374151;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.renewal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.renewal-form-grid .form-control,
.renewal-form-grid .form-select {
  height: 38px !important;
  min-height: 38px !important;
}

.renewal-dialog-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.subscription-warning-toast {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #F59E0B;
  border-radius: 12px;
  background: #FFFBEB;
  color: #92400E;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(146, 64, 14, .08);
  transition: opacity .22s ease, transform .22s ease;
}

.subscription-warning-toast.is-grace {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #991B1B;
}

.subscription-warning-toast.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
}

@media (max-width: 1100px) {
  .billing-filter-card,
  .billing-activation-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-filter-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1500px) and (min-width: 1101px) {
  .billing-activation-row {
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 1fr));
  }

  .billing-activation-action {
    align-self: end;
  }
}

@media (max-width: 640px) {
  .billing-filter-card,
  .billing-activation-row,
  .renewal-inline-form {
    grid-template-columns: 1fr;
  }

  .renewal-form-grid {
    grid-template-columns: 1fr;
  }

  .renewal-dialog-panel {
    padding: 18px;
  }
}

/* POS compact viewport fix */
body.pos-mode {
  overflow: hidden !important;
}

body.pos-mode .main {
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  padding: 10px !important;
}

body.pos-mode .topbar {
  min-height: 54px !important;
  margin: 0 0 8px !important;
  padding: 8px 12px !important;
}

body.pos-mode .page-content {
  width: 100% !important;
  max-width: none !important;
  height: calc(100vh - 72px) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.pos-mode .page-content > * + * {
  margin-top: 0 !important;
}

body.pos-mode .software-footer {
  display: none !important;
}

body.pos-mode .pos-shell {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  grid-template-rows: 46px minmax(0, 1fr) !important;
  gap: 8px !important;
}

body.pos-mode .pos-header {
  min-height: 46px !important;
  padding: 5px 10px !important;
  border-radius: 12px !important;
}

body.pos-mode .pos-logo {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
}

body.pos-mode .pos-brand {
  gap: 8px !important;
}

body.pos-mode .pos-brand strong {
  font-size: 14px !important;
}

body.pos-mode .pos-brand small,
body.pos-mode .pos-header-search span {
  font-size: 11px !important;
}

body.pos-mode .pos-layout {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  grid-template-columns: minmax(172px, 18%) minmax(420px, 1fr) minmax(330px, 32%) !important;
  gap: 8px !important;
}

body.pos-mode .pos-shell {
  display: block !important;
}

body.pos-mode .pos-layout {
  height: 100% !important;
}

body.pos-mode .pos-payment-methods {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Final POS viewport fit overrides */
body.pos-mode .pos-cart.current-order-panel {
  display: grid !important;
  grid-template-rows: auto auto minmax(42px, 1fr) auto !important;
  gap: 5px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.pos-mode .pos-main-actions,
body.pos-mode .pos-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  flex: none !important;
  min-height: 42px !important;
  max-height: 115px !important;
  overflow-y: auto !important;
}

body.pos-mode .current-order-footer {
  min-height: 0 !important;
  gap: 4px !important;
  padding-top: 5px !important;
  overflow: visible !important;
}

body.pos-mode .pos-cart-controls-single {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.pos-mode .pos-totals {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 10px !important;
  row-gap: 1px !important;
}

body.pos-mode .pos-totals span {
  min-height: 17px !important;
}

body.pos-mode .pos-totals .grand {
  grid-column: 1 / -1 !important;
  min-height: 24px !important;
  margin-top: 1px !important;
  padding: 4px 0 2px !important;
}

body.pos-mode .pos-payment-fields {
  grid-template-columns: 1fr !important;
}

body.pos-mode .pos-payment-fields input {
  min-height: 30px !important;
  height: 30px !important;
}

body.pos-mode .pos-message {
  max-height: 54px !important;
  overflow-y: auto !important;
}

/* Final app scroll isolation: main content scrolls independently from sidebar */
body:not(.auth-page):not(.login-page):not(.pos-mode) {
  height: 100vh !important;
  overflow: hidden !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .app-shell {
  display: grid !important;
  grid-template-columns: 248px minmax(0, 1fr) !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) #app-sidebar.sidebar,
body:not(.auth-page):not(.login-page):not(.pos-mode) .sidebar.sidebar-scroll {
  position: sticky !important;
  top: 0 !important;
  align-self: start !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  scrollbar-color: #94A3B8 transparent !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .main {
  height: 100vh !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) #app-sidebar.sidebar::-webkit-scrollbar,
body:not(.auth-page):not(.login-page):not(.pos-mode) .sidebar.sidebar-scroll::-webkit-scrollbar {
  width: 5px !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) #app-sidebar.sidebar::-webkit-scrollbar-track,
body:not(.auth-page):not(.login-page):not(.pos-mode) .sidebar.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) #app-sidebar.sidebar::-webkit-scrollbar-thumb,
body:not(.auth-page):not(.login-page):not(.pos-mode) .sidebar.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #94A3B8 !important;
  border-radius: 999px !important;
}

@media (max-width: 992px) {
  body:not(.auth-page):not(.login-page):not(.pos-mode) {
    height: auto !important;
    overflow: auto !important;
  }

  body:not(.auth-page):not(.login-page):not(.pos-mode) .app-shell {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  body:not(.auth-page):not(.login-page):not(.pos-mode) .main {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  body:not(.auth-page):not(.login-page):not(.pos-mode) #app-sidebar.sidebar,
  body:not(.auth-page):not(.login-page):not(.pos-mode) .sidebar.sidebar-scroll {
    position: fixed !important;
    height: 100vh !important;
    max-height: 100vh !important;
  }
}

@media (max-height: 700px) and (min-width: 993px) {
  body.pos-mode .pos-cart.current-order-panel {
    gap: 4px !important;
  }

  body.pos-mode .pos-cart-items.current-order-items {
    max-height: 74px !important;
  }

  body.pos-mode .current-order-footer {
    gap: 3px !important;
    padding-top: 4px !important;
  }

  body.pos-mode .pos-totals span {
    min-height: 15px !important;
    line-height: 1 !important;
  }

  body.pos-mode .pos-totals small,
  body.pos-mode .pos-totals strong {
    font-size: 9px !important;
  }

  body.pos-mode .pos-totals .grand {
    min-height: 20px !important;
    padding: 3px 0 1px !important;
  }

  body.pos-mode .pos-totals .grand small,
  body.pos-mode .pos-totals .grand strong {
    font-size: 13px !important;
  }

  body.pos-mode .pos-payment-fields input,
  body.pos-mode .pos-cart input {
    min-height: 27px !important;
    height: 27px !important;
  }

body.pos-mode .pos-payment-methods button,
body.pos-mode .pos-actions .btn,
body.pos-mode .pos-actions button {
  min-height: 27px !important;
  height: 27px !important;
  padding: 4px 6px !important;
  }
}

/* Final readable button colors */
.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled),
button.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled),
a.btn:not(.ghost):not(.danger),
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):not(:disabled),
.quick-actions a:first-child {
  color: #FFFFFF !important;
  background: #2563EB !important;
  background-image: none !important;
  border-color: #2563EB !important;
}

.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled):hover,
button.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled):hover,
a.btn:not(.ghost):not(.danger):hover,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):not(:disabled):hover,
.quick-actions a:first-child:hover {
  color: #FFFFFF !important;
  background: #1D4ED8 !important;
  border-color: #1D4ED8 !important;
}

.btn:not(.ghost):not(.danger):focus-visible,
button.btn:not(.ghost):not(.danger):focus-visible,
a.btn:not(.ghost):not(.danger):focus-visible,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):focus-visible {
  outline: 3px solid rgba(37, 99, 235, .25) !important;
  outline-offset: 2px !important;
}

.btn:disabled,
button.btn:disabled,
.btn.is-disabled,
button[disabled] {
  opacity: .55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Final Inventory table polish: keep cells and action buttons readable */
.inventory-table {
  width: 100% !important;
  min-width: 1120px !important;
  table-layout: auto !important;
}

.inventory-table th,
.inventory-table td {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.inventory-table th:nth-child(1),
.inventory-table td:nth-child(1) {
  min-width: 150px !important;
}

.inventory-table th:nth-child(3),
.inventory-table td:nth-child(3) {
  min-width: 90px !important;
  text-align: center !important;
}

.inventory-table th:nth-child(9),
.inventory-table td:nth-child(9) {
  min-width: 260px !important;
}

.inventory-table .unit-label {
  display: inline-flex !important;
  min-width: max-content !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  padding: 4px 10px !important;
}

.inventory-table .inventory-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 248px !important;
}

.inventory-table .inventory-actions .btn,
.inventory-table .inventory-actions summary.btn,
.inventory-table .inventory-actions button.btn {
  width: auto !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 7px 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.inventory-table .inventory-actions form {
  margin: 0 !important;
}

/* Final compact Recipe Builder sizing */
.recipe-builder-card .recipe-table {
  width: min(100%, 680px) !important;
  max-width: 680px !important;
}

.recipe-builder-card .recipe-head,
.recipe-builder-card .recipe-row {
  grid-template-columns: 340px 135px 110px !important;
  width: 100% !important;
  max-width: 600px !important;
  gap: 8px !important;
  align-items: end !important;
}

.recipe-builder-card .recipe-head {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

.recipe-builder-card .recipe-row input,
.recipe-builder-card .recipe-row select,
.recipe-builder-card .recipe-row .select2-container,
.recipe-builder-card .recipe-row .select2-container--default .select2-selection--single {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  font-size: 12px !important;
}

.recipe-builder-card .recipe-row .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 32px !important;
  padding-left: 9px !important;
  padding-right: 24px !important;
  font-size: 12px !important;
}

.recipe-builder-card .recipe-row .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 32px !important;
}

.recipe-builder-card .recipe-row .btn,
.recipe-builder-card .recipe-actions .btn {
  height: 34px !important;
  min-height: 34px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

.recipe-builder-card .recipe-actions {
  width: min(100%, 600px) !important;
}

@media (max-width: 768px) {
  .recipe-builder-card .recipe-table,
  .recipe-builder-card .recipe-head,
  .recipe-builder-card .recipe-row,
  .recipe-builder-card .recipe-actions {
    width: 100% !important;
    max-width: 100% !important;
  }

  .recipe-builder-card .recipe-head,
  .recipe-builder-card .recipe-row {
    grid-template-columns: 1fr !important;
  }
}

/* Final button contrast guard: dark primary actions must always be readable */
.btn:not(.ghost):not(.secondary):not(.danger):not(:disabled):not(.is-disabled),
button.btn:not(.ghost):not(.secondary):not(.danger):not(:disabled):not(.is-disabled),
a.btn:not(.ghost):not(.secondary):not(.danger),
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.secondary):not(.danger):not(:disabled),
.quick-actions a:first-child {
  color: #FFFFFF !important;
  background: #2563EB !important;
  background-image: none !important;
  border-color: #2563EB !important;
}

.btn:not(.ghost):not(.secondary):not(.danger):not(:disabled):not(.is-disabled):hover,
button.btn:not(.ghost):not(.secondary):not(.danger):not(:disabled):not(.is-disabled):hover,
a.btn:not(.ghost):not(.secondary):not(.danger):hover,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.secondary):not(.danger):not(:disabled):hover,
.quick-actions a:first-child:hover {
  color: #FFFFFF !important;
  background: #1D4ED8 !important;
  border-color: #1D4ED8 !important;
}

.btn:not(.ghost):not(.secondary):not(.danger):focus-visible,
button.btn:not(.ghost):not(.secondary):not(.danger):focus-visible,
a.btn:not(.ghost):not(.secondary):not(.danger):focus-visible,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.secondary):not(.danger):focus-visible {
  outline: 3px solid rgba(37, 99, 235, .25) !important;
  outline-offset: 2px !important;
}

.btn:disabled,
button.btn:disabled,
.btn.is-disabled,
button[disabled] {
  opacity: .55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Sidebar navigation scroll fix */
.sidebar.sidebar-scroll,
#app-sidebar.sidebar {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  scrollbar-color: #CBD5E1 transparent !important;
}

.sidebar.sidebar-scroll::-webkit-scrollbar,
#app-sidebar.sidebar::-webkit-scrollbar {
  width: 7px !important;
}

.sidebar.sidebar-scroll::-webkit-scrollbar-track,
#app-sidebar.sidebar::-webkit-scrollbar-track {
  background: transparent !important;
}

.sidebar.sidebar-scroll::-webkit-scrollbar-thumb,
#app-sidebar.sidebar::-webkit-scrollbar-thumb {
  background: #CBD5E1 !important;
  border-radius: 999px !important;
}

.sidebar.sidebar-scroll::-webkit-scrollbar-thumb:hover,
#app-sidebar.sidebar::-webkit-scrollbar-thumb:hover {
  background: #94A3B8 !important;
}

#app-sidebar .nav {
  padding-bottom: 28px !important;
}

/* Inventory module compact controls */
.inventory-summary-grid .stat-card {
  text-decoration: none !important;
}

.inventory-summary-grid .stat-card.active {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .10) !important;
}

.inventory-stock-form {
  display: grid !important;
  grid-template-columns: minmax(140px, 1.2fr) minmax(110px, .8fr) minmax(110px, .8fr) minmax(120px, .9fr) minmax(110px, .8fr) minmax(140px, .9fr) auto !important;
  gap: 12px !important;
  align-items: end !important;
  margin-top: 14px !important;
  padding: 16px !important;
}

.inventory-stock-form .inventory-form-title {
  grid-column: 1 / -1 !important;
}

.inventory-stock-form h2,
.recipe-builder-card h2 {
  margin: 0 !important;
}

.inventory-stock-form .field,
.inventory-edit-form .field {
  margin: 0 !important;
}

.inventory-stock-form input,
.inventory-stock-form select,
.inventory-edit-form input,
.inventory-edit-form select,
.recipe-row input,
.recipe-row select {
  min-height: 38px !important;
  height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

.inventory-stock-form .btn {
  height: 38px !important;
  min-height: 38px !important;
  white-space: nowrap !important;
}

.inventory-table th,
.inventory-table td {
  vertical-align: middle !important;
}

.inventory-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  align-items: center !important;
}

.inventory-edit-popover {
  position: relative !important;
}

.inventory-edit-popover summary {
  list-style: none !important;
}

.inventory-edit-popover summary::-webkit-details-marker {
  display: none !important;
}

.inventory-edit-form {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 8px) !important;
  z-index: 99999 !important;
  display: grid !important;
  width: min(520px, 86vw) !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 14px !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18) !important;
}

.inventory-edit-form .btn {
  grid-column: 1 / -1 !important;
}

.badge.warning,
.badge.expiring-soon {
  background: #F59E0B !important;
  color: #111827 !important;
}

.recipe-builder-card {
  padding: 16px !important;
}

.recipe-builder-list {
  display: grid !important;
  gap: 10px !important;
}

.recipe-card {
  border: 1px solid #E5E7EB !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
  overflow: visible !important;
}

.recipe-card summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 12px 14px !important;
  cursor: pointer !important;
  list-style: none !important;
}

.recipe-card summary::-webkit-details-marker {
  display: none !important;
}

.recipe-card summary strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.recipe-card summary span {
  color: #6B7280 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.recipe-card form {
  display: grid !important;
  gap: 8px !important;
  padding: 0 10px 10px !important;
}

.recipe-table {
  display: grid !important;
  gap: 6px !important;
}

.recipe-head,
.recipe-row {
  display: grid !important;
  grid-template-columns: minmax(220px, 55%) minmax(110px, 20%) minmax(90px, 25%) !important;
  gap: 8px !important;
  align-items: end !important;
}

.recipe-head {
  color: #6B7280 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

.recipe-actions {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  align-items: center !important;
}

.recipe-row {
  min-height: 36px !important;
}

.recipe-row input,
.recipe-row select,
.recipe-row .select2-container,
.recipe-row .select2-container--default .select2-selection--single {
  height: 36px !important;
  min-height: 36px !important;
  font-size: 12px !important;
}

.recipe-row .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 34px !important;
  font-size: 12px !important;
  padding-left: 9px !important;
}

.recipe-row .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 34px !important;
}

.recipe-actions .btn,
.recipe-row .btn {
  min-height: 34px !important;
  height: 34px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.inventory-stock-form .select2-container,
.inventory-stock-form .select2-container--default .select2-selection--single {
  min-height: 38px !important;
  height: 38px !important;
}

.inventory-stock-form .select2-container--default .select2-selection__rendered {
  line-height: 36px !important;
  font-size: 13px !important;
}

.inventory-stock-form .select2-container--default .select2-selection__clear,
.recipe-row .select2-container--default .select2-selection__clear {
  display: none !important;
}

.select2-results__options {
  max-height: 190px !important;
  overflow-y: auto !important;
}

.recipe-remove-btn {
  color: #B91C1C !important;
  border-color: #FECACA !important;
  background: #FFFFFF !important;
}

.inventory-clear-filter {
  margin-top: 8px !important;
  min-height: 32px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
}

@media (max-width: 1200px) {
  .inventory-stock-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .inventory-stock-form,
  .inventory-edit-form,
  .recipe-head,
  .recipe-row,
  .recipe-card summary {
    grid-template-columns: 1fr !important;
  }

  .inventory-edit-form {
    position: static !important;
    width: 100% !important;
    margin-top: 10px !important;
  }

  .inventory-actions,
  .recipe-actions {
    flex-wrap: wrap !important;
  }
}

/* Cafe Admin dashboard compact layout */
.admin-dashboard-compact .dashboard-command-center {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 24px !important;
  align-items: center !important;
  min-height: 0 !important;
  margin-bottom: 16px !important;
  padding: 18px !important;
  background: #FFFFFF !important;
  background-image: none !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06) !important;
}

.admin-dashboard-compact .dashboard-command-center .hero-copy h2 {
  margin: 3px 0 6px !important;
  color: #111827 !important;
  font-size: clamp(22px, 2vw, 30px) !important;
  line-height: 1.12 !important;
}

.admin-dashboard-compact .dashboard-command-center .hero-copy p:not(.eyebrow) {
  max-width: 660px;
  margin: 0 !important;
  color: #6B7280 !important;
  font-size: 13px !important;
}

.admin-dashboard-compact .dashboard-command-center .quick-actions {
  gap: 8px !important;
  margin-top: 14px !important;
}

.admin-dashboard-compact .dashboard-command-center .quick-actions a {
  min-height: 38px !important;
  padding: 8px 13px !important;
  font-size: 13px !important;
}

.admin-dashboard-compact .dashboard-command-center .hero-panel {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(130px, 1fr)) !important;
  gap: 10px !important;
  min-width: 280px;
}

.admin-dashboard-compact .dashboard-command-center .hero-total,
.admin-dashboard-compact .dashboard-command-center .util-ring {
  min-height: 92px !important;
  padding: 14px !important;
  border-radius: 13px !important;
}

.admin-dashboard-compact .dashboard-command-center .hero-total,
.admin-dashboard-compact .dashboard-command-center .util-ring strong {
  font-size: 24px !important;
}

.admin-dashboard-compact .dashboard-command-center .hero-total span,
.admin-dashboard-compact .dashboard-command-center .util-ring span {
  font-size: 11px !important;
}

.admin-dashboard-compact .stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 16px !important;
}

.admin-dashboard-compact .stat-card {
  min-height: 112px !important;
  padding: 16px !important;
  align-content: space-between !important;
}

.admin-dashboard-compact .stat-card small {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  font-size: 10px !important;
}

.admin-dashboard-compact .stat-card span {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

.admin-dashboard-compact .stat-card strong {
  font-size: clamp(26px, 2vw, 31px) !important;
  line-height: 1 !important;
}

.admin-dashboard-compact .dashboard-payment-grid {
  width: min(100%, 560px);
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.admin-dashboard-compact .dashboard-payment-grid .stat-card {
  min-height: 96px !important;
}

.dashboard-lower-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr) !important;
  gap: 20px !important;
  align-items: stretch !important;
  margin-bottom: 18px !important;
}

.admin-dashboard-compact .dashboard-lower-grid .premium-panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  height: 430px !important;
  min-height: 430px !important;
  max-height: 430px !important;
  padding: 16px !important;
  overflow: hidden !important;
}

.admin-dashboard-compact .dashboard-lower-grid .section-head {
  margin-bottom: 10px !important;
}

.admin-dashboard-compact .dashboard-lower-grid .section-head h2 {
  font-size: 18px !important;
}

.admin-dashboard-compact .order-list {
  display: grid;
  align-content: start !important;
  gap: 8px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px !important;
}

.admin-dashboard-compact .order-row {
  min-height: 48px !important;
  gap: 8px !important;
  padding: 9px 10px !important;
}

.admin-dashboard-compact .order-row strong,
.admin-dashboard-compact .order-row span,
.admin-dashboard-compact .order-row select,
.admin-dashboard-compact .order-row button {
  font-size: 12px !important;
}

.admin-dashboard-compact .order-row .badge {
  min-height: 21px !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
}

.admin-dashboard-compact .activity-feed {
  display: grid;
  align-content: start !important;
  gap: 8px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px !important;
}

.admin-dashboard-compact .activity-feed-item {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) 74px !important;
  align-items: start !important;
  min-height: 52px !important;
  padding: 8px 0 !important;
  gap: 8px !important;
  overflow: visible !important;
}

.admin-dashboard-compact .activity-feed-content {
  min-width: 0 !important;
  overflow: hidden !important;
}

.admin-dashboard-compact .activity-feed-item strong {
  display: -webkit-box !important;
  font-size: 11px !important;
  line-height: 1.22 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

.admin-dashboard-compact .activity-feed-item span,
.admin-dashboard-compact .activity-feed-item small {
  font-size: 10px !important;
  line-height: 1.25 !important;
}

.admin-dashboard-compact .activity-feed-time {
  width: 74px !important;
  max-width: 74px !important;
  justify-self: end !important;
  text-align: right !important;
  white-space: normal !important;
  overflow: hidden !important;
}

.admin-dashboard-compact .activity-message-icon {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
}

.admin-dashboard-compact .activity-footer-link {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #E5E7EB;
}

.admin-dashboard-compact .order-list::-webkit-scrollbar,
.admin-dashboard-compact .activity-feed::-webkit-scrollbar {
  width: 6px;
}

.admin-dashboard-compact .order-list::-webkit-scrollbar-track,
.admin-dashboard-compact .activity-feed::-webkit-scrollbar-track {
  background: transparent;
}

.admin-dashboard-compact .order-list::-webkit-scrollbar-thumb,
.admin-dashboard-compact .activity-feed::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 999px;
}

.admin-dashboard-compact .order-list,
.admin-dashboard-compact .activity-feed {
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}

@media (max-width: 992px) {
  .admin-dashboard-compact .dashboard-command-center {
    grid-template-columns: 1fr !important;
  }

  .admin-dashboard-compact .dashboard-command-center .hero-panel {
    width: 100%;
    min-width: 0;
  }

  .admin-dashboard-compact .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-lower-grid {
    grid-template-columns: 1fr !important;
  }

  .admin-dashboard-compact .dashboard-lower-grid .premium-panel {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}

@media (max-width: 576px) {
  .admin-dashboard-compact .dashboard-command-center .hero-panel {
    grid-template-columns: 1fr !important;
  }

  .admin-dashboard-compact .dashboard-command-center .quick-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-dashboard-compact .stat-grid,
  .admin-dashboard-compact .dashboard-payment-grid {
    width: 100%;
    grid-template-columns: 1fr !important;
  }

  .admin-dashboard-compact .stat-card {
    min-height: 96px !important;
  }
}

/* POS receipt modal */
.pos-receipt-modal[hidden] {
  display: none !important;
}

.pos-receipt-modal {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: grid;
  place-items: center;
  padding: 16px;
}

.pos-receipt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .42);
}

.pos-receipt-card {
  position: relative;
  z-index: 1;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
}

.pos-receipt-print-area {
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  padding: 16px;
  color: #111827;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-size: 12px;
}

.pos-receipt-logo {
  display: grid;
  place-items: start;
  justify-content: start;
  min-height: 44px;
}

.pos-receipt-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}

.pos-receipt-print-area h3,
.pos-receipt-print-area p {
  margin: 0 0 4px;
  text-align: center;
}

.pos-receipt-print-area h3 {
  font-size: 17px;
  font-weight: 800;
}

.pos-receipt-print-area p {
  color: #4B5563;
  font-size: 11px;
}

.pos-receipt-print-area hr {
  margin: 10px 0;
  border: 0;
  border-top: 1px dashed #CBD5E1;
}

.receipt-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
}

.receipt-meta span {
  color: #4B5563;
}

.receipt-meta strong {
  text-align: right;
}

.receipt-items {
  width: 100%;
  margin: 10px 0;
  border-collapse: collapse;
}

.receipt-items td {
  padding: 6px 0 !important;
  border: 0 !important;
  border-bottom: 1px dashed #E5E7EB !important;
  background: #FFFFFF !important;
  font-size: 12px !important;
}

.receipt-items td:last-child {
  text-align: right;
  font-weight: 700;
}

.receipt-items small {
  display: block;
  margin-top: 2px;
  color: #6B7280;
}

.receipt-grand {
  padding-top: 6px;
  color: #111827 !important;
  font-size: 14px;
  font-weight: 900;
}

.receipt-powered {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #CBD5E1;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.pos-receipt-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.pos-mode .pos-payment-received {
  grid-column: 1 / -1;
}

@media print {
  body.printing-pos-receipt * {
    visibility: hidden !important;
  }

  body.printing-pos-receipt .pos-receipt-print-area,
  body.printing-pos-receipt .pos-receipt-print-area * {
    visibility: visible !important;
  }

  body.printing-pos-receipt .pos-receipt-modal {
    position: static !important;
    display: block !important;
    padding: 0 !important;
  }

  body.printing-pos-receipt .pos-receipt-card {
    width: 80mm !important;
    max-height: none !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.printing-pos-receipt .pos-receipt-print-area {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 80mm !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
}

/* Keep order status editor controls in one row */
.order-status-edit {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 242px !important;
}

.order-status-edit select,
.order-status-edit .form-select {
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  flex: 0 0 142px !important;
  padding-left: 8px !important;
  padding-right: 24px !important;
}

.status-compact-select,
.order-status-edit .order-status-select {
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  height: 35px !important;
  min-height: 35px !important;
  padding: 6px 24px 6px 10px !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  background-color: #FFFFFF !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.status-compact-select:focus,
.order-status-edit .order-status-select:focus {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .10) !important;
  outline: none !important;
}

.order-status-edit .btn,
.order-status-edit button {
  width: auto !important;
  min-width: 92px !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.recent-order-status-box {
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  height: 35px !important;
  min-height: 35px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.recent-order-status-box.completed {
  border: 1px solid #BBF7D0 !important;
  background: #DCFCE7 !important;
  color: #166534 !important;
}

.order-status-edit .recent-order-edit-status-btn {
  height: 35px !important;
  min-height: 35px !important;
  min-width: 92px !important;
  padding: 0 12px !important;
  border: 1px solid #2563EB !important;
  border-radius: 8px !important;
  background: #2563EB !important;
  color: #FFFFFF !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.order-status-edit .recent-order-edit-status-btn:hover {
  border-color: #1D4ED8 !important;
  background: #1D4ED8 !important;
  color: #FFFFFF !important;
}

.order-status-edit-final [hidden] {
  display: none !important;
}

.admin-dashboard-compact .order-row {
  grid-template-columns: minmax(84px, 1fr) minmax(60px, .7fr) auto auto minmax(242px, auto) !important;
}

.order-status-edit .select2-container,
.status-compact-select + .select2-container {
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  flex: 0 0 142px !important;
}

.order-status-edit .select2-container--default .select2-selection--single,
.status-compact-select + .select2-container--default .select2-selection--single {
  height: 35px !important;
  min-height: 35px !important;
  border-radius: 8px !important;
}

.order-status-edit .select2-container--default .select2-selection__rendered,
.status-compact-select + .select2-container--default .select2-selection__rendered {
  padding-left: 10px !important;
  padding-right: 22px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 33px !important;
}

.order-status-edit .select2-container--default .select2-selection__clear,
.status-compact-select + .select2-container--default .select2-selection__clear {
  width: 12px !important;
  height: 33px !important;
  margin-right: 12px !important;
  font-size: 11px !important;
  line-height: 31px !important;
}

.order-status-edit .select2-container--default .select2-selection__arrow,
.status-compact-select + .select2-container--default .select2-selection__arrow {
  width: 18px !important;
  height: 33px !important;
  right: 4px !important;
}

@media (max-width: 768px) {
  .order-status-edit {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
  }

  .status-compact-select,
  .order-status-edit select,
  .order-status-edit .form-select,
  .order-status-edit .select2-container,
  .status-compact-select + .select2-container {
    width: 142px !important;
    min-width: 142px !important;
    max-width: 142px !important;
    flex: 0 0 142px !important;
  }
}

/* POS viewport fit fixes: keep billing controls visible on shorter screens */
body.pos-mode .pos-cart.current-order-panel {
  display: grid !important;
  grid-template-rows: auto auto minmax(42px, 1fr) auto !important;
  gap: 5px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.pos-mode .pos-main-actions,
body.pos-mode .pos-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  flex: none !important;
  min-height: 42px !important;
  max-height: 115px !important;
  overflow-y: auto !important;
}

body.pos-mode .current-order-footer {
  min-height: 0 !important;
  gap: 4px !important;
  padding-top: 5px !important;
  overflow: visible !important;
}

body.pos-mode .pos-cart-controls-single {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.pos-mode .pos-totals {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 10px !important;
  row-gap: 1px !important;
}

body.pos-mode .pos-totals span {
  min-height: 17px !important;
}

body.pos-mode .pos-totals .grand {
  grid-column: 1 / -1 !important;
  min-height: 24px !important;
  margin-top: 1px !important;
  padding: 4px 0 2px !important;
}

body.pos-mode .pos-payment-fields {
  grid-template-columns: 1fr !important;
}

body.pos-mode .pos-payment-fields input {
  min-height: 30px !important;
  height: 30px !important;
}

body.pos-mode .pos-message {
  max-height: 54px !important;
  overflow-y: auto !important;
}

@media (max-height: 700px) and (min-width: 993px) {
  body.pos-mode .pos-cart.current-order-panel {
    gap: 4px !important;
  }

  body.pos-mode .pos-cart-items.current-order-items {
    max-height: 74px !important;
  }

  body.pos-mode .current-order-footer {
    gap: 3px !important;
    padding-top: 4px !important;
  }

  body.pos-mode .pos-totals span {
    min-height: 15px !important;
    line-height: 1 !important;
  }

  body.pos-mode .pos-totals small,
  body.pos-mode .pos-totals strong {
    font-size: 9px !important;
  }

  body.pos-mode .pos-totals .grand {
    min-height: 20px !important;
    padding: 3px 0 1px !important;
  }

  body.pos-mode .pos-totals .grand small,
  body.pos-mode .pos-totals .grand strong {
    font-size: 13px !important;
  }

  body.pos-mode .pos-payment-fields input,
  body.pos-mode .pos-cart input {
    min-height: 27px !important;
    height: 27px !important;
  }

  body.pos-mode .pos-payment-methods button,
  body.pos-mode .pos-actions .btn,
  body.pos-mode .pos-actions button {
    min-height: 27px !important;
    height: 27px !important;
    padding: 4px 6px !important;
  }
}

/* Final readable button colors */
.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled),
button.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled),
a.btn:not(.ghost):not(.danger),
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):not(:disabled),
.quick-actions a:first-child {
  color: #FFFFFF !important;
  background: #2563EB !important;
  background-image: none !important;
  border-color: #2563EB !important;
}

.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled):hover,
button.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled):hover,
a.btn:not(.ghost):not(.danger):hover,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):not(:disabled):hover,
.quick-actions a:first-child:hover {
  color: #FFFFFF !important;
  background: #1D4ED8 !important;
  border-color: #1D4ED8 !important;
}

.btn:not(.ghost):not(.danger):focus-visible,
button.btn:not(.ghost):not(.danger):focus-visible,
a.btn:not(.ghost):not(.danger):focus-visible,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):focus-visible {
  outline: 3px solid rgba(37, 99, 235, .25) !important;
  outline-offset: 2px !important;
}

.btn:disabled,
button.btn:disabled,
.btn.is-disabled,
button[disabled] {
  opacity: .55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

body.pos-mode [hidden] {
  display: none !important;
}

body.pos-mode .pos-main-actions,
body.pos-mode .pos-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

body.pos-mode .pos-main-actions .btn,
body.pos-mode .pos-main-actions button {
  width: 100% !important;
  min-height: 36px !important;
  height: 36px !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-cart-items {
  min-height: 40px !important;
}

body.pos-mode .pos-cart-controls-single {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.pos-mode .pos-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.pos-mode .current-order-footer {
  gap: 4px !important;
}

body.pos-mode .pos-payment-fields {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.pos-mode .pos-totals span {
  min-height: 18px !important;
}

body.pos-mode .pos-totals .grand {
  min-height: 24px !important;
}

@media (max-width: 1366px) {
  body.pos-mode .pos-cart-controls-single,
  body.pos-mode .pos-payment-fields {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.pos-mode .current-order-footer {
    gap: 3px !important;
  }

  body.pos-mode .pos-totals {
    gap: 1px !important;
  }
}

body.pos-mode .pos-panel {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 8px !important;
  border-radius: 12px !important;
}

body.pos-mode .pos-left,
body.pos-mode .pos-cart {
  gap: 6px !important;
}

body.pos-mode .pos-left .field,
body.pos-mode .pos-cart .field {
  margin: 0 !important;
}

body.pos-mode .pos-left label,
body.pos-mode .pos-cart label,
body.pos-mode .pos-payment-fields small {
  margin-bottom: 3px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
}

body.pos-mode .pos-left input,
body.pos-mode .pos-left select,
body.pos-mode .pos-left textarea,
body.pos-mode .pos-cart input,
body.pos-mode .pos-search-bar input {
  min-height: 34px !important;
  height: 34px !important;
  padding: 6px 9px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body.pos-mode .pos-left textarea {
  min-height: 56px !important;
  height: 56px !important;
  resize: none !important;
}

body.pos-mode .pos-table-list {
  max-height: 106px !important;
  gap: 5px !important;
  overflow-y: auto !important;
}

body.pos-mode .pos-table,
body.pos-mode .pos-payment-methods button {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

body.pos-mode .pos-table strong,
body.pos-mode .pos-table small {
  line-height: 1.1 !important;
}

body.pos-mode .pos-center {
  gap: 7px !important;
  padding: 8px !important;
}

body.pos-mode .pos-products {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 8px !important;
  overflow-y: auto !important;
}

body.pos-mode .pos-product {
  min-height: 152px !important;
  padding: 7px !important;
  border-radius: 10px !important;
}

body.pos-mode .pos-product img {
  height: 62px !important;
  margin-bottom: 4px !important;
  border-radius: 8px !important;
}

body.pos-mode .pos-product strong {
  min-height: 30px !important;
  margin-top: 3px !important;
  font-size: 13px !important;
  line-height: 1.18 !important;
}

body.pos-mode .pos-product small {
  font-size: 11px !important;
}

body.pos-mode .pos-product b {
  margin-top: 2px !important;
  font-size: 13px !important;
}

body.pos-mode .pos-cart-head {
  min-height: 32px !important;
}

body.pos-mode .pos-cart-head h2 {
  font-size: 16px !important;
}

body.pos-mode .pos-cart-head .btn {
  min-height: 30px !important;
  padding: 5px 9px !important;
  font-size: 12px !important;
}

body.pos-mode .pos-cart-items {
  flex: 1 1 auto !important;
  min-height: 70px !important;
  overflow-y: auto !important;
}

body.pos-mode .current-order-footer {
  gap: 5px !important;
  padding-top: 6px !important;
}

body.pos-mode .pos-cart-controls {
  grid-template-columns: minmax(80px, 30%) minmax(0, 70%) !important;
  gap: 6px !important;
}

body.pos-mode .pos-cart-line {
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
  padding: 6px !important;
  gap: 6px !important;
  border-radius: 9px !important;
}

body.pos-mode .pos-cart-line img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
}

body.pos-mode .pos-cart-info strong,
body.pos-mode .pos-cart-info small {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body.pos-mode .pos-cart-info input {
  height: 26px !important;
  min-height: 26px !important;
  margin-top: 4px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-modifiers {
  gap: 2px !important;
  margin-top: 3px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-qty {
  gap: 3px !important;
}

body.pos-mode .pos-qty button {
  min-width: 24px !important;
  min-height: 24px !important;
  font-size: 10px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-totals {
  gap: 2px !important;
}

body.pos-mode .pos-totals span {
  min-height: 20px !important;
  line-height: 1.1 !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 11px !important;
}

body.pos-mode .pos-totals .grand {
  min-height: 28px !important;
  margin-top: 2px !important;
  padding: 5px 0 2px !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  font-size: 16px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-payment-methods,
body.pos-mode .pos-actions {
  display: grid !important;
  gap: 5px !important;
}

body.pos-mode .pos-payment-methods {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.pos-mode .pos-payment-methods button {
  width: 100% !important;
  min-height: 32px !important;
  text-align: center !important;
}

body.pos-mode .pos-payment-fields {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body.pos-mode .pos-payment-fields label[hidden] {
  display: none !important;
}

body.pos-mode .pos-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.pos-mode .pos-actions .btn,
body.pos-mode .pos-actions button {
  min-height: 32px !important;
  height: 32px !important;
  padding: 5px 7px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-message {
  padding: 7px 8px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
}

body.pos-mode .pos-empty,
body.pos-mode .pos-cart-empty {
  padding: 10px !important;
  font-size: 12px !important;
}

body.pos-mode .pos-table-list,
body.pos-mode .pos-products,
body.pos-mode .pos-cart-items {
  scrollbar-width: thin;
  scrollbar-color: #94A3B8 transparent;
}

body.pos-mode .pos-table-list::-webkit-scrollbar::-webkit-scrollbar,
body.pos-mode .pos-products::-webkit-scrollbar,
body.pos-mode .pos-cart-items::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

body.pos-mode .pos-table-list::-webkit-scrollbar-track::-webkit-scrollbar-track,
body.pos-mode .pos-products::-webkit-scrollbar-track,
body.pos-mode .pos-cart-items::-webkit-scrollbar-track {
  background: transparent;
}

body.pos-mode .pos-table-list::-webkit-scrollbar-thumb::-webkit-scrollbar-thumb,
body.pos-mode .pos-products::-webkit-scrollbar-thumb,
body.pos-mode .pos-cart-items::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 999px;
}

@media (max-width: 1366px) {
  body.pos-mode .main {
    padding: 8px !important;
  }

  body.pos-mode .topbar {
    min-height: 48px !important;
    margin-bottom: 6px !important;
    padding: 6px 10px !important;
  }

  body.pos-mode .page-content {
    height: calc(100vh - 62px) !important;
  }

  body.pos-mode .pos-shell {
    grid-template-rows: 40px minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  body.pos-mode .pos-header {
    min-height: 40px !important;
  }

  body.pos-mode .pos-layout {
    grid-template-columns: minmax(165px, 18%) minmax(360px, 1fr) minmax(315px, 33%) !important;
    gap: 6px !important;
  }

  body.pos-mode .pos-panel {
    padding: 6px !important;
  }

  body.pos-mode .pos-products {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important;
    gap: 6px !important;
  }

  body.pos-mode .pos-product {
    min-height: 136px !important;
  }

  body.pos-mode .pos-product img {
    height: 50px !important;
  }

  body.pos-mode .pos-product strong {
    min-height: 28px !important;
    font-size: 12px !important;
  }

  body.pos-mode .pos-product small,
  body.pos-mode .pos-product b,
  body.pos-mode .pos-totals small,
  body.pos-mode .pos-totals strong {
    font-size: 10px !important;
  }

  body.pos-mode .pos-left input,
  body.pos-mode .pos-left select,
  body.pos-mode .pos-left textarea,
  body.pos-mode .pos-cart input,
  body.pos-mode .pos-search-bar input {
    min-height: 30px !important;
    height: 30px !important;
    padding: 5px 8px !important;
  }

  body.pos-mode .pos-left textarea {
    min-height: 48px !important;
    height: 48px !important;
  }

  body.pos-mode .pos-table-list {
    max-height: 86px !important;
  }

  body.pos-mode .pos-totals .grand small,
  body.pos-mode .pos-totals .grand strong {
    font-size: 14px !important;
  }

  body.pos-mode .pos-actions .btn,
  body.pos-mode .pos-actions button,
  body.pos-mode .pos-payment-methods button {
    min-height: 28px !important;
    height: 28px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 992px) {
  body.pos-mode {
    overflow: auto !important;
  }

  body.pos-mode .main {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  body.pos-mode .page-content,
  body.pos-mode .pos-shell {
    height: auto !important;
    overflow: visible !important;
  }

  body.pos-mode .pos-layout {
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }
}

body.pos-mode .pos-shell {
  display: block !important;
}

body.pos-mode .pos-layout {
  height: 100% !important;
}

body.pos-mode .pos-payment-methods {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Final POS viewport fit overrides */
body.pos-mode .pos-cart.current-order-panel {
  display: grid !important;
  grid-template-rows: auto auto minmax(42px, 1fr) auto !important;
  gap: 5px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.pos-mode .pos-main-actions,
body.pos-mode .pos-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  flex: none !important;
  min-height: 42px !important;
  max-height: 115px !important;
  overflow-y: auto !important;
}

body.pos-mode .current-order-footer {
  min-height: 0 !important;
  gap: 4px !important;
  padding-top: 5px !important;
  overflow: visible !important;
}

body.pos-mode .pos-cart-controls-single {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.pos-mode .pos-totals {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 10px !important;
  row-gap: 1px !important;
}

body.pos-mode .pos-totals span {
  min-height: 17px !important;
}

body.pos-mode .pos-totals .grand {
  grid-column: 1 / -1 !important;
  min-height: 24px !important;
  margin-top: 1px !important;
  padding: 4px 0 2px !important;
}

body.pos-mode .pos-payment-fields {
  grid-template-columns: 1fr !important;
}

body.pos-mode .pos-payment-fields input {
  min-height: 30px !important;
  height: 30px !important;
}

body.pos-mode .pos-message {
  max-height: 54px !important;
  overflow-y: auto !important;
}

@media (max-height: 700px) and (min-width: 993px) {
  body.pos-mode .pos-cart.current-order-panel {
    gap: 4px !important;
  }

  body.pos-mode .pos-cart-items.current-order-items {
    max-height: 74px !important;
  }

  body.pos-mode .current-order-footer {
    gap: 3px !important;
    padding-top: 4px !important;
  }

  body.pos-mode .pos-totals span {
    min-height: 15px !important;
    line-height: 1 !important;
  }

  body.pos-mode .pos-totals small,
  body.pos-mode .pos-totals strong {
    font-size: 9px !important;
  }

  body.pos-mode .pos-totals .grand {
    min-height: 20px !important;
    padding: 3px 0 1px !important;
  }

  body.pos-mode .pos-totals .grand small,
  body.pos-mode .pos-totals .grand strong {
    font-size: 13px !important;
  }

  body.pos-mode .pos-payment-fields input,
  body.pos-mode .pos-cart input {
    min-height: 27px !important;
    height: 27px !important;
  }

  body.pos-mode .pos-payment-methods button,
  body.pos-mode .pos-actions .btn,
  body.pos-mode .pos-actions button {
    min-height: 27px !important;
    height: 27px !important;
    padding: 4px 6px !important;
  }
}


/* Final readable button colors */
.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled),
button.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled),
a.btn:not(.ghost):not(.danger),
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):not(:disabled),
.quick-actions a:first-child {
  color: #FFFFFF !important;
  background: #2563EB !important;
  background-image: none !important;
  border-color: #2563EB !important;
}

.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled):hover,
button.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled):hover,
a.btn:not(.ghost):not(.danger):hover,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):not(:disabled):hover,
.quick-actions a:first-child:hover {
  color: #FFFFFF !important;
  background: #1D4ED8 !important;
  border-color: #1D4ED8 !important;
}

.btn:not(.ghost):not(.danger):focus-visible,
button.btn:not(.ghost):not(.danger):focus-visible,
a.btn:not(.ghost):not(.danger):focus-visible,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):focus-visible {
  outline: 3px solid rgba(37, 99, 235, .25) !important;
  outline-offset: 2px !important;
}

.btn:disabled,
button.btn:disabled,
.btn.is-disabled,
button[disabled] {
  opacity: .55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Final Inventory table polish: keep cells and action buttons readable */
.inventory-table {
  width: 100% !important;
  min-width: 1120px !important;
  table-layout: auto !important;
}

.inventory-table th,
.inventory-table td {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.inventory-table th:nth-child(1),
.inventory-table td:nth-child(1) {
  min-width: 150px !important;
}

.inventory-table th:nth-child(3),
.inventory-table td:nth-child(3) {
  min-width: 90px !important;
  text-align: center !important;
}

.inventory-table th:nth-child(9),
.inventory-table td:nth-child(9) {
  min-width: 260px !important;
}

.inventory-table .unit-label {
  display: inline-flex !important;
  min-width: max-content !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  padding: 4px 10px !important;
}

.inventory-table .inventory-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 248px !important;
}

.inventory-table .inventory-actions .btn,
.inventory-table .inventory-actions summary.btn,
.inventory-table .inventory-actions button.btn {
  width: auto !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 7px 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.inventory-table .inventory-actions form {
  margin: 0 !important;
}

/* CafeCore primary action buttons: blue theme */
.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled),
button.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled),
a.btn:not(.ghost):not(.danger),
.auth-page .btn:not(.ghost):not(.danger),
.login-page .btn:not(.ghost):not(.danger),
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):not(:disabled),
.quick-actions a:first-child {
  min-height: 38px !important;
  padding: 9px 14px !important;
  border-radius: 8px !important;
  border: 1px solid #2563EB !important;
  color: #FFFFFF !important;
  background: #2563EB !important;
  background-image: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
}

.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled):hover,
button.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled):hover,
a.btn:not(.ghost):not(.danger):hover,
.auth-page .btn:not(.ghost):not(.danger):hover,
.login-page .btn:not(.ghost):not(.danger):hover,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):not(:disabled):hover,
.quick-actions a:first-child:hover {
  color: #FFFFFF !important;
  background: #1D4ED8 !important;
  border-color: #1D4ED8 !important;
}

.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled):active,
button.btn:not(.ghost):not(.danger):not(:disabled):not(.is-disabled):active,
a.btn:not(.ghost):not(.danger):active,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):not(:disabled):active {
  color: #FFFFFF !important;
  background: #1E40AF !important;
  border-color: #1E40AF !important;
}

.btn:not(.ghost):not(.danger):focus-visible,
button.btn:not(.ghost):not(.danger):focus-visible,
a.btn:not(.ghost):not(.danger):focus-visible,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.ghost):not(.danger):focus-visible {
  outline: 3px solid rgba(37, 99, 235, .25) !important;
  outline-offset: 2px !important;
}

.btn:disabled,
button.btn:disabled,
.btn.is-disabled,
button[disabled] {
  opacity: .55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Final primary/standard button color: match Completed badge */
.btn:not(.danger):not(:disabled):not(.is-disabled),
button.btn:not(.danger):not(:disabled):not(.is-disabled),
a.btn:not(.danger),
.auth-page .btn:not(.danger),
.login-page .btn:not(.danger),
button[type="submit"]:not(.sidebar button):not(.nav button):not(.danger):not(:disabled),
.quick-actions a {
  color: #166534 !important;
  background: #DCFCE7 !important;
  background-image: none !important;
  border: 1px solid #BBF7D0 !important;
  box-shadow: none !important;
}

.btn:not(.danger):not(:disabled):not(.is-disabled):hover,
button.btn:not(.danger):not(:disabled):not(.is-disabled):hover,
a.btn:not(.danger):hover,
.auth-page .btn:not(.danger):hover,
.login-page .btn:not(.danger):hover,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.danger):not(:disabled):hover,
.quick-actions a:hover {
  color: #14532D !important;
  background: #BBF7D0 !important;
  border-color: #86EFAC !important;
}

.btn:not(.danger):not(:disabled):not(.is-disabled):active,
button.btn:not(.danger):not(:disabled):not(.is-disabled):active,
a.btn:not(.danger):active,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.danger):not(:disabled):active {
  color: #14532D !important;
  background: #86EFAC !important;
  border-color: #4ADE80 !important;
}

.btn:not(.danger):focus-visible,
button.btn:not(.danger):focus-visible,
a.btn:not(.danger):focus-visible,
button[type="submit"]:not(.sidebar button):not(.nav button):not(.danger):focus-visible {
  outline: 3px solid rgba(22, 101, 52, .20) !important;
  outline-offset: 2px !important;
}

.order-status-edit .recent-order-edit-status-btn,
.order-status-edit .recent-order-edit-status-btn:not(.danger):not(:disabled):not(.is-disabled),
.order-status-edit button.recent-order-edit-status-btn:not(.danger):not(:disabled):not(.is-disabled) {
  border-color: #2563EB !important;
  background: #2563EB !important;
  color: #FFFFFF !important;
}

.order-status-edit .recent-order-edit-status-btn:hover,
.order-status-edit button.recent-order-edit-status-btn:hover {
  border-color: #1D4ED8 !important;
  background: #1D4ED8 !important;
  color: #FFFFFF !important;
}

.order-status-edit .recent-order-edit-status-btn:focus-visible,
.order-status-edit button.recent-order-edit-status-btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .24) !important;
  outline-offset: 2px !important;
}

/* Final dashboard header polish: restore clear cafe/title/profile presentation */
body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar {
  min-height: 92px !important;
  padding: 16px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  overflow: visible !important;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06) !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar-heading {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 16px !important;
  flex: 1 1 auto !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar-logo {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  flex: 0 0 58px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #F8FAFC !important;
  border: 1px solid #DBEAFE !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar-logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar-heading > div {
  min-width: 0 !important;
  display: grid !important;
  gap: 2px !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar-heading .eyebrow {
  margin: 0 !important;
  color: #2563EB !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .page-title {
  margin: 0 !important;
  color: #0F172A !important;
  font-size: 34px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar small {
  display: block !important;
  margin-top: 2px !important;
  color: #64748B !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar-actions {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  overflow: visible !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .user-pill {
  min-height: 56px !important;
  max-width: 230px !important;
  padding: 7px 14px 7px 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 999px !important;
  color: #0F172A !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .05) !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .user-pill > span {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  background: #EFF6FF !important;
  color: #2563EB !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  overflow: hidden !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .user-pill > span img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .user-pill div {
  min-width: 0 !important;
  color: #0F172A !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body:not(.auth-page):not(.login-page):not(.pos-mode) .user-pill small {
  margin-top: 2px !important;
  color: #64748B !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  font-weight: 500 !important;
}

.phone-input-group {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(92px, 112px) minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.phone-input-group .phone-country-select {
  width: 100%;
  height: 44px;
  min-height: 44px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  padding: 0 8px;
}

.phone-input-group input {
  min-width: 0;
}

body.pos-mode .phone-input-group {
  grid-template-columns: 72px minmax(0, 1fr) !important;
  gap: 4px !important;
}

body.pos-mode .phone-input-group .phone-country-select {
  height: 38px !important;
  min-height: 38px !important;
  font-size: 11px !important;
  padding: 0 4px !important;
}

body.pos-mode .phone-input-group input[data-pos-customer-phone],
body.pos-mode .phone-input-group input[data-international-phone],
body.pos-mode .phone-input-group input[data-pak-phone] {
  width: 100% !important;
  min-width: 0 !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 4px !important;
  font-size: 10px !important;
  letter-spacing: 0 !important;
  text-align: left !important;
}

.order-phone-field {
  grid-column: span 2;
}

.order-phone-field .phone-input-group {
  grid-template-columns: 112px minmax(190px, 1fr) !important;
}

.order-phone-field .phone-input-group input[name="customer_phone"] {
  width: 100% !important;
  min-width: 190px !important;
  padding-inline: 12px !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}

@media (max-width: 768px) {
  .order-phone-field {
    grid-column: auto;
  }

  .order-phone-field .phone-input-group {
    grid-template-columns: 96px minmax(0, 1fr) !important;
  }

  .order-phone-field .phone-input-group input[name="customer_phone"] {
    min-width: 0 !important;
  }
}

.order-timeline.compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.order-timeline-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: #F8FAFC;
}

.order-timeline-step > span {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #D1D5DB;
  color: #64748B;
  font-size: 12px;
  font-weight: 800;
}

.order-timeline-step.reached > span {
  color: #166534;
  background: #DCFCE7;
  border-color: #BBF7D0;
}

.order-timeline-step strong {
  min-width: 0;
  color: #0F172A;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-timeline-step small {
  grid-column: 2;
  color: #64748B;
  font-size: 11px;
  line-height: 1.2;
}

.recent-order-status-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.recent-order-status-stack small,
.kot-stage-time {
  color: #64748B !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.bill-lock-note {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: #166534;
  background: #DCFCE7;
  border: 1px solid #BBF7D0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.bill-edit-card {
  max-width: 1100px;
  margin-inline: auto;
}

.bill-edit-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.bill-edit-summary > div {
  padding: 12px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: #F8FAFC;
}

.bill-edit-summary span {
  display: block;
  margin-bottom: 3px;
  color: #64748B;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.bill-edit-summary strong {
  color: #0F172A;
  font-size: 15px;
}

.bill-edit-discount {
  max-width: 220px;
}

.bill-edit-table input,
.bill-edit-table select {
  min-height: 36px;
  height: 36px;
}

.bill-remove-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.bill-new-items {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.bill-new-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: #F8FAFC;
}

@media (max-width: 768px) {
  .bill-edit-summary,
  .bill-new-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar {
    min-height: auto !important;
    padding: 12px !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
  }

  body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar-heading {
    width: 100% !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  body:not(.auth-page):not(.login-page):not(.pos-mode) .page-title {
    font-size: 22px !important;
  }

  body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar small {
    white-space: normal !important;
  }

  body:not(.auth-page):not(.login-page):not(.pos-mode) .topbar-actions {
    width: 100% !important;
    justify-content: flex-end !important;
  }
}

/* POS focused layout fixes: full table space, default product grid, keyboard focus */
body.pos-mode {
  height: 100vh !important;
  overflow: hidden !important;
}

body.pos-mode .main,
body.pos-mode .page-content,
body.pos-mode .pos-shell {
  min-height: 0 !important;
  overflow: hidden !important;
}

body.pos-mode .pos-shell {
  height: calc(100vh - 94px) !important;
  display: flex !important;
  flex-direction: column !important;
}

body.pos-mode .pos-layout {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 200px minmax(360px, 1fr) 360px !important;
  gap: 8px !important;
  overflow: hidden !important;
}

body.pos-mode .pos-panel {
  min-height: 0 !important;
  overflow: hidden !important;
}

body.pos-mode .pos-left {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

body.pos-mode .pos-left .field {
  flex: 0 0 auto !important;
}

body.pos-mode .pos-left [data-pos-table-field] {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

body.pos-mode .pos-table-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 3px !important;
}

body.pos-mode .pos-table {
  min-height: 34px !important;
  height: 34px !important;
  padding: 6px 9px !important;
  margin-bottom: 5px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body.pos-mode .pos-table strong,
body.pos-mode .pos-table small {
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-table.is-focused,
body.pos-mode .pos-table:focus-visible {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18) !important;
  outline: none !important;
}

body.pos-mode .pos-center {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

body.pos-mode .pos-products {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  align-content: start !important;
  gap: 10px !important;
  padding: 8px !important;
}

body.pos-mode .pos-product {
  min-height: 180px !important;
  height: auto !important;
  padding: 10px !important;
  border-radius: 12px !important;
}

body.pos-mode .pos-product img {
  height: 78px !important;
  width: 100% !important;
  object-fit: cover !important;
  border-radius: 9px !important;
}

body.pos-mode .pos-product strong {
  font-size: 13px !important;
  line-height: 1.25 !important;
  min-height: 32px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

body.pos-mode .pos-product.is-focused,
body.pos-mode .pos-product:focus-visible {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18), 0 8px 18px rgba(15, 23, 42, .10) !important;
  outline: none !important;
}

body.pos-mode .pos-keyboard-quantity {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 120px !important;
  gap: 8px !important;
  align-items: end !important;
  padding: 7px 9px !important;
  margin: 0 0 6px !important;
  border: 1px solid #DBEAFE !important;
  border-radius: 10px !important;
  background: #F8FAFC !important;
}

body.pos-mode .pos-keyboard-quantity[hidden] {
  display: none !important;
}

body.pos-mode .pos-keyboard-quantity span,
body.pos-mode .pos-keyboard-quantity label {
  min-width: 0 !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

body.pos-mode .pos-keyboard-quantity strong {
  display: block !important;
  max-width: 100% !important;
  margin-top: 3px !important;
  color: #0F172A !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.pos-mode .pos-keyboard-quantity input {
  width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  margin-top: 3px !important;
  padding: 0 8px !important;
  font-size: 13px !important;
}

body.pos-mode .pos-qty input[data-cart-quantity] {
  width: 54px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 4px !important;
  text-align: center !important;
  font-size: 12px !important;
}

body.pos-mode .pos-empty {
  margin: auto !important;
}

body.pos-mode .pos-cart-line.is-focused {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15) !important;
  outline: none !important;
}

body.pos-mode input:focus,
body.pos-mode textarea:focus,
body.pos-mode select:focus,
body.pos-mode button:focus-visible,
body.pos-mode a:focus-visible,
body.pos-mode .pos-table-list:focus {
  border-color: #2563EB !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16) !important;
}

body.pos-mode .pos-payment-methods button:focus-visible,
body.pos-mode .pos-actions .btn:focus-visible,
body.pos-mode .pos-receipt-actions .btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .20) !important;
  border-color: #2563EB !important;
}

/* Purchase confirmation payment details */
.purchase-payment-card {
  margin-top: 18px !important;
  padding: 20px !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 16px !important;
  background: #FFFFFF !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06) !important;
}

.date-time-cell {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
  white-space: nowrap;
}

.date-time-cell strong {
  color: #111827;
  font-weight: 700;
}

.date-time-cell small {
  color: #6B7280;
  font-size: 12px;
  font-weight: 500;
}

.purchase-payment-card .section-head {
  margin-bottom: 12px !important;
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}

.purchase-discount-control {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.purchase-discount-control select,
.purchase-discount-control input {
  width: 100%;
}

.payment-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.payment-type-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  background: #FFFFFF;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.payment-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-type-option:has(input:checked) {
  color: #FFFFFF;
  background: #2563EB;
  border-color: #2563EB;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.purchase-payment-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px 16px !important;
  align-items: end !important;
}

.purchase-payment-grid .field {
  margin: 0 !important;
}

.purchase-payment-grid .field label {
  margin-bottom: 6px !important;
  color: #111827 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.purchase-payment-grid input,
.purchase-payment-grid select {
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}

.purchase-payment-grid .purchase-wide {
  grid-column: 1 / -1 !important;
}

.purchase-payment-grid [data-purchase-payment-hint]:empty {
  display: none !important;
}

.purchase-payment-total input[readonly] {
  color: #0F172A !important;
  font-weight: 700 !important;
  background: #F8FAFC !important;
}

.purchase-payment-paid input {
  font-weight: 700 !important;
}

.purchase-payment-card input[readonly],
.purchase-payment-card input:disabled,
.purchase-payment-card select:disabled {
  background: #F8FAFC !important;
  color: #64748B !important;
  cursor: not-allowed;
}

@media (max-width: 992px) {
  .purchase-payment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 576px) {
  .purchase-payment-grid {
    grid-template-columns: 1fr !important;
  }
}

.purchase-receiving-layout {
  grid-template-columns: minmax(0, 1.85fr) minmax(320px, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
}

.purchase-receiving-table th,
.purchase-receiving-table td {
  padding: 6px 9px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  white-space: nowrap;
  vertical-align: middle;
}

.purchase-receiving-table th {
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
}

.purchase-receiving-table td {
  color: #334155 !important;
  font-weight: 500 !important;
}

.purchase-receiving-table input,
.purchase-receiving-table select {
  min-width: 58px;
  height: 30px !important;
  min-height: 30px !important;
  padding: 4px 7px !important;
  font-size: 11px !important;
  border-radius: 7px !important;
}

.purchase-receiving-table .receive-number {
  min-width: 58px !important;
  max-width: 76px !important;
  text-align: center;
}

.purchase-receiving-table th:nth-child(4),
.purchase-receiving-table th:nth-child(5),
.purchase-receiving-table th:nth-child(6),
.purchase-receiving-table td:nth-child(4),
.purchase-receiving-table td:nth-child(5),
.purchase-receiving-table td:nth-child(6) {
  width: 72px !important;
  max-width: 72px !important;
  text-align: center !important;
}

.purchase-receiving-extra {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 10px;
}

.purchase-receiving-extra label {
  display: grid;
  gap: 5px;
  color: #6B7280;
  font-size: 12px;
  font-weight: 700;
}

.purchase-payment-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.purchase-inline-payment {
  margin-top: 16px;
}

@media (max-width: 992px) {
  .purchase-receiving-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 576px) {
  .purchase-receiving-extra {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  body.pos-mode .pos-layout {
    grid-template-columns: 190px minmax(300px, 1fr) 340px !important;
  }
}

@media (max-width: 992px) {
  body.pos-mode {
    overflow: auto !important;
  }

  body.pos-mode .pos-shell {
    height: auto !important;
    overflow: visible !important;
  }

  body.pos-mode .pos-layout {
    height: auto !important;
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }

  body.pos-mode .pos-table-list,
  body.pos-mode .pos-products,
  body.pos-mode .pos-cart-items {
    max-height: 360px !important;
  }

  body.pos-mode .pos-keyboard-quantity {
    grid-template-columns: 1fr !important;
  }

}

/* Compact reports and activity pagination */
.compact-report-filters .grid-4 {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
  gap: 12px !important;
}

.report-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 12px 0 16px !important;
}

.report-tab {
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 7px 12px !important;
  color: #374151 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.report-tab.active {
  color: #FFFFFF !important;
  background: #2563EB !important;
  border-color: #2563EB !important;
}

.report-tab:hover {
  color: #111827 !important;
  background: #F9FAFB !important;
}

.report-tab.active:hover {
  color: #FFFFFF !important;
  background: #1D4ED8 !important;
}

.compact-pagination {
  display: flex !important;
  justify-content: center !important;
  margin-top: 16px !important;
}

.compact-pagination nav,
.compact-pagination .pagination {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.compact-pagination a,
.compact-pagination span {
  min-width: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 10px !important;
  color: #374151 !important;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.compact-pagination span[aria-current],
.compact-pagination .active span,
.compact-pagination [aria-current="page"] {
  color: #FFFFFF !important;
  background: #2563EB !important;
  border-color: #2563EB !important;
}

.compact-pagination .disabled span,
.compact-pagination span[aria-disabled="true"] {
  opacity: .5 !important;
  cursor: not-allowed !important;
}

@media (max-width: 768px) {
  .compact-report-filters .grid-4 {
    grid-template-columns: 1fr !important;
  }

  .report-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Compact Menu Management form row */
.menu-form-row {
  display: grid !important;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr) !important;
  justify-content: start !important;
  align-items: start !important;
  gap: 20px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 16px !important;
}

.menu-form-row > .card,
.menu-form-row > form.card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  justify-self: stretch !important;
}

.menu-form-row textarea {
  min-height: 88px !important;
  max-height: 110px !important;
}

.menu-form-row .field {
  margin-bottom: 8px !important;
}

.menu-form-row .menu-item-form-card {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px 12px !important;
  align-items: end !important;
}

.menu-form-row .menu-item-form-card h2 {
  grid-column: 1 / -1 !important;
  margin-bottom: 2px !important;
}

.menu-form-row .menu-item-form-card .field,
.menu-form-row .menu-field-availability {
  margin: 0 !important;
}

.menu-form-row .menu-field-description {
  grid-column: 1 / -1 !important;
}

.menu-form-row .menu-field-description textarea {
  min-height: 70px !important;
  max-height: 80px !important;
}

.menu-form-row .menu-field-submit {
  justify-self: start !important;
  margin-top: 0 !important;
}

@media (max-width: 992px) {
  .menu-form-row {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
  }

  .menu-form-row .menu-item-form-card {
    grid-template-columns: 1fr !important;
  }

  .menu-form-row .menu-field-description {
    grid-column: auto !important;
  }
}

/* POS one-screen fit: keep payment controls visible without changing flow */
body.pos-mode .pos-shell {
  height: calc(100vh - 78px) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.pos-mode .pos-layout {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-columns: 196px minmax(320px, 1fr) 360px !important;
  gap: 6px !important;
  overflow: hidden !important;
}

body.pos-mode .pos-panel {
  min-height: 0 !important;
  padding: 8px !important;
}

body.pos-mode .pos-left {
  gap: 4px !important;
  overflow: hidden !important;
}

body.pos-mode .pos-left label,
body.pos-mode .pos-cart label,
body.pos-mode .pos-payment-fields small {
  margin-bottom: 2px !important;
  font-size: 10px !important;
  line-height: 1.05 !important;
}

body.pos-mode .pos-left input,
body.pos-mode .pos-left select,
body.pos-mode .pos-left textarea,
body.pos-mode .pos-cart input,
body.pos-mode .pos-cart select,
body.pos-mode .pos-search-bar input {
  min-height: 30px !important;
  height: 30px !important;
  padding: 5px 8px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-left textarea {
  min-height: 46px !important;
  height: 46px !important;
  resize: none !important;
}

body.pos-mode .pos-table-list {
  max-height: 178px !important;
  overflow-y: auto !important;
}

body.pos-mode .pos-table {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 8px !important;
  margin-bottom: 4px !important;
}

body.pos-mode .pos-cart.current-order-panel {
  display: grid !important;
  grid-template-rows: auto minmax(48px, 96px) auto !important;
  gap: 4px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.pos-mode .pos-cart-head.current-order-header {
  min-height: 30px !important;
  padding-bottom: 4px !important;
}

body.pos-mode .pos-cart-head.current-order-header h2 {
  font-size: 15px !important;
  line-height: 1.1 !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 48px !important;
  max-height: 96px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px !important;
}

body.pos-mode .pos-cart-row {
  min-height: 52px !important;
  padding: 5px !important;
  gap: 6px !important;
}

body.pos-mode .pos-cart-row img {
  width: 44px !important;
  height: 44px !important;
}

body.pos-mode .pos-cart-row .pos-cart-title,
body.pos-mode .pos-cart-row strong {
  font-size: 11px !important;
  line-height: 1.15 !important;
}

body.pos-mode .current-order-footer {
  min-height: 0 !important;
  gap: 4px !important;
  padding-top: 4px !important;
  overflow: visible !important;
}

body.pos-mode .pos-cart-controls {
  gap: 4px !important;
}

body.pos-mode .pos-cart-controls-single {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.pos-mode .pos-totals {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 2px 8px !important;
  padding: 3px 0 !important;
}

body.pos-mode .pos-totals span {
  min-height: 12px !important;
  padding: 0 !important;
  line-height: 1.05 !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 10px !important;
  line-height: 1.05 !important;
}

body.pos-mode .pos-totals .grand {
  min-height: 20px !important;
  margin-top: 1px !important;
  padding: 3px 0 1px !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  font-size: 14px !important;
}

body.pos-mode .pos-payment-methods {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

body.pos-mode .pos-payment-methods button {
  min-height: 27px !important;
  height: 27px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-payment-fields {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 3px !important;
}

body.pos-mode .pos-payment-fields input {
  min-height: 34px !important;
  height: 34px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

body.pos-mode .pos-actions.pos-main-actions .btn,
body.pos-mode .pos-actions.pos-main-actions button {
  width: 100% !important;
  min-height: 31px !important;
  height: 31px !important;
  padding: 4px 5px !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-actions.pos-main-actions .pos-payment-received {
  grid-column: auto !important;
}

body.pos-mode .pos-message {
  max-height: 36px !important;
  margin-top: 1px !important;
  padding: 5px 7px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  overflow: auto !important;
}

/* POS action-row alignment fix */
body.pos-mode .pos-shell {
  height: calc(100vh - 98px) !important;
}

body.pos-mode .pos-cart.current-order-panel {
  align-self: stretch !important;
  margin-top: 0 !important;
  grid-template-rows: auto minmax(42px, 72px) auto !important;
  gap: 3px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 42px !important;
  max-height: 72px !important;
}

body.pos-mode .pos-cart-empty {
  align-self: start !important;
  padding: 8px 6px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body.pos-mode .current-order-footer {
  gap: 3px !important;
  padding-top: 3px !important;
}

body.pos-mode .pos-totals {
  gap: 1px 7px !important;
  padding: 2px 0 !important;
}

body.pos-mode .pos-totals span {
  min-height: 11px !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 9px !important;
}

body.pos-mode .pos-totals .grand {
  min-height: 18px !important;
  padding: 2px 0 1px !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  font-size: 13px !important;
}

body.pos-mode .pos-payment-fields input {
  min-height: 30px !important;
  height: 30px !important;
  padding: 5px 9px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
}

body.pos-mode .pos-actions.pos-main-actions .btn,
body.pos-mode .pos-actions.pos-main-actions button {
  min-width: 0 !important;
  min-height: 29px !important;
  height: 29px !important;
  padding: 4px 3px !important;
  font-size: 9px !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}

@media (max-width: 992px) {
  body.pos-mode .pos-shell {
    height: auto !important;
    overflow: visible !important;
  }

  body.pos-mode .pos-layout {
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }

body.pos-mode .pos-cart.current-order-panel {
  grid-template-rows: auto minmax(120px, auto) auto !important;
}
}

/* POS current order top alignment */
body.pos-mode .pos-cart.current-order-panel {
  align-content: start !important;
  align-items: stretch !important;
  padding-top: 10px !important;
}

body.pos-mode .pos-cart-head.current-order-header,
body.pos-mode .pos-cart-head {
  margin: 0 !important;
  padding: 0 0 4px !important;
}

body.pos-mode .pos-cart-items.current-order-items,
body.pos-mode .pos-cart-items {
  align-self: start !important;
  justify-self: stretch !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  align-content: start !important;
}

body.pos-mode .pos-cart-line:first-child {
  margin-top: 0 !important;
}

/* POS current order table layout */
body.pos-mode .pos-cart.current-order-panel {
  grid-template-rows: auto minmax(150px, 220px) auto !important;
}

body.pos-mode .pos-cart-items.current-order-items,
body.pos-mode .pos-cart-items {
  min-height: 150px !important;
  max-height: 220px !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
}

body.pos-mode .pos-cart-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-table th,
body.pos-mode .pos-cart-table td {
  padding: 5px 4px !important;
  border-bottom: 1px solid #E5E7EB !important;
  vertical-align: middle !important;
  text-align: left !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-cart-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #F8FAFC !important;
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
}

body.pos-mode .pos-cart-table th:nth-child(1),
body.pos-mode .pos-cart-table td:nth-child(1) { width: 42% !important; }
body.pos-mode .pos-cart-table th:nth-child(2),
body.pos-mode .pos-cart-table td:nth-child(2) { width: 15% !important; }
body.pos-mode .pos-cart-table th:nth-child(3),
body.pos-mode .pos-cart-table td:nth-child(3) { width: 20% !important; }
body.pos-mode .pos-cart-table th:nth-child(4),
body.pos-mode .pos-cart-table td:nth-child(4) { width: 15% !important; }
body.pos-mode .pos-cart-table th:nth-child(5),
body.pos-mode .pos-cart-table td:nth-child(5) { width: 8% !important; }

body.pos-mode .pos-cart-product {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 6px !important;
  align-items: center !important;
  min-width: 0 !important;
}

body.pos-mode .pos-cart-product img {
  width: 34px !important;
  height: 34px !important;
  border-radius: 7px !important;
  object-fit: cover !important;
}

body.pos-mode .pos-cart-info strong,
body.pos-mode .pos-cart-info small {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1.15 !important;
}

body.pos-mode .pos-cart-info strong {
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-cart-info small {
  font-size: 10px !important;
  color: #64748B !important;
}

body.pos-mode .pos-cart-item-name {
  display: block;
  max-width: 100%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-mode .pos-qty-table {
  display: grid !important;
  grid-template-columns: 22px 34px 22px !important;
  gap: 2px !important;
  align-items: center !important;
}

body.pos-mode .pos-qty-table button,
body.pos-mode .pos-cart-remove {
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 5px !important;
  font-size: 10px !important;
  border-radius: 6px !important;
}

body.pos-mode .pos-qty-table input {
  width: 34px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 2px !important;
  text-align: center !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-remove {
  width: 24px !important;
  overflow: hidden !important;
  color: transparent !important;
  position: relative !important;
}

body.pos-mode .pos-cart-remove::after {
  content: "x";
  color: #DC2626;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
}

/* POS current order table: keep rows professional and readable */
body.pos-mode .pos-cart-items.current-order-items:has(.pos-cart-table),
body.pos-mode .pos-cart-items:has(.pos-cart-table) {
  display: block !important;
  padding-right: 0 !important;
}

body.pos-mode .pos-cart-table .pos-cart-line {
  display: table-row !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  background: #FFFFFF !important;
}

body.pos-mode .pos-cart-table .pos-cart-line.is-focused {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

body.pos-mode .pos-cart-table .pos-cart-line.is-focused td {
  background: #EFF6FF !important;
}

body.pos-mode .pos-cart-table {
  min-width: 350px !important;
}

body.pos-mode .pos-cart-table th:nth-child(1),
body.pos-mode .pos-cart-table td:nth-child(1) {
  width: 34% !important;
}

body.pos-mode .pos-cart-table th:nth-child(2),
body.pos-mode .pos-cart-table td:nth-child(2) {
  width: 18% !important;
}

body.pos-mode .pos-cart-table th:nth-child(3),
body.pos-mode .pos-cart-table td:nth-child(3) {
  width: 26% !important;
}

body.pos-mode .pos-cart-table th:nth-child(4),
body.pos-mode .pos-cart-table td:nth-child(4) {
  width: 16% !important;
}

body.pos-mode .pos-cart-table th:nth-child(5),
body.pos-mode .pos-cart-table td:nth-child(5) {
  width: 6% !important;
}

body.pos-mode .pos-cart-table th,
body.pos-mode .pos-cart-table td {
  padding: 7px 5px !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-cart-table td:first-child {
  white-space: normal !important;
}

body.pos-mode .pos-cart-item-name {
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
}

body.pos-mode .pos-cart-table .pos-qty-table {
  display: inline-grid !important;
  grid-template-columns: 20px 32px 20px !important;
  gap: 2px !important;
  align-items: center !important;
}

body.pos-mode .pos-cart-table .pos-qty-table button {
  min-width: 20px !important;
  width: 20px !important;
  min-height: 22px !important;
  height: 22px !important;
  padding: 0 !important;
}

body.pos-mode .pos-cart-table .pos-qty-table input {
  width: 32px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 2px !important;
}

body.pos-mode .pos-cart-table .pos-cart-remove {
  width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
}

/* POS action buttons: equal row, clear labels */
body.pos-mode .pos-layout {
  grid-template-columns: 196px minmax(280px, 1fr) 390px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: stretch !important;
  overflow: visible !important;
}

body.pos-mode .pos-actions.pos-main-actions > .btn,
body.pos-mode .pos-actions.pos-main-actions > button {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
  font-size: 10px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

@media (max-width: 1180px) {
  body.pos-mode .pos-layout {
    grid-template-columns: 190px minmax(240px, 1fr) 400px !important;
  }

  body.pos-mode .pos-actions.pos-main-actions > .btn,
  body.pos-mode .pos-actions.pos-main-actions > button {
    font-size: 9px !important;
    padding: 0 3px !important;
  }
}

@media (max-width: 992px) {
  body.pos-mode .pos-layout {
    grid-template-columns: 1fr !important;
  }
}

/* POS compact current order and action buttons */
body.pos-mode .pos-cart-table {
  min-width: 315px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-cart-table th,
body.pos-mode .pos-cart-table td {
  padding: 5px 4px !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
}

body.pos-mode .pos-cart-table th:nth-child(1),
body.pos-mode .pos-cart-table td:nth-child(1) {
  width: 36% !important;
}

body.pos-mode .pos-cart-table th:nth-child(2),
body.pos-mode .pos-cart-table td:nth-child(2) {
  width: 17% !important;
}

body.pos-mode .pos-cart-table th:nth-child(3),
body.pos-mode .pos-cart-table td:nth-child(3) {
  width: 23% !important;
}

body.pos-mode .pos-cart-table th:nth-child(4),
body.pos-mode .pos-cart-table td:nth-child(4) {
  width: 17% !important;
}

body.pos-mode .pos-cart-table th:nth-child(5),
body.pos-mode .pos-cart-table td:nth-child(5) {
  width: 7% !important;
}

body.pos-mode .pos-cart-item-name {
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  -webkit-line-clamp: 2;
}

body.pos-mode .pos-cart-table .pos-qty-table {
  grid-template-columns: 18px 26px 18px !important;
  gap: 1px !important;
}

body.pos-mode .pos-cart-table .pos-qty-table button {
  min-width: 18px !important;
  width: 18px !important;
  min-height: 20px !important;
  height: 20px !important;
  font-size: 9px !important;
  border-radius: 6px !important;
}

body.pos-mode .pos-cart-table .pos-qty-table input {
  width: 26px !important;
  height: 20px !important;
  min-height: 20px !important;
  font-size: 10px !important;
  border-radius: 6px !important;
}

body.pos-mode .pos-cart-table .pos-cart-remove {
  width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  border-radius: 6px !important;
}

body.pos-mode .pos-cart-qty-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid #D1D5DB;
  border-radius: 7px;
  background: #FFFFFF;
  color: #111827;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

body.pos-mode .current-order-footer {
  gap: 4px !important;
  padding-top: 5px !important;
}

body.pos-mode .pos-totals {
  gap: 2px 8px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-payment-fields small,
body.pos-mode .pos-cart-controls label {
  font-size: 9px !important;
  line-height: 1.1 !important;
}

body.pos-mode .pos-payment-methods {
  gap: 4px !important;
}

body.pos-mode .pos-payment-methods button {
  height: 28px !important;
  min-height: 28px !important;
  font-size: 10px !important;
  padding: 0 6px !important;
}

body.pos-mode .pos-payment-fields input,
body.pos-mode .pos-cart-controls input,
body.pos-mode .pos-cart-controls select {
  height: 32px !important;
  min-height: 32px !important;
  font-size: 11px !important;
  padding: 0 10px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  gap: 4px !important;
  grid-template-columns: 1fr 1fr 1.12fr !important;
}

body.pos-mode .pos-actions.pos-main-actions > .btn,
body.pos-mode .pos-actions.pos-main-actions > button {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 3px !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

/* Purchase page inline supplier popup */
.purchase-supplier-modal[hidden] {
  display: none !important;
}

.purchase-supplier-modal {
  position: fixed;
  inset: 0;
  z-index: 100080;
  display: grid;
  place-items: center;
  padding: 20px;
}

.purchase-supplier-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
}

.purchase-supplier-modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .24);
  padding: 22px;
}

.purchase-supplier-modal-message {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  font-size: 13px;
  font-weight: 700;
}

.purchase-supplier-modal-message[data-type="success"] {
  background: #DCFCE7;
  border-color: #86EFAC;
  color: #166534;
}

@media (max-width: 768px) {
  .purchase-supplier-modal {
    padding: 12px;
  }

  .purchase-supplier-modal-card {
    padding: 16px;
  }
}

/* Final POS right-panel visibility fix */
body.pos-mode .pos-shell {
  height: calc(100vh - 86px) !important;
  max-height: calc(100vh - 86px) !important;
  overflow: hidden !important;
}

body.pos-mode .pos-layout {
  height: 100% !important;
  max-height: 100% !important;
  align-items: stretch !important;
  overflow: hidden !important;
}

body.pos-mode .pos-cart.current-order-panel {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 34px minmax(44px, 78px) minmax(0, 1fr) !important;
  gap: 4px !important;
  padding: 8px !important;
  overflow: hidden !important;
}

body.pos-mode .pos-cart-head.current-order-header {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.pos-mode .pos-cart-head.current-order-header h2 {
  font-size: 15px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-cart-head.current-order-header .btn {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 44px !important;
  max-height: 78px !important;
  display: block !important;
  overflow: auto !important;
  padding: 0 !important;
}

body.pos-mode .current-order-footer {
  min-height: 0 !important;
  max-height: 100% !important;
  display: grid !important;
  grid-template-rows: auto auto auto auto auto auto !important;
  gap: 3px !important;
  padding-top: 3px !important;
  overflow: hidden !important;
}

body.pos-mode .pos-cart-controls.pos-cart-controls-single {
  display: grid !important;
  grid-template-columns: 145px 145px !important;
  justify-content: start !important;
  gap: 5px !important;
}

body.pos-mode .pos-cart-controls.pos-cart-controls-single .field {
  width: 145px !important;
  max-width: 145px !important;
}

body.pos-mode .pos-cart-controls.pos-cart-controls-single select,
body.pos-mode .pos-cart-controls.pos-cart-controls-single input[data-pos-discount] {
  width: 145px !important;
  max-width: 145px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 8px !important;
  font-size: 9px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-cart-controls .field {
  gap: 2px !important;
}

body.pos-mode .pos-cart-controls label,
body.pos-mode .pos-payment-fields small {
  margin: 0 0 2px !important;
  font-size: 9px !important;
}

body.pos-mode .pos-cart-controls input,
body.pos-mode .pos-cart-controls select {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-totals {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1px 8px !important;
  padding: 1px 0 !important;
}

body.pos-mode .pos-totals span {
  min-height: 10px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 8.5px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-totals .grand {
  min-height: 16px !important;
  margin: 0 !important;
  padding: 2px 0 1px !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  font-size: 12px !important;
}

body.pos-mode .pos-payment-methods {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

body.pos-mode .pos-payment-methods button {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 6px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-payment-fields {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 2px !important;
}

body.pos-mode .pos-payment-fields input {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 9px !important;
  font-size: 12px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  display: grid !important;
  grid-template-columns: minmax(0, .95fr) minmax(0, .95fr) minmax(0, 1.18fr) !important;
  gap: 4px !important;
  align-self: end !important;
  margin-top: 0 !important;
}

body.pos-mode .pos-actions.pos-main-actions > .btn,
body.pos-mode .pos-actions.pos-main-actions > button {
  width: 100% !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 3px !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-align: center !important;
}

body.pos-mode .pos-message {
  max-height: 30px !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  overflow: auto !important;
}

/* POS right panel final compact spacing */
body.pos-mode .pos-cart.current-order-panel {
  grid-template-rows: 30px minmax(96px, 150px) minmax(0, 1fr) !important;
  gap: 3px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 96px !important;
  max-height: 150px !important;
}

body.pos-mode .pos-cart-head.current-order-header h2 {
  font-size: 13px !important;
}

body.pos-mode .pos-cart-head.current-order-header .btn {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 9px !important;
}

body.pos-mode .pos-cart-table th,
body.pos-mode .pos-cart-table td {
  font-size: 8.5px !important;
  padding: 4px 3px !important;
}

body.pos-mode .pos-cart-item-name,
body.pos-mode .pos-cart-qty-value {
  font-size: 8.5px !important;
}

body.pos-mode .pos-cart-qty-value {
  height: 18px !important;
  min-width: 20px !important;
  padding: 0 4px !important;
}

body.pos-mode .current-order-footer {
  gap: 2px !important;
  padding-top: 2px !important;
}

body.pos-mode .pos-payment-fields {
  gap: 0 !important;
  margin: 0 !important;
}

body.pos-mode .pos-payment-fields label {
  gap: 1px !important;
  margin: 0 !important;
}

body.pos-mode .pos-payment-fields small {
  font-size: 8px !important;
  margin: 0 !important;
}

body.pos-mode .pos-payment-fields input {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 8px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  margin-top: 0 !important;
  gap: 3px !important;
}

body.pos-mode .pos-actions.pos-main-actions > .btn,
body.pos-mode .pos-actions.pos-main-actions > button {
  height: 28px !important;
  min-height: 28px !important;
  font-size: 8.5px !important;
  padding: 0 2px !important;
}

/* POS ultra compact right panel */
body.pos-mode .pos-cart.current-order-panel {
  grid-template-rows: 26px minmax(115px, 175px) minmax(0, 1fr) !important;
  gap: 2px !important;
  padding: 6px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 115px !important;
  max-height: 175px !important;
}

body.pos-mode .pos-cart-head.current-order-header {
  height: 24px !important;
  min-height: 24px !important;
}

body.pos-mode .pos-cart-head.current-order-header h2 {
  font-size: 11px !important;
}

body.pos-mode .pos-cart-head.current-order-header .btn {
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 7px !important;
  font-size: 8px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-cart-table {
  min-width: 292px !important;
}

body.pos-mode .pos-cart-table th,
body.pos-mode .pos-cart-table td {
  font-size: 7.5px !important;
  padding: 3px 2px !important;
  line-height: 1.05 !important;
}

body.pos-mode .pos-cart-item-name,
body.pos-mode .pos-cart-qty-value {
  font-size: 7.5px !important;
  line-height: 1.05 !important;
}

body.pos-mode .pos-cart-qty-value {
  height: 16px !important;
  min-width: 18px !important;
  padding: 0 3px !important;
  border-radius: 5px !important;
}

body.pos-mode .pos-cart-table .pos-cart-remove {
  width: 17px !important;
  height: 17px !important;
  min-height: 17px !important;
  border-radius: 5px !important;
  font-size: 7px !important;
}

body.pos-mode .current-order-footer {
  gap: 1px !important;
  padding-top: 1px !important;
}

body.pos-mode .pos-cart-controls.pos-cart-controls-single {
  gap: 3px !important;
}

body.pos-mode .pos-cart-controls label,
body.pos-mode .pos-payment-fields small,
body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 7.5px !important;
}

body.pos-mode .pos-cart-controls input,
body.pos-mode .pos-cart-controls select {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 6px !important;
  font-size: 8.5px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-totals {
  gap: 0 6px !important;
  padding: 0 !important;
}

body.pos-mode .pos-totals span {
  min-height: 8px !important;
}

body.pos-mode .pos-totals .grand {
  min-height: 13px !important;
  padding: 1px 0 0 !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  font-size: 10px !important;
}

body.pos-mode .pos-payment-methods {
  gap: 3px !important;
}

body.pos-mode .pos-payment-methods button {
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 5px !important;
  font-size: 8px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-payment-fields input {
  height: 20px !important;
  min-height: 20px !important;
  padding: 0 6px !important;
  font-size: 8.5px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  gap: 2px !important;
}

body.pos-mode .pos-actions.pos-main-actions > .btn,
body.pos-mode .pos-actions.pos-main-actions > button {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 1px !important;
  font-size: 7.5px !important;
  border-radius: 7px !important;
}

/* POS action buttons: compact, not full-width */
body.pos-mode .pos-actions.pos-main-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  grid-template-columns: none !important;
}

body.pos-mode .pos-actions.pos-main-actions > .btn,
body.pos-mode .pos-actions.pos-main-actions > button {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 6px !important;
  font-size: 7.5px !important;
  line-height: 1 !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit] {
  width: auto !important;
  max-width: none !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-invoice] {
  width: auto !important;
  max-width: none !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  width: auto !important;
  max-width: none !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-invoice],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  min-width: 0 !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 5px !important;
  font-size: 9px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
  width: 100% !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-invoice],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  width: 100% !important;
  max-width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 4px !important;
  font-size: 8.5px !important;
  line-height: 1.1 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-align: center !important;
}

/* POS payment footer final fit: keep payment type, amount, and actions visible */
body.pos-mode .pos-cart.current-order-panel {
  grid-template-rows: 28px minmax(86px, 118px) minmax(0, 1fr) !important;
  gap: 3px !important;
  padding: 7px !important;
  overflow: hidden !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 86px !important;
  max-height: 118px !important;
}

body.pos-mode .current-order-footer {
  display: grid !important;
  gap: 3px !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  overflow: visible !important;
}

body.pos-mode .pos-payment-methods {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  margin: 0 !important;
}

body.pos-mode .pos-payment-methods button {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 6px !important;
  font-size: 9px !important;
  line-height: 1 !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-payment-fields {
  display: grid !important;
  gap: 2px !important;
  margin: 0 !important;
}

body.pos-mode .pos-payment-fields small {
  font-size: 8px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-payment-fields input {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
  width: 100% !important;
  margin-top: 2px !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-invoice],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  width: 100% !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 3px !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-align: center !important;
  border-radius: 7px !important;
}

/* POS action footer readability */
body.pos-mode .pos-cart.current-order-panel {
  grid-template-rows: 28px minmax(68px, 92px) minmax(0, 1fr) !important;
  padding: 6px !important;
  gap: 3px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 68px !important;
  max-height: 92px !important;
}

body.pos-mode .current-order-footer {
  gap: 3px !important;
  overflow: visible !important;
}

body.pos-mode .current-order-footer .pos-payment-methods:first-of-type {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.pos-mode .current-order-footer .pos-payment-methods:nth-of-type(2) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.pos-mode .pos-payment-methods button {
  height: 23px !important;
  min-height: 23px !important;
  padding: 0 5px !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-payment-fields input {
  height: 26px !important;
  min-height: 26px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  margin-top: 3px !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-invoice],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 5px !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  overflow: visible !important;
}

/* POS final action row: two clear buttons after removing Generate Bill */
body.pos-mode .pos-actions.pos-main-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  margin-top: -6px !important;
}

body.pos-mode .pos-payment-fields {
  margin-bottom: 0 !important;
}

/* POS compact payment controls: keep bottom actions fully visible */
body.pos-mode .pos-cart.current-order-panel {
  grid-template-rows: 28px minmax(58px, 82px) minmax(0, 1fr) !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 58px !important;
  max-height: 82px !important;
}

body.pos-mode .pos-payment-fields {
  gap: 1px !important;
}

body.pos-mode .pos-payment-fields small {
  font-size: 7px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-payment-fields input {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 8px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  margin-top: -2px !important;
  gap: 6px !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 6px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

/* POS remove empty band above final actions */
body.pos-mode .current-order-footer {
  align-self: start !important;
  align-content: start !important;
  justify-content: start !important;
  grid-auto-rows: max-content !important;
  row-gap: 2px !important;
}

body.pos-mode .pos-payment-fields {
  align-self: start !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.pos-mode .pos-payment-fields label {
  display: grid !important;
  gap: 1px !important;
  margin: 0 !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  align-self: start !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* POS right panel final balance: use full height, keep controls readable */
body.pos-mode .pos-cart.current-order-panel {
  display: grid !important;
  grid-template-rows: 28px minmax(0, 1fr) auto !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 0 !important;
  max-height: none !important;
  height: 100% !important;
  overflow-y: auto !important;
}

body.pos-mode .current-order-footer {
  align-self: end !important;
  width: 100% !important;
  row-gap: 3px !important;
}

body.pos-mode .pos-cart-table th,
body.pos-mode .pos-cart-table td {
  font-size: 8.5px !important;
  padding: 4px 3px !important;
}

body.pos-mode .pos-cart-item-name {
  font-size: 9px !important;
  line-height: 1.1 !important;
}

body.pos-mode .pos-cart-qty-value {
  height: 18px !important;
  min-width: 22px !important;
  font-size: 9px !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 8px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  font-size: 11px !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  height: 38px !important;
  min-height: 38px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

/* POS payment footer: balanced full-width controls */
body.pos-mode .current-order-footer {
  width: 100% !important;
  padding: 0 4px 4px !important;
  box-sizing: border-box !important;
}

body.pos-mode .pos-cart-controls.pos-cart-controls-single,
body.pos-mode .pos-totals,
body.pos-mode .pos-payment-fields,
body.pos-mode .pos-payment-methods,
body.pos-mode .pos-actions.pos-main-actions {
  width: 100% !important;
}

body.pos-mode .pos-cart-controls.pos-cart-controls-single,
body.pos-mode .pos-payment-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 8px !important;
}

body.pos-mode .pos-payment-fields label[data-pos-cash-field] {
  grid-column: 1 / -1 !important;
}

body.pos-mode .pos-cart-controls label,
body.pos-mode .pos-payment-fields small {
  font-size: 9px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-cart-controls input,
body.pos-mode .pos-cart-controls select,
body.pos-mode .pos-payment-fields input {
  height: 34px !important;
  min-height: 34px !important;
  font-size: 12px !important;
}

body.pos-mode .pos-totals {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 10px !important;
  row-gap: 2px !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 9.5px !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  font-size: 13px !important;
}

body.pos-mode .pos-payment-methods button {
  font-size: 10px !important;
  height: 28px !important;
  min-height: 28px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 8px !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  height: 40px !important;
  min-height: 40px !important;
  font-size: 13px !important;
  padding: 0 10px !important;
}

/* POS right payment summary polish */
body.pos-mode .pos-cart.current-order-panel {
  display: grid !important;
  grid-template-rows: 34px minmax(0, 1fr) auto !important;
  padding: 10px !important;
  gap: 8px !important;
  background: #FFFFFF !important;
}

body.pos-mode .pos-cart-head.current-order-header {
  height: 34px !important;
  min-height: 34px !important;
  align-items: center !important;
}

body.pos-mode .pos-cart-head.current-order-header h2 {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #111827 !important;
}

body.pos-mode .pos-cart-head.current-order-header .btn {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px !important;
  background: #F8FAFC !important;
}

body.pos-mode .pos-cart-empty {
  padding: 28px 12px !important;
  font-size: 12px !important;
}

body.pos-mode .current-order-footer {
  display: grid !important;
  gap: 8px !important;
  align-self: end !important;
  width: 100% !important;
  padding: 10px !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 14px !important;
  background: #F8FAFC !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .05) !important;
}

body.pos-mode .pos-cart-controls.pos-cart-controls-single {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}

body.pos-mode .pos-cart-controls label,
body.pos-mode .pos-payment-fields small {
  display: block !important;
  margin: 0 0 4px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  color: #334155 !important;
}

body.pos-mode .pos-cart-controls input,
body.pos-mode .pos-cart-controls select,
body.pos-mode .pos-payment-fields input {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
  background: #FFFFFF !important;
}

body.pos-mode .pos-totals {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px 10px !important;
  width: 100% !important;
  padding: 6px 0 !important;
  border-top: 1px solid #E5E7EB !important;
  border-bottom: 1px solid #E5E7EB !important;
}

body.pos-mode .pos-totals span {
  min-height: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body.pos-mode .pos-totals small {
  font-size: 10px !important;
  line-height: 1 !important;
  color: #64748B !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-totals strong {
  font-size: 10px !important;
  line-height: 1 !important;
  color: #0F172A !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-totals .grand {
  grid-column: 1 / -1 !important;
  min-height: 30px !important;
  padding: 7px 9px !important;
  margin: 2px 0 !important;
  border: 1px solid #BFDBFE !important;
  border-radius: 10px !important;
  background: #EFF6FF !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  font-size: 15px !important;
  color: #0F172A !important;
}

body.pos-mode .current-order-footer .pos-payment-methods:first-of-type {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: 100% !important;
}

body.pos-mode .current-order-footer .pos-payment-methods:nth-of-type(2) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: 100% !important;
}

body.pos-mode .pos-payment-methods button {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  border-radius: 9px !important;
}

body.pos-mode .pos-payment-fields {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  width: 100% !important;
}

body.pos-mode .pos-payment-fields label {
  margin: 0 !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: normal !important;
  text-align: center !important;
  border-radius: 10px !important;
}

/* POS current order table: show around 6 items before scrolling */
body.pos-mode .pos-cart.current-order-panel {
  grid-template-rows: 34px minmax(230px, 1fr) auto !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 230px !important;
  max-height: none !important;
  overflow-y: auto !important;
}

body.pos-mode .pos-cart-table th,
body.pos-mode .pos-cart-table td {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

body.pos-mode .pos-cart-table tr {
  min-height: 32px !important;
}

/* POS right card compact full-view layout */
body.pos-mode .pos-cart.current-order-panel {
  grid-template-rows: 30px minmax(130px, 1fr) auto !important;
  gap: 6px !important;
  padding: 8px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 130px !important;
  max-height: none !important;
}

body.pos-mode .current-order-footer {
  gap: 5px !important;
  padding: 7px !important;
  border-radius: 12px !important;
}

body.pos-mode .pos-cart-controls.pos-cart-controls-single {
  gap: 6px !important;
}

body.pos-mode .pos-cart-controls label,
body.pos-mode .pos-payment-fields small {
  font-size: 8px !important;
  margin-bottom: 3px !important;
}

body.pos-mode .pos-cart-controls input,
body.pos-mode .pos-cart-controls select,
body.pos-mode .pos-payment-fields input {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  font-size: 10px !important;
  border-radius: 8px !important;
}

body.pos-mode .pos-totals {
  gap: 2px 8px !important;
  padding: 4px 0 !important;
}

body.pos-mode .pos-totals span {
  min-height: 11px !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 8px !important;
}

body.pos-mode .pos-totals .grand {
  min-height: 24px !important;
  padding: 4px 8px !important;
  margin: 1px 0 !important;
  border-radius: 8px !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  font-size: 12px !important;
}

body.pos-mode .pos-payment-methods {
  gap: 5px !important;
}

body.pos-mode .pos-payment-methods button {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 6px !important;
  font-size: 9px !important;
  border-radius: 8px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  gap: 6px !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  border-radius: 9px !important;
}

/* POS current order rows: compact so more items fit */
body.pos-mode .pos-cart-table th {
  font-size: 7px !important;
  padding: 3px 4px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-cart-table td {
  font-size: 7.5px !important;
  padding: 3px 4px !important;
  line-height: 1.05 !important;
}

body.pos-mode .pos-cart-item-name {
  font-size: 7.5px !important;
  line-height: 1.05 !important;
  max-height: 18px !important;
  overflow: hidden !important;
}

body.pos-mode .pos-cart-qty-value {
  height: 16px !important;
  min-width: 20px !important;
  padding: 0 4px !important;
  font-size: 7.5px !important;
  border-radius: 5px !important;
}

body.pos-mode .pos-cart-table .pos-cart-remove {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  font-size: 7px !important;
  border-radius: 5px !important;
}

/* POS left table picker: show more tables before scrolling */
body.pos-mode .pos-table-list {
  max-height: 360px !important;
  min-height: 260px !important;
  overflow-y: auto !important;
}

body.pos-mode .pos-table {
  min-height: 31px !important;
  padding: 5px 8px !important;
  font-size: 11px !important;
}

.customer-items-cell {
  max-width: 220px;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}

.customer-items-cell small {
  display: block;
  margin-top: 2px;
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
}

.customer-date-cell strong,
.customer-date-cell small {
  display: block;
  white-space: nowrap;
}

.customer-date-cell strong {
  color: #0F172A;
  font-size: 13px;
}

.customer-date-cell small {
  margin-top: 2px;
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
}

.customer-actions-cell .btn,
body:not(.pos-mode) table .customer-actions-cell .btn {
  white-space: nowrap !important;
  min-width: 66px !important;
  height: 36px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  white-space: normal !important;
  text-align: center !important;
  overflow: visible !important;
  border-radius: 8px !important;
}

/* POS payment card size reduction */
body.pos-mode .current-order-footer {
  padding: 5px !important;
  gap: 3px !important;
  border-radius: 10px !important;
}

body.pos-mode .pos-cart-controls.pos-cart-controls-single {
  gap: 5px !important;
}

body.pos-mode .pos-cart-controls label,
body.pos-mode .pos-payment-fields small {
  font-size: 7px !important;
  margin-bottom: 2px !important;
}

body.pos-mode .pos-cart-controls input,
body.pos-mode .pos-cart-controls select,
body.pos-mode .pos-payment-fields input {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 7px !important;
  font-size: 9px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-totals {
  gap: 1px 7px !important;
  padding: 3px 0 !important;
}

body.pos-mode .pos-totals span {
  min-height: 9px !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 7px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-totals .grand {
  min-height: 21px !important;
  padding: 3px 7px !important;
  margin: 0 !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  font-size: 11px !important;
}

body.pos-mode .pos-payment-methods {
  gap: 4px !important;
}

body.pos-mode .pos-payment-methods button {
  height: 23px !important;
  min-height: 23px !important;
  padding: 0 5px !important;
  font-size: 8px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  gap: 5px !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 6px !important;
  font-size: 10px !important;
  border-radius: 8px !important;
}

/* POS use remaining height for Current Order list */
body.pos-mode .pos-cart.current-order-panel {
  grid-template-rows: 34px minmax(175px, 1fr) auto !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 175px !important;
  height: 100% !important;
}

/* POS bottom action buttons only: smaller */
body.pos-mode .pos-actions.pos-main-actions {
  grid-template-columns: repeat(2, max-content) !important;
  justify-content: center !important;
  gap: 8px !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  width: auto !important;
  min-width: 96px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 8.5px !important;
  line-height: 1 !important;
  border-radius: 7px !important;
}

/* Order page compact layout */
.order-page-ui {
  position: relative;
}

.order-page-ui .order-menu-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.order-page-ui .order-menu-toolbar .field {
  margin: 0;
}

.order-page-ui .order-menu-toolbar input {
  height: 44px;
}

.order-page-ui .order-menu-toolbar .chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.order-page-ui .order-main-content {
  gap: 16px;
}

.order-page-ui .order-details-card {
  gap: 14px 18px;
  padding: 18px;
  align-items: start;
}

.order-page-ui .order-details-card .field {
  margin: 0;
}

.order-page-ui .order-details-card input,
.order-page-ui .order-details-card select {
  height: 44px;
}

.order-page-ui .order-category-section {
  padding: 16px;
}

.order-page-ui .order-category-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.2;
}

.order-page-ui .order-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.order-page-ui .order-menu-product {
  min-height: 0;
  padding: 10px;
}

.order-page-ui .order-menu-product .menu-product-image {
  width: 100%;
  height: 104px;
  max-height: 104px;
  object-fit: cover;
  border-radius: 10px;
}

.order-page-ui .order-menu-product .menu-product-body {
  gap: 5px;
  padding-top: 8px;
}

.order-page-ui .order-menu-product h3 {
  display: -webkit-box;
  margin: 0;
  min-height: 34px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.2;
}

.order-page-ui .order-menu-product p {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
}

.order-page-ui .order-menu-product strong {
  font-size: 13px;
}

.order-page-ui .order-menu-product .badge {
  width: max-content;
  padding: 4px 9px;
  font-size: 11px;
}

.order-page-ui .order-menu-product .btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.order-page-ui .current-order-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden !important;
  padding: 18px;
}

.order-page-ui .current-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-page-ui .current-order-header h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.order-page-ui .current-order-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #EFF6FF;
  color: #2563EB;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.order-page-ui .current-order-items {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #2563EB #E5E7EB;
}

.order-page-ui .current-order-items::-webkit-scrollbar {
  width: 8px;
}

.order-page-ui .current-order-items::-webkit-scrollbar-track {
  background: #E5E7EB;
  border-radius: 999px;
}

.order-page-ui .current-order-items::-webkit-scrollbar-thumb {
  background: #2563EB;
  border-radius: 999px;
}

.order-page-ui .order-cart-empty {
  display: grid;
  min-height: 145px;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed #CBD5E1;
  border-radius: 14px;
  background: #F8FAFC;
  color: #64748B;
  text-align: center;
}

.order-page-ui .order-cart-empty[hidden] {
  display: none;
}

.order-page-ui .order-cart-line {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 12px;
  box-shadow: none;
}

.order-page-ui .order-cart-line-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.order-page-ui .order-cart-line-head strong {
  font-size: 14px;
  line-height: 1.25;
}

.order-page-ui .order-cart-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  border: 1px solid #FCA5A5;
  border-radius: 8px;
  background: #FEF2F2;
  color: #B91C1C;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.order-page-ui .order-cart-line .muted {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 5px 0 10px;
  font-size: 12px;
}

.order-page-ui .order-cart-line .field {
  margin: 0 0 8px;
}

.order-page-ui .order-cart-line input[type="number"] {
  height: 38px;
}

.order-page-ui .order-cart-line [data-modifiers] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.order-page-ui .order-cart-line [data-modifiers] label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
}

.order-page-ui .current-order-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #DBEAFE;
  border-radius: 14px;
  background: #F8FAFC;
}

.order-page-ui .current-order-summary span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-page-ui .current-order-summary small {
  color: #64748B;
  font-size: 12px;
  font-weight: 700;
}

.order-page-ui .current-order-summary strong {
  color: #0F172A;
  font-size: 13px;
}

.order-page-ui .current-order-summary .grand {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #DBEAFE;
}

.order-page-ui .current-order-summary .grand strong {
  font-size: 18px;
}

.order-page-ui .current-order-footer {
  flex: 0 0 auto;
  padding-top: 0;
}

.order-page-ui .current-order-footer .btn {
  height: 42px;
  border-radius: 10px;
}

.cafe-settings-page {
  display: block;
  width: 100%;
  padding: 22px;
}

.settings-page-head {
  margin-bottom: 16px;
}

.settings-page-head h2 {
  margin: 0;
  color: #0F172A;
  font-size: 22px;
  line-height: 1.15;
}

.settings-page-head p {
  margin: 5px 0 0;
  color: #64748B;
  font-size: 12px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 14px;
  align-items: start;
  width: 100%;
}

.cafe-settings-page .field {
  gap: 6px;
  margin: 0;
}

.cafe-settings-page label {
  color: #334155;
  font-size: 11px;
  font-weight: 600;
}

.cafe-settings-page input,
.cafe-settings-page select,
.cafe-settings-page .ts-control {
  min-height: 40px !important;
  height: 40px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

.cafe-settings-page textarea {
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  resize: vertical;
}

.settings-full-field {
  grid-column: 1 / -1;
}

.settings-currency-field {
  max-width: calc(50% - 12px);
}

.settings-textarea-small {
  min-height: 84px !important;
  max-height: 92px;
}

.settings-textarea-compact {
  min-height: 74px !important;
  max-height: 82px;
}

.settings-phone-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 6px;
}

.settings-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
}

.cafe-settings-page .logo-upload-preview {
  margin: 0;
}

.cafe-settings-page .settings-logo-preview {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: contain;
  background: #F8FAFC;
  border: 1px solid #D9E2EC;
}

.settings-logo-actions {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
}

.settings-file-input {
  display: none !important;
}

.cafe-settings-page .settings-file-trigger {
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
}

.settings-helper,
.settings-logo-actions small {
  display: block;
  margin-top: 1px;
  color: #64748B;
  font-size: 10px;
  line-height: 1.25;
}

.cafe-settings-page [data-currency-preview] {
  color: #0F172A;
  font-weight: 800;
}

.settings-action-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.settings-save-btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .settings-form-grid {
    grid-template-columns: 1fr;
  }

  .settings-currency-field {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .settings-phone-row {
    grid-template-columns: 1fr;
  }

  .settings-logo-row {
    align-items: flex-start;
  }
}

@media (min-width: 992px) {
  .order-page-ui {
    padding-right: 340px;
  }

  .order-page-ui .order-layout {
    display: block;
    padding-right: 0;
  }

  .order-page-ui .current-order-panel {
    position: fixed !important;
    top: 92px;
    right: 24px;
    bottom: 20px;
    z-index: 50;
    width: 310px;
    max-height: calc(100vh - 112px);
  }
}

@media (min-width: 1400px) {
  .order-page-ui {
    padding-right: 364px;
  }

  .order-page-ui .current-order-panel {
    width: 330px;
  }
}

@media (max-width: 991px) {
  .order-page-ui {
    padding-right: 0;
  }

  .order-page-ui .order-menu-toolbar {
    grid-template-columns: 1fr;
  }

  .order-page-ui .current-order-panel {
    position: static !important;
    width: auto;
    max-height: none;
    margin-top: 16px;
  }

  .order-page-ui .current-order-items {
    max-height: 55vh !important;
  }
}

@media (max-width: 768px) {
  .order-page-ui .order-details-card {
    grid-template-columns: 1fr;
  }

  .order-page-ui .order-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Public CafeCore pages, ledger, trial banner, and WhatsApp support */
html.public-document {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #64748B #E2E8F0;
  scroll-behavior: smooth;
}

.public-page {
  min-height: 100%;
  height: auto !important;
  background: var(--app-bg);
  color: #0F172A;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  scrollbar-width: auto;
  -ms-overflow-style: auto;
  scrollbar-color: #64748B #E2E8F0;
}

body.public-page {
  min-height: 100%;
  height: auto !important;
  margin: 0;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  scroll-behavior: smooth;
  scrollbar-width: auto;
  -ms-overflow-style: auto;
  scrollbar-color: #64748B #E2E8F0;
}

html.public-document::-webkit-scrollbar,
body.public-page::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
  display: block !important;
}

/* POS true final override after global background rules */
body.pos-mode .pos-search-add,
body.pos-mode [data-pos-search-add],
body.pos-mode .pos-keyboard-quantity,
body.pos-mode .pos-cart-qty button,
body.pos-mode [data-cart-minus],
body.pos-mode [data-cart-plus] {
  display: none !important;
}

body.pos-mode .pos-search-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  max-width: 442px !important;
  margin: 0 !important;
}

body.pos-mode .pos-search-bar label {
  flex: 0 0 100% !important;
  margin: 0 0 2px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-icon {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-search-bar input[data-pos-search] {
  flex: 0 0 340px !important;
  width: 340px !important;
  max-width: 340px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-qty,
body.pos-mode [data-pos-quick-qty] {
  display: inline-block !important;
  flex: 0 0 56px !important;
  width: 56px !important;
  max-width: 56px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 7px !important;
  border-radius: 7px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-summary-line {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  min-height: 36px !important;
  padding: 6px 10px !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-summary-line > strong,
body.pos-mode .pos-summary-line > span,
body.pos-mode .pos-summary-line > label {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-summary-control select[data-pos-discount-type] {
  width: 115px !important;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-summary-control input[data-pos-discount] {
  width: 82px !important;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-qty,
body.pos-mode .pos-cart-table .pos-cart-qty {
  display: inline-block !important;
}

body.pos-mode .pos-cart-qty-input,
body.pos-mode input[data-cart-quantity] {
  width: 42px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 5px !important;
  border-radius: 7px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow,
body.pos-mode .pos-payment-fields,
body.pos-mode .pos-actions.pos-main-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

body.pos-mode .pos-customer-details input,
body.pos-mode .pos-customer-details select,
body.pos-mode .pos-customer-details textarea,
body.pos-mode .pos-payment-workflow input,
body.pos-mode .pos-payment-workflow select {
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

/* Global authenticated header compact polish */
body:not(.auth-page):not(.login-page):not(.public-page) .topbar {
  min-height: 72px !important;
  padding: 9px 16px !important;
  margin-bottom: 16px !important;
  gap: 12px !important;
  border-radius: 16px !important;
  overflow: visible !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .topbar-heading {
  gap: 12px !important;
  align-items: center !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .topbar-logo {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  flex-basis: 40px !important;
  border-radius: 12px !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .topbar-logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .topbar-heading > div {
  gap: 0 !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .topbar-heading .eyebrow {
  margin: 0 !important;
  font-size: 10.5px !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .page-title {
  margin: 0 !important;
  font-size: 28px !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .topbar small {
  margin-top: 1px !important;
  font-size: 11.5px !important;
  line-height: 1.25 !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .topbar-actions {
  gap: 8px !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .user-pill {
  min-height: 50px !important;
  height: 50px !important;
  max-width: 155px !important;
  padding: 6px 12px 6px 6px !important;
  gap: 8px !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .user-pill > span {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  font-size: 13px !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .user-pill div {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body:not(.auth-page):not(.login-page):not(.public-page) .user-pill small {
  margin-top: 1px !important;
  font-size: 10.5px !important;
  line-height: 1.1 !important;
}

@media (max-width: 768px) {
  body:not(.auth-page):not(.login-page):not(.public-page) .topbar {
    min-height: auto !important;
    padding: 10px 12px !important;
  }

  body:not(.auth-page):not(.login-page):not(.public-page) .page-title {
    font-size: 24px !important;
  }

  body:not(.auth-page):not(.login-page):not(.public-page) .topbar-logo {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
}

/* POS customer/payment/table polish: compact rows and visible order table header */
body.pos-mode .pos-cashier-workspace {
  gap: 6px !important;
}

body.pos-mode .pos-cart.current-order-panel,
body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow {
  padding: 8px 10px !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  display: block !important;
  min-height: 0 !important;
  max-height: 200px !important;
  padding: 0 !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 8px !important;
  overflow: auto !important;
}

body.pos-mode .pos-cart-items.current-order-items:has(.pos-cart-empty) {
  border: 0 !important;
}

body.pos-mode .pos-cart-table {
  width: 100% !important;
  min-width: 1030px !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 0 !important;
}

body.pos-mode .pos-cart-table thead {
  display: table-header-group !important;
}

body.pos-mode .pos-cart-table tbody {
  display: table-row-group !important;
}

body.pos-mode .pos-cart-table th {
  position: sticky !important;
  top: 0 !important;
  z-index: 5 !important;
  height: 31px !important;
  padding: 6px 10px !important;
  color: #475569 !important;
  background: #F8FAFC !important;
  border-bottom: 1px solid #E2E8F0 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: left !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-cart-table td {
  height: 36px !important;
  padding: 5px 10px !important;
  color: #0F172A !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid #E2E8F0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  text-align: left !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

body.pos-mode .pos-cart-table th:nth-child(1),
body.pos-mode .pos-cart-table td:nth-child(1) { width: 220px !important; }
body.pos-mode .pos-cart-table th:nth-child(2),
body.pos-mode .pos-cart-table td:nth-child(2) { width: 150px !important; }
body.pos-mode .pos-cart-table th:nth-child(3),
body.pos-mode .pos-cart-table td:nth-child(3) { width: 100px !important; }
body.pos-mode .pos-cart-table th:nth-child(4),
body.pos-mode .pos-cart-table td:nth-child(4) { width: 100px !important; }
body.pos-mode .pos-cart-table th:nth-child(5),
body.pos-mode .pos-cart-table td:nth-child(5) { width: 75px !important; text-align: center !important; }
body.pos-mode .pos-cart-table th:nth-child(6),
body.pos-mode .pos-cart-table td:nth-child(6) { width: 110px !important; text-align: right !important; }
body.pos-mode .pos-cart-table th:nth-child(7),
body.pos-mode .pos-cart-table td:nth-child(7) { width: 100px !important; }
body.pos-mode .pos-cart-table th:nth-child(8),
body.pos-mode .pos-cart-table td:nth-child(8) { width: 85px !important; text-align: center !important; }

body.pos-mode .pos-cart-qty-input,
body.pos-mode input[data-cart-quantity] {
  width: 42px !important;
  height: 28px !important;
  min-height: 28px !important;
}

body.pos-mode .pos-summary-line {
  margin-top: 6px !important;
  margin-bottom: 0 !important;
}

@media (min-width: 1200px) {
  body.pos-mode .pos-customer-details {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 62px !important;
    max-height: 68px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.pos-mode .pos-customer-details .field {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
  }

  body.pos-mode .pos-customer-details [data-pos-customer-name] {
    width: 190px !important;
  }

  body.pos-mode .pos-customer-details [data-pos-customer-phone] {
    width: 150px !important;
  }

  body.pos-mode .pos-customer-details [data-pos-type] {
    width: 145px !important;
  }

  body.pos-mode .pos-customer-details [data-pos-table-list] {
    display: flex !important;
    flex: 0 0 190px !important;
    width: 190px !important;
    max-width: 190px !important;
    max-height: 34px !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.pos-mode .pos-customer-details .pos-table {
    flex: 0 0 116px !important;
    width: 116px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 3px 7px !important;
  }

  body.pos-mode .pos-customer-details [data-pos-delivery-address] {
    width: 220px !important;
  }

  body.pos-mode .pos-payment-workflow {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    min-height: 62px !important;
    max-height: 68px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.pos-mode .pos-payment-methods,
  body.pos-mode .pos-payment-fields,
  body.pos-mode .pos-actions.pos-main-actions {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
  }

  body.pos-mode .pos-payment-methods select[data-pos-payment-type-select] {
    width: 160px !important;
  }

  body.pos-mode .pos-payment-methods select[data-pos-payment-method-select] {
    width: 150px !important;
  }

  body.pos-mode .pos-payment-fields input[data-pos-cash-received] {
    width: 120px !important;
  }

  body.pos-mode .pos-actions.pos-main-actions [data-pos-submit] {
    width: 128px !important;
    min-width: 128px !important;
  }

  body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
    width: 135px !important;
    min-width: 135px !important;
  }
}

/* POS customer row final compact alignment */
body.pos-mode .pos-cart-items.current-order-items {
  max-height: 270px !important;
  min-height: 150px !important;
}

body.pos-mode .pos-customer-details {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 7px 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

body.pos-mode .pos-customer-details .field {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.pos-mode .pos-customer-details label {
  margin: 0 0 2px !important;
  font-size: 9px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-customer-details input,
body.pos-mode .pos-customer-details select,
body.pos-mode .pos-customer-details textarea {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 7px !important;
  font-size: 10.5px !important;
}

body.pos-mode .pos-customer-details [data-pos-customer-name] {
  width: 175px !important;
}

body.pos-mode .pos-customer-details [data-pos-customer-phone] {
  width: 128px !important;
}

body.pos-mode .pos-customer-details [data-pos-type] {
  width: 118px !important;
}

body.pos-mode .pos-customer-details [data-pos-table-list] {
  width: 210px !important;
  max-height: 36px !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 5px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

body.pos-mode .pos-customer-details .pos-table {
  flex: 0 0 104px !important;
  width: 104px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-customer-details .pos-table strong,
body.pos-mode .pos-customer-details .pos-table small {
  font-size: 10px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-customer-details [data-pos-delivery-address] {
  width: 180px !important;
}

/* POS final override placed last: small search qty, no add button, no +/- table qty */
body.pos-mode .pos-search-add,
body.pos-mode [data-pos-search-add],
body.pos-mode .pos-keyboard-quantity,
body.pos-mode .pos-cart-qty button,
body.pos-mode [data-cart-minus],
body.pos-mode [data-cart-plus] {
  display: none !important;
}

body.pos-mode .pos-search-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  max-width: 442px !important;
  margin: 0 !important;
}

body.pos-mode .pos-search-bar label {
  flex: 0 0 100% !important;
  margin: 0 0 2px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-icon {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-search-bar input[data-pos-search] {
  flex: 0 0 340px !important;
  width: 340px !important;
  max-width: 340px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-qty,
body.pos-mode [data-pos-quick-qty] {
  display: inline-block !important;
  flex: 0 0 56px !important;
  width: 56px !important;
  max-width: 56px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 7px !important;
  border-radius: 7px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-summary-line {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  min-height: 36px !important;
  padding: 6px 10px !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-summary-line > strong,
body.pos-mode .pos-summary-line > span,
body.pos-mode .pos-summary-line > label {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-summary-control select[data-pos-discount-type] {
  width: 115px !important;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-summary-control input[data-pos-discount] {
  width: 82px !important;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-qty,
body.pos-mode .pos-cart-table .pos-cart-qty {
  display: inline-block !important;
}

body.pos-mode .pos-cart-qty-input,
body.pos-mode input[data-cart-quantity] {
  width: 42px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 5px !important;
  border-radius: 7px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow,
body.pos-mode .pos-payment-fields,
body.pos-mode .pos-actions.pos-main-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

body.pos-mode .pos-customer-details input,
body.pos-mode .pos-customer-details select,
body.pos-mode .pos-customer-details textarea,
body.pos-mode .pos-payment-workflow input,
body.pos-mode .pos-payment-workflow select {
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

/* POS final compact cashier layout: search qty, single-line summary, tight rows */
body.pos-mode .pos-search-add,
body.pos-mode [data-pos-search-add],
body.pos-mode .pos-keyboard-quantity,
body.pos-mode .pos-cart-qty button,
body.pos-mode [data-cart-minus],
body.pos-mode [data-cart-plus] {
  display: none !important;
}

body.pos-mode .pos-search-qty,
body.pos-mode [data-pos-quick-qty] {
  display: inline-block !important;
  flex: 0 0 56px !important;
  width: 56px !important;
  max-width: 56px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 7px !important;
  border-radius: 7px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-bar {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  max-width: 450px !important;
  margin: 0 !important;
}

body.pos-mode .pos-search-bar label {
  flex: 0 0 100% !important;
  margin: 0 0 2px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-icon {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-search-bar input[data-pos-search] {
  flex: 0 0 340px !important;
  width: 340px !important;
  max-width: 340px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-cashier-workspace {
  gap: 6px !important;
  padding: 8px !important;
}

body.pos-mode .pos-cart.current-order-panel,
body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow {
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 8px !important;
}

body.pos-mode .pos-summary-line {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 6px 10px !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-summary-line > strong {
  flex: 0 0 auto !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-summary-line > span,
body.pos-mode .pos-summary-line > label {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-summary-line b {
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-summary-line > span:last-child b {
  font-size: 12px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-summary-control small {
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-summary-control select[data-pos-discount-type] {
  width: 115px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 8px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-summary-control input[data-pos-discount] {
  width: 82px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 8px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  max-height: 205px !important;
  min-height: 0 !important;
  padding: 0 !important;
}

body.pos-mode .pos-cart-table {
  min-width: 760px !important;
}

body.pos-mode .pos-cart-table th {
  height: 30px !important;
  padding: 4px 6px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-cart-table td {
  height: 34px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-qty,
body.pos-mode .pos-cart-table .pos-cart-qty {
  display: inline-block !important;
}

body.pos-mode .pos-cart-qty-input,
body.pos-mode input[data-cart-quantity] {
  width: 42px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 5px !important;
  border-radius: 7px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow,
body.pos-mode .pos-payment-fields,
body.pos-mode .pos-actions.pos-main-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

body.pos-mode .pos-customer-details .field,
body.pos-mode .pos-payment-methods,
body.pos-mode .pos-payment-fields,
body.pos-mode .pos-actions.pos-main-actions {
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
}

body.pos-mode .pos-customer-details label,
body.pos-mode .pos-payment-methods label > span,
body.pos-mode .pos-payment-fields small,
body.pos-mode .pos-cart label {
  margin-bottom: 3px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
}

body.pos-mode .pos-customer-details input,
body.pos-mode .pos-customer-details select,
body.pos-mode .pos-customer-details textarea,
body.pos-mode .pos-payment-workflow input,
body.pos-mode .pos-payment-workflow select {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 8px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-customer-details [data-pos-customer-name] { width: 200px !important; }
body.pos-mode .pos-customer-details [data-pos-customer-phone] { width: 160px !important; }
body.pos-mode .pos-customer-details [data-pos-type] { width: 145px !important; }
body.pos-mode .pos-customer-details [data-pos-table-list] {
  width: 190px !important;
  max-height: 82px !important;
}
body.pos-mode .pos-customer-details [data-pos-delivery-address] { width: 220px !important; }

body.pos-mode .pos-payment-methods select[data-pos-payment-type-select] { width: 150px !important; }
body.pos-mode .pos-payment-methods select[data-pos-payment-method-select] { width: 150px !important; }
body.pos-mode .pos-payment-fields input[data-pos-cash-received] { width: 120px !important; }
body.pos-mode .pos-payment-fields input[data-pos-reference] { width: 110px !important; }

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  width: 132px !important;
  min-width: 132px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  body.pos-mode .pos-search-bar {
    max-width: 100% !important;
  }

  body.pos-mode .pos-search-bar input[data-pos-search] {
    flex: 1 1 220px !important;
    width: auto !important;
    max-width: none !important;
  }

  body.pos-mode .pos-summary-line {
    flex-wrap: wrap !important;
  }
}

/* POS quantity/discount cleanup: no top quantity or add button, compact fields */
body.pos-mode .pos-search-qty,
body.pos-mode .pos-search-add,
body.pos-mode [data-pos-quick-qty],
body.pos-mode [data-pos-search-add],
body.pos-mode .pos-keyboard-quantity {
  display: none !important;
}

body.pos-mode .pos-cashier-workspace {
  gap: 8px !important;
  padding: 8px !important;
}

body.pos-mode .pos-search-bar {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: auto !important;
  max-width: 430px !important;
  margin: 0 !important;
}

body.pos-mode .pos-search-bar label {
  flex: 0 0 100% !important;
  margin: 0 0 3px !important;
  color: #334155 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: .025em !important;
  text-transform: uppercase !important;
}

body.pos-mode .pos-search-icon {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 7px !important;
  font-size: 14px !important;
}

body.pos-mode .pos-search-bar input[data-pos-search] {
  flex: 0 0 360px !important;
  width: 360px !important;
  max-width: 360px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-result-header[hidden],
body.pos-mode [data-pos-result-header][hidden] {
  display: none !important;
}

body.pos-mode .pos-products:empty {
  display: none !important;
}

body.pos-mode .pos-products {
  max-height: 120px !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow-y: auto !important;
}

body.pos-mode .pos-empty[hidden] {
  display: none !important;
}

body.pos-mode .pos-empty {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  border: 0 !important;
  color: #64748B !important;
  background: transparent !important;
  font-size: 10px !important;
  box-shadow: none !important;
}

body.pos-mode .pos-cart.current-order-panel,
body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow {
  height: auto !important;
  min-height: unset !important;
  margin: 0 !important;
  padding: 10px !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05) !important;
}

body.pos-mode .pos-cart.current-order-panel {
  gap: 8px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  max-height: 210px !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
}

body.pos-mode .pos-cart-table {
  min-width: 820px !important;
  table-layout: fixed !important;
}

body.pos-mode .pos-cart-table th {
  height: 30px !important;
  padding: 4px 6px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-cart-table td {
  height: 36px !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-cart-qty {
  display: inline-grid !important;
  grid-template-columns: 24px 38px 24px !important;
  gap: 3px !important;
  align-items: center !important;
}

body.pos-mode .pos-cart-qty button {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-qty input {
  width: 38px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 4px !important;
  border-radius: 7px !important;
  text-align: center !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-remove {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  border-radius: 7px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-summary-line,
body.pos-mode .pos-cart-controls-single,
body.pos-mode .pos-totals,
body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow,
body.pos-mode .pos-payment-fields,
body.pos-mode .pos-actions.pos-main-actions {
  justify-content: flex-start !important;
  align-items: flex-end !important;
  gap: 8px !important;
}

body.pos-mode .pos-cart-controls-single {
  display: flex !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
}

body.pos-mode .pos-cart-controls-single .field {
  width: auto !important;
  margin: 0 !important;
}

body.pos-mode .pos-cart-controls-single select[data-pos-discount-type] {
  width: 140px !important;
}

body.pos-mode .pos-cart-controls-single input[data-pos-discount] {
  width: 105px !important;
}

body.pos-mode .pos-summary-line {
  min-height: 34px !important;
  margin: 0 !important;
  padding: 6px 8px !important;
}

body.pos-mode .pos-summary-line strong,
body.pos-mode .pos-summary-line span,
body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 11px !important;
  line-height: 1.15 !important;
}

body.pos-mode .pos-summary-line span:last-child b {
  font-size: 13px !important;
  font-weight: 900 !important;
}

body.pos-mode .pos-customer-details {
  display: flex !important;
  flex-wrap: wrap !important;
}

body.pos-mode .pos-customer-details .field,
body.pos-mode .pos-payment-methods,
body.pos-mode .pos-payment-fields,
body.pos-mode .pos-actions.pos-main-actions {
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
}

body.pos-mode .pos-customer-details label,
body.pos-mode .pos-payment-methods label > span,
body.pos-mode .pos-payment-fields small,
body.pos-mode .pos-cart label {
  margin-bottom: 3px !important;
  color: #334155 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

body.pos-mode .pos-customer-details input,
body.pos-mode .pos-customer-details select,
body.pos-mode .pos-customer-details textarea,
body.pos-mode .pos-cart input,
body.pos-mode .pos-cart select,
body.pos-mode .pos-payment-workflow input,
body.pos-mode .pos-payment-workflow select {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 9px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-customer-details [data-pos-customer-name] { width: 200px !important; }
body.pos-mode .pos-customer-details [data-pos-customer-phone] { width: 150px !important; }
body.pos-mode .pos-customer-details [data-pos-type] { width: 150px !important; }
body.pos-mode .pos-customer-details [data-pos-table-list] {
  width: 180px !important;
  max-height: 84px !important;
}
body.pos-mode .pos-customer-details [data-pos-delivery-address] { width: 220px !important; }

body.pos-mode .pos-payment-workflow {
  display: flex !important;
  flex-wrap: wrap !important;
}

body.pos-mode .pos-payment-methods select[data-pos-payment-type-select] { width: 150px !important; }
body.pos-mode .pos-payment-methods select[data-pos-payment-method-select] { width: 150px !important; }
body.pos-mode .pos-payment-fields input[data-pos-cash-received] { width: 115px !important; }
body.pos-mode .pos-payment-fields input[data-pos-reference] { width: 105px !important; }

body.pos-mode .pos-actions.pos-main-actions {
  display: flex !important;
  flex-wrap: wrap !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  flex: 0 0 auto !important;
  width: 130px !important;
  min-width: 130px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  body.pos-mode .pos-search-bar {
    max-width: 100% !important;
  }

  body.pos-mode .pos-search-bar input[data-pos-search] {
    flex: 1 1 220px !important;
    width: auto !important;
    max-width: none !important;
  }

  body.pos-mode .pos-customer-details .field,
  body.pos-mode .pos-customer-details [data-pos-customer-name],
  body.pos-mode .pos-customer-details [data-pos-customer-phone],
  body.pos-mode .pos-customer-details [data-pos-type],
  body.pos-mode .pos-customer-details [data-pos-table-list],
  body.pos-mode .pos-customer-details [data-pos-delivery-address],
  body.pos-mode .pos-payment-methods,
  body.pos-mode .pos-payment-methods select[data-pos-payment-type-select],
  body.pos-mode .pos-payment-methods select[data-pos-payment-method-select],
  body.pos-mode .pos-payment-fields input[data-pos-cash-received],
  body.pos-mode .pos-payment-fields input[data-pos-reference] {
    width: 100% !important;
  }
}

/* POS compact products + wider readable Current Order */
body.pos-mode .pos-layout {
  grid-template-columns: 200px minmax(0, 1.4fr) minmax(400px, 1fr) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

body.pos-mode .pos-center {
  min-width: 0 !important;
  overflow: hidden !important;
}

body.pos-mode .pos-search-bar {
  width: 100% !important;
}

body.pos-mode .pos-search-bar input {
  width: 100% !important;
}

body.pos-mode .pos-products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, 130px) !important;
  justify-content: flex-start !important;
  align-content: flex-start !important;
  gap: 10px !important;
  padding: 10px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.pos-mode .pos-product {
  width: 130px !important;
  min-width: 130px !important;
  max-width: 130px !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 9px !important;
  gap: 6px !important;
  border-radius: 12px !important;
}

body.pos-mode .pos-product img {
  width: 100% !important;
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}

body.pos-mode .pos-product .badge {
  align-self: flex-start !important;
  min-height: 22px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-product strong {
  min-height: 31px !important;
  color: #0F172A !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}

body.pos-mode .pos-product small {
  color: #64748B !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-product b {
  color: #0F172A !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

body.pos-mode .pos-cart.current-order-panel {
  display: grid !important;
  grid-template-rows: auto minmax(220px, 1fr) auto !important;
  min-width: 400px !important;
  max-width: 460px !important;
  padding: 18px !important;
  gap: 14px !important;
  overflow: hidden !important;
}

body.pos-mode .pos-cart-head {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

body.pos-mode .pos-cart-head h2 {
  margin: 0 !important;
  color: #0F172A !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

body.pos-mode .pos-cart-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 26px !important;
  padding: 5px 10px !important;
  margin-left: auto !important;
  border-radius: 999px !important;
  background: #EFF6FF !important;
  color: #2563EB !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-cart-head [data-pos-clear] {
  margin-left: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 220px !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 6px !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
}

body.pos-mode .pos-cart-items.current-order-items::-webkit-scrollbar {
  width: 7px !important;
}

body.pos-mode .pos-cart-items.current-order-items::-webkit-scrollbar-track {
  background: #F1F5F9 !important;
  border-radius: 999px !important;
}

body.pos-mode .pos-cart-items.current-order-items::-webkit-scrollbar-thumb {
  background: #94A3B8 !important;
  border-radius: 999px !important;
}

body.pos-mode .pos-cart-items.current-order-items::-webkit-scrollbar-thumb:hover {
  background: #64748B !important;
}

body.pos-mode .pos-cart-empty {
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 8px !important;
  min-height: 100% !important;
  padding: 28px 18px !important;
  color: #64748B !important;
  font-size: 14px !important;
  text-align: center !important;
}

body.pos-mode .pos-cart-empty strong {
  color: #475569 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-cart-empty small {
  color: #64748B !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-cart-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

body.pos-mode .pos-cart-table th,
body.pos-mode .pos-cart-table td {
  padding: 10px 8px !important;
  border-bottom: 1px solid #E2E8F0 !important;
  vertical-align: middle !important;
  text-align: left !important;
}

body.pos-mode .pos-cart-table th {
  color: #475569 !important;
  background: #F8FAFC !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
}

body.pos-mode .pos-cart-table th:nth-child(1),
body.pos-mode .pos-cart-table td:nth-child(1) {
  width: 36% !important;
}

body.pos-mode .pos-cart-table th:nth-child(2),
body.pos-mode .pos-cart-table td:nth-child(2) {
  width: 20% !important;
}

body.pos-mode .pos-cart-table th:nth-child(3),
body.pos-mode .pos-cart-table td:nth-child(3) {
  width: 13% !important;
  text-align: center !important;
}

body.pos-mode .pos-cart-table th:nth-child(4),
body.pos-mode .pos-cart-table td:nth-child(4) {
  width: 22% !important;
  text-align: right !important;
}

body.pos-mode .pos-cart-table th:nth-child(5),
body.pos-mode .pos-cart-table td:nth-child(5) {
  width: 9% !important;
  text-align: right !important;
}

body.pos-mode .pos-cart-line {
  padding: 0 !important;
  display: table-row !important;
}

body.pos-mode .pos-cart-item-name {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: #0F172A !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}

body.pos-mode .pos-cart-table td {
  color: #334155 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-cart-qty-value {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  height: 32px !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  background: #FFFFFF !important;
  color: #0F172A !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-cart-remove {
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  font-size: 0 !important;
}

body.pos-mode .pos-cart-remove::before {
  content: "×" !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

body.pos-mode .current-order-footer {
  display: grid !important;
  gap: 12px !important;
  padding-top: 0 !important;
  overflow: visible !important;
}

body.pos-mode .pos-cart-controls-single {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
}

body.pos-mode .pos-cart-controls-single label,
body.pos-mode .pos-payment-fields small {
  color: #475569 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-cart-controls-single input,
body.pos-mode .pos-cart-controls-single select,
body.pos-mode .pos-payment-fields input {
  height: 40px !important;
  min-height: 40px !important;
  font-size: 14px !important;
}

body.pos-mode .pos-totals {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px 14px !important;
  padding: 0 !important;
}

body.pos-mode .pos-totals span {
  min-height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

body.pos-mode .pos-totals small {
  color: #64748B !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

body.pos-mode .pos-totals strong {
  color: #0F172A !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

body.pos-mode .pos-totals .grand {
  grid-column: 1 / -1 !important;
  min-height: 42px !important;
  margin-top: 4px !important;
  padding-top: 10px !important;
  border-top: 1px solid #CBD5E1 !important;
}

body.pos-mode .pos-totals .grand small,
body.pos-mode .pos-totals .grand strong {
  color: #0F172A !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

body.pos-mode .pos-payment-methods {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.pos-mode .pos-payment-methods button {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 10px !important;
}

body.pos-mode .pos-actions .btn,
body.pos-mode .pos-actions button {
  width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

@media (max-width: 1180px) {
  body.pos-mode .pos-layout {
    grid-template-columns: 190px minmax(0, 1.15fr) minmax(390px, .95fr) !important;
  }
}

@media (max-width: 980px) {
  body.pos-mode .pos-layout {
    grid-template-columns: 1fr !important;
  }

  body.pos-mode .pos-cart.current-order-panel {
    min-width: 0 !important;
    max-width: none !important;
  }

  body.pos-mode .pos-products {
    grid-template-columns: repeat(auto-fill, 130px) !important;
  }
}

/* POS cashier table workflow */
body.pos-mode .pos-shell {
  height: calc(100vh - 86px) !important;
  max-height: calc(100vh - 86px) !important;
  padding: 8px !important;
  overflow: hidden !important;
}

body.pos-mode .pos-layout.pos-cashier-layout {
  display: block !important;
  height: 100% !important;
  min-height: 0 !important;
}

body.pos-mode .pos-cashier-workspace {
  display: grid !important;
  grid-template-rows: auto auto minmax(190px, 1fr) auto auto auto !important;
  gap: 8px !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 12px !important;
  overflow: hidden !important;
}

body.pos-mode .pos-search-bar {
  display: grid !important;
  gap: 5px !important;
}

body.pos-mode .pos-search-bar label {
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
}

body.pos-mode .pos-search-bar input {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}

body.pos-mode .pos-keyboard-quantity {
  display: none !important;
}

body.pos-mode .pos-products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
  max-height: 92px !important;
  min-height: 0 !important;
  gap: 8px !important;
  padding: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border: 0 !important;
  background: transparent !important;
}

body.pos-mode .pos-products:empty {
  display: none !important;
}

body.pos-mode .pos-product {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "name price"
    "meta badge" !important;
  align-items: center !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 42px !important;
  padding: 8px 10px !important;
  gap: 2px 8px !important;
  border: 1px solid #DDE6F2 !important;
  border-radius: 10px !important;
  background: #FFFFFF !important;
  text-align: left !important;
}

body.pos-mode .pos-product img {
  display: none !important;
}

body.pos-mode .pos-product strong {
  grid-area: name !important;
  min-height: 0 !important;
  color: #0F172A !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: block !important;
}

body.pos-mode .pos-product small {
  grid-area: meta !important;
  color: #64748B !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-product b {
  grid-area: price !important;
  color: #0F172A !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-product .badge {
  grid-area: badge !important;
  justify-self: end !important;
  min-height: 20px !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-empty {
  min-height: 38px !important;
  padding: 8px 10px !important;
  border: 1px dashed #CBD5E1 !important;
  border-radius: 10px !important;
  color: #64748B !important;
  font-size: 13px !important;
  display: grid !important;
  place-items: center !important;
}

body.pos-mode .pos-cart.current-order-panel {
  display: grid !important;
  grid-template-rows: auto minmax(150px, 1fr) auto !important;
  min-width: 0 !important;
  max-width: none !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  gap: 8px !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.pos-mode .pos-cart-head {
  min-height: 34px !important;
}

body.pos-mode .pos-cart-head h2 {
  font-size: 16px !important;
  font-weight: 900 !important;
}

body.pos-mode .pos-cart-count {
  min-height: 22px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-head [data-pos-clear] {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 150px !important;
  max-height: none !important;
  padding: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border: 1px solid #DDE6F2 !important;
  border-radius: 12px !important;
}

body.pos-mode .pos-cart-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

body.pos-mode .pos-cart-table th,
body.pos-mode .pos-cart-table td {
  height: 42px !important;
  padding: 7px 9px !important;
  border-bottom: 1px solid #E2E8F0 !important;
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  vertical-align: middle !important;
}

body.pos-mode .pos-cart-table th {
  height: 34px !important;
  background: #F8FAFC !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .03em !important;
  text-transform: uppercase !important;
}

body.pos-mode .pos-cart-table th:nth-child(1),
body.pos-mode .pos-cart-table td:nth-child(1) { width: 28% !important; }
body.pos-mode .pos-cart-table th:nth-child(2),
body.pos-mode .pos-cart-table td:nth-child(2) { width: 18% !important; }
body.pos-mode .pos-cart-table th:nth-child(3),
body.pos-mode .pos-cart-table td:nth-child(3) { width: 15% !important; }
body.pos-mode .pos-cart-table th:nth-child(4),
body.pos-mode .pos-cart-table td:nth-child(4) { width: 17% !important; }
body.pos-mode .pos-cart-table th:nth-child(5),
body.pos-mode .pos-cart-table td:nth-child(5) { width: 15% !important; text-align: right !important; }
body.pos-mode .pos-cart-table th:nth-child(6),
body.pos-mode .pos-cart-table td:nth-child(6) { width: 7% !important; text-align: center !important; }

body.pos-mode .pos-cart-item-name {
  display: block !important;
  overflow: hidden !important;
  color: #0F172A !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-cart-qty {
  display: inline-grid !important;
  grid-template-columns: 28px 50px 28px !important;
  gap: 4px !important;
  align-items: center !important;
}

body.pos-mode .pos-cart-qty button,
body.pos-mode .pos-cart-remove {
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  background: #FFFFFF !important;
  color: #0F172A !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

body.pos-mode .pos-cart-qty input {
  width: 50px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 6px !important;
  text-align: center !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.pos-mode .pos-cart-remove {
  color: #DC2626 !important;
  font-size: 0 !important;
}

body.pos-mode .pos-cart-remove::before {
  content: "×" !important;
  font-size: 16px !important;
}

body.pos-mode .current-order-footer {
  display: grid !important;
  gap: 8px !important;
}

body.pos-mode .pos-summary-line {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 18px !important;
  min-height: 42px !important;
  padding: 9px 12px !important;
  border: 1px solid #DDE6F2 !important;
  border-radius: 12px !important;
  background: #F8FAFC !important;
}

body.pos-mode .pos-summary-line strong {
  color: #0F172A !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: .03em !important;
  text-transform: uppercase !important;
}

body.pos-mode .pos-summary-line span {
  color: #64748B !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-summary-line b {
  color: #0F172A !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

body.pos-mode .pos-summary-line span:last-child b {
  color: #0F172A !important;
  font-size: 18px !important;
}

body.pos-mode .pos-cart-controls-single,
body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-fields {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap: 8px !important;
}

body.pos-mode .pos-customer-details {
  padding: 10px !important;
  border: 1px solid #DDE6F2 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

body.pos-mode .pos-customer-details .field,
body.pos-mode .pos-cart-controls-single .field {
  margin: 0 !important;
}

body.pos-mode .pos-left label,
body.pos-mode .pos-cart label,
body.pos-mode .pos-payment-fields small {
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .025em !important;
}

body.pos-mode .pos-left input,
body.pos-mode .pos-left select,
body.pos-mode .pos-left textarea,
body.pos-mode .pos-cart input,
body.pos-mode .pos-cart select,
body.pos-mode .pos-payment-fields input {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 10px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
}

body.pos-mode .pos-left textarea {
  padding: 8px 10px !important;
  min-height: 36px !important;
  height: 36px !important;
}

body.pos-mode .pos-table-list {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

body.pos-mode .pos-table {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 86px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 4px 8px !important;
  gap: 4px !important;
}

body.pos-mode .pos-table strong,
body.pos-mode .pos-table small {
  font-size: 11px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-totals {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px 12px !important;
  padding: 0 !important;
}

body.pos-mode .pos-totals span {
  min-height: 22px !important;
  display: flex !important;
  justify-content: space-between !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 12px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-payment-workflow {
  display: grid !important;
  grid-template-columns: minmax(240px, auto) minmax(170px, auto) minmax(300px, 1fr) auto !important;
  gap: 8px !important;
  align-items: end !important;
  padding: 10px !important;
  border: 1px solid #DDE6F2 !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
}

body.pos-mode .pos-payment-methods {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(72px, 1fr)) !important;
  gap: 6px !important;
}

body.pos-mode .pos-payment-methods:nth-of-type(2) {
  grid-template-columns: repeat(2, minmax(72px, 1fr)) !important;
}

body.pos-mode .pos-payment-methods > span {
  grid-column: 1 / -1 !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .025em !important;
}

body.pos-mode .pos-payment-methods button {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 10px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(140px, 1fr)) !important;
  gap: 8px !important;
}

body.pos-mode .pos-actions .btn,
body.pos-mode .pos-actions button {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border-radius: 9px !important;
  background: #2563EB !important;
  border-color: #2563EB !important;
  color: #FFFFFF !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-message {
  grid-column: 1 / -1 !important;
  min-height: 30px !important;
  padding: 7px 10px !important;
  font-size: 13px !important;
}

@media (max-width: 1180px) {
  body.pos-mode .pos-payment-workflow {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 760px) {
  body.pos-mode .pos-shell {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.pos-mode .pos-cashier-workspace,
  body.pos-mode .pos-payment-workflow {
    grid-template-columns: 1fr !important;
  }

  body.pos-mode .pos-cart-table {
    min-width: 760px !important;
  }

  body.pos-mode .pos-cart-items.current-order-items {
    overflow-x: auto !important;
  }
}

/* POS payment dropdown/readability refinements */
body.pos-mode .pos-product img,
body.pos-mode .pos-cart-table img,
body.pos-mode [data-pos-products] img,
body.pos-mode [data-pos-cart] img {
  display: none !important;
}

body.pos-mode .pos-products {
  max-height: 180px !important;
  grid-template-columns: 1fr !important;
}

body.pos-mode .pos-product {
  grid-template-columns: minmax(220px, 1.2fr) minmax(130px, .8fr) minmax(90px, auto) minmax(90px, auto) !important;
  grid-template-areas: "name meta price badge" !important;
  min-height: 44px !important;
  padding: 9px 12px !important;
}

body.pos-mode .pos-product strong,
body.pos-mode .pos-product small,
body.pos-mode .pos-product b {
  font-size: 14px !important;
}

body.pos-mode .pos-product .badge {
  font-size: 12px !important;
}

body.pos-mode .pos-payment-methods {
  display: block !important;
}

body.pos-mode .pos-payment-methods label {
  display: grid !important;
  gap: 6px !important;
}

body.pos-mode .pos-payment-methods label > span,
body.pos-mode .pos-payment-fields small {
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

body.pos-mode .pos-payment-methods select,
body.pos-mode .pos-payment-fields input,
body.pos-mode .pos-cart-controls-single input,
body.pos-mode .pos-cart-controls-single select,
body.pos-mode .pos-customer-details input,
body.pos-mode .pos-customer-details select,
body.pos-mode .pos-customer-details textarea {
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 10px !important;
  background: #FFFFFF !important;
  color: #0F172A !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-payment-fields input[disabled],
body.pos-mode .pos-payment-fields input[readonly] {
  background: #F8FAFC !important;
  color: #0F172A !important;
  opacity: 1 !important;
}

body.pos-mode .pos-payment-workflow {
  grid-template-columns: minmax(190px, .8fr) minmax(190px, .8fr) minmax(260px, 1fr) minmax(300px, auto) !important;
  align-items: end !important;
}

body.pos-mode .pos-totals small {
  color: #475569 !important;
  font-size: 13px !important;
}

body.pos-mode .pos-totals strong {
  color: #0F172A !important;
  font-size: 15px !important;
}

body.pos-mode .pos-summary-line {
  font-size: 15px !important;
}

body.pos-mode .pos-summary-line b {
  font-size: 17px !important;
}

body.pos-mode .pos-summary-line span:last-child b {
  font-size: 20px !important;
}

body.pos-mode .pos-actions .btn,
body.pos-mode .pos-actions button {
  height: 44px !important;
  min-height: 44px !important;
  font-size: 15px !important;
}

@media (max-width: 1180px) {
  body.pos-mode .pos-payment-workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body.pos-mode .pos-product {
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "name price"
      "meta badge" !important;
  }

  body.pos-mode .pos-payment-workflow {
    grid-template-columns: 1fr !important;
  }
}

body.pos-mode .pos-payment-methods[hidden],
body.pos-mode .pos-payment-fields label[hidden],
body.pos-mode [hidden] {
  display: none !important;
}

/* POS compact search area and cashier typography */
body.pos-mode .pos-cashier-workspace {
  gap: 7px !important;
  padding: 10px !important;
}

body.pos-mode .pos-search-bar {
  display: grid !important;
  grid-template-columns: 32px 320px 62px !important;
  align-items: end !important;
  justify-content: flex-start !important;
  gap: 7px !important;
  width: auto !important;
}

body.pos-mode .pos-search-bar label {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  color: #64748B !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
}

body.pos-mode .pos-search-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  background: #FFFFFF !important;
  color: #64748B !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body.pos-mode .pos-search-bar input[data-pos-search] {
  width: 320px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  color: #0F172A !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-bar input[data-pos-search]::placeholder {
  color: #94A3B8 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

body.pos-mode .pos-search-qty {
  width: 62px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  text-align: center !important;
  color: #0F172A !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-result-header {
  display: grid !important;
  grid-template-columns: minmax(190px, 1.5fr) minmax(110px, .8fr) 82px 90px 92px !important;
  align-items: center !important;
  min-height: 28px !important;
  padding: 0 12px !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 9px 9px 0 0 !important;
  background: #F8FAFC !important;
  color: #64748B !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
}

body.pos-mode .pos-products {
  max-height: 170px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border: 1px solid #E2E8F0 !important;
  border-top: 0 !important;
  border-radius: 0 0 9px 9px !important;
}

body.pos-mode .pos-products:empty {
  display: none !important;
}

body.pos-mode .pos-product {
  display: grid !important;
  grid-template-columns: minmax(190px, 1.5fr) minmax(110px, .8fr) 82px 90px 92px !important;
  grid-template-areas: none !important;
  align-items: center !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 12px !important;
  gap: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #E2E8F0 !important;
  border-radius: 0 !important;
  background: #FFFFFF !important;
}

body.pos-mode .pos-product strong,
body.pos-mode .pos-product small,
body.pos-mode .pos-product b,
body.pos-mode .pos-product .badge {
  grid-area: auto !important;
  min-height: 0 !important;
  line-height: 1.15 !important;
}

body.pos-mode .pos-product strong {
  display: block !important;
  overflow: hidden !important;
  color: #0F172A !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-product small,
body.pos-mode .pos-product b {
  overflow: hidden !important;
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-product b {
  color: #0F172A !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-product .badge {
  justify-self: start !important;
  min-height: 19px !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-cart-head {
  min-height: 28px !important;
}

body.pos-mode .pos-cart-head h2 {
  font-size: 12px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-cart-count {
  min-height: 20px !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-cart-head [data-pos-clear] {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 9px !important;
  border-radius: 7px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 138px !important;
}

body.pos-mode .pos-cart-table th {
  height: 28px !important;
  padding: 5px 8px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-cart-table td {
  height: 34px !important;
  padding: 5px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-cart-item-name {
  font-size: 11px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-cart-qty {
  grid-template-columns: 23px 34px 23px !important;
  gap: 3px !important;
}

body.pos-mode .pos-cart-qty button,
body.pos-mode .pos-cart-remove {
  width: 23px !important;
  height: 23px !important;
  min-height: 23px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-qty input {
  width: 34px !important;
  height: 23px !important;
  min-height: 23px !important;
  padding: 0 4px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-summary-line {
  min-height: 34px !important;
  padding: 6px 9px !important;
  gap: 8px 14px !important;
  border-radius: 9px !important;
}

body.pos-mode .pos-summary-line strong {
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-summary-line span {
  font-size: 10px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-summary-line b {
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-summary-line span:last-child b {
  font-size: 13px !important;
  font-weight: 900 !important;
}

body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow {
  padding: 8px !important;
  gap: 7px !important;
  border-radius: 10px !important;
}

body.pos-mode .pos-left label,
body.pos-mode .pos-cart label,
body.pos-mode .pos-payment-methods label > span,
body.pos-mode .pos-payment-fields small {
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-left input,
body.pos-mode .pos-left select,
body.pos-mode .pos-left textarea,
body.pos-mode .pos-cart input,
body.pos-mode .pos-cart select,
body.pos-mode .pos-payment-methods select,
body.pos-mode .pos-payment-fields input {
  height: 33px !important;
  min-height: 33px !important;
  padding: 0 9px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-left textarea {
  height: 33px !important;
  min-height: 33px !important;
  padding-top: 7px !important;
}

body.pos-mode .pos-totals {
  gap: 4px 10px !important;
}

body.pos-mode .pos-totals span {
  min-height: 18px !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-payment-workflow {
  grid-template-columns: minmax(170px, .8fr) minmax(170px, .8fr) minmax(240px, 1fr) minmax(240px, auto) !important;
}

body.pos-mode .pos-actions .btn,
body.pos-mode .pos-actions button {
  height: 33px !important;
  min-height: 33px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-message {
  min-height: 26px !important;
  padding: 6px 9px !important;
  font-size: 11px !important;
}

@media (max-width: 760px) {
  body.pos-mode .pos-search-bar {
    grid-template-columns: 32px minmax(0, 1fr) 62px !important;
    width: 100% !important;
  }

  body.pos-mode .pos-search-bar input[data-pos-search] {
    width: 100% !important;
  }

  body.pos-mode .pos-result-header,
  body.pos-mode .pos-product {
    grid-template-columns: minmax(130px, 1fr) 88px 70px 78px 78px !important;
  }
}

/* POS cashier compact final layout */
body.pos-mode .pos-shell {
  overflow-x: hidden !important;
}

body.pos-mode .pos-layout.pos-cashier-layout {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
}

body.pos-mode .pos-cashier-workspace {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  gap: 6px !important;
  padding: 8px !important;
  overflow: visible !important;
}

body.pos-mode .pos-search-bar {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  width: auto !important;
  max-width: 520px !important;
  margin: 0 !important;
}

body.pos-mode .pos-search-bar label {
  flex: 0 0 100% !important;
  margin: 0 !important;
  color: #475569 !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: .03em !important;
  text-transform: uppercase !important;
}

body.pos-mode .pos-search-icon {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 32px !important;
  min-height: 32px !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  background: #FFFFFF !important;
  color: #475569 !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-search-bar input[data-pos-search] {
  flex: 0 0 300px !important;
  width: 300px !important;
  max-width: 300px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-qty {
  flex: 0 0 60px !important;
  width: 60px !important;
  max-width: 60px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 7px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-search-add {
  flex: 0 0 64px !important;
  width: 64px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.pos-mode .pos-keyboard-quantity {
  display: none !important;
}

body.pos-mode .pos-result-header,
body.pos-mode .pos-product {
  grid-template-columns: minmax(180px, 1.35fr) minmax(90px, .75fr) 78px 82px 84px !important;
}

body.pos-mode .pos-result-header {
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 9px !important;
  border-radius: 8px 8px 0 0 !important;
}

body.pos-mode .pos-products {
  max-height: 120px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.pos-mode .pos-product {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 10px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-product img,
body.pos-mode [data-pos-products] img,
body.pos-mode [data-pos-cart] img {
  display: none !important;
}

body.pos-mode .pos-empty {
  min-height: 28px !important;
  padding: 7px 10px !important;
  font-size: 10px !important;
}

body.pos-mode .pos-cart.current-order-panel {
  padding: 8px !important;
  gap: 6px !important;
  border-radius: 10px !important;
}

body.pos-mode .pos-cart-head {
  min-height: 26px !important;
  gap: 6px !important;
}

body.pos-mode .pos-cart-head h2 {
  font-size: 13px !important;
}

body.pos-mode .pos-cart-items.current-order-items {
  min-height: 42px !important;
  max-height: 210px !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
}

body.pos-mode .pos-cart-table {
  min-width: 820px !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

body.pos-mode .pos-cart-table th,
body.pos-mode .pos-cart-table td {
  height: 34px !important;
  padding: 4px 6px !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

body.pos-mode .pos-cart-table th {
  height: 28px !important;
  font-size: 9px !important;
  font-weight: 900 !important;
}

body.pos-mode .pos-cart-table th:nth-child(1),
body.pos-mode .pos-cart-table td:nth-child(1) { width: 21% !important; }
body.pos-mode .pos-cart-table th:nth-child(2),
body.pos-mode .pos-cart-table td:nth-child(2) { width: 13% !important; }
body.pos-mode .pos-cart-table th:nth-child(3),
body.pos-mode .pos-cart-table td:nth-child(3) { width: 10% !important; }
body.pos-mode .pos-cart-table th:nth-child(4),
body.pos-mode .pos-cart-table td:nth-child(4) { width: 12% !important; }
body.pos-mode .pos-cart-table th:nth-child(5),
body.pos-mode .pos-cart-table td:nth-child(5) { width: 14% !important; text-align: center !important; }
body.pos-mode .pos-cart-table th:nth-child(6),
body.pos-mode .pos-cart-table td:nth-child(6) { width: 12% !important; text-align: right !important; }
body.pos-mode .pos-cart-table th:nth-child(7),
body.pos-mode .pos-cart-table td:nth-child(7) { width: 10% !important; }
body.pos-mode .pos-cart-table th:nth-child(8),
body.pos-mode .pos-cart-table td:nth-child(8) { width: 8% !important; text-align: center !important; }

body.pos-mode .pos-cart-item-name {
  display: block !important;
  overflow: hidden !important;
  max-width: 100% !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-cart-qty {
  display: inline-grid !important;
  grid-template-columns: 24px 40px 24px !important;
  gap: 3px !important;
  align-items: center !important;
}

body.pos-mode .pos-cart-qty button {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-qty input {
  width: 40px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 4px !important;
  text-align: center !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-remove {
  width: auto !important;
  min-width: 50px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 7px !important;
  font-size: 9px !important;
}

body.pos-mode .pos-summary-line {
  min-height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 6px 14px !important;
  padding: 6px 8px !important;
}

body.pos-mode .pos-summary-line strong,
body.pos-mode .pos-summary-line span {
  font-size: 10px !important;
  line-height: 1.15 !important;
}

body.pos-mode .pos-summary-line b {
  font-size: 11px !important;
}

body.pos-mode .pos-summary-line span:last-child b {
  font-size: 13px !important;
}

body.pos-mode .pos-cart-controls-single {
  grid-template-columns: 150px 70px !important;
  justify-content: flex-start !important;
  gap: 6px !important;
}

body.pos-mode .pos-totals {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  gap: 3px 12px !important;
}

body.pos-mode .pos-totals span {
  flex: 0 0 auto !important;
  width: auto !important;
  min-height: 16px !important;
  gap: 5px !important;
}

body.pos-mode .pos-totals small,
body.pos-mode .pos-totals strong {
  font-size: 9px !important;
}

body.pos-mode .pos-customer-details {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 8px !important;
}

body.pos-mode .pos-customer-details .field {
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
}

body.pos-mode .pos-customer-details [data-pos-customer-name] { width: 200px !important; }
body.pos-mode .pos-customer-details [data-pos-customer-phone] { width: 145px !important; }
body.pos-mode .pos-customer-details [data-pos-type] { width: 150px !important; }
body.pos-mode .pos-customer-details [data-pos-table-list] {
  width: 180px !important;
  max-height: 82px !important;
}
body.pos-mode .pos-customer-details [data-pos-delivery-address] { width: 200px !important; }

body.pos-mode .pos-customer-details label,
body.pos-mode .pos-payment-methods label > span,
body.pos-mode .pos-payment-fields small,
body.pos-mode .pos-cart label {
  margin-bottom: 3px !important;
  font-size: 9px !important;
  line-height: 1 !important;
}

body.pos-mode .pos-customer-details input,
body.pos-mode .pos-customer-details select,
body.pos-mode .pos-customer-details textarea,
body.pos-mode .pos-cart input,
body.pos-mode .pos-cart select,
body.pos-mode .pos-payment-workflow input,
body.pos-mode .pos-payment-workflow select {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

body.pos-mode .pos-payment-workflow {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 8px !important;
}

body.pos-mode .pos-payment-methods,
body.pos-mode .pos-payment-fields,
body.pos-mode .pos-actions.pos-main-actions {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
}

body.pos-mode .pos-payment-methods select[data-pos-payment-type-select] {
  width: 160px !important;
}

body.pos-mode .pos-payment-methods select[data-pos-payment-method-select] {
  width: 150px !important;
}

body.pos-mode .pos-payment-fields {
  display: flex !important;
  align-items: flex-end !important;
  gap: 6px !important;
}

body.pos-mode .pos-payment-fields input[data-pos-cash-received] {
  width: 120px !important;
}

body.pos-mode .pos-payment-fields input[data-pos-reference] {
  width: 130px !important;
}

body.pos-mode .pos-actions.pos-main-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
}

body.pos-mode .pos-actions.pos-main-actions [data-pos-submit],
body.pos-mode .pos-actions.pos-main-actions [data-pos-receive-payment] {
  flex: 0 0 auto !important;
  width: 128px !important;
  min-width: 128px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 9px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  body.pos-mode .pos-search-bar {
    max-width: 100% !important;
  }

  body.pos-mode .pos-search-bar input[data-pos-search] {
    flex: 1 1 180px !important;
    width: auto !important;
    max-width: none !important;
  }

  body.pos-mode .pos-result-header,
  body.pos-mode .pos-product {
    grid-template-columns: minmax(140px, 1fr) 80px 66px 76px 76px !important;
  }

  body.pos-mode .pos-customer-details .field,
  body.pos-mode .pos-customer-details [data-pos-customer-name],
  body.pos-mode .pos-customer-details [data-pos-customer-phone],
  body.pos-mode .pos-customer-details [data-pos-type],
  body.pos-mode .pos-customer-details [data-pos-table-list],
  body.pos-mode .pos-customer-details [data-pos-delivery-address],
  body.pos-mode .pos-payment-methods select[data-pos-payment-type-select],
  body.pos-mode .pos-payment-methods select[data-pos-payment-method-select],
  body.pos-mode .pos-payment-fields input[data-pos-cash-received],
  body.pos-mode .pos-payment-fields input[data-pos-reference] {
    width: 100% !important;
  }
}

/* Ledger filter compact alignment fix */
.ledger-page .ledger-control-card {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 10px 12px !important;
  padding: 16px 18px !important;
  width: 100% !important;
  min-height: auto !important;
}

.ledger-page .ledger-control-card > input[type="hidden"] {
  display: none !important;
}

.ledger-page .ledger-control-card label {
  display: grid !important;
  gap: 6px !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
}

.ledger-page .ledger-control-card .ledger-search-field {
  flex: 0 0 240px !important;
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
}

.ledger-page .ledger-control-card label:not(.ledger-search-field) {
  flex: 0 0 150px !important;
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
}

.ledger-page .ledger-control-card label:nth-of-type(4),
.ledger-page .ledger-control-card label:nth-of-type(5) {
  flex-basis: 155px !important;
  width: 155px !important;
  min-width: 155px !important;
  max-width: 155px !important;
}

.ledger-page .ledger-control-card label span {
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
}

.ledger-page .ledger-control-card input,
.ledger-page .ledger-control-card select {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

.ledger-page .ledger-filter-actions {
  display: flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  gap: 8px !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
}

.ledger-page .ledger-filter-actions .btn {
  flex: 0 0 70px !important;
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 10px !important;
  justify-content: center !important;
}

@media (max-width: 640px) {
  .ledger-page .ledger-control-card .ledger-search-field,
  .ledger-page .ledger-control-card label:not(.ledger-search-field),
  .ledger-page .ledger-filter-actions {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .ledger-page .ledger-filter-actions .btn {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* Ledger items column alignment fix */
.ledger-page .ledger-table col.ledger-col-items {
  width: 190px !important;
  min-width: 190px !important;
  max-width: 220px !important;
}

.ledger-page .ledger-table th.ledger-items-column,
.ledger-page .ledger-table td.ledger-items-column {
  width: 190px !important;
  min-width: 190px !important;
  max-width: 220px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  text-align: left !important;
}

.ledger-page .ledger-table th.ledger-items-column {
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .045em !important;
  text-transform: uppercase !important;
}

.ledger-page .ledger-table td.ledger-items-cell {
  white-space: nowrap !important;
  vertical-align: middle !important;
}

.ledger-page .ledger-table td.ledger-items-cell span {
  display: block !important;
  max-width: 188px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #0F172A !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

.ledger-page .ledger-table td.ledger-items-cell em {
  display: inline-flex !important;
  margin-top: 3px !important;
  color: #64748B !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

/* Ledger payment overpayment guard UI */
.ledger-page .ledger-payment-form {
  align-items: flex-end !important;
  gap: 12px !important;
}

.ledger-page .ledger-payment-form h3 {
  flex: 1 1 100% !important;
  margin: 0 !important;
}

.ledger-page .ledger-payment-summary {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) !important;
  gap: 10px !important;
  flex: 1 1 100% !important;
  width: 100% !important;
}

.ledger-page .ledger-payment-summary div {
  padding: 10px 12px !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
}

.ledger-page .ledger-payment-summary span,
.ledger-page .ledger-payment-form label > span {
  display: block !important;
  margin-bottom: 6px !important;
  color: #64748B !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
}

.ledger-page .ledger-payment-summary strong {
  color: #0F172A !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

.ledger-page .ledger-payment-form label {
  display: grid !important;
  gap: 0 !important;
  margin: 0 !important;
}

.ledger-page .ledger-payment-amount-field {
  flex: 1 1 340px !important;
}

.ledger-page .ledger-payment-amount-row {
  display: grid !important;
  grid-template-columns: minmax(150px, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
}

.ledger-page .ledger-payment-amount-row .btn {
  height: 40px !important;
  min-height: 40px !important;
  white-space: nowrap !important;
}

.ledger-page .ledger-payment-form input,
.ledger-page .ledger-payment-form select {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

.ledger-page .ledger-payment-form small {
  display: block !important;
  margin-top: 6px !important;
  color: #64748B !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.ledger-page .ledger-payment-error {
  display: block !important;
  margin-top: 5px !important;
  color: #DC2626 !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 800 !important;
}

.ledger-page .ledger-payment-error[hidden] {
  display: none !important;
}

.ledger-page .ledger-payment-form button[disabled] {
  cursor: not-allowed !important;
  opacity: .6 !important;
}

/* Ledger compact professional layout */
.ledger-control-card {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: end !important;
  gap: 12px !important;
  padding: 16px !important;
  min-height: auto !important;
}

.ledger-control-card > input[type="hidden"] {
  display: none !important;
}

.ledger-control-card label {
  display: grid !important;
  gap: 6px !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.ledger-control-card label span {
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
}

.ledger-control-card .ledger-search-field {
  width: 300px !important;
  max-width: 100% !important;
}

.ledger-control-card label:not(.ledger-search-field) {
  width: 150px !important;
  max-width: 100% !important;
}

.ledger-control-card label:nth-of-type(4),
.ledger-control-card label:nth-of-type(5) {
  width: 155px !important;
}

.ledger-control-card input,
.ledger-control-card select,
.ledger-control-card .select2-container .select2-selection--single {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 10px !important;
  border-color: #CBD5E1 !important;
  background: #FFFFFF !important;
  color: #0F172A !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.ledger-filter-actions {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: end !important;
  gap: 8px !important;
}

.ledger-filter-actions .btn {
  width: 70px !important;
  min-width: 70px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  justify-content: center !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.ledger-table-card {
  padding: 16px !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
}

.ledger-table-head {
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.ledger-export-actions .btn {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.ledger-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 14px !important;
  scrollbar-width: thin !important;
  scrollbar-color: #6B7280 #E5E7EB !important;
}

.ledger-table-wrap::-webkit-scrollbar {
  height: 9px !important;
}

.ledger-table-wrap::-webkit-scrollbar-track {
  background: #E5E7EB !important;
  border-radius: 999px !important;
}

.ledger-table-wrap::-webkit-scrollbar-thumb {
  background: #6B7280 !important;
  border-radius: 999px !important;
}

.ledger-table {
  min-width: 1450px !important;
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.ledger-col-date { width: 150px; }
.ledger-col-party { width: 170px; }
.ledger-col-items { width: 230px; }
.ledger-col-reference { width: 180px; }
.ledger-col-type { width: 140px; }
.ledger-col-total { width: 110px; }
.ledger-col-paid { width: 110px; }
.ledger-col-remaining { width: 120px; }
.ledger-col-status { width: 150px; }
.ledger-col-action { width: 90px; }

.ledger-table thead th {
  height: 44px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid #E2E8F0 !important;
  background: #F8FAFC !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.ledger-table tbody td {
  min-height: 52px !important;
  height: 52px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid #E2E8F0 !important;
  background: #FFFFFF !important;
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  vertical-align: middle !important;
}

.ledger-table tbody tr:hover td {
  background: #F8FAFC !important;
}

.ledger-table td:first-child strong {
  display: block !important;
  color: #0F172A !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

.ledger-table td:first-child small {
  display: block !important;
  margin-top: 3px !important;
  color: #64748B !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.ledger-items-cell {
  min-width: 220px !important;
  width: 230px !important;
  max-width: 240px !important;
  text-align: left !important;
  white-space: normal !important;
}

.ledger-items-cell span {
  display: block !important;
  max-width: 210px !important;
  overflow: hidden !important;
  color: #0F172A !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.ledger-items-cell em {
  display: inline-flex !important;
  margin-top: 3px !important;
  color: #64748B !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 700 !important;
}

.ledger-table .amount-cell {
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
}

.ledger-table .remaining-amount {
  color: #0F172A !important;
  font-weight: 900 !important;
}

.ledger-type-badge,
.ledger-status-badge {
  min-height: 24px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.ledger-status-badge.unpaid,
.ledger-type-badge {
  background: #FEE2E2 !important;
  border: 1px solid #FECACA !important;
  color: #B91C1C !important;
}

.ledger-status-badge.pending {
  background: #FEF3C7 !important;
  border: 1px solid #FDE68A !important;
  color: #B45309 !important;
}

.ledger-action-btn {
  width: 70px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  justify-content: center !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

@media (max-width: 900px) {
  .ledger-control-card .ledger-search-field,
  .ledger-control-card label:not(.ledger-search-field) {
    width: calc(50% - 6px) !important;
  }
}

@media (max-width: 560px) {
  .ledger-control-card .ledger-search-field,
  .ledger-control-card label:not(.ledger-search-field),
  .ledger-filter-actions {
    width: 100% !important;
  }

  .ledger-filter-actions .btn {
    flex: 1 !important;
    width: auto !important;
  }
}

/* Ledger: selector-free outstanding view */
.ledger-control-card {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.ledger-control-card .ledger-search-field {
  grid-column: span 6 !important;
}

.ledger-control-card label:not(.ledger-search-field) {
  grid-column: span 2 !important;
}

.ledger-filter-actions {
  grid-column: span 2 !important;
}

.ledger-table {
  min-width: 1250px !important;
}

.ledger-table th,
.ledger-table td {
  height: 44px !important;
  padding: 8px 10px !important;
}

.ledger-status-badge.unpaid {
  background: #FEE2E2 !important;
  border-color: #FECACA !important;
  color: #B91C1C !important;
}

.ledger-status-badge.pending {
  background: #FEF3C7 !important;
  border-color: #FDE68A !important;
  color: #B45309 !important;
}

.ledger-items-cell {
  min-width: 190px !important;
  max-width: 240px !important;
  white-space: normal !important;
  line-height: 1.35 !important;
}

.ledger-items-cell span {
  display: block !important;
  max-width: 220px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.ledger-items-cell em {
  display: inline-flex !important;
  margin-top: 3px !important;
  color: #2563EB !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 800 !important;
}

@media (max-width: 1100px) {
  .ledger-control-card .ledger-search-field,
  .ledger-control-card label:not(.ledger-search-field),
  .ledger-filter-actions {
    grid-column: span 6 !important;
  }
}

@media (max-width: 700px) {
  .ledger-control-card .ledger-search-field,
  .ledger-control-card label:not(.ledger-search-field),
  .ledger-filter-actions {
    grid-column: 1 / -1 !important;
  }
}

/* Ledger module compact Purchase Orders style */
.ledger-page {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.ledger-top-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.ledger-summary-card {
  display: grid !important;
  gap: 7px !important;
  min-height: 86px !important;
  padding: 14px 16px !important;
  color: #0F172A !important;
  text-decoration: none !important;
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05) !important;
}

.ledger-summary-card em {
  width: 32px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #64748B;
  background: #EEF2FF;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.ledger-summary-card span {
  color: #475569 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.ledger-summary-card strong {
  margin: 0 !important;
  color: #0F172A !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

.ledger-control-card {
  display: grid !important;
  grid-template-columns: minmax(210px, 1.15fr) minmax(150px, .8fr) minmax(210px, 1fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(130px, .65fr) minmax(130px, .65fr) auto auto auto !important;
  gap: 12px !important;
  align-items: end !important;
  padding: 16px !important;
}

.ledger-control-card input,
.ledger-control-card select,
.ledger-control-card .select2-container .select2-selection--single {
  min-height: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

.ledger-check {
  min-height: 38px !important;
  align-items: center !important;
  white-space: nowrap !important;
}

.ledger-table-card {
  padding: 16px !important;
  overflow: hidden !important;
}

.ledger-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 14px !important;
  scrollbar-width: auto !important;
  scrollbar-color: #6B7280 #E5E7EB !important;
}

.ledger-table-wrap::-webkit-scrollbar {
  height: 10px !important;
}

.ledger-table-wrap::-webkit-scrollbar-track {
  background: #E5E7EB !important;
  border-radius: 999px !important;
}

.ledger-table-wrap::-webkit-scrollbar-thumb {
  background: #6B7280 !important;
  border-radius: 999px !important;
}

.ledger-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #4B5563 !important;
}

.ledger-table {
  width: max-content !important;
  min-width: 1450px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.ledger-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #F8FAFC !important;
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

.ledger-table th,
.ledger-table td {
  height: 52px !important;
  padding: 9px 12px !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

.ledger-table td {
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.ledger-table td small {
  display: block !important;
  margin-top: 2px !important;
  color: #64748B !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.ledger-table .amount-cell,
.ledger-table td:nth-last-child(6),
.ledger-table td:nth-last-child(5),
.ledger-table td:nth-last-child(4),
.ledger-table td:nth-last-child(3) {
  text-align: right !important;
}

.ledger-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 24px !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  border: 1px solid transparent !important;
}

.ledger-status-badge.paid {
  color: #15803D !important;
  background: #DCFCE7 !important;
  border-color: #BBF7D0 !important;
}

.ledger-status-badge.pending {
  color: #B45309 !important;
  background: #FEF3C7 !important;
  border-color: #FDE68A !important;
}

.ledger-status-badge.unpaid,
.ledger-status-badge.danger {
  color: #B91C1C !important;
  background: #FEE2E2 !important;
  border-color: #FECACA !important;
}

.ledger-action-btn {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #166534 !important;
  background: #DCFCE7 !important;
  border: 1px solid #BBF7D0 !important;
}

.ledger-empty-state {
  min-height: 150px !important;
  display: grid !important;
  place-content: center !important;
  text-align: center !important;
}

@media (max-width: 1280px) {
  .ledger-control-card {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .ledger-top-summary,
  .ledger-control-card {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  .ledger-top-summary,
  .ledger-control-card {
    grid-template-columns: 1fr !important;
  }
}

html.public-document::-webkit-scrollbar-track,
body.public-page::-webkit-scrollbar-track {
  background: #E2E8F0 !important;
}

html.public-document::-webkit-scrollbar-thumb,
body.public-page::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #64748B !important;
  border: 2px solid #E2E8F0;
}

html.public-document::-webkit-scrollbar-thumb:hover,
body.public-page::-webkit-scrollbar-thumb:hover {
  background: #475569 !important;
}

html.public-document::-webkit-scrollbar-thumb:active,
body.public-page::-webkit-scrollbar-thumb:active {
  background: #334155 !important;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 8px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #E2E8F0;
  backdrop-filter: blur(12px);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #0F172A;
  text-decoration: none;
}

.landing-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
}

.landing-brand span {
  display: grid;
  gap: 1px;
}

.landing-brand strong {
  color: #0F172A;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.05;
}

.landing-brand small {
  color: #64748B;
  font-size: 10px;
  font-weight: 700;
}

.public-page .btn {
  min-height: 38px;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.public-page .landing-header .btn {
  min-height: 35px;
  height: 35px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}

.public-page .btn:hover {
  transform: translateY(-1px);
}

.landing-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.landing-footer nav a {
  color: #64748B;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.landing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-header-actions {
  justify-content: flex-end;
}

.landing-trial-btn {
  height: 36px !important;
  padding: 0 14px !important;
  color: #2563EB !important;
  background: #FFFFFF !important;
  border: 1px solid #2563EB !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.landing-trial-btn:hover {
  color: #1D4ED8 !important;
  background: #EFF6FF !important;
  border-color: #1D4ED8 !important;
}

.landing-hero,
.landing-section,
.landing-cta,
.trial-card {
  width: min(1200px, calc(100% - 48px));
  margin: 24px auto;
}

.landing-main {
  min-height: 100vh;
  padding-bottom: 28px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  align-items: center;
  gap: clamp(44px, 4vw, 52px);
  min-height: calc(100vh - 100px);
  padding: 8px 0 24px;
  margin-top: 12px;
}

.landing-hero-copy {
  max-width: 560px;
}

.landing-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid #BFDBFE;
  border-radius: 999px;
  color: #1D4ED8;
  background: #EFF6FF;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.landing-trust-badge::before,
.landing-benefits span::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #16A34A;
}

.landing-hero h1 {
  max-width: 560px;
  color: #0F172A;
  font-size: clamp(42px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 14px 0 16px;
}

.landing-hero p,
.trial-intro p {
  color: #64748B;
  max-width: 500px;
  font-size: 15px;
  line-height: 1.7;
}

.landing-hero-actions {
  margin-top: 16px;
  gap: 10px;
}

.landing-benefits {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 18px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.landing-benefits span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-demo-trigger {
  width: fit-content;
  margin-top: 0;
  background: #2563EB !important;
  border-color: #2563EB !important;
  color: #FFFFFF !important;
}

.landing-demo-trigger:hover {
  background: #1D4ED8 !important;
  border-color: #1D4ED8 !important;
}

.landing-powered-inline {
  margin: 18px 0 0;
  color: #64748B;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.landing-powered-inline strong {
  color: #0F172A;
  font-weight: 700;
}

.landing-dashboard-preview {
  width: min(100%, 420px);
  justify-self: start;
  min-height: 0;
  padding: 15px;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.demo-modal[hidden] {
  display: none !important;
}

.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.demo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .56);
}

.demo-modal-card {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
}

.demo-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.demo-modal-header h2 {
  margin: 2px 0 0;
  color: #0F172A;
  font-size: 22px;
  font-weight: 800;
}

.demo-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid #CBD5E1;
  border-radius: 9px;
  background: #FFFFFF;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.demo-modal-close:hover {
  background: #F8FAFC;
  color: #0F172A;
}

.demo-language-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.demo-language-tab {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  background: #FFFFFF;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.demo-language-tab.active,
.demo-language-tab:hover {
  border-color: #2563EB;
  background: #EFF6FF;
  color: #1D4ED8;
}

.demo-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #0F172A;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.demo-video-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px dashed #CBD5E1;
  border-radius: 12px;
  background: #F8FAFC;
  color: #475569;
  font-size: 15px;
  font-weight: 700;
}

body.demo-modal-open {
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.preview-header div,
.preview-section-title {
  display: grid;
  gap: 4px;
}

.preview-header span,
.preview-section-title small,
.preview-metrics span {
  color: #64748B;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.preview-header strong {
  color: #0F172A;
  font-size: 12px;
  font-weight: 800;
}

.preview-header em {
  padding: 6px 10px;
  border: 1px solid #BBF7D0;
  border-radius: 999px;
  color: #15803D;
  background: #DCFCE7;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.preview-metrics article {
  padding: 12px;
  min-height: 82px;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  background: #F8FAFC;
}

.preview-metrics strong {
  display: block;
  margin-top: 6px;
  color: #0F172A;
  font-size: 20px;
  font-weight: 800;
}

.preview-pos-card,
.preview-orders {
  padding: 12px;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  background: #FFFFFF;
}

.preview-pos-card {
  margin-bottom: 10px;
}

.preview-section-title {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 8px;
}

.preview-section-title span {
  color: #0F172A;
  font-size: 12px;
  font-weight: 800;
}

.preview-pos-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview-pos-card li,
.preview-orders div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid #E2E8F0;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
}

.preview-pos-card li > span {
  display: grid;
  gap: 2px;
}

.preview-pos-card li > span strong {
  color: #0F172A;
  font-size: 10px;
  font-weight: 800;
}

.preview-pos-card li > span small {
  color: #64748B;
  font-size: 9px;
  font-weight: 700;
}

.preview-pos-card li:first-child,
.preview-orders div:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.preview-orders div {
  grid-template-columns: .8fr 1fr auto;
}

.preview-pos-card strong,
.preview-orders strong {
  color: #0F172A;
  font-weight: 800;
}

.landing-section,
.landing-cta,
.landing-contact-section,
.trial-card {
  padding: 24px;
  border: 1px solid #E2E8F0;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 12px 34px rgba(15,23,42,.06);
}

.landing-contact-section {
  margin-top: 48px;
}

.landing-contact-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.landing-contact-heading h2 {
  margin: 0;
  color: #0F172A;
  font-size: 26px;
  font-weight: 800;
}

.landing-contact-heading p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: #64748B;
  font-size: 14px;
  line-height: 1.65;
}

.landing-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: stretch;
}

.landing-contact-card {
  padding: 20px;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 8px 22px rgba(15,23,42,.05);
}

.landing-contact-card h3 {
  margin: 0 0 16px;
  color: #0F172A;
  font-size: 18px;
  font-weight: 800;
}

.landing-contact-list {
  display: grid;
  gap: 12px;
}

.landing-contact-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #F8FAFC;
}

.landing-contact-list span,
.landing-contact-form label > span {
  color: #64748B;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.landing-contact-list strong,
.landing-contact-list a {
  color: #0F172A;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.landing-contact-form {
  display: grid;
  gap: 14px;
}

.landing-contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.landing-contact-form label {
  display: grid;
  gap: 6px;
}

.landing-contact-form input,
.landing-contact-form textarea {
  width: 100%;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 14px;
  font-weight: 600;
}

.landing-contact-form input {
  height: 42px;
  padding: 0 12px;
}

.landing-contact-form textarea {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
}

.landing-contact-form input:focus,
.landing-contact-form textarea:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.landing-contact-form small {
  color: #DC2626;
  font-size: 12px;
  font-weight: 700;
}

.landing-contact-form .btn {
  justify-self: end;
}

.landing-contact-alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}

.landing-contact-alert.success {
  border: 1px solid #BBF7D0;
  background: #DCFCE7;
  color: #15803D;
}

.landing-contact-alert.error {
  border: 1px solid #FECACA;
  background: #FEE2E2;
  color: #B91C1C;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.landing-feature-grid article,
.landing-steps span {
  padding: 14px;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  color: #0F172A;
  font-weight: 800;
  background: #F8FAFC;
}

.landing-feature-grid article {
  display: grid;
  gap: 7px;
}

.landing-feature-grid article > span {
  width: 24px;
  height: 24px;
  border-radius: 10px;
  background: #DBEAFE;
}

.landing-feature-grid article strong {
  color: #0F172A;
  font-size: 13px;
  font-weight: 800;
}

.landing-feature-grid article small {
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.landing-steps div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.landing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.landing-footer {
  width: 100%;
  margin: 24px 0 0;
  padding: 16px 24px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid #E2E8F0;
  background: #FFFFFF;
  border-radius: 0;
  color: #64748B;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.landing-footer strong {
  color: #0F172A;
  font-weight: 700;
}

.trial-page {
  padding: 34px 0;
}

.trial-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
}

.trial-form .phone-input-group {
  grid-template-columns: 118px minmax(0, 1fr);
}

.trial-form-actions,
.ledger-filter-form,
.ledger-payment-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

.ledger-filter-form {
  margin-bottom: 16px;
}

.ledger-filter-form input,
.ledger-filter-form select {
  width: auto;
  min-width: 170px;
}

.ledger-table td small {
  display: block;
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
}

.ledger-action-btn {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  white-space: nowrap !important;
}

.ledger-workspace {
  display: grid;
  gap: 16px;
  max-width: 100%;
  overflow-x: hidden;
}

.ledger-title-row {
  align-items: flex-start;
  gap: 16px;
}

.ledger-title-row .muted {
  max-width: 760px;
}

.ledger-export-actions {
  margin-left: auto;
  flex-wrap: nowrap;
}

.ledger-control-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 16px !important;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.ledger-control-card label {
  display: grid;
  gap: 6px;
  margin: 0;
}

.ledger-control-card label span,
.ledger-payment-card label,
.ledger-table th {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #475569;
}

.ledger-control-card input,
.ledger-control-card select,
.ledger-payment-card input,
.ledger-payment-card select {
  min-height: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

.ledger-check {
  align-self: center;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  min-height: 40px;
}

.ledger-check input {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
}

.ledger-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ledger-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  max-width: 100%;
}

.ledger-summary-card {
  min-height: 78px;
  padding: 14px;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.ledger-summary-card span,
.ledger-aging-grid span,
.ledger-profile-meta span {
  display: block;
  color: #64748B;
  font-size: 12px;
  font-weight: 700;
}

.ledger-summary-card strong {
  display: block;
  margin-top: 8px;
  color: #0F172A;
  font-size: 18px;
  line-height: 1.1;
}

.ledger-balance-card {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.ledger-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px !important;
}

.ledger-profile-card h3 {
  margin: 2px 0 10px;
  font-size: 22px;
}

.ledger-profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ledger-profile-meta span,
.ledger-profile-meta strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.ledger-profile-meta strong {
  color: #1D4ED8;
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.ledger-profile-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.ledger-profile-details div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #F8FAFC;
}

.ledger-profile-details span {
  display: block;
  color: #64748B;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.ledger-profile-details strong {
  display: block;
  color: #0F172A;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-aging-card {
  padding: 16px !important;
  overflow: visible;
}

.ledger-aging-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  min-width: 0;
}

.ledger-aging-grid div {
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #F8FAFC;
}

.ledger-aging-grid strong {
  display: block;
  margin-top: 6px;
  color: #0F172A;
  font-size: 15px;
}

.ledger-payment-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(4, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px !important;
}

.ledger-payment-card h3 {
  margin: 2px 0 0;
}

.ledger-table-card {
  padding: 16px !important;
  max-width: 100%;
  overflow: hidden;
}

.ledger-table-wrap {
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #94A3B8 #F1F5F9;
}

.ledger-aging-card::-webkit-scrollbar,
.ledger-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.ledger-aging-card::-webkit-scrollbar-track,
.ledger-table-wrap::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 999px;
}

.ledger-aging-card::-webkit-scrollbar-thumb,
.ledger-table-wrap::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 999px;
}

.ledger-aging-card::-webkit-scrollbar-thumb:hover,
.ledger-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}

.ledger-table {
  min-width: 1040px;
}

.ledger-table th,
.ledger-table td {
  padding: 10px 12px !important;
  white-space: nowrap;
  vertical-align: middle;
}

.ledger-table td {
  font-size: 13px;
}

.ledger-table td strong {
  color: #0F172A;
}

.ledger-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.ledger-empty-state {
  min-height: 280px;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 36px 20px !important;
}

.ledger-empty-state h3 {
  margin-bottom: 8px;
}

@media (max-width: 1200px) {
  .ledger-control-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ledger-profile-details {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .ledger-payment-card {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 900px) {
  .ledger-control-card,
  .ledger-payment-card,
  .ledger-profile-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-profile-card,
  .ledger-title-row {
    flex-direction: column;
  }

  .ledger-export-actions {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .ledger-control-card,
  .ledger-payment-card,
  .ledger-profile-details {
    grid-template-columns: 1fr;
  }

  .ledger-filter-actions,
  .ledger-export-actions,
  .ledger-profile-card .form-actions {
    width: 100%;
  }

  .ledger-filter-actions .btn,
  .ledger-export-actions .btn,
  .ledger-profile-card .btn {
    flex: 1;
  }
}

@media print {
  .ledger-control-card,
  .ledger-export-actions,
  .ledger-payment-card,
  .ledger-profile-card .form-actions,
  .compact-pagination {
    display: none !important;
  }

  .ledger-summary-grid,
  .ledger-aging-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Final compact outstanding ledger UI */
.ledger-title-row {
  gap: 16px !important;
  align-items: center !important;
}

.ledger-type-tabs {
  display: inline-flex !important;
  gap: 4px !important;
  padding: 4px !important;
  border: 1px solid #DDE6F2 !important;
  border-radius: 12px !important;
  background: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05) !important;
}

.ledger-type-tabs a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: 8px 14px !important;
  border-radius: 9px !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.ledger-type-tabs a.active {
  background: #2563EB !important;
  color: #FFFFFF !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18) !important;
}

.ledger-top-summary {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
  gap: 12px !important;
}

.ledger-summary-card {
  min-height: 82px !important;
  padding: 12px 14px !important;
  text-decoration: none !important;
}

.ledger-summary-card em {
  width: 28px !important;
  height: 24px !important;
  font-size: 10px !important;
}

.ledger-summary-card span {
  font-size: 11px !important;
  line-height: 1.25 !important;
}

.ledger-summary-card strong {
  font-size: 18px !important;
  line-height: 1.15 !important;
}

.ledger-control-card {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: end !important;
  padding: 18px !important;
}

.ledger-control-card > input[type="hidden"] {
  display: none !important;
}

.ledger-control-card label {
  grid-column: span 3 !important;
  margin: 0 !important;
}

.ledger-control-card .ledger-search-field {
  grid-column: span 6 !important;
}

.ledger-control-card .ledger-check {
  grid-column: span 2 !important;
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.ledger-control-card .ledger-check input {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
}

.ledger-filter-actions {
  grid-column: span 2 !important;
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

.ledger-filter-actions .btn {
  min-height: 38px !important;
  padding: 8px 14px !important;
}

.ledger-profile-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 16px 18px !important;
}

.ledger-profile-card h3 {
  margin: 0 0 8px !important;
}

.ledger-profile-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
}

.ledger-profile-meta span,
.ledger-profile-meta strong {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 28px !important;
  padding: 5px 10px !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 999px !important;
  background: #FFFFFF !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.ledger-profile-meta strong {
  color: #DC2626 !important;
}

.ledger-table-head {
  gap: 14px !important;
  align-items: center !important;
  margin-bottom: 12px !important;
}

.ledger-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 1px solid #DDE6F2 !important;
  border-radius: 14px !important;
  scrollbar-width: thin !important;
  scrollbar-color: #94A3B8 #E2E8F0 !important;
}

.ledger-table-wrap::-webkit-scrollbar {
  height: 9px !important;
}

.ledger-table-wrap::-webkit-scrollbar-track {
  background: #E2E8F0 !important;
  border-radius: 999px !important;
}

.ledger-table-wrap::-webkit-scrollbar-thumb {
  background: #94A3B8 !important;
  border-radius: 999px !important;
}

.ledger-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #64748B !important;
}

.ledger-table {
  width: max-content !important;
  min-width: 1150px !important;
}

.ledger-table th,
.ledger-table td {
  height: 46px !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

.ledger-table th {
  color: #475569 !important;
  font-size: 10px !important;
  letter-spacing: .045em !important;
}

.ledger-type-badge,
.ledger-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 24px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.ledger-type-badge {
  background: #EFF6FF !important;
  color: #2563EB !important;
  border: 1px solid #BFDBFE !important;
}

.ledger-status-badge.pending {
  background: #FEF3C7 !important;
  color: #B45309 !important;
  border: 1px solid #FDE68A !important;
}

.ledger-status-badge.danger,
.ledger-status-badge.unpaid {
  background: #FEE2E2 !important;
  color: #B91C1C !important;
  border: 1px solid #FECACA !important;
}

.paid-amount {
  color: #16A34A !important;
  font-weight: 800 !important;
}

.remaining-amount {
  color: #0F172A !important;
  font-weight: 900 !important;
}

.remaining-amount.overdue {
  color: #DC2626 !important;
}

@media (max-width: 1100px) {
  .ledger-top-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ledger-control-card label,
  .ledger-control-card .ledger-search-field {
    grid-column: span 6 !important;
  }

  .ledger-control-card .ledger-check,
  .ledger-filter-actions {
    grid-column: span 3 !important;
  }
}

@media (max-width: 700px) {
  .ledger-title-row,
  .ledger-profile-card {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .ledger-type-tabs {
    width: 100% !important;
  }

  .ledger-type-tabs a {
    flex: 1 !important;
  }

  .ledger-top-summary,
  .ledger-control-card {
    grid-template-columns: 1fr !important;
  }

  .ledger-control-card label,
  .ledger-control-card .ledger-search-field,
  .ledger-control-card .ledger-check,
  .ledger-filter-actions {
    grid-column: 1 / -1 !important;
  }
}

.trial-countdown-banner {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  color: #92400E;
  background: #FFFBEB;
  font-size: 13px;
  font-weight: 800;
}

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 99999;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #FFFFFF;
  background: #22C55E;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}

.whatsapp-float svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 900px) {
  .landing-header,
  .landing-footer,
  .landing-cta {
    flex-direction: column;
  }
  .landing-header,
  .landing-cta {
    align-items: stretch;
  }
  .landing-footer {
    align-items: center;
  }
  .landing-hero,
  .trial-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .landing-contact-grid {
    grid-template-columns: 1fr;
  }
  .landing-feature-grid,
  .landing-steps div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .landing-dashboard-preview {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .landing-header-actions,
  .landing-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .landing-hero h1 {
    font-size: 40px;
  }
  .preview-metrics,
  .landing-contact-form-grid,
  .preview-orders div {
    grid-template-columns: 1fr;
  }
  .landing-contact-form .btn {
    justify-self: stretch;
  }
  .landing-feature-grid,
  .landing-steps div {
    grid-template-columns: 1fr;
  }
}

/* Public landing scrollbar: keep the browser page scrollbar visible and draggable. */
html.public-document {
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: auto !important;
  scrollbar-color: #64748B #E2E8F0 !important;
}

body.public-page {
  min-height: 100% !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  scrollbar-width: auto !important;
  -ms-overflow-style: auto !important;
  scrollbar-color: #64748B #E2E8F0 !important;
}

body.public-page::after {
  content: none !important;
  display: none !important;
}

html.public-document::-webkit-scrollbar,
body.public-page::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
  display: block !important;
}

html.public-document::-webkit-scrollbar-track,
body.public-page::-webkit-scrollbar-track {
  background: #E2E8F0 !important;
}

html.public-document::-webkit-scrollbar-thumb,
body.public-page::-webkit-scrollbar-thumb {
  background: #64748B !important;
  border: 2px solid #E2E8F0 !important;
  border-radius: 999px !important;
}

html.public-document::-webkit-scrollbar-thumb:hover,
body.public-page::-webkit-scrollbar-thumb:hover {
  background: #475569 !important;
}

html.public-document::-webkit-scrollbar-thumb:active,
body.public-page::-webkit-scrollbar-thumb:active {
  background: #334155 !important;
}

.public-page .whatsapp-float,
.public-page .whatsapp-fab {
  right: 22px !important;
  bottom: 22px !important;
  z-index: 99999 !important;
  width: 46px !important;
  height: 46px !important;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: #25D366 !important;
  color: #FFFFFF !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .18) !important;
}

/* Final CafeCore pure-white background and public landing scroll policy */
:root {
  --app-background: #FFFFFF;
  --surface-background: #FFFFFF;
  --app-bg: #FFFFFF;
  --page-bg: #FFFFFF;
  --page-bg-secondary: #FFFFFF;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #0F172A;
  --muted: #64748B;
  --primary: #2563EB;
}

html,
body,
body:not(.auth-page):not(.login-page),
body.auth-page,
body.login-page {
  background-color: #FFFFFF !important;
  background-image: none !important;
  background: #FFFFFF !important;
}

main,
body:not(.auth-page):not(.login-page) .app-shell,
body:not(.auth-page):not(.login-page) .main,
body:not(.auth-page):not(.login-page) .page-content,
.dashboard-content,
.content-wrapper,
.app-content,
.landing-main,
.public-page,
.page-content {
  background-color: #FFFFFF !important;
  background-image: none !important;
  background: #FFFFFF !important;
}

.login-page {
  background-color: #FFFFFF !important;
  background-image: none !important;
}

.card,
.premium-panel,
.dashboard-hero,
.dashboard-command-center,
.stat-card,
.topbar,
.sidebar,
.landing-header,
.landing-dashboard-preview,
.landing-section,
.landing-cta,
.landing-footer,
.trial-card,
form.card,
.table-wrap,
.receipt,
.modal,
.payment-dialog {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

html.public-document,
body.public-page {
  scrollbar-width: auto !important;
  scrollbar-color: #64748B #E2E8F0 !important;
  -ms-overflow-style: auto !important;
}

html.public-document::-webkit-scrollbar,
body.public-page::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
  display: block !important;
}

/* POS true final override after global background rules */
body.pos-mode .pos-search-add,
body.pos-mode [data-pos-search-add],
body.pos-mode .pos-keyboard-quantity,
body.pos-mode .pos-cart-qty button,
body.pos-mode [data-cart-minus],
body.pos-mode [data-cart-plus] {
  display: none !important;
}

body.pos-mode .pos-search-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  max-width: 442px !important;
  margin: 0 !important;
}

body.pos-mode .pos-search-bar label {
  flex: 0 0 100% !important;
  margin: 0 0 2px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-icon {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 7px !important;
}

body.pos-mode .pos-search-bar input[data-pos-search] {
  flex: 0 0 340px !important;
  width: 340px !important;
  max-width: 340px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-search-qty,
body.pos-mode [data-pos-quick-qty] {
  display: inline-block !important;
  flex: 0 0 56px !important;
  width: 56px !important;
  max-width: 56px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 7px !important;
  border-radius: 7px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-summary-line {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  min-height: 36px !important;
  padding: 6px 10px !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
}

body.pos-mode .pos-summary-line > strong,
body.pos-mode .pos-summary-line > span,
body.pos-mode .pos-summary-line > label {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-summary-control select[data-pos-discount-type] {
  width: 115px !important;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-summary-control input[data-pos-discount] {
  width: 82px !important;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.pos-mode .pos-cart-qty,
body.pos-mode .pos-cart-table .pos-cart-qty {
  display: inline-block !important;
}

body.pos-mode .pos-cart-qty-input,
body.pos-mode input[data-cart-quantity] {
  width: 42px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 5px !important;
  border-radius: 7px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

body.pos-mode .pos-customer-details,
body.pos-mode .pos-payment-workflow,
body.pos-mode .pos-payment-fields,
body.pos-mode .pos-actions.pos-main-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

body.pos-mode .pos-customer-details input,
body.pos-mode .pos-customer-details select,
body.pos-mode .pos-customer-details textarea,
body.pos-mode .pos-payment-workflow input,
body.pos-mode .pos-payment-workflow select {
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}
.customer-receipt-action {
  min-width: 96px;
}

.customer-receipt-btn {
  min-width: 78px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.free-trial-duration-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  width: fit-content;
  padding: 0 11px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  margin: 4px 0 10px;
}

.trial-card {
  padding-bottom: 20px;
}

.trial-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.ledger-page .ledger-detail-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.ledger-page .ledger-detail-summary-grid .stat-card {
    min-height: 90px;
    padding: 16px 18px;
    border-radius: 10px;
}

.ledger-page .ledger-detail-summary-grid .stat-card span {
    font-size: 11px;
    font-weight: 600;
}

.ledger-page .ledger-detail-summary-grid .stat-card strong {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
}

.ledger-page .ledger-table-card .ledger-table tbody td {
    vertical-align: middle;
}

.ledger-page .ledger-table-card .ledger-table th,
.ledger-page .ledger-table-card .ledger-table td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.ledger-page .ledger-table-card .ledger-table tbody tr {
    min-height: 52px;
}

@media (max-width: 768px) {
    .ledger-page .ledger-detail-summary-grid {
        grid-template-columns: 1fr;
    }
}

.ledger-page .ledger-payment-entry-card {
    display: block;
    padding: 16px;
}

.ledger-page .ledger-payment-entry-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ledger-page .ledger-payment-entry-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0F172A;
}

.ledger-page .ledger-paid-note {
    margin-left: auto;
    color: #16A34A;
    font-size: 12px;
    font-weight: 700;
}

.ledger-page .ledger-payment-entry-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.2fr) minmax(140px, 1fr) minmax(150px, 1fr) minmax(160px, 1.1fr) 120px;
    gap: 14px;
    align-items: end;
    width: 100%;
}

.ledger-page .ledger-payment-entry-row label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.ledger-page .ledger-payment-entry-row label > span {
    font-size: 11px;
    font-weight: 700;
    color: #334155;
}

.ledger-page .ledger-payment-entry-row input,
.ledger-page .ledger-payment-entry-row select,
.ledger-page .ledger-payment-entry-row .btn {
    height: 38px;
    min-height: 38px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    box-sizing: border-box;
}

.ledger-page .ledger-payment-entry-row .ledger-save-payment-btn {
    align-self: end;
    white-space: nowrap;
    padding: 0 12px;
    font-weight: 600;
}

.ledger-page .ledger-payment-entry-row .ledger-payment-amount-field small {
    font-size: 10px;
    font-weight: 600;
    margin-top: 4px;
    color: #64748B;
}

.ledger-page .ledger-payment-entry-row .ledger-payment-error {
    font-size: 10px;
    font-weight: 600;
    margin-top: 2px;
}

@media (max-width: 1100px) {
    .ledger-page .ledger-payment-entry-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .ledger-page .ledger-payment-entry-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .ledger-page .ledger-paid-note {
        margin-left: 0;
    }

    .ledger-page .ledger-payment-entry-row {
        grid-template-columns: 1fr;
    }

    .ledger-page .ledger-payment-entry-row .ledger-save-payment-btn {
        width: 100%;
    }
}

.ledger-page .ledger-payment-records-card {
    padding: 18px;
}

.ledger-page .ledger-payment-records-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
}

.ledger-page .ledger-payment-records-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    font-size: 12px;
    color: #334155;
}

.ledger-page .ledger-payment-records-table th,
.ledger-page .ledger-payment-records-table td {
    padding: 11px 14px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #E2E8F0;
    white-space: nowrap;
}

.ledger-page .ledger-payment-records-table th {
    background: #F8FAFC;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.ledger-page .ledger-payment-records-table tbody tr:last-child td {
    border-bottom: 0;
}

.ledger-page .ledger-payment-reference {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ledger-page .ledger-payment-record-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.ledger-page .ledger-payment-record-status.paid {
    background: #DCFCE7;
    color: #15803D;
}

.ledger-page .ledger-payment-record-status.partial {
    background: #FEF3C7;
    color: #B45309;
}

.ledger-page .ledger-payment-record-status.credit {
    background: #DBEAFE;
    color: #1D4ED8;
}

.ledger-page .ledger-payment-records-empty {
    color: #64748B;
    font-weight: 600;
    text-align: center !important;
}

/* Recipe Builder quantity units */
.recipe-builder-card .recipe-table {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
}

.recipe-builder-card .recipe-head,
.recipe-builder-card .recipe-row {
    grid-template-columns: minmax(260px, 1.6fr) minmax(96px, .62fr) minmax(105px, .62fr) minmax(98px, .5fr) !important;
    width: 100% !important;
    max-width: 760px !important;
    align-items: end !important;
}

.recipe-builder-card .recipe-unit-select,
.recipe-builder-card .recipe-row [data-recipe-unit] + .select2-container {
    min-width: 0 !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    .recipe-builder-card .recipe-table,
    .recipe-builder-card .recipe-head,
    .recipe-builder-card .recipe-row {
        max-width: 100% !important;
    }

    .recipe-builder-card .recipe-head,
    .recipe-builder-card .recipe-row {
        grid-template-columns: 1fr !important;
    }
}

/* Recipe Builder aligned unit/action row */
.recipe-builder-card .recipe-table {
    width: min(100%, 920px) !important;
    max-width: 920px !important;
}

.recipe-builder-card .recipe-head,
.recipe-builder-card .recipe-row {
    grid-template-columns: minmax(280px, 1fr) 130px 130px 240px !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 920px !important;
    align-items: end !important;
}

.recipe-builder-card .recipe-row-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
}

.recipe-builder-card .recipe-row-actions .btn,
.recipe-builder-card [data-recipe-save],
.recipe-builder-card [data-remove-recipe-row],
.recipe-builder-card [data-add-recipe-row] {
    height: 36px !important;
    min-height: 36px !important;
    padding: 7px 12px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.recipe-builder-card [data-remove-recipe-row] {
    width: 108px !important;
}

.recipe-builder-card [data-recipe-save] {
    width: 118px !important;
}

.recipe-builder-card .recipe-actions {
    justify-content: flex-start !important;
    width: min(100%, 920px) !important;
    max-width: 920px !important;
}

@media (max-width: 900px) {
    .recipe-builder-card .recipe-head,
    .recipe-builder-card .recipe-row {
        grid-template-columns: 1fr !important;
    }

    .recipe-builder-card .recipe-row-actions {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
}

/* Premium Menu Management layout */
.menu-management-page {
    display: grid;
    gap: 16px;
}

.menu-management-page .card,
.menu-management-header,
.menu-builder-card,
.menu-filter-card,
.menu-table-card,
.menu-combo-list-card {
    background: #FFFFFF !important;
    border: 1px solid #D9E2EC !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04) !important;
}

.menu-management-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px !important;
}

.menu-management-header h2,
.menu-builder-head h2,
.menu-table-card h2,
.menu-combo-list-card h2 {
    margin: 0;
    color: #0F172A;
    font-size: 22px;
    line-height: 1.15;
}

.menu-management-header p:not(.eyebrow) {
    margin: 7px 0 0;
    color: #64748B;
    font-size: 13px;
}

.menu-management-actions,
.menu-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.menu-action-btn,
.menu-filter-btn,
.menu-form-actions .btn,
.menu-panel-close {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 13px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

.menu-action-btn.is-active {
    background: #1D4ED8 !important;
}

.menu-panel-stack {
    display: grid;
    gap: 16px;
}

.menu-builder-card {
    padding: 18px 20px !important;
}

.menu-builder-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.menu-category-form-grid,
.menu-item-form-grid,
.menu-combo-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    align-items: end;
}

.menu-category-form-grid .field:last-child,
.menu-description-field {
    grid-column: 1 / -1;
}

.menu-management-page .field {
    margin: 0 !important;
    gap: 6px !important;
}

.menu-management-page .field label,
.menu-toggle-control strong {
    color: #334155 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.menu-management-page input:not([type="checkbox"]):not([type="hidden"]),
.menu-management-page select,
.menu-management-page .select2-container .select2-selection--single,
.menu-management-page .select2-container .select2-selection--multiple {
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    border: 1px solid #CBD5E1 !important;
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-size: 12px !important;
}

.menu-management-page textarea {
    min-height: 82px !important;
    max-height: 96px;
    border-radius: 8px !important;
    border: 1px solid #CBD5E1 !important;
    color: #0F172A !important;
    font-size: 12px !important;
    resize: vertical;
}

.menu-price-input {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    height: 38px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    overflow: hidden;
    background: #FFFFFF;
}

.menu-price-input span {
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F8FAFC;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    border-right: 1px solid #CBD5E1;
}

.menu-price-input input {
    border: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
}

.menu-upload-control {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border: 1px dashed #93C5FD;
    border-radius: 8px;
    background: #F8FAFC;
    cursor: pointer;
}

.menu-upload-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.menu-upload-control span {
    color: #2563EB;
    font-size: 12px;
    font-weight: 800;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-upload-control small {
    color: #64748B;
    font-size: 10px;
    font-weight: 600;
}

.menu-toggle-control {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    margin: 0;
}

.menu-toggle-control input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.menu-toggle-control span {
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #CBD5E1;
    position: relative;
    transition: background-color .2s ease;
}

.menu-toggle-control span::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 2px;
    left: 2px;
    border-radius: 999px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .2);
    transition: transform .2s ease;
}

.menu-toggle-control input:checked + span {
    background: #22C55E;
}

.menu-toggle-control input:checked + span::after {
    transform: translateX(16px);
}

.menu-filter-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(170px, .7fr) minmax(150px, .55fr) auto auto;
    gap: 10px;
    align-items: end;
    padding: 14px 16px !important;
}

.menu-table-card,
.menu-combo-list-card {
    padding: 18px !important;
}

.menu-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
}

.menu-management-table,
.menu-combo-table {
    min-width: 860px;
    background: #FFFFFF !important;
}

.menu-management-table th,
.menu-management-table td,
.menu-combo-table th,
.menu-combo-table td {
    padding: 11px 14px !important;
    vertical-align: middle !important;
    font-size: 12px;
}

.menu-management-table th,
.menu-combo-table th {
    background: #F8FAFC;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.menu-table-thumb {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #E2E8F0;
    display: block;
}

.menu-management-table td strong,
.menu-combo-table td strong {
    display: block;
    color: #0F172A;
    font-size: 12px;
    font-weight: 800;
}

.menu-management-table td small,
.menu-combo-table td small {
    display: block;
    margin-top: 3px;
    color: #64748B;
    font-size: 11px;
    font-weight: 600;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.menu-chip-list span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 11px;
    font-weight: 700;
}

.menu-empty {
    padding: 18px;
    text-align: center;
    color: #64748B;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 980px) {
    .menu-management-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .menu-filter-card,
    .menu-category-form-grid,
    .menu-item-form-grid,
    .menu-combo-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .menu-filter-card,
    .menu-category-form-grid,
    .menu-item-form-grid,
    .menu-combo-form-grid {
        grid-template-columns: 1fr;
    }

    .menu-form-actions,
    .menu-management-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Clean premium Profile page */
.profile-page {
    display: grid;
    gap: 18px;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(240px, 30%) minmax(0, 70%);
    gap: 18px;
    align-items: start;
}

.profile-summary-card,
.profile-settings-card,
.profile-danger-zone {
    background: #FFFFFF !important;
    border: 1px solid #D9E2EC !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04) !important;
}

.profile-summary-card {
    min-height: 360px;
    padding: 22px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    text-align: center;
}

.profile-summary-avatar {
    width: 96px;
    height: 96px;
    min-width: 96px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #2563EB;
    font-size: 34px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .12);
}

.profile-summary-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.profile-summary-copy h2 {
    margin: 0;
    color: #0F172A;
    font-size: 22px;
    line-height: 1.2;
}

.profile-summary-copy p {
    margin: 7px 0 12px;
    color: #64748B;
    font-size: 13px;
    font-weight: 600;
    word-break: break-word;
}

.profile-summary-meta {
    width: 100%;
    margin-top: 4px;
    padding: 12px;
    border-radius: 10px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
}

.profile-summary-meta span {
    display: block;
    color: #64748B;
    font-size: 11px;
    font-weight: 700;
}

.profile-summary-meta strong {
    display: block;
    margin-top: 4px;
    color: #0F172A;
    font-size: 13px;
    font-weight: 800;
}

.profile-settings-card {
    padding: 20px 22px !important;
}

.profile-settings-head {
    margin-bottom: 16px !important;
}

.profile-settings-head h2 {
    margin: 0;
    color: #0F172A;
    font-size: 22px;
    line-height: 1.2;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.profile-form-grid .field {
    margin: 0 !important;
    gap: 6px !important;
}

.profile-form-grid .field label {
    color: #334155 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.profile-form-grid input:not([type="checkbox"]):not([type="hidden"]):not([type="file"]),
.profile-form-grid .password-wrapper input {
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 8px !important;
    border: 1px solid #CBD5E1 !important;
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 0 12px !important;
}

.profile-form-grid .password-wrapper input {
    padding-right: 45px !important;
}

.profile-readonly-control {
    background: #F8FAFC !important;
    color: #475569 !important;
    cursor: not-allowed;
}

.profile-form-grid .phone-input-group {
    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
}

.profile-form-grid .phone-input-group .phone-country-select,
.profile-form-grid .phone-input-group input {
    height: 40px !important;
    min-height: 40px !important;
    font-size: 12px !important;
}

.profile-upload-control {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px dashed #93C5FD;
    background: #F8FAFC;
    cursor: pointer;
}

.profile-upload-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-upload-control span {
    color: #2563EB;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.profile-upload-control small {
    color: #64748B;
    font-size: 10px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-save-actions {
    align-self: end;
    justify-content: flex-end !important;
}

.profile-save-actions .btn {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 18px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.profile-danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px !important;
}

@media (max-width: 980px) {
    .profile-layout {
        grid-template-columns: minmax(220px, 35%) minmax(0, 65%);
    }
}

@media (max-width: 760px) {
    .profile-layout,
    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-summary-card {
        min-height: 0;
    }

    .profile-danger-zone {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-save-actions {
        justify-content: flex-start !important;
    }
}

/* Final landing contact visibility and page-scroll fix */
html.public-document {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: auto !important;
  scrollbar-color: #64748B #E2E8F0 !important;
}

body.public-page {
  height: auto !important;
  min-height: 100vh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: auto !important;
  -ms-overflow-style: auto !important;
  scrollbar-color: #64748B #E2E8F0 !important;
}

html.public-document::-webkit-scrollbar,
body.public-page::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
  display: block !important;
}

html.public-document::-webkit-scrollbar-track,
body.public-page::-webkit-scrollbar-track {
  background: #E2E8F0 !important;
}

html.public-document::-webkit-scrollbar-thumb,
body.public-page::-webkit-scrollbar-thumb {
  background: #64748B !important;
  border: 2px solid #E2E8F0 !important;
  border-radius: 999px !important;
}

body.public-page .landing-main {
  display: block !important;
  min-height: auto !important;
  overflow: visible !important;
  padding-bottom: 28px !important;
}

body.public-page .landing-hero {
  min-height: calc(100vh - 58px) !important;
  padding-top: 42px !important;
  padding-bottom: 42px !important;
}

body.public-page .landing-contact-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: calc(100vh - 120px) !important;
  margin-top: 0 !important;
}

body.public-page .landing-footer {
  margin-top: 20px !important;
}

/* Native two-section landing scroll: Hero then Contact */
html.public-document {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  scroll-behavior: smooth !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: auto !important;
  scrollbar-color: #64748B #E2E8F0 !important;
}

body.public-page {
  display: block !important;
  position: static !important;
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  scrollbar-width: auto !important;
  -ms-overflow-style: auto !important;
  scrollbar-color: #64748B #E2E8F0 !important;
}

html.public-document::-webkit-scrollbar,
body.public-page::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
  display: block !important;
}

html.public-document::-webkit-scrollbar-track,
body.public-page::-webkit-scrollbar-track {
  background: #E2E8F0 !important;
}

html.public-document::-webkit-scrollbar-thumb,
body.public-page::-webkit-scrollbar-thumb {
  background: #64748B !important;
  border: 2px solid #E2E8F0 !important;
  border-radius: 999px !important;
}

body.public-page .landing-main {
  display: block !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body.public-page .landing-hero {
  min-height: calc(100svh - 58px) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: clamp(28px, 5vh, 58px) !important;
  padding-bottom: clamp(28px, 5vh, 58px) !important;
}

body.public-page .landing-contact-section {
  display: block !important;
  min-height: calc(100svh - 78px) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  scroll-margin-top: 76px !important;
}

.landing-contact-jump {
  color: #2563EB !important;
  background: #FFFFFF !important;
  border: 1px solid #BFDBFE !important;
  box-shadow: none !important;
}

.landing-contact-jump:hover {
  color: #1D4ED8 !important;
  background: #EFF6FF !important;
  border-color: #93C5FD !important;
}

/* Final landing contact polish */
body.public-page .landing-contact-jump {
  display: none !important;
}

body.public-page .landing-back-top {
  width: fit-content;
  color: #2563EB;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

body.public-page .landing-back-top:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

body.public-page .whatsapp-float,
body.public-page .whatsapp-fab,
.public-page .whatsapp-float,
.public-page .whatsapp-fab {
  right: 46px !important;
  bottom: 68px !important;
}

body.public-page .landing-contact-form {
  padding-bottom: 28px !important;
}

/* Landing in-page Free Trial and Contact popups */
body.public-page.landing-modal-open {
  overflow: hidden !important;
}

body.public-page .landing-footer nav button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

body.public-page .landing-footer nav button:hover {
  color: #2563EB;
}

body.public-page .landing-contact-message-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
}

body.public-page .landing-contact-message-card p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  max-width: 520px;
}

body.public-page .landing-modal[hidden] {
  display: none !important;
}

body.public-page .landing-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.public-page .landing-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}

body.public-page .landing-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 780px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  padding: 24px;
}

body.public-page .landing-contact-modal-card {
  width: min(100%, 980px);
}

body.public-page .landing-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

body.public-page .landing-modal-header h2 {
  margin: 4px 0 0;
  color: #0F172A;
  font-size: 26px;
  line-height: 1.15;
}

body.public-page .landing-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  background: #FFFFFF;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

body.public-page .landing-modal-close:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

body.public-page .landing-modal-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.public-page .landing-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.public-page .landing-modal-grid label,
body.public-page .landing-modal-grid .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

body.public-page .landing-modal-grid span,
body.public-page .landing-modal-grid label > label,
body.public-page .landing-modal-grid .field > label {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

body.public-page .landing-modal-grid input,
body.public-page .landing-modal-grid select,
body.public-page .landing-modal-grid textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 14px;
  padding: 0 14px;
}

body.public-page .landing-modal-grid textarea {
  min-height: 118px;
  padding: 12px 14px;
  resize: vertical;
}

body.public-page .landing-modal-grid input:focus,
body.public-page .landing-modal-grid select:focus,
body.public-page .landing-modal-grid textarea:focus {
  outline: 0;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

body.public-page .landing-modal-grid small {
  color: #DC2626;
  font-size: 12px;
  font-weight: 700;
}

body.public-page .landing-modal-full {
  grid-column: 1 / -1;
}

body.public-page .landing-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

body.public-page .landing-modal-actions .btn {
  min-height: 42px;
}

body.public-page .landing-contact-popup-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: stretch;
}

body.public-page .landing-contact-info-panel,
body.public-page .landing-contact-popup-form {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  padding: 22px;
}

body.public-page .landing-contact-info-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

body.public-page .landing-contact-info-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

body.public-page .landing-contact-info-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #EFF6FF;
  color: #2563EB;
  font-size: 14px;
  font-weight: 800;
}

body.public-page .landing-contact-info-item span:not(.landing-contact-info-icon) {
  display: block;
  color: #64748B;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

body.public-page .landing-contact-info-item strong {
  display: block;
  color: #0F172A;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body.public-page .landing-contact-popup-form h3 {
  margin: 0 0 16px;
  color: #0F172A;
  font-size: 18px;
  line-height: 1.2;
}

body.public-page .landing-contact-popup-form .landing-modal-actions {
  justify-content: stretch;
}

body.public-page .landing-contact-popup-form .landing-modal-actions .btn {
  width: 100%;
}

.trial-access-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.trial-access-actions form {
  margin: 0;
}

.trial-access-actions .btn {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.trial-access-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #FFFFFF;
}

.trial-access-current span {
  color: #64748B;
  font-size: 12px;
  font-weight: 700;
}

.trial-access-current strong {
  color: #0F172A;
  font-size: 14px;
  font-weight: 800;
}

.trial-access-table td {
  vertical-align: middle;
}

body.public-page .landing-hero-powered {
  margin: 14px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.4;
}

body.public-page .landing-hero-powered strong {
  color: #0F172A;
  font-weight: 800;
}

body.public-page .landing-contact-section {
  display: none !important;
}

/* Hide the visible scrollbar on the public landing page while keeping scroll enabled. */
html.public-document,
body.public-page {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html.public-document::-webkit-scrollbar,
body.public-page::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

@media (max-width: 700px) {
  body.public-page .landing-modal {
    align-items: flex-start;
    padding: 12px;
  }

  body.public-page .landing-modal-card {
    padding: 18px;
  }

  body.public-page .landing-modal-grid {
    grid-template-columns: 1fr;
  }

  body.public-page .landing-contact-popup-grid {
    grid-template-columns: 1fr;
  }

  body.public-page .landing-modal-actions {
    flex-direction: column-reverse;
  }

  body.public-page .landing-modal-actions .btn {
    width: 100%;
  }
}

.superadmin-profile-page.profile-card {
  display: block;
  place-items: initial;
  align-content: initial;
  gap: 0;
  max-width: 1120px;
  padding: 0;
  text-align: left;
}

/* Inventory row action dialogs */
.inventory-action-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: #0f172a;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.inventory-action-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.inventory-dialog-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 20px; }
.inventory-dialog-head,
.inventory-dialog-form > p,
.inventory-dialog-actions { grid-column: 1 / -1; }
.inventory-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.inventory-dialog-head h3 { margin: 2px 0 0; }
.inventory-dialog-close { width: 32px; height: 32px; padding: 0; color: #475569; background: transparent; border: 0; border-radius: 6px; font-size: 24px; line-height: 1; cursor: pointer; }
.inventory-dialog-close:hover { color: #0f172a; background: #f1f5f9; }
.inventory-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.inventory-delete-dialog { width: min(460px, calc(100vw - 32px)); }

@media (max-width: 640px) {
  .inventory-dialog-form { grid-template-columns: 1fr; padding: 16px; }
}

/* Billing invoice document */
.billing-invoice-document {
  height: auto !important;
  min-height: 0 !important;
  max-width: 900px !important;
  padding: 24px !important;
}

.billing-invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #111827;
}

.billing-invoice-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.billing-invoice-brand .invoice-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  object-fit: contain;
}

.billing-invoice-brand h2,
.billing-invoice-meta h1 {
  margin: 0;
  color: #111827;
}

.billing-invoice-brand h2 { margin-bottom: 6px; font-size: 22px; }
.billing-invoice-brand p,
.billing-invoice-meta p,
.billing-invoice-details p { margin: 3px 0; color: #4b5563; font-size: 12px; }

.billing-invoice-meta { min-width: 250px; text-align: right; }
.billing-invoice-meta h1 { margin: 4px 0 8px; font-size: 21px; }
.billing-invoice-kicker,
.billing-detail-label {
  display: block;
  color: #2563eb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.billing-invoice-details {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.billing-invoice-details .billing-detail-label { margin-bottom: 7px; color: #64748b; }
.billing-invoice-table-wrap { width: 100%; overflow-x: auto; }
.billing-items-table { margin: 0 !important; }
.billing-items-table th:nth-child(n+2),
.billing-items-table td:nth-child(n+2),
.invoice-totals td { text-align: right; }

.billing-invoice-document .invoice-totals {
  width: min(100%, 470px) !important;
  margin: 16px 0 0 auto !important;
}

.billing-invoice-footer { margin-top: 16px; text-align: center; }
.billing-invoice-footer > p { margin: 0 0 8px; color: #64748b; font-size: 12px; }
.billing-invoice-document .billing-document-footer { margin-top: 0 !important; }

@media (max-width: 720px) {
  .billing-invoice-header { flex-direction: column; gap: 16px; }
  .billing-invoice-meta { min-width: 0; text-align: left; }
  .billing-invoice-details { grid-template-columns: 1fr; gap: 12px; }
}
