.sms-page { min-height: 100vh; background: #f4f7fa; }

.sms-shell {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.sms-config {
  border-right: 1px solid var(--line);
  background: #fff;
}

.sms-config-head,
.sms-step { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.sms-config-head { position: relative; }
.sms-config-head h1 { margin: 4px 0 0; font-size: 28px; }
.prototype-badge { position: absolute; top: 22px; right: 22px; padding: 5px 8px; border-radius: 999px; background: #fff4db; color: #9a6700; font-size: 11px; font-weight: 900; }
.prototype-badge.live { background: #e8f8ee; color: #167044; }

.sms-step-title { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sms-step-title > span { color: var(--muted); font-size: 12px; }
.sms-search { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; margin-bottom: 10px; padding: 0 10px; border-radius: 6px; background: #f1f5f9; color: var(--muted); }
.sms-search input { min-height: 38px; border: 0; outline: 0; background: transparent; font: inherit; }
.sms-option-list { display: grid; gap: 5px; max-height: 245px; overflow: auto; }
[data-service-list] { max-height: 184px; }
.country-list { max-height: 210px; }

.sms-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.sms-option:hover { background: #f8fafc; }
.sms-option.active { border-color: #b9d3ff; background: #eef5ff; }
.sms-option > span:nth-child(2) { display: grid; gap: 3px; }
.sms-option small { color: var(--muted); font-size: 11px; }
.option-check { color: #1769e0; font-weight: 900; }
.option-price { color: var(--red); font-size: 12px; font-weight: 900; white-space: nowrap; }

.service-icon { display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; color: #fff; font-size: 18px; font-weight: 900; }
.service-icon img { display: block; width: 18px; height: 18px; object-fit: contain; }
.service-icon.facebook { background: #1877f2; }
.service-icon.whatsapp { background: #20b958; }
.service-icon.instagram { background: #db3f75; }
.service-icon.twitter { background: #111827; }
.service-icon.google { background: #ff0033; }
.service-icon.tiktok { background: #111827; }
.service-icon.telegram { background: #249bd7; }
.service-icon.default { background: #64748b; }
.country-flag {
  display: grid;
  width: 28px;
  height: 22px;
  flex: 0 0 28px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d9dee7;
  border-radius: 3px;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
}
.country-flag img { display: block; width: 100%; height: 100%; object-fit: cover; }

.sms-checkout { background: linear-gradient(180deg, #fff 0%, #f8fbff 100%); }
.sms-custom-pricing[hidden] { display: none; }
.sms-price-list { max-height: 190px; margin-bottom: 10px; overflow-y: auto; border: 1px solid #e1e7ef; border-radius: 9px; background: #fff; }
.sms-price-tier { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; min-height: 54px; padding: 8px 10px; border: 0; border-bottom: 1px solid #edf0f4; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.sms-price-tier:last-child { border-bottom: 0; }
.sms-price-tier:hover { background: #f7faff; }
.sms-price-tier.active { background: #eef5ff; }
.sms-price-tier > span:nth-child(2) { display: grid; gap: 2px; }
.sms-price-tier strong { font-size: 14px; }
.sms-price-tier small { color: var(--muted); font-size: 10px; }
.price-radio { width: 18px; height: 18px; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; }
.sms-price-tier.active .price-radio { border: 5px solid #1769e0; }
.price-stock { color: #526276; font-size: 11px; white-space: nowrap; }
.sms-price-tier.active .price-stock { color: #1769e0; font-weight: 900; }
.sms-checkout dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.sms-checkout dl > div { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid #e4eaf2; border-radius: 9px; background: #fff; }
.sms-checkout dt { color: var(--muted); font-size: 11px; }
.sms-checkout dd { overflow: hidden; margin: 0; color: var(--ink); font-size: 14px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.sms-rule { position: relative; margin: 12px 0; padding: 10px 12px 10px 42px; border-radius: 8px; background: #eef5ff; color: #526276; font-size: 11px; line-height: 1.6; }
.sms-rule::before { position: absolute; top: 10px; left: 10px; padding: 2px 5px; border-radius: 4px; background: #1769e0; color: #fff; content: "规则"; font-size: 9px; font-weight: 900; }
.sms-buy { display: flex; width: 100%; min-height: 50px; padding: 0 16px; align-items: center; justify-content: space-between; border-radius: 9px; box-shadow: 0 7px 16px rgba(238, 73, 58, .16); }
.sms-buy strong { font-size: 17px; }
.sms-custom-price-toggle { width: 100%; min-height: 38px; margin-top: 9px; border: 0; border-radius: 9px; background: #eeeaff; color: #7150da; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.sms-custom-price-toggle:hover { background: #e4defd; }
.sms-custom-price-toggle:disabled { cursor: not-allowed; opacity: .48; }
.sms-buy-status { min-height: 20px; margin: 10px 0 0; color: var(--red); font-size: 12px; }
.sms-list-message { margin: 8px; color: var(--muted); font-size: 12px; }

.sms-workspace { min-width: 0; padding: 38px clamp(24px, 4vw, 64px) 90px; }
.sms-workspace-head { display: flex; gap: 20px; align-items: end; justify-content: space-between; }
.sms-workspace-head h2 { margin: 4px 0 0; font-size: 32px; }
.sms-workspace-actions { display: flex; gap: 8px; }
.sms-workspace-actions input { width: min(320px, 40vw); min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: 20px; cursor: pointer; }
.icon-button.danger { color: #c4342d; }
.icon-button:disabled { cursor: not-allowed; opacity: 0.42; }

.sms-summary { display: flex; gap: 10px; margin: 24px 0 16px; }
.sms-summary span { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font-size: 12px; }
.sms-summary strong { color: var(--ink); }
.number-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.number-table-head,
.number-row { display: grid; grid-template-columns: minmax(260px, 1.45fr) minmax(150px, .8fr) 120px minmax(160px, .8fr) 110px; gap: 14px; align-items: center; min-width: 900px; }
.number-table-head { padding: 12px 16px; background: #eaf0ff; color: #31415a; font-size: 12px; font-weight: 900; }
.number-row { padding: 16px; border-top: 1px solid var(--line); }
.number-row > div { display: grid; gap: 5px; }
.number-row small { color: var(--muted); }
.number-primary { grid-template-columns: 34px minmax(0, 1fr) !important; align-items: center; }
.phone-line, .verification-code { display: flex; gap: 7px; align-items: center; }
.phone-value { display: flex; gap: 5px; align-items: baseline; white-space: nowrap; }
.phone-dial { color: #1769e0; }
.inline-copy { display: grid; width: 25px; height: 25px; flex: 0 0 25px; padding: 0; place-items: center; border: 0; border-radius: 5px; background: #eef3ff; cursor: pointer; }
.inline-copy:hover { background: #dfe9ff; }
.inline-copy img { width: 14px; height: 14px; }
.inline-copy.copied { position: relative; background: #22a85a; }
.inline-copy.copied img { opacity: 0; }
.inline-copy.copied::after { position: absolute; color: #fff; content: "✓"; font-size: 14px; font-weight: 900; }
.order-country { grid-template-columns: 30px minmax(0, 1fr) !important; align-items: center; }
.order-country > div { display: grid; gap: 5px; }
.order-country .country-flag { width: 26px; height: 19px; }
.number-status { width: fit-content; padding: 5px 8px; border: 1px solid #d2d8e2; border-radius: 999px; font-size: 11px; font-weight: 900; }
.number-status.pending::before { margin-right: 5px; color: #64748b; content: "●"; }
.number-status.completed { border-color: #b7e2c7; background: #edf9f1; color: #167044; }
.number-status.cancelled, .number-status.expired { border-color: #f0d0cd; background: #fff3f2; color: #a6322d; }
.verification-code strong { color: #1769e0; font-size: 13px; }
.number-actions { display: flex !important; gap: 8px; }
.sms-empty-note { margin-top: 14px; padding: 14px; border: 1px dashed #cbd5e1; border-radius: 6px; background: rgba(255,255,255,.58); }
.sms-empty-note p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.sms-toast {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 1200;
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 210px;
  padding: 12px 16px;
  border: 1px solid #b9e3c9;
  border-radius: 10px;
  background: #fff;
  color: #176b3a;
  box-shadow: 0 14px 35px rgba(15, 23, 42, .18);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .18s ease, transform .18s ease;
}
.sms-toast.visible { opacity: 1; transform: translateY(0); }
.sms-toast.error { border-color: #f2c8c4; color: #a6322d; }
.sms-toast-icon { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #22a85a; color: #fff; font-weight: 900; }
.sms-toast.error .sms-toast-icon { background: #dc4438; }

.sms-confirm-overlay { position: fixed; inset: 0; z-index: 1150; display: grid; place-items: center; padding: 18px; background: rgba(15, 23, 42, .58); backdrop-filter: blur(3px); }
.sms-confirm-dialog { position: relative; width: min(420px, 100%); padding: 28px; border-radius: 14px; background: #fff; text-align: center; box-shadow: 0 28px 80px rgba(15, 23, 42, .28); }
.sms-confirm-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f1f5f9; color: #64748b; font-size: 20px; cursor: pointer; }
.sms-confirm-symbol { display: grid; width: 52px; height: 52px; margin: 0 auto 14px; place-items: center; border-radius: 50%; background: #e9f1ff; color: #1769e0; font-size: 24px; font-weight: 900; }
.sms-confirm-symbol.danger { background: #fff0ee; color: #d63e34; }
.sms-confirm-dialog h3 { margin: 0; font-size: 22px; }
.sms-confirm-dialog > p { margin: 12px 0 0; color: var(--muted); line-height: 1.6; }
.sms-confirm-dialog .sms-confirm-number { color: var(--ink); font-size: 18px; font-weight: 900; }
.sms-confirm-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 22px; }
.sms-confirm-actions .button { min-height: 44px; }
.button.danger { border-color: #dc4438; background: #dc4438; color: #fff; }

@media (max-width: 980px) {
  .sms-shell { grid-template-columns: 1fr; }
  .sms-config { border-right: 0; }
  .sms-option-list { max-height: 220px; }
  .sms-workspace { padding: 28px 18px 90px; }
}

@media (max-width: 600px) {
  .sms-config-head, .sms-step { padding: 18px 14px; }
  .sms-workspace-head { align-items: stretch; flex-direction: column; }
  .sms-workspace-actions input { width: 100%; }
  .sms-summary { flex-wrap: wrap; }
  .sms-toast { top: 72px; right: 14px; left: 14px; min-width: 0; }
  .sms-confirm-actions { grid-template-columns: 1fr; }
}
