/* ==========================================================================
   Agent Future Mart - Core Style System (Unifed Bright Flat Indigo Theme)
   ========================================================================== */

:root {
    /* 基础不变常量 */
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
    
    --font-sans: 'Outfit', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --color-danger: #ef4444;
    --color-danger-soft: rgba(239, 68, 68, 0.12);
    --color-info: #06b6d4;
    --color-info-soft: rgba(6, 182, 212, 0.12);
    --sidebar-width: 280px;

    /* 全局唯一明亮扁平色板 */
    --color-bg-dark: #f8fafc; /* 珍珠白 */
    --color-bg-main: #f1f5f9; /* 浅灰白 */
    --color-bg-panel: #ffffff; /* 纯白 */
    --color-bg-card: #f8fafc;
    --color-border: #e2e8f0; /* 清晰灰色实线边框 */
    --color-border-glow: transparent;
    
    --color-primary: #4f46e5; /* 靛蓝 Indigo-600 */
    --color-primary-hover: #4338ca;
    --color-primary-soft: rgba(79, 70, 229, 0.08);
    
    --color-success: #10b981; /* 祖母绿 Emerald */
    --color-success-hover: #059669;
    --color-success-soft: rgba(16, 185, 129, 0.08);
    
    --color-gold: #d97706; /* 琥珀黄 */
    --color-gold-soft: rgba(217, 119, 6, 0.08);

    --text-main: #0f172a; /* 碳黑 Slate-900 */
    --text-secondary: #475569; /* 灰 Slate-600 */
    --text-muted: #64748b;

    --shadow-premium: 0 4px 18px -2px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 0 transparent;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
}

/* ==========================================================================
   0. 全局角色/控制台快速切换浮条 (Prototype Role Switcher)
   ========================================================================== */
.global-role-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 45px;
    background-color: var(--color-bg-panel);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 10000;
}

.role-bar-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.role-bar-actions {
    display: flex;
    gap: 10px;
}

.btn-role {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-card);
}

.btn-role:hover {
    color: var(--text-main);
    background-color: var(--color-bg-main);
}

.btn-role.active {
    background-color: var(--color-primary-soft);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.role-bar-placeholder {
    height: 45px;
    flex-shrink: 0;
}

.text-primary-pulse {
    color: #6366f1;
    animation: pulseGlow 2s infinite ease-in-out;
}
@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 0.6; }
}

/* ==========================================================================
   全局重置与基本工具类
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.01);
}
::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.4);
}

/* 工具类 */
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-gold { color: var(--color-gold); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }
.bold { font-weight: 600; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* 根显隐控制 */
#portal-container { display: none; }
#portal-container.active { display: flex; flex-direction: column; height: calc(100vh - 45px); width: 100vw; overflow: hidden; background-color: var(--color-bg-dark); }

#console-container { display: none; }
#console-container.active { display: flex; height: calc(100vh - 45px); width: 100vw; overflow: hidden; }

#ops-container { display: none; }
#ops-container.active { display: flex; height: calc(100vh - 45px); width: 100vw; overflow: hidden; }

/* ==========================================================================
   前台门户样式 (Portal Styles)
   ========================================================================== */
.portal-header {
    height: 75px;
    background-color: var(--color-bg-panel);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.portal-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.portal-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--color-primary), #6366f1);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.logo-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: block;
    color: var(--text-main);
}

.logo-sub {
    font-size: 0.65rem;
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portal-nav {
    display: flex;
    gap: 30px;
}

.portal-nav-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
    transition: color 0.2s;

.portal-auth-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.auth-method-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-method-list.compact .auth-method-card {
    padding: 16px 18px;
}

.auth-method-card {
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    border-radius: 14px;
    padding: 18px 20px;
}

.auth-method-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 18px;
}

.auth-method-content {
    flex: 1;
    min-width: 0;
}

.auth-method-content h5 {
    margin-bottom: 6px;
    color: var(--text-main);
}

.info-banner {
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--color-bg-card);
}

.info-banner.success {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.18);
}

.info-banner.warn {
    background: rgba(217, 119, 6, 0.06);
    border-color: rgba(217, 119, 6, 0.18);
}

.checkbox-grid-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}
    transition: color 0.2s;
}

.portal-nav-item:hover { color: var(--color-primary); }
.portal-nav-item.active { color: var(--color-primary); font-weight: 700; }
.portal-nav-item.active::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 2px;
}

.portal-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.portal-wallet-badge {
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    font-size: 0.85rem;
    cursor: pointer;
    background-color: var(--color-bg-card);
    transition: all 0.2s;
}
.portal-wallet-badge:hover {
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.btn-goto-console {
    background-color: var(--color-primary);
    color: #fff;
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
}

.btn-goto-console:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

.portal-content {
    flex-grow: 1;
    overflow-y: auto;
    background-color: var(--color-bg-main);
    padding: 40px;
}

.portal-section {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

.portal-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: portalFadeIn 0.35s ease forwards;
}

@keyframes portalFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* 首页 Banner */
.portal-hero {
    border-radius: var(--border-radius-lg);
    background-size: cover;
    background-position: center;
    padding: 60px;
    border: 1px solid var(--color-border);
    margin-bottom: 30px;
    box-shadow: var(--shadow-premium);
}

.portal-hero-content { max-width: 650px; }
.portal-badge-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background-color: var(--color-primary-soft);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.portal-hero-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--text-main);
}

.portal-hero-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
}

.portal-hero-actions { display: flex; gap: 15px; }

.portal-home-entry-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.portal-home-entry-card {
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-home-entry-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.portal-home-entry-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
}

.portal-home-entry-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 20px;
}

.portal-home-split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 24px;
}

.portal-home-panel {
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-premium);
}

.portal-home-solution-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.portal-home-solution-item {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-bg-card);
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.portal-home-solution-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    min-width: 120px;
}

.portal-home-cta {
    margin-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(79,70,229,0.07) 0%, rgba(240,246,255,0.9) 100%);
    border: 1px solid rgba(79,70,229,0.12);
}

.portal-home-cta h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.btn-primary-large {
    background-color: var(--color-primary);
    color: #fff;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary-large:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
}

.btn-outline-large {
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    background-color: transparent;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-outline-large:hover {
    background-color: var(--color-primary-soft);
    transform: translateY(-2px);
}

/* 首页数据大盘 */
.portal-data-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.portal-data-card {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-premium);
}
.portal-data-card .data-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 8px;
}
.portal-data-card .data-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 首页四大合规技术展区 */
.portal-pillars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.portal-pillars-grid .pillar-card {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.portal-pillars-grid .pillar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}
.portal-pillars-grid .pillar-card.border-primary { border-top: 4px solid var(--color-primary); }
.portal-pillars-grid .pillar-card.border-success { border-top: 4px solid var(--color-success); }
.portal-pillars-grid .pillar-card.border-gold { border-top: 4px solid var(--color-gold); }
.portal-pillars-grid .pillar-card.border-info { border-top: 4px solid var(--color-info); }

.portal-pillars-grid .pillar-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
}
.portal-pillars-grid .pillar-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}
.portal-pillars-grid .pillar-card p {
    line-height: 1.5;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.text-primary { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-gold { color: var(--color-gold) !important; }
.text-info { color: var(--color-info) !important; }

.portal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.portal-section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

/* 推荐网格 */
.portal-rankings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.new-arrivals-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

/* 超市前台探索 */
.portal-explore-layout { display: flex; flex-direction: column; }
.portal-explore-header { text-align: center; max-width: 600px; margin: 0 auto 30px auto; }
.portal-explore-header h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }

.portal-search-bar {
    display: flex;
    align-items: center;
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 8px;
    margin-top: 20px;
    box-shadow: var(--shadow-premium);
    transition: border-color 0.2s;
}
.portal-search-bar:focus-within { border-color: var(--color-primary); }
.portal-search-bar input { flex-grow: 1; font-size: 0.9rem; padding-left: 10px; color: var(--text-main); }
.portal-search-bar input::placeholder { color: var(--text-muted); }

.portal-category-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; }
.portal-cat-tab {
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-panel);
    cursor: pointer;
    transition: all 0.2s;
}
.portal-cat-tab:hover { border-color: var(--text-secondary); }
.portal-cat-tab.active {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* 前台明亮卡片 */
.portal-grid .tool-card,
.portal-rankings-grid .tool-card {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-premium);
}
.portal-grid .tool-card:hover,
.portal-rankings-grid .tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.portal-grid .tool-icon, .portal-rankings-grid .tool-icon { border-color: var(--color-border); }
.portal-grid .tool-card-footer, .portal-rankings-grid .tool-card-footer { border-top-color: var(--color-border); }

/* 三色安全风险等级标签样式 (G004) */
.safety-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: 6px;
}
.risk-low { background-color: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.risk-mid { background-color: rgba(245, 158, 11, 0.1); color: var(--color-gold); }
.risk-high { background-color: rgba(239, 68, 68, 0.1); color: var(--color-danger); }

/* 信创/等保徽章 (G001) */
.compliance-badge {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--color-info);
    border: 1px solid rgba(6, 182, 212, 0.2);
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    margin-left: 5px;
}

/* 合作伙伴 */
.partner-section { border-top: 1px solid var(--color-border); padding-top: 30px; text-align: center; }
.partner-section h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.partner-logos { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; }
.partner-logo {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-premium);
}

/* 解决方案 */
.solutions-header { text-align: center; max-width: 600px; margin: 0 auto 30px auto; }
.solutions-header h2 { font-size: 1.75rem; font-weight: 800; }
.solutions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 30px; }
.solution-card {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-left: 5px solid var(--color-primary);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}
.solution-card:hover { transform: translateY(-3px); }
.solution-card h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.solution-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; flex-grow: 1; }

.solution-meta-box {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    padding: 15px;
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
}
.solution-meta-row { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 8px; }
.solution-meta-row:last-child { margin-bottom: 0; }
.solution-meta-row span:first-child { color: var(--text-muted); }
.solution-meta-row span:last-child { font-weight: 600; }

.solution-tools-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.solution-tool-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    background-color: var(--color-primary-soft);
    color: var(--color-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 开发者 Banner */
.developer-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #4338ca 100%);
    border-radius: var(--border-radius-lg);
    padding: 60px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.2);
}
.dev-hero-content { max-width: 600px; }
.dev-hero-content h3 { font-size: 1.1rem; color: #a5b4fc; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.dev-hero-content h4 { font-size: 2rem; font-weight: 800; margin-bottom: 15px; }
.dev-hero-content p { font-size: 0.95rem; line-height: 1.6; color: #e0e7ff; }
.dev-hero-content .btn-primary { background: #fff; color: var(--color-primary); }
.dev-hero-content .btn-primary:hover { background: #f1f5f9; }
.dev-hero-content .btn-outline { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.dev-hero-content .btn-outline:hover { background-color: rgba(255, 255, 255, 0.08); }

.portal-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 26px 0;
}

.portal-subnav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-panel);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.portal-subnav-item:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.portal-subnav-item.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.18);
}

.developer-portal-shell {
    gap: 0;
}

.developer-portal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 24px;
    padding: 34px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(224, 231, 255, 0.8) 45%, rgba(255, 255, 255, 0.95) 100%);
    border: 1px solid rgba(79, 70, 229, 0.12);
    box-shadow: var(--shadow-premium);
}

.developer-portal-hero-main h2 {
    font-size: 2.1rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text-main);
    margin: 14px 0 14px 0;
}

.developer-portal-hero-main p {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.developer-portal-hero-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.developer-portal-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    gap: 24px;
}

.developer-bounty-preview-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.developer-bounty-preview {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 14px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
}

.developer-bounty-preview-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    min-width: 120px;
}

.developer-incentive-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================================================
   已安装列表精细排版与开关按钮 (U006)
   ========================================================================== */
.installed-layout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}

/* 滑动开关 (Toggle Switch) */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}
.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(100, 116, 139, 0.2);
    transition: .3s;
    border-radius: 34px;
    border: 1px solid var(--color-border);
}
.switch-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.switch-toggle input:checked + .switch-slider {
    background-color: var(--color-success);
    border-color: var(--color-success);
}
.switch-toggle input:checked + .switch-slider:before {
    transform: translateX(22px);
}

/* SSO 与三权分立样式 (U002/U003) */
.sso-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
}

.rbac-role-assign {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rbac-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
}

.rbac-row span {
    font-weight: 500;
}

.rbac-row select {
    width: 160px;
    padding: 4px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.75rem;
    background: #000;
    color: #fff;
}

body.theme-light .rbac-row select {
    background: #f1f5f9;
    color: #000;
}

/* 大模型对话调试样式 */
.chat-shortcuts {
    display: flex;
    gap: 8px;
}

.chat-shortcuts button {
    font-size: 0.7rem;
    padding: 4px 8px;
}

/* 公安网认证流程样式 */
.realname-flow .flow-step i {
    color: var(--text-muted);
}
.realname-flow .flow-step.active i {
    color: var(--color-primary);
}

/* ==========================================================================
   控制台后台按钮
   ========================================================================== */
.btn-return-portal {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-return-portal:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--text-secondary);
}

/* ==========================================================================
   后台框架通用样式
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-bg-panel);
    border-right: 1px solid var(--color-border);
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 10;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-left: 10px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--color-primary), #818cf8);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.08);
}
.brand-icon { font-size: 20px; color: #fff; }
.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, var(--text-main), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand-tag {
    font-size: 0.65rem;
    color: var(--color-primary);
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    letter-spacing: 1px;
}

.sidebar-menu { display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}
.menu-item i { font-size: 18px; }
.menu-item:hover { color: var(--text-main); background-color: var(--color-bg-main); }
.menu-item.active {
    color: var(--color-primary);
    background: var(--color-primary-soft);
    border-left: 4px solid var(--color-primary);
    font-weight: 700;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    margin-top: auto;
    cursor: pointer;
    transition: background-color 0.2s;
}
.sidebar-user:hover {
    background-color: var(--color-bg-main);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--color-primary);
    background-color: var(--color-bg-card);
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { display: block; font-size: 0.875rem; font-weight: 600; }
.user-role { font-size: 0.75rem; color: var(--text-muted); }

/* 主内容区 */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: var(--color-bg-main);
}

/* 顶部栏 */
.top-bar {
    height: 80px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background-color: var(--color-bg-panel);
    backdrop-filter: none;
    flex-shrink: 0;
}
.page-title-area h1 { font-size: 1.5rem; font-weight: 700; }
.page-title-area p { font-size: 0.85rem; margin-top: 2px; }
.top-bar-actions { display: flex; align-items: center; gap: 20px; }

.wallet-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.wallet-badge:hover {
    background-color: rgba(245, 158, 11, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}
.balance-amount { color: var(--color-gold); font-weight: 700; }

.user-notifications {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}
.user-notifications:hover { background-color: rgba(255, 255, 255, 0.05); }
.notification-dot {
    position: absolute;
    top: 10px; right: 10px;
    width: 8px; height: 8px;
    background-color: var(--color-danger);
    border-radius: 50%;
}

.content-body { flex-grow: 1; overflow-y: auto; padding: 30px 40px; position: relative; }

.page-section {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.page-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 后台大卡片 */
.hero-section {
    border-radius: var(--border-radius-lg);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--color-border);
    padding: 50px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}
.hero-content { max-width: 600px; position: relative; z-index: 2; }

.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 16px;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.25;
}
.hero-content p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 24px; }

.search-bar-container {
    display: flex;
    align-items: center;
    background-color: rgba(10, 13, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-md);
    padding: 6px;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}
.search-bar-container:focus-within { border-color: var(--color-primary); box-shadow: 0 0 15px rgba(99, 102, 241, 0.2); }
.search-icon { font-size: 18px; color: var(--text-muted); margin: 0 14px; }
.search-bar-container input { flex-grow: 1; font-size: 0.9rem; color: #fff; }
.search-bar-container input::placeholder { color: var(--text-muted); }

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
.btn-primary:active { transform: translateY(1px); }
.btn-block { display: flex; width: 100%; }

.btn-outline {
    border: 1px solid var(--color-border);
    color: var(--text-main);
    padding: 10px 20px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-outline:hover { background-color: rgba(255, 255, 255, 0.05); border-color: var(--text-secondary); }

.btn-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-text:hover { color: var(--text-main); }

.category-filter-bar { display: flex; gap: 12px; margin-bottom: 24px; }
.category-btn {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}
.category-btn:hover { border-color: var(--text-secondary); color: var(--text-main); }
.category-btn.active {
    background-color: var(--color-primary-soft);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

/* 卡片 */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.tool-card {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}
.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-border-glow);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), var(--shadow-glow);
}

.tool-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.tool-icon {
    width: 48px;
    height: 48px;
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--color-primary);
}
.tool-badge { padding: 4px 8px; border-radius: var(--border-radius-sm); font-size: 0.65rem; font-weight: 600; text-transform: uppercase; }
.badge-mcp { background-color: var(--color-primary-soft); color: #818cf8; }
.badge-llm { background-color: var(--color-success-soft); color: #34d399; }
.badge-workflow { background-color: var(--color-gold-soft); color: #fbbf24; }
.badge-dataset { background-color: var(--color-info-soft); color: #22d3ee; }

.tool-card-body h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.tool-card-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tool-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
}
.tool-stat { display: flex; align-items: center; gap: 5px; color: var(--text-muted); }
.tool-price { font-weight: 700; color: var(--color-gold); }

/* ==========================================================================
   抽屉详情
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    top: 0; right: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(8px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.drawer-overlay.active { opacity: 1; pointer-events: auto; }
.detail-drawer {
    position: absolute;
    top: 0; right: 0;
    width: 600px; height: 100%;
    background-color: var(--color-bg-panel);
    border-left: 1px solid var(--color-border);
    padding: 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}
.drawer-overlay.active .detail-drawer { transform: translateX(0); }

.close-drawer-btn {
    position: absolute;
    top: 20px; right: 20px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.02);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.close-drawer-btn:hover { background-color: rgba(255,255,255,0.08); }

.drawer-header { display: flex; gap: 20px; margin-bottom: 30px; }
.drawer-header-icon {
    width: 72px; height: 72px;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--color-primary);
}
.drawer-header-info h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.drawer-header-info .developer { font-size: 0.85rem; color: var(--text-muted); }

.drawer-body-section { margin-bottom: 28px; }
.drawer-body-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 15px;
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label { font-size: 0.75rem; color: var(--text-muted); }
.meta-value { font-size: 0.875rem; font-weight: 600; }

.api-list { display: flex; flex-direction: column; gap: 10px; }
.api-item { background-color: rgba(255, 255, 255, 0.01); border: 1px solid var(--color-border); border-radius: var(--border-radius-md); padding: 12px; }
.api-item-header { display: flex; justify-content: space-between; font-size: 0.875rem; font-weight: 600; font-family: var(--font-mono); }
.api-item-desc { font-size: 0.75rem; color: var(--text-secondary); margin-top: 6px; }

.drawer-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.drawer-timeline-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.drawer-timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
    flex-shrink: 0;
}

.drawer-timeline-content {
    flex: 1;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
}

.drawer-timeline-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.drawer-timeline-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.audit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: var(--color-success-soft);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-success);
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

.code-tabs { border: 1px solid var(--color-border); border-radius: var(--border-radius-md); overflow: hidden; }
.tabs-nav { display: flex; background-color: rgba(255,255,255,0.02); border-bottom: 1px solid var(--color-border); }
.tab-btn {
    padding: 10px 16px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    cursor: pointer;
    border-right: 1px solid var(--color-border);
    transition: all 0.2s;
}
.tab-btn.active { background-color: rgba(255,255,255,0.04); color: var(--text-main); }
.tab-content {
    background-color: #05070a;
    padding: 15px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #34d399;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.5;
}

/* ==========================================================================
   页面三：调试沙箱 & 终端
   ========================================================================== */
.debugger-layout { display: grid; grid-template-columns: 320px 1fr; gap: 30px; height: calc(100vh - 160px); overflow: hidden; }
.debugger-panel {
    background-color: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}
.debugger-config { overflow-y: auto; }
.debugger-config h3, .debugger-console h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }

.debugger-config input,
.debugger-config select,
.debugger-config textarea,
.developer-publish input,
.developer-publish select,
.developer-publish textarea,
.modal-box input,
.modal-box select,
.modal-box textarea {
    color: var(--text-main) !important;
    background-color: var(--color-bg-card) !important;
    border: 1px solid var(--color-border) !important;
}

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }

.form-group select,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: all 0.3s;
}

.help-text { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; line-height: 1.3; }
.code-editor-container { border: 1px solid var(--color-border); border-radius: var(--border-radius-sm); overflow: hidden; }
.code-textarea {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.4;
    height: 120px;
    resize: none;
    background-color: var(--color-bg-panel) !important;
    border: none !important;
    color: var(--text-main) !important;
}

.checkbox-label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 0.8rem; font-weight: 500; }
.checkbox-label input[type="checkbox"] { display: none; }
.custom-checkbox {
    width: 16px; height: 16px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg-panel);
    flex-shrink: 0;
    margin-top: 2px;
}
.checkbox-label input[type="checkbox"]:checked + .custom-checkbox { background-color: var(--color-primary); border-color: var(--color-primary); }
.checkbox-label input[type="checkbox"]:checked + .custom-checkbox::before {
    content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #fff; font-size: 10px;
}

/* 控制台 (重构统一为亮底明晰日志终端) */
/* Console-specific styles have been split to styles-console.css */

/* ==========================================================================
   前台独立详情页与专题页
   ========================================================================== */
.portal-detail-shell {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.portal-breadcrumb {
    margin-bottom: 18px;
}

.portal-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 24px;
    padding: 30px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(240,246,255,0.92) 100%);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-premium);
}

@media (max-width: 1200px) {
    .portal-home-entry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-home-split {
        grid-template-columns: 1fr;
    }

    .developer-portal-hero,
    .developer-portal-content-grid {
        grid-template-columns: 1fr;
    }

    .portal-rankings-grid,
    .new-arrivals-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .tool-product-layout,
    .solution-decision-layout,
    .industry-editorial-layout {
        grid-template-columns: 1fr;
    }

    .solution-kpi-ribbon,
    .tool-spec-grid,
    .industry-case-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .solution-tier-grid {
        grid-template-columns: 1fr;
    }

    .industry-editorial-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .portal-home-entry-grid {
        grid-template-columns: 1fr;
    }

    .portal-home-solution-item,
    .portal-home-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .portal-home-solution-actions {
        align-items: flex-start;
        min-width: 0;
    }

    .developer-bounty-preview,
    .portal-subnav {
        flex-direction: column;
        align-items: stretch;
    }

    .developer-bounty-preview-side {
        align-items: flex-start;
        min-width: 0;
    }

    .portal-subnav-item {
        justify-content: center;
    }

    .portal-rankings-grid,
    .new-arrivals-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .tool-product-brand,
    .tool-content-split,
    .solution-kpi-ribbon,
    .tool-spec-grid,
    .industry-case-board {
        grid-template-columns: 1fr;
    }

    .solution-component-row,
    .industry-solution-row,
    .industry-tool-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .solution-component-side,
    .industry-solution-side,
    .industry-tool-meta {
        align-items: flex-start;
        min-width: 0;
    }
}

.portal-detail-hero h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 14px;
}

.portal-detail-hero p {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.portal-detail-sidecard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 20px;
}

.detail-kpi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
}

.detail-kpi span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.detail-kpi b {
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.5;
}

.portal-case-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-case-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-panel);
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .portal-detail-hero {
        grid-template-columns: 1fr;
    }
}

.tool-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 340px;
    gap: 28px;
}

.tool-product-main {
    display: flex;
    flex-direction: column;
}

.tool-product-hero {
    padding: 30px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(180deg, rgba(240,246,255,0.96) 0%, rgba(255,255,255,0.98) 58%, rgba(249,250,255,0.98) 100%);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.tool-product-hero::after {
    content: "";
    position: absolute;
    inset: auto -60px -60px auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, rgba(79, 70, 229, 0) 70%);
    pointer-events: none;
}

.tool-product-brand {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.tool-product-icon {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: var(--color-primary);
    background: var(--color-primary-soft);
    border: 1px solid rgba(79, 70, 229, 0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.tool-product-brand h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 12px 0;
}

.tool-product-brand p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.92rem;
}

.tool-product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tool-spec-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.tool-spec-grid .meta-item {
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(246,248,255,0.92) 100%);
    border: 1px solid rgba(79, 70, 229, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.tool-content-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.tool-product-aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-self: start;
    position: sticky;
    top: 24px;
}

.tool-buy-card,
.tool-side-list {
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-premium);
}

.tool-buy-card {
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(245,247,255,0.96) 100%);
}

.tool-buy-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.tool-buy-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.tool-buy-note {
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.7;
}

.tool-product-main .section-card,
.solution-decision-main .section-card,
.solution-decision-side .section-card,
.industry-article-section,
.industry-side-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.tool-product-main .section-card:hover,
.solution-decision-main .section-card:hover,
.solution-decision-side .section-card:hover,
.industry-article-section:hover,
.industry-side-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
    border-color: rgba(79, 70, 229, 0.12);
}

.tool-side-list h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

.tool-side-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}

.tool-side-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tool-side-item .btn-text {
    margin-top: 10px;
}

.tool-content-split .list-status-card {
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(247,248,252,0.96) 100%);
    border: 1px solid var(--color-border);
    box-shadow: none;
}

.solution-decision-hero {
    padding: 30px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(245,247,255,0.98) 50%, rgba(224,231,255,0.75) 100%);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.solution-decision-hero::after {
    content: "";
    position: absolute;
    inset: -40px -20px auto auto;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.14) 0%, rgba(79, 70, 229, 0) 72%);
    pointer-events: none;
}

.solution-decision-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 12px 0;
}

.solution-decision-header p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.92rem;
}

.solution-kpi-ribbon {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.solution-kpi-item {
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(6px);
}

.solution-kpi-item span {
    display: block;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.solution-kpi-item b {
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.6;
}

.solution-tier-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.solution-tier-card {
    padding: 22px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-panel);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.solution-tier-card.active {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.12);
    background: linear-gradient(180deg, rgba(240,246,255,0.95) 0%, rgba(255,255,255,1) 100%);
}

.solution-tier-card.active::after {
    content: "推荐";
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 700;
}

.solution-tier-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 12px 0 8px 0;
}

.solution-tier-card p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.solution-decision-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.solution-decision-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 360px;
    gap: 24px;
    margin-top: 24px;
}

.solution-decision-side {
    position: sticky;
    top: 24px;
    align-self: start;
}

.solution-component-list,
.solution-flow-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.solution-component-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.solution-component-row:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.16);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.08);
}

.solution-component-head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.solution-component-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 120px;
}

.solution-flow-step {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.solution-flow-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.solution-flow-step span {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 800;
}

.solution-flow-step b {
    display: block;
    color: var(--text-main);
    margin-bottom: 6px;
}

.solution-flow-step p {
    color: var(--text-secondary);
    font-size: 0.83rem;
    line-height: 1.7;
}

.industry-editorial-hero {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 26px;
    align-items: center;
    padding: 30px;
    border-radius: var(--border-radius-lg);
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.industry-editorial-hero::after {
    content: "";
    position: absolute;
    inset: auto auto -80px -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.12) 0%, rgba(8, 145, 178, 0) 72%);
    pointer-events: none;
}

.industry-editorial-cover {
    min-height: 160px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.industry-editorial-copy h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 12px 0;
}

.industry-editorial-copy p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.8;
}

.industry-editorial-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.industry-editorial-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.industry-editorial-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
    align-self: start;
}

.industry-side-card {
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.industry-side-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.industry-side-card .btn-text {
    justify-content: flex-start;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--color-bg-card);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.industry-side-card .btn-text:hover {
    border-color: rgba(79, 70, 229, 0.14);
    background: rgba(79, 70, 229, 0.05);
    color: var(--color-primary);
}

.industry-editorial-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.industry-article-section {
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.industry-article-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 22px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(8, 145, 178, 0.85) 0%, rgba(79, 70, 229, 0.65) 100%);
}

.industry-article-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.industry-article-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border-radius: 16px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.industry-article-item:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 145, 178, 0.16);
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.08);
}

.industry-article-index {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--color-primary);
    background: var(--color-primary-soft);
}

.industry-article-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.industry-article-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
}

.industry-solution-stack,
.industry-tool-strip {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.industry-solution-row,
.industry-tool-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 16px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.industry-solution-row:hover,
.industry-tool-row:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 145, 178, 0.16);
    box-shadow: 0 14px 28px rgba(8, 145, 178, 0.08);
}

.industry-solution-side,
.industry-tool-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    min-width: 128px;
}

.industry-tool-row {
    cursor: pointer;
    align-items: center;
}

.industry-tool-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 22px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.industry-tool-copy {
    flex: 1;
}

.industry-case-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.industry-case-column h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
}
