/* ==========================================================================
   Wealthy POS — soft, modern register design system
   Layered ink surfaces, calm azure accents, generous radii and low-noise
   chrome. Class names are shared with the terminal JavaScript, so component
   hooks remain stable.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Canvas & surfaces */
  --pos-bg: #eef2f9;
  --pos-bg-soft: #f4f7fc;
  --pos-surface: #ffffff;
  --pos-surface-2: #f6f9fd;
  --pos-surface-3: #e9eff8;
  --pos-card: #ffffff;
  --pos-card-border: rgba(32, 58, 100, 0.12);
  --pos-card-border-strong: rgba(32, 58, 100, 0.2);
  --pos-card-hover: rgba(32, 58, 100, 0.04);

  /* Type */
  --pos-text: #1c2739;
  --pos-text-muted: #55647b;
  --pos-text-dim: #7b8aa0;

  /* Accents */
  --pos-accent: #5d8fcd;
  --pos-accent-strong: #35689f;
  --pos-accent-deep: #295a92;
  --pos-accent-soft: rgba(93, 143, 205, 0.12);
  --pos-cyan: #2f7d95;
  --pos-emerald: #2e8a67;
  --pos-amber: #9a6b1f;
  --pos-rose: #b14b63;
  --pos-ink-on-accent: #ffffff;

  /* Depth */
  --pos-shadow-sm: 0 1px 2px rgba(31, 55, 96, 0.08);
  --pos-shadow: 0 18px 44px -24px rgba(31, 55, 96, 0.26);
  --pos-shadow-lg: 0 40px 100px -36px rgba(31, 55, 96, 0.34);

  /* Shape */
  --pos-radius-xs: 8px;
  --pos-radius-sm: 11px;
  --pos-radius: 16px;
  --pos-radius-lg: 22px;
  --pos-radius-xl: 28px;

  /* Type stacks */
  --pos-font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --pos-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --pos-primary-grad: linear-gradient(135deg, #7aa6d8 0%, #5d8cc6 48%, #3f70ac 100%);
  --pos-ring: 0 0 0 3px rgba(93, 143, 205, 0.24);
  --pos-ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--pos-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--pos-text);
  background:
    radial-gradient(1200px 620px at 10% -18%, rgba(122, 166, 216, 0.26), transparent 55%),
    radial-gradient(940px 520px at 104% -8%, rgba(122, 200, 178, 0.16), transparent 52%),
    radial-gradient(1100px 640px at 62% 116%, rgba(140, 152, 205, 0.14), transparent 56%),
    var(--pos-bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.pos-app {
  user-select: auto;
}

::selection {
  background: rgba(74, 124, 188, 0.28);
  color: #1b2637;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--pos-accent-strong);
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  font-weight: 650;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

code,
kbd,
samp {
  font-family: var(--pos-mono);
}

code {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 7px;
  border: 1px solid rgba(32, 58, 100, 0.12);
  background: rgba(20, 45, 85, 0.044);
  color: var(--pos-text-muted);
  font-size: 0.82em;
  white-space: nowrap;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 1px 5px;
  border: 1px solid rgba(32, 58, 100, 0.2);
  border-radius: 6px;
  background: rgba(20, 45, 85, 0.050);
  color: var(--pos-text);
  font-size: 0.72rem;
  font-weight: 650;
}

.text-end,
.text-right {
  text-align: right !important;
}

/* Soft scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(32, 58, 100, 0.22) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(32, 58, 100, 0.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(32, 58, 100, 0.34);
  background-clip: padding-box;
}

/* Accessible interaction states */
button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
summary,
[tabindex] {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(74, 124, 188, 0.55);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none !important;
}

/* -------------------------------------------------------------
   Navigation
   ------------------------------------------------------------- */
.pos-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 66px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-bottom: 1px solid rgba(32, 58, 100, 0.1);
  box-shadow: 0 12px 34px -26px rgba(31, 55, 96, 0.45);
}

.pos-navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pos-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 260px;
  color: #1b2637;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.pos-brand > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-badge-logo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--pos-primary-grad);
  color: var(--pos-ink-on-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow:
    0 12px 24px -10px rgba(74, 124, 188, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.pos-terminal-badge {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(74, 124, 188, 0.16);
  background: rgba(74, 124, 188, 0.07);
  color: var(--pos-accent-strong);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pos-nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pos-nav-links a,
.pos-more-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--pos-text-muted);
  font-size: 0.86rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.16s var(--pos-ease),
    background 0.16s var(--pos-ease),
    border-color 0.16s var(--pos-ease);
}

.pos-nav-links a:hover,
.pos-more-menu summary:hover {
  color: var(--pos-text);
  background: rgba(20, 45, 85, 0.050);
}

.pos-nav-links a.active {
  color: #2b5480;
  background: rgba(74, 124, 188, 0.13);
  border-color: rgba(74, 124, 188, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-weight: 600;
}

.pos-more-menu {
  position: relative;
}

.pos-more-menu summary {
  list-style: none;
}

.pos-more-menu summary::-webkit-details-marker {
  display: none;
}

.pos-more-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 120;
  width: 214px;
  padding: 7px;
  border: 1px solid var(--pos-card-border);
  border-radius: 16px;
  background: #f5f8fd;
  box-shadow: var(--pos-shadow-lg);
}

.pos-more-menu a,
.pos-more-menu .pos-menu-action {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--pos-text-muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 550;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.pos-more-menu .pos-menu-action[hidden] {
  display: none;
}

.pos-more-menu a:hover,
.pos-more-menu a[aria-current="page"],
.pos-more-menu .pos-menu-action:hover {
  color: var(--pos-text);
  background: rgba(74, 124, 188, 0.1);
}

.pos-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.kiosk-clock {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(74, 124, 188, 0.16);
  background: rgba(74, 124, 188, 0.07);
  color: var(--pos-accent-strong);
  font-family: var(--pos-mono);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(32, 58, 100, 0.14);
  background: rgba(20, 45, 85, 0.045);
  color: var(--pos-text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
  flex: 0 0 auto;
}

.status-pill.online {
  color: var(--pos-emerald);
  border-color: rgba(46, 138, 103, 0.24);
  background: rgba(46, 138, 103, 0.09);
}

.status-pill.offline {
  color: #a63d55;
  border-color: rgba(177, 75, 99, 0.24);
  background: rgba(177, 75, 99, 0.09);
}

.status-pill.offline::before {
  box-shadow: 0 0 0 3px rgba(177, 75, 99, 0.12);
  animation: posPulse 2.4s ease-in-out infinite;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pos-kiosk-btn,
.pos-exit-kiosk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--pos-card-border);
  background: rgba(20, 45, 85, 0.040);
  color: var(--pos-text-muted);
  font-size: 0.78rem;
  font-weight: 550;
  cursor: pointer;
  transition:
    color 0.16s var(--pos-ease),
    background 0.16s var(--pos-ease),
    border-color 0.16s var(--pos-ease);
}

.pos-kiosk-btn:hover {
  color: var(--pos-text);
  background: rgba(20, 45, 85, 0.080);
  border-color: var(--pos-card-border-strong);
}

.pos-exit-kiosk-btn {
  display: none;
  color: #a63d55;
  background: rgba(177, 75, 99, 0.1);
  border-color: rgba(177, 75, 99, 0.24);
}

.pos-exit-kiosk-btn:hover {
  color: #8f2f47;
  background: rgba(177, 75, 99, 0.18);
}

.pos-user-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pos-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 230px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--pos-card-border);
  background: rgba(20, 45, 85, 0.035);
  color: #1b2637;
  font-size: 0.78rem;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pos-user-role {
  color: var(--pos-text-dim);
  font-weight: 500;
}

.btn-signout {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--pos-card-border);
  background: transparent;
  color: var(--pos-text-muted);
  font-size: 0.76rem;
  font-weight: 550;
  cursor: pointer;
  transition:
    color 0.16s var(--pos-ease),
    background 0.16s var(--pos-ease),
    border-color 0.16s var(--pos-ease);
}

.btn-signout:hover {
  color: #a63d55;
  background: rgba(177, 75, 99, 0.1);
  border-color: rgba(177, 75, 99, 0.24);
}

/* Every header control shares one height and one pill rhythm */
.pos-navbar .pos-nav-links a,
.pos-navbar .pos-more-menu summary,
.pos-navbar .status-pill,
.pos-navbar .kiosk-clock,
.pos-navbar .btn-pos,
.pos-navbar .pos-kiosk-btn,
.pos-navbar .pos-user-badge,
.pos-navbar .btn-signout {
  align-items: center;
  height: 36px;
  min-height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  white-space: nowrap;
}

.pos-navbar .btn-signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pos-navbar .btn-pos {
  padding-right: 14px;
  padding-left: 14px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.pos-navbar .pos-user-badge {
  padding-right: 12px;
  padding-left: 12px;
}

/* -------------------------------------------------------------
   Flash messages & banners
   ------------------------------------------------------------- */
.pos-flash-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px 0;
}

.pos-flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 16px;
  border: 1px solid rgba(74, 124, 188, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 60%),
    rgba(74, 124, 188, 0.09);
  color: #2b5480;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--pos-shadow-sm);
  transition:
    opacity 0.3s var(--pos-ease),
    transform 0.3s var(--pos-ease);
}

.pos-flash-hide {
  opacity: 0;
  transform: translateY(-8px);
}

.pos-flash-warn {
  border-color: rgba(190, 138, 48, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 60%),
    rgba(190, 138, 48, 0.09);
  color: #7a5310;
}

.pos-flash-warn a {
  color: #7a5310;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* -------------------------------------------------------------
   Workspace, page headers & panels
   ------------------------------------------------------------- */
.pos-workspace {
  width: 100%;
  max-width: 1400px;
  margin: 24px auto 48px;
  padding: 0 24px;
}

.pos-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 22px;
}

.pos-page-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.pos-page-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(74, 124, 188, 0.18);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), transparent 55%),
    rgba(74, 124, 188, 0.1);
  color: var(--pos-accent-strong);
  font-size: 21px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pos-page-icon:empty::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 5px;
  box-shadow: 6px 6px 0 -2px currentColor;
}

.pos-page-heading h1 {
  margin: 0 0 3px;
  font-size: clamp(1.28rem, 1.1rem + 0.45vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1b2637;
}

.pos-page-heading p {
  margin: 0;
  color: var(--pos-text-muted);
  font-size: 0.86rem;
  max-width: 72ch;
}

.pos-panel {
  margin-bottom: 22px;
  border: 1px solid var(--pos-card-border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
    var(--pos-surface);
  box-shadow: var(--pos-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.pos-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 22px;
  border-bottom: 1px solid rgba(32, 58, 100, 0.09);
  background: rgba(20, 45, 85, 0.027);
}

.pos-panel-heading h2,
.pos-panel-heading h3 {
  margin: 0 0 2px;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #1b2637;
}

.pos-panel-heading p {
  margin: 0;
  color: var(--pos-text-muted);
  font-size: 0.8rem;
}

.pos-panel-body {
  padding: 22px;
}

.pos-content-card {
  width: 100%;
  max-width: 1400px;
  margin: 24px auto 48px;
  padding: 24px;
  border: 1px solid var(--pos-card-border);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
    var(--pos-surface);
  box-shadow: var(--pos-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.pos-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

/* -------------------------------------------------------------
   Forms
   ------------------------------------------------------------- */
.pos-field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--pos-text-muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pos-field-label .req {
  color: var(--pos-rose);
}

.pos-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(32, 58, 100, 0.15);
  border-radius: 12px;
  background: rgba(20, 45, 85, 0.050);
  color: var(--pos-text);
  font-size: 0.93rem;
  line-height: 1.35;
  outline: none;
  transition:
    border-color 0.16s var(--pos-ease),
    box-shadow 0.16s var(--pos-ease),
    background 0.16s var(--pos-ease);
}

.pos-input:hover {
  border-color: rgba(32, 58, 100, 0.24);
}

.pos-input:focus {
  border-color: rgba(74, 124, 188, 0.62);
  background: #ffffff;
  box-shadow: var(--pos-ring);
}

.pos-input::placeholder {
  color: var(--pos-text-dim);
  opacity: 0.85;
}

select.pos-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23a7b5cc' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

select.pos-input option {
  background: #f8fafd;
  color: var(--pos-text);
}

textarea.pos-input {
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
}

input[type="date"].pos-input,
input[type="datetime-local"].pos-input {
  color-scheme: dark;
}

input[type="checkbox"] {
  accent-color: var(--pos-accent-deep);
}

input[type="search"]::-webkit-search-cancel-button {
  filter: invert(0.7);
}

.pos-help {
  padding: 10px 0;
  color: var(--pos-text-muted);
  font-size: 0.84rem;
}

.pos-error {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(177, 75, 99, 0.28);
  border-radius: 12px;
  background: rgba(177, 75, 99, 0.1);
  color: #a63d55;
  font-size: 0.86rem;
  font-weight: 500;
}

#tender-progress {
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(74, 124, 188, 0.2);
  border-radius: 12px;
  background: rgba(74, 124, 188, 0.08);
  color: #2b5480;
  font-size: 0.86rem;
}

.pos-checkbox-card {
  padding: 16px;
  border: 1px solid var(--pos-card-border);
  border-radius: 14px;
  background: rgba(20, 45, 85, 0.032);
}

.pos-checkbox-card > label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--pos-text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.pos-checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--pos-accent);
}

.pos-checkbox-card small {
  display: block;
  margin: 7px 0 0 30px;
  color: var(--pos-text-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

/* -------------------------------------------------------------
   Buttons
   ------------------------------------------------------------- */
.btn-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 0.89rem;
  font-weight: 650;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.16s var(--pos-ease),
    background 0.16s var(--pos-ease),
    border-color 0.16s var(--pos-ease),
    box-shadow 0.16s var(--pos-ease),
    color 0.16s var(--pos-ease);
}

.btn-pos:hover {
  transform: translateY(-1px);
}

.btn-pos:active {
  transform: translateY(1px) scale(0.995);
}

.btn-pos.btn-pay {
  background: var(--pos-primary-grad);
  color: var(--pos-ink-on-accent);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 16px 30px -14px rgba(74, 124, 188, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-pos.btn-pay:hover {
  filter: brightness(1.045);
  box-shadow:
    0 20px 38px -14px rgba(74, 124, 188, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn-pos.btn-pay:active {
  filter: brightness(0.98);
}

.btn-pos.btn-hold {
  background: rgba(20, 45, 85, 0.045);
  border-color: rgba(32, 58, 100, 0.17);
  color: var(--pos-text);
}

.btn-pos.btn-hold:hover {
  background: rgba(20, 45, 85, 0.07);
  border-color: rgba(32, 58, 100, 0.28);
  color: var(--pos-accent-deep);
}

.btn-pos.btn-clear {
  background: rgba(177, 75, 99, 0.09);
  border-color: rgba(177, 75, 99, 0.22);
  color: #a63d55;
}

.btn-pos.btn-clear:hover {
  background: rgba(177, 75, 99, 0.14);
  border-color: rgba(177, 75, 99, 0.34);
  color: #8f2f47;
}

.btn-discount-link {
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--pos-accent-strong);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.btn-discount-link:hover {
  color: #2b5480;
}

.btn-apply-line-disc {
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid rgba(32, 58, 100, 0.16);
  border-radius: 8px;
  background: rgba(20, 45, 85, 0.040);
  color: var(--pos-text-muted);
  font-size: 0.71rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s var(--pos-ease);
}

.btn-apply-line-disc:hover {
  color: var(--pos-accent-strong);
  border-color: rgba(74, 124, 188, 0.3);
  background: rgba(74, 124, 188, 0.1);
}

/* -------------------------------------------------------------
   Badges
   ------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(32, 58, 100, 0.16);
  background: rgba(20, 45, 85, 0.050);
  color: var(--pos-text-muted);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-success {
  color: var(--pos-emerald);
  border-color: rgba(46, 138, 103, 0.24);
  background: rgba(46, 138, 103, 0.09);
}

.badge-warning {
  color: var(--pos-amber);
  border-color: rgba(190, 138, 48, 0.26);
  background: rgba(190, 138, 48, 0.1);
}

.badge-danger {
  color: #a63d55;
  border-color: rgba(177, 75, 99, 0.26);
  background: rgba(177, 75, 99, 0.1);
}

.badge-info {
  color: var(--pos-accent-strong);
  border-color: rgba(74, 124, 188, 0.24);
  background: rgba(74, 124, 188, 0.1);
}

.badge-secondary {
  color: var(--pos-text-muted);
  background: rgba(20, 45, 85, 0.050);
}

/* -------------------------------------------------------------
   Register shell
   ------------------------------------------------------------- */
.register-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 15px 22px 0;
}

.register-heading h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #1b2637;
}

.register-heading p {
  margin: 2px 0 0;
  color: var(--pos-text-muted);
  font-size: 0.82rem;
}

.register-shortcuts {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--pos-text-dim);
  font-size: 0.73rem;
  white-space: nowrap;
}

.register-shortcuts kbd {
  margin-right: 2px;
}

.mobile-register-tabs {
  display: none;
  flex-shrink: 0;
  gap: 8px;
  padding: 10px 12px 0;
}

.mobile-register-tabs .btn-pos {
  flex: 1;
}

.pos-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 43%);
  gap: 16px;
  flex: 1;
  min-height: 0;
  padding: 14px 20px 18px;
}

.pos-catalog-panel,
.pos-cart-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--pos-card-border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 26%),
    var(--pos-card);
  box-shadow: var(--pos-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.pos-cart-panel {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

/* -------------------------------------------------------------
   Catalog
   ------------------------------------------------------------- */
.pos-search-bar {
  display: grid;
  grid-template-columns: minmax(124px, 0.66fr) minmax(0, 1.3fr) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(32, 58, 100, 0.09);
  background: rgba(20, 45, 85, 0.030);
}

.pos-search-field {
  position: relative;
  min-width: 0;
}

.pos-search-field .pos-input {
  padding-left: 36px;
  padding-right: 9px;
  text-overflow: ellipsis;
}

.pos-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pos-text-dim);
  font-size: 0.9rem;
  pointer-events: none;
  line-height: 1;
}

.pos-warehouse-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 5px 11px;
  border: 1px solid rgba(32, 58, 100, 0.14);
  border-radius: 12px;
  background: rgba(20, 45, 85, 0.036);
  transition: border-color 0.16s var(--pos-ease), background 0.16s var(--pos-ease);
}

.pos-warehouse-pill:hover {
  border-color: rgba(74, 124, 188, 0.3);
}

.pos-warehouse-label {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--pos-text-dim);
  line-height: 0;
}

.pos-warehouse-pill ng-w-j-drop-down2 {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.pos-warehouse-pill .entity-trigger {
  min-height: 0;
  padding: 3px 18px 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pos-accent-strong);
  font-size: 0.83rem;
  font-weight: 650;
  box-shadow: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%237cc0ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.pos-warehouse-pill .entity-trigger:hover,
.pos-warehouse-pill .entity-trigger:focus {
  border: 0;
  box-shadow: none;
  color: #2b5480;
}

.pos-warehouse-dropdown {
  min-width: 0;
  width: 100%;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: var(--pos-accent-strong);
  font-size: 0.83rem;
  font-weight: 650;
  outline: none;
  cursor: pointer;
}

.pos-warehouse-dropdown option {
  background: #f8fafd;
  color: var(--pos-text);
}

.pos-search-pick {
  white-space: nowrap;
  font-size: 0.8rem;
  padding: 10px 11px;
}

.pos-search-sync {
  margin: 0;
}

.pos-search-sync .btn-pos {
  width: 100%;
  white-space: nowrap;
  font-size: 0.8rem;
  padding: 10px 11px;
}

.pos-category-tabs {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(32, 58, 100, 0.08);
  background: rgba(20, 45, 85, 0.025);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.pos-category-tabs::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid rgba(32, 58, 100, 0.13);
  border-radius: 999px;
  background: rgba(20, 45, 85, 0.035);
  color: var(--pos-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 0.15s var(--pos-ease),
    background 0.15s var(--pos-ease),
    border-color 0.15s var(--pos-ease),
    transform 0.15s var(--pos-ease);
}

.cat-btn:hover {
  color: var(--pos-accent-deep);
  background: rgba(20, 45, 85, 0.070);
  border-color: rgba(32, 58, 100, 0.24);
}

.cat-btn.active {
  color: var(--pos-ink-on-accent);
  background: var(--pos-primary-grad);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 10px 20px -12px rgba(74, 124, 188, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-weight: 700;
}

.cat-btn.inv-btn {
  border-style: dashed;
}

.catalog-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  padding: 8px 18px;
  color: var(--pos-text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.01em;
}

.catalog-feedback > :last-child {
  text-align: right;
}

.catalog-no-matches {
  padding: 24px 18px;
  color: var(--pos-text-muted);
  font-size: 0.9rem;
}

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

.product-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 152px;
  padding: 13px;
  border: 1px solid rgba(32, 58, 100, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.045), transparent 46%),
    #ffffff;
  cursor: pointer;
  transition:
    transform 0.18s var(--pos-ease),
    border-color 0.18s var(--pos-ease),
    background 0.18s var(--pos-ease),
    box-shadow 0.18s var(--pos-ease);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.product-tile:hover,
.product-tile:focus-visible {
  border-color: rgba(74, 124, 188, 0.4);
  background:
    linear-gradient(165deg, rgba(74, 124, 188, 0.09), transparent 55%),
    #ffffff;
  transform: translateY(-2px);
  box-shadow:
    0 18px 32px -22px rgba(31, 55, 96, 0.38),
    0 0 0 1px rgba(74, 124, 188, 0.06);
}

.product-tile:active {
  transform: translateY(0) scale(0.985);
}

.tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 5px;
  margin-bottom: 7px;
}

.tile-cat-badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(20, 45, 85, 0.055);
  color: var(--pos-text-muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.tile-discount-pill {
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(46, 138, 103, 0.3);
  background: rgba(46, 138, 103, 0.12);
  color: var(--pos-emerald);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tile-stock-dot {
  color: var(--pos-emerald);
  font-size: 0.6rem;
}

.tile-stock-dot.in-stock {
  color: var(--pos-accent);
  text-shadow: 0 0 10px rgba(74, 124, 188, 0.6);
}

.tile-code {
  color: var(--pos-text-muted);
  font-family: var(--pos-mono);
  font-size: 0.68rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tile-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  margin: 4px 0 3px;
  color: #1b2637;
  font-size: 0.89rem;
  font-weight: 600;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.tile-availability {
  margin-top: auto;
  padding-top: 6px;
  color: var(--pos-text-muted);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-footer {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  margin-top: 5px;
}

.tile-price {
  width: 100%;
  color: #2b5480;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* -------------------------------------------------------------
   Cart
   ------------------------------------------------------------- */
.cart-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  flex-shrink: 0;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(32, 58, 100, 0.09);
  background: rgba(20, 45, 85, 0.030);
}

.cart-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cart-title {
  margin-right: auto;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #1b2637;
}

.cart-count-pill {
  padding: 3px 9px;
  border: 1px solid rgba(74, 124, 188, 0.2);
  border-radius: 999px;
  background: rgba(74, 124, 188, 0.1);
  color: var(--pos-accent-strong);
  font-size: 0.71rem;
  font-weight: 650;
}

.cart-customer-select {
  width: 100%;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid rgba(32, 58, 100, 0.14);
  border-radius: 11px;
  background: rgba(20, 45, 85, 0.048);
  color: var(--pos-text);
  font-size: 0.84rem;
  font-weight: 500;
  outline: none;
}

.cart-customer-select:focus {
  border-color: rgba(74, 124, 188, 0.6);
  box-shadow: var(--pos-ring);
}

.cart-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 16px;
  border-bottom: 1px solid rgba(74, 124, 188, 0.14);
  background: rgba(74, 124, 188, 0.08);
  color: #2b5480;
  font-size: 0.8rem;
}

.cart-items-container {
  flex: 1 1 auto;
  min-height: 148px;
  overflow-y: auto;
  border-bottom: 1px solid rgba(32, 58, 100, 0.08);
}

.cart-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.cart-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(32, 58, 100, 0.1);
  background: #f8fafd;
  color: var(--pos-text-dim);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
}

.cart-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(32, 58, 100, 0.06);
  font-size: 0.88rem;
  vertical-align: top;
}

.cart-table td:first-child {
  overflow-wrap: anywhere;
}

.cart-table th:last-child,
.cart-table td:last-child {
  padding-right: 10px;
  text-align: right;
}

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

.cart-table .text-end {
  white-space: nowrap;
}

.cart-table td.text-end {
  font-variant-numeric: tabular-nums;
}

.cart-row {
  transition: background 0.14s var(--pos-ease);
}

.cart-row:hover {
  background: rgba(20, 45, 85, 0.025);
}

.recent-item {
  animation: scanned-row 1.4s var(--pos-ease);
}

@keyframes scanned-row {
  0% { background: rgba(74, 124, 188, 0.16); }
  100% { background: transparent; }
}

.qty-control {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 3px;
  width: 100%;
  max-width: 146px;
}

.qty-btn {
  width: 34px;
  height: 38px;
  border: 1px solid rgba(32, 58, 100, 0.15);
  border-radius: 9px;
  background: rgba(20, 45, 85, 0.035);
  color: var(--pos-text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.14s var(--pos-ease);
}

.qty-btn:hover {
  color: var(--pos-accent-deep);
  background: rgba(74, 124, 188, 0.12);
  border-color: rgba(74, 124, 188, 0.3);
}

.qty-display {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 4px;
  border: 1px solid rgba(32, 58, 100, 0.13);
  border-radius: 9px;
  background: rgba(20, 45, 85, 0.053);
  color: #1b2637;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.qty-display:focus {
  border-color: rgba(74, 124, 188, 0.6);
  box-shadow: var(--pos-ring);
  outline: none;
}

.remove-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 4px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--pos-text-dim);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.14s var(--pos-ease);
}

.remove-btn:hover {
  color: #a63d55;
  background: rgba(177, 75, 99, 0.1);
}

.cart-line-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cart-line-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #1b2637;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-line-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  color: var(--pos-text-muted);
  font-family: var(--pos-mono);
  font-size: 0.7rem;
  line-height: 1.4;
}

.cart-line-code {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-line-unit {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cart-line-discount {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
  font-size: 0.66rem;
}

.cart-line-disc-amount {
  color: var(--pos-emerald);
  font-weight: 600;
  white-space: nowrap;
}

.btn-apply-line-disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 24px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid rgba(32, 58, 100, 0.14);
  border-radius: 6px;
  background: rgba(32, 58, 100, 0.045);
  color: var(--pos-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.14s var(--pos-ease);
}

.btn-apply-line-disc:hover {
  border-color: rgba(74, 124, 188, 0.4);
  background: var(--pos-accent-soft);
  color: var(--pos-accent-deep);
}

.cart-line-total {
  color: #1b2637;
  font-size: 0.86rem;
  font-weight: 700;
}

.cart-line-gross {
  color: var(--pos-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: line-through;
}

.cart-line-net {
  color: #1b2637;
  font-weight: 700;
}

.cart-items-container:has(.cart-empty-state) {
  display: flex;
}

.cart-items-container:has(.cart-empty-state) .cart-table {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.cart-items-container:has(.cart-empty-state) .cart-table thead {
  display: none;
}

.cart-items-container:has(.cart-empty-state) .cart-table tbody,
.cart-items-container:has(.cart-empty-state) .cart-table tbody tr {
  display: flex;
  flex: 1 1 auto;
}

.cart-items-container:has(.cart-empty-state) .cart-table tbody td {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
}

.cart-empty-state {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 14px 18px;
  text-align: center;
}

.cart-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--pos-text-dim);
  opacity: 0.6;
}

.cart-empty-title {
  margin-bottom: 4px;
  color: #26344a;
  font-size: 0.98rem;
  font-weight: 650;
}

.cart-empty-sub {
  color: var(--pos-text-muted);
  font-size: 0.8rem;
}

.cart-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  flex-shrink: 0;
  padding: 10px 16px 12px;
  background: rgba(20, 45, 85, 0.029);
  border-bottom: 1px solid rgba(32, 58, 100, 0.08);
}

.summary-meta-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(32, 58, 100, 0.07);
}

.summary-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: var(--pos-text-dim);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.summary-meta-value {
  color: var(--pos-accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-tax-select {
  width: 100%;
  max-width: 142px;
  min-height: 30px;
  height: 30px;
  padding: 2px 26px 2px 9px;
  border-radius: 9px;
  background-color: rgba(20, 45, 85, 0.056);
  font-size: 0.74rem;
  background-position: right 8px center;
}

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  color: var(--pos-text-muted);
  font-size: 0.8rem;
}

.summary-row > div:first-child {
  min-width: 0;
  white-space: nowrap;
}

.summary-row > span:last-child {
  color: var(--pos-text);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.summary-row.total-row {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(74, 124, 188, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(74, 124, 188, 0.14), rgba(74, 124, 188, 0.05) 60%),
    rgba(74, 124, 188, 0.08);
  color: #1b2637;
  font-size: 0.85rem;
  font-weight: 750;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.summary-row.total-row #summary-total {
  color: #1f4f86;
  font-size: 1.3rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(74, 124, 188, 0.26);
}

.cart-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  flex-shrink: 0;
  padding: 10px 14px 13px;
  border-top: 1px solid rgba(32, 58, 100, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.cart-actions .btn-pos {
  min-height: 34px;
  padding: 0 8px;
  font-size: 0.78rem;
  white-space: nowrap;
}

#btn-pay-cart {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 18px;
  font-size: 0.95rem;
}

#btn-pay-cart strong {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

#btn-hold-cart {
  grid-column: 1;
  grid-row: 2;
}

#btn-resume-held {
  grid-column: 2;
  grid-row: 2;
}

#btn-clear-cart {
  grid-column: 3;
  grid-row: 2;
}

/* -------------------------------------------------------------
   Modals, tender & keypad
   ------------------------------------------------------------- */
.pos-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(31, 47, 73, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pos-modal-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 40px);
  border: 1px solid rgba(32, 58, 100, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 28%),
    #f8fafd;
  box-shadow:
    0 40px 100px -32px rgba(31, 55, 96, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 17px 21px;
  border-bottom: 1px solid rgba(32, 58, 100, 0.1);
  background: rgba(20, 45, 85, 0.027);
}

.modal-title {
  margin: 0;
  color: #1b2637;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.modal-close-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--pos-text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s var(--pos-ease);
}

.modal-close-btn:hover {
  color: var(--pos-text);
  background: rgba(20, 45, 85, 0.070);
  border-color: rgba(32, 58, 100, 0.16);
}

.modal-body {
  min-height: 0;
  padding: 19px 21px 21px;
  overflow-y: auto;
}

.modal-footer {
  flex-shrink: 0;
  padding: 13px 21px 17px;
  border-top: 1px solid rgba(32, 58, 100, 0.1);
  background: rgba(20, 45, 85, 0.040);
}

.modal-footer .btn-pos {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
}

.tender-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 11px;
  padding: 4px;
  border: 1px solid rgba(32, 58, 100, 0.12);
  border-radius: 13px;
  background: rgba(20, 45, 85, 0.044);
}

.tender-tab {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--pos-text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s var(--pos-ease);
}

.tender-tab:hover {
  color: var(--pos-accent-deep);
  background: rgba(20, 45, 85, 0.050);
}

.tender-tab.active {
  color: var(--pos-ink-on-accent);
  background: var(--pos-primary-grad);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 20px -12px rgba(74, 124, 188, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-weight: 700;
}

.tender-display-box {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(32, 58, 100, 0.12);
  border-radius: 16px;
  background: rgba(20, 45, 85, 0.040);
}

.tender-display-box #tender-due-display {
  color: var(--pos-accent-strong);
  text-shadow: 0 0 22px rgba(74, 124, 188, 0.28);
}

.tender-display-box #tender-change-display {
  color: var(--pos-emerald);
}

.quick-cash-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 9px;
}

.quick-cash-btn {
  min-height: 40px;
  padding: 7px 4px;
  border: 1px solid rgba(32, 58, 100, 0.15);
  border-radius: 11px;
  background: rgba(20, 45, 85, 0.045);
  color: var(--pos-text);
  font-size: 0.88rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all 0.15s var(--pos-ease);
}

.quick-cash-btn:hover {
  background: rgba(74, 124, 188, 0.1);
  border-color: rgba(74, 124, 188, 0.3);
  color: var(--pos-accent-deep);
}

.quick-cash-btn:active {
  transform: scale(0.975);
}

.quick-cash-btn.quick-cash-exact {
  width: 100%;
  color: var(--pos-ink-on-accent);
  background: var(--pos-primary-grad);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 24px -14px rgba(74, 124, 188, 0.65);
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.key-btn {
  display: grid;
  place-items: center;
  height: 46px;
  border: 1px solid rgba(32, 58, 100, 0.13);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 60%),
    rgba(255, 255, 255, 0.98);
  color: #1b2637;
  font-size: 1.25rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.14s var(--pos-ease);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.key-btn:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 60%),
    #ffffff;
  border-color: rgba(32, 58, 100, 0.26);
}

.key-btn:active {
  transform: scale(0.97);
  border-color: rgba(74, 124, 188, 0.45);
  background: rgba(74, 124, 188, 0.14);
}

@media (max-height: 820px) {
  .pos-modal-card {
    max-height: calc(100dvh - 24px);
  }

  .modal-header {
    padding: 13px 18px;
  }

  .modal-body {
    padding: 14px 18px;
  }

  .modal-footer {
    padding: 10px 18px 12px;
  }

  .modal-footer .btn-pos {
    min-height: 44px;
  }

  .tender-methods {
    margin-bottom: 9px;
  }

  .tender-display-box {
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  .quick-cash-row {
    margin-bottom: 7px;
    gap: 6px;
  }

  .quick-cash-btn {
    min-height: 36px;
    padding: 5px 4px;
    font-size: 0.84rem;
  }

  .keypad-grid {
    gap: 6px;
  }

  .key-btn {
    height: 40px;
    font-size: 1.15rem;
  }
}

/* Receipt preview inside the register */
.receipt-wrapper {
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(32, 58, 100, 0.16);
  border-radius: 10px;
  background: #fff;
  color: #1b2637;
  font-family: var(--pos-mono);
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 16px 34px -20px rgba(31, 55, 96, 0.3);
}

.receipt-wrapper.width-58mm {
  max-width: 252px;
  margin: 0 auto;
}

.receipt-wrapper.width-80mm {
  max-width: 332px;
  margin: 0 auto;
}

.receipt-header,
.receipt-footer {
  text-align: center;
}

.receipt-divider {
  margin: 8px 0;
  border-top: 1px dashed #7b8aa0;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.receipt-table th,
.receipt-table td {
  padding: 2px 0 2px 5px;
  vertical-align: top;
}

.receipt-table th:first-child,
.receipt-table td:first-child {
  padding-left: 0;
}

.receipt-table th:nth-child(n + 2),
.receipt-table td:nth-child(n + 2) {
  white-space: nowrap;
}

.receipt-modal-body {
  padding: 12px;
  background: #e2e8f0;
}

.receipt-save-status {
  margin-bottom: 12px;
  padding: 10px 13px;
  border: 1px solid rgba(46, 138, 103, 0.28);
  border-radius: 11px;
  background: #ecf7f1;
  color: #1d6b4f;
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.modal-footer-row {
  display: flex;
  gap: 8px;
}

.modal-footer-row .btn-pos {
  flex: 1 1 0;
  min-width: 0;
}

/* Dialogs & entity picker */
.pos-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 22px;
  border: 1px solid var(--pos-card-border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    var(--pos-surface);
  color: var(--pos-text);
  box-shadow: var(--pos-shadow-lg);
  overflow-y: auto;
}

.pos-dialog::backdrop {
  background: rgba(31, 47, 73, 0.48);
  backdrop-filter: blur(8px);
}

.pos-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.pos-dialog h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.pos-dialog header h2 {
  margin: 0;
}

.pos-dialog p {
  margin: 12px 0;
  color: var(--pos-text-muted);
  font-size: 0.9rem;
}

.pos-dialog a {
  color: var(--pos-accent-strong);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.pos-drawer {
  width: min(560px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border-radius: 22px 0 0 22px;
  animation: drawerIn 0.24s var(--pos-ease);
}

@keyframes drawerIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.entity-picker {
  max-width: 560px;
}

ng-w-j-drop-down2 {
  display: block;
  width: 100%;
  min-width: 0;
}

.cart-customer-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cart-customer-row ng-w-j-drop-down2 {
  flex: 1 1 auto;
  width: auto;
}

.cart-new-customer-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 6px 12px;
  font-size: 0.78rem;
}

.entity-trigger {
  min-height: 44px;
  padding-right: 32px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23a7b5cc' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.entity-results {
  max-height: 45dvh;
  margin: 12px 0;
  border-top: 1px solid rgba(32, 58, 100, 0.1);
  overflow-y: auto;
}

.entity-option {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid rgba(32, 58, 100, 0.08);
  border-radius: 9px;
  background: transparent;
  color: var(--pos-text);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.entity-option:hover,
.entity-option:focus {
  outline: none;
  background: rgba(74, 124, 188, 0.11);
}

/* -------------------------------------------------------------
   Tables (sales, shifts, products, audit, outbox)
   ------------------------------------------------------------- */
.pos-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.89rem;
}

.pos-table th {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(32, 58, 100, 0.1);
  background: rgba(20, 45, 85, 0.040);
  color: var(--pos-text-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pos-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(32, 58, 100, 0.065);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.pos-table .text-end {
  white-space: nowrap;
}

.pos-table tbody tr {
  transition: background 0.14s var(--pos-ease);
}

.pos-table tbody tr:hover {
  background: rgba(74, 124, 188, 0.045);
}

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

.picker-row {
  transition: background 0.14s var(--pos-ease);
}

.picker-row:hover {
  background: rgba(74, 124, 188, 0.07);
}

.picker-tab-btn {
  min-height: 36px;
  padding: 6px 13px;
  font-size: 0.8rem;
}

.sales-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.sales-filters label {
  display: grid;
  flex: 1;
  gap: 5px;
  min-width: 138px;
  color: var(--pos-text-dim);
  font-size: 0.69rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sales-filters label:first-of-type {
  flex: 2;
  min-width: 210px;
}

.sales-filters .pos-input {
  min-height: 40px;
  font-size: 0.84rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

.pos-page-header > div:has(.sales-filters) {
  width: 100%;
}

.sales-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  color: var(--pos-text-muted);
  font-size: 0.84rem;
}

.shift-variance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(32, 58, 100, 0.1);
  border-radius: 12px;
  background: rgba(20, 45, 85, 0.036);
  color: var(--pos-text-muted);
  font-size: 0.84rem;
}

.shift-variance strong {
  color: var(--pos-text);
  font-variant-numeric: tabular-nums;
}

.audit-meta {
  display: inline-block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
}

/* Held orders */
.held-order-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 12px;
}

.held-order-card {
  padding: 16px;
  border: 1px solid var(--pos-card-border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--pos-card);
  box-shadow: var(--pos-shadow-sm);
}

.held-order-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.held-order-card h3 {
  margin: 8px 0;
  font-size: 0.98rem;
  font-weight: 650;
}

.held-order-card p,
.held-order-card details {
  color: var(--pos-text-muted);
  font-size: 0.83rem;
}

.held-order-card summary {
  min-height: 40px;
  padding-top: 8px;
  cursor: pointer;
  color: var(--pos-accent-strong);
}

.held-order-card ul {
  margin: 6px 0 0;
  padding: 0 0 0 2px;
  list-style: none;
}

.held-order-card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.held-order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.held-discard-form {
  margin-top: 10px;
}

.held-discard-form button {
  min-height: 36px;
  font-size: 0.78rem;
}

/* -------------------------------------------------------------
   Notifications
   ------------------------------------------------------------- */
.pos-notifications {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;
  display: grid;
  gap: 8px;
  width: min(460px, calc(100vw - 36px));
  pointer-events: none;
}

.pos-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(46, 138, 103, 0.26);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 60%),
    rgba(233, 248, 241, 0.98);
  color: #1d6b4f;
  font-size: 0.86rem;
  line-height: 1.45;
  box-shadow: var(--pos-shadow);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  animation: noticeIn 0.22s var(--pos-ease);
}

.pos-notice span {
  flex: 1;
}

.pos-notice.error {
  border-color: rgba(177, 75, 99, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 60%),
    rgba(253, 236, 240, 0.98);
  color: #8f2f47;
}

.pos-notice button {
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid rgba(32, 58, 100, 0.2);
  border-radius: 9px;
  background: rgba(32, 58, 100, 0.07);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.pos-notice button:hover {
  background: rgba(20, 45, 85, 0.140);
}

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

/* -------------------------------------------------------------
   Auth screens
   ------------------------------------------------------------- */
.pos-auth-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 32px 20px;
  overflow: hidden;
}

.pos-auth-screen::before,
.pos-auth-screen::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.pos-auth-screen::before {
  width: 560px;
  height: 560px;
  top: -180px;
  left: -140px;
  background: rgba(126, 160, 205, 0.2);
}

.pos-auth-screen::after {
  width: 520px;
  height: 520px;
  right: -160px;
  bottom: -200px;
  background: rgba(140, 196, 186, 0.1);
}

.pos-auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(370px, 0.98fr);
  width: min(1060px, 100%);
  border: 1px solid rgba(32, 58, 100, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 38%),
    rgba(255, 255, 255, 0.97);
  box-shadow: var(--pos-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.pos-auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 48px 42px;
  border-right: 1px solid rgba(32, 58, 100, 0.1);
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(74, 124, 188, 0.13), transparent 62%),
    linear-gradient(160deg, rgba(74, 124, 188, 0.05), transparent 55%);
}

.pos-auth-aside h1 {
  margin: 0;
  color: #1b2637;
  font-size: clamp(1.65rem, 1.1rem + 1.4vw, 2.3rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.pos-auth-aside h1 span {
  display: block;
  color: var(--pos-accent-strong);
}

.pos-auth-aside > p {
  max-width: 36ch;
  margin: 0;
  color: var(--pos-text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.pos-auth-points {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: #26344a;
  font-size: 0.84rem;
}

.pos-auth-points li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-auth-points li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pos-accent);
  box-shadow: 0 0 0 4px rgba(74, 124, 188, 0.12);
}

.pos-auth-card {
  width: 100%;
  padding: 46px 38px;
  background: transparent;
}

.pos-auth-screen > .pos-auth-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  border: 1px solid rgba(32, 58, 100, 0.14);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 38%),
    rgba(255, 255, 255, 0.98);
  box-shadow: var(--pos-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pos-auth-mark {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--pos-primary-grad);
  color: var(--pos-ink-on-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  box-shadow: 0 12px 24px -12px rgba(74, 124, 188, 0.7);
}

.pos-auth-card h2 {
  margin: 0 0 6px;
  color: #1b2637;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.pos-auth-card > p,
.pos-auth-card .pos-auth-intro {
  margin: 0 0 22px;
  color: var(--pos-text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.pos-auth-intro p {
  margin: 0;
}

.pos-auth-card form {
  display: grid;
  gap: 15px;
}

.pos-auth-field {
  display: grid;
  gap: 6px;
}

.pos-auth-field label,
.pos-auth-card label {
  color: var(--pos-text-muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.pos-auth-card .pos-input {
  min-height: 46px;
}

.pos-auth-card .btn-pos {
  margin-top: 4px;
  min-height: 48px;
  font-size: 0.98rem;
}

.pos-auth-footnote {
  margin: 18px 0 0;
  color: var(--pos-text-dim);
  font-size: 0.74rem;
  text-align: center;
}

/* Notice / error screen */
.pos-notice-screen {
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: 24px;
}

.pos-notice-card {
  width: 100%;
  max-width: 520px;
  padding: 40px 32px;
  border: 1px solid var(--pos-card-border);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34%),
    var(--pos-surface);
  box-shadow: var(--pos-shadow-lg);
  text-align: center;
}

.pos-notice-glyph {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border: 1px solid rgba(177, 75, 99, 0.28);
  border-radius: 18px;
  background: rgba(177, 75, 99, 0.1);
  color: #a63d55;
  font-size: 1.8rem;
}

.pos-notice-card h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.pos-notice-card p {
  margin: 0 0 26px;
  color: var(--pos-text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.pos-notice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* -------------------------------------------------------------
   Kiosk mode
   ------------------------------------------------------------- */
body.pos-kiosk-active {
  overflow: hidden;
}

/* Admin workspaces (Settings, Outbox, Users, Audit…) must stay scrollable
   even when register kiosk styling is active on the body. */
body.pos-kiosk-active:has(.pos-workspace) {
  height: auto;
  overflow: visible;
}

body.pos-kiosk-active .pos-navbar {
  min-height: 54px;
  padding: 6px 16px;
}

body.pos-kiosk-active .pos-nav-links {
  display: none !important;
}

body.pos-kiosk-active .pos-kiosk-btn {
  display: none !important;
}

body.pos-kiosk-active .pos-exit-kiosk-btn {
  display: inline-flex !important;
}

body.pos-kiosk-active .register-heading,
body.pos-kiosk-active .mobile-register-tabs {
  display: none !important;
}

/* -------------------------------------------------------------
   Register fills the viewport without clipping wrapped chrome
   ------------------------------------------------------------- */
body:has(.pos-container) {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body:has(.pos-container) > .pos-navbar {
  position: relative;
  flex-shrink: 0;
}

body:has(.pos-container) > main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

body:has(.pos-container) .pos-container {
  flex: 1;
  height: auto;
  min-height: 0;
}

/* -------------------------------------------------------------
   Responsive
   ------------------------------------------------------------- */
@media (max-width: 1400px) {
  .pos-terminal-badge,
  .kiosk-clock,
  .pos-user-role {
    display: none;
  }

  .pos-navbar {
    gap: 6px;
  }

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

  .pos-nav-links a,
  .pos-more-menu summary {
    padding-left: 11px;
    padding-right: 11px;
  }
}

@media (min-width: 1401px) and (max-width: 1600px) {
  .pos-navbar {
    gap: 10px;
  }

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

  .pos-user-role {
    display: none;
  }

  .pos-nav-links a,
  .pos-more-menu summary {
    padding-left: 11px;
    padding-right: 11px;
  }
}

@media (min-width: 1401px) and (max-width: 1499px) {
  .kiosk-clock {
    display: none;
  }
}

@media (max-width: 1250px) {
  .pos-navbar {
    gap: 8px;
  }

  .pos-nav-links {
    order: 3;
    flex: 1 0 100%;
    justify-content: center;
  }

  .pos-status-bar {
    margin-left: auto;
  }

  .pos-container {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 42%);
  }

  .pos-search-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pos-search-bar > .pos-warehouse-pill {
    grid-column: 1;
    grid-row: 1;
  }

  .pos-search-bar > .pos-search-pick {
    grid-column: 2;
    grid-row: 1;
  }

  .pos-search-bar > .pos-search-field:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .pos-search-bar > .pos-search-field:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
  }

  .pos-search-bar > .pos-search-sync {
    grid-column: 2;
    grid-row: 3;
  }

  .pos-item-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }

  .register-shortcuts {
    display: none;
  }

  .pos-terminal-badge {
    display: none;
  }
}

@media (max-width: 1080px) {
  .pos-container {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 44%);
    gap: 12px;
    padding: 12px 16px 16px;
  }

  .pos-item-grid {
    grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
    gap: 8px;
  }

  .product-tile {
    min-height: 146px;
    padding: 11px;
  }

  .pos-item-grid {
    grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  }

  .kiosk-clock {
    display: none;
  }

  .pos-user-badge {
    display: none;
  }

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

@media (max-width: 900px) {
  .pos-navbar {
    padding: 8px 12px;
  }

  .pos-navbar-left {
    flex: 1;
  }

  .pos-brand {
    max-width: 190px;
  }

  .pos-status-bar {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .pos-more-menu > div {
    right: auto;
    left: 0;
  }

  .pos-container {
    display: block;
    padding: 10px 12px 12px;
  }

  .pos-catalog-panel,
  .pos-cart-panel {
    height: 100%;
  }

  .pos-cart-panel {
    display: none;
  }

  .mobile-cart-open .pos-cart-panel {
    display: flex;
  }

  .mobile-cart-open .pos-catalog-panel {
    display: none;
  }

  .mobile-register-tabs {
    display: flex;
  }

  .pos-search-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pos-search-bar > .pos-search-field:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .pos-search-bar > .pos-search-field:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .pos-search-bar > .pos-search-sync {
    grid-column: 2;
    grid-row: 1;
  }

  .pos-search-bar > .pos-search-pick {
    grid-column: 2;
    grid-row: 2;
  }

  .pos-search-bar > .pos-warehouse-pill {
    grid-column: 1;
    grid-row: 1;
  }

  .catalog-feedback {
    padding: 8px 14px;
  }

  .pos-item-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    padding: 4px 14px 14px;
  }

  .pos-user-badge {
    display: none;
  }

  .pos-auth-shell {
    grid-template-columns: minmax(0, 1fr);
    max-width: 470px;
  }

  .pos-auth-aside {
    display: none;
  }

  .pos-auth-card {
    padding: 38px 30px;
  }
}

@media (max-width: 700px) {
  .pos-flash-container {
    padding: 10px 12px 0;
  }

  .pos-flash {
    padding: 11px 14px;
    font-size: 0.82rem;
  }

  .pos-workspace {
    margin-top: 18px;
    padding: 0 12px;
  }

  .pos-content-card {
    margin: 16px 0 28px;
    padding: 14px;
    border-radius: 18px;
  }

  .pos-page-header {
    gap: 12px;
  }

  .pos-page-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 18px;
  }

  .pos-page-heading h1 {
    font-size: 1.22rem;
  }

  .pos-page-heading p {
    font-size: 0.78rem;
  }

  .pos-panel {
    border-radius: 16px;
  }

  .pos-panel-heading {
    padding: 14px 16px;
  }

  .pos-panel-body {
    padding: 16px;
  }

  .pos-auth-screen {
    padding: 16px 12px;
  }

  .pos-auth-card {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .pos-auth-card h2 {
    font-size: 1.32rem;
  }

  .pos-notice-card {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .register-heading {
    padding: 10px 12px 0;
  }

  .register-heading h1 {
    font-size: 1.18rem;
  }

  .register-heading p {
    display: none;
  }

  .pos-search-bar {
    padding: 10px 12px;
    gap: 7px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pos-search-bar > .pos-search-field:nth-child(2),
  .pos-search-bar > .pos-search-field:nth-child(3) {
    grid-column: 1 / -1;
  }

  .pos-search-bar > .pos-search-pick {
    grid-column: 1 / -1;
    grid-row: 4;
    width: 100%;
  }

  .pos-search-bar > .pos-search-sync {
    grid-column: 1 / -1;
    grid-row: 5;
  }

  .pos-warehouse-pill {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  .pos-search-bar > .pos-search-field:nth-child(2) {
    grid-row: 2;
  }

  .pos-search-bar > .pos-search-field:nth-child(3) {
    grid-row: 3;
  }

  .pos-category-tabs {
    padding: 8px 12px;
  }

  .cat-btn {
    min-height: 36px;
    font-size: 0.77rem;
  }

  .catalog-feedback {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 0.68rem;
  }

  .catalog-feedback > :last-child {
    text-align: left;
  }

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

  .product-tile {
    min-height: 140px;
    padding: 10px;
  }

  .tile-title {
    font-size: 0.82rem;
  }

  .tile-availability {
    font-size: 0.62rem;
  }

  .cart-header {
    padding: 10px 12px;
    gap: 6px;
  }

  .cart-items-container {
    min-height: 0;
  }

  .cart-table th {
    padding: 8px 8px;
    font-size: 0.62rem;
  }

  .cart-table td {
    padding: 9px 8px;
    font-size: 0.8rem;
  }

  .qty-control {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    max-width: 146px;
  }

  .qty-btn {
    width: 38px;
    min-width: 38px;
    height: 40px;
  }

  .qty-display {
    height: 40px;
    font-size: 0.74rem;
  }

  .remove-btn {
    min-width: 38px;
    min-height: 38px;
  }

  .cart-summary {
    padding: 9px 12px 11px;
  }

  .summary-meta {
    font-size: 0.66rem;
  }

  .summary-row {
    font-size: 0.78rem;
  }

  .summary-row.total-row {
    padding: 10px 12px;
  }

  .summary-row.total-row #summary-total {
    font-size: 1.25rem;
  }

  .cart-actions {
    padding: 9px 12px 12px;
    gap: 6px;
  }

  #btn-pay-cart {
    min-height: 48px;
    font-size: 0.92rem;
  }

  .pos-modal-backdrop {
    padding: 10px;
  }

  .pos-modal-card {
    border-radius: 20px;
    max-height: calc(100dvh - 20px);
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .key-btn {
    height: 42px;
  }

  .quick-cash-row {
    gap: 6px;
  }

  .quick-cash-btn {
    min-height: 42px;
    font-size: 0.8rem;
  }

  .pos-dialog {
    padding: 18px;
    border-radius: 18px;
  }

  .pos-drawer {
    width: 100vw;
    border-radius: 18px 0 0 18px;
  }

  .pos-table th,
  .pos-table td {
    padding: 10px 11px;
    font-size: 0.8rem;
  }

  .sales-filters label {
    min-width: 120px;
  }

  .sales-filters .btn-pos {
    flex: 1;
  }

  .pos-notifications {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .pos-user-badge {
    display: none;
  }

  .pos-auth-mark {
    margin-bottom: 14px;
  }
}

@media (max-width: 600px) {
  .pos-navbar {
    padding: 8px 12px;
    gap: 8px;
  }

  .pos-navbar-left {
    flex: 1 1 100%;
    order: 1;
  }

  .pos-brand {
    max-width: none;
  }

  .pos-nav-links {
    flex: 1 1 100%;
    order: 2;
  }

  .pos-status-bar {
    flex: 1 1 100%;
    order: 3;
    justify-content: flex-end;
    margin-left: 0;
  }

  .cart-table,
  .cart-table tbody {
    display: block;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table tbody tr.cart-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 11px 12px;
    border-bottom: 1px solid rgba(32, 58, 100, 0.07);
  }

  .cart-table tbody tr.cart-row:last-child {
    border-bottom: 0;
  }

  .cart-table tbody tr.cart-row td {
    display: block;
    padding: 0;
    border: 0;
    vertical-align: middle;
  }

  .cart-table tbody tr.cart-row td:nth-child(1) {
    flex: 1 1 100%;
  }

  .cart-table tbody tr.cart-row td:nth-child(2) {
    flex: 0 0 auto;
  }

  .cart-table tbody tr.cart-row td:nth-child(3) {
    flex: 1 1 auto;
    text-align: right;
  }

  .cart-table tbody tr.cart-row td:nth-child(4) {
    flex: 0 0 auto;
  }

  .cart-table tbody tr.cart-row .qty-control {
    grid-template-columns: 34px minmax(64px, 1fr) 34px;
    max-width: 146px;
  }

  .cart-table tbody tr.cart-row .qty-display {
    padding: 4px;
    font-size: 0.72rem;
  }

  .cart-table tbody tr.cart-row .btn-apply-line-disc {
    min-width: 32px;
    height: 26px;
    font-size: 0.8rem;
  }

  .quick-cash-row {
    gap: 5px;
  }

  .quick-cash-btn {
    min-height: 36px;
    padding: 6px 2px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .pos-notifications {
    top: 10px;
    right: 10px;
    bottom: auto;
    left: 10px;
    width: auto;
  }
}

@media (max-width: 520px) {
  .cart-summary {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2px;
  }

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

  #btn-pay-cart {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #btn-hold-cart,
  #btn-resume-held,
  #btn-clear-cart {
    grid-column: auto;
    grid-row: 2;
  }
}

@media (max-width: 420px) {
  .pos-status-bar .status-pill {
    display: none;
  }

  .pos-search-bar > .pos-search-pick,
  .pos-search-bar > .pos-search-sync {
    font-size: 0.78rem;
  }

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

  .summary-meta-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .pos-tax-select {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------
   Print — only the receipt paper escapes the modal
   ------------------------------------------------------------- */
@media print {
  @page {
    margin: 6mm;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  body * {
    visibility: hidden;
  }

  #receipt-content-area,
  #receipt-content-area * {
    visibility: visible;
  }

  #receipt-content-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  #receipt-modal {
    position: static;
    display: block !important;
    padding: 0;
    background: #fff;
    backdrop-filter: none;
  }

  .pos-modal-card {
    max-width: none;
    max-height: none;
    border: 0;
    background: #fff;
    box-shadow: none;
  }
}

/* Shared subtle pulse used by the connection state */
@keyframes posPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
