/* Ceramic Luxury UI Design System (KeyVault Edition - Refined Typography & QR Support) */
:root {
    /* Ceramic Canvas Tokens */
    --ceramic-bg: #f5f7fa;
    --ceramic-card: #ffffff;
    --ceramic-subtle: #f8fafc;
    --ceramic-subtle-hover: #f1f5f9;
    --ceramic-border: #e2e8f0;
    --ceramic-border-hover: #cbd5e1;
    --ceramic-border-active: #94a3b8;

    /* Typography Tokens */
    --ceramic-text-main: #0f172a;
    --ceramic-text-muted: #64748b;
    --ceramic-text-subtle: #94a3b8;

    /* Accent & Status Tokens */
    --accent-50: #eef2ff;
    --accent-100: #e0e7ff;
    --accent-500: #6366f1;
    --accent-600: #4f46e5;
    --accent-700: #4338ca;
    --accent-glow: rgba(99, 102, 241, 0.12);

    --status-green: #059669;
    --status-green-bg: #ecfdf5;
    --status-green-border: #a7f3d0;

    --status-red: #e11d48;
    --status-red-bg: #fff1f2;
    --status-red-border: #fecdd3;

    --status-amber: #d97706;
    --status-amber-bg: #fffbeb;
    --status-amber-border: #fde68a;

    /* Elevation & Shadows */
    --shadow-ceramic: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
    --shadow-tile: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.02);
    --shadow-card-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
    --shadow-toast: 0 20px 40px -10px rgba(15, 23, 42, 0.2);

    /* Legacy variable mapping */
    --bg: var(--ceramic-bg);
    --panel: var(--ceramic-card);
    --text: var(--ceramic-text-main);
    --muted: var(--ceramic-text-muted);
    --line: var(--ceramic-border);
    --soft: var(--ceramic-subtle);
    --green: var(--status-green);
    --green-bg: var(--status-green-bg);
    --green-line: var(--status-green-border);
    --red: var(--status-red);
    --primary: var(--ceramic-text-main);
    --on-primary: #ffffff;
    --input: #ffffff;

    color: var(--ceramic-text-main);
    background-color: var(--ceramic-bg);
}

html,
body {
    height: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#app {
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-shell {
    height: 100%;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    background-color: var(--ceramic-bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.03) 0px, transparent 50%),
        radial-gradient(at 50% 30%, rgba(245, 247, 250, 0.95) 0px, transparent 100%);
    background-attachment: fixed;
    color: var(--ceramic-text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

code,
textarea,
input[type="password"] {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-feature-settings: "liga" 0;
}

/* Tabular numbers for all stats & timestamps */
.task-number,
.summary-strip strong,
.activity-details strong,
.task-meta,
.task-percent,
.task-timeline time {
    font-variant-numeric: tabular-nums;
}

/* Transitions & Focus Controls */
button,
a,
input,
select,
textarea {
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

button:focus-visible,
a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 0 1px var(--accent-600);
}

/* ========================================================
   1. TOP BRAND HEADER
   ======================================================== */
.header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ceramic-border);
}

.header-inner {
    max-width: 1720px;
    min-height: 66px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo-img,
.maintenance-brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.25);
}

.brand strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--ceramic-text-main);
    display: block;
}

.brand small {
    font-size: 11px;
    font-weight: 400;
    color: var(--ceramic-text-muted);
    display: block;
    margin-top: 1px;
}

.brand-slash {
    color: #cbd5e1;
    padding: 0 3px;
}

.header-divider {
    height: 20px;
    width: 1px;
    background: var(--ceramic-border);
}

.header-tag {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: var(--ceramic-subtle);
    border: 1px solid var(--ceramic-border);
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.docs-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ceramic-text-muted);
    padding: 6px 10px;
    border-radius: 8px;
}

.docs-link:hover {
    color: var(--accent-600);
    background: var(--accent-50);
}

.header-payment-section {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-provider-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 550;
    color: var(--ceramic-text-muted);
    padding: 5px 9px;
    border-radius: 8px;
    transition: all 0.15s ease;
    background: var(--ceramic-subtle);
    border: 1px solid var(--ceramic-border);
}

.header-provider-link:hover {
    color: var(--accent-600);
    background: var(--accent-50);
    border-color: rgba(99, 102, 241, 0.3);
}

/* 统一圆角胶囊药丸指标组 (图 2 / Seashore / masi 统一风格) */
.header-stats-group.stats-pill-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stat-pill,
.seashore-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    background: var(--ceramic-card);
    border: 1px solid var(--ceramic-border);
    color: var(--ceramic-text-muted);
    box-shadow: var(--shadow-tile);
    user-select: none;
}

.stat-pill .dot,
.seashore-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-pill .dot-green,
.seashore-pill .dot-green {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.stat-pill .dot-amber,
.seashore-pill .dot-amber {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.stat-pill .dot-blue,
.seashore-pill .dot-blue {
    background: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.stat-pill .pill-label,
.seashore-pill .pill-label {
    font-weight: 500;
    color: var(--ceramic-text-muted);
}

.stat-pill .pill-val,
.seashore-pill .pill-val {
    font-size: 12.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.stat-pill .val-green,
.seashore-pill .val-green {
    color: #059669;
}

.stat-pill .val-amber,
.seashore-pill .val-amber {
    color: #d97706;
}

.stat-pill .val-blue,
.seashore-pill .val-blue {
    color: #2563eb;
}

/* 深色模式适配 */
:root[data-theme='dark'] .stat-pill .val-green,
:root[data-theme='dark'] .seashore-pill .val-green {
    color: #34d399;
}

:root[data-theme='dark'] .stat-pill .val-amber,
:root[data-theme='dark'] .seashore-pill .val-amber {
    color: #fbbf24;
}

:root[data-theme='dark'] .stat-pill .val-blue,
:root[data-theme='dark'] .seashore-pill .val-blue {
    color: #60a5fa;
}

/* 胶囊刷新联动动效 */
.stats-pill-group.is-refreshing .stat-pill {
    animation: pillRefreshPulse 0.6s ease-in-out;
}

@keyframes pillRefreshPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.96);
        opacity: 0.55;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 顶部指标小屏幕自适应防挤压 */
@media (max-width: 1100px) {
    .stat-pill .pill-label {
        display: none;
    }

    .stat-pill {
        padding: 4px 8px;
        gap: 5px;
    }
}

.warning-text {
    color: #d97706 !important;
    font-weight: 600;
}

.danger-text {
    color: #ef4444 !important;
    font-weight: 600;
}

.online-badge {
    display: inline-flex;
    align-items: center;
    user-select: none;
}

.online-badge .status-label {
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 550;
    gap: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.online-badge .online-user-icon {
    opacity: 0.85;
}

.online-badge .online-count {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.icon-button {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ceramic-border);
    background: var(--ceramic-card);
    color: var(--ceramic-text-muted);
    box-shadow: var(--shadow-tile);
    cursor: pointer;
}

.icon-button:hover {
    color: var(--ceramic-text-main);
    border-color: var(--ceramic-border-hover);
    background: var(--ceramic-subtle);
}

/* ========================================================
   2. ACTIVITY STATUS CAPSULE
   ======================================================== */
main {
    max-width: 1720px;
    margin: 0 auto;
    padding: 16px 24px;
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.activity-panel {
    flex-shrink: 0;
    background: var(--ceramic-card);
    border: 1px solid var(--ceramic-border);
    border-radius: 16px;
    box-shadow: var(--shadow-tile);
    margin-bottom: 14px;
    overflow: hidden;
}

.activity-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.soft-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--ceramic-subtle);
    border: 1px solid var(--ceramic-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
}

.activity-title {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.activity-title strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--ceramic-text-main);
}

.activity-title small {
    font-size: 11px;
    color: var(--ceramic-text-muted);
}

.service-tags {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.status-label i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
}

.status-label.online {
    background: var(--status-green-bg);
    border-color: var(--status-green-border);
    color: var(--status-green);
}

.status-label.online i {
    background: var(--status-green);
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
    animation: ceramicPulse 2.5s infinite;
}

@keyframes ceramicPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(5, 150, 105, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
    }
}

.activity-details {
    border-top: 1px solid var(--ceramic-border);
    background: var(--ceramic-subtle);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.activity-details>div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-details small {
    font-size: 11px;
    font-weight: 500;
    color: var(--ceramic-text-muted);
}

.activity-details strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--ceramic-text-main);
}


/* ========================================================
   3. WORKSPACE & CERAMIC PANELS
   ======================================================== */
.workspace {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    height: 100%;
    overflow: hidden;
    transition: grid-template-columns 0.48s cubic-bezier(0.25, 1, 0.3, 1), gap 0.48s cubic-bezier(0.25, 1, 0.3, 1);
}

.workspace.is-sidebar-collapsed {
    grid-template-columns: 0px minmax(0, 1fr);
    gap: 0px;
}

.panel {
    background: var(--ceramic-card);
    border: 1px solid var(--ceramic-border);
    border-radius: 16px;
    box-shadow: var(--shadow-tile);
    position: relative;
    min-height: 0;
}

.parameters {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 0;
    min-width: 0;
    position: relative;
    /* 初始态：以右下角为锚点的完整半圆弧展开覆盖 */
    clip-path: circle(150% at 100% 100%);
    transform-origin: 100% 100%;
    transition: clip-path 0.48s cubic-bezier(0.25, 1, 0.3, 1),
        opacity 0.38s ease,
        visibility 0.48s ease,
        border-color 0.35s ease;
    will-change: clip-path;
}

/* 内部内容占满高度，Flex 纵向分层：顶部标题、中间滚动、底部吸底操作 */
.parameters-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    overflow: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.parameters-header {
    padding: 14px 16px;
    flex-shrink: 0;
    margin-bottom: 0 !important;
    align-items: center !important;
    border-bottom: 1px solid color-mix(in srgb, var(--ceramic-border) 72%, transparent);

}

.parameters-title-row {
    display: flex;
    align-items: center;
}

.parameters-title-row h1 {
    letter-spacing: -0.02em;
}

.parameters-eyebrow {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border: 1px solid var(--ceramic-border);
    border-radius: 6px;
    color: var(--accent-600);
    background: var(--ceramic-subtle);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.parameters-description {
    max-width: 300px;
    margin-top: 6px;
    line-height: 1.55;
}

.parameters-description a {
    display: inline-flex;
    align-items: center;
    margin-top: 5px;
    color: var(--accent-600);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.parameters-description a:hover {
    color: var(--accent-700);
}

.parameters-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.parameters-scroll-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 14px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.parameters-scroll-body::-webkit-scrollbar {
    width: 5px;
}

.parameters-scroll-body::-webkit-scrollbar-track {
    background: transparent;
}

.parameters-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 9999px;
}

.parameters-scroll-body::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.45);
}

.dark .parameters-scroll-body {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.dark .parameters-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.dark .parameters-scroll-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 底部固定操作区：永久吸附在左侧卡片最底部 */
.parameters-action-footer {
    flex-shrink: 0;
    padding: 12px 16px 14px;
    background: var(--ceramic-card);
    border-top: 1px solid var(--ceramic-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 5;
    border-radius: 0 0 20px 20px;
}

.dark .parameters-action-footer {
    background: var(--ceramic-card);
    border-top-color: var(--ceramic-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

/* 收起态：从右下角开始以半圆弧慢慢收拢收尽，彻底隐藏无残留 */
.workspace.is-sidebar-collapsed .parameters {
    clip-path: circle(0% at 100% 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    padding: 0;
    border-color: transparent;
}

.workspace.is-sidebar-collapsed .parameters-inner {
    opacity: 0;
    visibility: hidden;
}

/* Chrome, Safari, Opera: 彻底隐藏左侧怪异突兀的白底大滚动条 */
.parameters::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 任务配置面板收起按钮 */
.icon-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ceramic-text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
    flex-shrink: 0;
}

.icon-toggle-btn:hover {
    background: var(--ceramic-subtle);
    color: var(--ceramic-text);
    border-color: var(--ceramic-border);
}

.icon-toggle-btn:active {
    transform: scale(0.92);
}

/* 实时作业队列展开配置微药丸按钮 */
.sidebar-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--ceramic-card);
    border: 1px solid var(--ceramic-border);
    border-radius: 8px;
    color: var(--ceramic-text);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-tile);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    animation: expandPillIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-expand-btn:hover {
    background: var(--ceramic-subtle);
    border-color: #6366f1;
    color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.sidebar-expand-btn:active {
    transform: scale(0.95);
}

@keyframes expandPillIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateX(-6px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

.progress-panel {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    padding: 16px 18px 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

h1,
h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ceramic-text-main);
}

.panel-heading p {
    font-size: 12px;
    font-weight: 400;
    color: var(--ceramic-text-muted);
    line-height: 1.5;
    margin-top: 3px;
}

.heading-with-icon {
    display: flex;
    align-items: center;
    gap: 9px;
}

.heading-with-icon>svg {
    color: #6366f1;
}

/* ========================================================
   4. FORM INPUTS & CAPSULES
   ======================================================== */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field>label,
.label-line label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ceramic-text-main);
}

.label-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

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

.subtle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--ceramic-text-muted);
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
}

.subtle:hover {
    color: var(--ceramic-text-main);
    background: var(--ceramic-subtle);
}

/* 表单行内操作胶囊按钮组 (合并 / 验证 / 已验证) */
.inline-subtle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--ceramic-text-muted);
    background: color-mix(in srgb, var(--ceramic-card) 60%, var(--ceramic-bg));
    border: 1px solid color-mix(in srgb, var(--ceramic-border) 70%, transparent);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.inline-subtle-btn:hover {
    color: var(--ceramic-text-main);
    background: var(--ceramic-card);
    border-color: var(--ceramic-border-hover);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cdk-verify-btn {
    height: 24px;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
    background: var(--ceramic-card);
    border: 1px solid color-mix(in srgb, var(--ceramic-border) 80%, transparent);
    color: var(--ceramic-text-main);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.cdk-verify-btn:hover:not(:disabled) {
    border-color: var(--accent-500);
    color: var(--accent-600);
    background: rgba(99, 102, 241, 0.04);
}

.cdk-verify-btn:active:not(:disabled) {
    transform: scale(0.97);
}

/* 验证成功：翡翠绿清透胶囊状态 */
.cdk-verify-btn.is-verified {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.28);
    color: #059669;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.05);
}

.cdk-verify-btn.is-verified:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.42);
    color: #047857;
}

:root[data-theme='dark'] .cdk-verify-btn.is-verified {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.32);
    color: #34d399;
}

/* 正在校验中状态 */
.cdk-verify-btn.is-validating {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    color: #4f46e5;
}

:root[data-theme='dark'] .cdk-verify-btn.is-validating {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.18);
}

.mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 28px;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--ceramic-border);
    background: var(--ceramic-card);
    color: var(--ceramic-text-main);
    box-shadow: var(--shadow-tile);
    cursor: pointer;
    white-space: nowrap;
}

.mini-button.primary {
    background: var(--ceramic-text-main);
    color: #ffffff;
    border-color: var(--ceramic-text-main);
}

.mini-button:hover:not(:disabled) {
    border-color: var(--ceramic-border-hover);
    background: var(--ceramic-subtle);
}

.mini-button.primary:hover:not(:disabled) {
    background: #334155;
    color: #ffffff;
}

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

.mini-button.danger-action {
    color: var(--status-red);
}

.mini-button.danger-action:hover:not(:disabled) {
    background: var(--status-red-bg);
    border-color: var(--status-red-border);
    color: var(--status-red);
}

.mini-button.retry-action {
    color: #4f46e5;
    background: #eef2ff;
    border-color: #c7d2fe;
    font-weight: 500;
}

.mini-button.retry-action:hover:not(:disabled) {
    background: #e0e7ff;
    border-color: #a5b4fc;
    color: #3730a3;
}

.mini-button.switch-provider-btn {
    color: #6366f1;
    background: #f5f3ff;
    border-color: #ddd6fe;
    font-weight: 550;
    gap: 3px;
}

.mini-button.switch-provider-btn:hover:not(:disabled) {
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

.cdk-batch-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.cdk-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--ceramic-border);
    background: var(--ceramic-subtle);
    color: var(--ceramic-text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.cdk-action-pill.retry-action {
    color: #4f46e5;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.cdk-action-pill.retry-action:hover:not(:disabled) {
    background: #e0e7ff;
    border-color: #a5b4fc;
    color: #3730a3;
}

.cdk-action-pill.sync-action {
    color: #0284c7;
    background: #f0f9ff;
    border-color: #bae6fd;
}

.cdk-action-pill.sync-action:hover:not(:disabled) {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}

.cdk-action-pill:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

:root.dark .cdk-action-pill.retry-action,
.dark .cdk-action-pill.retry-action {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.35);
}

:root.dark .cdk-action-pill.sync-action,
.dark .cdk-action-pill.sync-action {
    color: #7dd3fc;
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(14, 165, 233, 0.35);
}

.task-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

input:not([type=checkbox]):not([type=radio]),
select,
textarea {
    width: 100%;
    border: 1px solid var(--ceramic-border);
    background: #ffffff;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    color: var(--ceramic-text-main);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
    outline: none;
}

input:not([type=checkbox]):not([type=radio]):focus,
select:focus,
textarea:focus {
    border-color: var(--accent-600);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder,
textarea::placeholder {
    color: var(--ceramic-text-subtle);
    font-size: 12px;
}

textarea {
    min-height: 76px;
    line-height: 1.5;
    resize: vertical;
}

textarea:disabled,
select:disabled {
    background: var(--ceramic-subtle);
    color: var(--ceramic-text-subtle);
    cursor: not-allowed;
}

.input-icon {
    position: relative;
}

.input-icon>svg {
    position: absolute;
    top: 50%;
    left: 11px;
    transform: translateY(-50%);
    color: var(--ceramic-text-subtle);
    pointer-events: none;
    z-index: 2;
}

.input-icon>input,
.input-icon>select {
    padding-left: 36px !important;
}

.field-note {
    font-size: 11px;
    color: var(--ceramic-text-muted);
    line-height: 1.5;
}

.green-text {
    color: var(--status-green) !important;
}

.red-text {
    color: var(--status-red) !important;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ceramic-text-main);
    cursor: pointer;
    user-select: none;
}

.check-row input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

/* ========================================================
   5. AUTO-PAY CONFIGURATION POD
   ======================================================== */
.payment-box {
    background: var(--ceramic-subtle);
    border: 1px solid var(--ceramic-border);
    border-radius: 14px;
    margin: 16px 0;
}

.payment-box.enabled {
    background: #ffffff;
    border-color: #cbd5e1;
}

.switch-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    border-radius: 13px;
}

.payment-box.enabled .switch-row {
    border-radius: 13px 13px 0 0;
}

.payment-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--ceramic-border);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-tile);
}

.switch-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.switch-copy strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--ceramic-text-main);
}

.switch-copy small {
    font-size: 11px;
    color: var(--ceramic-text-muted);
}

input.switch {
    appearance: none;
    -webkit-appearance: none;
    width: 36px;
    height: 20px;
    border-radius: 9999px;
    background: #cbd5e1;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

input.switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

input.switch:checked {
    background: #4f46e5;
}

input.switch:checked::before {
    transform: translateX(16px);
}

.payment-fields {
    padding: 14px;
    border-top: 1px solid var(--ceramic-border);
    background: #ffffff;
    border-radius: 0 0 13px 13px;
}

.provider-picker {
    border: 0;
    padding: 0;
    margin: 0 0 14px;
}

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

.provider-title,
.provider-picker legend {
    font-size: 11px;
    font-weight: 600;
    color: var(--ceramic-text-muted);
}

.provider-site-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 500;
    color: var(--accent-600);
    text-decoration: none;
    line-height: 1;
}

.provider-site-link:hover {
    color: var(--accent-700);
    text-decoration: underline;
}

.provider-picker>div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.provider-picker label {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--ceramic-border);
    border-radius: 10px;
    padding: 8px 10px;
    background: var(--ceramic-card);
    cursor: pointer;
    box-shadow: var(--shadow-tile);
    min-width: 0;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.provider-picker label.chosen {
    border-color: #4f46e5;
    background: var(--accent-50);
}

.provider-picker label input[type="radio"] {
    flex-shrink: 0;
    margin: 0;
}

.provider-picker span {
    display: flex;
    flex-direction: column;
    gap: 1.5px;
    min-width: 0;
    overflow: hidden;
}

.provider-picker strong {
    font-size: 12.5px;
    font-weight: 650;
    color: var(--ceramic-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.provider-picker small {
    font-size: 10.5px;
    color: var(--ceramic-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.tiny-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #475569;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========================================================
   6. SUBMIT BUTTON & CONTROLS
   ======================================================== */
.submit-button {
    width: 100%;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    background: var(--ceramic-text-main);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.submit-button:hover:not(:disabled) {
    background: #334155;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.15);
}

.submit-button:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.privacy-note {
    font-size: 11px;
    color: var(--ceramic-text-muted);
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin-top: 12px;
    line-height: 1.5;
}

.privacy-note svg {
    margin-top: 2px;
    color: #6366f1;
}

/* ========================================================
   7. SUMMARY STRIP
   ======================================================== */
.task-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--ceramic-border);
    margin-bottom: 14px;
    padding-bottom: 10px;
    flex-shrink: 0;
}

.tabs {
    position: relative;
    display: flex;
    gap: 4px;
    border: 0;
    margin: 0;
    flex-wrap: wrap;
    padding: 3px;
    border-radius: 12px;
    background: var(--ceramic-subtle);
    isolation: isolate;
}

.tabs-glider {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 9px;
    background: var(--ceramic-card);
    border: 1px solid var(--ceramic-border);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    pointer-events: none;
    z-index: 1;
    transform-origin: 0 0;
    will-change: transform, width, height;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.18s ease;
}

.dark .tabs-glider {
    background: var(--ceramic-card);
    border-color: var(--ceramic-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.tabs button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ceramic-text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.tabs button:hover:not(.active) {
    color: var(--ceramic-text-main);
}

.tabs button.active {
    color: var(--ceramic-text-main);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    font-weight: 600;
    transform: none;
}

.tabs button.active::after {
    display: none !important;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--ceramic-subtle);
    color: var(--ceramic-text-muted);
    min-width: 18px;
    line-height: 1.2;
}

.tabs button.active .tab-badge {
    background: #0f172a;
    color: #ffffff;
}

.dark .tabs button.active .tab-badge {
    background: #f8fafc;
    color: #0f172a;
}

.tabs button .tab-badge.queued {
    color: var(--status-amber);
    background: var(--status-amber-bg);
}

.tabs button.active .tab-badge.queued {
    color: #ffffff;
    background: var(--status-amber);
}

.tabs button .tab-badge.extracting {
    color: #4f46e5;
    background: #eef2ff;
}

.dark .tabs button .tab-badge.extracting {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.18);
}

.tabs button.active .tab-badge.extracting {
    color: #ffffff;
    background: #4f46e5;
}

.tabs button .tab-badge.success {
    color: var(--status-green);
    background: var(--status-green-bg);
}

.tabs button.active .tab-badge.success {
    color: #ffffff;
    background: var(--status-green);
}

.tabs button .tab-badge.attention {
    color: var(--status-red);
    background: var(--status-red-bg);
}

.tabs button.active .tab-badge.attention {
    color: #ffffff;
    background: var(--status-red);
}

.task-total {
    font-size: 11px;
    font-weight: 500;
    color: var(--ceramic-text-muted);
}

.advanced-fields-enter-active,
.advanced-fields-leave-active {
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.24s ease, transform 0.24s ease;
}

.advanced-fields-enter-from,
.advanced-fields-leave-to {
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
}

.advanced-fields-enter-to,
.advanced-fields-leave-from {
    max-height: 420px;
    opacity: 1;
    transform: translateY(0);
}

/* ========================================================
   8. TASK CARD PHYSICS & QR POD
   ======================================================== */
.task-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 14px;
    align-content: start;
    grid-auto-rows: max-content;
    align-items: stretch;
    padding-bottom: 20px;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.task-grid::-webkit-scrollbar {
    width: 5px;
}

.task-grid::-webkit-scrollbar-track {
    background: transparent;
}

.task-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 9999px;
}

.task-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.45);
}

.dark .task-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.dark .task-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.task-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--ceramic-border);
    border-radius: 14px;
    padding: 13px 14px;
    box-shadow: var(--shadow-tile);
    position: relative;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.task-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 4px 0 6px;
    min-height: 80px;
}

.task-card:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--ceramic-border-hover);
}

.task-card.is-expanded {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-ceramic);
}

.task-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.task-number {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: var(--ceramic-text-muted);
    background: var(--ceramic-subtle);
    border: 1px solid var(--ceramic-border);
    padding: 1px 6px;
    border-radius: 5px;
    line-height: 1.2;
    flex-shrink: 0;
}

/* 极简克制的状态指示圆点：清晰、优雅、绝不刺眼 */
.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.dot-success {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-dot.dot-danger {
    background: #f43f5e;
    box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.2);
}

.status-dot.dot-working {
    background: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.status-dot.dot-neutral {
    background: #94a3b8;
}

.task-card .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    background: var(--ceramic-subtle);
    border: 1px solid var(--ceramic-border);
    color: var(--ceramic-text-muted);
}

.task-card .badge.success {
    background: var(--status-green-bg);
    border-color: var(--status-green-border);
    color: var(--status-green);
}

.task-card .badge.danger {
    background: var(--status-red-bg);
    border-color: var(--status-red-border);
    color: var(--status-red);
}

.task-card .badge.working {
    background: var(--accent-50);
    border-color: var(--accent-100);
    color: var(--accent-600);
}

.task-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.task-account h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ceramic-text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.account-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mini-btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid var(--ceramic-border);
    background: var(--ceramic-subtle);
    color: var(--ceramic-text-muted);
    font-size: 10.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.mini-btn-pill.icon-only {
    width: 22px;
    padding: 0;
    flex-shrink: 0;
    justify-content: center;
}

.mini-btn-pill:hover {
    background: #ffffff;
    color: var(--ceramic-text-main);
    border-color: var(--ceramic-border-hover);
}

.mini-btn-pill.copy-at {
    color: #4f46e5;
    background: #eef2ff;
    border-color: #e0e7ff;
}

.mini-btn-pill.copy-at:hover {
    background: #e0e7ff;
    color: #3730a3;
}

.mini-btn-pill.delete-btn {
    color: var(--ceramic-text-muted);
}

.mini-btn-pill.delete-btn:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

.dark .mini-btn-pill.delete-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 3px 0 10px;
    font-size: 11px;
    color: var(--ceramic-text-muted);
}

/* ========================================================
   7. TASK STATUS & FLOW COMPONENTS (REFACTORED CLEAN DESIGN)
   ======================================================== */

/* 模式 A：已生成 UPI 链接时的右侧代付进展微条 */
.qr-pay-flow {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 1px 0 2px;
}

.qr-pay-flow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.qr-pay-flow-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--ceramic-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qr-pay-flow-num {
    font-size: 10px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: var(--ceramic-text-muted);
}

.qr-pay-flow-bar {
    height: 3px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.dark .qr-pay-flow-bar {
    background: #334155;
}

.qr-pay-flow-fill {
    height: 100%;
    border-radius: 9999px;
    background: #6366f1;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-success .qr-pay-flow-fill {
    background: var(--status-green);
}

.flow-danger .qr-pay-flow-fill {
    background: var(--status-red);
}

.flow-warning .qr-pay-flow-fill {
    background: var(--status-amber);
}

/* 模式 B：尚未生成支付链接时的纯净状态微卡片 */
.task-status-pod {
    /* background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px; */
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.dark .task-status-pod {
    background: rgba(15, 23, 42, 0.4);
    border-color: #334155;
}

.task-status-pod.failed {
    background: #fffcfc;
    border-color: #fecdd3;
}

.dark .task-status-pod.failed {
    background: rgba(225, 29, 72, 0.06);
    border-color: rgba(225, 29, 72, 0.2);
}

.task-status-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.task-status-name {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ceramic-text-main);
    min-width: 0;
}

.task-status-pod.failed .task-status-name {
    color: #b91c1c;
}

.task-status-percent {
    font-size: 10px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: var(--ceramic-text-muted);
}

.task-step-progress {
    margin-top: 10px;
}

.task-step-heading,
.task-total-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--ceramic-text-muted);
    font-size: 11px;
    line-height: 1.4;
    font-family: ui-monospace, SFMono-Regular, monospace;
}

.task-step-current {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ceramic-text-main);
    font-family: inherit;
    font-weight: 700;
}

.task-step-markers {
    display: flex;
    gap: 3px;
    margin-top: 6px;
    min-height: 5px;
}

.task-step-markers i {
    display: block;
    flex: 1 1 0;
    min-width: 3px;
    height: 5px;
    border-radius: 999px;
    background: #e2e8f0;
    transition: background-color .25s ease, box-shadow .25s ease;
}

.task-step-markers i.done {
    background: #6366f1;
}

.task-step-markers i.active {
    background: #a5b4fc;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, .12);
}

.task-total-progress {
    margin-top: 10px;
}

.task-total-heading {
    margin-bottom: 5px;
}

.task-total-heading strong {
    color: var(--ceramic-text-muted);
    font-size: 11px;
}

.dark .task-step-markers i {
    background: #334155;
}

.dark .task-step-markers i.done {
    background: #818cf8;
}

.dark .task-step-markers i.active {
    background: #a5b4fc;
}

.task-status-progress {
    height: 5px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.dark .task-status-progress {
    background: #334155;
}

.task-status-fill {
    height: 100%;
    background: #6366f1;
    border-radius: 9999px;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.task-status-pod.failed .task-status-fill {
    background: var(--status-red);
}

.task-status-msg {
    font-size: 10px;
    line-height: 1.35;
    color: #b91c1c;
    margin: 0;
    word-break: break-all;
    background: #fff5f5;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px dashed #fecaca;
}

/* 二维码展示组件 (QR Pod) - 彻底避免溢出 */
.task-qr-pod {
    margin-top: 8px;
    padding: 8px 10px;
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    min-width: 0;
    overflow: hidden;
}

.qr-box {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.qr-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.qr-zoom-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    font-size: 9px;
    font-weight: 500;
    text-align: center;
    padding: 2px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s;
}

.qr-box:hover .qr-zoom-hint {
    opacity: 1;
}

.qr-box.is-completed {
    border-color: rgba(16, 185, 129, 0.4);
}

.qr-success-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(1.5px);
    border-radius: 6px;
    z-index: 2;
    animation: qrSuccessFadeIn 0.25s ease-out;
}

:root.dark .qr-success-mask {
    background: rgba(15, 23, 42, 0.82);
}

.qr-check-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.45);
    animation: qrBadgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes qrSuccessFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes qrBadgePop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.qr-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.qr-title {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ceramic-text-main);
    white-space: nowrap;
}

.qr-title svg {
    color: #6366f1;
}

.qr-expire-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 500;
    background: var(--ceramic-bg-subtle, rgba(0, 0, 0, 0.04));
    color: var(--ceramic-text-muted, #64748b);
    border: 1px solid var(--ceramic-border-subtle, rgba(0, 0, 0, 0.06));
    line-height: 1.2;
}

.qr-expire-tag svg {
    color: inherit !important;
}

.qr-expire-tag.is-urgent {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.28);
}

.qr-expire-tag.is-expired {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.28);
}

.qr-expire-tag.is-critical {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.4);
    animation: pulse-urgent 1.5s infinite;
}

@keyframes pulse-urgent {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.65;
    }

    100% {
        opacity: 1;
    }
}

/* 失败原因智能分类标签 */
.error-cat-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    margin-left: 6px;
    user-select: none;
}

.error-cat-badge.cat-token {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.error-cat-badge.cat-timeout {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.error-cat-badge.cat-quota {
    background: rgba(217, 119, 6, 0.1);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.error-cat-badge.cat-risk {
    background: rgba(168, 85, 247, 0.1);
    color: #9333ea;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.error-cat-badge.cat-cancel {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.25);
}

.error-cat-badge.cat-fail {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.big-qr-expire-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    margin: 10px auto 4px;
    background: var(--ceramic-bg-subtle, rgba(0, 0, 0, 0.04));
    color: var(--ceramic-text-secondary, #475569);
    border: 1px solid var(--ceramic-border-subtle, rgba(0, 0, 0, 0.08));
}

.big-qr-expire-tag.is-urgent {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.3);
}

.big-qr-expire-tag.is-expired {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.qr-desc {
    font-size: 10px;
    color: var(--ceramic-text-muted);
    line-height: 1.3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 按钮网格：自适应两列，不超出 */
.qr-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 5px;
    width: 100%;
}

.qr-actions-grid .qr-btn.full-width {
    grid-column: span 2;
}

.qr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 24px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    cursor: pointer;
    white-space: nowrap;
    min-width: 0;
    text-decoration: none;
}

.qr-btn:hover {
    border-color: #94a3b8;
    color: #0f172a;
    background: #f8fafc;
}

.qr-btn.primary {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.qr-btn.primary:hover {
    background: #334155;
}

.reconcile-inline {
    margin: 10px 0;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.reconcile-inline>label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ceramic-text-muted);
    display: block;
    margin-bottom: 4px;
}

.reconcile-inline>div {
    display: flex;
    gap: 6px;
}

.reconcile-inline input {
    padding: 6px 8px;
    font-size: 11px;
    flex: 1;
}

/* 详情展开的状态说明横幅 */
.task-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 11.5px;
    line-height: 1.5;
    color: #334155;
    margin-bottom: 12px;
}

.task-status-banner.danger {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.task-status-banner.success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.task-banner-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.task-banner-text {
    flex: 1;
    overflow-wrap: anywhere;
}

/* 详情展开步进器 (Steps) - 2 列网格自适应 */
.task-expanded .steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin: 12px 0;
    list-style: none;
}

.task-expanded .steps li {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ceramic-text-muted);
    white-space: nowrap;
}

.task-expanded .steps li>span {
    width: 18px;
    height: 18px;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
    background: #ffffff;
}

.task-expanded .steps li.done {
    color: var(--status-green);
    font-weight: 600;
}

.task-expanded .steps li.done>span {
    background: var(--status-green);
    color: #ffffff;
    border-color: var(--status-green);
}

.task-expanded .steps li.live {
    color: var(--ceramic-text-main);
    font-weight: 600;
}

.task-expanded .steps li.live>span {
    border-color: var(--accent-600);
    color: var(--accent-600);
}

.task-message {
    font-size: 11px;
    color: var(--ceramic-text-muted);
    line-height: 1.5;
    margin: 10px 0;
    min-height: 34px;
}

.task-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--ceramic-border);
    margin-top: auto;
}

.card-toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    background: transparent;
    color: var(--ceramic-text-muted);
    border: 0;
}

.card-toggle:hover {
    background: var(--ceramic-subtle);
    color: var(--ceramic-text-main);
}

/* 二维码高清放大弹窗 */
.qr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.qr-modal-card {
    background: #ffffff;
    border: 1px solid var(--ceramic-border);
    border-radius: 20px;
    box-shadow: var(--shadow-toast);
    width: 100%;
    max-width: 360px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: qrZoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.log-modal-card {
    max-width: 500px;
    align-items: stretch;
}

.log-modal-body {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 4px;
}

.log-modal-account {
    font-size: 13px;
    font-weight: 600;
    color: var(--ceramic-text-main);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ceramic-border);
    word-break: break-all;
}

.log-modal-card .task-timeline {
    margin: 0;
    padding-left: 14px;
}

@keyframes qrZoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.qr-modal-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.qr-modal-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ceramic-text-main);
}

.qr-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.qr-modal-img {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    border: 1px solid var(--ceramic-border);
    padding: 10px;
    background: #ffffff;
    box-shadow: var(--shadow-tile);
    margin-bottom: 12px;
}

.qr-modal-account {
    font-size: 12px;
    font-weight: 600;
    color: var(--ceramic-text-main);
    margin-bottom: 4px;
}

.qr-modal-tip {
    font-size: 11px;
    color: var(--ceramic-text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.qr-modal-footer {
    width: 100%;
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ========================================================
   9. EMPTY STATE POD & TOAST/BANNERS
   ======================================================== */
.empty-state {
    flex: 1;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    border: 1.5px dashed var(--ceramic-border);
    border-radius: 16px;
    background: var(--ceramic-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 20px;
    margin-bottom: 16px;
}

.empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--ceramic-subtle);
    border: 1px solid var(--ceramic-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ceramic-text-muted);
    box-shadow: var(--shadow-tile);
    margin-bottom: 14px;
}

.empty-state h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--ceramic-text-main);
    margin-bottom: 4px;
}

.empty-state p {
    font-size: 12px;
    color: var(--ceramic-text-muted);
    line-height: 1.6;
}

/* ========================================================
   Element 风格全局浮动消息提示 (ElMessage)
   ======================================================== */
.el-message-toast,
.floating-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    max-width: min(90vw, 680px);
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.12), 0 2px 6px -2px rgba(15, 23, 42, 0.06);
    pointer-events: auto;
    border: 1px solid transparent;
    backdrop-filter: blur(8px);
}

.el-message-toast.is-success,
.floating-toast {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.el-message-toast.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.el-message-toast.is-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.el-message-icon {
    flex-shrink: 0;
}

.el-message-icon.green {
    color: #16a34a;
}

.el-message-icon.red {
    color: #dc2626;
}

.el-message-icon.amber {
    color: #d97706;
}

.el-message-content {
    flex: 1;
    line-height: 1.4;
    word-break: break-all;
}

.el-message-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
    margin-left: 6px;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.el-message-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08);
}

.toast-slide-fade-enter-active,
.toast-slide-fade-leave-active,
.toast-fade-enter-active,
.toast-fade-leave-active {
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-slide-fade-enter-from,
.toast-slide-fade-leave-to,
.toast-fade-enter-from,
.toast-fade-leave-to {
    opacity: 0;
    transform: translate(-50%, -18px);
}

.dark .el-message-toast.is-success,
.dark .floating-toast {
    background: #064e3b;
    border-color: #059669;
    color: #d1fae5;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
}

.dark .el-message-toast.is-error {
    background: #450a0a;
    border-color: #991b1b;
    color: #fee2e2;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
}

.dark .el-message-toast.is-warning {
    background: #451a03;
    border-color: #92400e;
    color: #fef3c7;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
}

.dark .el-message-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.banner {
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-tile);
}

.banner.notice {
    background: var(--status-green-bg);
    border: 1px solid var(--status-green-border);
    color: var(--status-green);
}

.banner.error {
    background: var(--status-red-bg);
    border: 1px solid var(--status-red-border);
    color: var(--status-red);
}

.banner.warning {
    background: var(--status-amber-bg);
    border: 1px solid var(--status-amber-border);
    color: var(--status-amber);
}

.merge-dialog {
    border: 1px solid var(--ceramic-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-toast);
    padding: 22px;
    max-width: 480px;
    width: calc(100vw - 32px);
}

.merge-dialog::backdrop {
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(6px);
}

footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--ceramic-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 400;
    color: var(--ceramic-text-muted);
}

/* ========================================================
   10. CERAMIC DARK / OBSIDIAN
   ======================================================== */
.dark {
    color-scheme: dark;
    --ceramic-bg: #0b0f19;
    --ceramic-card: #111827;
    --ceramic-subtle: #1e293b;
    --ceramic-subtle-hover: #334155;
    --ceramic-border: #1e293b;
    --ceramic-border-hover: #334155;

    --ceramic-text-main: #f8fafc;
    --ceramic-text-muted: #94a3b8;
    --ceramic-text-subtle: #64748b;

    --accent-50: rgba(99, 102, 241, 0.12);
    --accent-100: rgba(99, 102, 241, 0.22);

    --status-green-bg: rgba(5, 150, 105, 0.15);
    --status-green-border: rgba(5, 150, 105, 0.3);
    --status-green: #34d399;

    --status-red-bg: rgba(225, 29, 72, 0.15);
    --status-red-border: rgba(225, 29, 72, 0.3);
    --status-red: #fb7185;

    --status-amber-bg: rgba(217, 119, 6, 0.15);
    --status-amber-border: rgba(217, 119, 6, 0.3);
    --status-amber: #fbbf24;

    --shadow-ceramic: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
    --shadow-tile: 0 1px 3px 0 rgba(0, 0, 0, 0.3);

    --bg: var(--ceramic-bg);
    --panel: var(--ceramic-card);
    --text: var(--ceramic-text-main);
    --muted: var(--ceramic-text-muted);
    --line: var(--ceramic-border);
    --soft: var(--ceramic-subtle);
    --primary: #ffffff;
    --on-primary: #0b0f19;
    --input: #1e293b;
}

/* 全局暗黑模式滚动条规范，彻底根除白底白块 */
.dark * {
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.dark ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.dark ::-webkit-scrollbar-track {
    background: transparent;
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.dark ::-webkit-scrollbar-corner {
    background: transparent;
}

.dark body {
    background-color: #0b0f19;
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 30%, rgba(11, 15, 25, 0.95) 0px, transparent 100%);
}

.dark .header {
    background: rgba(17, 24, 39, 0.85);
}

.dark input:not([type=checkbox]):not([type=radio]),
.dark select,
.dark textarea {
    border-color: var(--ceramic-border);
    background: #1e293b;
    color: #f8fafc;
}

.dark textarea {
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.dark textarea::-webkit-resizer {
    background-color: transparent;
}

.dark .submit-button {
    background: #ffffff;
    color: #0f172a;
}

.dark .submit-button:hover:not(:disabled) {
    background: #f1f5f9;
}

.dark .submit-button:disabled {
    background: #1e293b;
    color: #475569;
}

.dark .task-card {
    background: var(--ceramic-card);
}

.dark .task-card .badge.working {
    color: #a5b4fc;
}

.dark .task-status-msg {
    background: rgba(225, 29, 72, 0.12);
    border-color: rgba(225, 29, 72, 0.25);
    color: #fb7185;
}

.dark .task-result {
    background: #1e293b;
}

.dark .task-qr-pod {
    background: #1e293b;
    border-color: #334155;
}

.dark .qr-modal-card {
    background: #111827;
}

.dark .payment-box {
    background: var(--ceramic-subtle);
    border-color: #1e293b;
}

.dark .payment-box.enabled {
    background: #1e293b;
    border-color: #334155;
}

.dark .payment-icon {
    background: #111827;
    border-color: #334155;
    color: #818cf8;
}

.dark .mini-button.retry-action {
    color: #818cf8;
    background: rgba(79, 70, 229, 0.15);
    border-color: rgba(99, 102, 241, 0.35);
}

.dark .mini-button.retry-action:hover:not(:disabled) {
    background: rgba(79, 70, 229, 0.28);
    color: #a5b4fc;
}

.dark .payment-fields {
    background: #111827;
    border-top: 1px solid #1e293b;
}

.dark .tiny-badge {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
}

.dark .provider-picker label {
    background: #1e293b;
    border-color: #334155;
}

.dark .provider-picker label.chosen {
    background: rgba(99, 102, 241, 0.18);
    border-color: #6366f1;
}

.dark .mini-btn-pill.copy-at {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.dark .mini-btn-pill.copy-at:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
}

.dark .qr-btn {
    background: #111827;
    border-color: #334155;
    color: #e2e8f0;
}

.dark .qr-btn:hover {
    background: #1e293b;
    border-color: #475569;
    color: #ffffff;
}

.dark .qr-btn.primary {
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

.dark .qr-btn.primary:hover {
    background: #4f46e5;
}

.dark .reconcile-inline {
    background: #1e293b;
    border-color: #334155;
}

.dark .merge-dialog {
    background: #111827;
}

.dark .provider-site-link {
    color: #818cf8;
}

.dark .provider-site-link:hover {
    color: #a5b4fc;
}

/* ========================================================
   9. MOBILE & TABLET RESPONSIVE ADAPTATION (<= 768px)
   保证 PC 端 (>768px) 保持 100% 原始样式，专为移动端深度兼容优化
   ======================================================== */
@media (max-width: 768px) {

    html,
    body,
    #app,
    .app-shell {
        height: auto !important;
        overflow: visible !important;
    }

    /* 顶部导航移动端双层优雅布局 */
    .header-inner {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        padding: 10px 14px !important;
        min-height: auto !important;
        gap: 8px !important;
    }

    .brand {
        order: 1 !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        gap: 8px !important;
    }

    .brand-icon {
        width: 32px !important;
        height: 32px !important;
        border-radius: 9px !important;
        flex-shrink: 0 !important;
    }

    .brand strong {
        font-size: 15px !important;
        white-space: nowrap !important;
    }

    .brand small {
        display: none !important;
        /* 移动端隐藏冗长副标题，保持清爽 */
    }

    /* 解构 header-right 融入外层 flex 布局 */
    .header-right {
        display: contents !important;
    }

    .online-badge {
        order: 2 !important;
        margin-left: auto !important;
        flex-shrink: 0 !important;
    }

    .online-badge .status-label {
        padding: 3px 8px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
        gap: 4px !important;
    }

    .icon-button {
        order: 3 !important;
        flex-shrink: 0 !important;
        width: 30px !important;
        height: 30px !important;
        border-radius: 8px !important;
    }

    /* 第二层：第三方平台外链与实时指标胶囊通栏横排 */
    .header-payment-section {
        order: 4 !important;
        width: 100% !important;
        margin-top: 4px !important;
        padding-top: 8px !important;
        border-top: 1px solid var(--ceramic-border) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px !important;
    }

    .header-provider-link {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        font-size: 11.5px !important;
        padding: 4px 8px !important;
    }

    .stats-pill-group {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex-shrink: 0 !important;
        scrollbar-width: none !important;
    }

    .stats-pill-group::-webkit-scrollbar {
        display: none !important;
    }

    .stat-pill {
        padding: 3px 8px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        gap: 5px !important;
    }

    .stat-pill .pill-label {
        display: inline !important;
    }

    /* 主工作区垂直平滑流动 */
    main {
        padding: 12px !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: calc(100vh - 100px) !important;
        display: block !important;
    }

    .workspace {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        height: auto !important;
    }

    .workspace.is-sidebar-collapsed {
        gap: 14px !important;
    }

    .panel.parameters {
        width: 100% !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        padding: 16px 14px !important;
        border-radius: 16px !important;
        position: static !important;
        clip-path: none !important;
    }

    .parameters-inner,
    .parameters-form,
    .parameters-scroll-body {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .parameters-header {
        padding: 0 0 12px 0 !important;
    }

    .provider-picker>div {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }

    .provider-picker label {
        padding: 6px 5px !important;
        gap: 4px !important;
    }

    .provider-picker strong {
        font-size: 11.5px !important;
    }

    .provider-picker small {
        font-size: 9.5px !important;
    }

    .parameters-action-footer {
        position: static !important;
        box-shadow: none !important;
        padding: 14px 0 0 0 !important;
        border-radius: 0 !important;
    }

    .panel.progress-panel {
        width: 100% !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        padding: 16px 14px !important;
        border-radius: 16px !important;
    }

    /* 标题与操作按钮自适应 */
    .panel-heading {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 14px !important;
    }

    .heading-with-icon {
        display: flex !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .panel-heading h1,
    .panel-heading h2 {
        white-space: nowrap !important;
        font-size: 15px !important;
        margin: 0 !important;
    }

    .panel-heading p {
        font-size: 11px !important;
        line-height: 1.4 !important;
        margin-top: 2px !important;
    }

    .panel-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .panel-actions .mini-button {
        flex: 1 1 calc(33.33% - 6px) !important;
        min-width: 82px !important;
        justify-content: center !important;
        padding: 6px 6px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    /* 任务筛选 Tab 移动端横向平滑滑动 */
    .task-filter-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding-bottom: 8px !important;
        margin-bottom: 12px !important;
    }

    .task-filter-bar .tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
        padding-bottom: 4px !important;
        scrollbar-width: none !important;
    }

    .task-filter-bar .tabs::-webkit-scrollbar {
        display: none !important;
    }

    .task-filter-bar .tabs button {
        flex-shrink: 0 !important;
        padding: 4px 9px !important;
        font-size: 11.5px !important;
        white-space: nowrap !important;
    }

    .task-total {
        text-align: right !important;
        font-size: 11px !important;
        color: var(--ceramic-text-muted) !important;
        width: 100% !important;
    }

    /* 任务列表卡片单列布局 */
    .task-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .task-card {
        padding: 12px !important;
        border-radius: 14px !important;
    }

    .task-qr-pod {
        gap: 10px !important;
    }

    .qr-box {
        width: 86px !important;
        height: 86px !important;
        flex-shrink: 0 !important;
    }

    .qr-actions-grid {
        display: flex !important;
        gap: 6px !important;
    }

    .task-card-actions {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .task-primary-actions {
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
    }

    /* 表单与弹窗移动端触控优化 */
    input,
    select,
    textarea {
        font-size: 16px !important;
        /* 避免 iOS 获得焦点时强制页面放大 */
    }

    dialog,
    .qr-modal-card {
        width: 92vw !important;
        max-width: 92vw !important;
        padding: 16px !important;
        border-radius: 16px !important;
    }
}

/* ========================================================
   MAINTENANCE PAGE
   ======================================================== */
.maintenance-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    padding: 24px;
    color: #e2e8f0;
    background: #090d18;
    isolation: isolate;
}

.maintenance-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, .2), transparent 45%), linear-gradient(145deg, #111827 0%, #090d18 65%);
    z-index: -2;
}

.maintenance-glow {
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .28;
    z-index: -1;
}

.maintenance-glow-left {
    background: #4f46e5;
    left: -180px;
    bottom: -180px;
}

.maintenance-glow-right {
    background: #0ea5e9;
    right: -180px;
    top: -180px;
}

.maintenance-card {
    width: min(100%, 520px);
    padding: 42px 44px 28px;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 26px;
    background: rgba(15, 23, 42, .72);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .08);
    backdrop-filter: blur(18px);
}

.maintenance-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 700;
}

.maintenance-brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    color: white;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 8px 24px rgba(79, 70, 229, .4);
}

.maintenance-icon-wrap {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 36px auto 18px;
    border: 1px solid rgba(129, 140, 248, .3);
    border-radius: 24px;
    background: rgba(99, 102, 241, .13);
}

.maintenance-icon {
    color: #a5b4fc;
}

.maintenance-kicker {
    color: #818cf8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
}

.maintenance-card h1 {
    margin: 12px 0 12px;
    color: #f8fafc;
    font-size: clamp(26px, 5vw, 34px);
    letter-spacing: -.03em;
}

.maintenance-card p {
    margin: 0 auto;
    max-width: 370px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.8;
}

.maintenance-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    padding: 8px 13px;
    border: 1px solid rgba(52, 211, 153, .2);
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, .1);
    font-size: 11px;
    font-weight: 600;
}

.maintenance-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, .12);
}

.maintenance-footer {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, .12);
    color: #64748b;
    font-size: 10px;
    letter-spacing: .04em;
}

@media (max-width: 560px) {
    .maintenance-page {
        padding: 16px;
    }

    .maintenance-card {
        padding: 34px 24px 24px;
        border-radius: 22px;
    }
}

/* KeyVault ceramic light treatment */
.maintenance-page {
    color: #1e293b;
    background: #f4f6fb;
}

.maintenance-page::before {
    background: radial-gradient(circle at 50% -10%, #ffffff 0, rgba(255, 255, 255, .8) 34%, transparent 68%), linear-gradient(135deg, #f8fafc, #eef2f7);
}

.maintenance-glow {
    opacity: .16;
    filter: blur(100px);
}

.maintenance-glow-left {
    background: #c7d2fe;
}

.maintenance-glow-right {
    background: #dbeafe;
}

.maintenance-card {
    padding: 38px 44px 26px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 24px 55px rgba(51, 65, 85, .11), 0 2px 6px rgba(51, 65, 85, .05), inset 0 1px #ffffff;
    backdrop-filter: blur(12px);
}

.maintenance-brand {
    color: #1e293b;
}

.maintenance-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #4f46e5;
    background: #eef2ff;
    box-shadow: none;
}

.maintenance-icon-wrap {
    width: 70px;
    height: 70px;
    margin: 34px auto 18px;
    border-color: #e0e7ff;
    border-radius: 20px;
    background: #f5f7ff;
}

.maintenance-icon {
    color: #6366f1;
}

.maintenance-kicker {
    color: #64748b;
    letter-spacing: .14em;
}

.maintenance-card h1 {
    color: #0f172a;
}

.maintenance-card p {
    color: #64748b;
}

.maintenance-status {
    border-color: #bbf7d0;
    color: #15803d;
    background: #f0fdf4;
}

.maintenance-status-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .1);
}

.maintenance-footer {
    border-top-color: #eef2f7;
    color: #94a3b8;
}
/* 工作台布局：突出导入与导出，平台入口和只读统计分组展示。 */
.header-payment-section > .header-provider-link {
    border-color: transparent;
    background: transparent;
    padding-inline: 5px;
    white-space: nowrap;
}
.header-right > .header-back-link { white-space: nowrap; }
.header-stats-group.stats-pill-group {
    gap: 0;
    padding: 4px 2px;
    border: 1px solid var(--ceramic-border);
    border-radius: 8px;
    background: var(--ceramic-subtle);
}
.header .stat-pill {
    border: 0;
    border-radius: 0;
    padding-block: 0;
    background: transparent;
    box-shadow: none;
    white-space: nowrap;
}
.header .stat-pill + .stat-pill { border-left: 1px solid var(--ceramic-border); }
.header .online-badge .status-label {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    padding-inline: 0;
}
.parameters-action-footer .import-caption {
    font-size: 11px;
    line-height: 1.5;
    color: var(--ceramic-text-muted);
    margin: 0 0 9px;
    text-align: center;
}
.parameters .submit-button { border-radius: 10px; }
.parameters .payment-box { border-color: var(--ceramic-border); }
.parameters .switch-row { padding: 11px 12px; gap: 9px; }
.parameters .payment-fields { padding: 12px; }
.progress-panel > .panel-heading { align-items: center; }
.queue-title { display: flex; align-items: center; gap: 8px; }
.queue-count {
    min-width: 23px;
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--ceramic-subtle-hover);
    color: var(--ceramic-text-muted);
    font-size: 11px;
    line-height: 19px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.panel-heading .queue-description { font-size: 11px; }
.task-toolbar { gap: 6px; justify-content: flex-end; }
.task-toolbar > .mini-button { min-height: 29px; box-shadow: none; border-radius: 7px; }
.task-toolbar > .toolbar-export:not(:disabled) {
    border-color: color-mix(in srgb, var(--accent-600) 28%, var(--ceramic-border));
    background: var(--accent-50);
    color: var(--accent-600);
}
.dark .task-toolbar > .toolbar-export:not(:disabled) {
    background: rgba(99, 102, 241, .13);
    border-color: rgba(129, 140, 248, .3);
    color: #a5b4fc;
}
.progress-panel .task-filter-bar > .tabs { min-width: 0; }
@media (min-width: 769px) and (max-width: 1200px) {
    .header-inner { gap: 12px; }
    .header-right, .header-payment-section { gap: 7px; }
    .brand small { display: none; }
    .progress-panel > .panel-heading { flex-wrap: wrap; gap: 9px; }
    .progress-panel > .panel-heading > .task-toolbar { margin-left: auto; }
}
@media (max-width: 768px) {
    .header-right > .header-back-link { order: 4; margin-left: 0; }
    .header .header-payment-section { flex-wrap: wrap; justify-content: flex-start !important; }
    .header .header-stats-group { flex-wrap: wrap; max-width: 100%; margin-left: auto; padding-block: 4px; }
    .header .stat-pill { padding-block: 0 !important; }
    .header .online-badge .status-label { padding-inline: 0 !important; }
    .header-right > .header-back-link { font-size: 11px !important; padding: 3px 6px !important; }
    .progress-panel > .panel-heading { gap: 10px !important; margin-bottom: 12px !important; }
    .task-toolbar { justify-content: flex-start; gap: 6px; }
    .task-toolbar > .mini-button { padding: 6px 8px; }
}
