/* EAM KK Loyalty — Staff / Service workspace only */
#staff-workspace.service-workspace {
  --service-red: #ed1b2f;
  --service-red-dark: #a30f1e;
  --service-gold: #d5ad4b;
  --service-ink: #0b0d12;
  --service-panel: #12161e;
  --service-panel-2: #171c25;
  --service-line: rgba(255,255,255,.09);
  --service-muted: #98a2b3;
  display: block;
  max-width: 1440px;
  margin-inline: auto;
}
#staff-workspace.hidden { display: none !important; }

.service-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  margin: 0 0 18px;
  border: 1px solid rgba(237,27,47,.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 15%, rgba(237,27,47,.24), transparent 28%),
    linear-gradient(135deg, #11151d 0%, #0d1016 60%, #181015 100%);
  box-shadow: 0 16px 50px rgba(0,0,0,.18);
}
.service-hero::after {
  content: "";
  position: absolute;
  right: -55px;
  bottom: -105px;
  width: 260px;
  height: 260px;
  border: 42px solid rgba(237,27,47,.055);
  transform: rotate(45deg);
  pointer-events: none;
}
.service-hero h2 { margin: 4px 0 6px; font-size: clamp(1.45rem, 2vw, 2rem); color: #fff; }
.service-hero p:not(.eyebrow) { margin: 0; color: #aab3c0; max-width: 760px; line-height: 1.55; }
.service-hero-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.service-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 5px rgba(61,220,132,.10); }

.service-top-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-bottom: 16px;
}
#staff-workspace .service-scan-card,
#staff-workspace .service-search-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 15px;
  min-height: 170px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--service-line);
  background: linear-gradient(160deg, rgba(24,29,39,.98), rgba(13,16,22,.98));
}
.service-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(237,27,47,.22), rgba(237,27,47,.08));
  border: 1px solid rgba(237,27,47,.28);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
}
.service-card-copy h3 { margin: 3px 0 5px; color: #fff; }
.service-card-copy p:not(.eyebrow) { margin: 0; color: var(--service-muted); line-height: 1.45; font-size: .9rem; }
.service-camera-button { grid-column: 1 / -1; justify-self: start; min-width: 154px; }
#staff-workspace .scanner-frame { grid-column: 1 / -1; width: min(100%, 520px); justify-self: center; border-radius: 18px; overflow: hidden; }
#staff-workspace #close-camera,
#staff-workspace #camera-message { grid-column: 1 / -1; }

.service-search-toolbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  background: transparent;
}
.service-search-toolbar input {
  min-width: 0;
  min-height: 48px;
  padding: 0 15px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.10);
  background: #0d1118;
  color: #fff;
}
.service-search-toolbar input:focus { border-color: rgba(237,27,47,.65); box-shadow: 0 0 0 3px rgba(237,27,47,.11); outline: 0; }
.service-search-toolbar button { min-height: 48px; padding-inline: 22px; }

.service-work-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
#staff-workspace .service-customer-panel,
#staff-workspace .service-detail-panel {
  border-radius: 20px;
  border: 1px solid var(--service-line);
  background: linear-gradient(165deg, rgba(21,26,35,.98), rgba(11,14,20,.98));
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}
.service-customer-panel { position: sticky; top: 82px; max-height: calc(100vh - 112px); overflow: auto; }
.service-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.service-panel-head h3 { margin: 2px 0 0; }
.service-panel-hint { font-size: .72rem; color: var(--service-muted); white-space: nowrap; }

#staff-workspace .vehicle-list { display: grid; gap: 8px; }
#staff-workspace .vehicle-row {
  position: relative;
  width: 100%;
  text-align: left;
  padding: 13px 42px 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.075);
  background: rgba(255,255,255,.025);
  color: #fff;
  transition: .18s ease;
}
#staff-workspace .vehicle-row::after {
  content: "›";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #667085;
  font-size: 1.35rem;
}
#staff-workspace .vehicle-row:hover,
#staff-workspace .vehicle-row:focus-visible {
  border-color: rgba(237,27,47,.42);
  background: rgba(237,27,47,.055);
  transform: translateY(-1px);
  outline: 0;
}
#staff-workspace .vehicle-row strong { font-size: .98rem; letter-spacing: .035em; }
#staff-workspace .vehicle-row span { margin-top: 5px; font-size: .78rem; color: #9da7b5; }

.service-detail-panel { min-width: 0; overflow: hidden; }
.service-empty-state { min-height: 390px; display: grid; place-items: center; align-content: center; text-align: center; padding: 34px; }
.service-empty-icon { display:grid; place-items:center; width:68px; height:68px; margin-bottom:14px; border-radius:21px; border:1px solid rgba(237,27,47,.22); background:rgba(237,27,47,.08); color:#ff4053; font-size:2rem; }
.service-empty-state h3 { margin: 0 0 8px; }
.service-empty-state p { margin: 0; max-width: 460px; color: var(--service-muted); line-height: 1.55; }

/* Staff customer detail: operational, compact, but same premium language */
#staff-detail .loyalty-card { max-width: none; margin: 0; gap: 14px; }
#staff-detail .card-top { border-radius: 18px; min-height: 0; }
#staff-detail .journey-panel,
#staff-detail .content-block,
#staff-detail #stamp-form,
#staff-detail .actions { border-radius: 16px; }
#staff-detail .journey-panel { margin-top: 0; }
#staff-detail .batch-navigation { padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.025); }
#staff-detail [data-stamp-position] { cursor: pointer; }
#staff-detail [data-stamp-position].selected { box-shadow: 0 0 0 3px rgba(237,27,47,.18), 0 0 0 1px #ed1b2f inset; }
#staff-detail #stamp-form {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(213,173,75,.20);
  background: linear-gradient(145deg, rgba(213,173,75,.07), rgba(255,255,255,.025));
}
#staff-detail #stamp-form h3 { margin-top: 0; }
#staff-detail #stamp-form .selection-note { padding: 10px 12px; border-radius: 11px; background: rgba(237,27,47,.075); color: #e7eaf0; }
#staff-detail #stamp-form input { min-height: 46px; }
#staff-detail #stamp-form .primary { min-height: 48px; }
#staff-detail .actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
#staff-detail .actions button { min-height: 48px; }

@media (max-width: 980px) {
  .service-top-grid { grid-template-columns: 1fr; }
  .service-work-grid { grid-template-columns: 1fr; }
  .service-customer-panel { position: static; max-height: none; }
  #staff-workspace .vehicle-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  #staff-workspace.service-workspace { margin-inline: -2px; }
  .service-hero { padding: 18px; border-radius: 18px; align-items: flex-start; }
  .service-hero-badge { display: none; }
  .service-hero h2 { font-size: 1.35rem; }
  .service-top-grid { gap: 12px; }
  #staff-workspace .service-scan-card,
  #staff-workspace .service-search-card { padding: 16px; border-radius: 17px; min-height: 0; }
  .service-card-icon { width: 40px; height: 40px; border-radius: 12px; }
  .service-camera-button { width: 100%; }
  .service-search-toolbar { grid-template-columns: 1fr; }
  .service-search-toolbar button { width: 100%; }
  #staff-workspace .service-customer-panel,
  #staff-workspace .service-detail-panel { border-radius: 17px; padding: 14px; }
  #staff-workspace .vehicle-list { grid-template-columns: 1fr; }
  .service-panel-head { align-items: center; }
  .service-empty-state { min-height: 260px; padding: 24px 12px; }
  #staff-detail .actions { grid-template-columns: 1fr; }
  #staff-detail .batch-navigation { display: grid !important; grid-template-columns: 1fr; align-items: stretch !important; }
  #staff-detail .batch-navigation label { display: grid !important; grid-template-columns: 1fr; align-items: stretch !important; }
  #staff-detail #go-service-position { max-width: none !important; width: 100%; }
}

@media (min-width: 1180px) {
  #staff-workspace .service-detail-panel { padding: 22px; }
  #staff-detail .card-top { min-height: 250px; }
}

/* ==========================================================
   Staff / Service record v2 — compact tabs for phone + web
   Keeps all operational data, but separates Service,
   Transactions and History so the page is not visually busy.
   ========================================================== */

#staff-detail.service-detail-panel {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.staff-service-record {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.staff-customer-summary {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 14%, rgba(237,27,47,.15), transparent 30%),
    linear-gradient(145deg,#0d1118,#151a22 72%,#1f0a0f);
  box-shadow: 0 16px 42px rgba(0,0,0,.22);
  overflow: hidden;
}

.staff-summary-main { min-width: 0; display: grid; gap: 3px; }
.staff-summary-kicker {
  color: #9ca6b4;
  font-size: .7rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.staff-summary-main h2 {
  margin: 2px 0 0;
  color: #fff;
  font-size: clamp(1.55rem,3vw,2.15rem);
  letter-spacing: .055em;
  line-height: 1.05;
}
.staff-summary-main > strong { color: #f6f7f9; font-size: 1rem; }
.staff-summary-main > span:last-child { color: #99a3b1; font-size: .86rem; }

.staff-summary-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(92px,1fr));
  gap: 8px;
}
.staff-summary-stats > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
}
.staff-summary-stats small { display:block; color:#8994a4; font-size:.64rem; margin-bottom:3px; }
.staff-summary-stats strong { display:block; color:#fff; font-size:.86rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.staff-record-tabs {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(10,13,18,.94);
  backdrop-filter: blur(14px);
}
.staff-record-tabs button {
  min-height: 43px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #929baa;
  font-weight: 800;
  font-size: .78rem;
  cursor: pointer;
}
.staff-record-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg,#b70f20,#ed1b2f);
  box-shadow: 0 8px 20px rgba(237,27,47,.20);
}

.staff-tab-panel { display: none; min-width: 0; }
.staff-tab-panel.active { display: grid; gap: 14px; }

.staff-service-toolbar {
  display: grid;
  grid-template-columns: auto minmax(120px,1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  background: #10141b;
}
.staff-service-toolbar > div { text-align:center; display:grid; gap:2px; }
.staff-service-toolbar small { color:#8e98a7; font-size:.64rem; }
.staff-service-toolbar strong { color:#fff; font-size:.88rem; }
.staff-service-toolbar .link-button { min-height: 40px; }

.staff-go-position {
  display: grid;
  grid-template-columns: minmax(180px,300px) auto 1fr;
  gap: 9px;
  align-items: end;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
}
.staff-go-position label { display:grid; gap:5px; }
.staff-go-position label span { color:#a4adba; font-size:.72rem; font-weight:700; }
.staff-go-position input { width:100%; min-height:42px; }
.staff-go-position > small { color:#7f8997; align-self:center; }

.staff-service-journey,
.staff-stamp-action-card,
.staff-record-section {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 19px;
  background: linear-gradient(145deg,#11151c,#0d1016);
  min-width: 0;
}

.staff-premium-marker-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(100px,1fr));
  gap: 10px;
  margin-top: 15px;
}
.staff-premium-marker-button {
  border: 0;
  padding: 8px 5px 4px;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
  color: inherit;
  min-width: 0;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.staff-premium-marker-button:not(:disabled):hover,
.staff-premium-marker-button:not(:disabled):focus-visible {
  background: rgba(237,27,47,.055);
  outline: 0;
  transform: translateY(-1px);
}
.staff-premium-marker-button.selected {
  background: rgba(237,27,47,.08);
  box-shadow: inset 0 0 0 1px rgba(237,27,47,.42);
}
.staff-premium-marker-button:disabled { cursor: default; opacity: 1; }
.staff-premium-marker-button .premium-marker-wrap { min-width: 0; }
.staff-premium-marker-button .premium-service-marker {
  margin-inline: auto;
  width: 76px;
  height: 76px;
}
.staff-premium-marker-button .premium-service-marker strong { font-size: .84rem; }
.staff-premium-marker-button .premium-service-marker small { font-size: .61rem; }
.staff-marker-state {
  display:block;
  min-height: 20px;
  margin-top: 7px;
  color:#858f9d;
  font-size:.61rem;
  line-height:1.25;
  text-align:center;
}
.staff-premium-marker-button.selected .staff-marker-state { color:#ff6573; font-weight:800; }

.staff-rule-note {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: .76rem;
  line-height: 1.45;
}
.staff-rule-note.blocked { color:#ffc2c8; background:rgba(237,27,47,.08); border:1px solid rgba(237,27,47,.18); }

.staff-stamp-action-card #stamp-form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 11px;
}
.staff-stamp-action-card #stamp-form h3,
.staff-stamp-action-card #stamp-form .selection-note,
.staff-stamp-action-card #stamp-form > button { grid-column: 1/-1; }
.staff-stamp-action-card #stamp-form h3 { margin:0; }
.staff-stamp-action-card #stamp-form .selection-note {
  margin: 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(237,27,47,.065);
}
.staff-stamp-action-card .actions { margin-top:10px; }
.staff-stamp-action-card .actions .primary { width:100%; }

.staff-record-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:13px;
}
.staff-record-heading > div { display:flex; gap:10px; align-items:center; min-width:0; }
.staff-record-heading h3 { margin:1px 0 0; color:#fff; font-size:1rem; }
.staff-record-heading small { color:#7f8997; font-size:.64rem; }
.staff-record-heading > span { color:#828c9b; font-size:.7rem; white-space:nowrap; }

.staff-transaction-list,
.staff-reward-list,
.staff-promo-list { display:grid; gap:8px; }
.staff-transaction-row,
.staff-reward-row,
.staff-promo-row {
  border:1px solid rgba(255,255,255,.065);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}
.staff-transaction-row {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:11px;
  align-items:center;
  padding:12px;
}
.staff-transaction-icon {
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:50%;
  color:#dff7e8;
  background:rgba(45,181,93,.12);
  border:1px solid rgba(45,181,93,.24);
  font-weight:900;
}
.staff-transaction-row.is-missed .staff-transaction-icon { color:#ffd4d8; background:rgba(237,27,47,.10); border-color:rgba(237,27,47,.24); }
.staff-transaction-main { display:grid; gap:2px; min-width:0; }
.staff-transaction-main strong { color:#f5f7fa; font-size:.82rem; }
.staff-transaction-main span { color:#a3adba; font-size:.72rem; overflow-wrap:anywhere; }
.staff-transaction-main small { color:#7f8997; font-size:.66rem; }
.staff-transaction-meta { display:grid; justify-items:end; gap:5px; }
.staff-transaction-meta small { color:#778291; font-size:.64rem; }

.staff-reward-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:13px;
}
.staff-reward-row > div:first-child { display:grid; gap:3px; min-width:0; }
.staff-reward-row strong { color:#f6f7f9; font-size:.82rem; }
.staff-reward-row span { color:#9ca6b4; font-size:.68rem; overflow-wrap:anywhere; }
.staff-reward-row small { color:#7e8998; }
.staff-reward-side { display:grid; justify-items:end; gap:5px; }
.staff-status-chip {
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  font-size:.62rem;
  font-weight:850;
  background:rgba(255,255,255,.06);
  color:#c7ced8;
  white-space:nowrap;
}
.staff-status-chip.redeemed { color:#ffdfa1; background:rgba(213,173,75,.12); }
.staff-status-chip.eligible { color:#c9f6d8; background:rgba(45,181,93,.12); }
.staff-status-chip.not_eligible,.staff-status-chip.expired { color:#ffc2c8; background:rgba(237,27,47,.10); }

.staff-promo-row { padding:13px; }
.staff-promo-row > div { display:flex; justify-content:space-between; gap:10px; }
.staff-promo-row strong { color:#fff; font-size:.82rem; }
.staff-promo-row span { color:#ffcf73; font-size:.7rem; font-weight:800; text-align:right; }
.staff-promo-row p { margin:5px 0; color:#a0a9b7; font-size:.72rem; line-height:1.4; }
.staff-promo-row small { color:#77818f; }

.staff-history-list { list-style:none; margin:0; padding:0; display:grid; }
.staff-history-row {
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:11px;
  padding:11px 4px;
  border-bottom:1px solid rgba(255,255,255,.055);
}
.staff-history-row:last-child { border-bottom:0; }
.staff-history-dot { width:9px; height:9px; margin-top:5px; border-radius:50%; background:#ed1b2f; box-shadow:0 0 0 4px rgba(237,27,47,.08); }
.staff-history-row div { display:grid; gap:3px; }
.staff-history-row strong { color:#dfe3e9; font-size:.75rem; font-weight:700; line-height:1.4; }
.staff-history-row small { color:#778291; font-size:.64rem; }

@media (max-width: 860px) {
  .staff-customer-summary { grid-template-columns:1fr; }
  .staff-summary-stats { grid-template-columns:repeat(3,1fr); }
  .staff-premium-marker-grid { grid-template-columns:repeat(4,minmax(92px,1fr)); overflow-x:auto; padding-bottom:5px; }
}

@media (max-width: 680px) {
  #staff-workspace .service-detail-panel { padding:0; border:0; background:transparent; }
  .staff-service-record { gap:10px; }
  .staff-customer-summary { padding:15px; border-radius:17px; gap:13px; }
  .staff-summary-main h2 { font-size:1.6rem; }
  .staff-summary-stats { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .staff-summary-stats > div { padding:9px 8px; border-radius:11px; }
  .staff-summary-stats small { font-size:.56rem; }
  .staff-summary-stats strong { font-size:.73rem; }

  .staff-record-tabs { top:calc(env(safe-area-inset-top,0px) + 2px); border-radius:14px; }
  .staff-record-tabs button { min-height:42px; font-size:.74rem; }

  .staff-service-toolbar { grid-template-columns:1fr 1.25fr 1fr; padding:9px; gap:5px; }
  .staff-service-toolbar .link-button { padding-inline:7px; font-size:.68rem; }
  .staff-service-toolbar strong { font-size:.78rem; }

  .staff-go-position { grid-template-columns:1fr auto; padding:11px; }
  .staff-go-position > small { grid-column:1/-1; }

  .staff-service-journey,
  .staff-stamp-action-card,
  .staff-record-section { padding:14px; border-radius:16px; }

  .staff-premium-marker-grid {
    display:flex;
    overflow-x:auto;
    gap:5px;
    padding:4px 1px 10px;
    scroll-snap-type:x proximity;
    scrollbar-width:thin;
  }
  .staff-premium-marker-button { flex:0 0 92px; scroll-snap-align:start; padding:6px 2px; }
  .staff-premium-marker-button .premium-service-marker { width:69px; height:69px; }
  .staff-marker-state { font-size:.55rem; }

  .staff-stamp-action-card #stamp-form { grid-template-columns:1fr; }
  .staff-stamp-action-card #stamp-form h3,
  .staff-stamp-action-card #stamp-form .selection-note,
  .staff-stamp-action-card #stamp-form > button { grid-column:auto; }

  .staff-transaction-row { grid-template-columns:auto minmax(0,1fr); padding:10px; }
  .staff-transaction-meta { grid-column:2; justify-items:start; grid-auto-flow:column; justify-content:start; align-items:center; }
  .staff-reward-row { align-items:flex-start; }
  .staff-reward-side { min-width:100px; }
  .staff-record-heading { align-items:flex-start; }
  .staff-record-heading > span { margin-top:3px; }
}

@media (max-width: 390px) {
  .staff-summary-stats { grid-template-columns:1fr 1fr; }
  .staff-summary-stats > div:last-child { grid-column:1/-1; }
  .staff-service-toolbar { grid-template-columns:1fr 1fr; }
  .staff-service-toolbar > div { grid-column:1/-1; grid-row:1; }
  .staff-service-toolbar button:first-child { grid-column:1; grid-row:2; }
  .staff-service-toolbar button:last-child { grid-column:2; grid-row:2; }
  .staff-reward-row { display:grid; }
  .staff-reward-side { justify-items:start; }
}

/* ==========================================================
   FINAL STAFF/SERVICE REFINEMENT
   Match Customer page stamp + history visual language.
   Transactions/History show 5 recent records with View All.
   ========================================================== */

/* Same premium circular stamp language used on Customer page */
#staff-detail .staff-premium-marker-grid {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

#staff-detail .staff-premium-marker-button {
  flex: 0 0 86px;
  min-width: 86px;
  padding: 5px 3px 4px;
  scroll-snap-align: start;
  background: transparent;
  border: 0;
  border-radius: 15px;
}

#staff-detail .staff-premium-marker-button .premium-marker-wrap {
  width: 76px;
  min-width: 76px;
  margin-inline: auto;
}

#staff-detail .staff-premium-marker-button .premium-service-marker {
  width: 64px;
  height: 64px;
  margin-inline: auto;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #c8ced6;
  background: radial-gradient(circle at 35% 28%, #252a31, #101319 68%);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.018);
}

#staff-detail .staff-premium-marker-button .premium-service-marker strong {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1;
}

#staff-detail .staff-premium-marker-button .premium-service-marker small {
  margin-top: 3px;
  font-size: 9px;
  line-height: 1;
  color: inherit;
  opacity: .9;
}

#staff-detail .staff-premium-marker-button .premium-marker-icon {
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

#staff-detail .staff-premium-marker-button .premium-service-marker.is-complete {
  border-color: #f21c32;
  background: radial-gradient(circle at 35% 28%, #51202a, #210d12 65%);
  color: #fff;
  box-shadow: 0 0 14px rgba(237,27,47,.16), inset 0 0 0 3px rgba(237,27,47,.05);
}

#staff-detail .staff-premium-marker-button .premium-service-marker.is-complete .premium-marker-icon {
  color: #ff4858;
}

#staff-detail .staff-premium-marker-button .premium-service-marker.is-reward {
  border-color: #c8a951;
}

#staff-detail .staff-premium-marker-button .premium-service-marker.is-reward .premium-marker-icon {
  color: #f1c75b;
}

#staff-detail .staff-premium-marker-button .premium-service-marker.is-redeemed {
  background: radial-gradient(circle at 35% 28%, #59491a, #1f1908 68%);
  box-shadow: 0 0 18px rgba(241,199,91,.20);
}

#staff-detail .staff-premium-marker-button .premium-service-marker.is-missed {
  border-color: #8b4048;
  background: radial-gradient(circle at 35% 28%, #3b171b, #170b0d 68%);
  color: #f19ca5;
}

#staff-detail .staff-premium-marker-button .premium-service-marker.is-missed .premium-marker-icon {
  color: #ff6775;
}

#staff-detail .staff-premium-marker-button.selected {
  background: rgba(237,27,47,.075);
  box-shadow: inset 0 0 0 1px rgba(237,27,47,.38), 0 0 20px rgba(237,27,47,.07);
}

#staff-detail .staff-premium-marker-button.selected .premium-service-marker {
  box-shadow: 0 0 0 3px rgba(237,27,47,.16), 0 0 18px rgba(237,27,47,.20), inset 0 0 0 2px rgba(255,255,255,.03);
}

#staff-detail .premium-reward-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 76px;
  min-height: 18px;
  margin: 6px auto 0;
  padding: 3px 6px;
  border-radius: 999px;
  background: #c8a951;
  color: #17120a;
  font-size: 7px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

#staff-detail .staff-marker-state {
  min-height: 18px;
  margin-top: 6px;
  color: #8f99a7;
  font-size: 8px;
  line-height: 1.15;
  text-align: center;
}

/* Transaction cards: compact, readable on phone */
#staff-detail .staff-transaction-row {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}

/* History follows Customer page's Service History table style */
#staff-detail .staff-history-list {
  display: grid;
  margin: 0;
  padding: 0;
}

#staff-detail .staff-history-premium-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1.7fr) minmax(92px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.07);
}

#staff-detail .staff-history-premium-row:first-child {
  border-top: 0;
}

#staff-detail .premium-history-index {
  font-size: 12px;
  color: #d7dce0;
  text-align: center;
}

#staff-detail .premium-history-service strong {
  display: block;
  color: #eef1f5;
  font-size: 12px;
  line-height: 1.35;
}

#staff-detail .premium-history-service small {
  display: block;
  margin-top: 3px;
  color: #8f9aa4;
  font-size: 9px;
}

#staff-detail .premium-history-date {
  color: #b9c1c8;
  font-size: 11px;
}

#staff-detail .premium-status-pill {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

#staff-detail .premium-status-pill.completed {
  background: #143e2d;
  color: #77e0ad;
}

#staff-detail .premium-status-pill.missed {
  background: #4a1f26;
  color: #ff9aa4;
}

#staff-detail .staff-view-all {
  display: inline-flex;
  width: auto;
  margin: 12px 0 0 auto;
  padding: 7px 2px;
  color: #e3b74f;
  font-size: .76rem;
  font-weight: 800;
}

/* Cleaner tab panel spacing */
#staff-detail .staff-tab-panel {
  min-width: 0;
}

#staff-detail .staff-tab-panel:not(.active) {
  display: none !important;
}

#staff-detail .staff-tab-panel.active {
  display: grid;
  gap: 12px;
}

@media (max-width: 680px) {
  #staff-detail .staff-customer-summary {
    margin: 0;
  }

  #staff-detail .staff-record-tabs {
    overflow: hidden;
  }

  #staff-detail .staff-record-tabs button {
    min-width: 0;
    padding-inline: 8px;
  }

  #staff-detail .staff-service-journey,
  #staff-detail .staff-stamp-action-card,
  #staff-detail .staff-record-section {
    padding: 13px;
  }

  #staff-detail .staff-premium-marker-grid {
    gap: 8px;
    margin-inline: -2px;
    padding-inline: 2px;
  }

  #staff-detail .staff-premium-marker-button {
    flex-basis: 70px;
    min-width: 70px;
  }

  #staff-detail .staff-premium-marker-button .premium-marker-wrap {
    width: 60px;
    min-width: 60px;
  }

  #staff-detail .staff-premium-marker-button .premium-service-marker {
    width: 50px;
    height: 50px;
  }

  #staff-detail .staff-premium-marker-button .premium-marker-icon {
    font-size: 14px;
  }

  #staff-detail .staff-premium-marker-button .premium-service-marker strong {
    font-size: 10px;
  }

  #staff-detail .staff-premium-marker-button .premium-service-marker small {
    font-size: 8px;
  }

  #staff-detail .premium-reward-tag {
    max-width: 60px;
    font-size: 7px;
    padding: 3px 5px;
  }

  #staff-detail .staff-history-premium-row {
    grid-template-columns: 22px minmax(0,1fr) auto;
    gap: 8px;
    padding: 9px 0;
  }

  #staff-detail .premium-history-date {
    display: none;
  }

  #staff-detail .premium-history-service strong {
    font-size: 10px;
  }

  #staff-detail .premium-history-service small {
    font-size: 8px;
  }

  #staff-detail .premium-status-pill {
    padding: 4px 7px;
    font-size: 8px;
  }

  #staff-detail .staff-transaction-row {
    grid-template-columns: 34px minmax(0,1fr);
    gap: 9px;
  }

  #staff-detail .staff-transaction-meta {
    grid-column: 2;
    justify-items: start;
    grid-auto-flow: column;
    justify-content: start;
  }

  #staff-detail .staff-view-all {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 11px;
    background: rgba(255,255,255,.025);
  }
}


/* =========================================================
   EAM KK - STRICT STAFF COMPLETED CIRCLE ONLY
   Changes ONLY the completed circle container.
   No icon, text, spacing, logic, or other UI changes.
   ========================================================= */

#staff-detail .staff-premium-marker-button
.premium-service-marker.is-complete:not(.is-reward):not(.is-missed) {
  border-color: #35d07f;
  background: radial-gradient(circle at 35% 28%, #174d36, #09261a 68%);
  box-shadow:
    0 0 10px rgba(53, 208, 127, .40),
    inset 0 0 0 3px rgba(53, 208, 127, .08);
}
