:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f8f9fb;
    --surface-hover: #f3f6f8;
    --ink: #182024;
    --ink-soft: #4a545c;
    --muted: #66727d;
    --line: #e6eaee;
    --line-strong: #d4dbe2;
    --accent: #0e7a68;
    --accent-strong: #0a6455;
    --accent-soft: #e9f4f1;
    --accent-soft-strong: #d7ece6;
    --signal: #b97c12;
    --signal-soft: #fbf3e4;
    --danger: #c9444d;
    --danger-soft: #fbecee;
    --danger-border: #f0ccd0;
    --success: #19914c;
    --success-soft: #e8f6ed;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-card: 0 1px 2px rgba(24, 32, 36, .04), 0 10px 30px -20px rgba(24, 32, 36, .18);
    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-width: 320px; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1100px 420px at 50% -180px, rgba(14, 122, 104, .075), transparent 70%),
        var(--bg);
    color: var(--ink);
    font: 15px/1.6 var(--font);
    letter-spacing: .01em;
    -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; letter-spacing: inherit; }

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover { color: var(--accent); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--accent-soft-strong); color: var(--ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4dbe1; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #bdc7cf; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wrap {
    width: min(1120px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 28px 0 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.wrap-narrow {
    width: min(460px, calc(100vw - 40px));
    padding-top: 72px;
}

.wrap-admin { width: min(1200px, calc(100vw - 48px)); }

.topbar {
    min-width: 0;
    min-height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 12px 16px 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--shadow-card);
    color: var(--ink);
}

.brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--ink);
}

.brand:hover { color: var(--ink); }

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #18a089, #0b6153);
    color: #ffffff;
    font: 750 12px/1 var(--mono);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 12px -6px rgba(14, 122, 104, .55);
}

.brand-copy { display: grid; min-width: 0; line-height: 1.25; }
.brand-copy strong { font-size: 16px; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.brand-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11.5px;
}

.user-bar {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: var(--muted);
}

.account-chip {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
}

.account-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-soft);
}

.inline-form { display: inline; margin: 0; }

.btn-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-link:hover { background: var(--surface-soft); color: var(--accent-strong); }

.card {
    position: relative;
    min-width: 0;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.lookup-panel { padding-bottom: 22px; }
.data-panel { min-height: 300px; }

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
}

.privacy-note {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.privacy-note::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 0 3px var(--signal-soft);
}

h1,
h2 { margin: 0; color: var(--ink); line-height: 1.28; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: .005em; }
h2 { font-size: 20px; font-weight: 650; }

.hint {
    margin: 7px 0 18px;
    color: var(--muted);
    font-size: 13px;
}

.meta-inline {
    margin-left: 10px;
    color: var(--muted);
    font-size: 12px;
}

.query-form {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

input[type="text"],
input[type="password"] {
    min-width: 0;
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: var(--ink);
    caret-color: var(--accent);
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

input::placeholder { color: #a3adb6; }

input[type="text"]:hover:not(:disabled),
input[type="password"]:hover:not(:disabled) { border-color: #bcc6cf; }

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(14, 122, 104, .14);
}

button,
a.btn,
.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

button:hover,
a.btn:hover,
.btn:hover {
    border-color: var(--accent-strong);
    background: var(--accent-strong);
    color: #ffffff;
}

button:disabled { opacity: .45; cursor: not-allowed; }

button.ghost,
a.btn.ghost {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--ink-soft);
}

button.ghost:hover,
a.btn.ghost:hover {
    border-color: #bcc7d0;
    background: var(--surface-soft);
    color: var(--ink);
}

a.btn.topbar-cta {
    min-height: 36px;
    padding: 8px 16px;
    font-size: 13px;
}

button.compact {
    min-height: 34px;
    width: auto;
    padding: 7px 13px;
    font-size: 13px;
}

button.danger {
    min-height: 32px;
    padding: 5px 12px;
    border-color: var(--danger-border);
    background: var(--surface);
    color: var(--danger);
    font-size: 13px;
}

button.danger:hover { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

button.linkish {
    min-height: 32px;
    padding: 5px 11px;
    border-color: transparent;
    background: transparent;
    color: var(--accent-strong);
    font-size: 13px;
}

button.linkish:hover { border-color: var(--accent-soft-strong); background: var(--accent-soft); }

.result {
    margin-top: 18px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.result table,
.list-table {
    width: 100%;
    border-collapse: collapse;
}

td,
th {
    padding: 11px 14px;
    border-bottom: 1px solid #eef1f4;
    text-align: left;
    vertical-align: middle;
}

.result td:first-child {
    width: 104px;
    color: var(--muted);
    font-size: 12px;
}

.result tr:last-child td { border-bottom: 0; }

.list-table th {
    height: 42px;
    padding-top: 10px;
    padding-bottom: 10px;
    background: var(--surface-soft);
    color: #6b7680;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .05em;
}

.table-wrap .list-table { min-width: 860px; }
.wrap-admin .table-wrap .list-table { min-width: 920px; }
.list-table tbody tr:hover td { background: var(--surface-hover); }
.list-table tbody tr:last-child td { border-bottom: 0; }

.mono { color: var(--ink-soft); font-family: var(--mono); font-size: 12.5px; }

.live,
.off,
.missing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.live::before,
.off::before,
.missing::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 7px;
}

.live { color: var(--success); }
.live::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.off { color: var(--muted); }
.off::before { background: #aab4bd; box-shadow: 0 0 0 3px #eef1f4; }
.missing { color: var(--danger); }
.missing::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.result-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.list-head {
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}

.list-head .hint { margin-bottom: 0; }

.list-actions {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-control { display: inline-flex; }
.sort-control select {
    height: 34px;
    padding: 6px 30px 6px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.sort-control select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 122, 104, .14);
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-soft);
    animation: signal-pulse 2.2s ease-in-out infinite;
}

.sync-dot.busy { background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); animation: none; }
.sync-dot.err { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); animation: none; }

@keyframes signal-pulse {
    0%, 100% { opacity: .55; }
    50% { opacity: 1; }
}

.empty {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 30px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--muted);
    text-align: center;
}

.empty::before {
    content: "";
    width: 44px;
    height: 44px;
    margin-bottom: 5px;
    border-radius: 12px;
    background: #edf1f4 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238a949d' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M22 12h-6l-2 3h-4l-2-3H2'/><path d='M5.5 5h13l3.5 7v6a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-6l3.5-7z'/></svg>") center/20px no-repeat;
}

.empty strong { color: var(--ink-soft); font-size: 14px; font-weight: 650; }
.empty span { font-size: 13px; }

.guest-actions { display: flex; gap: 8px; margin-top: 12px; }
.table-wrap {
    min-width: 0;
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}
.ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.prev { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

tr.changed td { animation: flash 1.5s ease; }

@keyframes flash {
    from { background: #e3f3ef; }
    to { background: transparent; }
}

.error,
.ok {
    margin: 14px 0;
    padding: 11px 14px;
    border: 1px solid;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.error { border-color: var(--danger-border); background: var(--danger-soft); color: #b6353e; }
.ok { border-color: #c5e7d1; background: var(--success-soft); color: #15753d; }

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 30;
    max-width: min(400px, calc(100vw - 32px));
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 12px 34px -12px rgba(24, 32, 36, .28);
    font-size: 13.5px;
    white-space: pre-line;
}

.auth-card { padding: 30px; }
.auth-card h1 { font-size: 24px; }

.auth-form {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
}

.auth-switch { margin: 20px 0 0; text-align: center; }

.install-body {
    display: grid;
    align-items: center;
    min-height: 100vh;
}

.install-wrap {
    width: min(1080px, calc(100vw - 48px));
    padding: 28px 0;
}

.install-topbar { min-height: 66px; }

.install-mode {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    border: 1px solid var(--accent-soft-strong);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 650;
}

.install-mode span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 122, 104, .15);
}

.install-panel {
    min-width: 0;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(270px, .82fr) minmax(0, 1.75fr);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.install-aside {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 38px;
    padding: 42px 36px 34px;
    background: linear-gradient(158deg, #0d7264 0%, #0a564a 100%);
    color: #ffffff;
}

.install-aside .eyebrow { color: #a6ded3; }

.install-index {
    margin: 36px 0 12px;
    color: rgba(255, 255, 255, .55);
    font: 650 12px/1 var(--mono);
    letter-spacing: .08em;
}

.install-aside h1 { color: #ffffff; font-size: 27px; }

.install-aside > div > p:last-child {
    max-width: 290px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 13.5px;
    line-height: 1.75;
}

.install-steps {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.install-steps li {
    position: relative;
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding-left: 3px;
    color: rgba(255, 255, 255, .62);
    font-size: 12.5px;
    font-weight: 600;
}

.install-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 16px;
    top: 38px;
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, .2);
}

.install-steps li span {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    font: 650 10px/1 var(--mono);
}

.install-steps li.done { color: rgba(255, 255, 255, .86); }
.install-steps li.done span { border-color: transparent; background: rgba(255, 255, 255, .2); }
.install-steps li.active { color: #ffffff; }
.install-steps li.active span {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--accent-strong);
    box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .35);
}

.install-lock {
    margin: 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .72);
    font-size: 11.5px;
    line-height: 1.7;
}

.install-main {
    min-width: 0;
    padding: 40px 42px 36px;
}

.install-heading { margin-bottom: 24px; }
.install-heading h2 { font-size: 23px; }

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 26px;
}

.check-item {
    min-width: 0;
    min-height: 40px;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: var(--ink-soft);
    font-size: 12.5px;
    font-weight: 600;
}

.check-item strong { color: var(--muted); font-size: 11px; font-weight: 650; }

.check-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-soft);
}

.check-item.pass .check-dot {
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-soft);
}

.check-item.pass strong { color: var(--success); }
.check-item.fail { border-color: var(--danger-border); background: var(--danger-soft); }
.check-item.fail strong { color: var(--danger); }

.install-form {
    display: grid;
    gap: 15px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.install-form-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
}

.install-form-head small { color: var(--accent); font-size: 12px; }

.install-form label {
    display: grid;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
}

.install-passwords {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.install-form button { width: 100%; margin-top: 2px; }

.install-foot {
    margin: -2px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.admin-nav {
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    overflow-x: auto;
}

.admin-nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 9px;
    color: #67727c;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.admin-nav a:hover { background: var(--surface); color: var(--ink); }
.admin-nav a.active {
    background: var(--surface);
    color: var(--accent-strong);
    box-shadow: 0 1px 3px rgba(24, 32, 36, .08);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.stat {
    min-height: 104px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.stat-num {
    color: var(--ink);
    font: 750 30px/1.15 var(--mono);
    letter-spacing: -.02em;
}

.stat-label {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 650;
}

.badge.danger { background: var(--danger-soft); color: var(--danger); }

.admin-create {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
    align-items: end;
}

.admin-create .check {
    min-height: 44px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    white-space: nowrap;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.reset-form { display: inline-flex; align-items: center; gap: 6px; }

.reset-form input[type="password"] {
    width: 136px;
    height: 34px;
    padding: 6px 10px;
    font-size: 12.5px;
}

.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

.pager a,
.pager-current {
    min-width: 34px;
    min-height: 34px;
    display: grid;
    place-items: center;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.pager a:hover { border-color: var(--accent-soft-strong); color: var(--accent-strong); }
.pager-current { border-color: var(--accent); background: var(--accent); color: #ffffff; }

/* 头像与账号状态 */
.result-profile { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.result-name { color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.35; }
.result-name:hover { color: var(--accent-strong); }
.result-subline { display: flex; align-items: center; gap: 9px; margin-top: 5px; color: var(--muted); font-size: 12.5px; }
.result-subline .mono { margin-left: -4px; }

.avatar { position: relative; display: inline-flex; flex: 0 0 auto; overflow: hidden; border-radius: 12px; background: var(--accent-soft); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fb { width: 100%; height: 100%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); font-weight: 750; }
.avatar-sm { width: 38px; height: 38px; border-radius: 10px; }
.avatar-sm .avatar-fb { font-size: 15px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-lg .avatar-fb { font-size: 24px; }

.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell-meta { min-width: 0; }
.pinned-mark {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 650;
    vertical-align: middle;
}
.state-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.account-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 9px; border-radius: 999px; background: var(--surface-hover); color: var(--muted); font-size: 11.5px; font-weight: 650; }
.account-badge.danger { background: var(--danger-soft); color: var(--danger); }
.account-badge.warn { background: var(--signal-soft); color: var(--signal); }
.account-text { color: var(--ink-soft); }
.account-text.danger { color: var(--danger); font-weight: 650; }
.account-text.warn { color: var(--signal); font-weight: 650; }

.list-table tbody tr.pinned td { background: #f1f8f5; }
.list-table tbody tr.pinned:hover td { background: #e8f3ee; }

@media (max-width: 880px) {
    .stats-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
    .admin-create { grid-template-columns: 1fr 1fr; }
    .install-panel { grid-template-columns: minmax(235px, .7fr) minmax(0, 1.3fr); }
    .install-aside { padding: 32px 26px 28px; }
    .install-main { padding: 32px 30px 28px; }
    .check-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .wrap,
    .wrap-admin { width: min(100% - 28px, 1120px); padding-top: 14px; }
    .wrap-narrow { width: min(100% - 28px, 460px); padding-top: 24px; }
    .topbar { min-height: 64px; padding: 10px 12px; }
    .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
    .brand-copy small { display: none; }
    .user-bar { gap: 5px; }
    .account-chip { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
    .card { padding: 20px 17px; }
    .section-heading,
    .list-head { align-items: stretch; }
    .list-head { flex-direction: column; }
    .list-actions { flex-wrap: wrap; }
    .sort-control select { max-width: 150px; }
    .query-form { flex-direction: column; }
    .query-form button { width: 100%; }
    .result-actions { align-items: flex-start; flex-direction: column; }
    .meta-inline { margin-left: 0; }
    .stats-grid { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
    .admin-create { grid-template-columns: 1fr; }
    .admin-create .check { min-height: 34px; }
    .reset-form { flex-wrap: wrap; }
    .list-head .query-form { width: 100%; }
    .install-body { display: block; }
    .install-wrap { width: min(100% - 28px, 600px); padding: 14px 0 32px; }
    .install-panel { min-height: 0; grid-template-columns: 1fr; }
    .install-aside { gap: 26px; padding: 28px 22px 24px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
    .install-aside h1 { font-size: 24px; }
    .install-index { margin-top: 24px; }
    .install-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .install-steps li { min-height: 42px; align-items: flex-start; gap: 8px; font-size: 11.5px; }
    .install-steps li:not(:last-child)::after { left: 30px; top: 14px; width: calc(100% - 32px); height: 1px; }
    .install-steps li span { width: 26px; height: 26px; flex-basis: 26px; }
    .install-lock { padding-top: 15px; }
    .install-main { padding: 28px 22px 26px; }
    .install-heading h2 { font-size: 21px; }
    .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .check-item { grid-template-columns: 8px minmax(0, 1fr); }
    .check-item strong { display: none; }
    .install-passwords { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
    .brand-copy { display: none; }
    .topbar-cta { display: none !important; }
    .privacy-note { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .guest-actions { width: 100%; flex-direction: column; }
    .guest-actions .btn { width: 100%; }
    .install-topbar .brand-copy { display: grid; }
    .install-mode { padding-inline: 9px; }
    .check-grid { grid-template-columns: 1fr; }
}
