:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f1f5f9;
}

* { box-sizing: border-box; }

body.seller-page {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.seller-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
}

.seller-header__row {
  max-width: min(900px, 100%);
  margin: 0 auto;
  padding: 14px max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.seller-brand { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.seller-brand__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.seller-header__right { display: flex; align-items: center; gap: 12px; }
.seller-who { color: var(--muted); font-size: 14px; }

.seller-login-top {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.seller-login-top__inner {
  max-width: min(900px, 100%);
  margin: 0 auto;
  padding: 18px max(16px, env(safe-area-inset-left, 0px)) 22px;
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.seller-login-top h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.seller-login-top__form {
  max-width: 420px;
  margin-top: 12px;
}

.seller-main { max-width: min(900px, 100%); margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-left, 0px)) calc(60px + env(safe-area-inset-bottom, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); box-sizing: border-box; }

input, select, textarea { font-size: 16px; }

.seller-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px rgba(15,23,42,.04);
}
.seller-card h1 { margin: 0 0 6px; font-size: 1.5rem; }
.seller-card h2 { margin: 0; font-size: 1.2rem; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field textarea, .field select {
  padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; width: 100%;
}
.password-field { width: 100%; }
.password-field input { width: 100%; }
.password-show-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-dark);
  cursor: pointer;
  user-select: none;
}
.password-show-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
  cursor: pointer;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field--check { margin-bottom: 10px; }
.check-line {
  display: flex; align-items: flex-start; gap: 10px;
  font-weight: 600; font-size: 14px; cursor: pointer;
}
.check-line input { width: auto; margin-top: 3px; flex: none; }
.check-line span { font-weight: 600; }
#variantFields { margin-bottom: 14px; }

.field-label {
  font-weight: 600;
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

.listing-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.listing-type--three {
  grid-template-columns: 1fr 1fr 1fr;
}

.listing-type__option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 500;
}

.listing-type__option:has(input:checked) {
  border-color: #0f766e;
  background: #f0fdfa;
}

.listing-type__option input {
  width: auto;
  margin-top: 3px;
  flex: none;
}

.listing-type__option strong {
  display: block;
  font-size: 0.95rem;
}

.listing-type__option small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.35;
}

.status-badge--service {
  background: #ecfdf5;
  color: #0f766e;
}

.status-badge--goods {
  background: #f1f5f9;
  color: #475569;
}

@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .listing-type,
  .listing-type--three { grid-template-columns: 1fr; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 10px; border: none; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-gray { background: #e2e8f0; color: #0f172a; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn:disabled { opacity: .6; cursor: default; }

.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }

.msg { font-size: 14px; font-weight: 600; margin: 8px 0 0; }
.msg--ok { color: #0e6b3a; }
.msg--err { color: #b00020; }
.seller-music {
  margin-top: 0.55rem;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.seller-music__intro {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}
.seller-music__checks {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.seller-music__check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
}
.seller-music__check input {
  width: auto;
  margin: 0;
}
.enq-music-brief {
  margin: 10px 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
}
.enq-music-brief__title {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f766e;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.enq-music-brief__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}
.enq-music-brief__chip {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #99f6e4;
  font-size: 0.8rem;
  font-weight: 600;
  color: #134e4a;
}
.enq-music-brief__meta {
  margin: 0;
  font-size: 0.85rem;
  color: #334155;
  white-space: pre-wrap;
}
.field-hint {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #8a4b00;
  background: #fff6e8;
  border: 1px solid #f0d4a8;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}

.image-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.image-preview__item { position: relative; width: 78px; height: 78px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #f8fafc; }
.image-preview__item img { width: 100%; height: 100%; object-fit: cover; }
.image-preview__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 3;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-preview__badge {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  padding: 2px 6px;
  line-height: 1.2;
}
.image-preview__style {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  background: rgba(15, 118, 110, 0.92);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.image-preview__style--num { background: rgba(15, 23, 42, 0.55); }
.field--styles { margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--border); }
.style-hint--warn { color: #b45309; font-weight: 600; }
.style-hint--ok { color: #0e6b3a; }
.row--compact { margin-top: 8px; }

.products-list { display: flex; flex-direction: column; gap: 12px; }
.product-item {
  display: flex; gap: 12px; align-items: center; padding: 12px;
  border: 1px solid var(--border); border-radius: 12px;
}
.product-item__thumb { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; background: #f1f5f9; flex: 0 0 auto; }
.product-item__body { flex: 1; min-width: 0; }
.product-item__title { font-weight: 700; }
.product-item__meta { color: var(--muted); font-size: 13px; }
.product-item__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.product-item__stock {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.product-item__stock-label { font-weight: 600; }
.product-item__stock-select {
  min-width: 7.5rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: #166534;
}
.product-item__stock-select.is-low { color: #b45309; border-color: #fbbf24; }
.product-item__stock-select.is-out { color: #b91c1c; border-color: #fca5a5; }

.status-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-badge--pending { background: #fef3c7; color: #92400e; }
.status-badge--approved { background: #dcfce7; color: #166534; }
.status-badge--rejected { background: #fee2e2; color: #b91c1c; }

.empty { text-align: center; color: var(--muted); padding: 24px; border: 1px dashed var(--border); border-radius: 12px; }

.flash-deal-fields {
  margin-top: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}
.flash-deal-fields .row {
  margin-bottom: 0.35rem;
}
#pFlashClearBtn {
  margin: 0.35rem 0 0.5rem;
}

/* Our work — nested under Store about */
.store-about-work {
  margin-top: 1.35rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.store-about-work__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
}

/* Our work gallery editor */
.store-work-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  margin-top: 0.65rem;
}
.store-work-preview__item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.store-work-preview__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
}
.store-work-preview__cap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
}
.store-work-preview__cap input {
  width: 100%;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.8125rem;
}
.store-work-preview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

/* Latest payments */
.payments-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.pay-line {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 0.8125rem;
  line-height: 1.4;
}
.pay-line--service {
  border-color: #fed7aa;
  background: #fffbeb;
}
.pay-line__kind {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: #f1f5f9;
}
.pay-line--service .pay-line__kind {
  background: #ffedd5;
  color: #9a3412;
}
.pay-line__text {
  min-width: 0;
  color: #0f172a;
  word-break: break-word;
}

/* Customer inquiries */
.enquiries-list { display: flex; flex-direction: column; gap: 10px; }
.enquiry-item {
  padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff;
}
.enquiry-item--new { border-color: #99f6e4; background: #f0fdfa; }
.enquiry-item__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.enquiry-item__meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.enquiry-item__msg { margin-top: 8px; white-space: pre-wrap; }
.enquiry-item__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* inquiry thread */
.enq-thread { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.enq-msg { max-width: 85%; padding: 7px 10px; border-radius: 12px; font-size: 14px; }
.enq-msg--them { align-self: flex-start; background: #f1f5f9; border-bottom-left-radius: 4px; }
.enq-msg--me { align-self: flex-end; background: #ccfbf1; border-bottom-right-radius: 4px; }
.enq-msg--bot {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-bottom-left-radius: 4px;
}
.enq-msg--bot .enq-msg__who { color: #c2410c; font-weight: 600; }
.enq-msg__who { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.enq-msg__text { white-space: pre-wrap; }
.enq-reply { margin-top: 8px; }
.enq-reply__box { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; font: inherit; }
.enq-reply__msg.msg { margin-left: 4px; }
.enq-job {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0.65rem 0 0.35rem;
}
.enq-job__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.enq-job__select {
  font: inherit;
  font-size: 0.875rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  min-width: 9.5rem;
}
.enq-job__badge,
.enq-job-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}
.enq-job__badge--open,
.enq-job-badge--open { background: #e2e8f0; color: #334155; }
.enq-job__badge--quoted,
.enq-job-badge--quoted { background: #fef3c7; color: #92400e; }
.enq-job__badge--visit_booked,
.enq-job-badge--visit_booked { background: #dbeafe; color: #1e40af; }
.enq-job__badge--in_progress,
.enq-job-badge--in_progress { background: #ffedd5; color: #9a3412; }
.enq-job__badge--done,
.enq-job-badge--done { background: #dcfce7; color: #166534; }
.enq-job__badge--cancelled,
.enq-job-badge--cancelled { background: #fee2e2; color: #991b1b; }
.enq-job__quote {
  font-size: 0.85rem;
  color: #9a3412;
}
.enq-job__visit {
  font-size: 0.85rem;
  color: #1e40af;
  width: 100%;
}
.enq-pay__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}
.enq-pay__badge--unpaid { background: #fee2e2; color: #991b1b; }
.enq-pay__badge--awaiting,
.enq-pay__badge--awaiting_advance { background: #fef3c7; color: #92400e; }
.enq-pay__badge--advance_paid { background: #dbeafe; color: #1e40af; }
.enq-pay__badge--awaiting_balance { background: #ffedd5; color: #9a3412; }
.enq-pay__badge--paid { background: #dcfce7; color: #166534; }
.enq-job__pay-hint {
  flex: 1 1 100%;
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #92400e;
}
.enq-seller-payout {
  flex: 1 1 100%;
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #86efac;
  font-size: 0.85rem;
  color: #166534;
}
.enq-seller-payout--ready {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}
.enq-seller-payout .muted {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #64748b;
}
.enq-visit-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.enq-visit-modal__card {
  background: #fff;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  width: min(100%, 360px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
}
.enq-visit-modal__card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.enq-visit-modal__card p {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: #64748b;
}
.enq-visit-modal__label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}
.enq-visit-modal__input {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.enq-visit-modal__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

@media (max-width: 620px) {
  .row { grid-template-columns: 1fr; }
  .product-item { flex-wrap: wrap; }
}
