.sts-app,
.sts-app * {
  box-sizing: border-box;
}

.sts-app {
  --sts-bg: #f5f6fb;
  --sts-card: #ffffff;
  --sts-text: #101828;
  --sts-muted: #667085;
  --sts-line: #e4e7ec;
  --sts-purple: #9923fa;
  --sts-purple-2: #c026d3;
  --sts-green: #14b87a;
  --sts-red: #ef4444;
  --sts-orange: #f59e0b;
  --sts-blue: #2563eb;
  --sts-dark: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--sts-text);
}

.sts-login-required {
  max-width: 680px;
  padding: 24px;
  border-radius: 20px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
}

.sts-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px;
  background: var(--sts-bg);
  border-radius: 28px;
}

.sts-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(15,23,42,0.06);
}

.sts-kicker {
  font-size: 13px;
  font-weight: 900;
  color: var(--sts-purple);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sts-topbar h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
  font-weight: 950;
}

.sts-topbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.sts-select,
.sts-input {
  width: 100%;
  min-height: 58px;
  border: 1px solid #d9e0ea;
  border-radius: 18px;
  background: #fff;
  color: var(--sts-text);
  padding: 0 18px;
  font-size: 18px;
  outline: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.sts-select:focus,
.sts-input:focus {
  border-color: var(--sts-purple);
  box-shadow: 0 0 0 4px rgba(153,35,250,0.12);
}

.sts-refresh-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--sts-muted);
  font-size: 13px;
  font-weight: 800;
}

.sts-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.sts-summary-card {
  min-height: 86px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e8edf5;
  box-shadow: 0 10px 30px rgba(15,23,42,0.05);
}

.sts-summary-card span {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.sts-summary-card small {
  display: block;
  margin-top: 7px;
  color: var(--sts-muted);
  font-size: 13px;
  font-weight: 850;
}

.sts-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(520px, 1.28fr);
  gap: 16px;
  align-items: start;
}

.sts-card {
  background: var(--sts-card);
  border: 1px solid #e8edf5;
  border-radius: 28px;
  box-shadow: 0 14px 44px rgba(15,23,42,0.06);
  overflow: hidden;
  margin-bottom: 16px;
}

.sts-card-heading,
.sts-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid #eef2f7;
}

.sts-card h3,
.sts-section-head h3,
.sts-modal-card h3 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.08;
  font-weight: 950;
}

.sts-card p,
.sts-section-head p,
.sts-stylist-picker p,
.sts-modal-card p {
  margin: 8px 0 0;
  color: var(--sts-muted);
  font-size: 15px;
  line-height: 1.35;
}

.sts-add-card {
  background: linear-gradient(135deg, var(--sts-purple) 0%, var(--sts-purple-2) 100%);
  color: #fff;
}

.sts-add-card .sts-card-heading {
  border-bottom-color: rgba(255,255,255,0.14);
}

.sts-add-card p,
.sts-add-card label {
  color: rgba(255,255,255,0.86);
}

.sts-type-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px 20px 0;
}

.sts-type-btn {
  min-height: 58px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
  touch-action: manipulation;
}

.sts-type-btn.active {
  background: #fff;
  color: var(--sts-purple);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.sts-add-grid {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 12px;
  padding: 18px 20px 0;
}

.sts-stylist-picker {
  padding: 14px 20px 0;
}

.sts-stylist-picker label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 900;
}

.sts-stylist-picker.hidden {
  display: none;
}

.sts-primary-btn,
.sts-purple-btn,
.sts-secondary-btn,
.sts-checkin-btn,
.sts-complete-btn,
.sts-take-btn,
.sts-icon-btn,
.sts-direct-btn {
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  padding: 0 20px;
  font-size: 17px;
  font-weight: 950;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}

.sts-primary-btn:active,
.sts-purple-btn:active,
.sts-secondary-btn:active,
.sts-checkin-btn:active,
.sts-complete-btn:active,
.sts-take-btn:active,
.sts-direct-btn:active {
  transform: scale(.98);
}

.sts-primary-btn {
  width: calc(100% - 40px);
  margin: 14px 20px 20px;
  background: var(--sts-green);
  color: #fff;
  box-shadow: 0 14px 30px rgba(20,184,122,.24);
}

.sts-purple-btn {
  background: var(--sts-purple);
  color: #fff;
  white-space: nowrap;
}

.sts-secondary-btn {
  background: #eef2f7;
  color: #344054;
}

.sts-section-head > strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 56px;
  border-radius: 18px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 24px;
  font-weight: 950;
}

.sts-queue-list {
  padding: 16px;
  max-height: 540px;
  overflow: auto;
}

.sts-empty {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed #d7deea;
  border-radius: 22px;
  color: #98a2b3;
  font-size: 17px;
  font-weight: 850;
}

.sts-queue-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 22px;
  border: 1px solid #fde68a;
  background: #fffbeb;
}

.sts-queue-item:last-child {
  margin-bottom: 0;
}

.sts-queue-num {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #f59e0b;
  color: #fff;
  font-size: 25px;
  font-weight: 950;
}

.sts-queue-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sts-queue-title strong {
  font-size: 21px;
  line-height: 1.12;
  font-weight: 950;
}

.sts-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.sts-pill.walk_in {
  background: #ecfdf5;
  color: #047857;
  border-color: #bbf7d0;
}

.sts-pill.regular_walk_in {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.sts-pill.regular {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.sts-queue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.sts-mini-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.sts-stylist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.sts-stylist-card {
  position: relative;
  border: 2px solid #e5eaf3;
  border-radius: 26px;
  padding: 16px;
  background: #fff;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.sts-stylist-card.free {
  border-color: rgba(20,184,122,.36);
  box-shadow: inset 0 0 0 1px rgba(20,184,122,.04);
}

.sts-stylist-card.busy {
  border-color: rgba(239,68,68,.36);
  background: #fffafa;
}

.sts-stylist-card.not-checked {
  background: #f8fafc;
}

.sts-stylist-top {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.sts-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--sts-dark);
  color: #fff;
  font-size: 31px;
  font-weight: 950;
}

.sts-stylist-name {
  margin: 0;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.05;
  font-weight: 950;
}

.sts-specialty {
  margin-top: 5px;
  color: var(--sts-muted);
  font-size: 16px;
  font-weight: 800;
}

.sts-status-badge {
  min-width: 78px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.sts-status-badge.free {
  background: var(--sts-green);
}

.sts-status-badge.busy {
  background: var(--sts-red);
}

.sts-status-badge.off {
  background: #667085;
}

.sts-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.sts-stat-box,
.sts-turn-box {
  min-height: 84px;
  padding: 13px;
  border: 1px solid #dfe7f2;
  border-radius: 18px;
  background: #fff;
}

.sts-stat-box strong,
.sts-turn-position {
  display: block;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.sts-stat-box small,
.sts-turn-box small {
  display: block;
  margin-top: 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.sts-checkin-btn {
  width: 100%;
  height: 58px;
  padding: 0 12px;
  background: #111827;
  color: #fff;
  font-size: 16px;
}

.sts-turn-box.checked {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.sts-serving-box {
  min-height: 116px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid #dfe7f2;
  border-radius: 20px;
  background: #fff;
}

.sts-serving-box small {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.sts-serving-box strong {
  display: block;
  margin-top: 10px;
  font-size: 23px;
  font-weight: 950;
}

.sts-time-left {
  display: inline-block;
  margin-top: 10px;
  color: #b42318;
  font-size: 16px;
  font-weight: 950;
}

.sts-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.sts-complete-btn {
  width: 100%;
  background: var(--sts-green);
  color: #fff;
  font-size: 22px;
  min-height: 72px;
}

.sts-take-btn {
  width: 100%;
  background: var(--sts-blue);
  color: #fff;
  min-height: 70px;
  font-size: 20px;
}

.sts-direct-btn {
  width: 100%;
  background: #eef2ff;
  color: #3730a3;
  min-height: 58px;
}

.sts-take-btn:disabled,
.sts-direct-btn:disabled,
.sts-primary-btn:disabled,
.sts-purple-btn:disabled,
.sts-checkin-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.sts-note {
  margin-top: 10px;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.sts-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15,23,42,.56);
}

.sts-modal.active {
  display: flex;
}

.sts-modal-card {
  width: min(560px, 100%);
  max-height: min(820px, 92vh);
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(15,23,42,.24);
}

.sts-report-card {
  width: min(880px, 100%);
}

.sts-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.sts-icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-size: 30px;
  line-height: 1;
}

.sts-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.sts-modal-actions .sts-primary-btn {
  width: 100%;
  margin: 0;
}

.sts-report-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.sts-report-stat {
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
}

.sts-report-stat strong {
  display: block;
  font-size: 25px;
  font-weight: 950;
}

.sts-report-stat small {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-weight: 850;
}

.sts-report-table-wrap {
  overflow: auto;
  margin: 12px 0 20px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
}

.sts-report-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
}

.sts-report-table th,
.sts-report-table td {
  padding: 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
}

.sts-report-table th {
  background: #f8fafc;
  font-weight: 950;
}

.sts-toast {
  position: fixed;
  z-index: 100000;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(18px);
  min-width: 280px;
  max-width: calc(100vw - 36px);
  padding: 14px 18px;
  border-radius: 999px;
  color: #fff;
  background: #111827;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 18px 44px rgba(15,23,42,.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.sts-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sts-toast.success { background: var(--sts-green); }
.sts-toast.warning { background: var(--sts-orange); }
.sts-toast.error { background: var(--sts-red); }

@media (max-width: 1180px) {
  .sts-layout {
    grid-template-columns: 1fr;
  }
  .sts-stylist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .sts-shell {
    padding: 10px;
    border-radius: 0;
  }
  .sts-topbar {
    align-items: stretch;
    flex-direction: column;
    border-radius: 20px;
  }
  .sts-topbar-controls {
    justify-content: stretch;
  }
  .sts-topbar-controls > * {
    flex: 1 1 100%;
  }
  .sts-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sts-summary-grid .sts-summary-card:last-child {
    grid-column: span 2;
  }
  .sts-add-grid,
  .sts-type-toggle,
  .sts-stylist-grid,
  .sts-stats-row,
  .sts-modal-actions,
  .sts-report-stats {
    grid-template-columns: 1fr;
  }
  .sts-stylist-top {
    grid-template-columns: 64px 1fr;
  }
  .sts-status-badge {
    grid-column: span 2;
    width: 100%;
  }
  .sts-avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }
  .sts-card-heading,
  .sts-section-head {
    flex-direction: column;
  }
  .sts-purple-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .sts-queue-item {
    grid-template-columns: 56px 1fr;
    padding: 12px;
  }
  .sts-queue-num {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }
  .sts-queue-title {
    flex-direction: column;
  }
  .sts-primary-btn,
  .sts-purple-btn,
  .sts-secondary-btn,
  .sts-checkin-btn,
  .sts-complete-btn,
  .sts-take-btn,
  .sts-direct-btn {
    min-height: 62px;
  }
}

.sts-hidden {
  display: none !important;
}

.sts-login-card {
  min-height: min(760px, 90vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: linear-gradient(135deg, rgba(153,35,250,.10), rgba(20,184,122,.10));
  border-radius: 28px;
}

.sts-login-inner {
  width: min(680px, 100%);
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 30px;
  padding: clamp(24px, 5vw, 42px);
  box-shadow: 0 22px 70px rgba(15,23,42,.12);
}

.sts-login-inner h2 {
  margin: 4px 0 8px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.02;
  font-weight: 950;
}

.sts-login-inner p,
.sts-login-help,
.sts-outlet-label {
  color: var(--sts-muted);
  font-weight: 700;
}

.sts-login-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin: 22px 0 14px;
}

.sts-login-inner .sts-primary-btn {
  width: 100%;
  min-height: 68px;
  font-size: 20px;
}

.sts-login-help {
  margin-top: 14px;
  font-size: 14px;
  text-align: center;
}

.sts-outlet-label {
  margin: 8px 0 0;
  font-size: 15px;
}

@media (max-width: 640px) {
  .sts-login-card {
    padding: 14px;
    border-radius: 20px;
  }

  .sts-login-grid {
    grid-template-columns: 1fr;
  }
}
