:root { color-scheme: light; font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; color: #202927; background: #f7f9f8; font-size: 15px; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; }
html { scrollbar-gutter: stable; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 13px; border: 1px solid #d4ddda; border-radius: 5px; background: #fff; color: #24312d; cursor: pointer; text-decoration: none; white-space: normal; }
button:hover, .icon-button:hover { background: #edf3f0; }
button:disabled { opacity: .45; cursor: not-allowed; }
button img, .icon-button img { width: 17px; height: 17px; flex-shrink: 0; }
.icon-button { width: 38px; height: 38px; padding: 9px; flex-shrink: 0; }
.primary { background: #157554; border-color: #157554; color: white; font-weight: 600; }
.primary:hover { background: #116244; }
.primary img, .danger img { filter: brightness(0) invert(1); }
.danger { color: white; background: #b43c3d; border-color: #b43c3d; }
.danger:hover { background: #992e2f; }
.delete-icon { border-color: transparent; }
.delete-icon:hover { background: #fbecec; border-color: #eac9c9; }
:focus-visible { outline: 3px solid #6fba9a; outline-offset: 2px; }
.topbar { min-height: 80px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 32px; background: white; border-bottom: 1px solid #dde5e1; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex-wrap: wrap; }
.brand strong { font-size: 23px; font-weight: 700; }
.brand span { color: #63746c; border-left: 1px solid #d4ddda; padding-left: 14px; }
#account { display: flex; align-items: center; gap: 8px; }
#identity { color: #55665e; overflow-wrap: anywhere; margin-right: 8px; max-width: 150px; }
main { max-width: 1600px; padding: 0 32px 40px; margin: auto; }
h1 { font-size: 25px; margin: 0; line-height: 1.5; font-weight: 650; }
h2 { font-size: 20px; margin: 0; overflow-wrap: anywhere; }
.login { width: 100%; max-width: 360px; margin: 90px auto; }
.login h1 { margin-bottom: 26px; }
.login .primary { width: 100%; margin-top: 6px; }
label { display: block; color: #4f6058; font-weight: 500; margin: 16px 0; }
input, select { display: block; width: 100%; min-height: 41px; padding: 9px 11px; border: 1px solid #ccd8d1; border-radius: 4px; background: white; color: #202927; margin-top: 7px; }
input::placeholder { color: #8a9790; }
input[readonly] { background: #f7f9f8; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0 12px; border-bottom: 1px solid #dce5df; }
.tabs button { min-height: 60px; border: 0; border-radius: 4px 4px 0 0; background: none; padding: 16px 24px; color: #4f6058; font-size: 18px; font-weight: 650; border-bottom: 3px solid transparent; }
.tabs button:hover { background: #edf3f0; }
.tabs button[aria-pressed="true"] { color: #116244; background: #e4f2eb; border-bottom-color: #157554; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 27px 0 23px; }
.count { font-size: 15px; font-weight: 500; margin-left: 6px; color: #75857c; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.toolbar-actions { display: flex; gap: 8px; }
.toolbar-actions select { width: 88px; min-height: 38px; margin: 0; padding: 6px; }
.search { position: relative; width: 370px; max-width: 100%; margin: 0; font-weight: 400; }
.search img { position: absolute; top: 12px; left: 11px; height: 17px; width: 17px; opacity: .5; }
.search input { margin: 0; padding-left: 36px; }
.overview-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 15px 0; }
#balance-panel { display: flex; align-items: center; gap: 9px; min-height: 38px; }
#balance-value { font-variant-numeric: tabular-nums; color: #157554; }
.quota-value { color: #355777; font-size: 13px; margin-left: auto; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.balance-warning { margin: 0 0 16px; padding: 14px 16px; background: #fff0ee; color: #a31c2b; border-left: 4px solid #bc293a; font-weight: 650; line-height: 1.6; }
.category-tabs { display: flex; gap: 5px; border-bottom: 1px solid #dce5df; }
.category-tabs button { border: 0; border-radius: 0; border-bottom: 2px solid transparent; background: none; padding: 12px 16px; }
.category-tabs button[aria-pressed="true"] { border-bottom-color: #157554; color: #116244; font-weight: 650; }
.category-tabs span { color: #65716a; font-size: 12px; font-variant-numeric: tabular-nums; }
#owner-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-left: auto; }
.owner-filter { margin: 0; min-width: 140px; }
.owner-filter select { margin: 0; max-width: 190px; }
.check-label { display: flex; align-items: center; gap: 9px; overflow-wrap: anywhere; }
.check-label input { appearance: auto; accent-color: #157554; width: 17px; height: 17px; min-height: 17px; margin: 0; padding: 0; flex-shrink: 0; }
#owner-controls .check-label { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: white; }
th { color: #758078; font-weight: 500; font-size: 13px; text-align: left; background: #f0f4f1; }
th, td { padding: 16px; border-bottom: 1px solid #e4eae6; vertical-align: middle; }
td { overflow-wrap: anywhere; }
#links-table { table-layout: fixed; min-width: 1240px; }
#links-table th.phone-cell { width: 180px; }
#links-table th.owner-cell { width: 150px; }
#links-table th.order-cell { width: 160px; }
.service-name { color: #2c5577; font-size: 15px; font-weight: 650; }
#links-table th.expiry-cell { width: 216px; }
#links-table th.code-cell { width: 128px; }
#links-table th.actions-cell { width: 300px; }
.latest-code { font: 650 18px ui-monospace, Consolas, monospace; color: #275581; overflow-wrap: anywhere; max-width: 100%; min-height: 40px; padding: 6px 8px; border: 0; background: transparent; user-select: text; }
.latest-code:hover { background: #eaf0f5; }
.text-action { border: 0; background: transparent; color: #225c85; padding: 5px 0; min-height: 32px; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.purchase-fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.purchase-fields label { min-width: 0; margin: 0; }
.purchase-fields input, .purchase-fields select { min-width: 0; }
.purchase-settings { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #dce5df; padding: 16px 0 22px; }
.purchase-settings .check-label { margin: 0; }
.quotes-heading { margin: 24px 0 16px; }
.price-filter { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; }
.price-filter input { width: 110px; margin: 0; }
.request-id { font-family: ui-monospace, Consolas, monospace; max-width: 240px; overflow-wrap: anywhere; }
#purchases-table { table-layout: fixed; }
#purchases-table th:first-child { width: 27%; }
#purchases-table th:last-child { width: 30%; }
.group-row th { color: #314d67; background: #eaf0f5; font-weight: 650; padding-top: 10px; padding-bottom: 10px; }
.phone { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 15px; }
.secondary { color: #78867e; font-size: 12px; margin-top: 6px; line-height: 1.5; }
.url { font-family: ui-monospace, Consolas, monospace; font-size: 13px; padding: 10px; margin: 0; min-height: 40px; text-overflow: ellipsis; cursor: copy; }
.url:hover { border-color: #6fba9a; background: #edf5f0; }
.row-actions { display: flex; flex-wrap: nowrap; gap: 8px; justify-content: flex-start; }
.row-actions .icon-button { border-color: transparent; width: 44px; height: 44px; min-height: 44px; padding: 12px; }
.row-actions .icon-button img { width: 19px; height: 19px; }
.expired { color: #b43c3d; }
.expiry-warning, .expiry-warning.secondary { color: #b4232d; font-weight: 650; }
td.expiry-warning { background: #fff4f3; }
.empty { text-align: center; padding: 72px 16px; color: #89968e; border-bottom: 1px solid #e0e7e2; }
.pagination { display: flex; align-items: center; justify-content: space-between; min-height: 60px; color: #78867e; font-size: 12px; }
.pagination > div { display: flex; align-items: center; gap: 8px; }
.pagination label { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.pagination select { width: 94px; min-height: 38px; margin: 0; padding: 6px 9px; }
#users-table td:last-child { min-width: 215px; }
#users-table td:last-child > button { margin: 3px; }
.error { color: #b43c3d; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.error:empty { display: none; }
.muted { color: #78867e; font-size: 12px; }
#notice { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); margin: 0; max-width: calc(100% - 32px); padding: 12px 18px; background: #263f32; color: white; border-radius: 5px; box-shadow: 0 3px 15px #0002; z-index: 10; }
dialog { width: 440px; max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); padding: 23px; border: 1px solid #d1dbd5; border-radius: 7px; color: #26382e; box-shadow: 0 14px 50px #0002; overflow: auto; }
dialog::backdrop { background: #152e2255; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-heading .icon-button { border: 0; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: 22px; }
#code-value { display: block; font-family: ui-monospace, Consolas, monospace; font-size: 36px; font-weight: 600; padding: 16px 0 3px; overflow-wrap: anywhere; }
#sms-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.7; max-height: 230px; overflow: auto; }
.share-main { max-width: 760px; }
.share-settings, .message-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-settings .check-label { margin: 0; }
.sms-status { font-size: 14px; line-height: 1.8; padding: 14px 0; overflow-wrap: anywhere; }
.sms-message { border-top: 1px solid #dce5df; border-bottom: 1px solid #dce5df; padding: 20px 0; }
.message-heading { color: #4a6658; font-size: 13px; }
#share-code { display: block; font: 600 36px ui-monospace, Consolas, monospace; padding: 15px 0 4px; overflow-wrap: anywhere; }
#share-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; font-family: inherit; }
.share-meta { margin: 20px 0; }
.share-meta > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; margin: 12px 0; line-height: 1.6; }
.share-meta dt { color: #66726b; }
.share-meta dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 1000px) { .toolbar { flex-wrap: wrap; } .search { flex: 1; min-width: 200px; } }
@media (max-width: 680px) {
  .topbar { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .brand strong { font-size: 21px; }
  .brand span { font-size: 12px; padding-left: 10px; }
  #account { margin-left: auto; } #identity { font-size: 12px; }
  main { padding: 0 16px 24px; } .login { margin-top: 55px; }
  h1 { font-size: 21px; } .toolbar { gap: 12px 8px; } .search { flex: 1; min-width: 0; }
  .toolbar .search { flex-basis: 100%; } .toolbar-actions { margin-left: auto; }
  #owner-controls { order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
  .category-tabs { gap: 0; } .category-tabs button { padding: 12px 9px; flex: 1; }
  .overview-line { align-items: flex-start; gap: 10px; } #balance-panel { flex-wrap: wrap; }
  .quota-value { margin-left: 0; width: 100%; }
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 16px; }
  .tabs button { min-height: 54px; padding: 12px 8px; font-size: 16px; }
  .purchase-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .purchase-fields label:first-child { grid-column: 1 / -1; }
  .purchase-settings { flex-wrap: wrap; } .purchase-settings button { margin-left: auto; }
  .quotes-heading { flex-wrap: wrap; } .price-filter { margin-left: auto; }
  #offers-table { font-size: 12px; } #offers-table th, #offers-table td { padding: 10px 6px; }
  #purchases-table { min-width: 680px; }
  #links-table { min-width: 0; }
  #links-table thead { display: none; }
  #links-table, #links-table tbody { display: block; }
  #links-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 14px 0; border-bottom: 1px solid #dce5df; }
  #links-table td { display: block; border: 0; padding: 7px 12px; min-width: 0; }
  #links-table td.phone-cell, #links-table td.url-cell, #links-table td.owner-cell, #links-table td.actions-cell, #links-table td.code-cell { grid-column: 1 / -1; }
  #links-table td.code-cell::before { content: '最近验证码'; color: #78867e; margin-right: 12px; font-size: 12px; }
  #links-table td.order-cell::before { content: '用途'; display: block; color: #78867e; margin-bottom: 5px; font-size: 12px; }
  #links-table td.owner-cell { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: #5b6c62; }
  #links-table .group-row { display: block; padding: 0; } #links-table .group-row th { display: block; width: 100%; }
  #users-table { min-width: 640px; }
  .row-actions { justify-content: flex-end; gap: 6px; }
  .section-heading { margin-top: 22px; } th, td { padding: 11px 9px; }
  .dialog-actions { flex-wrap: wrap; } dialog { padding: 18px; }
  .pagination { flex-wrap: wrap; gap: 10px; padding: 12px 0; }
  .pagination > div { margin-left: auto; }
}
