/* ==================== 基础样式 ==================== */
[v-cloak] {
    display: none;
}

body.app-mounted #app-shell {
    display: none;
}

.app-shell {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.16), transparent 38%),
        linear-gradient(180deg, #111827 0%, #0f172a 100%);
    z-index: 9999;
}

.app-shell-card {
    width: min(480px, 100%);
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    color: #e5eefc;
    text-align: center;
}

.app-shell-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.app-shell-text {
    margin: 12px 0 0;
    line-height: 1.6;
    color: #cbd5e1;
}

.app-shell-button {
    margin-top: 18px;
    min-width: 140px;
    padding: 10px 16px;
    border: 1px solid rgba(96, 165, 250, 0.55);
    border-radius: 10px;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #eff6ff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.app-shell-button:hover {
    filter: brightness(1.06);
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4a5568;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* ==================== 设置页容器 ==================== */
.settings-container {
    max-width: 56rem;
    margin: 0 auto;
    padding-bottom: 2.5rem;
    padding-top: 0.5rem;
}

/* ==================== 设置分组卡片 ==================== */
.settings-group {
    background-color: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    margin-bottom: 1rem;
}

.dark .settings-group {
    background-color: #1f2937;
    border-color: #374151;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* ==================== 设置分组头部 ==================== */
.settings-group-header {
    padding: 1rem 1.5rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.settings-group-header:hover {
    background-color: #f3f4f6;
}

.dark .settings-group-header {
    background-color: #1f2937;
    border-color: #374151;
}

.dark .settings-group-header:hover {
    background-color: #111827;
}

/* ==================== 设置分组标题 ==================== */
.settings-group-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
}

.dark .settings-group-title {
    color: #f9fafb;
}

/* ==================== 设置分组内容 ==================== */
.settings-group-content {
    padding: 0 1.5rem;
}

/* ==================== 设置行 ==================== */
.settings-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.settings-row:last-child {
    border-bottom: none;
}

@media (min-width: 640px) {
    .settings-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.dark .settings-row {
    border-color: #374151;
}

/* ==================== 设置行左右布局 ==================== */
.settings-left {
    flex: 1 1 auto;
    padding-right: 1rem;
    min-width: 0;
}

.settings-right {
    width: 100%;
    max-width: 20rem;
    display: flex;
    justify-content: flex-end;
}

/* ==================== 设置标签和描述 ==================== */
.settings-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.dark .settings-label {
    color: #f9fafb;
}

.settings-desc {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #6b7280;
}

.dark .settings-desc {
    color: #9ca3af;
}

/* ==================== 设置输入框 ==================== */
.settings-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #111827;
    outline: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.settings-input::placeholder {
    color: #9ca3af;
}

.settings-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.dark .settings-input {
    background-color: #030712;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .settings-input::placeholder {
    color: #6b7280;
}

.dark .settings-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
}

/* ==================== 开关组件 ==================== */
.toggle-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.toggle-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-bg {
    width: 44px;
    height: 24px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    position: relative;
    transition: background-color 0.2s ease;
}

.toggle-bg::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 9999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
    transition: transform 0.2s ease;
}

.toggle-label input:checked + .toggle-bg {
    background-color: #2563eb;
}

.toggle-label input:checked + .toggle-bg::after {
    transform: translateX(20px);
}

.dark .toggle-bg {
    background-color: #374151;
}

.dark .toggle-label input:checked + .toggle-bg {
    background-color: #2563eb;
}

/* ==================== Dashboard Guide Cards ==================== */
.dashboard-guide-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1rem;
    padding: 1rem;
    background:
        radial-gradient(circle at top right, rgba(148, 163, 184, 0.12), transparent 46%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.dashboard-guide-card::after {
    content: "";
    position: absolute;
    inset: auto -68px -78px auto;
    width: 180px;
    height: 180px;
    border-radius: 9999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 70%);
    pointer-events: none;
}

.dashboard-guide-card--blue {
    border-color: rgba(59, 130, 246, 0.22);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 46%),
        linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.dashboard-guide-card--violet {
    border-color: rgba(139, 92, 246, 0.2);
    background:
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 46%),
        linear-gradient(135deg, rgba(250, 245, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.dashboard-guide-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.72rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.08);
    color: #1e3a8a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.dashboard-guide-card--violet .dashboard-guide-badge {
    color: #6d28d9;
}

.dashboard-guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.dashboard-guide-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.88rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.8);
    color: #1e3a8a;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-guide-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.34);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.1);
}

.dashboard-guide-toggle--violet {
    color: #6d28d9;
}

.dashboard-guide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.6rem;
    padding: 0.72rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    color: #f8fbff;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.16);
    transition: transform 0.15s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.dashboard-guide-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.2);
}

.dashboard-guide-btn--secondary {
    border-color: rgba(148, 163, 184, 0.32);
    background: rgba(255, 255, 255, 0.76);
    color: #0f172a;
    box-shadow: none;
}

.dashboard-guide-btn--secondary:hover {
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.dashboard-guide-steps {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.95rem;
}

.dashboard-guide-step {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.72rem 0.82rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.55;
}

.dashboard-guide-step strong {
    color: #0f172a;
    font-size: 0.76rem;
    min-width: 3.2rem;
}

.dashboard-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.dashboard-checklist-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.72rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.74);
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-checklist-item.is-ready {
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(236, 253, 245, 0.92);
    color: #047857;
}

.dashboard-checklist-item.is-missing {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(255, 251, 235, 0.92);
    color: #b45309;
}

.dashboard-field-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.62rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.dashboard-field-chip--optional {
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
}

.dashboard-field-chip--custom {
    background: rgba(249, 115, 22, 0.14);
    color: #c2410c;
}

.dashboard-field-summary {
    position: relative;
}

.dashboard-field-help {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dashboard-field-alias {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
}

.dashboard-field-help-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.86);
    color: #475569;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    cursor: help;
    transition: transform 0.15s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.dashboard-field-help-trigger:hover,
.dashboard-field-help:focus-within .dashboard-field-help-trigger {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.34);
    color: #1d4ed8;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.dashboard-field-tooltip {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    z-index: 30;
    width: min(22rem, calc(100vw - 5.5rem));
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.96);
    color: #334155;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    backdrop-filter: blur(12px);
}

.dashboard-field-tooltip::before {
    content: "";
    position: absolute;
    top: -0.35rem;
    left: 0.38rem;
    width: 0.72rem;
    height: 0.72rem;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.96);
    transform: rotate(45deg);
}

.dashboard-field-help:hover .dashboard-field-tooltip,
.dashboard-field-help:focus-within .dashboard-field-tooltip {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dashboard-field-tooltip-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #0f172a;
}

.dashboard-field-tooltip-copy {
    margin-top: 0.4rem;
    font-size: 0.76rem;
    line-height: 1.6;
}

.dashboard-field-tooltip-copy--muted {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.26);
    color: #475569;
}

.dashboard-mini-card {
    padding: 0.82rem 0.9rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.68);
}

.dashboard-mini-card-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
}

.dashboard-mini-card-copy {
    margin-top: 0.3rem;
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.6;
}

.dashboard-empty-state {
    padding: 1.4rem 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.86);
}

.dark .dashboard-guide-card {
    border-color: rgba(71, 85, 105, 0.55);
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.14), transparent 44%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(17, 24, 39, 0.96));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.dark .dashboard-guide-card--violet {
    background:
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.16), transparent 44%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(24, 24, 27, 0.96));
}

.dark .dashboard-guide-badge {
    background: rgba(148, 163, 184, 0.12);
    color: #bfdbfe;
}

.dark .dashboard-guide-card--violet .dashboard-guide-badge {
    color: #ddd6fe;
}

.dark .dashboard-guide-toggle {
    border-color: rgba(71, 85, 105, 0.58);
    background: rgba(15, 23, 42, 0.74);
    color: #bfdbfe;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.dark .dashboard-guide-toggle--violet {
    color: #ddd6fe;
}

.dark .dashboard-guide-btn--secondary {
    border-color: rgba(71, 85, 105, 0.6);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
}

.dark .dashboard-guide-step,
.dark .dashboard-mini-card,
.dark .dashboard-checklist-item,
.dark .dashboard-empty-state,
.dark .dashboard-field-tooltip {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(71, 85, 105, 0.52);
    color: #cbd5e1;
}

.dark .dashboard-guide-step strong,
.dark .dashboard-mini-card-title {
    color: #f8fafc;
}

.dark .dashboard-checklist-item.is-ready {
    border-color: rgba(16, 185, 129, 0.38);
    background: rgba(6, 78, 59, 0.58);
    color: #86efac;
}

.dark .dashboard-checklist-item.is-missing {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(120, 53, 15, 0.52);
    color: #fcd34d;
}

.dark .dashboard-field-chip {
    background: rgba(59, 130, 246, 0.22);
    color: #bfdbfe;
}

.dark .dashboard-field-chip--optional {
    background: rgba(71, 85, 105, 0.52);
    color: #cbd5e1;
}

.dark .dashboard-field-chip--custom {
    background: rgba(194, 65, 12, 0.36);
    color: #fdba74;
}

.dark .dashboard-field-alias {
    background: rgba(71, 85, 105, 0.42);
    color: #cbd5e1;
}

.dark .dashboard-field-help-trigger {
    border-color: rgba(71, 85, 105, 0.56);
    background: rgba(15, 23, 42, 0.78);
    color: #cbd5e1;
}

.dark .dashboard-field-help:focus-within .dashboard-field-help-trigger,
.dark .dashboard-field-help-trigger:hover {
    border-color: rgba(96, 165, 250, 0.46);
    color: #bfdbfe;
}

.dark .dashboard-field-tooltip {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.dark .dashboard-field-tooltip::before {
    border-left-color: rgba(71, 85, 105, 0.52);
    border-top-color: rgba(71, 85, 105, 0.52);
    background: rgba(15, 23, 42, 0.95);
}

.dark .dashboard-field-tooltip-title {
    color: #f8fafc;
}

.dark .dashboard-field-tooltip-copy--muted {
    border-top-color: rgba(71, 85, 105, 0.52);
    color: #cbd5e1;
}

@media (max-width: 768px) {
    .dashboard-guide-actions {
        flex-direction: column;
    }

    .dashboard-guide-btn {
        width: 100%;
    }

    .dashboard-guide-step {
        padding: 0.72rem 0.78rem;
    }
}

/* ==================== Marketplace ==================== */
.marketplace-entry-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 9999px;
    padding: 0.52rem 0.95rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.98));
    color: #1d4ed8;
    font-size: 0.875rem;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.marketplace-entry-button__badge {
    position: absolute;
    top: 0.42rem;
    right: 0.58rem;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 9999px;
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.98);
}

.marketplace-entry-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.14);
    border-color: rgba(37, 99, 235, 0.34);
}

.marketplace-entry-button.is-active {
    background: linear-gradient(135deg, #2563eb, #0f766e);
    border-color: transparent;
    color: #eff6ff;
}

.dark .marketplace-entry-button {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-color: rgba(96, 165, 250, 0.24);
    color: #93c5fd;
}

.dark .marketplace-entry-button.is-active {
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
    color: #eff6ff;
}

.dark .marketplace-entry-button__badge {
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.96);
}

.marketplace-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

.marketplace-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 24px;
    padding: 26px;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 24rem),
        radial-gradient(circle at left, rgba(16, 185, 129, 0.12), transparent 20rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
}

.dark .marketplace-hero {
    border-color: rgba(71, 85, 105, 0.5);
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 24rem),
        radial-gradient(circle at left, rgba(16, 185, 129, 0.12), transparent 20rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.98));
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.26);
}

.marketplace-hero__glow {
    position: absolute;
    inset: auto -120px -120px auto;
    width: 240px;
    height: 240px;
    border-radius: 9999px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 72%);
    pointer-events: none;
}

.marketplace-hero__top {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    gap: 1.5rem;
    align-items: start;
}

.marketplace-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dark .marketplace-eyebrow {
    background: rgba(148, 163, 184, 0.1);
    color: #e2e8f0;
}

.marketplace-title {
    margin: 1rem 0 0;
    font-size: clamp(1.9rem, 1.8vw + 1.2rem, 2.7rem);
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

.dark .marketplace-title {
    color: #f8fafc;
}

.marketplace-subtitle {
    margin: 0.9rem 0 0;
    max-width: 46rem;
    line-height: 1.7;
    color: #475569;
}

.dark .marketplace-subtitle {
    color: #cbd5e1;
}

.marketplace-source-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.marketplace-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.7rem;
    border-radius: 9999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 700;
}

.dark .marketplace-source-badge {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

.marketplace-source-text {
    color: #475569;
    font-size: 0.92rem;
}

.dark .marketplace-source-text {
    color: #cbd5e1;
}

.marketplace-inline-link {
    border: none;
    background: transparent;
    color: #0f766e;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.marketplace-inline-link:hover {
    text-decoration: underline;
}

.marketplace-warning {
    margin-top: 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    line-height: 1.6;
}

.dark .marketplace-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
}

.marketplace-stats {
    display: grid;
    gap: 0.9rem;
}

.marketplace-stat-card {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
}

.dark .marketplace-stat-card {
    border-color: rgba(71, 85, 105, 0.42);
    background: rgba(15, 23, 42, 0.55);
}

.marketplace-stat-label {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
}

.dark .marketplace-stat-label {
    color: #94a3b8;
}

.marketplace-stat-value {
    display: block;
    margin-top: 0.4rem;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 800;
}

.dark .marketplace-stat-value {
    color: #f8fafc;
}

.marketplace-toolbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-top: 1.4rem;
}

.marketplace-search {
    flex: 1 1 320px;
}

.marketplace-input,
.marketplace-select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 14px;
    padding: 0.82rem 1rem;
    background: rgba(255, 255, 255, 0.88);
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.marketplace-select {
    min-width: 170px;
}

.marketplace-input:focus,
.marketplace-select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.dark .marketplace-input,
.dark .marketplace-select {
    border-color: rgba(71, 85, 105, 0.6);
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
}

.marketplace-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.marketplace-filter-group {
    margin-top: 1.25rem;
}

.marketplace-filter-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.6rem;
}

.dark .marketplace-filter-title {
    color: #94a3b8;
}

.marketplace-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.marketplace-category-chip {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 9999px;
    padding: 0.55rem 0.95rem;
    background: rgba(255, 255, 255, 0.78);
    color: #334155;
    font-size: 0.92rem;
    font-weight: 600;
    transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.marketplace-category-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.3);
    color: #1d4ed8;
}

.marketplace-category-chip.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #2563eb, #0f766e);
    color: #f8fbff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.dark .marketplace-category-chip {
    border-color: rgba(71, 85, 105, 0.55);
    background: rgba(15, 23, 42, 0.72);
    color: #cbd5e1;
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
    margin-top: 1.35rem;
}

.marketplace-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 22px;
    padding: 1.2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.marketplace-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
}

.dark .marketplace-card {
    border-color: rgba(71, 85, 105, 0.5);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(17, 24, 39, 0.98));
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.28);
}

.marketplace-card--skeleton {
    gap: 0.9rem;
}

.marketplace-card__header,
.marketplace-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.marketplace-card__body {
    flex: 1 1 auto;
    margin-top: 1rem;
}

.marketplace-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.32rem 0.7rem;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
}

.marketplace-badge--muted {
    background: rgba(148, 163, 184, 0.14);
    color: #475569;
}

.dark .marketplace-badge {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

.dark .marketplace-badge--muted {
    background: rgba(71, 85, 105, 0.46);
    color: #cbd5e1;
}

.marketplace-card__title {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
    color: #0f172a;
}

.dark .marketplace-card__title {
    color: #f8fafc;
}

.marketplace-card__summary {
    margin: 0.72rem 0 0;
    line-height: 1.7;
    color: #475569;
}

.dark .marketplace-card__summary {
    color: #cbd5e1;
}

.marketplace-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1rem;
    margin-top: 1rem;
}

.marketplace-meta-grid dt {
    font-size: 0.77rem;
    color: #64748b;
}

.marketplace-meta-grid dd {
    margin: 0.18rem 0 0;
    color: #0f172a;
    font-weight: 700;
    word-break: break-word;
}

.dark .marketplace-meta-grid dt {
    color: #94a3b8;
}

.dark .marketplace-meta-grid dd {
    color: #f8fafc;
}

.marketplace-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.marketplace-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.26rem 0.62rem;
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
    font-size: 0.76rem;
    font-weight: 700;
}

.dark .marketplace-tag {
    background: rgba(148, 163, 184, 0.1);
    color: #e2e8f0;
}

.marketplace-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: #64748b;
    font-size: 0.83rem;
}

.dark .marketplace-stat-row {
    color: #94a3b8;
}

.marketplace-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.marketplace-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 42px;
    border-radius: 14px;
    padding: 0.75rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.18s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.marketplace-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.marketplace-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.marketplace-btn--primary {
    border: 1px solid transparent;
    background: linear-gradient(135deg, #2563eb, #0f766e);
    color: #f8fbff;
    box-shadow: 0 16px 26px rgba(37, 99, 235, 0.16);
}

.marketplace-btn--secondary {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
}

.marketplace-btn--ghost {
    border: 1px dashed rgba(37, 99, 235, 0.28);
    background: rgba(255, 255, 255, 0.7);
    color: #1d4ed8;
}

.dark .marketplace-btn--secondary,
.dark .marketplace-btn--ghost {
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
}

.dark .marketplace-btn--secondary {
    border-color: rgba(71, 85, 105, 0.55);
}

.dark .marketplace-btn--ghost {
    border-color: rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}

.marketplace-empty {
    margin-top: 1.35rem;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 22px;
    padding: 2.4rem 1.4rem;
    background: rgba(255, 255, 255, 0.74);
    text-align: center;
}

.marketplace-empty h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 800;
}

.marketplace-empty p {
    margin: 0.75rem auto 0;
    max-width: 38rem;
    color: #64748b;
    line-height: 1.7;
}

.dark .marketplace-empty {
    border-color: rgba(71, 85, 105, 0.55);
    background: rgba(15, 23, 42, 0.72);
}

.dark .marketplace-empty h3 {
    color: #f8fafc;
}

.dark .marketplace-empty p {
    color: #94a3b8;
}

.marketplace-skeleton {
    border-radius: 9999px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.18), rgba(226, 232, 240, 0.42), rgba(148, 163, 184, 0.18));
    background-size: 200% 100%;
    animation: marketplace-shimmer 1.35s linear infinite;
}

.marketplace-skeleton--pill {
    width: 92px;
    height: 28px;
}

.marketplace-skeleton--title {
    width: 72%;
    height: 28px;
}

.marketplace-skeleton--line {
    width: 100%;
    height: 16px;
}

.marketplace-skeleton--line.short {
    width: 68%;
}

.marketplace-skeleton--meta {
    width: 88%;
    height: 14px;
}

.marketplace-skeleton--meta.short {
    width: 54%;
}

@keyframes marketplace-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 1024px) {
    .marketplace-hero__top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .marketplace-shell {
        padding: 16px;
    }

    .marketplace-hero {
        padding: 18px;
        border-radius: 20px;
    }

    .marketplace-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .marketplace-toolbar__actions {
        width: 100%;
    }

    .marketplace-toolbar__actions > * {
        flex: 1 1 100%;
    }

    .marketplace-meta-grid {
        grid-template-columns: 1fr;
    }
}
