/* LightPos HD Design System — Neutral Monochrome-First Light & True Dark */
:root {
  --lp-bg: #ffffff;
  --lp-sidebar: #f4f4f6;
  --lp-settings-sidebar: #f1f2f5;
  --lp-surface: #ffffff;
  --lp-surface-subtle: #f4f4f5;
  --lp-border: #e4e4e7;
  --lp-border-strong: #d4d4d8;
  --lp-text: #09090b;
  --lp-text-secondary: #52525b;
  --lp-muted: #71717a;
  --lp-accent: #2563eb;
  --lp-accent-fg: #ffffff;
  --lp-ok: #16a34a;
  --lp-warn: #d97706;
  --lp-danger: #dc2626;
  --lp-radius: 8px;
  --lp-font-sans: Inter, "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lp-font-size: 15px;

  /* Bridge BlazorBlueprint / shadcn tokens to LightPos live theme variables */
  --background: var(--lp-bg);
  --foreground: var(--lp-text);
  --card: var(--lp-surface);
  --card-foreground: var(--lp-text);
  --popover: var(--lp-surface);
  --popover-foreground: var(--lp-text);
  --primary: var(--lp-accent);
  --primary-foreground: var(--lp-accent-fg);
  --secondary: var(--lp-surface-subtle);
  --secondary-foreground: var(--lp-text);
  --muted: var(--lp-surface-subtle);
  --muted-foreground: var(--lp-muted);
  --accent: var(--lp-surface-subtle);
  --accent-foreground: var(--lp-text);
  --border: var(--lp-border);
  --input: var(--lp-border);
  --ring: var(--lp-accent);
  --radius: var(--lp-radius);
}

.lp-dark {
  --lp-bg: #070709;
  --lp-sidebar: #111114;
  --lp-settings-sidebar: #131317;
  --lp-surface: #141418;
  --lp-surface-subtle: #1c1c21;
  --lp-border: #27272a;
  --lp-border-strong: #3f3f46;
  --lp-text: #fafafa;
  --lp-text-secondary: #a1a1aa;
  --lp-muted: #71717a;

  --background: var(--lp-bg);
  --foreground: var(--lp-text);
  --card: var(--lp-surface);
  --card-foreground: var(--lp-text);
  --popover: var(--lp-surface);
  --popover-foreground: var(--lp-text);
  --secondary: var(--lp-surface-subtle);
  --secondary-foreground: var(--lp-text);
  --muted: var(--lp-surface-subtle);
  --muted-foreground: var(--lp-muted);
  --accent: var(--lp-surface-subtle);
  --accent-foreground: var(--lp-text);
  --border: var(--lp-border);
  --input: var(--lp-border);
}

html, body, #app {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overflow: clip;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.lp-root, .lp-root *, .lp-root *::before, .lp-root *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Crisp, legible placeholders on all devices (including Android Z100 Light Mode) */
.lp-root input::placeholder,
.lp-root textarea::placeholder,
.lp-input::placeholder {
  color: #52525b !important;
  opacity: 0.82 !important;
}

.lp-dark input::placeholder,
.lp-dark textarea::placeholder,
.lp-dark .lp-input::placeholder {
  color: #a1a1aa !important;
  opacity: 0.78 !important;
}

/* Native-feel View Transitions & Shimmer Skeletons */
.lp-view-enter {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  animation: lp-fade-slide-in 150ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes lp-fade-slide-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.lp-skeleton {
  background: linear-gradient(90deg, var(--lp-surface-subtle) 25%, var(--lp-border) 50%, var(--lp-surface-subtle) 75%);
  background-size: 200% 100%;
  animation: lp-shimmer 1.15s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes lp-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.lp-skel-card {
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lp-skel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--lp-border);
}

.lp-root {
  display: flex;
  height: calc(100dvh / var(--lp-zoom, 1));
  max-height: 100%;
  width: 100%;
  background: var(--lp-bg);
  color: var(--lp-text);
  font-family: var(--lp-font-sans);
  font-size: var(--lp-font-size);
  line-height: 1.45;
  overflow: hidden;
  overflow: clip;
  overscroll-behavior: none;
}

.lp-tabular {
  font-variant-numeric: tabular-nums;
}

.lp-touch-target {
  min-height: 44px;
  min-width: 44px;
  transition: transform 80ms ease, background-color 120ms ease, border-color 120ms ease;
}

.lp-touch-target:active {
  transform: scale(0.98);
}

.lp-ico {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Left Sidebar Navigation (T3 Code Style) */
.lp-sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--lp-sidebar);
  border-right: 1px solid var(--lp-border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  gap: 4px;
  transition: width 160ms ease, padding 160ms ease, opacity 140ms ease;
}

.lp-sidebar.lp-collapsed {
  width: 0;
  padding: 0;
  border-right: none;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Panel Collapse / Expand Icon Buttons (IDE / T3 Style) */
.lp-panel-toggles {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lp-panel-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--lp-muted);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.lp-panel-toggle:hover {
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
}

.lp-panel-toggle.active {
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
  border-color: var(--lp-border);
}

.lp-panel-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--lp-accent);
  color: var(--lp-accent-fg);
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

.lp-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 12px;
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: -0.025em;
}

.lp-brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--lp-accent);
  color: var(--lp-accent-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78em;
  font-weight: 700;
}

.lp-nav-label {
  font-size: 0.72em;
  font-weight: 600;
  color: var(--lp-muted);
  padding: 10px 10px 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: var(--lp-radius);
  background: transparent;
  color: var(--lp-text-secondary);
  font-family: inherit;
  font-size: 0.92em;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.lp-nav-item:hover {
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
}

.lp-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 2px;
}

.lp-nav-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: var(--lp-radius);
  background: transparent;
  color: var(--lp-text-secondary);
  font-family: inherit;
  font-size: 0.92em;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms ease, color 120ms ease;
}

.lp-nav-group-btn:hover {
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
}

.lp-nav-group-btn.active {
  color: var(--lp-accent);
}

.lp-nav-group-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lp-nav-chevron {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lp-nav-chevron.open {
  transform: rotate(90deg);
}

.lp-nav-accordion {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
}

.lp-nav-accordion.open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.lp-nav-accordion-inner {
  overflow: hidden;
  min-height: 0;
}

.lp-nav-sublist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 1px 0 4px 16px;
  padding-left: 10px;
  border-left: 1px solid var(--lp-border);
}

.lp-nav-subitem {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: var(--lp-radius);
  background: transparent;
  color: var(--lp-text-secondary);
  font-family: inherit;
  font-size: 0.84em;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 120ms ease, color 120ms ease;
}

.lp-nav-subitem:hover {
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
}

.lp-nav-subitem.active {
  background: color-mix(in srgb, var(--lp-accent) 14%, transparent);
  color: var(--lp-accent);
  font-weight: 700;
}

.lp-pager-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid var(--lp-border);
  border-top: none;
  border-radius: 0 0 var(--lp-radius) var(--lp-radius);
  background: var(--lp-surface);
  font-size: 0.8rem;
  max-width: 100%;
  box-sizing: border-box;
}

.lp-pager-info {
  color: var(--lp-muted);
  white-space: nowrap;
}

.lp-pager-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lp-pager-rows {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.lp-pager-size-btn {
  padding: 4px 9px;
  min-height: 32px;
  font-size: 0.78rem;
  gap: 6px;
}

.lp-pager-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: transparent;
}

.lp-pager-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 195;
  min-width: 112px;
  padding: 4px;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lp-pager-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--lp-radius);
  background: transparent;
  color: var(--lp-text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.lp-pager-menu-item:hover {
  background: var(--lp-surface-subtle);
}

.lp-pager-menu-item.active {
  background: color-mix(in srgb, var(--lp-accent) 14%, transparent);
  color: var(--lp-accent);
  font-weight: 700;
}

.lp-pager-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.lp-pager-btn {
  padding: 4px 8px;
  min-width: 32px;
  min-height: 32px;
  font-size: 0.78rem;
}

.lp-pager-page {
  padding: 0 6px;
  font-weight: 600;
  color: var(--lp-text);
  white-space: nowrap;
}

@media (max-width: 639px) {
  .lp-pager-bar {
    padding: 8px 10px;
    gap: 8px;
  }

  .lp-pager-controls {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .lp-pager-rows button,
  .lp-pager-combo {
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
  }

  .lp-pager-btn {
    min-width: 30px;
    min-height: 30px;
    padding: 4px 7px;
  }

  /* Keep BlazorBlueprint BbDataTable built-in footer compact on small screens */
  .lp-dt-wrap [data-slot="pagination"],
  .lp-dt-wrap > div > div:last-child {
    flex-wrap: wrap !important;
    gap: 6px !important;
    max-width: 100% !important;
  }
}

.lp-nav-item.active {
  background: var(--lp-surface);
  color: var(--lp-text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--lp-border);
}

.lp-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top Bar */
.lp-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border-bottom: 1px solid var(--lp-border);
  background: var(--lp-surface);
}

.lp-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.lp-topbar-left strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-topbar-action {
  padding: 5px 10px;
  gap: 6px;
}

.lp-topbar-count {
  font-size: 0.78rem;
  font-weight: 700;
}

.lp-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-text);
  cursor: pointer;
}

.lp-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82em;
  color: var(--lp-text-secondary);
  white-space: nowrap;
}

.lp-status-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lp-ok);
  display: inline-block;
}

.lp-dot.muted {
  background: var(--lp-muted);
}

/* Shared Controls */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-text);
  font-family: inherit;
  font-size: 0.88em;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.lp-icon-action {
  width: 34px;
  height: 34px;
  padding: 0;
}

.lp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 18px 0 8px;
}

.lp-section-head:first-child {
  margin-top: 0;
}

.lp-section-head .lp-section-title {
  margin: 0;
}

.lp-matrix-wrap {
  overflow-x: auto;
  width: 100%;
}

.lp-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.lp-matrix-table th,
.lp-matrix-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--lp-border);
  text-align: center;
  white-space: nowrap;
}

.lp-matrix-table th:first-child,
.lp-matrix-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--lp-surface);
  z-index: 1;
  font-weight: 500;
}

.lp-matrix-table th {
  background: var(--lp-sidebar);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lp-muted);
}

/* Floor Plan & Table Arrangement Grid */
.lp-floor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.lp-table-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 92px;
  padding: 10px 8px;
  border-radius: var(--lp-radius);
  border: 1.5px solid var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-text);
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 120ms ease, transform 80ms ease;
}

.lp-table-tile:active {
  transform: scale(0.97);
}

.lp-table-tile.round {
  border-radius: 999px;
}

.lp-table-tile.rect {
  grid-column: span 2;
}

.lp-table-tile.occupied {
  border-color: var(--lp-warn);
  background: var(--lp-surface-subtle);
}

.lp-table-tile.selected {
  border-color: var(--lp-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--lp-accent) 28%, transparent);
}

/* Interactive Dotted Floor Plan Canvas (Drag-and-Drop & Exact POS Mirror) */
.lp-grid-canvas-bg,
.lp-floor-canvas {
  background-color: var(--lp-bg);
  background-image: radial-gradient(color-mix(in srgb, var(--lp-muted) 32%, transparent) 1.25px, transparent 1.25px);
  background-size: 18px 18px;
}

.lp-floor-canvas {
  position: relative;
  width: 100%;
  min-width: 820px;
  min-height: 460px;
  height: 460px;
  border-radius: 12px;
  border: 1px solid var(--lp-border);
  overflow: hidden;
  user-select: none;
}

.lp-floor-canvas.lp-floor-canvas-full {
  border: none;
  border-radius: 0;
  width: 100%;
  min-width: 840px;
  height: 100%;
  min-height: 480px;
}

.lp-floor-pan-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 360px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  cursor: grab;
}

.lp-floor-pan-viewport:active {
  cursor: grabbing;
}

.lp-floor-pan-viewport::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.lp-floor-canvas.editable {
  touch-action: pan-x pan-y;
}

.lp-floor-canvas.editable .lp-canvas-table {
  touch-action: none;
}

.lp-canvas-table {
  position: absolute;
  width: 96px;
  height: 82px;
  padding: 6px;
  border-radius: 0;
  border: none;
  background: var(--lp-surface);
  color: var(--lp-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  transition: box-shadow 120ms ease, background 120ms ease;
}

.lp-floor-canvas.editable .lp-canvas-table {
  cursor: grab;
}

.lp-canvas-table.dragging {
  cursor: grabbing !important;
  z-index: 20;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 0 2px color-mix(in srgb, var(--lp-accent) 45%, transparent);
}

.lp-canvas-table.round {
  border-radius: 999px;
  width: 88px;
  height: 88px;
}

.lp-canvas-table.rect {
  width: 132px;
  height: 78px;
  border-radius: 0;
}

.lp-canvas-table.mine {
  background: color-mix(in srgb, #10b981 20%, var(--lp-surface));
}

.lp-canvas-table.busy {
  background: color-mix(in srgb, #ef4444 20%, var(--lp-surface));
}

.lp-canvas-table.selected {
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--lp-accent) 45%, transparent), 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* Symmetric, thumb-friendly Staff Authorization Modal */
.lp-auth-backdrop {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lp-auth-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 26px 22px 22px;
  gap: 16px;
  align-items: center;
}

.lp-auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.lp-auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  width: 100%;
  padding: 0 28px;
}

.lp-auth-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--lp-accent) 14%, var(--lp-surface-subtle));
  color: var(--lp-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.lp-auth-title {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--lp-text);
}

.lp-auth-subtitle {
  font-size: 0.82rem;
  color: var(--lp-text-secondary);
  line-height: 1.35;
}

.lp-auth-hint {
  font-size: 0.76rem;
  color: var(--lp-muted);
}

.lp-auth-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.lp-auth-key {
  font-size: 1.18rem;
  font-weight: 600;
  height: 54px;
}

.lp-auth-key-fn {
  font-size: 0.92rem;
  font-weight: 600;
  height: 54px;
}

@media (max-width: 639px) {
  .lp-auth-backdrop {
    align-items: flex-end;
    padding: 12px 12px max(16px, env(safe-area-inset-bottom));
  }

  .lp-auth-modal {
    max-width: 100%;
    padding: 24px 18px 18px;
  }

  .lp-auth-key,
  .lp-auth-key-fn {
    height: 56px;
  }
}

.lp-canvas-table-code {
  font-weight: 700;
  font-size: 0.96rem;
  line-height: 1.1;
}

.lp-canvas-table-waiter {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lp-text-secondary);
}

.lp-table-multi-bar {
  width: 34px;
  height: 3.5px;
  border-radius: 99px;
  background: #eab308;
  margin-top: 2px;
}

/* Horizontal Scrollable Table Receipt Cards */
.lp-receipt-carousel {
  display: flex;
  gap: 16px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.lp-receipt-carousel::-webkit-scrollbar,
.lp-table-receipt-items::-webkit-scrollbar,
.lp-my-orders-strip::-webkit-scrollbar,
.lp-settings-content::-webkit-scrollbar,
.lp-pos-cart-lines::-webkit-scrollbar,
.lp-cat-tabs::-webkit-scrollbar,
.lp-pos-catalog::-webkit-scrollbar,
.lp-form-modal-body::-webkit-scrollbar,
.lp-nav-scroll::-webkit-scrollbar,
.lp-sidebar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.lp-settings-content,
.lp-pos-cart-lines,
.lp-cat-tabs,
.lp-pos-catalog,
.lp-form-modal-body,
.lp-nav-scroll,
.lp-sidebar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* Scroll Hint Wrappers & Blinking Directional Arrow Indicators */
.lp-scroll-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.lp-scroll-wrap-y {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lp-scroll-hint-arrow {
  position: absolute;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--lp-scroll-arrow-size, 30px);
  height: var(--lp-scroll-arrow-size, 30px);
  border-radius: 999px;
  border: var(--lp-scroll-arrow-border, 0px solid transparent);
  background: var(--lp-scroll-arrow-bg, transparent);
  color: var(--lp-accent);
  box-shadow: var(--lp-scroll-arrow-shadow, none);
  backdrop-filter: var(--lp-scroll-arrow-blur, none);
  -webkit-backdrop-filter: var(--lp-scroll-arrow-blur, none);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
  transition: opacity 160ms ease, visibility 160ms ease;
}

.lp-scroll-hint-arrow svg {
  width: var(--lp-scroll-arrow-svg-size, 19px);
  height: var(--lp-scroll-arrow-svg-size, 19px);
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lp-scroll-hint-arrow.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lp-scroll-hint-arrow.left {
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
}

.lp-scroll-hint-arrow.right {
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
}

.lp-scroll-hint-arrow.up {
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.lp-scroll-hint-arrow.down {
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.lp-scroll-hint-arrow.left.is-visible {
  animation: lp-blink-arrow-left 1.15s ease-in-out infinite;
}

.lp-scroll-hint-arrow.right.is-visible {
  animation: lp-blink-arrow-right 1.15s ease-in-out infinite;
}

.lp-scroll-hint-arrow.up.is-visible {
  animation: lp-blink-arrow-up 1.15s ease-in-out infinite;
}

.lp-scroll-hint-arrow.down.is-visible {
  animation: lp-blink-arrow-down 1.15s ease-in-out infinite;
}

@keyframes lp-blink-arrow-left {
  0%, 100% { opacity: 0.32; transform: translate(0, -50%); }
  50% { opacity: 1; transform: translate(-3px, -50%); }
}

@keyframes lp-blink-arrow-right {
  0%, 100% { opacity: 0.32; transform: translate(0, -50%); }
  50% { opacity: 1; transform: translate(3px, -50%); }
}

@keyframes lp-blink-arrow-up {
  0%, 100% { opacity: 0.32; transform: translate(-50%, 0); }
  50% { opacity: 1; transform: translate(-50%, -3px); }
}

@keyframes lp-blink-arrow-down {
  0%, 100% { opacity: 0.32; transform: translate(-50%, 0); }
  50% { opacity: 1; transform: translate(-50%, 3px); }
}

/* iPhone / iOS Style Floating Notification Banners with 360° Swipe-to-Dismiss */
.lp-ios-toast-host {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 24px));
  width: 100%;
}

.lp-ios-toast-host.pos-top {
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
}

.lp-ios-toast-host.pos-top-left {
  top: 14px;
  left: 14px;
  align-items: flex-start;
}

.lp-ios-toast-host.pos-top-right {
  top: 14px;
  right: 14px;
  align-items: flex-end;
}

.lp-ios-toast-host.pos-left {
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  align-items: flex-start;
}

.lp-ios-toast-host.pos-right {
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  align-items: flex-end;
}

.lp-ios-toast-host.pos-bottom {
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column-reverse;
  align-items: center;
}

.lp-ios-toast-host.pos-bottom-left {
  bottom: 18px;
  left: 14px;
  flex-direction: column-reverse;
  align-items: flex-start;
}

.lp-ios-toast-host.pos-bottom-right {
  bottom: 18px;
  right: 14px;
  flex-direction: column-reverse;
  align-items: flex-end;
}

.lp-ios-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--lp-border-strong) 80%, transparent);
  background: color-mix(in srgb, var(--lp-surface) 90%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--lp-text);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24), 0 2px 8px rgba(0, 0, 0, 0.12);
  user-select: none;
  touch-action: none;
  cursor: grab;
  will-change: transform, opacity;
  animation: lp-ios-toast-drop 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lp-ios-toast-host.pos-bottom .lp-ios-toast,
.lp-ios-toast-host.pos-bottom-left .lp-ios-toast,
.lp-ios-toast-host.pos-bottom-right .lp-ios-toast {
  animation-name: lp-ios-toast-rise;
}

.lp-ios-toast-host.pos-left .lp-ios-toast,
.lp-ios-toast-host.pos-top-left .lp-ios-toast {
  animation-name: lp-ios-toast-slide-left;
}

.lp-ios-toast-host.pos-right .lp-ios-toast,
.lp-ios-toast-host.pos-top-right .lp-ios-toast {
  animation-name: lp-ios-toast-slide-right;
}

.lp-ios-toast:active {
  cursor: grabbing;
}

.lp-ios-toast-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--lp-accent) 18%, var(--lp-surface));
  color: var(--lp-accent);
}

.lp-ios-toast-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lp-ios-toast.lp-toast-success .lp-ios-toast-icon {
  background: color-mix(in srgb, #10b981 20%, var(--lp-surface));
  color: #10b981;
}

.lp-ios-toast.lp-toast-warning .lp-ios-toast-icon {
  background: color-mix(in srgb, #f59e0b 20%, var(--lp-surface));
  color: #f59e0b;
}

.lp-ios-toast.lp-toast-error .lp-ios-toast-icon {
  background: color-mix(in srgb, #ef4444 20%, var(--lp-surface));
  color: #ef4444;
}

.lp-ios-toast-body {
  flex: 1;
  min-width: 0;
}

.lp-ios-toast-msg {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--lp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lp-ios-toast-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--lp-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.lp-ios-toast-close:hover {
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
}

.lp-ios-toast-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
}

@keyframes lp-ios-toast-drop {
  0% { opacity: 0; transform: translate3d(0, -28px, 0) scale(0.94); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes lp-ios-toast-rise {
  0% { opacity: 0; transform: translate3d(0, 28px, 0) scale(0.94); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes lp-ios-toast-slide-left {
  0% { opacity: 0; transform: translate3d(-32px, 0, 0) scale(0.94); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes lp-ios-toast-slide-right {
  0% { opacity: 0; transform: translate3d(32px, 0, 0) scale(0.94); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.lp-table-receipt-card {
  flex: 0 0 264px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid var(--lp-border-strong);
  background: var(--lp-surface);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.lp-table-receipt-card:hover {
  border-color: var(--lp-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.lp-table-receipt-card:active {
  transform: scale(0.99);
}

.lp-table-receipt-head {
  padding: 12px 14px 10px;
  border-bottom: 1.5px solid color-mix(in srgb, var(--lp-accent) 45%, var(--lp-border-strong));
  background: color-mix(in srgb, var(--lp-accent) 9%, var(--lp-surface));
}

.lp-table-receipt-head.mine {
  border-bottom: 2px solid var(--lp-accent);
  background: color-mix(in srgb, var(--lp-accent) 18%, var(--lp-surface));
}

.lp-table-view-footer {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
}

.lp-table-view-footer > .lp-btn {
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
  font-size: clamp(0.7rem, 2.7vw, 0.84rem);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-guest-bar {
  margin: 0 12px 10px;
  padding: 10px 12px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.lp-guest-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

@media (max-width: 639px) {
  .lp-guest-extra {
    display: none !important;
  }

  .lp-guest-row > .lp-btn {
    min-width: 32px !important;
    padding: 6px 7px !important;
    font-size: 0.82rem;
  }
}

/* Full-page mobile Shift / Z-Report modal (centered dialog on desktop) */
.lp-shift-modal {
  flex-direction: column;
  max-width: 680px;
  height: min(88dvh, 720px);
  overflow: hidden;
}

.lp-shift-move-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 8px;
}

@media (max-width: 639px) {
  .lp-shift-backdrop {
    padding: 0 !important;
    align-items: stretch !important;
  }

  .lp-shift-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .lp-shift-modal .lp-settings-content {
    padding: 12px !important;
    overflow-x: hidden !important;
  }

  .lp-shift-modal .lp-card-row {
    gap: 8px;
    min-width: 0;
  }

  .lp-shift-modal .lp-input {
    max-width: 100%;
    min-width: 0;
  }

  .lp-shift-move-grid {
    grid-template-columns: 1fr;
  }
}

.lp-table-receipt-items {
  flex: 1;
  padding: 4px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 120px;
  max-height: 245px;
  overflow-y: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  background: var(--lp-surface);
}

.lp-table-receipt-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--lp-border) 70%, transparent);
  background: transparent;
  font-size: 0.83rem;
}

.lp-table-receipt-item:last-child {
  border-bottom: none;
}

.lp-table-receipt-foot {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--lp-border);
  background: var(--lp-surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lp-floor-legend {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--lp-muted);
}

.lp-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lp-my-orders-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--lp-surface);
  border-bottom: 1px solid var(--lp-border);
  flex-shrink: 0;
}

.lp-my-orders-strip::-webkit-scrollbar {
  display: none;
}

.lp-my-order-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--lp-border-strong);
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.lp-my-order-pill strong {
  font-size: 0.8rem;
}

.lp-my-order-pill span {
  font-size: 0.7rem;
  color: var(--lp-muted);
}

.lp-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
}

.lp-show-sm {
  display: none;
}

@media (hover: hover) {
  .lp-btn:hover:not(:disabled) {
    background: var(--lp-surface-subtle);
  }

  .lp-btn-primary:hover:not(:disabled) {
    background: var(--lp-accent);
    opacity: 0.94;
  }
}

.lp-btn:active:not(:disabled),
.lp-icon-btn:active:not(:disabled),
.lp-panel-toggle:active:not(:disabled),
.lp-qty-btn:active:not(:disabled),
.lp-cat-tab:active:not(:disabled),
.lp-tender-btn:active:not(:disabled),
.lp-nav-item:active:not(:disabled) {
  transform: scale(0.97);
}

.lp-btn-primary:active:not(:disabled) {
  background: var(--lp-accent);
  color: var(--lp-accent-fg);
}

.lp-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Inline Button Activity Spinner */
.lp-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  display: inline-block;
  flex-shrink: 0;
  animation: lp-spin 0.65s linear infinite;
}

@keyframes lp-spin {
  to { transform: rotate(360deg); }
}

.lp-btn-primary {
  background: var(--lp-accent);
  color: var(--lp-accent-fg);
  border-color: var(--lp-accent);
  font-weight: 600;
}

.lp-btn-primary:hover {
  opacity: 0.92;
  background: var(--lp-accent);
}

.lp-btn-danger {
  color: var(--lp-danger);
  border-color: var(--lp-border);
}

.lp-input, .lp-select {
  padding: 8px 11px;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-text);
  font-family: inherit;
  font-size: 0.9em;
}

.lp-input:focus, .lp-select:focus {
  outline: 2px solid var(--lp-accent);
  outline-offset: -1px;
}

/* Toggle Switch (iOS / shadcn pill switch) */
.lp-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 42px;
  height: 24px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--lp-border-strong);
  background: var(--lp-surface-subtle);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.lp-switch.checked {
  background: var(--lp-accent);
  border-color: var(--lp-accent);
}

.lp-switch-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transform: translateX(0);
  transition: transform 150ms ease;
}

.lp-switch.checked .lp-switch-thumb {
  transform: translateX(18px);
}

/* Labeled Form Fields & Responsive Modal Grid */
.lp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.lp-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.lp-label {
  font-size: 0.78em;
  font-weight: 600;
  color: var(--lp-text-secondary);
}

.lp-field .lp-input,
.lp-field .lp-select {
  width: 100%;
  min-width: 0;
}

/* POS Register Split Layout */
.lp-pos-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr minmax(290px, 360px);
  overflow: hidden;
}

.lp-pos-body.lp-cart-hidden {
  grid-template-columns: 1fr;
}

.lp-pos-body.lp-cart-hidden .lp-pos-cart {
  display: none;
}

.lp-pos-catalog {
  padding: 14px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.lp-cat-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.lp-cat-tab {
  padding: 6px 12px;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.lp-cat-tab.active {
  background: var(--lp-accent);
  color: var(--lp-accent-fg);
  border-color: var(--lp-accent);
  font-weight: 600;
}

.lp-pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.lp-pos-grid.lp-pos-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lp-pos-grid.lp-pos-list .lp-pos-card {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 12px;
}

.lp-pos-grid.lp-pos-list .lp-pos-thumb {
  width: 42px;
  height: 42px;
  aspect-ratio: 1 / 1;
  margin-bottom: 0;
  flex-shrink: 0;
}

.lp-pos-grid.lp-pos-list .lp-pos-card-info {
  flex: 1;
  min-width: 0;
}

.lp-pos-grid.lp-pos-list .lp-pos-card-price {
  margin-top: 0;
  text-align: right;
  flex-shrink: 0;
}

.lp-pos-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  padding: 10px;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-text);
  font-family: inherit;
  cursor: pointer;
  min-height: 92px;
  overflow: hidden;
}

.lp-pos-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--lp-radius) - 2px);
  background: var(--lp-surface-subtle);
  border: 1px solid var(--lp-border);
  margin-bottom: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lp-muted);
  font-weight: 600;
  font-size: 0.9em;
  letter-spacing: 0.04em;
}

.lp-pos-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lp-form-modal {
  width: 100%;
  max-width: 560px;
  max-height: 88dvh;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lp-form-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--lp-border);
  background: var(--lp-surface);
  font-size: 0.96rem;
}

.lp-form-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lp-form-modal-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--lp-border);
  background: var(--lp-surface-subtle);
}

.lp-pos-card:hover {
  border-color: var(--lp-border-strong);
}

.lp-pos-card-name {
  font-weight: 600;
  font-size: 0.9em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  min-height: 2.5em;
}

.lp-pos-card-name.lp-name-long {
  font-size: 0.8em;
  line-height: 1.2;
  min-height: 2.4em;
}

.lp-pos-grid.lp-pos-list .lp-pos-card-name {
  min-height: 0;
  -webkit-line-clamp: 2;
}

.lp-pos-card-meta {
  font-size: 0.76em;
  color: var(--lp-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-pos-card-price {
  font-weight: 700;
  color: var(--lp-accent);
  margin-top: 8px;
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-pos-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  min-width: 0;
}

.lp-pos-card-price-row .lp-pos-card-price {
  margin-top: 0;
  flex: 1;
  min-width: 0;
}

.lp-pos-grid.lp-pos-list .lp-pos-card-price-row {
  margin-top: 0;
  width: auto;
  flex-shrink: 0;
}

.lp-card-add-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--lp-accent);
  color: var(--lp-accent-fg);
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 80ms ease, opacity 120ms ease;
}

.lp-card-add-btn:active {
  transform: scale(0.9);
}

.lp-cart-line-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.25;
}

.lp-cart-line-name.lp-name-long {
  font-size: 0.86em;
  line-height: 1.2;
}

.lp-pos-cart {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--lp-border);
  background: var(--lp-surface);
}

.lp-pos-cart-header {
  flex-shrink: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--lp-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lp-pos-cart-lines {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 14px;
}

.lp-pos-cart-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--lp-border);
}

.lp-pos-cart-line-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.lp-pos-cart-line-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.84em;
}

.lp-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-qty-btn-danger {
  color: var(--lp-danger);
}

.lp-cart-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lp-pos-cart-footer {
  flex-shrink: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--lp-border);
  background: var(--lp-surface);
}

.lp-tender-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.lp-tender-btn {
  padding: 8px 10px;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
}

.lp-tender-btn.selected {
  border-color: var(--lp-accent);
  background: var(--lp-surface);
  color: var(--lp-accent);
  font-weight: 600;
}

.lp-settle-calc-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 8px;
  align-items: stretch;
}

.lp-settle-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, 1fr);
  gap: 6px;
  min-width: 0;
}

/* T3 Code Style Settings & Back-Office Page */
.lp-page {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px;
}

.lp-page-inner {
  width: 100%;
  max-width: 920px;
  min-width: 0;
  margin: 0 auto;
}

.lp-dt-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.lp-dt-wrap > div {
  max-width: 100%;
  min-width: 0;
}

.lp-dt-wrap .flex.items-center.justify-between {
  flex-wrap: wrap;
  gap: 8px;
}

.lp-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 20px 0 8px;
}

.lp-section-title:first-child {
  margin-top: 0;
}

.lp-card-group {
  flex-shrink: 0;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: calc(var(--lp-radius) + 2px);
  overflow: hidden;
}

.lp-card-row {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--lp-border);
}

.lp-card-row:last-child {
  border-bottom: none;
}

.lp-row-title {
  font-weight: 500;
  font-size: 0.94rem;
}

.lp-row-desc {
  font-size: 0.82rem;
  color: var(--lp-muted);
  margin-top: 2px;
}

.lp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.lp-table th, .lp-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--lp-border);
}

.lp-table th {
  font-weight: 600;
  color: var(--lp-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--lp-sidebar);
}

.lp-pos-mobile-bar,
.lp-pos-sheet-close,
.lp-backdrop {
  display: none;
}

/* Sidebar Bottom Icon Bar */
.lp-sidebar-footer {
  margin-top: auto;
  padding: 8px 4px 2px;
  border-top: 1px solid var(--lp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.lp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--lp-radius);
  border: none;
  background: transparent;
  color: var(--lp-text-secondary);
  cursor: pointer;
}

.lp-icon-btn:hover {
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
}

/* T3-Style Floating Settings Modal */
.lp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lp-fade-in 120ms ease-out both;
}

@keyframes lp-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lp-settings-modal,
.lp-form-modal {
  animation: lp-modal-pop 160ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes lp-modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lp-settings-modal {
  width: 100%;
  max-width: 940px;
  height: min(84dvh, 720px);
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  display: flex;
  overflow: hidden;
}

.lp-settings-nav {
  width: 224px;
  flex-shrink: 0;
  background: var(--lp-settings-sidebar);
  border-right: 1px solid var(--lp-border);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transition: width 160ms ease, padding 160ms ease;
}

.lp-settings-nav::-webkit-scrollbar {
  display: none;
}

.lp-settings-search-wrap {
  position: sticky;
  top: -12px;
  z-index: 5;
  background: var(--lp-settings-sidebar);
  padding: 12px 10px 8px;
  margin: -12px -10px 4px;
}

.lp-settings-content {
  scrollbar-width: thin;
}

.lp-settings-nav.lp-collapsed {
  width: 0;
  padding: 0;
  border-right: none;
  overflow: hidden;
}

.lp-settings-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--lp-bg);
}

.lp-settings-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--lp-border);
  background: var(--lp-surface);
  font-size: 0.9rem;
}

.lp-settings-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 22px calc(22px + var(--lp-kb-height, 0px));
}

/* Thermal Receipt Preview Paper (Respects Light & Dark Theme) */
.lp-receipt-paper {
  background: var(--lp-surface);
  color: var(--lp-text);
  font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  padding: 18px 16px;
  border-radius: 6px;
  border: 1px dashed var(--lp-border-strong);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  max-width: 340px;
  margin: 0 auto;
}

.lp-receipt-divider {
  border-top: 1px dashed var(--lp-border-strong);
  margin: 10px 0;
}

.lp-receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

/* Animated Splash Screen */
.lp-splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--lp-bg);
  color: var(--lp-text);
}

.lp-splash-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--lp-accent);
  color: var(--lp-accent-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
  animation: lp-splash-pulse 1.6s ease-in-out infinite;
}

.lp-splash-track {
  width: 160px;
  height: 3px;
  border-radius: 99px;
  background: var(--lp-border);
  overflow: hidden;
  position: relative;
}

.lp-splash-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  border-radius: 99px;
  background: var(--lp-accent);
  animation: lp-splash-slide 1.1s ease-in-out infinite;
}

@keyframes lp-splash-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.95); opacity: 0.88; }
}

@keyframes lp-splash-slide {
  0% { left: -45%; }
  100% { left: 100%; }
}

@media (max-width: 699px) {
  .lp-modal-backdrop {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    overflow: hidden;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }

  .lp-settings-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    flex-direction: column !important;
  }

  .lp-settings-modal > .lp-settings-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }

  .lp-settings-body {
    order: 1;
    flex: 1;
    min-height: 0;
  }

  .lp-settings-nav {
    order: 2;
    width: 100%;
    border-right: none;
    border-bottom: none;
    border-top: 1px solid var(--lp-border);
    background: var(--lp-surface);
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 4px;
    flex-shrink: 0;
  }

  .lp-settings-nav::-webkit-scrollbar {
    display: none;
  }

  .lp-settings-about-wrap {
    display: contents !important;
  }

  .lp-settings-nav .lp-nav-label,
  .lp-settings-search-wrap,
  .lp-settings-search {
    display: none;
  }

  .lp-settings-nav .lp-nav-item {
    width: auto;
    min-width: 68px;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
    padding: 6px 8px;
    font-size: 0.72em;
    border-radius: 10px;
    text-align: center;
  }

  .lp-settings-nav .lp-nav-item.active {
    color: var(--lp-accent);
    background: var(--lp-surface-subtle);
    border-color: transparent;
    box-shadow: none;
  }

  .lp-settings-content {
    padding: 14px 12px;
  }
}

/* Compact Desktop / Legacy POS (800x600 - 1024px) */
@media (max-width: 1024px) {
  .lp-sidebar {
    width: 175px;
  }

  .lp-pos-body {
    grid-template-columns: 1fr minmax(260px, 310px);
  }
}

/* Tablet / Phone Sidebar Drawer (< 800px) */
@media (max-width: 799px) {
  .lp-menu-btn {
    display: inline-flex;
  }

  .lp-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 230px;
    padding: 12px 10px;
    border-right: 1px solid var(--lp-border);
    opacity: 1;
    pointer-events: auto;
    z-index: 60;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .lp-sidebar.lp-collapsed {
    width: 230px;
    padding: 12px 10px;
    border-right: 1px solid var(--lp-border);
    opacity: 1;
    pointer-events: auto;
  }

  .lp-sidebar.lp-open {
    transform: translateX(0);
  }

  .lp-backdrop.lp-open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 40;
  }
}

/* Compact Handheld (< 640px: vivo phone) */
@media (max-width: 639px) {
  .lp-topbar {
    padding: 8px 10px;
    gap: 6px;
  }

  .lp-status-bar {
    gap: 6px;
  }

  .lp-topbar-action {
    padding: 6px 8px;
    min-width: 32px;
    height: 32px;
  }

  .lp-status-hide-sm,
  .lp-col-hide-sm,
  .lp-hide-sm {
    display: none !important;
  }

  .lp-show-sm {
    display: inline;
  }

  .lp-filter-bar .lp-select,
  .lp-filter-bar .lp-input {
    flex: 1 1 120px;
    min-width: 0;
  }

  .lp-dt-wrap th,
  .lp-dt-wrap td {
    padding: 8px 6px !important;
  }

  /* Mobile DataTable Pagination Footer: clean compact rows, zero awkward wrapping */
  .lp-dt-wrap > div > div:last-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 8px 0 !important;
  }

  .lp-dt-wrap > div > div:last-child > div {
    width: 100% !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  .lp-dt-wrap > div > div:last-child > div > * {
    margin-left: 0 !important;
    white-space: nowrap !important;
    width: auto !important;
  }

  .lp-dt-wrap > div > div:last-child p {
    display: none !important;
  }

  .lp-pos-body {
    grid-template-columns: 1fr;
  }

  .lp-pos-catalog {
    padding: 10px 12px 84px;
  }

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

  .lp-pos-cart {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80dvh;
    border-left: none;
    border-top: 1px solid var(--lp-border);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.22);
    transform: translateY(105%);
    transition: transform 200ms ease;
    z-index: 50;
  }

  .lp-pos-cart.lp-open,
  .lp-pos-body.lp-cart-hidden .lp-pos-cart.lp-open {
    display: flex;
    transform: translateY(0);
  }

  .lp-pos-sheet-close {
    display: inline-flex;
  }

  .lp-pos-mobile-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 12px;
    border-top: 1px solid var(--lp-border);
    background: var(--lp-surface);
    z-index: 30;
  }

  .lp-page {
    padding: 14px 12px;
  }

  .lp-card-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .lp-form-modal {
    width: 100%;
    max-width: 100% !important;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }

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

  .lp-settle-calc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-settle-presets {
    display: none !important;
  }
}

/* Segmented BbTabs bar with icons (matches shadcn/BlazorBlueprint pill tabs across Web, Desktop & Mobile) */
.lp-bb-tabs {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.lp-bb-tabs-list {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: center;
  gap: 4px !important;
  padding: 4px !important;
  height: auto !important;
  width: 100%;
  max-width: 100%;
  background: var(--lp-surface-subtle) !important;
  border: 1px solid var(--lp-border);
  border-radius: calc(var(--lp-radius) + 3px) !important;
}

.lp-bb-tabs-list.lp-bb-tabs-full {
  display: flex !important;
  width: 100%;
}

.lp-bb-tabs-list.lp-bb-tabs-full .lp-bb-tab {
  flex: 1 1 auto;
}

.lp-bb-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 11px !important;
  min-height: 34px;
  border-radius: var(--lp-radius) !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  color: var(--lp-muted) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.lp-bb-tab:hover {
  color: var(--lp-text) !important;
}

.lp-bb-tab[data-state="active"],
.lp-bb-tab[aria-selected="true"] {
  background: var(--lp-surface) !important;
  color: var(--lp-text) !important;
  font-weight: 600 !important;
  border-color: var(--lp-border) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

.lp-bb-tab .lp-ico {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0;
  opacity: 0.78;
}

.lp-bb-tab[data-state="active"] .lp-ico,
.lp-bb-tab[aria-selected="true"] .lp-ico {
  color: var(--lp-accent);
  opacity: 1;
}

/* Full-width searchable combobox helper for item selectors in modals */
.lp-full-combo {
    display: block;
    width: 100%;
    min-width: 0;
}
.lp-full-combo > *,
.lp-full-combo button[role="combobox"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-content: space-between;
    overflow: hidden;
}
.lp-full-combo button[role="combobox"] > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
}

/* ================= KDS v2 (Orders Display) ================= */
.lp-kds-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--lp-bg);
  color: var(--lp-text);
}

.lp-kds-root.lp-kds-kiosk {
  position: fixed;
  inset: 0;
  z-index: 900;
}

.lp-kds-root.lp-kds-theme-dark {
  --lp-bg: #0b1120;
  --lp-surface: #111827;
  --lp-surface-subtle: #1e293b;
  --lp-border: #263248;
  --lp-text: #f8fafc;
  --lp-muted: #94a3b8;
  --lp-accent: #38bdf8;
  --lp-accent-fg: #09090b;
  background: #0b1120;
  color: #f8fafc;
}

.lp-kds-root.lp-kds-theme-light {
  --lp-bg: #f1f5f9;
  --lp-surface: #ffffff;
  --lp-surface-subtle: #f8fafc;
  --lp-border: #cbd5e1;
  --lp-text: #09090b;
  --lp-muted: #475569;
  --lp-accent: #0284c7;
  --lp-accent-fg: #ffffff;
  background: #f1f5f9;
  color: #09090b;
}

.lp-kds-root.lp-kds-theme-hc {
  --lp-bg: #000000;
  --lp-surface: #0a0a0a;
  --lp-surface-subtle: #171717;
  --lp-border: #52525b;
  --lp-text: #ffffff;
  --lp-muted: #d4d4d8;
  --lp-accent: #facc15;
  --lp-accent-fg: #000000;
  background: #000000;
  color: #ffffff;
}

.lp-kds-root.lp-kds-theme-dark .lp-btn-primary,
.lp-kds-root.lp-kds-theme-hc .lp-btn-primary {
  background: var(--lp-accent);
  color: var(--lp-accent-fg);
  border-color: var(--lp-accent);
}

.lp-kds-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--lp-border);
  background: var(--lp-surface-subtle);
  overflow-x: auto;
  white-space: nowrap;
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.lp-kds-strip::-webkit-scrollbar {
  display: none;
}

.lp-kds-seg {
  display: inline-flex;
  align-items: center;
  background: var(--lp-surface-subtle);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  padding: 2px;
  flex-shrink: 0;
}

.lp-kds-seg .lp-btn {
  border: none;
  padding: 4px 9px;
  min-height: 30px;
  font-size: 0.78em;
}

.lp-kds-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}

.lp-kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
  align-items: start;
}

.lp-kds-grid.lp-kds-cols-fixed {
  grid-template-columns: repeat(var(--kds-cols, 4), minmax(0, 1fr));
}

.lp-kds-masonry {
  column-count: var(--kds-cols, 4);
  column-gap: 12px;
}

.lp-kds-card {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lp-kds-masonry > .lp-kds-card {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 12px;
  display: inline-flex;
  width: 100%;
}

.lp-kds-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--lp-border);
}

.lp-kds-card-lines {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lp-kds-line {
  background: var(--lp-surface-subtle);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.lp-kds-line.done {
  background: color-mix(in srgb, #10b981 12%, var(--lp-surface-subtle));
}

.lp-kds-line-btn {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  color: var(--lp-text);
  font-family: inherit;
}

.lp-kds-qty {
  font-weight: 800;
  font-size: 0.95em;
  color: var(--lp-accent);
  min-width: 28px;
}

.lp-kds-card-foot {
  padding: 8px 10px;
  border-top: 1px solid var(--lp-border);
  display: flex;
  gap: 8px;
}

@media (max-width: 1400px) {
  .lp-kds-masonry.lp-kds-cols-auto { column-count: 3; }
}
@media (max-width: 1024px) {
  .lp-kds-masonry.lp-kds-cols-auto { column-count: 2; }
  .lp-kds-grid.lp-kds-cols-fixed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .lp-kds-masonry,
  .lp-kds-masonry.lp-kds-cols-auto { column-count: 1 !important; }
  .lp-kds-grid,
  .lp-kds-grid.lp-kds-cols-fixed { grid-template-columns: 1fr !important; }
  .lp-kds-body { padding: 8px; }
}

/* ============================================================================
   Custom Top Status Bar / Desktop Extended Title Bar (.lp-top-chrome)
   ============================================================================ */
.lp-root-shell {
  flex-direction: column;
}

.lp-shell-body {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.lp-top-chrome {
  flex-shrink: 0;
  height: 34px;
  min-height: 34px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--lp-sidebar);
  border-bottom: 1px solid var(--lp-border);
  color: var(--lp-text);
  font-size: 0.78rem;
  user-select: none;
  position: relative;
  z-index: 40;
}

.lp-top-chrome-desktop {
  -webkit-app-region: drag;
  app-region: drag;
}

.lp-top-chrome-nodrag,
.lp-top-chrome-nodrag * {
  -webkit-app-region: no-drag;
  app-region: no-drag;
}

.lp-top-chrome-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
}

.lp-top-chrome-logo {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.lp-top-chrome-title {
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-top-chrome-sep {
  color: var(--lp-muted);
  opacity: 0.6;
}

.lp-top-chrome-branch {
  color: var(--lp-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.lp-top-chrome-drag {
  flex: 1;
  height: 100%;
  min-width: 16px;
}

.lp-top-chrome-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lp-top-chrome-clock {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--lp-text-secondary);
  padding-left: 4px;
}

.lp-chrome-pop-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lp-chrome-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-text);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 120ms ease, transform 80ms ease;
}

.lp-chrome-pill:active {
  transform: scale(0.97);
}

.lp-chrome-pill.active {
  border-color: var(--lp-accent);
}

.lp-chrome-pill-accent {
  background: var(--lp-accent);
  color: var(--lp-accent-fg);
  border-color: transparent;
}

.lp-chrome-bell {
  padding: 0 7px;
}

.lp-chrome-ico {
  width: 13px;
  height: 13px;
}

.lp-chrome-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
  background: var(--lp-muted);
}

.lp-chrome-dot.ok { background: #10b981; }
.lp-chrome-dot.warn { background: #f59e0b; }
.lp-chrome-dot.danger { background: #ef4444; }
.lp-chrome-dot.info { background: var(--lp-accent); }
.lp-chrome-dot.muted { background: var(--lp-muted); opacity: 0.65; }

.lp-chrome-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--lp-surface-subtle);
  color: var(--lp-text);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.lp-chrome-badge-accent {
  background: var(--lp-accent);
  color: var(--lp-accent-fg);
}

.lp-chrome-clickaway {
  position: fixed;
  inset: 0;
  z-index: 38;
  background: transparent;
}

.lp-chrome-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 260px;
  max-width: calc(100vw - 20px);
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  z-index: 45;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lp-chrome-popover-wide {
  width: 310px;
}

.lp-chrome-popover-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--lp-border);
  font-size: 0.82rem;
}

.lp-chrome-status-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--lp-surface-subtle);
  color: var(--lp-text-secondary);
}

.lp-chrome-status-tag.ok { color: #10b981; }
.lp-chrome-status-tag.warn { color: #d97706; }
.lp-chrome-status-tag.danger { color: #ef4444; }

.lp-chrome-popover-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}

.lp-chrome-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--lp-text-secondary);
}

.lp-chrome-kv strong {
  color: var(--lp-text);
}

.lp-chrome-err {
  font-size: 0.74rem;
  color: var(--lp-danger);
  background: color-mix(in srgb, var(--lp-danger) 10%, transparent);
  padding: 6px 8px;
  border-radius: 6px;
  word-break: break-word;
}

.lp-chrome-sublist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--lp-border);
}

.lp-chrome-subitem {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--lp-text);
}

.lp-chrome-notif-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.lp-chrome-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--lp-border);
  font-size: 0.78rem;
}

.lp-chrome-notif-item:last-child {
  border-bottom: none;
}

.lp-chrome-notif-content {
  flex: 1;
  min-width: 0;
}

.lp-chrome-notif-msg {
  color: var(--lp-text);
  word-break: break-word;
  line-height: 1.35;
}

.lp-chrome-notif-time {
  font-size: 0.7rem;
  color: var(--lp-muted);
  margin-top: 2px;
}

.lp-chrome-empty {
  padding: 16px 12px;
  text-align: center;
  color: var(--lp-muted);
  font-size: 0.8rem;
}

.lp-chrome-link-btn {
  background: none;
  border: none;
  color: var(--lp-accent);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.lp-chrome-popover-ftr {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--lp-border);
  background: var(--lp-surface-subtle);
}

.lp-chrome-ftr-btn {
  flex: 1;
  justify-content: center;
  padding: 6px 10px;
  font-size: 0.78rem;
  min-height: 32px;
}

@media (max-width: 640px) {
  .lp-top-chrome {
    height: 36px;
    min-height: 36px;
  }
  .lp-chrome-pill {
    height: 26px;
    padding: 0 9px;
  }
}
