.sms-shell { max-width: 1160px; }
.sms-home-panel[hidden] { display: none !important; }
.platform-tabs #sms-home-toggle[hidden] { display: none !important; }
.sms-home-panel { margin-top: 20px; }
.sms-embedded { max-width: none; }
.sms-embedded .tool-hero { color: var(--ink); background: transparent; box-shadow: none; padding: 0; margin-bottom: 18px; }
.sms-embedded .tool-hero h2 { margin: 0; font-size: 26px; }
.sms-embedded .tool-hero .eyebrow, .sms-embedded .tool-hero .subtitle { color: var(--muted); }
.sms-embedded .sms-standalone-nav { display: none; }
.sms-shell .sms-notice-header h1, .sms-shell .sms-notice-header h2 { margin: 0; font-size: 24px; }
.sms-usage-notice { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; font-size: 14px; }
.sms-notice-header > div { min-width: 0; }
.sms-notice-emphasis { display: block; margin-bottom: 7px; color: #fde68a; font-size: 19px; font-weight: 800; }
.sms-embedded .sms-notice-header { padding: 18px 22px; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; }
.sms-embedded .sms-notice-emphasis { color: #9a3412; }
.platform-tabs .icon-sms { background: #2563eb; color: #fff; }
.sms-purchase-guide { margin-top: 15px; }
.sms-purchase-guide h3 { margin-top: 0; }
.sms-purchase-guide .member-actions { margin-top: 10px; }
.sms-purchase-guide p { margin-top: 0; }
.sms-shell .sms-purchase-guide a.button-primary { color: #fff; text-decoration: none; }
.sms-shell [hidden], .sms-admin [hidden] { display: none !important; }
.sms-heading, .sms-purchase-row, .sms-filter, .sms-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.sms-heading h2 { margin-bottom: 0; }
.sms-heading > button { flex: 0 0 auto; white-space: nowrap; }
.sms-heading > p { flex: 1 1 220px; }
.sms-current #current-summary, .sms-current [data-sms-id="current-summary"] { overflow-wrap: anywhere; }
.sms-current .sms-order-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.sms-selection { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.sms-picker { position: relative; min-width: 0; }
.sms-shell .sms-picker { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; font-size: 14px; font-weight: 600; }
.sms-picker > input { text-overflow: ellipsis; padding-right: 28px; background: #fff; }
.sms-picker > label::after { content: "⌄"; position: absolute; right: 12px; bottom: 12px; pointer-events: none; }
.sms-picker-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; max-height: min(300px, 50vh); overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; box-shadow: 0 10px 25px #0f172a1a; padding: 5px; }
.sms-picker-list button { display: block; width: 100%; padding: 11px; border: 0; border-radius: 6px; background: transparent; color: #0f172a; text-align: left; font: inherit; font-size: 14px; font-weight: 400; cursor: pointer; overflow-wrap: anywhere; }
.sms-picker-list button:hover, .sms-picker-list button.is-focused { background: #eff6ff; }
.sms-picker-list button[aria-selected="true"] { color: #1d4ed8; font-weight: 700; }
.sms-picker-list small { display: block; margin-top: 4px; color: #64748b; font-size: 12px; font-weight: 400; }
.sms-picker-list .sms-empty { padding: 12px; margin: 0; font-size: 13px; }
.sms-purchase-row { margin-top: 10px; padding: 19px 22px; border: 1px solid #dbeafe; background: #f8fbff; border-radius: 12px; }
.sms-price { display: grid; gap: 6px; }
.sms-price span, .sms-price small { color: #64748b; font-size: 13px; }
.sms-price strong { color: #2057b7; font-size: 32px; letter-spacing: -.7px; }
.sms-purchase-row .button { min-height: 48px; min-width: 160px; font-size: 16px; }
.sms-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.sms-result { padding: 20px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; min-width: 0; }
.sms-result > span { color: #64748b; font-size: 13px; }
.sms-result > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.sms-result strong { font-size: 25px; font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.sms-result .button { flex: 0 0 auto; }
.sms-message-text { padding: 14px; background: #f0fdf4; border-radius: 9px; overflow-wrap: anywhere; white-space: pre-wrap; }
.sms-repeat { margin: 18px 0; padding: 16px; border: 1px solid #bfdbfe; background: #f8fbff; border-radius: 10px; }
.sms-repeat p:last-child { margin-bottom: 0; }
.sms-message-history { margin: 20px 0; }
.sms-message-history h3 { font-size: 16px; }
.sms-message-history article { padding: 12px 15px; margin-top: 8px; border: 1px solid #e2e8f0; border-radius: 9px; overflow-wrap: anywhere; }
.sms-message-history article > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sms-message-history strong { font: 700 20px ui-monospace, Consolas, monospace; }
.sms-message-history small { color: #64748b; font-size: 12px; }
.sms-message-history p { white-space: pre-wrap; margin: 8px 0 0; font-size: 13px; }
.sms-countdown { color: #475569; font-variant-numeric: tabular-nums; }
.sms-badge { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 20px; background: #eff6ff; color: #1d4ed8; font-size: 12px; white-space: nowrap; }
.sms-badge[data-status="success"] { background: #dcfce7; color: #166534; }
.sms-badge[data-status="refunded"], .sms-badge[data-status="closed"] { background: #f1f5f9; color: #475569; }
.sms-badge[data-status="manual_review"], .sms-badge[data-status="refund_check"] { background: #fff7ed; color: #9a3412; }
.sms-filter { justify-content: flex-start; margin: 18px 0; font-size: 13px; }
.member-shell .sms-filter select { width: auto; max-width: 100%; padding: 8px 10px; }
.sms-order-list { display: grid; gap: 10px; }
.sms-order-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; }
.sms-order-card p { margin: 5px 0; }
.sms-order-card small { color: #64748b; display: block; margin-top: 8px; overflow-wrap: anywhere; }
.sms-order-card .sms-order-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.sms-pagination { justify-content: center; margin-top: 20px; font-size: 13px; color: #64748b; }
.sms-empty { text-align: center; padding: 32px 10px; color: #64748b; }
.sms-shell button:disabled, .sms-admin button:disabled { cursor: not-allowed; opacity: .55; }
.sms-admin { max-width: 1440px; }
.sms-admin .sms-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.sms-admin .sms-tabs button[aria-selected="true"] { background: #2563eb; color: #fff; border-color: #2563eb; }
.sms-admin .sms-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.sms-admin .sms-fields label { display: grid; gap: 8px; font-size: 13px; color: #475569; }
.sms-admin input:not([type="checkbox"]), .sms-admin select, .sms-admin textarea { width: 100%; min-width: 0; font: inherit; padding: 10px; color: #0f172a; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.sms-admin input:disabled, .sms-admin select:disabled, .sms-admin textarea:disabled { background: #f1f5f9; color: #64748b; cursor: not-allowed; }
.sms-admin .sms-check { display: flex; align-items: center; gap: 8px; margin: 14px 0; font-size: 14px; }
.sms-admin .sms-check input { accent-color: #2563eb; }
.sms-admin #tab-catalog .sms-check { display: grid; grid-template-columns: auto minmax(0,1fr); white-space: nowrap; }
.sms-admin #tab-catalog .table-wrap { max-height: 560px; overflow: auto; }
.sms-admin #tab-catalog thead { position: sticky; top: 0; z-index: 1; background: #f8fafc; }
.sms-admin .sms-status-grid, .sms-admin .sms-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.sms-admin .sms-status-grid > div, .sms-admin .sms-stats article { padding: 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; overflow-wrap: anywhere; }
.sms-admin dt, .sms-admin .sms-stats span { color: #64748b; font-size: 13px; }
.sms-admin dd { margin: 9px 0 0; line-height: 1.6; }
.sms-admin .sms-stats strong { display: block; margin-top: 10px; font-size: 25px; }
.sms-admin .sms-admin-message { border-radius: 10px; padding: 13px 16px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; margin: 14px 0; line-height: 1.6; }
.sms-admin .sms-admin-message.is-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.sms-admin .sms-admin-note { padding: 13px 16px; border-radius: 9px; background: #eff6ff; color: #1e40af; font-size: 13px; line-height: 1.8; }
.sms-admin .sms-toggle-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; max-height: 330px; overflow: auto; margin: 15px 0; }
.sms-admin .sms-toggle-list label { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; overflow-wrap: anywhere; }
.sms-admin .sms-detail { white-space: pre-wrap; overflow-wrap: anywhere; background: #f8fafc; padding: 18px; border-radius: 10px; line-height: 1.8; }
.sms-admin .sms-wide { grid-column: 1 / -1; }
.sms-admin .panel > h2:not(:first-child) { margin-top: 30px; }
.sms-admin .panel-note { margin: 12px 0; line-height: 1.7; }
.sms-readonly-banner { padding: 14px 20px; background: #eff6ff; color: #1e3a8a; border: 2px solid #93c5fd; text-align: center; font: 14px/1.7 "Microsoft YaHei", sans-serif; position: relative; z-index: 10000; }
.sms-availability-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.sms-availability-metrics article { padding: 17px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.sms-availability-metrics span { color: #64748b; font-size: 13px; }
.sms-availability-metrics strong { display: block; margin-top: 10px; font-size: 24px; }
.sms-bulk-actions { margin: 18px 0; }
.sms-bulk-actions .panel-note { margin: 6px 0 0; }
#availability-body input, #availability-select-all { width: 18px; height: 18px; accent-color: #2563eb; }
@media (max-width: 760px) {
  .sms-selection, .sms-result-grid, .sms-admin .sms-fields, .sms-admin .sms-status-grid, .sms-admin .sms-stats { grid-template-columns: 1fr; }
  .sms-selection { gap: 0; }
  .sms-purchase-row { padding: 16px; }
  .sms-shell .sms-purchase-row .button { width: 100%; }
  .sms-order-card { grid-template-columns: 1fr; padding: 13px; }
  .sms-order-card .sms-order-actions { justify-content: space-between; }
  .sms-shell .member-panel { padding: 18px; }
  .sms-result { padding: 16px; }
  .sms-result strong { font-size: 23px; }
  .sms-admin .header-actions { justify-content: flex-start; }
  .sms-admin .sms-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sms-admin .sms-filter { align-items: stretch; }
  .sms-admin .sms-filter select { width: 100%; }
}
