@font-face {
    font-family: "Fusion Pixel";
    src: url("/static/font/fusion-pixel.ttf") format("truetype");
    font-display: swap;
}

:root {
    /* 颜色 · 中性 */
    --bg-page: #fafafa;
    --bg-surface: #ffffff;
    --bg-subtle: #f4f4f5;
    --bg-hover: #f4f4f5;

    /* 边框 */
    --border: #e4e4e7;
    --border-hover: #d4d4d8;
    --border-strong: #a1a1aa;

    /* 文本 */
    --text-main: #18181b;
    --text-secondary: #27272a;
    --text-muted: #3f3f46;
    --text-subtle: #52525b;
    --text-disabled: #a1a1aa;

    /* 强调色：近黑，与登录按钮一致 */
    --primary: #18181b;
    --primary-hover: #27272a;
    --primary-active: #09090b;

    /* 语义色 */
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --warning: #d97706;
    --warning-bg: #fffbeb;

    /* 形状 */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;

    /* 阴影（很薄） */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.10);

    /* 动效 */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: all 0.18s var(--ease);

    /* 布局 */
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 68px;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, "Inter",
                 "Helvetica Neue", "PingFang SC", system-ui, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    font-size: 14px;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
}

::selection {
    background: rgba(24, 24, 27, 0.14);
    color: var(--primary-active);
}

.login-page {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(24px, env(safe-area-inset-top))
             max(24px, env(safe-area-inset-right))
             max(24px, env(safe-area-inset-bottom))
             max(24px, env(safe-area-inset-left));
    background: var(--bg-page);
    color: var(--text-main);
    overflow: hidden;
    overscroll-behavior: none;
}

.login-wrap {
    width: 100%;
    max-width: 380px;
}

.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: none;
}

.login-title {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-main);
    line-height: 1.2;
}

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

.login-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.login-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    caret-color: var(--text-main);
    transition: border-color 0.2s var(--ease),
                box-shadow 0.2s var(--ease),
                background-color 0.2s var(--ease);
}

.login-input::placeholder {
    color: var(--text-disabled);
    transition: color 0.2s ease;
}

.login-input:hover {
    border-color: var(--border-strong);
}

.login-input:focus {
    outline: none;
    border-color: var(--primary-active);
    box-shadow: 0 0 0 4px rgba(24, 24, 27, 0.08),
                0 1px 2px rgba(0, 0, 0, 0.04);
}

.login-input:focus::placeholder {
    color: #c4c4c8;
}

.login-error {
    min-height: 18px;
    margin: -6px 0 2px;
    font-size: 12px;
    color: var(--danger);
    line-height: 18px;
}

.login-btn {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    margin-top: 2px;
    transition: background-color 0.15s var(--ease), opacity 0.15s var(--ease);
}

.login-btn:hover { background: var(--primary-hover); }
.login-btn:active { background: var(--primary-active); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.setup-page {
    align-items: flex-start;
    overflow-y: auto;
}

.setup-wrap {
    max-width: 720px;
    padding: 42px 0;
}

.setup-card {
    gap: 22px;
    padding: 30px;
    border: none;
    box-shadow: var(--shadow-md);
}

.setup-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.setup-title {
    margin-bottom: 4px;
}

.setup-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.setup-state-pill {
    flex: 0 0 auto;
    min-width: 76px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.setup-state-pill.ok {
    background: var(--success-bg);
    color: var(--success);
}

.setup-state-pill.fail {
    background: var(--danger-bg);
    color: var(--danger);
}

.setup-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.setup-step {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius);
    background: #f4f4f5;
    border: none;
}

.setup-step span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.setup-step strong {
    display: block;
    font-size: 13px;
    color: var(--text-main);
}

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

.setup-step.active {
    background: #eff6ff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.10);
}

.setup-step.active span {
    background: #2563eb;
    color: #fff;
}

.setup-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.setup-panel.active {
    display: flex;
}

#adminStepPanel {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.setup-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-top: 2px;
}

.setup-panel-head h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 650;
    color: var(--text-main);
}

.setup-panel-head p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.setup-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.setup-actions.split {
    justify-content: space-between;
}

.setup-actions .login-btn {
    margin-top: 0;
}

.setup-check-btn {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 16px;
    border: none;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.setup-check-btn:hover {
    background: #ececef;
    color: var(--text-main);
}

.setup-check-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.setup-icon-btn {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius);
    background: #f4f4f5;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.setup-icon-btn:hover {
    background: #e4e4e7;
}

.setup-icon-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.setup-checks-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setup-check-panel {
    padding: 16px;
    border-radius: var(--radius);
    background: #f8fafc;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.setup-check-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e4e4e7;
}

.setup-check-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.setup-check-panel-title strong,
.setup-check-group-head strong {
    display: block;
    font-size: 14px;
    line-height: 1.25;
    color: var(--text-main);
}

.setup-check-panel-title small,
.setup-check-group-head small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
}

.setup-check-panel-icon,
.setup-check-group-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    color: #2563eb;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.07);
}

.setup-check-panel-icon svg,
.setup-check-group-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.setup-check-summary {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.setup-check-panel.ok .setup-check-summary {
    background: #ecfdf5;
    color: #047857;
}

.setup-check-panel.fail .setup-check-summary {
    background: #fef2f2;
    color: var(--danger);
}

.setup-check-panel.pending .setup-check-summary {
    background: #eff6ff;
    color: #2563eb;
}

.setup-check-panel-body {
    display: flex;
    flex-direction: column;
}

.setup-check-group {
    padding: 14px 0;
    border-bottom: 1px solid #ececef;
}

.setup-check-group:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.setup-check-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.setup-check-group-icon.icon-mysql {
    color: #f59e0b;
}

.setup-check-group-icon.icon-postgres,
.setup-check-group-icon.icon-sqlite {
    color: #2563eb;
}

.setup-check-list {
    display: flex;
    flex-direction: column;
}

.setup-check-row {
    --check-color: #64748b;
    --check-bg: #f8fafc;
    display: grid;
    grid-template-columns: 30px minmax(120px, 0.52fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-height: 0;
}

.setup-check-row + .setup-check-row {
    border-top: 1px solid #f0f0f1;
}

.setup-check-row.check-server_runtime {
    --check-color: #2563eb;
    --check-bg: #eff6ff;
}

.setup-check-row.check-server_cpu {
    --check-color: #16a34a;
    --check-bg: #f0fdf4;
}

.setup-check-row.check-server_port {
    --check-color: #0891b2;
    --check-bg: #ecfeff;
}

.setup-check-row.check-database_type {
    --check-color: #7c3aed;
    --check-bg: #f5f3ff;
}

.setup-check-row.check-database_type.icon-sqlite {
    --check-color: #2563eb;
    --check-bg: #eff6ff;
}

.setup-check-row.check-database_type.icon-mysql {
    --check-color: #f59e0b;
    --check-bg: #fff7ed;
}

.setup-check-row.check-database_type.icon-postgres {
    --check-color: #2563eb;
    --check-bg: #eff6ff;
}

.setup-check-row.check-database_config {
    --check-color: #d97706;
    --check-bg: #fffbeb;
}

.setup-check-row.check-database_connection {
    --check-color: #0891b2;
    --check-bg: #ecfeff;
}

.setup-check-mark {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-disabled);
}

.setup-check-mark::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.setup-check-row.ok {
    background: transparent;
}

.setup-check-row.ok .setup-check-mark {
    background: #fff;
    color: var(--check-color);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.setup-check-row.ok .setup-check-mark::after {
    content: "✓";
    width: auto;
    height: auto;
    background: transparent;
    font-size: 15px;
    font-weight: 800;
}

.setup-check-row.fail {
    background: transparent;
}

.setup-check-row.fail .setup-check-mark {
    background: #fee2e2;
    color: var(--danger);
}

.setup-check-row.fail .setup-check-mark::after {
    content: "!";
    width: auto;
    height: auto;
    background: transparent;
    font-size: 15px;
    font-weight: 800;
}

.setup-check-row.pending .setup-check-mark::after {
    width: 14px;
    height: 14px;
    border: 2px solid #d4d4d8;
    border-top-color: var(--primary);
    background: transparent;
    animation: spin 0.8s linear infinite;
}

.setup-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-main);
    min-width: 0;
}

.setup-check-logo {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    color: var(--check-color);
    box-shadow: none;
}

.setup-check-logo svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.setup-check-row.icon-mysql .setup-check-logo {
    background: transparent;
}

.setup-check-row.icon-postgres .setup-check-logo,
.setup-check-row.icon-sqlite .setup-check-logo {
    background: transparent;
}

.setup-check-message {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
    min-width: 0;
    overflow-wrap: anywhere;
}

.setup-check-row.fail .setup-check-message {
    color: var(--danger);
}

.setup-env-error {
    margin: -4px 0 0;
}

@media (max-width: 720px) {
    .setup-wrap {
        max-width: 100%;
        padding: 12px 0;
    }

    .setup-card {
        padding: 24px 20px;
    }

    .setup-title-row,
    .setup-panel-head,
    .setup-actions.split {
        flex-direction: column;
        align-items: stretch;
    }

    .setup-steps {
        grid-template-columns: 1fr;
    }

    .setup-check-panel-head {
        align-items: flex-start;
    }

    .setup-check-row {
        grid-template-columns: 30px minmax(0, 1fr);
        align-items: start;
    }

    .setup-check-message {
        grid-column: 2;
    }
}

@media (max-width: 520px) {
    .setup-check-panel {
        padding: 14px;
    }

    .setup-check-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .setup-check-summary {
        align-self: flex-start;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.app-container {
    display: block;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: none;
    box-shadow: 8px 0 24px rgba(24, 24, 27, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    overflow: visible;
    transition: width 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.sidebar-version {
    width: calc(100% - 24px);
    height: 34px;
    margin: 14px 12px 8px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border: none;
    border-radius: var(--radius);
    background: #f4f4f5;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    user-select: none;
    transition: background-color 0.18s var(--ease),
                color 0.18s var(--ease),
                box-shadow 0.18s var(--ease);
}

.sidebar-version:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.10);
}

.sidebar-version:hover {
    background: #ececef;
    color: var(--text-main);
}

.version-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.version-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.version-new {
    display: none;
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: #18181b;
    color: #fff;
    font-size: 10px;
    line-height: 1.2;
}

.version-new[hidden] {
    display: none !important;
}

.sidebar-version.has-update {
    background: #fff7ed;
    color: #9a3412;
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.22);
}

.sidebar-version.has-update .version-dot {
    background: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

.sidebar-version.has-update .version-new:not([hidden]) {
    display: inline-flex;
}

.sidebar-tools {
    position: absolute;
    top: 50%;
    right: -24px;
    z-index: 3;
    display: block;
    padding: 0;
    transform: translateY(-50%);
}

.sidebar-collapse-toggle {
    width: 24px;
    height: 74px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: none;
    border-radius: 0 10px 10px 0;
    box-shadow: 10px 0 20px rgba(24, 24, 27, 0.08);
    cursor: pointer;
    transition: background-color 0.18s var(--ease),
                color 0.18s var(--ease),
                box-shadow 0.18s var(--ease),
                transform 0.18s var(--ease);
}

.sidebar-collapse-toggle::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--bg-surface);
}

.sidebar-collapse-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-main);
    box-shadow: 10px 0 24px rgba(24, 24, 27, 0.12);
    transform: translateX(2px);
}

.sidebar-collapse-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.22s var(--ease);
}

.nav-group {
    flex: 1;
    padding: 4px 12px;
    overflow-y: auto;
}

.nav-item {
    padding: 10px 14px;
    margin-bottom: 2px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    white-space: nowrap;
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: currentColor;
    opacity: 0.78;
}

.nav-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-label {
    display: inline-block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.18s var(--ease), max-width 0.22s var(--ease);
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.nav-item.active {
    background: rgba(24, 24, 27, 0.06);
    color: var(--text-main);
}

.sidebar-footer {
    padding: 12px;
}

.sidebar-footer .nav-item {
    color: var(--text-muted);
    font-size: 13px;
}

.app-container.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    box-shadow: 6px 0 18px rgba(24, 24, 27, 0.04);
}

.app-container.sidebar-collapsed .sidebar-version {
    width: 34px;
    justify-content: center;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
}

.app-container.sidebar-collapsed .version-label,
.app-container.sidebar-collapsed .version-new {
    display: none;
}

.app-container.sidebar-collapsed .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

.app-container.sidebar-collapsed .sidebar-tools {
    right: -24px;
}

.app-container.sidebar-collapsed .sidebar-collapse-toggle svg {
    transform: rotate(180deg);
}

.app-container.sidebar-collapsed .nav-group,
.app-container.sidebar-collapsed .sidebar-footer {
    padding-left: 10px;
    padding-right: 10px;
}

.app-container.sidebar-collapsed .nav-item {
    justify-content: center;
    gap: 0;
    padding-left: 10px;
    padding-right: 10px;
}

.app-container.sidebar-collapsed .nav-label {
    max-width: 0;
    opacity: 0;
}

/* 侧边栏切换按钮（移动端汉堡）：桌面隐藏 */
.sidebar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.sidebar-toggle span {
    width: 16px;
    height: 1.5px;
    background: var(--text-main);
    border-radius: 2px;
}

/* 侧边栏遮罩层（移动端） */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(2px);
    z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* 主内容区 */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 24px 0 40px;
    min-width: 0;
    transition: margin-left 0.22s var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.main-wrapper .header-bar,
.main-wrapper .tab-panel {
    width: 100%;
    max-width: 1200px;
    padding-left: 32px;
    padding-right: 32px;
    box-sizing: border-box;
}

.header-bar {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
    animation: fadeIn 0.2s var(--ease);
}

.k-card {
    background: var(--bg-surface);
    border: none;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.k-card-header {
    padding: 18px 22px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.k-card-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-main);
}

.k-card-body {
    padding: 22px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--bg-surface);
    border: none;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
    text-align: center;
}

.stat-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0;
    font-weight: 600;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
    line-height: 1.2;
}

.dashboard-chart {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cute-status-chart {
    display: grid;
    grid-template-columns: minmax(92px, 1fr) 170px minmax(92px, 1fr);
    align-items: center;
    justify-items: center;
    gap: 32px;
    height: 100%;
    padding: 12px;
}

.cute-stat-pill {
    width: 100%;
    max-width: 132px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--chart-soft);
    box-shadow: 0 12px 30px rgba(24, 24, 27, 0.06);
}

.cute-stat-pill.mint {
    --chart-color: #34d399;
    --chart-soft: #ecfdf5;
}

.cute-stat-pill.rose {
    --chart-color: #fb7185;
    --chart-soft: #fff1f2;
}

.cute-stat-label,
.cute-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cute-stat-label {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 600;
}

.cute-stat-number {
    color: var(--chart-color);
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cute-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--chart-color);
    box-shadow: 0 0 0 4px var(--chart-soft);
}

.cute-donut {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(24, 24, 27, 0.08);
}

.cute-donut-svg {
    display: block;
    transform: rotate(-90deg);
}

.cute-ring-segment {
    animation: kRingDraw 0.9s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.cute-ring-segment.delayed {
    animation-delay: 0.15s;
}

.cute-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.cute-donut-value {
    color: var(--text-main);
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cute-donut-value span {
    margin-left: 2px;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 700;
}

.cute-donut-label {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.cute-legend-label {
    min-width: 0;
    overflow: hidden;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cute-legend-value {
    margin-left: auto;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.cute-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
    font-size: 13px;
}

.cute-legend-item {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 14px;
    background: var(--chart-soft);
}

.cute-empty-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 13px;
}

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

.account-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 7px;
    scrollbar-width: thin;
    scrollbar-color: #d4d4d8 transparent;
    overscroll-behavior-x: contain;
}

.account-table-scroll table {
    min-width: 1120px;
}

.account-usage-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    max-width: 160px;
    font-size: 12px;
    color: var(--text-muted);
}

@media (min-width: 641px) {
    #tab-accounts .account-table-scroll {
        overflow-x: hidden;
        overflow-x: clip;
        overflow-y: visible;
        padding-bottom: 0;
    }

    #tab-accounts .account-pool-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    #tab-accounts .account-pool-table .account-col-select { width: 4%; }
    #tab-accounts .account-pool-table .account-col-id { width: 5%; }
    #tab-accounts .account-pool-table .account-col-email { width: 27%; }
    #tab-accounts .account-pool-table .account-col-health { width: 10%; }
    #tab-accounts .account-pool-table .account-col-subscription { width: 8%; }
    #tab-accounts .account-pool-table .account-col-usage { width: 18%; }
    #tab-accounts .account-pool-table .account-col-checked { width: 12%; }
    #tab-accounts .account-pool-table .account-col-actions { width: 16%; }

    #tab-accounts .account-pool-table th,
    #tab-accounts .account-pool-table td {
        min-width: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    #tab-accounts .account-email-cell {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #tab-accounts .account-usage-summary,
    #tab-accounts .k-progress-bg {
        width: 100%;
        max-width: none;
    }

    #tab-accounts .account-actions {
        width: 100%;
        gap: 4px;
    }

    #tab-accounts .account-actions .ui-btn-sm {
        padding-left: 8px;
        padding-right: 8px;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    #tab-accounts .account-actions {
        flex-wrap: wrap;
    }

    #tab-accounts .account-actions .ui-btn-sm {
        padding-left: 6px;
        padding-right: 6px;
        font-size: 11px;
    }
}

.account-table-scroll::-webkit-scrollbar {
    height: 8px;
}

.account-table-scroll::-webkit-scrollbar-track {
    background: #fafafa;
    border-radius: 999px;
}

.account-table-scroll::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border: 2px solid #fafafa;
    border-radius: 999px;
}

.account-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #c4c4cc;
}

.k-progress-bg {
    display: block;
    width: 160px;
    max-width: 100%;
    height: 6px;
    margin-top: 6px;
    background: #e4e4e7;
    border-radius: 999px;
    overflow: hidden;
}

.k-progress-fill {
    display: block;
    height: 100%;
    background: #18181b;
    border-radius: inherit;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.2s ease;
}

.k-progress-fill.warn   { background: #f59e0b; }
.k-progress-fill.danger { background: #dc2626; }

@keyframes kRingDraw {
    from { opacity: 0; }
    to   { opacity: 1; }
}

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    letter-spacing: 0;
}

td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-weight: 500;
}

.account-email-cell {
    font-family: inherit;
    font-size: 13px;
    color: var(--text-main);
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.account-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

tbody tr { transition: background-color 0.12s ease; }
tbody tr:hover { background: var(--bg-subtle); }
tr:last-child td { border-bottom: none; }

.k-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    background: var(--bg-subtle);
    color: var(--text-muted);
}
.k-badge-success { background: var(--success-bg); color: var(--success); }
.k-badge-neutral { background: var(--bg-subtle);  color: var(--text-muted); }

.k-skeleton {
    display: inline-block;
    min-width: 24px;
    border-radius: 4px;
    color: transparent !important;
    background: linear-gradient(90deg, #e4e4e7 0%, #f4f4f5 50%, #e4e4e7 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
    user-select: none;
}

.k-chart-skeleton {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 100%;
    padding: 8px 0;
}
.k-chart-skeleton .k-bar {
    flex: 1;
    background: linear-gradient(180deg, #e4e4e7 0%, #f4f4f5 100%);
    border-radius: 4px;
    animation: shimmer-bar 1.4s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes shimmer-bar {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 0.9; }
}

.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    min-height: 36px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background-color 0.15s var(--ease),
                border-color 0.15s var(--ease),
                color 0.15s var(--ease),
                opacity 0.15s var(--ease);
}

.ui-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ui-btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.ui-btn-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.ui-btn-primary:active:not(:disabled) { background: var(--primary-active); border-color: var(--primary-active); }

.ui-btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border-color: var(--border);
}
.ui-btn-secondary:hover:not(:disabled) {
    background: var(--bg-subtle);
    border-color: var(--border-hover);
}

.ui-btn-danger {
    background: var(--bg-surface);
    color: var(--danger);
    border-color: var(--danger-border);
}
.ui-btn-danger:hover:not(:disabled) {
    background: var(--danger-bg);
    border-color: var(--danger);
}

.ui-btn-sm {
    padding: 5px 10px;
    min-height: 28px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.k-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    caret-color: var(--text-main);
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.k-input::placeholder { color: var(--text-disabled); }
.k-input:hover { border-color: var(--border-hover); }
.k-input:focus {
    outline: none;
    border-color: var(--primary-active);
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}
.k-input:disabled {
    background: var(--bg-subtle);
    color: var(--text-disabled);
    cursor: not-allowed;
}

/* textarea 使用 .k-input 时需要更大高度 */
textarea.k-input {
    min-height: 120px;
    height: auto;
    padding: 10px 12px;
    line-height: 1.5;
    resize: vertical;
    scrollbar-width: thin;
    scrollbar-color: #d4d4d8 transparent;
}

textarea.k-input::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

textarea.k-input::-webkit-scrollbar-track {
    background: transparent;
}

textarea.k-input::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border: 2px solid var(--bg-surface);
    border-radius: 999px;
}

textarea.k-input::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

textarea.k-input::-webkit-scrollbar-corner {
    background: transparent;
}

.settings-label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    max-width: 1280px;
}

.settings-column {
    display: grid;
    grid-template-rows: 84px;
    grid-auto-rows: 82px;
    gap: 14px;
}

.settings-toggle-card {
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: #fafafa;
    border-radius: var(--radius);
}

.settings-toggle-card > div {
    min-width: 0;
}

.settings-toggle-card strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-toggle-card small {
    display: block;
    height: 32px;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
}

.settings-field {
    min-width: 0;
    height: 82px;
}

.settings-field .k-input {
    height: 36px;
}

.settings-help {
    height: 28px;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
}

.version-info-grid {
    display: grid;
    gap: 10px;
}

.version-info-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-subtle);
    border-radius: var(--radius);
}

.version-info-row span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.version-info-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.version-update-note {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}

.version-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.version-refresh-spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(24, 24, 27, 0.18);
    border-top-color: var(--text-main);
    animation: spin 0.7s linear infinite;
}

.version-refresh-btn.loading {
    pointer-events: none;
    opacity: 0.72;
}

.recent-pagination {
    padding: 0 16px 16px;
    border-top: none;
}

.status.success,
.status.error {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
}

.status.success {
    background: #ecfdf5;
    color: #047857;
}

.status.error {
    background: #fef2f2;
    color: #b91c1c;
}

.k-dropdown {
    position: relative;
    display: inline-block;
}

.k-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
    padding: 0 34px 0 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    position: relative;
    transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.k-dropdown-trigger::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--text-muted);
    border-bottom: 1.5px solid var(--text-muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
    transition: transform 0.18s var(--ease);
}

.k-dropdown-trigger:hover {
    border-color: var(--border-hover);
    background: var(--bg-subtle);
}

.k-dropdown.active .k-dropdown-trigger {
    border-color: var(--primary-active);
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}
.k-dropdown.active .k-dropdown-trigger::after {
    transform: translateY(-30%) rotate(-135deg);
}

/* 当下拉触发器同时用了 .ui-btn 样式（如导出按钮），把 ::after 画在更靠内的位置 */
.k-dropdown-trigger.ui-btn {
    padding-right: 28px;
}
.k-dropdown-trigger.ui-btn::after {
    right: 10px;
}

.k-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 4px;
    z-index: 200;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}

.k-dropdown.active .k-dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.k-dropdown-item {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.1s ease;
}
.k-dropdown-item:hover { background: var(--bg-hover); }
.k-dropdown-item.selected {
    background: rgba(24, 24, 27, 0.06);
    font-weight: 500;
}
.k-dropdown-item.disabled {
    color: var(--text-disabled);
    cursor: not-allowed;
}
.k-dropdown-item.disabled:hover { background: transparent; }

.k-checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--bg-surface);
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    flex-shrink: 0;
    transition: background-color 0.15s var(--ease),
                border-color 0.15s var(--ease);
}
.k-checkbox:hover { border-color: var(--text-muted); }
.k-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}
.k-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border-right: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: rotate(45deg);
}
.k-checkbox:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.12);
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1000;
    padding: 24px;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}
.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.15s var(--ease);
}

.modal-content {
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 48px);
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalIn 0.2s var(--ease);
}

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.modal-close {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.modal-body {
    padding: 22px;
    overflow-y: auto;
}

.import-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#importModal .import-actions .ui-btn {
    min-width: 84px;
}

#importModal .import-file-btn {
    min-width: 104px;
    gap: 7px;
}

#importModal .import-file-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.import-file-input {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

/* 导入任务停止确认：页面内科技风弹窗 */
.import-stop-confirm {
    z-index: 1500;
    padding: 22px;
    background:
        radial-gradient(circle at 50% 42%, rgba(99, 102, 241, 0.22), transparent 32%),
        rgba(7, 12, 27, 0.68);
    backdrop-filter: blur(16px) saturate(125%);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
}

.import-stop-confirm.leaving {
    animation: importStopOverlayOut 0.18s ease both;
}

.import-stop-dialog {
    position: relative;
    isolation: isolate;
    width: min(520px, 100%);
    max-height: calc(100vh - 44px);
    overflow: hidden auto;
    padding: 34px;
    color: #eef2ff;
    background:
        linear-gradient(rgba(129, 140, 248, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(129, 140, 248, 0.035) 1px, transparent 1px),
        linear-gradient(145deg, rgba(21, 29, 54, 0.98), rgba(13, 18, 39, 0.99));
    background-size: 24px 24px, 24px 24px, auto;
    border: 1px solid rgba(129, 140, 248, 0.46);
    border-radius: 22px;
    box-shadow:
        0 34px 100px rgba(0, 0, 0, 0.52),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 0 55px rgba(99, 102, 241, 0.18);
    transform: translateY(18px) scale(0.96);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.import-stop-dialog::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: -1px;
    left: 46px;
    right: 46px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee 30%, #8b5cf6 68%, transparent);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.74);
}

.import-stop-dialog::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, 0.035) 48%, transparent 66%);
    transform: translateX(-100%);
    animation: importStopScan 5s ease-in-out infinite;
}

.import-stop-confirm.visible .import-stop-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.import-stop-confirm.leaving .import-stop-dialog {
    transform: translateY(12px) scale(0.97);
    opacity: 0;
}

.import-stop-glow {
    position: absolute;
    z-index: -1;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    filter: blur(18px);
    pointer-events: none;
    opacity: 0.2;
}

.import-stop-glow-a {
    top: -90px;
    left: -70px;
    background: #06b6d4;
}

.import-stop-glow-b {
    right: -80px;
    bottom: -100px;
    background: #8b5cf6;
}

.import-stop-close {
    position: absolute;
    z-index: 3;
    top: 16px;
    right: 16px;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #8f9ab6;
    cursor: pointer;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.import-stop-close:hover {
    color: #f8fafc;
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.28);
    transform: rotate(5deg);
}

.import-stop-hero {
    position: relative;
    z-index: 1;
    padding-right: 28px;
}

.import-stop-icon {
    position: relative;
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #fda4af;
    background: linear-gradient(145deg, rgba(244, 63, 94, 0.18), rgba(251, 113, 133, 0.07));
    border: 1px solid rgba(251, 113, 133, 0.42);
    border-radius: 20px;
    box-shadow: 0 0 28px rgba(244, 63, 94, 0.16), 0 0 0 6px rgba(244, 63, 94, 0.035);
}

.import-stop-icon > span {
    position: absolute;
    inset: -7px;
    border: 1px dashed rgba(251, 113, 133, 0.38);
    border-radius: 25px;
    animation: importStopOrbit 9s linear infinite;
}

.import-stop-icon svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(251, 113, 133, 0.4));
}

.import-stop-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #7dd3fc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.import-stop-kicker i {
    width: 6px;
    height: 6px;
    background: #22d3ee;
    border-radius: 50%;
    box-shadow: 0 0 10px #22d3ee;
    animation: importStopPulse 1.8s ease-in-out infinite;
}

.import-stop-hero h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 26px;
    font-weight: 760;
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.import-stop-hero p {
    max-width: 410px;
    margin: 9px 0 0;
    color: #9ba7c2;
    font-size: 13px;
    line-height: 1.7;
}

.import-stop-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 26px;
}

.import-stop-stats > div {
    min-width: 0;
    padding: 13px 14px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12) inset;
}

.import-stop-stats span {
    display: block;
    margin-bottom: 5px;
    color: #7886a5;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.import-stop-stats strong {
    display: block;
    overflow: hidden;
    color: #e2e8f0;
    font-size: 20px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-stop-stats strong small {
    color: #66738f;
    font-size: 11px;
    font-weight: 600;
}

.import-stop-stats strong.is-success {
    color: #5ee0ad;
    text-shadow: 0 0 16px rgba(94, 224, 173, 0.25);
}

.import-stop-stats strong.is-pending {
    color: #fbbf73;
    text-shadow: 0 0 16px rgba(251, 191, 115, 0.22);
}

.import-stop-note {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 15px;
    color: #a7f3d0;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.11), rgba(16, 185, 129, 0.035));
    border: 1px solid rgba(52, 211, 153, 0.22);
    border-radius: 12px;
}

.import-stop-note > svg {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.import-stop-note strong,
.import-stop-note span {
    display: block;
}

.import-stop-note strong {
    color: #c9fbe7;
    font-size: 12px;
}

.import-stop-note span {
    margin-top: 3px;
    color: #759b92;
    font-size: 11px;
}

.import-stop-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.import-stop-actions button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    cursor: pointer;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 750;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.import-stop-actions button:hover {
    transform: translateY(-2px);
}

.import-stop-actions button:focus-visible,
.import-stop-close:focus-visible {
    outline: 2px solid #67e8f9;
    outline-offset: 3px;
}

.import-stop-actions svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.import-stop-continue {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.07);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.import-stop-continue:hover {
    color: #f8fafc;
    background: rgba(148, 163, 184, 0.13);
    border-color: rgba(148, 163, 184, 0.34);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.import-stop-confirm-btn {
    color: #fff;
    background: linear-gradient(105deg, #e94361, #f06464 54%, #f18263);
    border: 1px solid rgba(251, 113, 133, 0.48);
    box-shadow: 0 12px 28px rgba(225, 53, 83, 0.27), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.import-stop-confirm-btn:hover {
    background: linear-gradient(105deg, #f04b68, #f46f6d 54%, #f58b6b);
    box-shadow: 0 16px 34px rgba(225, 53, 83, 0.36), 0 0 20px rgba(251, 113, 133, 0.13);
}

@keyframes importStopOrbit {
    to { transform: rotate(360deg); }
}

@keyframes importStopPulse {
    50% { opacity: 0.48; transform: scale(0.72); }
}

@keyframes importStopScan {
    0%, 58% { transform: translateX(-100%); }
    82%, 100% { transform: translateX(100%); }
}

@keyframes importStopOverlayOut {
    to { opacity: 0; }
}

@media (max-width: 560px) {
    .import-stop-confirm {
        padding: 14px;
    }

    .import-stop-dialog {
        padding: 27px 20px 20px;
        border-radius: 18px;
    }

    .import-stop-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 17px;
        border-radius: 17px;
    }

    .import-stop-hero h3 {
        font-size: 22px;
    }

    .import-stop-stats {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .import-stop-stats > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 12px;
    }

    .import-stop-stats span {
        margin: 0;
    }

    .import-stop-stats strong {
        font-size: 17px;
    }

    .import-stop-actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .import-stop-dialog,
    .import-stop-dialog::after,
    .import-stop-icon > span,
    .import-stop-kicker i {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* 账号导出进度面板 */
.account-export-progress-modal {
    z-index: 1450;
    padding: 22px;
    background:
        radial-gradient(circle at 50% 45%, rgba(14, 165, 233, 0.19), transparent 34%),
        rgba(7, 13, 28, 0.66);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.account-export-progress-dialog {
    position: relative;
    isolation: isolate;
    width: min(570px, 100%);
    overflow: hidden;
    padding: 34px 36px 30px;
    color: #eaf4ff;
    background:
        linear-gradient(rgba(56, 189, 248, 0.032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.032) 1px, transparent 1px),
        linear-gradient(145deg, rgba(17, 30, 56, 0.985), rgba(10, 19, 39, 0.99));
    background-size: 22px 22px, 22px 22px, auto;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 23px;
    box-shadow:
        0 36px 100px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.045) inset,
        0 0 54px rgba(14, 165, 233, 0.16);
    opacity: 0;
    transform: translateY(18px) scale(0.965);
    transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-export-progress-dialog::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 48px;
    right: 48px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee 30%, #60a5fa 64%, transparent);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.75);
}

.account-export-progress-dialog::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.035) 49%, transparent 66%);
    transform: translateX(-100%);
    animation: accountExportScan 4.8s ease-in-out infinite;
}

.account-export-progress-modal.visible .account-export-progress-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.account-export-progress-modal.leaving {
    animation: importStopOverlayOut 0.22s ease both;
}

.account-export-progress-modal.leaving .account-export-progress-dialog {
    opacity: 0;
    transform: translateY(12px) scale(0.975);
}

.account-export-progress-glow {
    position: absolute;
    z-index: -1;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    filter: blur(24px);
    pointer-events: none;
    opacity: 0.18;
}

.account-export-progress-glow.glow-a {
    top: -100px;
    left: -70px;
    background: #06b6d4;
}

.account-export-progress-glow.glow-b {
    right: -80px;
    bottom: -110px;
    background: #3b82f6;
}

.account-export-progress-visual {
    position: relative;
    width: 86px;
    height: 86px;
    margin-bottom: 22px;
}

.account-export-progress-core {
    position: absolute;
    inset: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a5f3fc;
    background: linear-gradient(145deg, rgba(6, 182, 212, 0.22), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(103, 232, 249, 0.42);
    border-radius: 17px;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.18), 0 0 0 6px rgba(34, 211, 238, 0.035);
}

.account-export-progress-core svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(103, 232, 249, 0.42));
}

.account-export-progress-orbit {
    position: absolute;
    border-radius: 50%;
}

.account-export-progress-orbit.orbit-a {
    inset: 5px;
    border: 1px solid rgba(103, 232, 249, 0.32);
    border-top-color: #67e8f9;
    animation: accountExportOrbit 2.3s linear infinite;
}

.account-export-progress-orbit.orbit-b {
    inset: -1px;
    border: 1px dashed rgba(96, 165, 250, 0.26);
    border-right-color: #60a5fa;
    animation: accountExportOrbitReverse 5.5s linear infinite;
}

.account-export-progress-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #7dd3fc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.account-export-progress-kicker i {
    width: 6px;
    height: 6px;
    background: #22d3ee;
    border-radius: 50%;
    box-shadow: 0 0 10px #22d3ee;
    animation: importStopPulse 1.8s ease-in-out infinite;
}

.account-export-progress-dialog h3 {
    margin: 0;
    color: #f8fbff;
    font-size: 25px;
    font-weight: 760;
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.account-export-progress-detail {
    min-height: 22px;
    margin: 8px 0 0;
    color: #93a5c2;
    font-size: 13px;
    line-height: 1.65;
}

.account-export-progress-track {
    position: relative;
    overflow: hidden;
    height: 10px;
    margin-top: 27px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) inset;
}

.account-export-progress-track > span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #38bdf8 48%, #818cf8);
    border-radius: inherit;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.48);
    transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}

.account-export-progress-track > i {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
    transform: translateX(-100%);
    animation: accountExportTrackScan 1.7s ease-in-out infinite;
}

.account-export-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
}

.account-export-progress-format {
    overflow: hidden;
    color: #7183a2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-export-progress-meta > strong {
    color: #c8f7ff;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 14px rgba(103, 232, 249, 0.34);
}

.account-export-progress-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-top: 24px;
    padding-top: 19px;
    border-top: 1px solid rgba(148, 163, 184, 0.11);
}

.account-export-progress-steps > span {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #586984;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.account-export-progress-steps i {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    background: #344158;
    border-radius: 50%;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.account-export-progress-steps > span.active {
    color: #bae6fd;
}

.account-export-progress-steps > span.active i {
    background: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
    animation: importStopPulse 1.35s ease-in-out infinite;
}

.account-export-progress-steps > span.done {
    color: #80cdbd;
}

.account-export-progress-steps > span.done i {
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.42);
}

.account-export-progress-modal.is-complete .account-export-progress-core {
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(52, 211, 153, 0.38);
    box-shadow: 0 0 28px rgba(52, 211, 153, 0.18);
}

.account-export-progress-modal.is-complete .account-export-progress-track > span {
    background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
}

.account-export-progress-modal.is-error .account-export-progress-core {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(251, 113, 133, 0.38);
}

.account-export-progress-modal.is-error .account-export-progress-track > span {
    background: linear-gradient(90deg, #e11d48, #fb7185);
}

.account-export-progress-modal.is-error .account-export-progress-visual {
    animation: accountExportErrorShake 0.42s ease;
}

@keyframes accountExportOrbit {
    to { transform: rotate(360deg); }
}

@keyframes accountExportOrbitReverse {
    to { transform: rotate(-360deg); }
}

@keyframes accountExportScan {
    0%, 58% { transform: translateX(-100%); }
    82%, 100% { transform: translateX(100%); }
}

@keyframes accountExportTrackScan {
    65%, 100% { transform: translateX(100%); }
}

@keyframes accountExportErrorShake {
    25% { transform: translateX(-5px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

@media (max-width: 560px) {
    .account-export-progress-modal {
        padding: 14px;
    }

    .account-export-progress-dialog {
        padding: 28px 21px 23px;
        border-radius: 19px;
    }

    .account-export-progress-visual {
        width: 74px;
        height: 74px;
        margin-bottom: 18px;
    }

    .account-export-progress-core {
        inset: 14px;
        border-radius: 14px;
    }

    .account-export-progress-dialog h3 {
        font-size: 22px;
    }

    .account-export-progress-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 6px;
    }

    .account-export-progress-steps > span {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .account-export-progress-dialog,
    .account-export-progress-dialog::after,
    .account-export-progress-orbit,
    .account-export-progress-track > i,
    .account-export-progress-kicker i,
    .account-export-progress-steps > span.active i {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

#accountExportLimitModal {
    background: rgba(40, 52, 68, 0.48);
    backdrop-filter: blur(12px) saturate(110%);
    -webkit-backdrop-filter: blur(12px) saturate(110%);
}

#accountExportLimitModal .account-export-limit-content {
    position: relative;
    max-width: 520px;
    color: #18324f;
    background-color: #eaf2f8;
    background-image:
        linear-gradient(rgba(14, 116, 144, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 116, 144, 0.045) 1px, transparent 1px);
    background-size: 24px 24px;
    border: 1px solid rgba(8, 145, 178, 0.38);
    border-radius: 12px;
    box-shadow:
        0 28px 80px rgba(15, 23, 42, 0.30),
        0 0 0 1px rgba(255, 255, 255, 0.72) inset,
        0 0 36px rgba(14, 165, 183, 0.10);
}

#accountExportLimitModal .account-export-limit-content::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 28px;
    right: 28px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee 28%, #f59e0b 72%, transparent);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
    pointer-events: none;
}

#accountExportLimitModal .modal-header {
    min-height: 82px;
    padding: 18px 22px;
    border-bottom: 1px solid #ccdae6;
    background: rgba(248, 252, 255, 0.92);
}

.account-export-heading {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
}

.account-export-heading-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #0891b2;
    background: #e1f7fb;
    border: 1px solid #94dce8;
    border-radius: 8px;
    box-shadow: 0 0 18px rgba(8, 145, 178, 0.08) inset;
}

.account-export-heading-icon svg,
.account-export-limit-close svg,
.account-export-limit-icon svg,
.account-export-delete-icon svg,
.account-export-health-icon svg,
#accountExportLimitConfirm svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-export-heading-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

#accountExportLimitModal .modal-title {
    color: #142a45;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.account-export-heading-meta {
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

#accountExportLimitModal .account-export-limit-close {
    width: 34px;
    height: 34px;
    padding: 0;
    color: #64748b;
    background: #edf3f8;
    border: 1px solid #cfdae5;
    border-radius: 8px;
    font-family: inherit;
}

#accountExportLimitModal .account-export-limit-close:hover {
    color: #0f2945;
    background: #ffffff;
    border-color: #9fb3c7;
}

#accountExportLimitModal .modal-body {
    padding: 22px;
}

.account-export-limit-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 176px;
    align-items: center;
    gap: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #cbdbe7;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(41, 71, 101, 0.07);
}

.account-export-field-head {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.account-export-limit-label {
    color: #1e3a5f;
    font-size: 12px;
    font-weight: 700;
}

.account-export-field-hint {
    color: #687b91;
    font-size: 11px;
    line-height: 1.55;
}

.account-export-limit-control {
    position: relative;
    display: flex;
    align-items: center;
    justify-self: end;
    width: 176px;
}

.account-export-limit-icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    display: inline-flex;
    color: #0891b2;
    pointer-events: none;
}

.account-export-limit-icon svg {
    width: 18px;
    height: 18px;
}

#accountExportLimitModal #accountExportLimitInput {
    height: 46px;
    padding: 0 42px 0 42px;
    color: #15324f;
    background: #ffffff;
    border: 1px solid #9fb9ca;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(31, 65, 96, 0.06) inset;
    font-size: 15px;
    font-weight: 600;
}

#accountExportLimitModal #accountExportLimitInput::placeholder {
    color: #8a9aad;
    font-weight: 500;
}

#accountExportLimitModal #accountExportLimitInput:hover {
    border-color: #4fb6c7;
}

#accountExportLimitModal #accountExportLimitInput:focus {
    border-color: #06a9c2;
    box-shadow:
        0 0 0 3px rgba(6, 169, 194, 0.14),
        0 8px 22px rgba(6, 169, 194, 0.10);
}

.account-export-limit-unit {
    position: absolute;
    right: 13px;
    color: #64748b;
    font-size: 12px;
    pointer-events: none;
}

.account-export-delete-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
    padding: 10px 12px;
    color: #9a4f08;
    background: #fff7e6;
    border-left: 2px solid #e89b20;
    font-size: 11px;
    line-height: 1.45;
}

.account-export-delete-icon {
    display: inline-flex;
    flex: 0 0 auto;
}

.account-export-delete-icon svg {
    width: 16px;
    height: 16px;
}

.account-export-health-option {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #cbdbe7;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.account-export-health-option:hover {
    background: #ffffff;
    border-color: #77c5ce;
}

.account-export-health-option:has(.k-checkbox:checked) {
    border-color: #64c7bd;
}

.account-export-health-option .k-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.account-export-health-option:focus-within {
    border-color: #2dd4bf;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.10);
}

.account-export-health-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6e8298;
    background: #edf3f8;
    border-radius: 8px;
    transition: color 0.16s ease, background-color 0.16s ease;
}

.account-export-health-option:has(.k-checkbox:checked) .account-export-health-icon {
    color: #0f8f83;
    background: #ddf5f1;
}

.account-export-health-copy {
    min-width: 0;
}

.account-export-health-title {
    display: block;
    color: #183752;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.account-export-health-desc {
    display: block;
    margin-top: 4px;
    color: #687b91;
    font-size: 11px;
    line-height: 1.55;
}

.account-export-health-toggle {
    position: relative;
    width: 38px;
    height: 22px;
    background: #cbd7e2;
    border: 1px solid #aebdca;
    border-radius: 999px;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.account-export-health-toggle span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
    border-radius: 50%;
    transition: transform 0.18s var(--ease), background-color 0.18s ease;
}

.account-export-health-option:has(.k-checkbox:checked) .account-export-health-toggle {
    background: #14a89a;
    border-color: #0d9488;
}

.account-export-health-option:has(.k-checkbox:checked) .account-export-health-toggle span {
    background: #ffffff;
    transform: translateX(16px);
}

.account-export-limit-error {
    display: none;
    margin-top: 10px;
    padding: 9px 11px;
    color: #b42335;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.4;
}

.account-export-limit-error:not(:empty) {
    display: block;
}

#accountExportLimitModal #accountExportLimitInput[aria-invalid="true"] {
    border-color: #e05d6f;
    box-shadow: 0 0 0 3px rgba(224, 93, 111, 0.13);
}

#accountExportLimitModal .account-export-limit-actions {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    padding: 16px 22px 20px;
    border-top: 1px solid #ccdae6;
    background: rgba(248, 252, 255, 0.92);
}

#accountExportLimitModal .account-export-limit-actions .ui-btn {
    min-height: 42px;
    border-radius: 8px;
    font-weight: 700;
}

#accountExportLimitModal #accountExportLimitCancel {
    color: #40566d;
    background: #ffffff;
    border: 1px solid #c1cfdb;
}

#accountExportLimitModal #accountExportLimitCancel:hover {
    color: #17324d;
    background: #f4f8fb;
    border-color: #91a8ba;
}

#accountExportLimitModal #accountExportLimitConfirm {
    gap: 8px;
    color: #ffffff;
    background: #0ea5b7;
    border: 1px solid #0ea5b7;
    box-shadow: 0 8px 22px rgba(14, 165, 183, 0.22);
}

#accountExportLimitModal #accountExportLimitConfirm::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
}

#accountExportLimitModal #accountExportLimitConfirm:hover:not(:disabled) {
    color: #ffffff;
    background: #07899e;
    border-color: #07899e;
    box-shadow: 0 10px 28px rgba(7, 137, 158, 0.28);
    transform: none;
}

#accountExportLimitConfirm svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 560px) {
    #accountExportLimitModal {
        padding: 12px;
        align-items: flex-end;
    }

    #accountExportLimitModal .account-export-limit-content {
        max-height: calc(100dvh - 24px);
    }

    #accountExportLimitModal .modal-header,
    #accountExportLimitModal .modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .account-export-heading-meta {
        white-space: normal;
    }

    .account-export-limit-panel {
        grid-template-columns: minmax(0, 1fr) 158px;
        gap: 12px;
        padding: 12px;
    }

    .account-export-limit-control {
        width: 158px;
    }

    .account-export-health-option {
        grid-template-columns: 34px minmax(0, 1fr) 38px;
        gap: 10px;
        padding: 12px;
    }

    #accountExportLimitModal .account-export-limit-actions {
        grid-template-columns: 1fr 1.35fr;
        padding: 14px 18px 18px;
    }
}

@media (max-width: 380px) {
    .account-export-heading-meta {
        display: none;
    }

    .account-export-limit-panel {
        grid-template-columns: 1fr;
    }

    .account-export-limit-control {
        justify-self: start;
        width: 158px;
    }
}

.account-info-modal .modal-content {
    max-width: 860px;
    border: none;
}

.card-log-content {
    max-width: 640px;
}

.card-log-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.account-modal-loading {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 13px;
}

.modal-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid #e4e4e7;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

.account-modal-error,
.account-empty-state {
    padding: 28px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-radius: var(--radius);
}

.account-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.account-detail-row,
.model-item {
    background: var(--bg-subtle);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.account-detail-row {
    padding: 12px 14px;
    min-width: 0;
}

.account-detail-row span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.account-detail-row strong {
    display: block;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-detail-section {
    margin-top: 22px;
}

.account-detail-section-title {
    margin-bottom: 10px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
}

.account-model-loading {
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-radius: var(--radius);
    font-size: 13px;
}

.account-model-loading .modal-spinner {
    width: 24px;
    height: 24px;
    border-width: 2px;
}

.model-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(210px, 1fr));
    gap: 8px;
}

.model-title span {
    color: var(--text-main);
    font-weight: 600;
}

.model-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px;
    min-width: 0;
}

.model-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    object-fit: contain;
    border: none;
    border-radius: 0;
    background: transparent;
}

.model-content {
    min-width: 0;
    flex: 1;
}

.model-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.model-title span {
    font-size: 12.5px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-id {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-desc {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 11.5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.model-params {
    margin-top: 6px;
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.45;
}

.model-param {
    display: inline;
    white-space: normal;
}

.model-param:not(:last-child)::after {
    content: " · ";
    color: var(--text-disabled);
}

@media (max-width: 760px) {
    .model-list {
        grid-template-columns: 1fr;
    }
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(20px); }
}

@media (max-width: 768px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* 真实模型账号测试 */
.message-health-modal {
    align-items: center;
    justify-content: center;
}

.message-health-content {
    width: min(760px, 100%);
    max-width: 760px;
    margin: auto;
    overflow: hidden;
    flex-direction: column;
}

.message-health-header {
    align-items: flex-start;
}

.message-health-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.message-health-title-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #a7f3d0;
    border-radius: 7px;
    background: #ecfdf5;
    color: #047857;
}

.message-health-title-icon svg {
    width: 18px;
    height: 18px;
}

.message-health-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.message-health-close {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.message-health-close:hover {
    background: var(--bg-subtle);
    color: var(--text-main);
}

.message-health-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.message-health-modes {
    width: fit-content;
    max-width: 100%;
    display: flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-subtle);
}

.message-health-mode {
    min-height: 34px;
    padding: 6px 13px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.message-health-mode:hover:not(:disabled) {
    color: var(--text-main);
}

.message-health-mode.active {
    background: var(--bg-surface);
    color: var(--text-main);
    box-shadow: 0 1px 3px rgba(24, 24, 27, 0.10);
    font-weight: 600;
}

.message-health-mode:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.message-health-mode span {
    display: inline-flex;
    min-width: 19px;
    height: 19px;
    margin-left: 4px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e4e4e7;
    color: #52525b;
    font-size: 11px;
}

.message-health-target {
    margin-top: -8px;
    color: var(--text-muted);
    font-size: 12px;
}

.message-health-single-field,
.message-health-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.message-health-single-field[hidden] {
    display: none;
}

.message-health-single-field label,
.message-health-field > span {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
}

.message-health-single-field .k-input {
    max-width: 220px;
}

.message-health-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 14px;
}

.message-health-form textarea.k-input {
    min-height: 76px;
    max-height: 180px;
}

.message-health-result:empty {
    display: none;
}

.message-health-progress-card,
.message-health-complete,
.message-health-error {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-subtle);
}

.message-health-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 12px;
}

.message-health-progress-head strong {
    color: var(--text-main);
    font-size: 13px;
}

.message-health-progress-track {
    height: 6px;
    margin: 11px 0;
    overflow: hidden;
    border-radius: 3px;
    background: #e4e4e7;
}

.message-health-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #10b981;
    transition: width 0.2s ease;
}

.message-health-progress-stats {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 12px;
}

.message-health-progress-stats strong {
    margin-left: 3px;
    color: var(--text-main);
}

.message-health-complete-title {
    margin-bottom: 11px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
}

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

.message-health-summary-grid > div {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-surface);
}

.message-health-summary-grid span,
.message-health-summary-grid strong {
    display: block;
}

.message-health-summary-grid span {
    color: var(--text-muted);
    font-size: 11px;
}

.message-health-summary-grid strong {
    margin-top: 4px;
    color: var(--text-main);
    font-size: 18px;
}

.message-health-details {
    max-height: 180px;
    margin-top: 12px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}

.message-health-detail {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.message-health-detail strong {
    color: var(--text-main);
}

.message-health-detail span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.message-health-detail-more,
.message-health-preserve-note {
    padding-top: 9px;
    color: var(--text-muted);
    font-size: 11px;
}

.message-health-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
}

.message-health-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 2px;
}

.message-health-run {
    gap: 7px;
    min-width: 116px;
}

.message-health-run svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .message-health-modal {
        padding: 12px;
        align-items: flex-start;
    }

    .message-health-content {
        max-height: calc(100vh - 24px);
    }

    .message-health-form {
        gap: 15px;
    }

    .message-health-modes {
        width: 100%;
    }

    .message-health-mode {
        flex: 1;
        min-width: 0;
        padding-left: 7px;
        padding-right: 7px;
    }

    .message-health-grid {
        grid-template-columns: 1fr;
    }

    .message-health-single-field .k-input {
        max-width: none;
    }

    .message-health-summary-grid {
        grid-template-columns: 1fr;
    }

    .message-health-summary-grid > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .message-health-summary-grid strong {
        margin-top: 0;
    }

    .message-health-actions .ui-btn {
        flex: 1;
    }
}

/* Desktop data tables: show every column without component-level scrollbars. */
@media (min-width: 641px) {
    #tab-accounts {
        max-width: 1300px;
    }

    #tab-accounts .account-table-scroll,
    #tab-assigned .account-table-scroll {
        overflow: visible !important;
        padding-bottom: 0;
    }

    #tab-accounts .account-table-scroll table,
    #tab-assigned .account-table-scroll table {
        min-width: 0;
    }

    #tab-assigned .account-table-scroll table {
        table-layout: auto;
    }

    #tab-accounts .account-pool-table .account-col-select { width: 4%; }
    #tab-accounts .account-pool-table .account-col-id { width: 5%; }
    #tab-accounts .account-pool-table .account-col-email { width: 24%; }
    #tab-accounts .account-pool-table .account-col-health { width: 9%; }
    #tab-accounts .account-pool-table .account-col-subscription { width: 8%; }
    #tab-accounts .account-pool-table .account-col-usage { width: 17%; }
    #tab-accounts .account-pool-table .account-col-checked { width: 11%; }
    #tab-accounts .account-pool-table .account-col-actions { width: 22%; }

    #tab-accounts .account-email-cell,
    #tab-assigned .account-email-cell {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    #tab-accounts .account-actions,
    #tab-assigned .account-actions {
        display: flex;
        flex-wrap: wrap;
        white-space: normal;
    }
}

.card-code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.card-code-wrap code {
    padding: 4px 7px;
    color: #164e63;
    background: #ecfeff;
    border: 1px solid #bae6fd;
    border-radius: 5px;
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 12px;
}

.card-code-copy {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    padding: 0;
    color: #0e7490;
    background: #ffffff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.card-code-copy:hover {
    color: #ffffff;
    background: #0891b2;
    border-color: #0891b2;
}

.card-code-copy.copied {
    color: #ffffff;
    background: #059669;
    border-color: #059669;
}

.card-code-copy svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 账号测试完成态：突出真实响应与逐账号结果 */
.message-health-content {
    width: min(820px, 100%);
    max-width: 820px;
    border-color: #d8e5df;
    box-shadow: 0 24px 64px rgba(24, 24, 27, 0.20), 0 2px 8px rgba(24, 24, 27, 0.08);
}

.message-health-header {
    padding: 20px 22px;
    background: #fbfefc;
    border-bottom-color: #dfe9e4;
}

.message-health-title-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-color: #6ee7b7;
    background: #dffbef;
    color: #047857;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.message-health-title-icon svg {
    width: 20px;
    height: 20px;
}

.message-health-form {
    gap: 16px;
    padding: 22px;
}

.message-health-progress-card {
    padding: 16px 18px;
    border-color: #bae6fd;
    background: #f0f9ff;
}

.message-health-progress-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.message-health-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0ea5e9;
    box-shadow: 0 0 0 5px rgba(14, 165, 233, 0.12);
    animation: messageHealthPulse 1.4s ease-in-out infinite;
}

.message-health-progress-percent {
    min-width: 48px;
    padding: 3px 8px;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    background: #fff;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.message-health-progress-track {
    height: 8px;
    margin: 14px 0 12px;
    background: #dbeafe;
}

.message-health-progress-track span {
    background: #0284c7;
}

.message-health-progress-stats .is-success strong { color: #047857; }
.message-health-progress-stats .is-danger strong { color: #be123c; }
.message-health-progress-stats .is-warning strong { color: #b45309; }

.message-health-complete {
    padding: 0;
    overflow: hidden;
    border-color: #d7e3dd;
    background: #fff;
    box-shadow: 0 8px 26px rgba(24, 24, 27, 0.07);
}

.message-health-result-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e4e4e7;
    background: #f8fafc;
}

.message-health-complete.is-all-healthy .message-health-result-hero {
    border-bottom-color: #bbf7d0;
    background: #ecfdf5;
}

.message-health-result-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #18181b;
    color: #fff;
}

.is-all-healthy .message-health-result-icon {
    background: #059669;
    box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.10);
}

.message-health-result-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.message-health-result-hero > div {
    min-width: 0;
}

.message-health-result-hero strong,
.message-health-result-hero span {
    display: block;
}

.message-health-result-hero strong {
    color: #18181b;
    font-size: 15px;
    font-weight: 750;
}

.message-health-result-hero span {
    margin-top: 3px;
    color: #52525b;
    font-size: 12px;
}

.message-health-summary-grid {
    gap: 10px;
    padding: 14px 18px 16px;
    background: #fff;
}

.message-health-summary-grid > div {
    position: relative;
    padding: 12px 13px;
    overflow: hidden;
    border-color: #e4e4e7;
    background: #fafafa;
}

.message-health-summary-grid > div::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: #a1a1aa;
}

.message-health-summary-grid > .is-success::before { background: #10b981; }
.message-health-summary-grid > .is-danger::before { background: #f43f5e; }
.message-health-summary-grid > .is-warning::before { background: #f59e0b; }

.message-health-summary-grid > .is-success strong { color: #047857; }
.message-health-summary-grid > .is-danger strong { color: #be123c; }
.message-health-summary-grid > .is-warning strong { color: #b45309; }

.message-health-summary-grid small {
    display: block;
    margin-top: 3px;
    color: #71717a;
    font-size: 10px;
    line-height: 1.35;
}

.message-health-response-section {
    border-top: 1px solid #e4e4e7;
}

.message-health-response-head {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    background: #fafafa;
}

.message-health-response-head strong,
.message-health-response-head span {
    display: block;
}

.message-health-response-head strong {
    color: #18181b;
    font-size: 13px;
}

.message-health-response-head > div > span {
    margin-top: 2px;
    color: #71717a;
    font-size: 10px;
}

.message-health-response-count {
    flex: 0 0 auto;
    padding: 3px 8px;
    border: 1px solid #d4d4d8;
    border-radius: 12px;
    background: #fff;
    color: #52525b;
    font-size: 10px;
    font-weight: 700;
}

.message-health-response-list {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #a1a1aa transparent;
}

.message-health-response-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 18px;
    border-top: 1px solid #f0f0f1;
    background: #fff;
}

.message-health-response-row:first-child {
    border-top: 0;
}

.message-health-response-row:hover {
    background: #fcfcfd;
}

.message-health-response-account {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-health-account-id {
    min-width: 42px;
    color: #18181b;
    font: 700 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.message-health-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border: 1px solid #d4d4d8;
    border-radius: 12px;
    background: #f4f4f5;
    color: #52525b;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.message-health-status-badge svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.message-health-response-row.is-active .message-health-status-badge {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.message-health-response-row.is-suspended .message-health-status-badge {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.message-health-response-row.is-failed .message-health-status-badge {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.message-health-response-content {
    min-width: 0;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.message-health-response-content > span {
    color: #71717a;
    font-size: 10px;
    font-weight: 600;
}

.message-health-response-content code {
    min-width: 0;
    padding: 7px 10px;
    overflow-wrap: anywhere;
    border: 1px solid #27272a;
    border-radius: 5px;
    background: #18181b;
    color: #d1fae5;
    font: 600 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: 0;
}

.message-health-response-row.is-suspended .message-health-response-content code,
.message-health-response-row.is-failed .message-health-response-content code {
    border-color: #e4e4e7;
    background: #fafafa;
    color: #7f1d1d;
}

.message-health-preserve-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 10px 18px 12px;
    border-top: 1px solid #cffafe;
    background: #ecfeff;
    color: #155e75;
    line-height: 1.5;
}

.message-health-preserve-note svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.message-health-no-response {
    padding: 18px;
    border-top: 1px solid #e4e4e7;
    color: #71717a;
    text-align: center;
    font-size: 12px;
}

.message-health-run {
    background: #18181b !important;
    border-color: #18181b !important;
    box-shadow: 0 8px 20px rgba(24, 24, 27, 0.18) !important;
}

.message-health-run:hover:not(:disabled) {
    background: #27272a !important;
    border-color: #27272a !important;
}

@keyframes messageHealthPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.75); opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .message-health-live-dot { animation: none; }
}

@media (max-width: 640px) {
    .message-health-header,
    .message-health-form {
        padding-left: 16px;
        padding-right: 16px;
    }

    .message-health-result-hero,
    .message-health-response-head,
    .message-health-response-row,
    .message-health-preserve-note {
        padding-left: 14px;
        padding-right: 14px;
    }

    .message-health-summary-grid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .message-health-summary-grid > div small {
        margin: 0 8px 0 auto;
    }

    .message-health-response-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .message-health-response-content {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .message-health-response-list {
        max-height: 340px;
    }
}
