.seller-app-shell .seller-main .section.svc-page {
  padding: clamp(18px, 3vw, 32px) clamp(12px, 2.4vw, 20px);
}

.svc-page__wrap {
  width: min(1200px, 100%);
  margin-inline: auto;
}

.svc-panel {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 18px;
  padding: clamp(18px, 2.5vw, 28px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 28px -6px rgba(15, 23, 42, 0.08);
  font-family: var(--font-sans, "STC Forward", "Tajawal", "Segoe UI", Tahoma, sans-serif);
}

.svc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e4e4e7;
}

.svc-head__eyebrow {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #71717a;
}

.svc-head__title {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  line-height: 1.15;
}

.svc-head__tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}

.svc-search {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0;
  justify-content: start;
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
}

.svc-search.is-open {
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.svc-head__tools .svc-search__toggle,
.seller-app-shell .svc-head__tools .btn.svc-head__add {
  box-sizing: border-box;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.svc-search__toggle {
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #52525b;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.svc-search__toggle:hover:not([aria-expanded="true"]) {
  transform: translateY(-2px);
  border-color: #d4d4d8;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.svc-search__toggle[aria-expanded="true"] {
  border-color: #b5b5bc;
}

.svc-search:not(.is-open) .svc-search__toggle {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

#serviceSearch.svc-search__input,
#orderSearch.svc-search__input,
#convSearch.svc-search__input,
#paymentSearch.svc-search__input,
#subscriptionSearch.svc-search__input {
  align-self: center;
  max-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  font-size: 0.875rem;
  transition:
    max-width 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease,
    padding 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.svc-search:not(.is-open) #serviceSearch.svc-search__input,
.svc-search:not(.is-open) #orderSearch.svc-search__input,
.svc-search:not(.is-open) #convSearch.svc-search__input,
.svc-search:not(.is-open) #paymentSearch.svc-search__input,
.svc-search:not(.is-open) #subscriptionSearch.svc-search__input {
  pointer-events: none;
}

.svc-search.is-open #serviceSearch.svc-search__input,
.svc-search.is-open #orderSearch.svc-search__input,
.svc-search.is-open #convSearch.svc-search__input,
.svc-search.is-open #paymentSearch.svc-search__input,
.svc-search.is-open #subscriptionSearch.svc-search__input {
  max-width: min(320px, 72vw);
  opacity: 1;
  padding: 11px 14px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.svc-search__toggle-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: inherit;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.svc-search.is-open .svc-search__toggle {
  border-color: #0a0a0a;
  color: #0a0a0a;
}

.svc-search.is-open .svc-search__toggle-icon {
  transform: scale(1.06);
}

.svc-search__input::placeholder {
  color: #a1a1aa;
}

.svc-head__add {
  border: none;
  line-height: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.seller-app-shell .btn.svc-head__add {
  font-size: 0 !important;
  line-height: 0 !important;
  padding: 0 !important;
}

.svc-head__add-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: inherit;
  pointer-events: none;
}

.seller-app-shell .svc-head__tools .btn.svc-head__add:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.svc-table-box {
  overflow: visible;
}

.svc-table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  background: #fff;
}

.svc-table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  overflow: visible;
}

.svc-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fafafa;
  border-bottom: 1px solid #e4e4e7;
  font-size: 0.68rem;
  font-weight: 800;
  color: #3f3f46;
  letter-spacing: 0.05em;
  text-align: right;
  padding: 12px 14px;
  white-space: nowrap;
}

.svc-th--main {
  width: 26%;
  min-width: 200px;
}

.svc-th--actions {
  width: 72px;
  text-align: center !important;
}

.service-table-row td {
  vertical-align: middle;
  border-bottom: 1px solid #ececee;
  padding: 14px 14px;
  font-size: 0.875rem;
  color: #0a0a0a;
  background: #fff;
  transition: background 0.12s ease;
}

.service-table-row:last-child td {
  border-bottom: 0;
}

.service-table-row:hover td {
  background: #fafafa;
}

.service-table-row:has(.svc-td--actions.is-actions-open),
.service-table-row:has(.svc-td--order-actions.is-actions-open) {
  position: relative;
  z-index: 10040;
}

.svc-td {
  min-width: 0;
}

.svc-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.svc-main-text {
  flex: 1;
  min-width: 0;
}

.svc-td--meta,
.svc-td--id,
.svc-td--date {
  color: #27272a;
  font-size: 0.84rem;
  line-height: 1.5;
}

.svc-td--id {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.svc-td--date {
  font-variant-numeric: tabular-nums;
  color: #3f3f46;
}

.svc-td--price {
  font-weight: 800;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.svc-price.svc-price--sar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-variant-numeric: tabular-nums lining-nums;
  font-family: var(--font-sans, "STC Forward", "Tajawal", sans-serif);
}

.svc-price-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  flex-wrap: nowrap;
  direction: ltr;
}

.svc-price--sar .sar-symbol {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.svc-price--sar .sar-symbol__img {
  display: block;
  width: 0.95em;
  height: 1.08em;
  object-fit: contain;
  object-position: center;
}

.svc-price--sar .svc-price__amount {
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  color: inherit;
}

.svc-td--status {
  white-space: nowrap;
}

.service-title--table {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0a0a0a;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.service-cover {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  min-height: 48px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e4e4e7;
  background: #f4f4f5;
  box-shadow:
    inset 0 0 0 1px rgb(228 228 231 / 0.85),
    0 2px 6px rgba(15, 23, 42, 0.07);
}

.seller-app-shell .svc-table .service-cover {
  height: 48px;
}

.service-cover.service-cover--table.is-empty {
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  color: #71717a;
}

.service-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.svc-td--actions {
  position: relative;
  width: 72px;
  text-align: center;
  vertical-align: middle;
}

.svc-td--actions.is-actions-open {
  z-index: 10050;
}

.service-menu {
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.service-menu.is-open {
  z-index: 10080;
}

.service-menu-trigger {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #52525b;
  display: inline-grid;
  place-items: center;
  line-height: 0;
  cursor: pointer;
}

.service-menu-trigger:hover {
  background: #f5f5f6;
  border-color: #d4d4d8;
}

.service-menu-list {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  min-width: 164px;
  max-width: min(260px, calc(100vw - 24px));
  padding: 6px;
  background: var(--s-surface, #fff);
  border: 1px solid var(--s-border, #e4e4e7);
  border-radius: 10px;
  box-shadow: 0 4px 22px rgba(15, 23, 42, 0.12);
  display: none;
  z-index: 10075;
}

.service-menu.is-open .service-menu-list {
  display: grid;
  gap: 4px;
}

.service-menu-list.is-floating {
  display: grid !important;
  gap: 4px;
  margin: 0;
  min-width: 164px;
}

.service-menu-item {
  display: block;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 0.78rem;
  color: #0a0a0a;
  text-align: right;
}

.service-menu-item:hover {
  background: #f4f4f5;
}

.service-menu-item.danger {
  color: var(--s-muted, #71717a);
}

.service-menu-item.danger:hover {
  background: var(--s-row-hover, #e4e4e7);
}

.status-pill.status-approved,
.status-pill.status-rejected,
.status-pill.status-pending {
  font-size: 0.7rem;
  padding: 5px 12px;
  font-weight: 800;
}

.service-reject-row td {
  padding: 0 14px 12px !important;
  border-bottom: 1px solid #ececee !important;
  background: #fff !important;
}

.service-reject-row:hover td {
  background: #fff !important;
}

.svc-td--reject-wrap {
  padding-top: 0 !important;
}

.service-reject-note {
  padding: 10px 12px;
  margin: 0;
  border-radius: 10px;
  border: 1px dashed var(--s-border, #e4e4e7);
  background: var(--s-surface2, #f4f4f5);
  color: var(--s-text, #0a0a0a);
  font-size: 0.8rem;
  line-height: 1.5;
}

.service-reject-note span {
  font-weight: 700;
  margin-inline-end: 6px;
}

.svc-foot {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #ececee;
}

.svc-foot__meta {
  font-size: 0.875rem;
  font-weight: 600;
  color: #52525b;
}

.svc-foot__meta strong {
  font-variant-numeric: tabular-nums;
  color: #0a0a0a;
}

@media (prefers-reduced-motion: reduce) {
  #serviceSearch.svc-search__input,
  #orderSearch.svc-search__input,
  #convSearch.svc-search__input,
  #paymentSearch.svc-search__input,
  #subscriptionSearch.svc-search__input {
    transition: none;
  }

  .svc-head__add:hover,
  .svc-search__toggle:hover {
    transform: none !important;
  }

  .svc-search.is-open .svc-search__toggle-icon {
    transform: none !important;
  }

  .svc-search:not(.is-open) #serviceSearch.svc-search__input,
  .svc-search:not(.is-open) #orderSearch.svc-search__input,
  .svc-search:not(.is-open) #paymentSearch.svc-search__input,
  .svc-search:not(.is-open) #subscriptionSearch.svc-search__input {
    max-width: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    pointer-events: none;
  }

  .svc-search.is-open #serviceSearch.svc-search__input,
  .svc-search.is-open #orderSearch.svc-search__input,
  .svc-search.is-open #convSearch.svc-search__input,
  .svc-search.is-open #paymentSearch.svc-search__input,
  .svc-search.is-open #subscriptionSearch.svc-search__input {
    max-width: min(260px, 70vw) !important;
    opacity: 1 !important;
    padding: 11px 14px !important;
  }
}

@media (max-width: 980px) {
  .svc-table {
    min-width: 880px;
  }
}

@media (max-width: 760px) {
  .svc-head__tools {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }

  /* Status filter full width on its own row (above search in DOM order after order) */
  .svc-head__tools .svc-filter {
    order: -1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .svc-search {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    justify-content: start;
  }

  .svc-search:not(.is-open) {
    flex: 0 0 auto;
    width: 100%;
  }

  .svc-search.is-open {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }

  .svc-search.is-open #serviceSearch.svc-search__input,
  .svc-search.is-open #orderSearch.svc-search__input,
  .svc-search.is-open #convSearch.svc-search__input,
  .svc-search.is-open #paymentSearch.svc-search__input,
  .svc-search.is-open #subscriptionSearch.svc-search__input {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: 0;
  }

  .svc-head__add {
    flex-shrink: 0;
    align-self: flex-start;
  }

  .svc-head__tools > .btn.ghost,
  .svc-head__tools > a.btn {
    align-self: flex-start;
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .svc-search.is-open #serviceSearch.svc-search__input,
  .svc-search.is-open #orderSearch.svc-search__input,
  .svc-search.is-open #convSearch.svc-search__input,
  .svc-search.is-open #paymentSearch.svc-search__input,
  .svc-search.is-open #subscriptionSearch.svc-search__input {
    max-width: none !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 0 !important;
  }
}
