/* ============================================================================
   Cube D — Global design-system stylesheet.
   Premium dark luxury theme: metallic gold + matte black + silver, derived
   directly from the Cube D brand mark. Loaded on every page.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Kufi+Arabic:wght@400;500;600;700;800&display=swap');

:root {
  --gold: #C9A227;
  --gold-glow: #F0C93D;
  --gold-light: #E6C965;
  --ink-950: #0B0B0C;
  --ink-900: #0F1012;
  --ink-800: #181A1D;
  --ink-700: #232428;
  --ink-600: #33343A;
  --silver: #9CA3AF;
  --app-bg: #0B0B0C;
  --surface-main: #0F1012;
  --surface-elevated: #181A1D;
  --surface-muted: #232428;
  --text-primary: #F4F4F5;
  --text-secondary: #C4C7CE;
  --text-muted: #8C919B;
  --border-default: #2B2D32;
  --border-subtle: #202226;
  --focus-ring: #F0C93D;
  --status-success: #22A669;
  --status-warning: #C98A1D;
  --status-error: #B0362F;
  --status-info: #3B82C4;
}

* { box-sizing: border-box; }

html, body {
  background: var(--ink-950);
  color: #F4F4F5;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

html[data-theme="light"] {
  color-scheme: light;
  --gold: #C99A18;
  --gold-glow: #C99A18;
  --gold-light: #AD8210;
  --ink-950: #F4F2EC;
  --ink-900: #FCFBF8;
  --ink-800: #F0EDE6;
  --ink-700: #DDD9CF;
  --ink-600: #B8B2A7;
  --silver: #62666F;
  --app-bg: #F4F2EC;
  --surface-main: #FCFBF8;
  --surface-elevated: #FFFFFF;
  --surface-muted: #F8F7F3;
  --text-primary: #171717;
  --text-secondary: #62666F;
  --text-muted: #858A94;
  --border-default: #DDD9CF;
  --border-subtle: #EAE7DF;
  --focus-ring: #C99A18;
  --status-success: #16845B;
  --status-warning: #B7791F;
  --status-error: #C2413A;
  --status-info: #3973B8;
  --gold-tint: #F8F0D7;
}
html[data-theme="light"] body {
  background: var(--app-bg);
  color: var(--text-primary);
}
html[data-theme="light"] body::selection {
  color: #171717;
  background: #EBD997;
}
html[data-theme="light"] .app-bg {
  background-color: var(--app-bg);
  background-image:
    radial-gradient(circle at 12% -12%, rgba(201,154,24,.08), transparent 38%),
    linear-gradient(180deg,#F8F7F3 0%,#F4F2EC 28%,#F4F2EC 100%);
}
html[data-theme="light"] .app-shell {
  background: var(--app-bg);
}
html[data-theme="light"] .app-main-content {
  background:
    radial-gradient(circle at 88% -20%, rgba(201,154,24,.045), transparent 31%),
    var(--app-bg);
}
html[data-theme="light"] .app-sidebar-surface {
  background: #F8F7F3 !important;
  border-color: var(--border-default) !important;
  box-shadow: 10px 0 28px -30px rgba(23,23,23,.42);
}
html[data-theme="light"] .app-topbar-surface {
  background: rgba(252,251,248,.94) !important;
  border-color: var(--border-default) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.9),0 8px 24px -26px rgba(23,23,23,.5);
}
html[data-theme="light"] .app-popover {
  background: var(--surface-elevated) !important;
  border-color: var(--border-default) !important;
  box-shadow: 0 18px 48px -20px rgba(23,23,23,.28),0 2px 8px rgba(23,23,23,.05);
}
html[data-theme="light"] .bg-ink-950,
html[data-theme="light"] .bg-ink-950\/80,
html[data-theme="light"] .bg-ink-950\/70,
html[data-theme="light"] .bg-ink-950\/60,
html[data-theme="light"] .bg-ink-950\/55,
html[data-theme="light"] .bg-ink-950\/50,
html[data-theme="light"] .bg-ink-950\/45,
html[data-theme="light"] .bg-ink-950\/40,
html[data-theme="light"] .bg-ink-950\/35,
html[data-theme="light"] .bg-ink-950\/20 {
  background-color: var(--surface-main) !important;
}
html[data-theme="light"] .bg-ink-900,
html[data-theme="light"] .bg-ink-900\/80,
html[data-theme="light"] .bg-ink-900\/70,
html[data-theme="light"] .bg-ink-900\/65,
html[data-theme="light"] .bg-ink-900\/60 {
  background-color: var(--surface-elevated) !important;
}
html[data-theme="light"] .bg-ink-800 {
  background-color: var(--surface-muted) !important;
}
html[data-theme="light"] .bg-ink-700,
html[data-theme="light"] .bg-ink-700\/60 {
  background-color: #E8E4DB !important;
}
html[data-theme="light"] .bg-white {
  background-color: var(--surface-elevated) !important;
}
html[data-theme="light"] .bg-white\/5,
html[data-theme="light"] .bg-black\/15,
html[data-theme="light"] .bg-black\/20,
html[data-theme="light"] .bg-black\/25,
html[data-theme="light"] .bg-black\/30 {
  background-color: rgba(98,102,111,.055) !important;
}
html[data-theme="light"] .text-white,
html[data-theme="light"] .text-ink-50,
html[data-theme="light"] .text-ink-100,
html[data-theme="light"] .text-ink-200 {
  color: var(--text-primary) !important;
}
html[data-theme="light"] .text-ink-300 {
  color: #454951 !important;
}
html[data-theme="light"] .text-ink-400 {
  color: var(--text-secondary) !important;
}
html[data-theme="light"] .text-ink-500,
html[data-theme="light"] .text-ink-600 {
  color: var(--text-muted) !important;
}
html[data-theme="light"] .text-gold-200,
html[data-theme="light"] .text-gold-300,
html[data-theme="light"] .text-gold-400,
html[data-theme="light"] .text-gold-500 {
  color: #8B650C !important;
}
html[data-theme="light"] .text-success-light,
html[data-theme="light"] .text-emerald-200,
html[data-theme="light"] .text-emerald-300,
html[data-theme="light"] .text-emerald-400 {
  color: var(--status-success) !important;
}
html[data-theme="light"] .text-warning-light,
html[data-theme="light"] .text-amber-300,
html[data-theme="light"] .text-amber-400 {
  color: #926016 !important;
}
html[data-theme="light"] .text-danger-light,
html[data-theme="light"] .text-red-300,
html[data-theme="light"] .text-red-400 {
  color: var(--status-error) !important;
}
html[data-theme="light"] .text-info-light {
  color: var(--status-info) !important;
}
html[data-theme="light"] .border-ink-600,
html[data-theme="light"] .border-ink-700,
html[data-theme="light"] .border-ink-800 {
  border-color: var(--border-default) !important;
}
html[data-theme="light"] .border-gold-300,
html[data-theme="light"] .border-gold-400,
html[data-theme="light"] .border-gold-500,
html[data-theme="light"] .border-gold-500\/70,
html[data-theme="light"] .border-gold-500\/60,
html[data-theme="light"] .border-gold-500\/55,
html[data-theme="light"] .border-gold-500\/50,
html[data-theme="light"] .border-gold-500\/45,
html[data-theme="light"] .border-gold-500\/40,
html[data-theme="light"] .border-gold-500\/35,
html[data-theme="light"] .border-gold-500\/30,
html[data-theme="light"] .border-gold-500\/25,
html[data-theme="light"] .border-gold-500\/20 {
  border-color: rgba(201,154,24,.42) !important;
}
html[data-theme="light"] .ui-card {
  background: var(--surface-main) !important;
  border-color: var(--border-default) !important;
  box-shadow: 0 1px 2px rgba(23,23,23,.025),0 10px 30px -28px rgba(23,23,23,.34);
}
html[data-theme="light"] .ui-card:hover {
  box-shadow: 0 1px 2px rgba(23,23,23,.035),0 16px 34px -28px rgba(23,23,23,.38);
}
html[data-theme="light"] .glass-card {
  background: rgba(255,255,255,.985);
  border-color: var(--border-default);
  box-shadow: 0 24px 64px -26px rgba(23,23,23,.28),0 2px 8px rgba(23,23,23,.045);
}
html[data-theme="light"] .ui-dialog {
  background: var(--surface-elevated);
}
html[data-theme="light"] .ui-control,
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  color: var(--text-primary) !important;
  background-color: #FFFFFF !important;
  border-color: var(--border-default) !important;
  box-shadow: 0 1px 1px rgba(23,23,23,.025);
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #8B9099 !important;
  opacity: 1;
}
html[data-theme="light"] input:hover:not(:disabled),
html[data-theme="light"] select:hover:not(:disabled),
html[data-theme="light"] textarea:hover:not(:disabled) {
  border-color: #C6C0B4 !important;
}
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201,154,24,.16) !important;
}
html[data-theme="light"] input:disabled,
html[data-theme="light"] select:disabled,
html[data-theme="light"] textarea:disabled {
  color: #777B83 !important;
  background: #EFEBE3 !important;
  cursor: not-allowed;
}
html[data-theme="light"] select option {
  color: var(--text-primary);
  background: #FFFFFF;
}
html[data-theme="light"] .ui-table {
  background: var(--surface-main);
  border-color: var(--border-default) !important;
  box-shadow: 0 1px 2px rgba(23,23,23,.02);
}
html[data-theme="light"] .ui-table-head,
html[data-theme="light"] thead th {
  color: #4F535B !important;
  background: #F0EDE6 !important;
  border-color: var(--border-default) !important;
}
html[data-theme="light"] .ui-table-cell,
html[data-theme="light"] tbody td {
  color: var(--text-primary) !important;
  border-color: var(--border-subtle) !important;
}
html[data-theme="light"] tbody tr {
  background: transparent;
}
html[data-theme="light"] tbody tr:hover,
html[data-theme="light"] .table-row-hover:hover {
  background: #F8F4E8 !important;
}
html[data-theme="light"] .table-zebra:nth-child(even) {
  background: #FAF9F5 !important;
}
html[data-theme="light"] .ui-empty-state {
  color: var(--text-secondary);
}
html[data-theme="light"] .ui-empty-state > div:first-child {
  background: #F4F1E9 !important;
  border-color: var(--border-subtle) !important;
}
html[data-theme="light"] .ui-button-secondary {
  color: #72520A !important;
  background: #FCFBF8 !important;
  border-color: rgba(201,154,24,.42) !important;
  box-shadow: 0 1px 2px rgba(23,23,23,.025);
}
html[data-theme="light"] .ui-button-secondary:hover {
  background: var(--gold-tint, #F8F0D7) !important;
  border-color: var(--gold) !important;
}
html[data-theme="light"] .ui-button-ghost {
  color: #454951 !important;
}
html[data-theme="light"] .ui-button-ghost:hover {
  color: var(--text-primary) !important;
  background: #EEEAE2 !important;
}
html[data-theme="light"] .bg-gold-500\/5 {
  background-color: rgba(201,154,24,.055) !important;
}
html[data-theme="light"] .bg-gold-500\/10,
html[data-theme="light"] .bg-gold-500\/12,
html[data-theme="light"] .bg-gold-500\/15 {
  background-color: rgba(201,154,24,.10) !important;
}
html[data-theme="light"] .bg-gold-500\/20,
html[data-theme="light"] .bg-gold-500\/25 {
  background-color: rgba(201,154,24,.15) !important;
}
html[data-theme="light"] .bg-success\/5,
html[data-theme="light"] .bg-success\/10,
html[data-theme="light"] .bg-success\/12,
html[data-theme="light"] .bg-success\/15,
html[data-theme="light"] .bg-success\/20,
html[data-theme="light"] .bg-success\/25,
html[data-theme="light"] .bg-emerald-500\/10 {
  background-color: rgba(22,132,91,.09) !important;
}
html[data-theme="light"] .bg-warning\/10,
html[data-theme="light"] .bg-warning\/12,
html[data-theme="light"] .bg-warning\/20 {
  background-color: rgba(183,121,31,.10) !important;
}
html[data-theme="light"] .bg-danger\/10,
html[data-theme="light"] .bg-danger\/12,
html[data-theme="light"] .bg-danger\/15,
html[data-theme="light"] .bg-danger\/20,
html[data-theme="light"] .bg-danger\/25 {
  background-color: rgba(194,65,58,.085) !important;
}
html[data-theme="light"] .bg-info\/10,
html[data-theme="light"] .bg-info\/12 {
  background-color: rgba(57,115,184,.09) !important;
}
html[data-theme="light"] [class*="from-gold-500"][class*="to-ink-950"] {
  background-image: linear-gradient(135deg,rgba(248,240,215,.82),rgba(252,251,248,.96)) !important;
}
html[data-theme="light"] [class*="from-ink-800"][class*="via-ink-900"],
html[data-theme="light"] [class*="via-ink-900"][class*="to-ink-950"] {
  background-image: linear-gradient(135deg,#F4F1E9,#FCFBF8) !important;
}
html[data-theme="light"] .nav-active {
  color: #684A08 !important;
  background: linear-gradient(90deg,#F8F0D7 0%,rgba(248,240,215,.55) 78%,transparent 100%);
  border-color: var(--gold);
}
html[data-theme="light"] #app-sidebar nav a:not(.nav-active):hover,
html[data-theme="light"] #sidebar-toggle:hover,
html[data-theme="light"] [data-dropdown-menu] a:hover,
html[data-theme="light"] [data-dropdown-menu] button:hover {
  color: var(--text-primary) !important;
  background: #EEEAE2 !important;
}
html[data-theme="light"] [data-modal-backdrop],
html[data-theme="light"] #mobile-sidebar-overlay {
  background: rgba(23,23,23,.44) !important;
}
html[data-theme="light"] [role="tooltip"],
html[data-theme="light"] .app-tooltip {
  color: #F8F7F3 !important;
  background: #272727 !important;
  border-color: #424242 !important;
  box-shadow: 0 10px 30px -12px rgba(23,23,23,.46);
}
html[data-theme="light"] #toast-container > div {
  color: var(--text-primary) !important;
  background: #FFFFFF !important;
  border-color: var(--border-default) !important;
  box-shadow: 0 16px 42px -18px rgba(23,23,23,.3),0 2px 8px rgba(23,23,23,.06);
}
html[data-theme="light"] [class*="border-success"] {
  border-color: rgba(22,132,91,.34) !important;
}
html[data-theme="light"] [class*="border-warning"],
html[data-theme="light"] [class*="border-amber"] {
  border-color: rgba(183,121,31,.34) !important;
}
html[data-theme="light"] [class*="border-danger"],
html[data-theme="light"] [class*="border-red"] {
  border-color: rgba(194,65,58,.34) !important;
}
html[data-theme="light"] [class*="border-info"] {
  border-color: rgba(57,115,184,.34) !important;
}
html[data-theme="light"] .shadow-card,
html[data-theme="light"] .shadow-card-lg {
  box-shadow: 0 14px 36px -28px rgba(23,23,23,.4),0 1px 2px rgba(23,23,23,.025) !important;
}
html[data-theme="light"] .auth-shell {
  background:
    radial-gradient(circle at 12% 8%,rgba(201,154,24,.13),transparent 28%),
    radial-gradient(circle at 88% 82%,rgba(23,23,23,.045),transparent 32%),
    linear-gradient(145deg,#F8F7F3 0%,#F4F2EC 48%,#EFEBE2 100%);
}
html[data-theme="light"] .auth-shell .ambient-glow {
  opacity: .08;
}
html[data-theme="light"] .auth-shell .glass-card {
  background: rgba(252,251,248,.97);
}
html[data-theme="light"] .skeleton {
  background: linear-gradient(90deg,#EBE7DF 25%,#F7F5F0 37%,#EBE7DF 63%);
  background-size: 700px 100%;
}
html[data-theme="light"] kbd.kbd-chip {
  color: #62666F;
  background: #EEEAE2;
  border-color: #D8D2C7;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #C7C1B6;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}
html[data-theme="light"] a:focus-visible,
html[data-theme="light"] button:focus-visible,
html[data-theme="light"] input:focus-visible,
html[data-theme="light"] select:focus-visible,
html[data-theme="light"] textarea:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  html[data-theme="light"] .app-main-content {
    background: var(--app-bg);
  }
  html[data-theme="light"] .ui-card {
    box-shadow: 0 1px 2px rgba(23,23,23,.025);
  }
}

/* Approved Cube D POS terminal family */
@media (min-width: 1280px) {
  #pos-root.pos-approved-template {
    display: grid;
    grid-template-columns: minmax(320px, 27fr) minmax(520px, 51fr) minmax(250px, 22fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "cart scan scan" "cart catalog actions" "payments payments payments";
    gap: 8px;
    height: calc(100vh - 12.25rem);
    min-height: 660px;
  }
  #pos-root.pos-approved-template > .pos-workspace,
  #pos-root.pos-approved-template > .pos-cart-column { display: contents; }
  #pos-root.pos-approved-template .pos-scan-panel {
    grid-area: scan;
    border-radius: 10px;
    box-shadow: none;
  }
  #pos-root.pos-approved-template .pos-scan-panel > .grid {
    grid-template-columns: minmax(0, 1fr) minmax(180px, .3fr) minmax(180px, .3fr);
    padding: 10px 12px;
  }
  #pos-root.pos-approved-template .pos-scan-panel .sm\:col-span-2 { grid-column: auto; }
  #pos-root.pos-approved-template #pos-location-tools,
  #pos-root.pos-approved-template #pos-last-sale { display: none !important; }
  #pos-root.pos-approved-template .pos-catalog-panel {
    grid-area: catalog;
    min-height: 0;
    padding: 8px;
    border-radius: 10px;
  }
  #pos-root.pos-approved-template #pos-product-grid {
    max-height: none;
    height: calc(100% - 7rem);
    min-height: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  #pos-root.pos-approved-template #pos-product-grid > button {
    min-height: 142px;
    border-radius: 5px;
    padding: 8px;
  }
  #pos-root.pos-approved-template .pos-action-panel {
    grid-area: actions;
    min-height: 0;
    overflow-y: auto;
    border-radius: 10px;
  }
  #pos-root.pos-approved-template #pos-numeric-keypad {
    grid-area: actions;
    align-self: end;
    margin: 0 8px 8px;
    max-height: 46%;
    overflow: auto;
    border-radius: 8px;
    z-index: 2;
    background: #0b0c0e;
  }
  #pos-root.pos-approved-template #pos-context-actions:has(+ .pos-cart-column) {
    padding-bottom: min(48vh, 330px);
  }
  #pos-root.pos-approved-template .pos-cart-panel {
    grid-area: cart;
    position: static;
    height: 100%;
    min-height: 0;
    border-radius: 10px;
    box-shadow: none;
  }
  #pos-root.pos-approved-template .pos-cart-panel #pos-cart-items { padding: 6px; }
  #pos-root.pos-approved-template .pos-cart-panel #pos-cart-items > div {
    border-radius: 5px;
    padding: 8px;
  }
  #pos-root.pos-approved-template .pos-payment-bar {
    grid-area: payments;
    border-radius: 10px;
  }
  #pos-root.pos-approved-template .pos-cart-charge-fallback { display: none; }
}
#pos-root.pos-approved-template[data-active-pos-template="restaurant"] .pos-action-panel { padding-bottom: 8px; }
#pos-root.pos-approved-template[data-active-pos-template="restaurant"] #pos-numeric-keypad { display: none; }

/* Approved Grocery & Convenience terminal */
@media (min-width: 1280px) {
  body:has(#pos-root[data-active-pos-template="grocery"]) #app-sidebar,
  body:has(#pos-root[data-active-pos-template="grocery"]) .app-topbar-surface {
    display: none !important;
  }
  body:has(#pos-root[data-active-pos-template="grocery"]) .app-main-content {
    padding: 8px !important;
    overflow: hidden;
    background: #090c0f;
  }
  body:has(#pos-root[data-active-pos-template="grocery"]) .pos-register {
    margin: 0 !important;
  }
  body:has(#pos-root[data-active-pos-template="grocery"]) .pos-register > :first-child,
  body:has(#pos-root[data-active-pos-template="grocery"]) .pos-register > :nth-child(2) {
    display: none !important;
  }
  #pos-root.pos-approved-template[data-active-pos-template="grocery"] {
    grid-template-columns: minmax(320px,25.7fr) minmax(590px,49.5fr) minmax(300px,24.8fr);
    grid-template-rows: 62px minmax(230px,44fr) minmax(160px,56fr) 110px;
    grid-template-areas: "brand scan scan" "cart catalog actions" "cart catalog keypad" "payments payments payments";
    height: calc(100vh - 16px);
    min-height: 680px;
    gap: 8px;
    padding: 0;
    background: #090c0f;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-grocery-brand {
    grid-area: brand;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-grocery-brand img {
    width: 38px;
    height: 48px;
    object-fit: contain;
    object-position: left center;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-grocery-brand span {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .04em;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-scan-panel {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    border: 0;
    background: transparent;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-scan-panel > :first-child {
    display: none;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-scan-panel > .grid {
    grid-template-columns: minmax(360px,1fr) minmax(150px,190px) minmax(150px,190px) 50px;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-scan-panel label,
  #pos-root[data-active-pos-template="grocery"] #pos-scan-feedback {
    display: none !important;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-search {
    height: 50px;
    border: 1px solid #c9c9c9;
    border-radius: 5px;
    background: #f5f5f5;
    color: #171717;
    font-size: 14px;
    font-weight: 500;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-scan-panel select {
    height: 50px;
    border-radius: 3px;
    background: #25292d;
    font-size: 12px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-header-menu {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border: 1px solid #454a4f;
    border-radius: 3px;
    background: #25292d;
    color: #fff;
    font-size: 20px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-catalog-panel {
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 2px;
    background: #1d2124;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-catalog-panel > .mb-3:first-child {
    display: none;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-category-tabs {
    display: grid;
    grid-template-columns: repeat(6,minmax(0,1fr));
    gap: 1px;
    margin: 0;
    padding: 8px;
    overflow: visible;
    background: #202427;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-category-tabs button {
    width: auto;
    min-height: 42px;
    padding: 0 6px;
    border-radius: 2px;
    font-size: 12px;
  }
  #pos-root.pos-approved-template[data-active-pos-template="grocery"] #pos-product-grid {
    flex: 1;
    height: auto;
    max-height: none;
    grid-template-columns: repeat(5,minmax(0,1fr));
    grid-template-rows: none;
    grid-auto-rows: 150px;
    gap: 12px 10px;
    padding: 20px;
    overflow-y: auto;
  }
  #pos-root.pos-approved-template[data-active-pos-template="grocery"] #pos-product-grid > button {
    display: grid;
    grid-template-rows: 96px 49px 0 0;
    min-height: 0;
    padding: 0;
    border-radius: 1px;
    background: #fff;
    border-color: #080a0c;
    transform: none;
    overflow: hidden;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button > div:first-child {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 0;
    width: 100%;
    background: #fff;
    overflow: hidden;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-image-stage > span {
    position: absolute;
    top: 6px;
    right: 6px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-photo {
    width: 58px !important;
    height: 72px !important;
    max-width: 50%;
    max-height: 72%;
    padding: 3px;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    background: #fff !important;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-details {
    position: relative;
    display: block;
    height: 49px;
    min-height: 49px;
    padding: 5px 6px 16px;
    background: #24282b;
    overflow: hidden;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-title {
    display: -webkit-box;
    height: 26px;
    min-height: 26px;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 11px;
    line-height: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-code {
    display: none;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-footer {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 3px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin: 0;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-footer span:first-child {
    font-size: 9px;
    color: #e0b03a;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-footer span:last-child {
    display: none;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button[data-catalog-only="true"] {
    opacity: 1;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:disabled {
    opacity: 1;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:disabled .pos-product-photo {
    opacity: 1;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:disabled .pos-product-details {
    color: #9ca3af;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-action-panel {
    grid-area: actions;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    grid-template-rows: repeat(3,minmax(64px,1fr));
    row-gap: 14px;
    column-gap: 12px;
    padding: 12px;
    overflow: hidden;
    border-radius: 2px;
    background: #171a1d;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-action-panel > .grid {
    display: contents;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-action-button {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.15;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-action-button i {
    margin: 0 0 5px;
    color: #d9a832;
    font-size: 20px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-action-button [class*="text-[9px]"] {
    display: none;
  }
  #pos-root.pos-approved-template[data-active-pos-template="grocery"] #pos-numeric-keypad {
    grid-area: keypad;
    align-self: stretch;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 3px;
    border-radius: 0;
    overflow: hidden;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-numeric-keypad > :first-child {
    display: none;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-numeric-keypad > .grid {
    display: grid;
    height: 100%;
    grid-template-columns: repeat(4,minmax(0,1fr));
    grid-template-rows: repeat(4,minmax(0,1fr));
    gap: 3px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-key {
    min-height: 0;
    border: 0;
    border-radius: 10px;
    background: #303438;
    font-size: 16px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-key-enter {
    background: #d6a83c;
    color: #fff;
    font-size: 14px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-cart-panel {
    border-color: transparent;
    border-radius: 16px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-cart-panel > :first-child {
    min-height: 54px;
    padding: 8px 12px;
    border-radius: 0;
    background: #202427;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-cart-panel > :first-child h2 {
    text-transform: uppercase;
    font-size: 14px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-cart-panel #pos-cart-items > div {
    padding: 6px;
    border-radius: 12px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-cart-scan-orb {
    width: 178px;
    height: 178px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
    padding: 22px;
    border: 1px solid rgba(218,171,52,.28);
    border-radius: 999px;
    background: radial-gradient(circle at 50% 35%,rgba(218,171,52,.12),rgba(25,29,32,.92) 68%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04),0 14px 38px rgba(0,0,0,.28);
  }
  #pos-root[data-active-pos-template="grocery"] .pos-cart-scan-orb-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(218,171,52,.15);
    color: #dfad33;
    font-size: 22px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-cart-line {
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-cart-line:hover {
    background: #292e32;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-cart-line.is-selected {
    background: rgba(218,171,52,.12);
    box-shadow: inset 3px 0 0 #dfad33;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-catalog-panel,
  #pos-root[data-active-pos-template="grocery"] .pos-action-panel,
  #pos-root[data-active-pos-template="grocery"] #pos-numeric-keypad {
    border-color: transparent;
    border-radius: 16px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-action-button {
    justify-self: center;
    width: 54px;
    max-width: 100%;
    height: 54px;
    border-color: transparent;
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    flex-direction: row;
    gap: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: width .22s ease, border-radius .22s ease, background-color .22s ease, box-shadow .22s ease;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-action-button > i {
    flex: 0 0 28px;
    margin: 0;
    font-size: 21px;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-action-button > span:first-of-type {
    max-width: 0;
    margin-left: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 12px;
    transition: max-width .22s ease, margin-left .22s ease, opacity .16s ease;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-register-session-open.is-open {
    background: rgba(39,174,96,.14);
    box-shadow: inset 0 0 0 1px rgba(74,222,128,.26);
  }
  #pos-root[data-active-pos-template="grocery"] #pos-register-session-open.is-open > i {
    color: #4ade80;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-action-button:hover,
  #pos-root[data-active-pos-template="grocery"] .pos-action-button:focus-visible {
    width: calc(100% - 4px);
    border-radius: 14px;
    background: rgba(217,168,50,.12);
    box-shadow: inset 0 0 0 1px rgba(217,168,50,.32);
  }
  #pos-root[data-active-pos-template="grocery"] .pos-action-button:hover > span:first-of-type,
  #pos-root[data-active-pos-template="grocery"] .pos-action-button:focus-visible > span:first-of-type {
    max-width: 120px;
    margin-left: 6px;
    opacity: 1;
  }
  @media (hover: none) {
    #pos-root[data-active-pos-template="grocery"] .pos-action-button {
      width: calc(100% - 4px);
      border-radius: 14px;
    }
    #pos-root[data-active-pos-template="grocery"] .pos-action-button > span:first-of-type {
      max-width: 120px;
      margin-left: 6px;
      opacity: 1;
    }
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button {
    align-self: center;
    justify-self: center;
    width: 96px !important;
    height: 96px !important;
    grid-template-columns: 96px;
    grid-template-rows: 96px;
    border: 0 !important;
    border-radius: 999px !important;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,.22);
    z-index: 1;
    transform-origin: center;
    transition: width .22s ease, height .22s ease, border-radius .22s ease, box-shadow .22s ease;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button .pos-product-image-stage {
    height: 96px;
    width: 100%;
    border-radius: inherit;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button .pos-product-details {
    display: none;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-bubble-price {
    position: absolute !important;
    inset: auto auto 7px 50% !important;
    z-index: 2;
    min-width: 42px;
    padding: 3px 7px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(18,21,23,.9);
    color: #f0bd38;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-bubble-price:empty {
    display: none !important;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:hover,
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:focus-visible {
    z-index: 2;
    width: calc(100% - 4px) !important;
    height: 144px !important;
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: 86px 58px;
    border-radius: 30px !important;
    box-shadow: 0 14px 34px rgba(0,0,0,.5);
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:hover .pos-product-image-stage,
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:focus-visible .pos-product-image-stage {
    height: 86px;
    border-radius: 30px 30px 0 0;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:hover .pos-product-details,
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:focus-visible .pos-product-details {
    display: block;
    height: 58px;
    min-height: 58px;
    padding: 7px 8px;
    border-radius: 0 0 30px 30px;
    text-align: center;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:hover .pos-product-title,
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:focus-visible .pos-product-title {
    height: 28px;
    min-height: 28px;
    font-size: 11px;
    line-height: 14px;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:hover .pos-product-bubble-price,
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:focus-visible .pos-product-bubble-price {
    display: block;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:hover .pos-product-footer,
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button:focus-visible .pos-product-footer {
    display: none;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-product-grid > button[data-out-of-stock="true"] .pos-product-photo {
    opacity: 1;
    filter: none;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-product-price {
    display: block;
    max-width: 64px;
    white-space: nowrap;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-payment-bar {
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 14px;
    padding: 7px;
    border-radius: 1px;
    background: #15191c;
  }
  #pos-root[data-active-pos-template="grocery"] .pos-payment-choice,
  #pos-root[data-active-pos-template="grocery"] #pos-approved-pay {
    min-height: 0;
    border-radius: 12px;
    font-size: 22px;
  }
  #pos-root[data-active-pos-template="grocery"] #pos-approved-pay {
    grid-column: 1 / -1;
    text-transform: uppercase;
    font-size: 26px;
  }
}

.pos-register-lock {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5,7,9,.94);
  backdrop-filter: blur(14px);
}
.pos-register-lock.hidden { display: none !important; }
.pos-register-lock-card {
  width: min(440px,100%);
  padding: 34px;
  border: 1px solid rgba(218,171,52,.28);
  border-radius: 28px;
  background: linear-gradient(180deg,#171b1e,#0f1214);
  box-shadow: 0 30px 90px rgba(0,0,0,.62),inset 0 1px 0 rgba(255,255,255,.04);
  text-align: center;
}
.pos-register-lock-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: rgba(218,171,52,.14);
  color: #dfad33;
  font-size: 30px;
}
.pos-register-lock-brand { margin-bottom: 7px; color: #d8a834; font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.pos-register-lock-card h2 { color: #fff; font-size: 28px; font-weight: 900; }
.pos-register-lock-card > p:not(.pos-register-lock-brand):not(.pos-register-lock-message) { margin: 9px auto 22px; max-width: 340px; color: #9ca3af; font-size: 14px; line-height: 1.5; }
.pos-register-lock-card label { display: block; margin-bottom: 7px; color: #d1d5db; font-size: 12px; font-weight: 700; text-align: left; }
.pos-register-lock-amount { display: flex; align-items: center; height: 60px; margin-bottom: 14px; overflow: hidden; border: 1px solid #454a4f; border-radius: 15px; background: #080a0c; }
.pos-register-lock-amount span { padding-left: 18px; color: #dfad33; font-size: 23px; font-weight: 900; }
.pos-register-lock-amount input { width: 100%; height: 100%; border: 0; background: transparent; padding: 0 18px 0 7px; color: #fff; font-size: 25px; font-weight: 900; outline: 0; }
.pos-register-lock-card > button { width: 100%; height: 58px; border: 0; border-radius: 15px; background: linear-gradient(135deg,#e0b33d,#c89219); color: #080a0c; font-size: 16px; font-weight: 900; }
.pos-register-lock-card > button:disabled { cursor: wait; opacity: .65; }
.pos-register-lock-message { min-height: 20px; margin-top: 12px; color: #f87171; font-size: 12px; }

/* Unified Business Performance reports */
.reports-workspace{display:grid;gap:18px;padding-bottom:36px}.reports-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}.report-eyebrow{color:#d9ad34;font-size:11px;font-weight:900;letter-spacing:.18em;text-transform:uppercase}.reports-heading h1{margin-top:3px;color:#fff;font-size:32px;font-weight:900;letter-spacing:-.035em}.reports-heading>div>p:last-child{margin-top:5px;max-width:760px;color:#7f8795;font-size:13px}.reports-heading-meta{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.reports-heading-meta span,.reports-statusbar span{display:inline-flex;align-items:center;gap:7px;border:1px solid #2a2d31;border-radius:999px;background:#111315;padding:7px 10px;color:#8d95a3;font-size:11px}.reports-filter-card{padding:14px!important}.reports-filter-card form{display:grid;gap:12px}.reports-tabs{display:flex;width:max-content;border:1px solid #2b2f34;border-radius:11px;background:#090b0d;padding:3px}.reports-tabs button{min-width:92px;border:0;border-radius:8px;padding:9px 16px;color:#8e96a3;font-size:12px;font-weight:800;text-transform:capitalize}.reports-tabs button.active{background:#dfb438;color:#08090a;box-shadow:0 6px 18px rgba(223,180,56,.18)}.reports-period-nav{display:flex;align-items:flex-end;gap:7px}.reports-period-nav>a{display:grid;height:42px;min-width:42px;place-items:center;border:1px solid #30343a;border-radius:10px;background:#111315;color:#d4d7dc;font-size:12px;font-weight:800}.reports-period-nav>a.current{padding:0 14px;color:#e6bd48}.reports-period-nav label{display:grid;gap:4px}.reports-period-nav label span,.reports-filter-grid label{color:#8e96a3;font-size:10px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.reports-period-nav input,.reports-filter-grid select{height:42px;border:1px solid #30343a;border-radius:10px;background:#090b0d;padding:0 12px;color:#f5f5f5;font-size:12px;outline:0}.reports-filter-grid{display:grid;grid-template-columns:repeat(6,minmax(125px,1fr));gap:8px}.reports-filter-grid label{display:grid;gap:5px}.reports-filter-grid select:disabled{opacity:.5}.reports-filter-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.report-compare{display:flex;align-items:center;gap:8px;color:#a2a9b4;font-size:12px}.report-compare input{accent-color:#ddb13a}.reports-filter-actions>div{display:flex;gap:7px}.reports-filter-actions button,.report-detail-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:38px;border:1px solid #5b491d;border-radius:10px;background:#151510;padding:0 13px;color:#e2b842;font-size:11px;font-weight:800}.reports-filter-actions button:first-child{background:#dcb13a;color:#0b0b0b}.reports-statusbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.reports-statusbar>strong{margin-right:auto;color:#fff;font-size:14px}.reports-statusbar .status-live i{width:6px;height:6px;border-radius:50%;background:#22c55e;box-shadow:0 0 8px #22c55e}.report-warning-panel{display:grid;grid-template-columns:auto 1fr;gap:14px;border:1px solid rgba(245,158,11,.35);border-radius:16px;background:rgba(120,72,8,.1);padding:14px 16px}.report-warning-panel>div{display:flex;gap:8px;color:#f4c75c}.report-warning-panel ul{display:grid;gap:3px;color:#a9a18f;font-size:11px;line-height:1.45}.report-warning-panel li:before{content:'•';margin-right:7px;color:#dcae3a}.report-section{overflow:hidden;border:1px solid #292c31;border-radius:18px;background:linear-gradient(145deg,#111315,#0c0e10);padding:18px;box-shadow:0 12px 28px rgba(0,0,0,.16)}.report-section-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.report-section-title p{color:#b18d2e;font-size:10px;font-weight:900;letter-spacing:.13em;text-transform:uppercase}.report-section-title h2{margin-top:2px;color:#fff;font-size:18px;font-weight:850}.report-comparison{display:grid;gap:2px;text-align:right}.report-comparison span{color:#727b89;font-size:9px;font-weight:800;text-transform:uppercase}.report-comparison strong{font-size:12px}.report-comparison.positive strong{color:#59d99a}.report-comparison.negative strong{color:#fb7185}.report-metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.report-metric-grid.primary{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:9px}.report-metric-grid.compact{grid-template-columns:repeat(4,minmax(0,1fr))}.report-metric{min-height:105px;border:1px solid #272b30;border-radius:14px;background:#0b0d0f;padding:14px}.report-metric-gold{border-color:rgba(224,180,56,.55);background:linear-gradient(145deg,rgba(224,180,56,.16),#0b0d0f)}.report-metric-green{border-color:rgba(52,211,153,.28);background:linear-gradient(145deg,rgba(16,185,129,.1),#0b0d0f)}.report-metric-blue{border-color:rgba(47,111,179,.45);background:linear-gradient(145deg,rgba(47,111,179,.15),#0b0d0f)}.reports-two-column{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}.report-bars{display:flex;height:190px;align-items:flex-end;gap:6px;padding:10px 3px 24px}.report-bars a{position:relative;display:flex;height:100%;min-width:8px;flex:1;align-items:flex-end}.report-bars a span{display:block;width:100%;min-height:4px;border-radius:5px 5px 2px 2px;background:linear-gradient(#ecc84f,#9e7714);transition:.2s}.report-bars a:hover span{filter:brightness(1.2)}.report-bars small{position:absolute;right:50%;bottom:-20px;color:#69717e;font-size:8px;white-space:nowrap;transform:translateX(50%)}.report-highlow{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #272b30;padding-top:10px;color:#727b89;font-size:10px}.report-highlow strong{display:block;color:#d5d8dd}.report-table-scroll{overflow:auto}.report-total-row td{border-top:2px solid #8c6e1e!important;background:rgba(222,177,54,.08);color:#f0c94f!important;font-weight:900!important}.transaction-search{display:grid;grid-template-columns:auto 1fr 190px;align-items:center;gap:9px;margin-bottom:12px}.transaction-search i{color:#dcb13a}.transaction-search input,.transaction-search select{height:40px;border:1px solid #30343a;border-radius:10px;background:#090b0d;padding:0 12px;color:#fff;font-size:12px;outline:0}.report-definition-note{display:flex;gap:12px;border:1px solid rgba(47,111,179,.32);border-radius:14px;background:rgba(47,111,179,.08);padding:14px;color:#8893a1;font-size:11px;line-height:1.55}.report-definition-note i{margin-top:2px;color:#4f8dce}.report-definition-note strong{display:block;margin-bottom:2px;color:#cdd7e3}.report-detail-button{width:max-content;text-decoration:none}
@media(max-width:1280px){.reports-filter-grid{grid-template-columns:repeat(3,1fr)}.report-metric-grid.primary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.reports-heading{align-items:flex-start;flex-direction:column}.reports-heading-meta{justify-content:flex-start}.reports-two-column{grid-template-columns:1fr}.report-metric-grid,.report-metric-grid.compact{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.reports-heading h1{font-size:26px}.reports-filter-grid{grid-template-columns:1fr 1fr}.reports-filter-actions{align-items:flex-start;flex-direction:column}.report-metric-grid,.report-metric-grid.primary,.report-metric-grid.compact{grid-template-columns:1fr}.report-section-title{align-items:flex-start;flex-direction:column}.transaction-search{grid-template-columns:auto 1fr}.transaction-search select{grid-column:1/-1}.reports-period-nav{flex-wrap:wrap}}
@media print{aside,.app-sidebar,.app-topbar,.reports-filter-card,.report-detail-button{display:none!important}.reports-workspace{color:#111}.report-section,.report-warning-panel{break-inside:avoid;box-shadow:none}}

.pos-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}
.pos-overlay.hidden { display: none !important; }
.pos-overlay-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0,0,0,.72);
}
.pos-menu-drawer {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(390px,92vw);
  padding: 18px;
  overflow-y: auto;
  border-inline-start: 1px solid #454a4f;
  background: #111518;
  box-shadow: -16px 0 40px rgba(0,0,0,.45);
}
.pos-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pos-drawer-head h2 { font-size: 20px; font-weight: 800; }
.pos-drawer-head button { width: 44px; height: 44px; border: 1px solid #454a4f; border-radius: 6px; background: #202529; }
.pos-menu-drawer nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pos-menu-drawer nav a,
.pos-menu-operations button {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid #343a3f;
  border-radius: 5px;
  background: #1c2125;
  color: #fff;
  text-align: left;
}
.pos-menu-drawer nav i,.pos-menu-operations i { width: 20px; color: #dfad33; text-align: center; }
.pos-menu-operations { display: grid; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #343a3f; }
.pos-menu-operations small { margin-inline-start: auto; color: #d4a72f; font-size: 9px; text-transform: uppercase; }
.pos-payment-step {
  position: relative;
  width: min(920px,94vw);
  max-height: 92vh;
  overflow-y: auto;
  border: 1px solid #474c51;
  border-radius: 8px;
  background: #14181b;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.pos-payment-step > header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #343a3f;
}
.pos-payment-step > header button { justify-self: start; color: #e0b03a; }
.pos-payment-step > header h2 { font-size: 21px; font-weight: 800; }
.pos-payment-step > header strong { justify-self: end; font-size: 20px; color: #e0b03a; }
.pos-payment-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; padding: 22px; }
.pos-payment-methods button { min-height: 105px; border: 1px solid #4b5055; border-radius: 6px; background: #22272b; font-size: 19px; font-weight: 800; }
.pos-payment-methods i { display: block; margin-bottom: 10px; color: #dfad33; font-size: 30px; }
.pos-payment-methods small { display: block; margin-top: 7px; color: #d4a72f; font-size: 10px; }
.pos-cash-payment { display: grid; gap: 14px; padding: 0 22px 22px; }
.pos-cash-payment label { font-size: 13px; font-weight: 700; }
.pos-cash-payment input { display: block; width: 100%; height: 58px; margin-top: 7px; padding: 0 16px; border: 1px solid #555b61; border-radius: 5px; background: #080a0c; color: #fff; font-size: 24px; }
.pos-cash-change { display: flex; justify-content: space-between; padding: 15px; border: 1px solid #343a3f; font-size: 17px; }
#pos-confirm-cash { min-height: 60px; border-radius: 5px; background: #d8aa38; color: #111; font-size: 18px; font-weight: 900; }
#pos-confirm-cash:disabled { opacity: .35; cursor: not-allowed; }
.pos-action-button[data-integration-state="setup"],
.pos-payment-choice[data-integration-state="setup"] { position: relative; }
.pos-action-button[data-integration-state="setup"]::after,
.pos-payment-choice[data-integration-state="setup"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(-45deg, transparent, transparent 7px, rgba(255,255,255,.018) 7px, rgba(255,255,255,.018) 14px);
  pointer-events: none;
}
@media (max-width: 1279px) {
  #pos-root.pos-approved-template .pos-cart-column { order: 1; }
  #pos-root.pos-approved-template .pos-workspace { order: 2; }
  #pos-root.pos-approved-template .pos-action-panel { order: 3; }
  #pos-root.pos-approved-template .pos-payment-bar { order: 4; }
}

/* Phone & Electronics POS: compact reference layout with rounded, expanding product bubbles. */
@media (min-width: 1280px) {
  body:has(#pos-root[data-active-pos-template="phone"]) #app-sidebar,
  body:has(#pos-root[data-active-pos-template="phone"]) .app-topbar-surface,
  body:has(#pos-root[data-active-pos-template="phone"]) .pos-register > :first-child,
  body:has(#pos-root[data-active-pos-template="phone"]) .pos-register > :nth-child(2) {
    display: none;
  }
  body:has(#pos-root[data-active-pos-template="phone"]) .app-main-content {
    margin-left: 0;
    padding: 10px 12px;
  }
  #pos-root.pos-approved-template[data-active-pos-template="phone"] {
    grid-template-columns: minmax(330px, 28%) minmax(0, 1fr) minmax(290px, 24%);
    grid-template-rows: 64px minmax(0, 1fr) 92px;
    gap: 8px;
    height: calc(100vh - 20px);
  }
  #pos-root[data-active-pos-template="phone"] .pos-scan-panel {
    grid-column: 2 / 4;
    grid-row: 1;
    border-radius: 18px;
  }
  #pos-root[data-active-pos-template="phone"] .pos-scan-panel > :first-child,
  #pos-root[data-active-pos-template="phone"] .pos-scan-panel label,
  #pos-root[data-active-pos-template="phone"] #pos-scan-feedback,
  #pos-root[data-active-pos-template="phone"] #pos-location-tools { display: none !important; }
  #pos-root[data-active-pos-template="phone"] .pos-scan-panel > .grid {
    grid-template-columns: minmax(0, 1fr) 210px 210px;
    padding: 7px;
    gap: 8px;
  }
  #pos-root[data-active-pos-template="phone"] .pos-catalog-panel {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    border-radius: 26px;
    overflow: visible;
  }
  #pos-root[data-active-pos-template="phone"] .pos-catalog-panel > .mb-3:first-child { display: none; }
  #pos-root[data-active-pos-template="phone"] #pos-product-grid {
    max-height: calc(100vh - 190px);
    min-height: 0;
    grid-template-columns: repeat(5, minmax(108px, 1fr));
    gap: 16px;
    overflow-y: auto;
    overflow-x: visible;
    padding: 10px 12px 40px;
  }
  #pos-root[data-active-pos-template="phone"] #pos-product-grid > button {
    position: relative;
    min-height: 0;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 999px;
    overflow: visible;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0,0,0,.22);
    z-index: 1;
    transition: border-radius .2s ease, transform .2s ease, box-shadow .2s ease;
  }
  #pos-root[data-active-pos-template="phone"] #pos-product-grid > button:hover,
  #pos-root[data-active-pos-template="phone"] #pos-product-grid > button:focus-visible {
    transform: scale(1.22);
    border-radius: 28px;
    z-index: 20;
    box-shadow: 0 18px 45px rgba(0,0,0,.52), 0 0 0 2px #e3b536;
  }
  #pos-root[data-active-pos-template="phone"] .pos-product-image-stage {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border-radius: inherit;
    overflow: hidden;
  }
  #pos-root[data-active-pos-template="phone"] .pos-product-photo {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    object-fit: contain;
    background: #fff;
  }
  #pos-root[data-active-pos-template="phone"] .pos-product-image-stage > span:not(.pos-product-bubble-price) {
    position: absolute;
    top: 7px;
    right: 7px;
  }
  #pos-root[data-active-pos-template="phone"] .pos-product-bubble-price {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #1e2227;
    color: #f1c744;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
  }
  #pos-root[data-active-pos-template="phone"] .pos-product-details {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 2px);
    display: none;
    border-radius: 0 0 24px 24px;
    background: #1a1e22;
    padding: 8px 10px 10px;
    text-align: center;
  }
  #pos-root[data-active-pos-template="phone"] #pos-product-grid > button:hover .pos-product-details,
  #pos-root[data-active-pos-template="phone"] #pos-product-grid > button:focus-visible .pos-product-details { display: block; }
  #pos-root[data-active-pos-template="phone"] .pos-product-title {
    color: white;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
  }
  #pos-root[data-active-pos-template="phone"] .pos-phone-brand {
    margin-top: 3px;
    color: #9aa3ad;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .12em;
  }
  #pos-root[data-active-pos-template="phone"] .pos-product-code,
  #pos-root[data-active-pos-template="phone"] .pos-product-footer { display: none; }
  #pos-root[data-active-pos-template="phone"] .pos-cart-panel {
    grid-column: 1;
    grid-row: 1 / 3;
    height: 100%;
    border-radius: 26px;
  }
  #pos-root[data-active-pos-template="phone"] .pos-action-panel {
    grid-column: 3;
    grid-row: 2;
    border-radius: 26px;
  }
  #pos-root[data-active-pos-template="phone"] #pos-numeric-keypad {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
    margin-top: 255px;
    border-radius: 24px;
  }
  #pos-root[data-active-pos-template="phone"] .pos-payment-bar {
    grid-column: 1 / 4;
    grid-row: 3;
  }
  #pos-root[data-active-pos-template="phone"] .pos-imei-panel {
    margin-top: 10px;
    border-radius: 14px;
    background: rgba(227,181,54,.08);
    padding: 9px;
  }
  #pos-root[data-active-pos-template="phone"] .pos-imei-panel > p {
    margin-bottom: 6px;
    color: #f1c744;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
  }
  #pos-root[data-active-pos-template="phone"] .pos-imei-field {
    display: grid;
    grid-template-columns: 70px 1fr;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    color: #c6cbd1;
    font-size: 11px;
  }
  #pos-root[data-active-pos-template="phone"] .pos-imei-field input {
    min-width: 0;
    border: 1px solid #414852;
    border-radius: 10px;
    background: #080a0c;
    padding: 8px 10px;
    color: white;
    font-family: ui-monospace, monospace;
    font-size: 12px;
  }
}

/* No-code POS layout builder */
.builder-tool {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid var(--ink-700);
  border-radius: .75rem;
  padding: .5rem .75rem;
  color: var(--ink-300);
  font-size: .8125rem;
  font-weight: 600;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.builder-tool:hover,
.builder-tool:focus-visible {
  border-color: rgba(201,162,39,.55);
  color: white;
  background: rgba(201,162,39,.08);
}
#builder-canvas {
  display: grid;
  grid-template-columns: repeat(var(--builder-columns, 12), minmax(0, 1fr));
  grid-auto-rows: 58px;
  gap: var(--builder-gap, 10px);
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: calc(100% / 12) 68px;
}
.builder-canvas-tile {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tile-custom, var(--gold)) 50%, transparent);
  border-radius: .8rem;
  padding: .7rem;
  background: color-mix(in srgb, var(--tile-custom, var(--gold)) 14%, var(--ink-900));
  color: var(--ink-100);
  font-size: .75rem;
  font-weight: 700;
  text-align: start;
  touch-action: none;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.builder-canvas-tile:hover {
  transform: translateY(-1px);
  border-color: var(--tile-custom, var(--gold));
}
.builder-canvas-tile.is-selected {
  border-color: var(--gold-glow);
  box-shadow: 0 0 0 3px rgba(201,162,39,.22);
}
#builder-canvas.is-preview .builder-canvas-tile {
  pointer-events: none;
  border-color: color-mix(in srgb, var(--tile-custom, var(--gold)) 25%, transparent);
  box-shadow: none;
}
#builder-canvas[data-theme-preview="light"] {
  background-color: #F4F2EC;
  background-image:
    linear-gradient(rgba(23,23,23,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,23,23,.05) 1px, transparent 1px);
}
#builder-canvas[data-theme-preview="light"] .builder-canvas-tile {
  background: color-mix(in srgb, var(--tile-custom, #C99A18) 12%, #FFFFFF);
  color: #171717;
}
@media (max-width: 1279px) {
  #pos-layout-builder > .grid {
    grid-template-columns: 1fr;
  }
}

html[dir="rtl"] body {
  font-family: 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
  letter-spacing: normal;
}

html[dir="rtl"] #app-sidebar {
  inset-inline-start: 0 !important;
  inset-inline-end: auto !important;
  border-inline-start: 0;
  border-inline-end: 1px solid var(--ink-700);
}

html[dir="rtl"] .nav-active {
  border-inline-start: 2px solid var(--gold);
  border-inline-end: 0;
  background: linear-gradient(270deg, rgba(201,162,39,0.16), rgba(201,162,39,0.02));
}

html[dir="rtl"] [data-dropdown-menu] {
  inset-inline-end: 0;
  inset-inline-start: auto;
}

html[dir="rtl"] .text-left {
  text-align: right;
}

html[dir="rtl"] .text-right {
  text-align: left;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  text-align: start;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="date"],
html[dir="rtl"] input[type="time"],
html[dir="rtl"] .font-mono,
html[dir="rtl"] [data-bidi="ltr"] {
  direction: ltr;
  text-align: start;
  unicode-bidi: isolate;
}

html[dir="rtl"] [data-bidi="auto"],
html[dir="rtl"] td,
html[dir="rtl"] dd {
  unicode-bidi: plaintext;
}

html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-arrow-left,
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-angles-left,
html[dir="rtl"] .fa-angles-right,
html[dir="rtl"] .fa-arrow-right-from-bracket,
html[dir="rtl"] .fa-arrow-left-from-bracket {
  transform: scaleX(-1);
}

@media (max-width: 1023px) {
  html[dir="rtl"] #app-sidebar {
    transform: translateX(100%);
  }
  html[dir="rtl"] #app-sidebar.translate-x-0 {
    transform: translateX(0);
  }
}

/* ---------------------------------------------------------------------------
   Layered background — never a single flat black. Subtle radial gold glow
   in the top-left plus a fine grain-like grid gives the app depth.
--------------------------------------------------------------------------- */
.app-bg {
  background-color: var(--ink-950);
  background-image:
    radial-gradient(circle at 15% -10%, rgba(240, 201, 61, 0.08), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(201, 162, 39, 0.05), transparent 40%),
    linear-gradient(180deg, #0F1012 0%, #0B0B0C 100%);
  min-height: 100vh;
}

/* ---------------------------------------------------------------------------
   Scrollbars — thin, dark, gold-on-hover.
--------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ink-600);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ---------------------------------------------------------------------------
   Glassmorphism card — used on login screen and modals.
--------------------------------------------------------------------------- */
.glass-card {
  background: linear-gradient(180deg, rgba(24,26,29,0.85) 0%, rgba(15,16,18,0.92) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 162, 39, 0.18);
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.04) inset, 0 24px 60px -20px rgba(0,0,0,0.7);
}

/* Thin gold accent line along the top edge of premium cards. */
.gold-accent-top {
  position: relative;
}
.gold-accent-top::before {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-glow) 50%, var(--gold) 80%, transparent);
  border-radius: 2px;
  opacity: 0.9;
}

/* ---------------------------------------------------------------------------
   Ambient gold glow blobs for the login page background.
--------------------------------------------------------------------------- */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.35;
}

/* ---------------------------------------------------------------------------
   Loading skeleton shimmer.
--------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--ink-800) 25%, var(--ink-700) 37%, var(--ink-800) 63%);
  background-size: 700px 100%;
  animation: shimmer 1.8s linear infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: -350px 0; }
  100% { background-position: 350px 0; }
}

/* ---------------------------------------------------------------------------
   Focus ring — gold, accessible, consistent everywhere.
--------------------------------------------------------------------------- */
.focus-gold:focus-visible {
  outline: 2px solid var(--gold-glow);
  outline-offset: 2px;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-glow);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   Sidebar nav active indicator.
--------------------------------------------------------------------------- */
.nav-active {
  background: linear-gradient(90deg, rgba(201,162,39,0.16), rgba(201,162,39,0.02));
  border-left: 2px solid var(--gold);
  color: #F5E9BF;
}

/* ---------------------------------------------------------------------------
   Table styling helpers.
--------------------------------------------------------------------------- */
.table-row-hover:hover { background: rgba(201,162,39,0.045); }
.table-zebra:nth-child(even) { background: rgba(255,255,255,0.015); }

/* ---------------------------------------------------------------------------
   Small utility transitions used across interactive elements.
--------------------------------------------------------------------------- */
.transition-premium { transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1); }

/* Toast / modal entrance */
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast-enter { animation: toastIn 0.25s cubic-bezier(0.4,0,0.2,1); }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-enter { animation: modalIn 0.22s cubic-bezier(0.4,0,0.2,1); }

/* Page-level fade for SSR page loads (kept subtle, no jank). */
@keyframes pageFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.page-fade { animation: pageFade 0.3s ease-out; }

/* Badge dot pulse for live status indicators. */
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,166,105,0.5); }
  50% { box-shadow: 0 0 0 4px rgba(34,166,105,0); }
}
.pulse-dot { animation: pulseDot 2s infinite; }

/* Sidebar collapse transition */
.sidebar-transition { transition: width 0.22s cubic-bezier(0.4,0,0.2,1); }

/* Kbd shortcut chip */
kbd.kbd-chip {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--ink-700);
  border: 1px solid var(--ink-600);
  color: var(--silver);
}

/* Profile configuration help */
.context-help > summary {
  list-style: none;
}
.context-help > summary::-webkit-details-marker {
  display: none;
}
.context-help-panel {
  inset-inline-start: 0;
  text-align: start;
}
html[dir="rtl"] .context-help {
  margin-left: 0;
  margin-right: 0.25rem;
}

/* Keep the fast-checkout workspace contained at every breakpoint. */
.pos-register,
.pos-register #pos-root,
.pos-register #pos-root > *,
.pos-register select {
  min-width: 0;
}
.pos-register select {
  max-width: 100%;
}
@media (max-width: 1279px) {
  .pos-register aside > div {
    position: static !important;
    height: auto !important;
    min-height: 32rem !important;
  }
  .pos-register #pos-product-grid {
    max-height: 28rem !important;
  }
}
@media (max-width: 640px) {
  .context-help-panel {
    position: fixed !important;
    inset-inline: 1rem !important;
    top: 5rem !important;
    width: auto !important;
    max-width: none !important;
  }
  .pos-register #pos-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 24rem !important;
  }
}
/* Cube D close / clear controls */
.fa-xmark,
.fa-times,
[data-modal-close] {
  color: #2F6FB3 !important;
}

.fa-xmark:hover,
.fa-times:hover,
[data-modal-close]:hover {
  color: #2F6FB3 !important;
}
