:root {
  color-scheme: light;
  --ink: #18263a;
  --muted: #536780;
  --line: #dde5ef;
  --paper: #fff;
  --background: #f3f7fc;
  --blue: #174ab8;
  --blue-strong: #103b98;
  --blue-soft: #eaf1ff;
  --green: #0e614c;
  --green-soft: #e3f6ef;
  --amber: #865016;
  --amber-soft: #fff4da;
  font: 16px/1.55 system-ui, "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--background);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button, summary, input { outline-offset: 4px; }
button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--blue); }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); background: var(--paper); }
.topbar-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; font-weight: 700; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; gap: 3px; border-radius: 10px; background: var(--blue); }
.brand-mark i { width: 3px; height: 8px; background: white; border-radius: 4px; }
.brand-mark i:nth-child(2) { height: 17px; }
.brand-mark i:nth-child(3) { height: 12px; }
.connection { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.state-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 100px; padding: 4px 10px; background: #edf1f7; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.state-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-pill.good { color: var(--green); background: var(--green-soft); }
.state-pill.warn { color: var(--amber); background: var(--amber-soft); }
.intro { padding: 34px 0 23px; }
h1 { font-size: clamp(1.8rem, 3vw, 2.85rem); line-height: 1.16; letter-spacing: -.045em; }
.intro p { color: var(--muted); margin-top: 11px; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 14px; margin-bottom: 20px; }
.stat, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.stat { padding: 15px 18px; min-height: 98px; display: grid; align-content: center; }
.stat span, .stat small { color: var(--muted); font-size: .875rem; }
.stat strong { font-size: 1.75rem; font-variant-numeric: tabular-nums; line-height: 1.28; }
.stat small { min-height: 1.3em; font-size: .78rem; }
.last-stat strong { font-size: 1.52rem; }
.layout { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: 36px; }
.sidebar, .results { display: grid; gap: 16px; min-width: 0; }
.setup, .notification, .key-panel { padding: 19px; }
.panel h2 { font-size: 1.13rem; line-height: 1.28; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.count-label, .muted { color: var(--muted); font-size: .875rem; }
.setup h2 { margin-bottom: 17px; }
.field { margin-bottom: 15px; }
.field-label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 650; }
.field-label small { color: var(--muted); font-size: .8rem; font-weight: 400; margin-left: 4px; }
.picker summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; }
.picker summary::-webkit-details-marker { display: none; }
.picker summary, input { width: 100%; min-height: 41px; padding: 8px 10px; border-radius: 9px; border: 1px solid #cbd7e7; color: var(--ink); background: var(--paper); font-size: .9rem; }
.picker summary span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin: -4px 3px 0 0; flex: 0 0 auto; }
.picker[open] .chevron { transform: rotate(225deg); margin-top: 4px; }
.picker-content { margin-top: 5px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--paper); }
.options { max-height: 190px; overflow: auto; margin-top: 6px; }
.option { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 5px 6px; border: 0; border-radius: 5px; background: white; color: var(--ink); text-align: left; font-size: .875rem; cursor: pointer; }
.option:hover, .option:focus-within, .option.selected { background: var(--blue-soft); }
.option input { accent-color: var(--blue); flex: 0 0 16px; width: 16px; min-height: 16px; margin: 0; }
.options .muted { padding: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags:empty { display: none; }
.tags { margin-top: 8px; }
.tag { background: var(--blue-soft); color: var(--blue-strong); border: 0; border-radius: 6px; font-size: .8rem; padding: 3px 7px; }
.tag:hover { background: #d9e6ff; }
.primary, .ghost { min-height: 40px; padding: 7px 13px; border-radius: 8px; font-weight: 650; font-size: .875rem; }
.primary { border: 1px solid var(--blue); background: var(--blue); color: white; }
.primary:hover:enabled { background: var(--blue-strong); }
.ghost { border: 1px solid #cbd7e7; background: white; color: var(--ink); }
.ghost:hover:enabled { background: var(--background); }
.small { min-height: 33px; font-size: .8rem; }
.done { display: block; margin: 6px 0 0 auto; }
.wide { width: 100%; }
.form-message { margin-top: 8px; color: var(--green); font-size: .83rem; }
.form-message:empty { display: none; }
.form-message.error, .connection-error { color: var(--amber); }
.key-panel { margin-top: 18px; }
.key-panel form { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.key-input { flex: 1 1 280px; max-width: 475px; display: flex; gap: 8px; }
.key-input button { flex-shrink: 0; }
.key-panel .form-message { flex-basis: 100%; margin-top: 0; }
.notification h2 { margin-bottom: 13px; }
.notification .muted { margin-top: 8px; }
.mail-status { margin-top: 17px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; font-size: .875rem; }
.mail-status span { color: var(--muted); }
.mail-status span.good { color: var(--green); }
.mail-status span.warn { color: var(--amber); }
.empty { min-height: 132px; padding: 23px 16px; display: grid; place-content: center; gap: 3px; text-align: center; }
.empty strong { font-size: .95rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th { color: var(--muted); font-weight: 600; background: #f8faff; }
th, td { padding: 10px 12px; vertical-align: top; border-bottom: 1px solid #e8edf5; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
tr:last-child td { border-bottom: 0; }
td.country { font-weight: 650; }
td.action { width: 1%; white-space: nowrap; }
.sources { display: grid; gap: 4px; min-width: 120px; }
.source-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.offer { display: inline-flex; align-items: baseline; gap: 4px; background: var(--green-soft); color: var(--green); padding: 1px 6px; border-radius: 4px; font-size: .8rem; white-space: nowrap; }
.offer small { font-size: .77rem; }
.table-detail { display: block; color: var(--muted); font-size: .8rem; }
.table-detail.warn { color: var(--amber); }
.subtle-button { border: 0; background: none; color: var(--muted); border-radius: 5px; padding: 3px 5px; font-size: .82rem; }
.subtle-button:hover { background: #fae9e9; color: #8c2c2c; }
.events { max-height: 410px; overflow: auto; }
.events article { display: grid; gap: 4px; padding: 10px 19px; border-bottom: 1px solid #e8edf5; }
.events article:last-child { border-bottom: 0; }
.event-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 12px; font-size: .92rem; }
.event-title time { color: var(--muted); font-size: .82rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.main-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-right: auto; }
.main-nav a { padding: 6px 9px; color: var(--muted); text-decoration: none; border-radius: 7px; font-size: .88rem; font-weight: 650; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue-strong); }
.button-link { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.balance { display: inline-flex; gap: 5px; align-items: center; padding: 2px 7px; border: 1px solid var(--line); border-radius: 7px; white-space: nowrap; }
.balance span { color: var(--muted); font-size: .8rem; }
.balance strong { font-variant-numeric: tabular-nums; font-size: .96rem; }
.workbench.shell, .workbench-topbar .shell { width: min(1320px, calc(100% - 48px)); }
.workbench { padding-top: 18px; }
.number-layout { grid-template-columns: clamp(230px, 23vw, 304px) minmax(0, 1fr); }
.number-results { container: order-results / inline-size; }
.purchase-offers { display: grid; gap: 6px; }
.purchase-offers:not(:empty) { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 9px; }
.purchase-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 5px 0; }
.purchase-row strong { display: block; }
.purchase-row .muted { font-variant-numeric: tabular-nums; }
.purchase-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.purchase-actions .small { white-space: nowrap; }
.quantity-field { display: grid; grid-template-columns: 76px 1fr; gap: 5px 8px; align-items: center; }
.quantity-field label { grid-column: 1 / -1; margin-bottom: 0; }
.favorites-panel h2 { margin-bottom: 8px; }
.favorites-panel .purchase-row + .purchase-row { border-top: 1px solid var(--line); }
.result-number { display: inline-flex; align-items: center; gap: 4px; }
.result-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; color: var(--green); background: var(--green-soft); border: 1px solid #b9dfd2; border-radius: 9px; overflow-wrap: anywhere; }
.result-banner.error { background: var(--amber-soft); border-color: #ead3a6; color: var(--amber); }
.orders-toolbar { flex-wrap: wrap; }
.orders-toolbar h2 + .muted { margin-top: 3px; }
.orders-tools { display: flex; align-items: center; gap: 8px; flex: 0 1 265px; }
.orders-tools input { min-height: 34px; min-width: 0; padding-block: 5px; background: #f8faff; font-size: .83rem; }
.orders-tools button { flex: 0 0 auto; }
.orders-table { table-layout: fixed; }
.orders-table :is(th, td) { padding: 10px 10px; }
.orders-table th { padding-block: 8px; background: #f5f8fc; font-size: .83rem; }
.orders-table :is(th, td):first-child { padding-left: 17px; }
.orders-table :is(th, td):last-child { padding-right: 15px; }
.orders-table td { vertical-align: middle; }
.orders-table th.order-col-number { width: 25%; }
.orders-table th.order-col-cost { width: 12%; }
.orders-table th.order-col-time { width: 16%; }
.orders-table th.order-col-status { width: 29%; }
.orders-table th.order-col-actions { width: 18%; text-align: right; }
.order-cell-label { display: none; }
.order-cell-content { min-width: 0; }
.order-number-line, .order-status-line, .order-code-line, .sms-head { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }
.order-number-line button { padding-inline: 3px; }
.order-phone, .otp-code, .order-timer { font-family: ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.order-phone { font-size: .97rem; overflow-wrap: anywhere; }
.otp-code { font-size: 1.02rem; letter-spacing: .025em; color: var(--blue-strong); }
.order-amount, .order-timer { font-weight: 650; white-space: nowrap; }
.order-amount { font-variant-numeric: tabular-nums; }
.order-hint, .order-id { display: block; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.order-id { font-size: .77rem; font-variant-numeric: tabular-nums; }
.order-col-time .order-hint { margin-top: 2px; }
.order-status { padding: 2px 7px; background: #eef2f7; border-radius: 5px; color: var(--muted); font-size: .77rem; white-space: nowrap; }
.order-status.received { background: var(--green-soft); color: var(--green); }
.order-detail-button { color: var(--blue); font-size: .78rem; }
.order-detail-button:hover, .otp-copy:hover { background: var(--blue-soft); color: var(--blue-strong); }
.order-code-line { margin-top: 1px; }
.order-message-preview { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: .8rem; }
.order-col-actions .order-cell-content { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px; }
.order-col-actions .small { min-height: 30px; padding: 3px 8px; white-space: nowrap; }
.order-menu { position: relative; }
.order-menu summary { cursor: pointer; list-style: none; display: flex; align-items: center; }
.order-menu summary::-webkit-details-marker { display: none; }
.order-menu[open] summary { background: var(--blue-soft); }
.order-menu-items { position: absolute; z-index: 2; top: calc(100% + 4px); right: 0; width: max-content; min-width: 112px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px #18263a1a; }
.order-menu-item { display: block; width: 100%; padding: 5px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; font-size: .84rem; }
.order-menu-item:hover { background: var(--blue-soft); }
.order-menu-item.order-cancel { color: #9d313c; }
.order-link { display: inline-block; color: var(--blue); text-decoration: none; }
.order-link:hover { color: var(--blue-strong); background: var(--blue-soft); }
.otp-copy { color: var(--blue-strong); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: .86rem; }
.compact-select { min-height: 32px; padding: 4px 8px; background: white; color: var(--ink); border: 1px solid #cbd7e7; border-radius: 7px; font: inherit; font-size: .85rem; }
.number-dialog { width: min(560px, calc(100% - 26px)); max-height: calc(100% - 25px); padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--paper); }
.number-dialog::backdrop { background: #14253b80; }
.dialog-content { display: grid; gap: 10px; padding: 15px 19px 18px; }
.dialog-message { padding: 0 19px 15px; }
.dialog-content .purchase-row { border-bottom: 1px solid var(--line); }
.dialog-price { padding: 9px 12px; background: var(--blue-soft); border-radius: 8px; }
.sms { border-bottom: 1px solid var(--line); padding: 7px 0 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
.sms-body { margin: 4px 0; }
.warn-text { color: var(--amber); }
.account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.login-shell { min-height: calc(100vh - 66px); display: grid; place-items: start center; padding-block: clamp(24px, 9vh, 94px) 28px; }
.auth-panel { width: min(100%, 425px); padding: clamp(16px, 4vw, 27px); }
.auth-panel h1 { font-size: clamp(1.65rem, 3vw, 2.1rem); letter-spacing: -.03em; }
.auth-panel > p.muted { margin: 7px 0 18px; }
.account-select { width: 100%; min-height: 41px; padding: 8px 10px; border: 1px solid #cbd7e7; border-radius: 9px; color: var(--ink); background: var(--paper); font: inherit; font-size: .9rem; }
.member-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 15px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-details, .member-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.order-assignment-link { text-decoration: none; }
.order-duration-row > td .purchase-row { justify-content: flex-start; flex-wrap: wrap; }
.order-duration-options { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.order-owner { color: var(--blue-strong); }
@container order-results (max-width: 690px) {
  .orders-table, .orders-table tbody { display: block; }
  .orders-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .orders-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
  .orders-table tbody tr:last-child { border-bottom: 0; }
  .orders-table tbody td, .orders-table tbody td:is(:first-child, :last-child) { padding: 0; border: 0; }
  .orders-table :is(.order-col-number, .order-col-status, .order-col-actions) { grid-column: 1 / -1; }
  .orders-table .order-duration-row > td { grid-column: 1 / -1; }
  .order-cell-label { display: block; color: var(--muted); font-size: .77rem; }
  .orders-table :is(.order-col-number, .order-col-actions) .order-cell-label { display: none; }
  .order-col-actions .order-cell-content { justify-content: flex-start; }
  .order-menu-items { right: auto; left: 0; }
}
@media (max-width: 740px) {
  .shell { width: calc(100% - 28px); }
  .layout { grid-template-columns: 1fr; gap: 16px; }
  .sidebar { display: contents; }
  .setup { order: 1; }
  .results { order: 2; }
  .notification { order: 3; }
  .intro { padding-top: 24px; }
  .stats { gap: 8px; }
  .stat { padding: 9px 8px; min-height: 80px; }
  .stat strong { font-size: 1.32rem; }
  .brand { gap: 6px; font-size: .9rem; }
  .brand-mark { width: 29px; height: 29px; }
  .connection { gap: 5px; }
  .topbar .account-name { display: none; }
  .admin-layout > section { grid-column: 1; }
  .workbench .number-layout { grid-template-columns: 1fr; }
  .workbench.shell, .workbench-topbar .shell { width: calc(100% - 28px); }
  .workbench-topbar .connection { flex-wrap: wrap; }
  .workbench-topbar .balance span { display: none; }
  .topbar-inner:has(.main-nav:not([hidden])) { flex-wrap: wrap; justify-content: space-between; padding-block: 5px; }
  .main-nav:not([hidden]) { order: 3; flex-basis: 100%; }
}
