/* ── XINAN Touch — Luxury Fashion POS Theme ── */
:root {
  color-scheme: dark;
  --bg: #07080a;
  --panel: rgba(18, 20, 24, 0.88);
  --panel2: rgba(255, 255, 255, 0.04);
  --panel3: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-fine: rgba(255, 255, 255, 0.05);
  --text: #f0f0f2;
  --text-secondary: #c5c5cc;
  --muted: #8a8a92;
  --blue: #1e4d7a;
  --gold: #c9a96e;
  --green: #4caf7d;
  --pink: #c97b9a;
  --danger: #e84c4c;
  --radius: 6px;
  --radius-lg: 12px;
  --transition: 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(175deg, #111216 0%, #07080a 45%);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; padding: 0; }

/* ── App Shell ── */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Bar ── */
.topbar, .siri-bar {
  position: sticky;
  z-index: 20;
  background: rgba(8, 9, 12, 0.88);
  backdrop-filter: blur(28px) saturate(1.2);
  border-color: var(--border);
}

.topbar {
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(14px, env(safe-area-inset-left, 14px)) 10px max(14px, env(safe-area-inset-left, 14px));
  border-bottom: 1px solid var(--border);
}

.brand-block { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 4px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #1e4d7a, #2a5c9a);
  color: #fff;
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-title {
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.brand-title span {
  margin-left: 6px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand-subtitle { font-size: 10px; color: var(--muted); margin-top: 1px; letter-spacing: 0.02em; }

.top-controls { display: flex; gap: 6px; }

select, input {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  outline: none;
  font-size: 12px;
}
select {
  max-width: 150px;
  padding: 0 8px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8a92' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  -webkit-appearance: none; appearance: none;
  padding-right: 28px;
}
input:focus, select:focus { border-color: var(--gold); outline: none; }
input:disabled, select:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Stage ── */
.stage {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  flex: 1;
  padding: 28px 0 140px;
}

/* ── Role Heading ── */
.role-heading { text-align: center; max-width: 640px; margin: 0 auto 20px; }
.role-tag {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.2);
  color: var(--gold);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em;
}

h1 {
  margin: 12px 0 6px;
  font-size: clamp(22px, 4.5vw, 36px);
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-weight: 750;
}
.role-heading p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ── Metrics ── */
.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.metric {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}
.metric-value {
  font-size: 22px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.metric-label {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Action Cards ── */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(16px);
  padding: 16px 14px;
  text-align: left;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.card:active {
  transform: scale(0.97);
  border-color: rgba(201, 169, 110, 0.4);
  background: rgba(24, 27, 32, 0.92);
}
.card-icon {
  width: 32px; height: 32px;
  border-radius: 4px;
  display: grid; place-items: center;
  margin-bottom: 10px;
  background: rgba(201, 169, 110, 0.12);
  color: var(--gold);
  font-size: 16px;
}
.card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.card p {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  flex: 1;
}
.card--shortcut {
  border-color: rgba(201, 169, 110, 0.34);
  background: linear-gradient(145deg, rgba(201, 169, 110, 0.10), rgba(16, 18, 22, 0.86));
}
.card-skill-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.shortcut-manage-btn {
  margin-top: 10px;
  border: 0;
  padding: 4px 0;
  color: var(--gold);
  background: transparent;
  font-size: 11px;
}
.shortcut-builder {
  display: grid;
  gap: 12px;
}
.shortcut-builder textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.6;
}
.shortcut-builder textarea:focus {
  border-color: var(--gold);
  outline: none;
}
.shortcut-draft {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.shortcut-form-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
}
.shortcut-result-value {
  margin: 10px 0 4px;
  color: var(--gold);
  font-size: 32px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ── AI Stage ── */
.ai-stage {
  max-width: 720px;
  margin: 20px auto 0;
  display: grid;
  gap: 10px;
}
.ai-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(16px);
  padding: 14px;
}
.ai-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ai-card-title {
  display: flex; align-items: center; gap: 6px;
  font-weight: 650;
  font-size: 12px;
}
.ai-badge {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: linear-gradient(135deg, #7e57ff, #2a5c9a);
  font-size: 9px; font-weight: 850;
}
.ai-card-meta { color: var(--muted); font-size: 10px; }
.ai-card-body {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}
.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-fine);
}

/* ── Quick Chips ── */
.siri-bar {
  bottom: 0;
  padding: 10px max(14px, env(safe-area-inset-left, 14px)) max(14px, env(safe-area-inset-right, 14px));
  border-top: 1px solid var(--border);
}
.quick-row {
  width: min(720px, 100%);
  margin: 0 auto 8px;
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.quick-row::-webkit-scrollbar { display: none; }
.chip-btn {
  white-space: nowrap;
  padding: 5px 10px;
  min-height: 40px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: var(--muted);
  transition: border-color var(--transition), background var(--transition);
}
.chip-btn:active {
  background: rgba(201, 169, 110, 0.12);
  border-color: rgba(201, 169, 110, 0.3);
  color: var(--gold);
}

/* ── Query Row ── */
.query-row {
  width: min(720px, 100%);
  margin: 0 auto;
  display: flex;
  gap: 6px;
  align-items: center;
}
.ai-dot {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 4px;
  display: grid; place-items: center;
  background: rgba(201, 169, 110, 0.15);
  color: var(--gold);
  font-size: 10px; font-weight: 850;
}
.query-row input {
  flex: 1;
  min-width: 0;
  padding: 0 10px;
  min-height: 40px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.3);
}
.query-row input::placeholder { color: var(--muted); font-size: 12px; }
.send-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 99px;
  background: var(--gold);
  color: #07080a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: opacity var(--transition), transform var(--transition);
}
.send-btn:active {
  opacity: 0.8;
  transform: scale(0.96);
}

/* ── Bottom Sheet ── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0);
  transition: background var(--transition);
  pointer-events: none;
}
.sheet-backdrop.active {
  background: rgba(0, 0, 0, 0.65);
  pointer-events: auto;
}
.sheet-backdrop[hidden] { display: none; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  max-height: 72vh;
  background: rgba(14, 16, 20, 0.97);
  backdrop-filter: blur(32px) saturate(1.3);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet.active {
  transform: translateY(0);
}

.sheet-grip {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  flex: 0 0 auto;
}
.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
  flex: 0 0 auto;
}
.sheet-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sheet-close {
  width: 32px; height: 32px;
  border-radius: 99px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  transition: background var(--transition);
}
.sheet-close:active { background: rgba(255, 255, 255, 0.12); }

/* ── Sheet Height Variants ── */
.sheet--result {
  max-height: 55vh;
}
.sheet--compact {
  max-height: 55vh;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 20px;
  -webkit-overflow-scrolling: touch;
}

/* ── Reconciliation Panel ── */
.sheet--recon .sheet-body { padding: 0; display: flex; flex-direction: column; }
.sheet.sheet--recon { max-width: 480px; }
.recon-panel { display: flex; flex-direction: column; min-height: 100%; }
.recon-summary {
  position: sticky; top: 0;
  background: var(--panel);
  backdrop-filter: blur(16px);
  z-index: 2;
  border-bottom: 1px solid var(--border);
  padding: 14px 16px 12px;
}
.recon-summary-top { margin-bottom: 10px; }
.recon-total-row { display: flex; align-items: baseline; gap: 10px; }
.recon-total-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.recon-total-amount { font-size: 22px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.recon-total-orders { font-size: 12px; color: var(--muted); margin-left: auto; }
.recon-pm-list { display: flex; flex-wrap: wrap; gap: 5px; }
.recon-pm-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  font-size: 11px;
}
.recon-pm-dot { width: 5px; height: 5px; border-radius: 99px; background: var(--gold); flex: 0 0 auto; }
.recon-pm-label { color: var(--muted); }
.recon-pm-amount { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.recon-pm-count { color: var(--muted); }

.recon-status-msg { text-align: center; padding: 20px; color: var(--muted); font-size: 12px; }
.recon-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.recon-empty-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.recon-empty p { margin: 0 0 4px; font-size: 13px; }
.recon-empty-sub { font-size: 11px; color: var(--muted); opacity: 0.7; }

.recon-list { padding: 8px 16px 20px; flex: 1; overflow-y: auto; }
.recon-item {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.02);
}
.recon-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.recon-item-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.recon-item-no { font-size: 11px; color: var(--muted); font-family: monospace; }
.recon-item-status { margin-left: auto; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 99px; flex: 0 0 auto; }
.recon-st-ok { background: rgba(76, 175, 125, 0.1); color: var(--green); }
.recon-st-pend { background: rgba(201, 169, 110, 0.1); color: var(--gold); }
.recon-st-cancel { background: rgba(232, 76, 76, 0.1); color: var(--danger); }
.recon-item-bot { display: flex; align-items: center; gap: 10px; }
.recon-item-type { font-size: 12px; font-weight: 600; color: var(--text); }
.recon-item-pm { font-size: 11px; color: var(--muted); }
.recon-item-amount { margin-left: auto; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }

/* ── Product Detail ── */
.product-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0e0f12;
}
.product-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}
.product-badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  border: 0.5px solid rgba(76, 175, 125, 0.25);
}

.product-info { padding: 0 2px; }
.product-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.product-sku {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.product-prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 10px;
}
.price-sale {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.price-tag {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
}

/* ── Color×Size Matrix ── */
.matrix-section { margin-top: 4px; }
.matrix-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.size-matrix {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  overflow: hidden;
}
.matrix-row {
  display: grid;
  grid-template-columns: 80px repeat(5, 1fr);
  border-bottom: 1px solid var(--border-fine);
}
.matrix-row:last-child { border-bottom: none; }
.matrix-cell {
  padding: 8px 6px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center;
}
.matrix-header .matrix-cell {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}
.matrix-row:not(.matrix-header) .matrix-cell:first-child {
  justify-content: flex-start;
  gap: 6px;
  padding-left: 10px;
}
.color-label { gap: 6px; }
.color-swatch {
  width: 14px; height: 14px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
}
.qty-ok { color: var(--green); font-weight: 600; }
.qty-zero { color: var(--danger); opacity: 0.6; }
.qty-na { color: var(--muted); opacity: 0.35; }

/* ── Store Inventory Matrix ── */
.store-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.store-matrix th, .store-matrix td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-fine);
  text-align: left;
}
.store-matrix th {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
}
.store-matrix tr:last-child td { border-bottom: none; }
.store-name { font-weight: 600; }
.stock-ok { color: var(--green); }
.stock-zero { color: var(--danger); opacity: 0.7; }

/* ── Product Actions ── */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.product-actions .btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-primary, .btn-secondary, .btn-ghost {
  width: 100%;
  min-height: 40px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-primary:active, .btn-secondary:active, .btn-ghost:active {
  transform: scale(0.97);
}
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}
.btn-primary {
  background: var(--gold);
  color: #07080a;
}
.btn-primary:active {
  background: #b89550;
}
.btn-secondary {
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.2);
  color: var(--gold);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* ── Loading Button ── */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: var(--gold);
  border-radius: 99px;
  animation: btnSpin 0.6s linear infinite;
}
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}
.btn-secondary.btn-loading,
.btn-ghost.btn-loading {
  color: transparent !important;
  pointer-events: none;
  position: relative;
}
.btn-secondary.btn-loading::after,
.btn-ghost.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(201,169,110,0.25);
  border-top-color: var(--gold);
  border-radius: 99px;
  animation: btnSpin 0.6s linear infinite;
}

/* ── Card Disabled State ── */
.card:disabled,
.card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
}

/* ── Send Button States ── */
.send-btn:active {
  background: #b89550;
  transform: scale(0.97);
}
.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  pointer-events: none;
}
.toast {
  padding: 8px 14px;
  border-radius: 99px;
  background: rgba(14, 16, 20, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast--success { border-color: rgba(76, 175, 125, 0.3); }
.toast--success .toast-icon { color: var(--green); }
.toast--error { border-color: rgba(232, 76, 76, 0.3); }
.toast--error .toast-icon { color: var(--danger); }
.toast--info .toast-icon { color: var(--gold); }
.toast-icon { margin-right: 6px; font-weight: 700; display: inline-block; }

/* ── Generic Empty / Error / Loading States ── */
.empty-state,
.error-state,
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  gap: 8px;
}
.empty-state-icon,
.error-state-icon {
  width: 44px;
  height: 44px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: 4px;
}
.empty-state-icon {
  background: rgba(201, 169, 110, 0.1);
  color: var(--gold);
}
.error-state-icon {
  background: rgba(232, 76, 76, 0.1);
  color: var(--danger);
}
.empty-state-title,
.error-state-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.empty-state-desc,
.error-state-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 260px;
}
.empty-state-action,
.error-state-action {
  margin-top: 8px;
  padding: 8px 20px;
  border-radius: 99px;
  background: rgba(201, 169, 110, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(201, 169, 110, 0.2);
  cursor: pointer;
  transition: background var(--transition);
}
.empty-state-action:active,
.error-state-action:active {
  background: rgba(201, 169, 110, 0.2);
}
.loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
}
.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--muted);
  animation: dotPulse 1.2s ease-in-out infinite;
}
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* ── POS Cart ── */
.cart-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 200px;
}
.cart-scan-row {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 12px;
  background: var(--panel);
}
.cart-scan-row input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--gold);
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 16px;
  outline: none;
  letter-spacing: 0.04em;
}
.cart-scan-row input:disabled {
  opacity: 0.6;
  border-color: var(--muted);
}
.cart-scan-row input::placeholder {
  color: var(--muted);
  font-size: 13px;
}
.cart-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}
.cart-empty {
  text-align: center;
  padding: 40px 20px 60px;
  color: var(--muted);
  font-size: 14px;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}
.cart-item-thumb {
  width: 44px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0e0f12;
}
.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-sku {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.cart-item-size {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  margin-left: 4px;
}
.cart-item-price {
  font-size: 11px;
  color: var(--gold);
  margin-top: 1px;
  font-weight: 600;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.cart-qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  display: grid;
  place-items: center;
  line-height: 1;
  padding: 0;
}
.cart-qty-btn:active {
  background: rgba(255, 255, 255, 0.12);
}
.cart-qty-input {
  width: 34px;
  height: 26px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  -moz-appearance: textfield;
  min-height: 0;
}
.cart-qty-input::-webkit-inner-spin-button,
.cart-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cart-item-subtotal {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  min-width: 44px;
  text-align: right;
}
.cart-item-del {
  width: 24px;
  height: 24px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0.5;
  padding: 0;
}
.cart-item-del:active {
  opacity: 1;
  color: var(--danger);
  background: rgba(232, 76, 76, 0.1);
}
.cart-footer {
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}
.cart-footer-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.cart-footer-total-label {
  font-size: 12px;
  color: var(--muted);
}
.cart-footer-total-qty {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.cart-footer-total-amount {
  margin-left: auto;
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cart-submit-btn {
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
}
.cart-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Cart Staff Selector ── */
.cart-staff-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-fine);
  background: rgba(255, 255, 255, 0.02);
}
.cart-staff-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 600;
}
.cart-staff-select {
  flex: 1;
  min-height: 40px;
  font-size: 13px;
  padding: 0 28px 0 10px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8a92' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  -webkit-appearance: none; appearance: none;
}
.cart-staff-empty {
  font-size: 12px;
  color: var(--muted);
  flex: 1;
  line-height: 1.4;
}

/* ── Checkout Result Card ── */
.cart-result-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 12px 12px;
  text-align: center;
}
.cart-result-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(76, 175, 125, 0.15);
  color: var(--green);
  font-size: 28px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.cart-result-detail {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}
.cart-result-label {
  font-size: 13px;
  color: var(--muted);
}
.cart-result-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.cart-result-sale-no {
  color: var(--gold);
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
}
.cart-result-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
}

/* ── Transfer Request Sheet (Medium Drawer) ── */
.sheet.sheet--transfer {
  max-height: 68vh;
}
.transfer-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0;
}
.transfer-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 4px;
}
.transfer-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.transfer-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.transfer-input {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 99px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
}
.transfer-input-narrow {
  width: 80px;
}
.transfer-inline-btn {
  min-height: 40px;
  align-self: flex-start;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--border-fine);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.transfer-inline-btn:active {
  transform: scale(0.98);
}
.transfer-select {
  width: 100%;
  min-height: 40px;
  padding: 0 28px 0 12px;
  border-radius: 99px;
  max-width: none;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8a92' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.transfer-static {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  border-radius: 99px;
  border: 1px solid var(--border-fine);
}
.transfer-size-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.transfer-size-chip {
  min-width: 36px;
  height: 34px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  transition: border-color var(--transition), background var(--transition);
}
.transfer-size-chip.active {
  border-color: var(--gold);
  background: rgba(201,169,110,0.15);
  color: var(--gold);
}
.transfer-size-chip:active {
  transform: scale(0.94);
}
.transfer-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.transfer-preview {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
}
.transfer-preview-inner {
  padding: 12px;
}
.transfer-preview-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.transfer-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-fine);
  font-size: 13px;
}
.transfer-preview-row:last-child { border-bottom: none; }
.transfer-preview-label { color: var(--muted); }
.transfer-preview-value { color: var(--text); font-weight: 600; }
.transfer-preview-note {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: rgba(201,169,110,0.08);
  color: var(--gold);
  font-size: 11px;
  line-height: 1.5;
}
.transfer-st-pending { color: var(--gold); }
.transfer-st-sent { color: var(--green); }
.transfer-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.transfer-actions .btn-primary,
.transfer-actions .btn-secondary {
  flex: 1;
  padding: 13px;
}
.transfer-result {
  padding: 16px;
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  background: rgba(76,175,125,0.04);
}
.transfer-result-icon {
  width: 36px; height: 36px;
  border-radius: 99px;
  background: rgba(76,175,125,0.12);
  color: var(--green);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
  margin: 0 auto 12px;
}
.transfer-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-fine);
  font-size: 13px;
}
.transfer-result-row:last-child { border-bottom: none; }
.transfer-result-label { color: var(--muted); }
.transfer-result-value { color: var(--text); font-weight: 600; }
.transfer-result-id { font-family: monospace; letter-spacing: 0.02em; }
.transfer-result-btn { margin-top: 12px; }

/* ── Product Detail Sheet (Medium Drawer) ── */
.sheet.sheet--detail {
  max-height: 65vh;
}
.product-detail-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}
.product-detail-sheet .product-image-wrap {
  max-height: 180px;
  border-radius: var(--radius);
}
.product-detail-sheet .product-image-wrap .product-image {
  height: 100%;
  object-fit: cover;
}
.image-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
}
.image-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
  transition: background var(--transition);
}
.image-dot.active {
  background: var(--gold);
}
.detail-section {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 12px;
}
.section-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.selling-points {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.price-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}
.price-label {
  font-size: 12px;
  color: var(--muted);
}
.price-value {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.price-current {
  color: var(--gold);
  font-size: 18px;
  font-weight: 800;
}
.price-placeholder {
  color: var(--muted);
  font-weight: 400;
}
.price-discount {
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
}
.size-distribution {
  display: flex;
  gap: 8px;
}
.size-dist-item {
  flex: 1;
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 10px 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}
.size-dist-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.size-dist-label {
  font-size: 9px !important;
  color: var(--muted);
  opacity: 0.6;
  margin-top: 1px;
}
.dist-qty {
  font-size: 16px !important;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}
.product-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

/* ── Misc / Shared ── */
.table-wrap { overflow-x: auto; }
.ok { color: var(--green); }
.warn { color: var(--gold); }
.bad { color: var(--danger); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .top-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  select { max-width: none; width: 100%; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .action-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .stage { width: calc(100% - 20px); padding-top: 20px; }
  .metric-row { gap: 6px; }
  .metric { padding: 12px 8px; }
  .metric-value { font-size: 18px; }
  .action-grid { gap: 8px; }
  .card { min-height: 120px; padding: 14px 12px; }
  .card h3 { font-size: 13px; }
  .quick-row { display: none; }
  .siri-bar { padding-bottom: max(12px, env(safe-area-inset-bottom, 12px)); }
  .query-row { gap: 6px; }
  .send-btn { padding-inline: 12px; }
  .sheet { max-height: 75vh; }
  .sheet.sheet--detail { max-height: 68vh; }
  .sheet.sheet--transfer { max-height: 72vh; }
  .sheet--result { max-height: 58vh; }
  .sheet--compact { max-height: 55vh; }
  .product-image-wrap { border-radius: var(--radius); }
  .matrix-row { grid-template-columns: 70px repeat(5, 1fr); }
  .matrix-cell { font-size: 11px; padding: 6px 4px; }
}
@media (max-width: 400px) {
  .brand-title { font-size: 12px; }
  .brand-mark { width: 26px; height: 26px; font-size: 10px; }
  .top-controls { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: 1fr 1fr; gap: 5px; }
  .metric { padding: 10px 6px; }
  .metric-value { font-size: 16px; }
  .card { min-height: 100px; padding: 12px 10px; }
  .card-icon { width: 28px; height: 28px; font-size: 14px; }
  .card h3 { font-size: 12px; }
  .card p { margin-top: 4px; font-size: 10px; }
  .cart-item { gap: 6px; padding: 6px 8px; }
  .cart-item-thumb { width: 36px; height: 50px; }
  .cart-item-name { font-size: 12px; }
  .cart-item-sku { font-size: 9px; }
  .cart-item-price { font-size: 10px; }
  .cart-item-subtotal { font-size: 12px; min-width: 36px; }
  .cart-qty-btn { width: 22px; height: 22px; font-size: 12px; }
  .cart-qty-input { width: 28px; height: 22px; font-size: 11px; }
  .cart-item-del { width: 20px; height: 20px; font-size: 10px; }
  .cart-footer-total-amount { font-size: 18px; }
}

/* ── P4-06: Panel Body & Placeholder Cards ── */
.panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}
.placeholder-card {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  background: rgba(255,255,255,0.02);
}
.placeholder-icon {
  font-size: 32px;
  margin-bottom: 10px;
}
.placeholder-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.placeholder-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}
.placeholder-hint {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.7;
  font-family: monospace;
  background: rgba(255,255,255,0.03);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
}

/* ── Daily Report Panel ── */
.report-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 0;
}
.report-grid {
  display: grid;
  gap: 8px;
}
.report-grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.report-stat {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  background: rgba(255,255,255,0.03);
}
.report-stat-val {
  display: block;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.report-stat-val.gold { color: var(--gold); }
.report-stat-lbl {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.report-section {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255,255,255,0.02);
}
.report-section-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.report-pm-row, .report-move-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-fine);
  font-size: 12px;
}
.report-pm-row:last-child, .report-move-row:last-child { border-bottom: none; }
.report-pm-lbl { font-weight: 600; flex: 1; }
.report-pm-amt { margin-left: auto; font-weight: 700; color: var(--gold); }
.report-move-event { flex: 1; }
.report-move-qty { font-weight: 700; font-variant-numeric: tabular-nums; }
.report-move-qty.move-green { color: var(--green); }
.report-move-qty.move-red { color: var(--danger); }
.report-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
  text-align: center;
}

/* ── Approve Transfer (real data) ── */
.approve-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0;
}
.approve-tabs {
  display: flex;
  gap: 6px;
}
.approve-tab {
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}
.approve-tab.active {
  background: rgba(201,169,110,0.12);
  color: var(--gold);
  border: 1px solid rgba(201,169,110,0.2);
}
.approve-tab.muted { opacity: 0.5; }
.approve-card {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255,255,255,0.03);
}
.approve-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.approve-store { font-weight: 600; font-size: 13px; }
.approve-status-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}
.approve-status-badge.pending {
  background: rgba(201,169,110,0.12);
  color: var(--gold);
}
.approve-card-lines {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.approve-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 8px;
}
.approve-id { font-family: monospace; opacity: 0.6; }
.approve-card-actions {
  display: flex;
  gap: 8px;
}

/* ── Transfer Monitor ── */
.monitor-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0;
}
.monitor-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.monitor-summary-item {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  background: rgba(255,255,255,0.03);
}
.monitor-summary-val {
  display: block;
  font-size: 20px;
  font-weight: 800;
}
.monitor-summary-val.gold { color: var(--gold); }
.monitor-summary-lbl {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.monitor-card {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255,255,255,0.03);
}
.monitor-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.monitor-store { font-weight: 600; font-size: 13px; }
.monitor-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}
.monitor-status.st-pending { background: rgba(201,169,110,0.12); color: var(--gold); }
.monitor-status.st-transit { background: rgba(30,77,122,0.15); color: var(--blue); border: 1px solid rgba(30,77,122,0.25); }
.monitor-status.st-done { background: rgba(76,175,125,0.1); color: var(--green); }
.monitor-status.st-reject { background: rgba(232,76,76,0.1); color: var(--danger); }
.monitor-card-body {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.monitor-time { font-size: 11px; }
.monitor-card-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted);
}
.monitor-id { font-family: monospace; opacity: 0.6; }
.monitor-receive {
  color: var(--gold);
  cursor: pointer;
  font-weight: 600;
}
.monitor-receive:active { opacity: 0.7; }

/* ── Inbound Scan ── */
.inbound-scan-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 0;
}
.inbound-scan-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.inbound-scan-input {
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: rgba(0,0,0,0.3);
  color: var(--text);
  font-size: 15px;
}
.inbound-scan-input::placeholder { color: var(--muted); font-size: 13px; }
.inbound-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.inbound-stat {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 14px 6px;
  text-align: center;
  background: rgba(255,255,255,0.03);
}
.inbound-stat-val {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.inbound-stat-val.gold { color: var(--gold); }
.inbound-stat-lbl {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

/* ── Asset Card (Marketing) ── */
.asset-card {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255,255,255,0.03);
}
.asset-sku {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 3px;
}
.asset-desc {
  font-size: 11px;
  color: var(--muted);
}

/* ── P4-06: Panel Card / List Styles ── */
.purchase-panel, .supplier-panel, .tracking-panel { display: flex; flex-direction: column; gap: 10px; padding: 2px 0; }
.ps-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; }
.ps-item { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 10px; text-align: center; background: rgba(255,255,255,0.03); }
.ps-val { display: block; font-size: 20px; font-weight: 800; }
.ps-val.gold { color: var(--gold); }
.ps-val.warn { color: var(--gold); }
.ps-val.ok { color: var(--green); }
.ps-lbl { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.panel-list { display: flex; flex-direction: column; gap: 8px; }
.pl-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 12px; background: rgba(255,255,255,0.03); }
.plc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.plc-id { font-weight: 600; font-size: 13px; font-family: monospace; }
.plc-body { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.plc-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); }
.sup-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 12px; background: rgba(255,255,255,0.03); }
.sup-name { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.sup-detail { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.sup-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.sup-foot .ok { color: var(--green); }
.phint { text-align: center; font-size: 10px; color: var(--muted); padding: 4px 0; }
.trk-group { margin-bottom: 4px; }
.trk-gtitle { margin-bottom: 6px; }
.trk-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 10px; margin-bottom: 6px; background: rgba(255,255,255,0.03); }
.ib-items { display: flex; flex-direction: column; gap: 8px; }
.ib-item { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 10px; background: rgba(255,255,255,0.03); }
.ib-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 12px; }
.ib-item-body { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); align-items: center; }
.ib-footer { border-top: 1px solid var(--border-fine); padding-top: 10px; margin-top: 6px; }
.ib-foot-row { display: flex; gap: 8px; align-items: center; font-size: 13px; padding-bottom: 8px; flex-wrap: wrap; }

/* ── P4-07: Return / Storage / Discrepancy ── */
.return-panel, .storage-panel, .disc-panel, .arb-panel, .picking-panel { display: flex; flex-direction: column; gap: 10px; padding: 2px 0; }
.ret-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 12px; background: rgba(255,255,255,0.03); }
.ret-store { font-weight: 600; font-size: 12px; color: var(--gold); }
.sto-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 10px; background: rgba(255,255,255,0.03); text-align: center; }
.sto-loc { font-size: 13px; font-weight: 700; margin-bottom: 6px; font-family: monospace; letter-spacing: 0.03em; }
.sto-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.08); margin-bottom: 6px; overflow: hidden; }
.sto-fill { height: 100%; border-radius: 2px; background: var(--gold); transition: width 0.3s; }
.sto-info { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.disc-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 12px; background: rgba(255,255,255,0.03); }
.arb-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 12px; background: rgba(255,255,255,0.03); }

/* ── P4-07: Marketing Shared ── */
.marketing-panel, .tag-panel, .media-panel, .copy-panel { display: flex; flex-direction: column; gap: 10px; padding: 2px 0; }
.mkt-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 12px; background: rgba(255,255,255,0.03); }
.mkt-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 12px; }
.mkt-sku { font-weight: 600; font-size: 12px; font-family: monospace; color: var(--gold); }
.mkt-tags { font-size: 11px; color: var(--muted); }

/* ── P4-07: AI Tag Review ── */
.tag-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 12px; background: rgba(255,255,255,0.03); }
.tag-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag-pill { padding: 2px 8px; border-radius: 99px; background: rgba(201,169,110,0.1); border: 1px solid rgba(201,169,110,0.15); color: var(--gold); font-size: 10px; }

/* ── P4-07: Media Review ── */
.media-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 10px; background: rgba(255,255,255,0.03); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.media-thumb { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; flex: 0 0 auto; background: rgba(255,255,255,0.04); }
.media-thumb-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 20px; color: var(--muted); }
.media-info { flex: 1; min-width: 0; }
.media-type { font-size: 10px; color: var(--muted); margin-top: 1px; }

/* ── P4-07: Detail Copy ── */
.copy-card { border: 1px solid var(--border-fine); border-radius: var(--radius); padding: 12px; background: rgba(255,255,255,0.03); }
.copy-section { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.copy-label { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.copy-textarea { width: 100%; min-height: 40px; padding: 8px; border-radius: var(--radius); border: 1px solid var(--border-fine); background: rgba(0,0,0,0.2); color: var(--text-secondary); font-size: 12px; line-height: 1.5; resize: vertical; outline: none; font-family: inherit; }
.copy-textarea:focus { border-color: rgba(201,169,110,0.3); }

/* ── P4-07: Bad variant for ps-val ── */
.ps-val.bad { color: var(--danger); }

/* ── Sheet Content Fade Transition ── */
@keyframes contentFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.sheet-body-fade { animation: contentFadeIn 0.18s ease; }

/* ── Loading State Variant (for panels) ── */
.panel-loading {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.panel-loading .loading-dots { padding: 0; }

/* ── Responsive tweaks for P4-07 panels ── */
@media (max-width: 540px) {
  .report-grid-4 { grid-template-columns: 1fr 1fr; }
  .monitor-summary { grid-template-columns: 1fr 1fr 1fr; }
  .inbound-stats { grid-template-columns: 1fr 1fr 1fr; }
  .ps-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .report-grid-4 { grid-template-columns: 1fr 1fr; gap: 5px; }
  .report-stat { padding: 10px 4px; }
  .report-stat-val { font-size: 16px; }
}

/* ── Offline Cache: Pending Orders Panel ── */
.oc-pending-card {
  border: 1px solid var(--border-fine);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
}
.oc-pc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.oc-pc-id { font-size: 12px; font-weight: 600; color: var(--text); }
.oc-pc-status { font-size: 10px; padding: 2px 8px; border-radius: 99px; }
.oc-pc-status.oc- { background: rgba(201,169,110,0.15); color: var(--gold); }
.oc-pc-status.oc-st-failed { background: rgba(232,76,76,0.15); color: var(--danger); }
.oc-pc-body {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}
.oc-pc-reason {
  font-size: 10px;
  color: var(--danger);
  margin-top: 4px;
  word-break: break-word;
}
.oc-pc-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.oc-indicator-link {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(201,169,110,0.1);
  border: 1px solid rgba(201,169,110,0.2);
  font-size: 11px;
  transition: var(--transition);
}
.oc-indicator-link:hover { background: rgba(201,169,110,0.2); }
