:root { color-scheme: light; font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; color: #202927; background: #f7f9f8; font-size: 14px; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; }
[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: 72px; 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: 1320px; padding: 0 32px 32px; margin: auto; }
h1 { font-size: 23px; 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; gap: 26px; padding-top: 14px; border-bottom: 1px solid #dce5df; }
.tabs button { border: 0; border-radius: 0; background: none; padding: 14px 0; color: #6b7a72; border-bottom: 2px solid transparent; }
.tabs button[aria-pressed="true"] { color: #157554; font-weight: 650; 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; }
.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; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: white; }
th { color: #758078; font-weight: 500; font-size: 12px; text-align: left; background: #f0f4f1; }
th, td { padding: 14px 15px; border-bottom: 1px solid #e4eae6; vertical-align: middle; }
td { overflow-wrap: anywhere; }
#links-table { table-layout: fixed; }
#links-table th:nth-child(1) { width: 22%; }
#links-table th:nth-child(2) { width: 15%; }
#links-table th:nth-child(3) { width: 17%; }
#links-table th:nth-child(4) { width: 28%; }
#links-table th:nth-child(5) { width: 18%; }
.phone { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 14px; }
.secondary { color: #78867e; font-size: 12px; margin-top: 6px; line-height: 1.5; }
.url { font-family: ui-monospace, Consolas, monospace; font-size: 12px; padding: 8px; margin: 0; min-height: 35px; text-overflow: ellipsis; }
.row-actions { display: flex; gap: 3px; justify-content: flex-start; }
.row-actions .icon-button { border-color: transparent; width: 33px; height: 33px; min-height: 33px; padding: 8px; }
.expired { color: #b43c3d; }
.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; gap: 8px; }
.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; }
@media (max-width: 1000px) { .row-actions { flex-wrap: wrap; } #links-table th:nth-child(5) { width: 20%; } #links-table th:nth-child(4) { width: 26%; } }
@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: 8px; } .search { flex: 1; 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:nth-child(1), #links-table td:nth-child(4) { grid-column: 1 / -1; }
  #links-table td:nth-child(5) { grid-column: 1 / -1; }
  .row-actions { flex-wrap: nowrap; justify-content: flex-end; gap: 9px; }
  .row-actions .icon-button { width: 38px; height: 38px; }
  .section-heading { margin-top: 22px; } th, td { padding: 11px 9px; }
  .dialog-actions { flex-wrap: wrap; } dialog { padding: 18px; }
}
