/* 氨筑火花系统后台样式 */
:root {
    --ink: #182235;
    --ink-soft: #344057;
    --muted: #738096;
    --muted-light: #9ca7ba;
    --line: #e7ebf2;
    --line-strong: #d8dfeb;
    --surface: #ffffff;
    --canvas: #f4f6fa;
    --canvas-deep: #edf1f7;
    --navy: #101a2b;
    --navy-soft: #17243a;
    --brand: #ee5a2a;
    --brand-deep: #d94717;
    --brand-soft: #fff1ea;
    --brand-line: #ffd9c7;
    --green: #0f9f6e;
    --green-soft: #e9faf3;
    --red: #d94046;
    --red-soft: #fdf0f0;
    --amber: #b77905;
    --amber-soft: #fff7e5;
    --blue: #3068d4;
    --blue-soft: #edf3ff;
    --shadow: 0 14px 38px rgba(23, 35, 58, 0.07);
    --shadow-soft: 0 5px 18px rgba(23, 35, 58, 0.05);
    --radius: 18px;
    --radius-sm: 11px;
    --sidebar-width: 258px;
    --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    color: var(--ink);
    background: var(--canvas);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand-deep);
    text-decoration: none;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

button:disabled {
    cursor: not-allowed;
}

h1, h2, h3, h4, p {
    margin: 0;
}

svg {
    display: block;
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 12.5px;
}

.break-all {
    word-break: break-all;
}

.text-muted {
    color: var(--muted);
}

.mt-14 {
    margin-top: 14px;
}

.mt-18 {
    margin-top: 18px;
}

.pt-9 {
    padding-top: 9px;
}

.stat-value-compact {
    margin-top: 14px;
    font-size: 19px;
}

.cell-sub-wide {
    max-width: 320px;
    margin-top: 0;
}

.nowrap {
    white-space: nowrap;
}

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

:focus-visible {
    outline: 3px solid rgba(238, 90, 42, 0.3);
    outline-offset: 2px;
}

/* 后台骨架 */
.app-body {
    background:
        radial-gradient(circle at 82% 0%, rgba(238, 90, 42, 0.055), transparent 28%),
        var(--canvas);
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    z-index: 40;
    display: flex;
    flex-direction: column;
    padding: 26px 18px 20px;
    color: #e8edf6;
    background:
        radial-gradient(circle at 18% 4%, rgba(255, 119, 61, 0.18), transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(56, 100, 180, 0.17), transparent 35%),
        linear-gradient(165deg, #111d30 0%, #0e1726 55%, #0c1421 100%);
    overflow-y: auto;
}

.sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 100% 34px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 65%);
}

.brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 28px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    font-size: 21px;
    font-weight: 700;
    background: linear-gradient(145deg, #ff814d, #e44413);
    box-shadow: 0 8px 20px rgba(238, 90, 42, 0.35);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
    color: #fff;
    font-size: 18px;
    letter-spacing: 0.04em;
}

.brand-copy small {
    margin-top: 6px;
    color: rgba(230, 238, 250, 0.45);
    font-size: 9px;
    letter-spacing: 0.18em;
}

.sidebar-section-label {
    position: relative;
    z-index: 1;
    padding: 0 12px 9px;
    color: rgba(223, 232, 246, 0.38);
    font-size: 11px;
    letter-spacing: 0.12em;
}

.side-nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: rgba(229, 237, 248, 0.7);
    font-size: 14px;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.side-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
}

.side-link.is-active {
    color: #fff;
    border-color: rgba(255, 137, 89, 0.17);
    background: linear-gradient(90deg, rgba(238, 90, 42, 0.24), rgba(238, 90, 42, 0.07));
    box-shadow: inset 3px 0 0 var(--brand);
}

.side-link.is-active .icon {
    color: #ff9a6e;
}

.side-link .icon {
    width: 19px;
    height: 19px;
    color: rgba(228, 237, 250, 0.55);
}

.sidebar-tip {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    margin: auto 4px 18px;
    padding: 15px 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.035);
}

.sidebar-tip .tip-dot {
    width: 7px;
    height: 7px;
    margin-top: 7px;
    border-radius: 50%;
    background: #58d6a6;
    box-shadow: 0 0 0 4px rgba(88, 214, 166, 0.1);
    flex: 0 0 auto;
}

.sidebar-tip strong {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12.5px;
    font-weight: 600;
}

.sidebar-tip p {
    margin-top: 3px;
    color: rgba(222, 232, 245, 0.42);
    font-size: 11.5px;
    line-height: 1.6;
}

.sidebar-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #ffece4;
    background: rgba(238, 90, 42, 0.22);
    border: 1px solid rgba(255, 154, 110, 0.2);
    font-weight: 700;
    font-size: 13px;
    flex: 0 0 auto;
}

.admin-chip-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.admin-chip-copy strong {
    max-width: 120px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.86);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 600;
}

.admin-chip-copy small {
    margin-top: 3px;
    color: rgba(225, 235, 248, 0.38);
    font-size: 10.5px;
}

.logout-form {
    margin: 0;
}

.icon-button {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover {
    color: var(--ink);
    background: var(--canvas);
    border-color: var(--line);
}

.logout-button {
    color: rgba(230, 238, 249, 0.5);
}

.logout-button:hover {
    color: #ff9a75;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 82px;
    padding: 17px 34px;
    border-bottom: 1px solid rgba(226, 232, 241, 0.75);
    background: rgba(244, 246, 250, 0.83);
    backdrop-filter: blur(16px);
}

.menu-button {
    display: none;
}

.page-heading {
    min-width: 0;
}

.page-heading h1 {
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-heading p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12.5px;
}

.topbar-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.topbar-divider {
    width: 1px;
    height: 16px;
    background: var(--line-strong);
}

.topbar-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #547064;
}

.topbar-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(15, 159, 110, 0.08);
}

.page-content {
    flex: 1;
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 28px 34px 42px;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 34px 24px;
    color: var(--muted-light);
    font-size: 11.5px;
}

/* 通用组件 */
.card {
    border: 1px solid rgba(229, 234, 242, 0.95);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 24px 17px;
    border-bottom: 1px solid var(--line);
}

.card-header.no-border {
    border-bottom: 0;
    padding-bottom: 6px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 650;
}

.card-title .title-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
}

.card-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.card-body {
    padding: 23px 24px;
}

.card-body.flush {
    padding: 0;
}

.card-body + .card-body {
    border-top: 1px solid var(--line);
}

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

.section-heading h2 {
    font-size: 15px;
    font-weight: 650;
}

.section-heading p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.toolbar-hint {
    color: var(--muted);
    font-size: 12.5px;
}

.toolbar-hint strong {
    color: var(--ink-soft);
    font-weight: 600;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.3;
    white-space: nowrap;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn .icon {
    width: 16px;
    height: 16px;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(140deg, #f56a37, var(--brand));
    border-color: var(--brand);
    box-shadow: 0 6px 16px rgba(238, 90, 42, 0.18);
}

.btn-primary:hover {
    color: #fff;
    background: linear-gradient(140deg, var(--brand), var(--brand-deep));
    border-color: var(--brand-deep);
}

.btn-secondary {
    color: var(--ink-soft);
    background: var(--surface);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    color: var(--ink);
    border-color: #bcc7d8;
    background: #fbfcfe;
}

.btn-soft {
    color: var(--brand-deep);
    background: var(--brand-soft);
    border-color: #ffe0d2;
}

.btn-soft:hover {
    color: var(--brand-deep);
    background: #ffe7dc;
    border-color: var(--brand-line);
}

.btn-ghost {
    color: var(--muted);
    background: transparent;
    border-color: transparent;
}

.btn-ghost:hover {
    color: var(--ink);
    background: var(--canvas);
}

.btn-danger {
    color: var(--red);
    background: var(--surface);
    border-color: #f2d4d5;
}

.btn-danger:hover {
    color: #b92c32;
    background: var(--red-soft);
    border-color: #ecc0c2;
}

.btn-danger-solid {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
}

.btn-danger-solid:hover {
    color: #fff;
    background: #c43339;
    border-color: #c43339;
}

.btn-xs {
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.btn-sm {
    min-height: 34px;
    padding: 6px 13px;
    font-size: 12.5px;
}

.btn-block {
    width: 100%;
}

.btn[disabled],
.btn.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.action-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

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

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    padding: 12px 16px;
    color: var(--muted);
    background: #fafbfd;
    border-bottom: 1px solid var(--line);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 15px 16px;
    border-bottom: 1px solid #eff2f7;
    vertical-align: middle;
}

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

.table tbody tr:hover {
    background: #fcfdff;
}

.table .cell-account {
    min-width: 160px;
}

.cell-main {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-weight: 600;
}

.cell-sub {
    display: block;
    max-width: 260px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-preview {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink-soft);
}

.status-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 23px;
    padding: 2px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 550;
    line-height: 1.5;
    white-space: nowrap;
}

.badge i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.badge-success {
    color: #0a7c57;
    background: var(--green-soft);
    border-color: #c9f0e0;
}

.badge-danger {
    color: #b53137;
    background: var(--red-soft);
    border-color: #f4d6d7;
}

.badge-warning {
    color: #956207;
    background: var(--amber-soft);
    border-color: #f4e2b5;
}

.badge-info {
    color: #2a5dbb;
    background: var(--blue-soft);
    border-color: #d9e5ff;
}

.badge-neutral {
    color: #68758a;
    background: #f2f4f8;
    border-color: #e6eaf1;
}

.badge-brand {
    color: var(--brand-deep);
    background: var(--brand-soft);
    border-color: var(--brand-line);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink-soft);
    background: var(--surface);
    font-size: 13px;
    box-shadow: var(--shadow-soft);
}

.alert-mark {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--muted);
    flex: 0 0 auto;
}

.alert-mark::after {
    content: "i";
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
}

.alert-success {
    border-color: #ceefe2;
    background: #f5fcf9;
    color: #1d6e53;
}

.alert-success .alert-mark {
    background: var(--green);
}

.alert-success .alert-mark::after {
    content: "✓";
}

.alert-error {
    border-color: #f1d1d2;
    background: #fff8f8;
    color: #9e3035;
}

.alert-error .alert-mark {
    background: var(--red);
}

.alert-error .alert-mark::after {
    content: "!";
}

.alert-warning {
    border-color: #f1e0b6;
    background: #fffcf4;
    color: #86600f;
}

.alert-warning .alert-mark {
    background: var(--amber);
}

.alert-warning .alert-mark::after {
    content: "!";
}

.alert-info {
    border-color: #dbe6fb;
    background: #f7faff;
    color: #33578f;
}

.alert-info .alert-mark {
    background: var(--blue);
}

/* 表单 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px 20px;
}

.form-grid .field-full {
    grid-column: 1 / -1;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field > label,
.field-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--ink-soft);
    font-size: 12.5px;
    font-weight: 600;
}

.required {
    color: var(--brand);
}

.field-hint {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.65;
}

.field-hint code {
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--canvas-deep);
    color: var(--ink-soft);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
}

.input,
.textarea,
.select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input::placeholder,
.textarea::placeholder {
    color: #a9b3c4;
}

.input:hover,
.textarea:hover,
.select:hover {
    border-color: #c5cfdd;
}

.input:focus,
.textarea:focus,
.select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(238, 90, 42, 0.1);
}

.textarea {
    min-height: 132px;
    resize: vertical;
    line-height: 1.75;
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
    border-color: #e4979a;
    background: #fffafa;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.form-actions .btn-primary {
    min-width: 116px;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--ink-soft);
    font-size: 12.5px;
}

.check-row input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--brand);
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink-soft);
    font-size: 12.5px;
    cursor: pointer;
    user-select: none;
}

.switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.switch-track {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 99px;
    background: #ccd4e0;
    transition: background 0.18s ease;
    flex: 0 0 auto;
}

.switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(16, 26, 43, 0.24);
    transition: transform 0.18s ease;
}

.switch input:checked + .switch-track {
    background: var(--brand);
}

.switch input:checked + .switch-track::after {
    transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
    outline: 3px solid rgba(238, 90, 42, 0.24);
    outline-offset: 2px;
}

.form-error-list {
    margin: 0;
    padding-left: 18px;
}

.form-error-list li + li {
    margin-top: 4px;
}

/* 控制台 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 20px 21px;
    border: 1px solid rgba(229, 234, 242, 0.95);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -40px;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: var(--canvas);
}

.stat-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
}

.stat-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--brand-deep);
    background: var(--brand-soft);
}

.stat-icon.green {
    color: #0b815a;
    background: var(--green-soft);
}

.stat-icon.blue {
    color: #315eb3;
    background: var(--blue-soft);
}

.stat-icon.amber {
    color: #916107;
    background: var(--amber-soft);
}

.stat-value {
    position: relative;
    z-index: 1;
    margin-top: 9px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat-note {
    position: relative;
    z-index: 1;
    margin-top: 7px;
    color: var(--muted-light);
    font-size: 11.5px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
    gap: 20px;
    margin-bottom: 20px;
}

.task-panel {
    position: relative;
    overflow: hidden;
    color: #eaf0f9;
    background:
        radial-gradient(circle at 91% 13%, rgba(238, 90, 42, 0.22), transparent 26%),
        linear-gradient(145deg, #162238, #0e1726);
    border-color: #1c2940;
}

.task-panel::after {
    content: "";
    position: absolute;
    top: -90px;
    right: -50px;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 50%;
}

.task-panel .card-header {
    border-color: rgba(255, 255, 255, 0.08);
}

.task-panel .card-title {
    color: #f6f8fc;
}

.task-panel .card-subtitle {
    color: rgba(225, 234, 247, 0.5);
}

.task-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: rgba(236, 243, 252, 0.68);
    font-size: 11px;
    white-space: nowrap;
}

.task-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #55d9a6;
    box-shadow: 0 0 0 4px rgba(85, 217, 166, 0.09);
}

.task-panel .card-body {
    position: relative;
    z-index: 1;
}

.task-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.task-metric {
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
}

.task-metric span {
    display: block;
    color: rgba(223, 233, 246, 0.45);
    font-size: 10.5px;
}

.task-metric strong {
    display: block;
    margin-top: 4px;
    color: #f2f6fc;
    font-size: 14px;
    font-weight: 600;
}

.task-command {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 213, 193, 0.78);
    background: rgba(4, 10, 20, 0.24);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
}

.quick-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 5px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
}

.quick-item:last-child {
    border-bottom: 0;
}

.quick-icon {
    width: 33px;
    height: 33px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    flex: 0 0 auto;
}

.quick-copy {
    min-width: 0;
}

.quick-copy strong {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
}

.quick-copy > span {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 11px;
}

.quick-item .icon-arrow {
    margin-left: auto;
    color: #b4bdca;
    width: 16px;
    height: 16px;
}

.below-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
    gap: 20px;
}

.readiness-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.readiness-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
}

.readiness-item .icon {
    width: 17px;
    height: 17px;
    margin-top: 1px;
}

.readiness-item strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
}

.readiness-item p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.readiness-ok .icon {
    color: var(--green);
}

.readiness-warn {
    border-color: #f2e1bc;
    background: #fffdf7;
}

.readiness-warn .icon {
    color: var(--amber);
}

/* 账号页 */
.page-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding: 21px 23px;
    border: 1px solid #ffe1d3;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 96% 10%, rgba(238, 90, 42, 0.13), transparent 28%),
        linear-gradient(120deg, #fff9f5, #fff);
}

.page-hero::after {
    content: "火";
    position: absolute;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(238, 90, 42, 0.06);
    font-size: 88px;
    font-weight: 800;
    line-height: 1;
}

.page-hero-copy {
    position: relative;
    z-index: 1;
}

.page-hero h2 {
    font-size: 16px;
    font-weight: 650;
}

.page-hero p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.page-hero .btn {
    position: relative;
    z-index: 1;
    margin-left: auto;
}

.account-name {
    font-weight: 650;
}

.account-id {
    color: var(--muted-light);
    font-size: 10.5px;
}

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.aside-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aside-note {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfe;
}

.aside-note h3 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 650;
}

.aside-note p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.75;
}

.aside-note code {
    color: var(--ink-soft);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 10.5px;
}

.inline-info {
    display: flex;
    gap: 9px;
    padding: 11px 13px;
    border: 1px solid #dce7fb;
    border-radius: 10px;
    color: #46618d;
    background: #f7faff;
    font-size: 11.5px;
    line-height: 1.65;
}

.inline-info .icon {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    color: var(--blue);
    flex: 0 0 auto;
}

.account-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfe;
}

.account-identity .avatar {
    width: 40px;
    height: 40px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    border-color: #ffdfd1;
    border-radius: 12px;
    font-size: 16px;
}

.account-identity strong {
    display: block;
    font-size: 13px;
}

.account-identity > div > span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

/* 好友页 */
.friend-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: start;
}

.friend-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fbfcfe;
}

.friend-stat span {
    color: var(--muted);
    font-size: 11.5px;
}

.friend-stat strong {
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}

.add-friend-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.danger-zone {
    margin-top: 19px;
    padding: 15px;
    border: 1px solid #f1d7d8;
    border-radius: 11px;
    background: #fffafa;
}

.danger-zone h3 {
    color: #a1373b;
    font-size: 12px;
    font-weight: 650;
}

.danger-zone p {
    margin-top: 4px;
    color: #9b7274;
    font-size: 11px;
    line-height: 1.6;
}

.danger-zone .btn {
    margin-top: 10px;
}

/* 代理设置 */
.settings-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: start;
}

.proxy-preview {
    position: relative;
    overflow: hidden;
    padding: 23px;
    border-radius: var(--radius);
    color: #edf3fc;
    background:
        radial-gradient(circle at 88% 14%, rgba(238, 90, 42, 0.22), transparent 30%),
        linear-gradient(150deg, #18253b, #0f1827);
    box-shadow: var(--shadow);
}

.proxy-preview::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -58px;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.proxy-preview-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.proxy-preview-label {
    color: rgba(230, 239, 251, 0.5);
    font-size: 11px;
    letter-spacing: 0.04em;
}

.proxy-preview-address {
    position: relative;
    z-index: 1;
    margin-top: 20px;
    color: #ffdacb;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-all;
}

.proxy-preview-meta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    color: rgba(225, 235, 248, 0.42);
    font-size: 11px;
}

.proxy-hint {
    margin-top: 13px;
    padding: 11px 12px;
    border: 1px solid #f1e1bd;
    border-radius: 10px;
    color: #86600f;
    background: #fffdf7;
    font-size: 11.5px;
    line-height: 1.65;
}

.code-block {
    position: relative;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink-soft);
    background: #f8fafc;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 11.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
}

details.help-block {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 14px;
}

details.help-block summary {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

details.help-block summary::-webkit-details-marker {
    display: none;
}

details.help-block summary::before {
    content: "＋";
    margin-right: 6px;
    color: var(--brand);
}

details.help-block[open] summary::before {
    content: "－";
}

details.help-block p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.75;
}

/* 日志页 */
.logs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 16px;
}

.log-meta {
    color: var(--muted);
    font-size: 12px;
}

.log-meta strong {
    color: var(--ink-soft);
}

.readonly-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-size: 11px;
}

.readonly-note::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--muted-light);
}

.log-desc {
    min-width: 240px;
    color: var(--ink-soft);
    font-size: 12.5px;
    line-height: 1.65;
    word-break: break-word;
}

.log-action {
    white-space: nowrap;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px 24px;
    text-align: center;
}

.empty-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--muted-light);
    background: #fbfcfe;
}

.empty-icon .icon {
    width: 24px;
    height: 24px;
}

.empty-state h3 {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
}

.empty-state p {
    max-width: 380px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.empty-state .btn {
    margin-top: 15px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: wrap;
    padding: 16px 21px;
    border-top: 1px solid var(--line);
}

.pagination-summary {
    margin-right: auto;
    color: var(--muted);
    font-size: 11.5px;
}

.page-link {
    min-width: 31px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink-soft);
    background: #fff;
    font-size: 11.5px;
}

.page-link:hover {
    color: var(--brand-deep);
    border-color: var(--brand-line);
    background: var(--brand-soft);
}

.page-link.is-current {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}

.page-link.is-disabled {
    color: #b7c0ce;
    background: #f8f9fc;
    pointer-events: none;
}

.page-ellipsis {
    padding: 0 2px;
    color: var(--muted-light);
    font-size: 12px;
}

.narrow-card {
    max-width: 600px;
}

/* 二维码登录弹窗 */
body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(10, 17, 29, 0.54);
    backdrop-filter: blur(5px);
}

.modal-backdrop.is-open {
    display: flex;
}

.modal {
    width: min(470px, 100%);
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(5, 12, 24, 0.3);
    animation: modal-in 0.18s ease-out;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 21px 23px 0;
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.modal-header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.modal-close {
    margin: -3px -5px 0 0;
    flex: 0 0 auto;
}

.modal-body {
    padding: 18px 23px 23px;
}

.qr-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcfe;
}

.qr-account {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.qr-account-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--brand-deep);
    background: var(--brand-soft);
}

.qr-account-icon .icon {
    width: 15px;
    height: 15px;
}

.qr-account strong {
    font-weight: 600;
}

.qr-account-mode {
    margin-left: auto;
    color: var(--muted-light);
    font-size: 10.5px;
}

.qr-stage {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 18px 0 8px;
}

.qr-box {
    position: relative;
    width: 220px;
    height: 220px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}

.qr-box img,
.qr-box canvas {
    max-width: 100%;
    height: auto;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: var(--muted-light);
    font-size: 11px;
}

.qr-placeholder .icon {
    width: 28px;
    height: 28px;
}

.qr-expired {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.qr-expired.is-visible {
    display: flex;
}

.qr-expired strong {
    color: var(--ink);
    font-size: 13px;
}

.qr-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 24px;
    padding-top: 6px;
    color: var(--ink-soft);
    font-size: 12px;
}

.qr-state-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b3bdcb;
}

.qr-state-dot.is-pending {
    background: #d69a18;
}

.qr-state-dot.is-scanned {
    background: #d69a18;
    animation: pulse 1.3s ease-in-out infinite;
}

.qr-state-dot.is-success {
    background: var(--green);
}

.qr-state-dot.is-failed,
.qr-state-dot.is-expired {
    background: var(--red);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(214, 154, 24, 0.3); }
    50% { box-shadow: 0 0 0 5px rgba(214, 154, 24, 0.06); }
}

.qr-hint {
    margin-top: 12px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

.qr-meta-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 9px;
    color: var(--muted-light);
    font-size: 10.5px;
}

.qr-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.qr-actions .btn {
    flex: 1;
}

.qr-actions .qr-help {
    flex: 0 0 auto;
    padding-right: 4px;
    padding-left: 4px;
    color: var(--muted);
    font-size: 11px;
}

.qr-success-panel {
    display: none;
    padding: 16px;
    border: 1px solid #ceefe2;
    border-radius: 12px;
    background: #f5fcf9;
    text-align: center;
}

.qr-success-panel.is-visible {
    display: block;
}

.qr-success-panel h3 {
    color: #126b4e;
    font-size: 14px;
}

.qr-success-panel p {
    margin-top: 3px;
    color: #5c8373;
    font-size: 11.5px;
}

.qr-success-panel .btn {
    margin-top: 12px;
}

/* 首次安装页 */
.install-body {
    min-height: 100vh;
    padding: 34px 22px;
    background:
        radial-gradient(circle at 8% 8%, rgba(238, 90, 42, 0.12), transparent 30%),
        radial-gradient(circle at 92% 86%, rgba(48, 104, 212, 0.1), transparent 34%),
        #f1f4f9;
}

.install-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 370px minmax(0, 1fr);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(24, 34, 53, 0.14);
}

.install-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 36px 32px;
    color: #f3f7fc;
    background:
        radial-gradient(circle at 88% 8%, rgba(238, 90, 42, 0.25), transparent 27%),
        radial-gradient(circle at 12% 96%, rgba(55, 106, 195, 0.2), transparent 34%),
        linear-gradient(155deg, #17243a 0%, #101a2b 58%, #0c1420 100%);
}

.install-aside::after {
    content: "";
    position: absolute;
    right: -120px;
    top: 130px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.install-brand {
    position: relative;
    z-index: 1;
    padding: 0;
}

.install-intro {
    position: relative;
    z-index: 1;
    margin-top: 48px;
}

.install-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ff9c72;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.14em;
}

.install-intro h1 {
    margin-top: 10px;
    color: #fff;
    font-size: 28px;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.install-intro p {
    margin-top: 12px;
    color: rgba(224, 234, 247, 0.5);
    font-size: 12px;
    line-height: 1.85;
}

.install-steps {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 29px 0 24px;
    padding: 0;
    list-style: none;
}

.install-steps li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
}

.install-steps li > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: rgba(231, 239, 249, 0.5);
    background: rgba(255, 255, 255, 0.06);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    flex: 0 0 auto;
}

.install-steps li.is-active {
    border-color: rgba(255, 138, 91, 0.2);
    background: rgba(238, 90, 42, 0.08);
}

.install-steps li.is-active > span {
    color: #ffe6da;
    background: rgba(238, 90, 42, 0.34);
}

.install-steps li.is-done {
    border-color: rgba(85, 217, 166, 0.12);
    background: rgba(85, 217, 166, 0.035);
}

.install-steps li.is-done > span {
    color: #a9eed6;
    background: rgba(85, 217, 166, 0.13);
}

.install-steps li.is-done > span::after {
    content: "";
}

.install-steps li.is-done strong {
    color: rgba(232, 246, 240, 0.72);
}

.install-steps strong {
    display: block;
    color: rgba(247, 250, 255, 0.86);
    font-size: 12px;
    font-weight: 600;
}

.install-steps small {
    display: block;
    margin-top: 2px;
    color: rgba(222, 232, 246, 0.38);
    font-size: 10.5px;
}

.install-env {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 19px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.install-env-title {
    display: block;
    margin-bottom: 9px;
    color: rgba(220, 231, 245, 0.4);
    font-size: 10px;
    letter-spacing: 0.1em;
}

.install-env-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 0;
    color: rgba(231, 239, 249, 0.65);
    font-size: 10.5px;
}

.install-env-item small {
    margin-left: auto;
    color: rgba(222, 232, 246, 0.3);
    font-size: 9.5px;
}

.env-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.install-env-item.is-ok .env-dot {
    background: #55d9a6;
}

.install-env-item.is-bad .env-dot {
    background: #ff826d;
}

.install-env-item.is-bad {
    color: #ffb5a7;
}

.install-panel {
    display: flex;
    flex-direction: column;
    padding: 38px 44px 26px;
    min-width: 0;
}

.install-panel-head {
    margin-bottom: 22px;
}

.install-panel-head .install-kicker {
    color: var(--brand-deep);
}

.install-panel-head h2 {
    margin-top: 5px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.install-panel-head p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.install-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.install-section {
    padding-bottom: 21px;
    border-bottom: 1px solid var(--line);
}

.install-section-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 16px;
}

.install-section-head > span {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border: 1px solid var(--brand-line);
    border-radius: 8px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 600;
    flex: 0 0 auto;
}

.install-section-head h3 {
    font-size: 14px;
    font-weight: 650;
}

.install-section-head p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.install-form .input {
    background: #fbfcfe;
}

.install-form .input:focus {
    background: #fff;
}

.install-note {
    padding: 11px 13px;
    border: 1px solid #f1e1bd;
    border-radius: 10px;
    color: #85600f;
    background: #fffdf7;
    font-size: 11px;
    line-height: 1.7;
}

.install-submit {
    min-height: 46px;
    font-size: 13.5px;
}

.install-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.install-nav .btn-primary {
    flex: 1;
    min-height: 44px;
    white-space: normal;
    text-align: center;
}

.install-nav .btn-ghost {
    flex: 0 0 auto;
}

.install-footnote {
    margin-top: -9px;
    color: var(--muted-light);
    font-size: 10.5px;
    text-align: center;
}

.install-footer {
    margin-top: auto;
    padding-top: 25px;
    color: var(--muted-light);
    font-size: 10px;
    text-align: center;
}

.install-inline-alert {
    margin-bottom: 0;
}

.install-summary {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid #d9e9e3;
    border-radius: 11px;
    background: #f7fcfa;
}

.install-summary-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #0b815a;
    background: var(--green-soft);
    flex: 0 0 auto;
}

.install-summary-mark .icon {
    width: 16px;
    height: 16px;
}

.install-summary-copy {
    min-width: 0;
}

.install-summary-copy span {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.install-summary-copy strong {
    display: block;
    margin-top: 1px;
    color: var(--ink-soft);
    font-size: 12.5px;
}

.install-summary-copy small {
    display: block;
    margin-top: 2px;
    color: var(--muted-light);
    font-size: 10.5px;
    word-break: break-all;
}

.install-summary > .btn {
    margin-left: auto;
    flex: 0 0 auto;
}

.install-done {
    padding: 27px 23px;
    border: 1px solid #ceefe2;
    border-radius: 16px;
    background:
        radial-gradient(circle at 90% 10%, rgba(15, 159, 110, 0.09), transparent 30%),
        #f7fcfa;
    text-align: center;
}

.install-done-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 13px;
    border: 1px solid #bdebd9;
    border-radius: 50%;
    color: #0b815a;
    background: #e9faf3;
    font-size: 25px;
    font-weight: 700;
}

.install-done h3 {
    color: #145e49;
    font-size: 20px;
}

.install-done p {
    max-width: 440px;
    margin: 7px auto 0;
    color: #628576;
    font-size: 12px;
    line-height: 1.8;
}

.install-done-section {
    margin-top: 20px;
    border-bottom: 0;
    padding-bottom: 0;
}

.install-blocked {
    padding: 22px;
    border: 1px solid #f1d7b9;
    border-radius: 14px;
    color: #76521b;
    background: #fffbf3;
}

.install-blocked strong {
    display: block;
    font-size: 14px;
}

.install-blocked p {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.8;
}

.install-blocked p:last-child {
    color: #967248;
}

.install-body .alert {
    margin-bottom: 18px;
}

/* 登录页 */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 10%, rgba(238, 90, 42, 0.13), transparent 30%),
        radial-gradient(circle at 90% 88%, rgba(48, 104, 212, 0.1), transparent 32%),
        #f1f4f9;
}

.auth-shell {
    width: min(1080px, calc(100% - 42px));
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.06fr 0.94fr;
    margin: 6vh auto;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 26px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 28px 80px rgba(24, 34, 53, 0.14);
}

.auth-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 48px;
    color: #f4f7fc;
    background:
        radial-gradient(circle at 87% 14%, rgba(238, 90, 42, 0.3), transparent 26%),
        radial-gradient(circle at 16% 92%, rgba(55, 106, 195, 0.28), transparent 34%),
        linear-gradient(150deg, #17243a 0%, #0f1928 58%, #0c1420 100%);
}

.auth-visual::before {
    content: "";
    position: absolute;
    top: 17%;
    right: -105px;
    width: 340px;
    height: 340px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.auth-visual::after {
    content: "";
    position: absolute;
    top: 24%;
    right: -50px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255, 126, 78, 0.16);
    border-radius: 50%;
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand .brand-mark {
    width: 44px;
    height: 44px;
}

.auth-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.auth-brand-copy strong {
    font-size: 19px;
    letter-spacing: 0.04em;
}

.auth-brand-copy small {
    margin-top: 5px;
    color: rgba(230, 238, 250, 0.45);
    font-size: 9px;
    letter-spacing: 0.18em;
}

.auth-hero {
    position: relative;
    z-index: 1;
    margin-top: auto;
    margin-bottom: 42px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
    color: rgba(246, 238, 228, 0.72);
    background: rgba(255, 255, 255, 0.04);
    font-size: 10.5px;
}

.auth-eyebrow i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ff956b;
}

.auth-hero h1 {
    margin-top: 20px;
    font-size: clamp(30px, 4vw, 43px);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -0.04em;
}

.auth-hero h1 span {
    color: #ff9b72;
}

.auth-hero p {
    max-width: 390px;
    margin-top: 14px;
    color: rgba(225, 234, 247, 0.55);
    font-size: 13px;
    line-height: 1.9;
}

.auth-features {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.auth-feature {
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
}

.auth-feature strong {
    display: block;
    color: rgba(245, 248, 253, 0.86);
    font-size: 11.5px;
    font-weight: 550;
}

.auth-feature span {
    display: block;
    margin-top: 3px;
    color: rgba(221, 232, 247, 0.38);
    font-size: 10px;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px 54px;
    background: #fff;
}

.auth-panel-head {
    margin-bottom: 27px;
}

.auth-panel-head .mini-label {
    color: var(--brand-deep);
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.12em;
}

.auth-panel-head h2 {
    margin-top: 5px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-panel-head p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.auth-form .field > label {
    font-size: 12px;
}

.auth-form .input {
    min-height: 46px;
    padding: 11px 13px;
    background: #fbfcfe;
}

.auth-form .input:focus {
    background: #fff;
}

.auth-submit {
    min-height: 46px;
    margin-top: 3px;
    font-size: 13.5px;
}

.auth-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 19px;
    color: var(--muted-light);
    font-size: 10.5px;
}

.auth-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.auth-meta i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--green);
}

.auth-footer {
    margin-top: auto;
    padding-top: 38px;
    color: #b0b9c7;
    font-size: 10.5px;
}

.auth-notice {
    margin-bottom: 18px;
}

/* 扫码回调结果页 */
.callback-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 16%, rgba(238, 90, 42, 0.1), transparent 30%),
        radial-gradient(circle at 85% 82%, rgba(48, 104, 212, 0.08), transparent 34%),
        var(--canvas);
}

.result-card {
    width: min(460px, 100%);
    padding: 35px 36px 36px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}

.result-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 27px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
}

.result-brand .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 15px;
    box-shadow: none;
}

.result-badge {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin: 0 auto 17px;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
}

.result-success {
    color: #0b7b58;
    background: var(--green-soft);
    border: 1px solid #c9f0e0;
}

.result-failure {
    color: var(--red);
    background: var(--red-soft);
    border: 1px solid #f1d1d2;
}

.result-card h1 {
    font-size: 21px;
    letter-spacing: -0.02em;
}

.result-account {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 12.5px;
}

.result-message {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
}

.result-tip {
    margin: 14px 0 22px;
    padding: 11px 13px;
    border-radius: 10px;
    color: #7c8492;
    background: #f7f9fc;
    font-size: 11px;
    line-height: 1.7;
}

/* 错误页 */
.abort-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 20%, rgba(238, 90, 42, 0.09), transparent 30%),
        var(--canvas);
}

.abort-card {
    width: min(460px, 100%);
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}

.abort-code {
    color: var(--brand);
    font-size: 52px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.04em;
}

.abort-card h1 {
    margin-top: 12px;
    font-size: 20px;
}

.abort-card p {
    margin: 8px 0 22px;
    color: var(--muted);
    font-size: 13px;
    white-space: pre-wrap;
}

/* 响应式 */
@media (max-width: 1220px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .below-grid,
    .settings-grid,
    .form-layout,
    .friend-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-shell {
        grid-template-columns: 1fr 0.95fr;
    }

    .auth-panel {
        padding: 42px 38px;
    }

    .auth-visual {
        padding: 38px;
    }
}

@media (max-width: 960px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        width: 264px;
        transform: translateX(-102%);
        transition: transform 0.2s ease;
        box-shadow: 20px 0 60px rgba(6, 12, 23, 0.25);
        z-index: 80;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 70;
        display: none;
        background: rgba(8, 15, 26, 0.42);
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.is-open {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .menu-button {
        display: inline-grid;
    }

    .topbar {
        padding: 15px 22px;
    }

    .page-content {
        padding: 22px;
    }

    .app-footer {
        padding: 14px 22px 20px;
    }

    .auth-body {
        padding: 20px 0;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        margin: 0 auto;
        min-height: 0;
        width: min(560px, calc(100% - 32px));
    }

    .auth-visual {
        min-height: 250px;
        padding: 31px;
    }

    .auth-hero {
        margin: 38px 0 26px;
    }

    .auth-hero h1 {
        font-size: 31px;
    }

    .auth-hero p {
        margin-top: 10px;
    }

    .auth-features {
        display: none;
    }

    .auth-panel {
        padding: 35px 31px;
    }

    .auth-footer {
        padding-top: 26px;
    }

    .install-body {
        padding: 20px;
    }

    .install-shell {
        grid-template-columns: 1fr;
    }

    .install-aside {
        padding: 30px;
    }

    .install-intro {
        margin-top: 30px;
    }

    .install-steps {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .install-env {
        margin-top: 24px;
    }

    .install-panel {
        padding: 32px;
    }
}

@media (max-width: 700px) {
    .topbar-meta .today,
    .topbar-divider {
        display: none;
    }

    .page-heading h1 {
        font-size: 19px;
    }

    .page-heading p {
        display: none;
    }

    .stat-grid {
        gap: 12px;
    }

    .stat-card {
        padding: 17px;
    }

    .stat-value {
        font-size: 25px;
    }

    .dashboard-grid,
    .below-grid {
        gap: 14px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card-header,
    .card-body {
        padding-right: 18px;
        padding-left: 18px;
    }

    .page-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
    }

    .page-content {
        padding: 18px 15px 32px;
    }

    .topbar {
        padding: 13px 15px;
        min-height: 70px;
    }

    .app-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 12px 15px 20px;
    }

    .task-metrics {
        grid-template-columns: 1fr;
    }

    .pagination {
        justify-content: center;
        padding: 14px;
    }

    .pagination-summary {
        width: 100%;
        text-align: center;
        margin-bottom: 3px;
    }

    .auth-visual {
        min-height: auto;
        padding: 25px;
    }

    .auth-hero {
        margin: 33px 0 2px;
    }

    .auth-hero h1 {
        font-size: 27px;
    }

    .auth-hero h1 br {
        display: none;
    }

    .auth-hero p {
        font-size: 12px;
    }

    .auth-panel {
        padding: 29px 23px;
    }

    .auth-panel-head h2 {
        font-size: 23px;
    }

    .auth-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .install-body {
        padding: 0;
        background: #fff;
    }

    .install-shell {
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .install-aside {
        padding: 26px 21px;
    }

    .install-intro {
        margin-top: 27px;
    }

    .install-intro h1 {
        font-size: 24px;
    }

    .install-steps {
        grid-template-columns: 1fr;
        gap: 6px;
        margin: 22px 0 18px;
    }

    .install-steps small {
        display: none;
    }

    .install-env {
        padding-top: 15px;
    }

    .install-panel {
        padding: 28px 20px 22px;
    }

    .install-panel-head h2 {
        font-size: 23px;
    }

    .install-section {
        padding-bottom: 18px;
    }

    .modal-backdrop {
        padding: 12px;
    }

    .modal-header {
        padding: 19px 18px 0;
    }

    .modal-body {
        padding: 16px 18px 20px;
    }

    .qr-stage {
        padding-top: 15px;
    }

    .qr-box {
        width: min(220px, 68vw);
        height: min(220px, 68vw);
    }

    .page-hero {
        padding: 18px;
    }

    .page-hero::after {
        font-size: 68px;
        right: 12px;
    }

    .page-hero .btn {
        margin-left: 0;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 420px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-actions {
        width: 100%;
    }

    .toolbar-actions .btn {
        flex: 1;
    }

    .sidebar {
        width: 88vw;
    }

    .topbar-meta {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
