/* Classic POS — Countivoo "Ink & Teal" redesign (was: Blazor PosList.razor IsClassicUi / "vasy-pos" parity) */
.vasy-pos {
  --vasy-black: var(--cv-ink, #1c1917);
  --vasy-border: var(--cv-border-strong, rgba(28, 25, 23, 0.12));
  --vasy-blue: var(--cv-teal, #0f766e);
  --vasy-bg: var(--cv-canvas, #f4f2ed);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--vasy-bg);
  font-size: 13px;
  font-family: var(--cv-font-body, "Poppins", "Segoe UI", sans-serif);
  color: var(--vasy-black);
}

/* ---------- Topbar ---------- */

.vasy-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 8px 14px;
  background: var(--cv-surface, #fff);
  border-bottom: 1px solid var(--vasy-border);
  box-shadow: var(--cv-shadow-sm, 0 1px 2px rgba(28, 25, 23, 0.04));
  flex-shrink: 0;
  gap: 10px;
  position: relative;
  z-index: 6;
}

.vasy-logo { font-weight: 700; font-size: 18px; color: var(--vasy-black); flex-shrink: 0; }

.vasy-logo .pos-header-action-btn,
.vasy-topbar .btn-purple {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--cv-border-strong, rgba(28, 25, 23, 0.12));
  background: var(--cv-surface, #fff);
  color: var(--vasy-black) !important;
  font-weight: 600;
  font-size: 13px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.vasy-logo .pos-header-action-btn:hover,
.vasy-topbar .btn-purple:hover {
  background: var(--cv-charcoal, #14201c);
  border-color: var(--cv-charcoal, #14201c);
  color: #fff !important;
}

.vasy-top-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.vasy-header-context {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
  min-width: 0;
}

.vasy-header-context .context-item { min-width: 118px; cursor: pointer; }
.vasy-header-context .context-item:not(.location-selector) { cursor: default; }

.vasy-header-context .context-item.location-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 8px;
  border: 1px solid var(--cv-border, rgba(28, 25, 23, 0.08));
  border-radius: var(--cv-radius-sm, 7px);
  background: var(--cv-surface, #fff);
  min-height: 42px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.vasy-header-context .context-item.location-selector:hover {
  border-color: var(--cv-teal, #0f766e);
  box-shadow: 0 0 0 3px var(--cv-emerald-soft, rgba(15, 118, 110, 0.1));
}

.vasy-header-context .context-item.pe-none { opacity: .6; cursor: default; }

/* Icon badges: one restrained accent family instead of a rainbow of bg-soft-* utilities */
.vasy-header-context .context-icon,
.vasy-header-context .context-icon.bg-soft-primary,
.vasy-header-context .context-icon.bg-soft-warning,
.vasy-header-context .context-icon.bg-soft-info,
.vasy-header-context .context-icon.bg-soft-success {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--cv-emerald-soft, rgba(15, 118, 110, 0.1)) !important;
}

.vasy-header-context .context-icon i {
  font-size: 15px;
  color: var(--cv-teal, #0f766e) !important;
}

.vasy-header-context .context-details {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.vasy-header-context .context-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--cv-muted, #78716c);
}

.vasy-header-context .context-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--vasy-black);
  white-space: nowrap;
}

.vasy-header-select {
  border: 1px solid var(--cv-border-strong, rgba(28, 25, 23, 0.12));
  border-radius: var(--cv-radius-sm, 7px);
  background: var(--cv-surface, #fff);
  color: var(--vasy-black);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  min-width: 130px;
}

.vasy-header-select:focus { outline: none; border-color: var(--cv-teal, #0f766e); }

.vasy-exit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 6px;
  border: 1px solid rgba(190, 24, 46, .18);
  border-radius: 999px;
  background: #fdf2f3;
  color: #be123c !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  text-decoration: none;
  cursor: pointer;
}

.vasy-exit-btn:hover {
  background: #be123c;
  border-color: #be123c;
  color: #fff !important;
}

.vasy-exit-btn__icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(190, 24, 46, .12);
  transition: background .15s ease;
}

.vasy-exit-btn:hover .vasy-exit-btn__icon { background: rgba(255, 255, 255, .2); }

/* ---------- Main layout ---------- */

.vasy-main { display: flex; flex: 1; min-height: 0; overflow: hidden; }

.vasy-center { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--cv-surface, #fff); }

.vasy-search-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--vasy-border);
  align-items: center;
}

.vasy-search-row .context-item {
  height: 40px;
  border: 1px solid var(--cv-border-strong, rgba(28, 25, 23, 0.12));
  border-radius: var(--cv-radius-sm, 7px);
  padding: 0 10px;
  background: var(--cv-surface, #fff);
  width: 100%;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.vasy-search-row .context-item:hover { background: var(--cv-canvas, #f4f2ed); border-color: var(--cv-teal, #0f766e); }

.vasy-search-field { position: relative; min-width: 0; }

.vasy-search-field input {
  height: 38px;
  border: 1px solid var(--cv-border-strong, rgba(28, 25, 23, 0.12));
  border-radius: var(--cv-radius-sm, 7px);
  padding: 0 36px 0 12px;
  font-size: 14px;
  width: 100%;
  background: var(--cv-surface, #fff);
  color: var(--vasy-black);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.vasy-search-field input:focus {
  outline: none;
  border-color: var(--cv-teal, #0f766e);
  box-shadow: 0 0 0 3px var(--cv-emerald-soft, rgba(15, 118, 110, 0.1));
}

.vasy-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--cv-muted, #78716c);
  cursor: pointer;
  padding: 4px;
}

.vasy-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  max-height: 320px;
  overflow: auto;
  background: var(--cv-surface, #fff);
  border: 1px solid var(--vasy-border);
  border-radius: var(--cv-radius, 10px);
  box-shadow: var(--cv-shadow, 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px rgba(28, 25, 23, 0.05));
}

.vasy-search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--cv-border, rgba(28, 25, 23, 0.08));
  cursor: pointer;
  font-size: 13px;
}

.vasy-search-result-item:hover { background: var(--cv-emerald-soft, rgba(15, 118, 110, 0.1)); }
.vasy-search-result-item.active { background: var(--cv-emerald-soft, rgba(15, 118, 110, 0.1)); outline: 2px solid var(--cv-teal, #0f766e); outline-offset: -2px; }
.vasy-search-result-item .name { font-weight: 600; color: var(--vasy-black); }
.vasy-search-result-item .meta { font-size: 11px; color: var(--cv-muted, #78716c); }

/* ---------- Cart table ---------- */

.vasy-table-wrap { flex: 1; overflow: auto; min-height: 0; }

.vasy-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.vasy-table thead th {
  background: var(--cv-charcoal, #14201c);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .02em;
  padding: 10px 8px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
}

.vasy-table tbody td { padding: 8px 8px; border-bottom: 1px solid var(--cv-border, rgba(28, 25, 23, 0.08)); vertical-align: middle; }
.vasy-table tbody tr:hover { background: var(--cv-canvas, #f4f2ed); }
.vasy-table tbody tr.selected { background: var(--cv-emerald-soft, rgba(15, 118, 110, 0.1)); }

/* ---------- Footer summary ---------- */

.vasy-footer { flex-shrink: 0; border-top: 1px solid var(--vasy-border); background: var(--cv-surface, #fff); }

.vasy-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px 14px;
  align-items: end;
}

.vasy-stat-box { text-align: center; border: 1px solid var(--cv-border, rgba(28, 25, 23, 0.08)); border-radius: var(--cv-radius-sm, 7px); padding: 7px 8px; background: var(--cv-canvas, #f4f2ed); }
.vasy-stat-box .val { font-weight: 700; font-size: 15px; color: var(--vasy-black); font-variant-numeric: tabular-nums; }
.vasy-stat-box .lbl { font-size: 11px; color: var(--cv-muted, #78716c); }
.vasy-stat-box .pos-discount-btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  border: 1px solid var(--cv-border-strong, rgba(28, 25, 23, 0.12));
  border-radius: var(--cv-radius-sm, 7px);
  background: var(--cv-surface, #fff);
  color: var(--vasy-black);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.vasy-stat-box .pos-discount-btn:hover { border-color: var(--cv-teal, #0f766e); color: var(--cv-teal, #0f766e); }
.vasy-stat-box .pos-discount-btn.has-discount {
  background: var(--cv-emerald-soft, rgba(15, 118, 110, 0.1));
  border-color: var(--cv-teal, #0f766e);
  color: var(--cv-teal-dark, #0d5f59);
}

.vasy-total-box { text-align: right; padding-left: 16px; }
.vasy-total-box .lbl { font-size: 11px; color: var(--cv-muted, #78716c); letter-spacing: .04em; }
.vasy-total-box .amount { font-size: 26px; font-weight: 800; color: var(--cv-teal-dark, #0d5f59); line-height: 1.15; font-variant-numeric: tabular-nums; }

.vasy-footer-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 10px 14px 12px; border-top: 1px solid var(--vasy-border); }
.vasy-footer-actions .pos-action-btn {
  min-width: 120px;
  height: 42px;
  border-radius: var(--cv-radius-sm, 7px);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease;
}
.vasy-footer-actions .pos-action-btn.cancel {
  background: var(--cv-surface, #fff);
  border-color: var(--cv-border-strong, rgba(28, 25, 23, 0.12));
  color: var(--cv-muted, #78716c);
}
.vasy-footer-actions .pos-action-btn.cancel:hover { border-color: var(--cv-ink, #1c1917); color: var(--cv-ink, #1c1917); }
.vasy-footer-actions .pos-action-btn.hold {
  background: #fffbeb;
  border-color: #f6c453;
  color: #92400e;
}
.vasy-footer-actions .pos-action-btn.hold:hover { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.vasy-footer-actions .pos-action-btn.hold:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.vasy-footer-actions .pos-action-btn.pay {
  background: var(--cv-teal, #0f766e);
  border-color: var(--cv-teal, #0f766e);
  color: #fff;
  box-shadow: var(--cv-shadow-sm, 0 1px 2px rgba(28, 25, 23, 0.04));
}
.vasy-footer-actions .pos-action-btn.pay:hover:not(:disabled) { background: var(--cv-teal-dark, #0d5f59); border-color: var(--cv-teal-dark, #0d5f59); transform: translateY(-1px); }
.vasy-footer-actions .pos-action-btn.pay:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Sidebar ---------- */

.vasy-sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--vasy-border);
  background: var(--cv-surface, #fff);
  overflow: visible;
  position: relative;
}

.vasy-quick-shell {
  position: relative;
  border-bottom: 1px solid var(--vasy-border);
  padding-bottom: 4px;
}

.vasy-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}

/* Unified tile system: one calm surface + hairline border, differentiated only by
   icon color, instead of nine competing gradient hues. Hover fills solid ink. */
.vasy-quick-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--cv-border, rgba(28, 25, 23, 0.08));
  border-radius: var(--cv-radius-sm, 7px);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  min-height: 68px;
  color: var(--cv-ink, #1c1917);
  background: var(--cv-surface, #fff);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.vasy-quick-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--cv-shadow, 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px rgba(28, 25, 23, 0.05));
  border-color: var(--cv-charcoal, #14201c);
  background: var(--cv-charcoal, #14201c);
  color: #fff;
}

.vasy-quick-item i { font-size: 21px; transition: color .15s ease; }
.vasy-quick-item:hover i { color: #fff; }

/* Icon accents: a restrained two-color functional system —
   teal for everyday actions, amber for things awaiting attention, rose for
   destructive/closing actions — rather than a full rainbow per tile. */
.vasy-quick-payment i,
.vasy-quick-register i,
.vasy-quick-stock i { color: var(--cv-teal, #0f766e); }

.vasy-quick-pending i,
.vasy-quick-orders i,
.vasy-quick-zreport i,
.vasy-quick-shift i { color: #b45309; }

.vasy-quick-return i,
.vasy-quick-close-shift i { color: #be123c; }

.vasy-floating-settings {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--cv-surface, #fff);
  background: var(--cv-charcoal, #14201c);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--cv-shadow, 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px rgba(28, 25, 23, 0.05));
  z-index: 5;
  transition: background .15s ease, transform .15s ease;
}

.vasy-floating-settings:hover { background: var(--cv-teal, #0f766e); }
.vasy-floating-settings i { font-size: 18px; }

.vasy-hold-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #be123c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

.vasy-order-badge { background: var(--cv-charcoal, #14201c); }

.vasy-cust-panel { flex: 1; overflow: auto; padding: 14px; font-size: 13px; }
.vasy-cust-panel h6 { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cv-muted, #78716c); }
.vasy-cust-panel .row-item { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--cv-border, rgba(28, 25, 23, 0.08)); }
.vasy-cust-panel .row-item span:first-child { color: var(--cv-muted, #78716c); }
.vasy-cust-panel .row-item strong { color: var(--vasy-black); }

.vasy-last-bill { padding: 14px; border-top: 1px solid var(--vasy-border); background: var(--cv-canvas, #f4f2ed); }
.vasy-last-bill .row-item { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--cv-border, rgba(28, 25, 23, 0.08)); font-size: 13px; }
.vasy-last-bill .row-item span:first-child { color: var(--cv-muted, #78716c); }
.vasy-last-bill .print-btn {
  width: 100%;
  margin-top: 8px;
  background: var(--cv-charcoal, #14201c);
  color: #fff;
  border: none;
  border-radius: var(--cv-radius-sm, 7px);
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.vasy-last-bill .print-btn:hover { background: var(--cv-teal, #0f766e); }

/* ---------- Misc ---------- */

.vasy-qty-input {
  width: 68px;
  height: 30px;
  text-align: center;
  border: 1px solid var(--cv-border-strong, rgba(28, 25, 23, 0.12));
  border-radius: var(--cv-radius-sm, 7px);
  background: var(--cv-surface, #fff);
  color: var(--vasy-black);
}
.vasy-qty-input:focus { outline: none; border-color: var(--cv-teal, #0f766e); }

.vasy-empty { text-align: center; padding: 48px 16px; color: var(--cv-muted, #78716c); }

.vasy-classic-party-btn {
  height: 38px;
  border: 1px solid var(--cv-border-strong, rgba(28, 25, 23, 0.12));
  border-radius: var(--cv-radius-sm, 7px);
  padding: 0 12px;
  background: var(--cv-surface, #fff);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--vasy-black);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.vasy-classic-party-btn:hover { background: var(--cv-canvas, #f4f2ed); border-color: var(--cv-teal, #0f766e); }

.vasy-picker-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--cv-surface, #fff);
  border: 1px solid var(--vasy-border);
  border-radius: var(--cv-radius, 10px);
  box-shadow: var(--cv-shadow, 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px rgba(28, 25, 23, 0.05));
  max-height: 220px;
  overflow: auto;
}

.vasy-picker-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--vasy-black);
}

.vasy-picker-menu button:hover,
.vasy-picker-menu button.active { background: var(--cv-emerald-soft, rgba(15, 118, 110, 0.1)); }

.vasy-picker-wrap { position: relative; min-width: 0; }

@media (max-width: 1200px) {
  .vasy-search-row { grid-template-columns: 1fr 1fr; }
  .vasy-summary-row { grid-template-columns: 1fr 1fr; }
}
