:root {
  --canvas: #f3f6fa;
  --surface: #ffffff;
  --ink: #19344d;
  --muted: #63758a;
  --blue: #1768b3;
  --blue-hover: #125794;
  --blue-soft: #eaf2fc;
  --line: #dee6ef;
  --input-line: #b6c5d5;
  --success: #176b50;
  --warning: #8a5a14;
  --danger: #b33b49;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; margin: 0; }
a { color: var(--blue); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, a, summary, input { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button { line-height: 1.4; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; }
button:disabled { opacity: .45; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #7caee6; outline-offset: 3px; }
main:focus { outline: none; }
input:not([type="hidden"]):not([type="file"]):not([type="checkbox"]), select { min-width: 0; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--input-line); border-radius: 7px; background: var(--surface); color: var(--ink); line-height: 1.5; }
input::placeholder { color: #708195; opacity: 1; }
input:focus { border-color: var(--blue); }
input[readonly] { background: #f7f9fc; }
input:disabled, select:disabled, textarea:disabled { background: #eef2f6; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: 28px; line-height: 1.35; letter-spacing: -.6px; font-weight: 700; }
h2 { margin-bottom: 0; font-size: 17px; line-height: 1.5; font-weight: 650; }
h3 { margin-bottom: 0; font-size: 15px; font-weight: 650; }
p { margin-bottom: 0; line-height: 1.75; }
strong { font-weight: 650; }
small { font-size: 12px; line-height: 1.55; }
code, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .92em; }
code { overflow-wrap: anywhere; }
.icon { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 20px; border-radius: 7px; background: var(--ink); color: white; }
.skip-link:focus { top: 12px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 39px; height: 39px; border-radius: 11px; color: white; background: var(--blue); }
.brand > span:last-child { display: grid; gap: 2px; }
.brand strong { font-size: 19px; letter-spacing: -.45px; line-height: 1.3; }
.brand small { color: var(--muted); font-size: 11px; }
.logout-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--muted); text-align: left; font-size: 13px; }
.logout-button:hover { color: var(--danger); }
.site-shell { display: flex; flex-direction: column; min-height: 100vh; }
.app-bar { display: flex; align-items: center; justify-content: space-between; min-height: 77px; gap: 20px; padding: 15px 36px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.85); }
.user-identity { list-style: none; padding: 5px; border-radius: 8px; display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border: 1px solid #d6e4f4; border-radius: 50%; background: #ebf2fb; color: #326899; font-size: 13px; font-weight: 650; }
.page-shell { flex: 1; width: 100%; max-width: 1680px; margin: 0 auto; padding: 36px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 27px; }
.page-heading p { color: var(--muted); font-size: 13px; max-width: 70ch; }
.page-heading > .primary-button { flex-shrink: 0; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 36px 24px; color: var(--muted); font-size: 11px; }
.footer > span { display: flex; align-items: center; gap: 6px; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 22px; padding: 14px 17px; border: 1px solid; border-radius: 8px; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.notice > .icon { margin-top: 1px; }
.notice strong { display: block; }
.notice p { margin-top: 3px; }
.notice-success { color: var(--success); background: #eff8f3; border-color: #cce6d7; }
.notice-error { color: #a12d40; background: #fff3f4; border-color: #f0cbd1; }
.notice-warning { color: #785011; background: #fff9ed; border-color: #ecdfbd; }
.notice-info { color: #365f89; background: #eef5fd; border-color: #d3e3f5; }
.primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 17px; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; text-decoration: none; }
.primary-button { color: white; background: var(--blue); border-color: var(--blue); }
.primary-button:hover:not(:disabled) { background: var(--blue-hover); border-color: var(--blue-hover); }
.secondary-button { background: var(--surface); color: #38536e; border-color: var(--input-line); }
.secondary-button:hover:not(:disabled) { background: #f5f9ff; border-color: #739ac3; }
.danger-button { background: var(--danger); color: white; border-color: var(--danger); }
.danger-button:hover:not(:disabled) { background: #992f3b; }
.small-button { min-height: 35px; padding: 7px 12px; font-size: 12px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; width: 34px; height: 34px; padding: 6px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 6px; text-decoration: none; }
.icon-button:hover:not(:disabled) { color: var(--blue); background: var(--blue-soft); }
.link-button { padding: 3px 0; border: 0; background: none; color: var(--blue); text-decoration: none; font-size: 12px; }
.link-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.danger-link { color: var(--danger); }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.inline-actions form { margin: 0; }
.is-loading::before { content: ""; flex-shrink: 0; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading > .icon { display: none; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 21px 24px; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title > .icon { color: var(--blue); }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; height: 24px; padding: 0 7px; border-radius: 6px; background: #edf2f7; color: #556d84; font-size: 12px; font-variant-numeric: tabular-nums; }
.filter-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-control { display: flex; align-items: center; position: relative; }
.filter-control > .icon { position: absolute; left: 11px; color: #788da1; pointer-events: none; }
.filter-control input { width: 244px !important; min-height: 37px !important; padding: 7px 34px !important; font-size: 12px; }
.filter-clear { display: grid; place-items: center; position: absolute; right: 4px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.filter-clear:hover { background: var(--blue-soft); }
.phone-number { font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .2px; overflow-wrap: anywhere; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; max-width: 100%; padding: 4px 8px; border-radius: 5px; font-size: 11px; font-weight: 550; line-height: 1.5; white-space: nowrap; }
.status-success { color: var(--success); background: #eaf5ef; }
.status-neutral { color: #5c6e82; background: #eef2f6; }
.status-warning { color: var(--warning); background: #fff3dc; }
.status-error { color: var(--danger); background: #ffedf0; }
.field { display: grid; gap: 8px; }
.field > label, .field-label { display: block; color: #4b637b; font-size: 12px; font-weight: 550; }
.secret-control, .password-control { display: flex; align-items: stretch; min-width: 0; }
.secret-control input, .password-control input { border-radius: 7px 0 0 7px !important; flex: 1; width: 0 !important; }
.secret-control input { min-height: 39px !important; padding: 8px 10px !important; font-family: Consolas, monospace; font-size: 12px; }
.secret-control button, .password-control button { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 0 10px; border: 1px solid var(--input-line); border-left: 0; background: var(--surface); color: #4d6884; font-size: 11px; }
.secret-control button:last-child, .password-control button:last-child { border-radius: 0 7px 7px 0; }
.secret-control button:hover, .password-control button:hover { color: var(--blue); background: var(--blue-soft); }
.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.pagination-controls { display: flex; align-items: center; gap: 11px; }
.pagination-controls strong { color: var(--ink); font-weight: 550; }
.pagination .icon-button { width: 29px; height: 29px; border-color: var(--line); background: white; }
.empty-state { display: grid; justify-items: center; gap: 15px; padding: 72px 24px; border-top: 1px solid var(--line); text-align: center; }
.empty-illustration { display: grid; place-items: center; width: 80px; height: 80px; margin-bottom: 3px; border: 1px solid #dbe7f4; border-radius: 22px; color: #6791ba; background: #f0f6fd; }
.empty-state h2 { font-size: 18px; }
.empty-state p { max-width: 440px; color: var(--muted); font-size: 13px; }
.empty-state .secondary-button { margin-top: 5px; }
.page-footnote { display: flex; align-items: flex-start; gap: 8px; margin: 18px 3px 0; color: var(--muted); font-size: 11px; }
.page-footnote > .icon { margin-top: 2px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary > .icon:last-child { margin-left: auto; }
details[open] > summary > .icon:last-child { transform: rotate(180deg); }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { padding: 12px 24px; background: #f8fafd; color: var(--muted); font-size: 11px; font-weight: 500; border-block: 1px solid var(--line); white-space: nowrap; }
td { padding: 18px 24px; border-bottom: 1px solid var(--line); line-height: 1.6; }
tbody tr:last-child td { border-bottom: 0; }
.admin-table { min-width: 650px; }
.admin-table .user-cell { display: flex; align-items: center; gap: 11px; }
.user-cell > div { display: grid; gap: 3px; }
.user-cell strong { overflow-wrap: anywhere; }
.user-cell small, .cell-note { color: var(--muted); font-size: 10px; }
.admin-table td:last-child, .admin-table th:last-child { text-align: right; }
.admin-table td:last-child .inline-actions { justify-content: flex-end; }
.compact-heading { margin-bottom: 20px; }
.compact-toolbar { padding: 14px 18px; gap: 12px; }
.batch-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.select-page { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; cursor: pointer; }
.selection-count { min-width: 62px; margin-right: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.selection-count strong { color: var(--blue); }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--blue); cursor: pointer; }
input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .4; }
.account-table { table-layout: fixed; }
.account-table th { padding: 10px 12px; }
.account-table td { padding: 12px; vertical-align: middle; }
.account-table th:nth-child(2) { width: 24%; }
.account-table th:nth-child(4) { width: 182px; }
.account-table .selection-cell { width: 42px; padding-left: 18px; padding-right: 8px; }
.account-table .delete-cell { width: 55px; text-align: center; padding-inline: 8px; }
.phone-cell-content { display: flex; align-items: flex-start; flex-direction: column; gap: 5px; }
.account-table .status-pill { padding: 1px 5px; font-size: 10px; }
.account-table .status-pill .icon { width: 11px; height: 11px; }
.account-table .secret-control input { min-height: 34px !important; padding-block: 6px !important; }
.account-table .secret-control button { padding-inline: 8px; }
.account-table .secret-control button[type="submit"] { color: var(--blue); background: #f0f6fe; }
.account-table .inline-actions { gap: 14px; flex-wrap: nowrap; }
.account-table .link-button { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 11px; }
.account-table tr:has(input[name="selected_account"]:checked) { background: #f2f7fe; }
.compact-help { margin: 12px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.compact-empty { padding: 40px 24px; }
#twofa-dialog .form-stack { gap: 18px; }
#twofa-dialog .dialog-head h2 { margin-top: 0; }
#twofa-dialog p { margin: 0; font-size: 12px; }
.result-dialog { width: min(480px, calc(100% - 32px)); }
#result-message { margin: 18px 0; white-space: pre-line; font-size: 13px; }
.result-details { max-height: 200px; overflow-y: auto; margin: 12px 0 18px; padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
#result-copy-field { margin-bottom: 18px; }
#result-copy-text { width: 100%; resize: vertical; padding: 10px; border: 1px solid var(--input-line); border-radius: 6px; color: var(--ink); background: #f8fafd; font: 12px/1.7 Consolas, monospace; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 620px) minmax(200px, 1fr); align-items: start; gap: 36px; max-width: 1030px; }
.settings-panel { overflow: hidden; }
.settings-panel .panel-heading { padding: 23px 28px; border-bottom: 1px solid var(--line); }
.panel-heading p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.settings-panel .form-stack { padding: 27px 28px; }
.form-stack { display: grid; gap: 21px; }
.form-stack label { display: grid; gap: 8px; color: #39536c; font-size: 12px; font-weight: 550; }
.form-stack small { color: var(--muted); font-size: 11px; font-weight: 400; }
.form-stack .notice { margin-bottom: 0; }
.form-stack > p { font-size: 12px; color: var(--muted); }
.form-actions { display: flex; align-items: center; gap: 14px; padding-top: 7px; }
.form-actions small { color: var(--muted); font-size: 11px; }
.settings-help { padding-top: 5px; }
.settings-help h2, .settings-help h3 { margin-bottom: 11px; font-size: 14px; }
.settings-help p, .settings-help li { color: var(--muted); font-size: 12px; line-height: 1.9; }
.settings-help section + section { margin-top: 27px; padding-top: 24px; border-top: 1px solid var(--line); }
.settings-help ul { margin: 0; padding-left: 18px; }
.fixed-settings { margin: 18px 0 0; }
.fixed-settings > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.fixed-settings dt { color: var(--muted); }
.fixed-settings dd { margin: 0; }
.setup-links { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.setup-link { display: flex; align-items: center; gap: 12px; flex: 1; padding: 16px 20px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; text-decoration: none; }
.setup-link > .icon:first-child { color: var(--blue); }
.setup-link > div { flex: 1; }
.setup-link strong { display: block; font-size: 12px; }
.setup-link small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.setup-link:hover { border-color: #9cb8d6; }
dialog { max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); box-shadow: 0 24px 90px #19344d30; }
dialog::backdrop { background: #19344d66; }
.import-dialog { width: min(560px, calc(100% - 32px)); }
.import-dialog .form-stack { padding: 28px; }
.dialog-body { padding: 26px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-head h2 { font-size: 20px; }
.dialog-head p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.dialog-head > .icon-button { margin: -5px -5px 0 0; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 7px; }
.upload-zone { position: relative; border-radius: 10px; }
.upload-zone input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-zone:focus-within { outline: 3px solid #7caee6; outline-offset: 3px; }
.upload-zone label { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 184px; gap: 12px; padding: 24px; border: 1px dashed #a0bcd9; border-radius: 10px; background: #f5f9fe; text-align: center; }
.upload-zone:hover label, .upload-zone.is-dragging label { border-color: var(--blue); background: #eaf3ff; }
.upload-zone label strong { max-width: 100%; overflow-wrap: anywhere; color: var(--blue); font-size: 13px; }
.upload-zone label > span:last-child { font-size: 11px; font-weight: 400; color: var(--muted); }
.upload-icon { display: grid; place-items: center; width: 45px; height: 45px; color: #6e97bf; border: 1px solid #d4e3f3; background: white; border-radius: 12px; }
.import-guide { color: #486581; font-size: 12px; }
.import-guide > summary { display: flex; align-items: center; margin-bottom: 12px; }
.file-example { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafd; }
.file-example > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 11px; }
.file-example code, .file-example div > span { margin-left: auto; font-size: 10px; color: var(--muted); }
.safety-list { margin: 13px 0 0; padding-left: 17px; color: var(--muted); font-size: 11px; line-height: 1.9; }
.confirm-dialog { width: min(420px, calc(100% - 32px)); }
.confirm-dialog h2 { margin-top: 19px; font-size: 19px; }
.confirm-dialog p { margin-top: 12px; margin-bottom: 21px; color: var(--muted); font-size: 13px; }
.message-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--blue); background: var(--blue-soft); }
.warning-icon { color: var(--warning); background: #fff3dc; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 9px; background: var(--ink); color: white; box-shadow: 0 6px 22px #19344d26; font-size: 13px; text-align: center; }
.is-guest .app-bar { max-width: 1280px; width: 100%; margin: 0 auto; padding: 28px 40px; border-bottom: 0; background: transparent; }
.guest-note { color: var(--muted); font-size: 12px; }
.is-guest .page-shell { max-width: 1180px; padding: 36px 40px 56px; display: flex; flex-direction: column; justify-content: center; }
.is-guest .footer { max-width: 1280px; width: 100%; margin: 0 auto; padding-inline: 40px; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 410px); align-items: center; gap: clamp(40px, 8vw, 110px); width: 100%; margin: 10px 0 30px; }
.auth-story h1 { font-size: clamp(30px, 3.4vw, 43px); line-height: 1.45; letter-spacing: -1.3px; max-width: 13em; }
.auth-story > p { max-width: 420px; margin-top: 21px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.auth-card { padding: 34px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 8px 32px #19344d06; }
.auth-card .form-stack { gap: 20px; }
.auth-card-header > p { margin-top: 8px; font-size: 12px; line-height: 1.8; }
.auth-schematic { display: block; max-width: 400px; height: auto; margin: 32px 0 23px; }
.auth-card.center-message { margin: 0; padding: 32px; }
.auth-card h2 { margin-bottom: 5px; font-size: 23px; }
.auth-card .primary-button { min-height: 44px; margin-top: 4px; }
.auth-note { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.form-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; }
.form-links a, .form-switch a { text-decoration: none; }
.form-links a:hover, .form-switch a:hover { text-decoration: underline; }
.form-switch { margin-top: 1px; color: var(--muted); font-size: 12px; text-align: center; }
.center-message { max-width: 560px; width: 100%; margin: 28px auto; padding: 42px 38px; border: 1px solid var(--line); border-radius: 14px; background: white; text-align: center; }
.center-message .message-icon { width: 60px; height: 60px; margin-bottom: 25px; border-radius: 18px; }
.center-message h1 { font-size: 26px; }
.center-message p { margin-top: 15px; color: var(--muted); font-size: 13px; }
.center-message .primary-button, .center-message .secondary-button { margin-top: 25px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1200px) {
  .page-shell { padding: 28px; }
  .app-bar { padding-inline: 28px; }
  .list-toolbar { padding-inline: 20px; }
  .compact-toolbar .filter-form { width: 100%; }
  .compact-toolbar .filter-control { flex: 1; }
  .compact-toolbar .filter-control input { width: 100% !important; }
  .account-table th:nth-child(4) { width: 170px; }
  .settings-layout { gap: 24px; grid-template-columns: minmax(0, 1fr) 230px; }
}
@media (max-width: 1000px) {
  .app-bar { min-height: 67px; }
  .auth-layout { gap: 45px; }
  .auth-card { padding: 28px; }
}
@media (max-width: 760px) {
  .page-shell { padding: 25px 20px; }
  .app-bar { padding: 14px 20px; }
  .page-heading { margin-bottom: 23px; gap: 15px; align-items: flex-start; }
  h1 { font-size: 24px; }
  .page-heading p { font-size: 12px; }
  .page-heading > .primary-button { min-height: 38px; padding: 9px 12px; font-size: 12px; }
  .footer { padding: 15px 20px 22px; font-size: 10px; }
  .account-table, .account-table tbody { display: block; }
  .account-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .account-table tr { display: grid; grid-template-columns: 20px minmax(0, 1fr) 30px; gap: 11px 10px; padding: 16px; border-top: 1px solid var(--line); }
  .account-table td { width: auto !important; padding: 0 !important; border: 0; }
  .account-table .selection-cell { grid-column: 1; grid-row: 1; align-self: center; }
  .account-table .phone-cell { grid-column: 2; grid-row: 1; align-self: center; }
  .phone-cell-content { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 7px; }
  .account-table .delete-cell { grid-column: 3; grid-row: 1; }
  .account-table .twofa-cell { grid-column: 2 / 4; grid-row: 2; }
  .account-table .api-cell { grid-column: 2 / 4; grid-row: 3; }
  .account-table .secret-control input { min-height: 37px !important; }
  .account-table .inline-actions { gap: 20px; }
  .account-table .link-button { min-height: 28px; }
  .batch-actions { gap: 6px; }
  .batch-actions .small-button { padding: 7px 9px; font-size: 11px; }
  .list-toolbar { padding: 18px 20px; }
  .filter-control input { width: 200px !important; }
  .settings-layout { grid-template-columns: 1fr; gap: 28px; }
  .settings-help { max-width: 560px; }
  .settings-help section + section { margin-top: 20px; padding-top: 18px; }
  .settings-panel .panel-heading { padding: 20px 24px; }
  .settings-panel .form-stack { padding: 24px; }
  .setup-links { flex-direction: column; }
  .is-guest .app-bar { padding: 22px 24px; }
  .is-guest .page-shell { padding: 22px 24px 40px; }
  .is-guest .footer { padding-inline: 24px; }
  .auth-layout { grid-template-columns: 1fr; gap: 28px; max-width: 450px; margin: 0 auto; }
  .auth-story h1 { max-width: none; font-size: 30px; letter-spacing: -.8px; }
  .auth-story > p { margin-top: 12px; font-size: 13px; }
  .auth-story .auth-schematic { display: none; }
  .auth-card { padding: 28px; }
  .center-message { margin: 10px auto; padding: 32px 24px; }
}
@media (max-width: 480px) {
  .page-shell { padding: 22px 16px; }
  .app-bar { padding-inline: 16px; }
  .page-heading { flex-wrap: wrap; }
  .page-heading h1 { font-size: 23px; }
  .list-toolbar { gap: 14px; padding: 17px; }
  .filter-form { width: 100%; }
  .filter-control { flex: 1; min-width: 0; }
  .filter-control input { width: 100% !important; }
  .pagination { padding: 13px 17px; font-size: 10px; }
  .pagination-controls { gap: 7px; }
  .empty-state { padding: 45px 23px; }
  .footer { align-items: flex-start; gap: 8px; flex-direction: column; padding-inline: 16px; }
  .notice { padding: 12px 14px; font-size: 12px; }
  .import-dialog .form-stack { padding: 22px; gap: 18px; }
  .dialog-head h2 { font-size: 18px; }
  .upload-zone label { padding: 20px 14px; }
  .dialog-actions > button { flex: 1; }
  .file-example code, .file-example div > span { margin-left: 23px; }
  .settings-panel .panel-heading { padding: 19px 21px; }
  .settings-panel .form-stack { padding: 22px 21px; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  .guest-note { font-size: 10px; }
  .is-guest .app-bar { padding: 21px 20px; }
  .is-guest .page-shell { padding: 20px 20px 34px; }
  .is-guest .footer { padding-inline: 20px; }
  .auth-card { padding: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .status-pill, .count-badge, .brand-mark, .avatar { border: 1px solid CanvasText; }
}
.top-nav { display: flex; align-items: center; flex: 1; flex-wrap: wrap; gap: 5px; min-width: 0; }
.top-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border-radius: 7px; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 13px; }
.top-nav a:hover { background: #f5f8fc; color: var(--ink); }
.top-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); }
.app-bar > .brand { flex-shrink: 0; }
.user-menu { position: relative; flex-shrink: 0; margin-left: auto; }
.user-menu[open] summary, .user-menu summary:hover { background: var(--blue-soft); }
.user-dropdown { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; width: min(290px, calc(100vw - 40px)); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 32px #19344d20; overflow: hidden; }
.user-menu-details { display: grid; gap: 5px; padding: 17px; overflow-wrap: anywhere; }
.user-menu-details small { color: var(--muted); }
.pagination-summary, .page-size-form { display: flex; align-items: center; gap: 10px; }
.page-size-form select { width: auto; min-height: 34px; padding: 5px 25px 5px 9px; font-size: 12px; }
.registration-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; margin-bottom: 20px; }
.registration-panel p { margin-top: 7px; font-size: 12px; }
.backup-list { margin-top: 24px; }
.update-page { max-width: 1040px; margin: 0 auto; }
.update-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.update-main { min-width: 0; display: grid; gap: 20px; }
.update-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px 0; }
.update-card-heading > span { font-size: 12px; }
.update-agent { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 12px; white-space: nowrap; background: var(--surface); }
.update-agent-dot { width: 7px; height: 7px; border-radius: 50%; background: #98a6b5; }
.update-agent[data-connected="true"] .update-agent-dot { background: var(--success); }
.update-versions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px 26px; }
.update-versions > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 6px 16px; min-width: 0; }
.update-versions small { grid-column: 2; }
.update-field-label, .update-versions small { color: var(--muted); font-size: 12px; }
.update-version-number { font-size: 18px; line-height: 1.4; letter-spacing: 0; overflow-wrap: anywhere; }
.update-version-number.is-pending { color: var(--muted); font-size: 16px; font-weight: 500; }
.update-action-area { border-top: 1px solid var(--line); padding: 20px 26px; background: #fafcfe; border-radius: 0 0 12px 12px; }
.update-action-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.update-action-buttons form { margin: 0; }
.update-action-area p { margin-top: 11px; font-size: 12px; }
.update-status-card { border-top: 3px solid var(--line); }
.update-status-card[data-tone="info"] { border-top-color: var(--blue); }
.update-status-card[data-tone="success"] { border-top-color: var(--success); }
.update-status-card[data-tone="warning"] { border-top-color: var(--warning); }
.update-status-card[data-tone="error"] { border-top-color: var(--danger); }
.update-status-message { margin: 13px 26px 24px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.update-status-card[data-tone="error"] .update-status-message { color: var(--danger); }
.update-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; gap: 12px; padding: 0; margin: 0 26px 24px; }
.update-steps li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.update-steps li > span { display: inline-grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; }
.update-steps li[data-state="current"] { color: var(--blue); font-weight: 650; }
.update-steps li[data-state="current"] > span { background: var(--blue); border-color: var(--blue); color: white; }
.update-steps li[data-state="done"] { color: var(--success); }
.update-steps li[data-state="done"] > span { background: #eff8f3; border-color: #cce6d7; }
.update-connection-note { margin: 0 26px 22px; padding: 11px 13px; border-radius: 7px; background: #fff9ed; color: var(--warning); font-size: 12px; overflow-wrap: anywhere; }
.update-guide { padding: 23px; }
.update-guide section + section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.update-guide h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 14px; }
.update-guide h2 .icon { color: var(--muted); }
.update-guide p { color: var(--muted); font-size: 12px; }
.update-source-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 13px; text-decoration: none; }
.update-start-help { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); font-size: 12px; }
.update-start-help summary { color: var(--blue); }
.update-start-help p { margin-top: 11px; }
@media (max-width: 1050px) {
  .update-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
  .update-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .update-layout { grid-template-columns: 1fr; }
  .update-card-heading { padding: 20px 20px 0; }
  .update-versions { gap: 14px; padding: 23px 20px; }
  .update-version-number { font-size: 18px; }
  .update-action-area { padding: 17px 20px; }
  .update-status-message, .update-steps, .update-connection-note { margin-inline: 20px; }
  .update-guide { padding: 20px; }
}
.backup-list > .notice { margin: 0 24px 18px; }
.form-stack .backup-clear-password { display: flex; align-items: center; gap: 8px; }
@media (max-width: 1100px) {
  .is-authenticated .app-bar { flex-wrap: wrap; gap: 12px; }
  .top-nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 760px) {
  .top-nav { gap: 3px; }
  .top-nav a { padding: 8px 10px; font-size: 12px; }
  .registration-panel { align-items: flex-start; flex-direction: column; padding: 18px 20px; }
  .footer { flex-wrap: wrap; }
}
