/* ========================================
   大發观市App - 移动端优化版
   设计理念：高级极简风，移动优先，适配各种主力机型
   ======================================== */

/* CSS变量定义 */
:root {
    /* 功能色 - 低饱和度高级感 */
    --color-buy: #ef4444;        /* 红色 - 买入/上涨 */
    --color-sell: #10b981;       /* 绿色 - 卖出/下跌 */
    --color-info: #FFC107;       /* 黄色 - 信息/品牌 */

    /* 浅色背景 */
    --bg-buy: #FDF8F6;
    --bg-sell: #F7F9F5;
    --bg-info: #FFF9E6;

    /* 文字颜色 */
    --text-primary: #2D3748;
    --text-secondary: #718096;
    --text-muted: #A0AEC0;

    /* 背景与卡片 */
    --bg-main: #F5F7FA;
    --bg-card: #FFFFFF;
    --bg-input: #F7FAFC;

    /* 边框 */
    --border-color: #E2E8F0;
    --border-light: #F7FAFC;

    /* 阴影 - 柔和高级 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);

    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;

    /* 移动端安全区域 */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* 重置与基础样式 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Roboto', 'Noto Sans SC', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

input, textarea, select {
    font-family: inherit;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.hidden {
    display: none !important;
}

.wechat-auth-loading {
    position: fixed;
    inset: 0;
    z-index: 2600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(245, 247, 250, 0.92);
    backdrop-filter: blur(8px);
}

.wechat-auth-loading-box {
    width: min(82vw, 300px);
    padding: 28px 22px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid rgba(7, 193, 96, 0.18);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.wechat-auth-loading-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 3px solid rgba(7, 193, 96, 0.16);
    border-top-color: #07C160;
    animation: spin 0.8s linear infinite;
}

.wechat-auth-loading-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.wechat-auth-loading-subtitle {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

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

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   登录页面
   ======================================== */
.page-login {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    padding-top: calc(var(--spacing-xl) + var(--safe-top));
    padding-bottom: var(--safe-bottom);
    background:
        linear-gradient(180deg, rgba(255, 248, 230, 0.92) 0%, rgba(245, 247, 250, 0.96) 38%, #F5F7FA 100%);
    z-index: 1000;
    overflow-y: auto;
}

.login-container {
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.login-logo {
    width: 68px;
    height: 68px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, #FFC107, #FFD700);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    box-shadow: var(--shadow-md);
}

.logo-text {
    font-size: 40px;
    font-weight: 700;
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-form {
    background: var(--bg-card);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-md);
}

.login-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    margin-bottom: var(--spacing-lg);
    background: #F1F5F9;
    border-radius: var(--radius-md);
}

.login-mode-tab {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.login-mode-tab.active {
    color: #1F2937;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.login-mode-tab .fa-weixin {
    color: #07C160;
}

.login-panel {
    display: none;
}

.login-panel.active {
    display: block;
}

.wechat-login-hero {
    text-align: center;
    padding: 4px 8px 20px;
}

.wechat-login-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #E9FFF3;
    color: #07C160;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.wechat-login-hero h2 {
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 1.25rem;
    line-height: 1.25;
}

.wechat-login-hero p {
    max-width: 270px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.batch-stock-input {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.55;
}

.batch-stock-input:focus,
.batch-group-select:focus,
#batchStockNewGroupName:focus,
.add-stock-field input:focus,
.add-stock-group-select:focus {
    outline: none;
    border-color: var(--color-info);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.batch-group-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-sm);
}

.batch-group-select,
#batchStockNewGroupName,
.add-stock-field input,
.add-stock-group-select {
    width: 100%;
    min-height: 44px;
    padding: 0 var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.95rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: var(--transition-fast);
}

.add-stock-field input::placeholder {
    color: var(--text-muted);
}

.add-stock-quote-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin: calc(var(--spacing-sm) * -0.5) 0 var(--spacing-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.82), rgba(255, 255, 255, 0.96));
}

.add-stock-quote-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.add-stock-quote-label {
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
}

.add-stock-quote-name {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.25;
}

.add-stock-quote-code {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    background: rgba(255, 200, 0, 0.18);
    color: #8A6400;
    font-size: 0.82rem;
    font-weight: 700;
}

.add-stock-quote-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-sm);
}

.add-stock-quote-metric {
    min-width: 0;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.add-stock-quote-metric span {
    display: block;
    margin-bottom: 3px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 600;
}

.add-stock-quote-metric strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.add-stock-quote-metric strong.is-up {
    color: var(--color-danger);
}

.add-stock-quote-metric strong.is-down {
    color: var(--color-success);
}

.add-stock-quote-card.is-empty {
    background: var(--bg-input);
}

.add-stock-quote-card.is-empty .add-stock-quote-name,
.add-stock-quote-card.is-empty .add-stock-quote-code,
.add-stock-quote-card.is-empty .add-stock-quote-metric strong {
    color: var(--text-muted);
}

.batch-add-summary {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    background: #FFF9E6;
    color: #7A5A00;
    font-size: 0.88rem;
    line-height: 1.55;
}

body.dark-mode .batch-stock-input,
body.dark-mode .batch-group-select,
body.dark-mode #batchStockNewGroupName,
body.dark-mode .add-stock-field input,
body.dark-mode .add-stock-group-select {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: none;
}

body.dark-mode .add-stock-quote-card {
    background: var(--bg-input);
    border-color: var(--border-color);
}

body.dark-mode .add-stock-quote-code {
    background: rgba(255, 200, 0, 0.16);
    color: #FACC15;
}

body.dark-mode .add-stock-quote-metric {
    background: rgba(15, 23, 42, 0.24);
    border-color: var(--border-color);
}

body.dark-mode .batch-add-summary {
    background: rgba(255, 193, 7, 0.14);
    color: #FACC15;
}

.phone-input-group,
.code-input-group {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition-fast);
}

.phone-input-group:focus-within,
.code-input-group:focus-within {
    border-color: var(--color-info);
    background: white;
}

.country-code {
    padding: var(--spacing-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 500;
    border-right: 1px solid var(--border-color);
}

.phone-input-group input,
.code-input-group input {
    flex: 1;
    padding: var(--spacing-md);
    background: transparent;
    border: none;
    font-size: 1rem;
    color: var(--text-primary);
}

.phone-input-group input::placeholder,
.code-input-group input::placeholder {
    color: var(--text-muted);
}

.btn-login {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
    background: var(--color-info);
    color: #212529;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
    transition: var(--transition-fast);
}

.btn-login:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-wechat-login {
    width: 100%;
    min-height: 52px;
    padding: var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
    background: #07C160;
    color: #fff;
    border: 1px solid #07C160;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
    box-shadow: 0 10px 22px rgba(7, 193, 96, 0.22);
}

.btn-wechat-login:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-register {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1rem;
    font-weight: 500;
    background: transparent;
    color: var(--color-info);
    border: 1px solid var(--color-info);
    border-radius: var(--radius-sm);
}

.login-link-btn {
    width: 100%;
    padding: 4px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.login-link-btn:active {
    color: var(--text-primary);
}

.login-error-msg {
    display: none;
    margin-top: 8px;
    color: #EF4444;
    font-size: 14px;
}

.agreement-check {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.agreement-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    transition: var(--transition-fast);
    cursor: pointer;
}

.agreement-check input:checked {
    border-color: var(--color-info);
    background: var(--color-info);
}

.agreement-check input:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #212529;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.agreement-check input:focus-visible {
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.22);
}

.agreement-label {
    margin-bottom: 0;
    line-height: 1.55;
    cursor: pointer;
}

.agreement-check a {
    color: var(--color-info);
    text-decoration: none;
}

.agreement-check a:hover {
    text-decoration: underline;
}

.guest-browse-btn {
    margin-top: 10px;
    color: var(--text-secondary);
}

.login-panel,
.login-mode-tabs,
.agreement-check {
    position: relative;
    z-index: 1;
}

.btn-wechat-login,
.login-link-btn,
.login-mode-tab,
.btn-login,
.btn-register,
.guest-browse-btn {
    pointer-events: auto;
}

.guest-login-entry {
    border-color: rgba(7, 193, 96, 0.28);
    color: #07C160;
    background: rgba(7, 193, 96, 0.08);
}

.btn-login:disabled,
.btn-register:disabled,
.btn-wechat-login:disabled,
.btn-login.requires-agreement,
.btn-register.requires-agreement {
    background: #e2e8f0;
    color: #94a3b8;
    border-color: #e2e8f0;
    box-shadow: none;
}

.btn-wechat-login.requires-agreement {
    background: #07C160;
    color: #fff;
    border-color: #07C160;
    box-shadow: 0 10px 22px rgba(7, 193, 96, 0.22);
}

.login-footer {
    text-align: center;
    margin-top: var(--spacing-lg);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.wechat-bind-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(74px + var(--safe-bottom));
    z-index: 1200;
    max-width: 560px;
    margin: 0 auto;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid rgba(7, 193, 96, 0.22);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.wechat-bind-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.wechat-bind-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(7, 193, 96, 0.12);
    color: #07C160;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.wechat-bind-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wechat-bind-text strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.wechat-bind-text span {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.wechat-bind-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-wechat-bind,
.btn-bind-dismiss {
    flex: 1;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    font-weight: 600;
}

.btn-wechat-bind {
    background: #07C160;
    color: #fff;
    border: 1px solid #07C160;
}

.btn-bind-dismiss {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* ========================================
   顶部导航 - 移动端优化
   ======================================== */
.fixed-top-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}

.sub-page-header {
    position: relative;
    z-index: 2;
}

.top-nav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    padding-top: calc(var(--spacing-sm) + var(--safe-top));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-left {
    display: flex;
    align-items: center;
    min-width: 40px;
    min-height: 40px;
    z-index: 1;
}

.page-header-back {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.page-header-back:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.page-header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    max-width: calc(100% - 232px);
    pointer-events: none;
}

.page-header-title .app-logo {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    flex: 0 0 auto;
}

.page-header-title .app-logo .logo-text {
    font-size: 19px;
}

.app-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FFC107, #FFD700);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
}

.app-logo .logo-text {
    font-size: 22px;
    font-weight: 700;
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.app-title {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-left: auto;
    z-index: 1;
}

.nav-text-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #111111;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.28);
}

.nav-text-btn:active {
    transform: scale(0.95);
    opacity: 0.9;
}

.nav-text-btn i {
    font-size: 14px;
}

#superAdminViewToggle.is-off {
    background: #e2e8f0;
    color: #64748b;
    box-shadow: none;
}

#superAdminViewToggle {
    min-width: 52px;
    justify-content: center;
}

#superAdminViewToggle.is-off:active {
    opacity: 0.95;
}

.nav-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: var(--transition-fast);
}

.nav-icon-btn .fa-plus-circle {
  color: #FFD700;
}

.nav-icon-btn:active {
    background: var(--bg-input);
    transform: scale(0.95);
}

/* ========================================
   页面容器 - 移动端优化
   ======================================== */
.page {
    padding: var(--spacing-md);
    padding-top: calc(var(--spacing-md) + 100px);
    padding-bottom: calc(var(--spacing-xl) + 70px + var(--safe-bottom));
    min-height: 100vh;
}

/* ========================================
   跑马灯公告样式
   ======================================== */
.risk-tip-marquee {
    width: 100%;
    overflow: hidden;
    background: var(--bg-info);
    color: var(--color-info);
    font-size: 0.75rem;
    height: 30px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.risk-tip-track {
    display: inline-block;
    padding: 5px 0;
    will-change: transform;
    animation: riskTipScroll 25s linear infinite;
    white-space: nowrap;
}

@keyframes riskTipScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 动态监视页样式 */
.monitor-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 12px 8px;
}

.monitor-hero-card {
    min-height: 160px;
    padding: 14px 13px;
    border-radius: 18px;
    color: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.monitor-hero-card.strong {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

.monitor-hero-card.sell {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}

.monitor-hero-card .monitor-hero-label {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 7px;
}

.monitor-hero-card h3 {
    font-size: 1.02rem;
    margin: 0;
    line-height: 1.22;
}

.monitor-hero-card p {
    font-size: 0.76rem;
    line-height: 1.4;
    margin-top: 7px;
    opacity: 0.92;
}

.monitor-hero-card .monitor-hero-proofs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.monitor-hero-card .monitor-hero-proofs span {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.25;
}

.monitor-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 12px 18px;
    height: calc(100vh - 320px);
}

.monitor-container.monitor-container-single,
.monitor-container.monitor-container-dual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monitor-column {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    overflow: hidden;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    min-width: 0;
}

.monitor-container-single .monitor-column {
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.98)),
        var(--bg-card);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.09);
}

.monitor-header {
    padding: 10px 12px;
    font-weight: 700;
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
}

.monitor-header.strong {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(250, 204, 21, 0.14));
    color: #b42318;
}

.monitor-header.sell {
    background: var(--bg-sell);
    color: var(--color-sell);
}

.monitor-header span {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
}

.monitor-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.monitor-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    padding: 9px 10px 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    gap: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.monitor-item:active {
    transform: scale(0.985);
    background: #ffffff;
}

.monitor-rank {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: transparent;
    font-size: 0;
    font-weight: 0;
}

.monitor-rank.is-top {
    background: transparent;
    color: transparent;
    box-shadow: none;
}

.monitor-stock-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
}

.monitor-code {
    color: #94a3b8;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0;
}

.monitor-name-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.monitor-item .name {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-primary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: anywhere;
}

.monitor-trend-badge {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
}

.monitor-trend-badge.up {
    color: #dc2626;
    background: rgba(254, 226, 226, 0.9);
}

.monitor-trend-badge.sideways {
    color: #7c3aed;
    background: rgba(237, 233, 254, 0.95);
}

.monitor-trend-badge.down {
    color: #2563eb;
    background: rgba(219, 234, 254, 0.95);
}

.monitor-trend-badge.pending {
    color: #64748b;
    background: rgba(241, 245, 249, 0.95);
}

.monitor-item .rate {
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.1);
    font-weight: 800;
    font-size: 0.72rem;
    white-space: nowrap;
}

.monitor-item .rate.buy { color: var(--color-buy); }
.monitor-item .rate.sell {
    color: var(--color-sell);
    background: rgba(16, 185, 129, 0.1);
}

.monitor-item .rate.position {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
}

.monitor-metrics {
    grid-column: 2 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    max-width: none;
    margin-top: 7px;
}

.monitor-metrics-inline {
    flex-wrap: wrap;
}

.monitor-empty {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 28px 16px;
    color: #94a3b8;
    font-size: 0.88rem;
    font-weight: 700;
}

.monitor-empty.error {
    color: #ef4444;
}

.dark-mode .monitor-column {
    background: #1e293b;
    border-color: #334155;
}

.dark-mode .monitor-header {
    border-color: #334155;
}

.dark-mode .monitor-header.strong { background: #442727; }
.dark-mode .monitor-header.sell { background: #1C3D33; }
.dark-mode .monitor-container-single .monitor-column { background: #1e293b; }
.dark-mode .monitor-item { background: #0f172a; border-color: #334155; }
.dark-mode .monitor-item .name { color: #f8fafc; }

@media (max-width: 640px) {
    .monitor-hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .monitor-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        height: auto;
        min-height: calc(100vh - 326px);
    }

    .monitor-hero-card {
        min-height: 148px;
    }

    .monitor-item {
        padding: 8px 9px 7px;
    }
}

/* 自选高分：移动端以全宽数据表展示，避免双栏压缩单条信息。 */
.page-monitor {
    --monitor-buy: #ef4444;
    --monitor-sell: #059669;
    --monitor-position: #7c3aed;
    padding-bottom: calc(84px + var(--safe-bottom));
}

.monitor-hero-grid {
    width: min(100%, 1040px);
    margin: 0 auto;
    padding: 14px 20px 16px;
    gap: 12px;
}

.monitor-hero-card {
    min-height: 136px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: none;
    color: var(--text-primary);
    text-align: left;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.monitor-hero-card:active {
    transform: scale(0.985);
}

.monitor-hero-card.strong {
    background: #fffafa;
    border-color: #fecaca;
}

.monitor-hero-card.sell {
    background: #f6fffb;
    border-color: #bbf7d0;
}

.monitor-hero-card.strong.active { border-color: #fb923c; }
.monitor-hero-card.sell.active { border-color: #34d399; }

.monitor-hero-heading {
    display: flex;
    align-items: center;
    gap: 9px;
}

.monitor-hero-heading i {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 0.82rem;
}

.monitor-hero-card.strong .monitor-hero-heading { color: #dc2626; }
.monitor-hero-card.strong .monitor-hero-heading i { background: #ef4444; }
.monitor-hero-card.sell .monitor-hero-heading { color: #059669; }
.monitor-hero-card.sell .monitor-hero-heading i { background: #10b981; }

.monitor-hero-card h3 {
    color: inherit;
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
}

.monitor-hero-card .monitor-hero-proofs {
    margin-top: 14px;
}

.monitor-hero-card .monitor-hero-proofs span {
    display: block;
    padding: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.45;
}

.monitor-results {
    width: min(calc(100% - 40px), 1040px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.monitor-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 62px;
    padding: 6px 8px 0;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.monitor-mode-tab {
    position: relative;
    min-height: 54px;
    color: #64748b;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
}

.monitor-mode-tab span {
    display: inline-block;
    min-width: 20px;
    margin-left: 5px;
    color: inherit;
    font-size: 0.9rem;
}

.monitor-mode-tab::after {
    position: absolute;
    right: 24%;
    bottom: 0;
    left: 24%;
    height: 3px;
    border-radius: 3px 3px 0 0;
    content: '';
    opacity: 0;
}

.monitor-mode-tab.active::after { opacity: 1; }
.monitor-mode-tab.strong.active { color: #ea580c; }
.monitor-mode-tab.strong.active::after { background: #f97316; }
.monitor-mode-tab.sell.active { color: #059669; }
.monitor-mode-tab.sell.active::after { background: #10b981; }

.monitor-table-head,
.monitor-item {
    display: grid;
    grid-template-columns: minmax(88px, 1.28fr) repeat(4, minmax(0, 0.9fr));
    column-gap: 4px;
}

.monitor-table-head {
    min-height: 48px;
    align-items: center;
    padding: 0 12px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.monitor-table-head span:not(:first-child) { text-align: center; }
.monitor-table-head span:nth-child(2) { color: var(--monitor-buy); }
.monitor-table-head span:nth-child(3) { color: var(--monitor-sell); }
.monitor-table-head span:nth-child(4) { color: var(--monitor-position); }
.monitor-table-head span:nth-child(5) { color: #e11d48; }

.monitor-list {
    display: block;
    min-height: 168px;
    padding: 0;
    overflow: visible;
}

.monitor-item {
    width: 100%;
    min-height: 78px;
    align-items: center;
    padding: 12px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    color: var(--text-primary);
    text-align: left;
    transition: background-color 0.18s ease;
}

.monitor-item:last-child { border-bottom: 0; }
.monitor-item:active { transform: none; background: #f8fafc; }
.monitor-rank { display: none; }

.monitor-stock-main {
    min-width: 0;
    gap: 3px;
}

.monitor-name-row { gap: 6px; }

.monitor-item .name {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monitor-code {
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.monitor-trend-badge {
    min-width: 24px;
    padding: 3px 5px;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.2;
    text-align: center;
}

.monitor-trend-badge.up { color: #dc2626; background: #fef2f2; }
.monitor-trend-badge.sideways { color: #7c3aed; background: #f5f3ff; }
.monitor-trend-badge.down { color: #059669; background: #ecfdf5; }

.monitor-metrics,
.monitor-metrics-inline {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
}

.monitor-item .rate.trend-stage {
    color: #e11d48;
    border: 1px solid #fecaca;
    background: #fff1f2;
}

.monitor-item .rate {
    display: flex;
    min-width: 0;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.monitor-item .rate.buy { color: var(--monitor-buy); background: #fef2f2; }
.monitor-item .rate.sell { color: var(--monitor-sell); background: #ecfdf5; }
.monitor-item .rate.position { color: var(--monitor-position); background: #f5f3ff; }

.monitor-empty {
    min-height: 168px;
    padding: 32px 16px;
    color: #94a3b8;
    font-size: 0.92rem;
}

.dark-mode .monitor-hero-card.strong,
.dark-mode .monitor-hero-card.sell,
.dark-mode .monitor-results,
.dark-mode .monitor-mode-tabs,
.dark-mode .monitor-item { background: #0f172a; }

.dark-mode .monitor-hero-card.strong { border-color: #7f1d1d; }
.dark-mode .monitor-hero-card.sell { border-color: #14532d; }
.dark-mode .monitor-table-head { background: #1e293b; border-color: #334155; }
.dark-mode .monitor-mode-tabs,
.dark-mode .monitor-results,
.dark-mode .monitor-item { border-color: #334155; }
.dark-mode .monitor-item .name { color: #f8fafc; }
.dark-mode .monitor-item .rate.trend-stage { background: #3f1d2e; }

@media (max-width: 400px) {
    .monitor-hero-grid { padding-right: 12px; padding-left: 12px; gap: 10px; }
    .monitor-hero-card { min-height: 124px; padding: 13px 11px; }
    .monitor-hero-card h3 { font-size: 1.02rem; }
    .monitor-hero-card .monitor-hero-proofs span { font-size: 0.75rem; }
    .monitor-results { width: calc(100% - 24px); }
    .monitor-table-head,
    .monitor-item { padding-right: 10px; padding-left: 10px; }
    .monitor-item .name { font-size: 0.9rem; }
    .monitor-item .rate { font-size: 0.64rem; }
}

.bounty-risk-tip {
    margin-bottom: 0;
}

@keyframes riskTipScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(65px + var(--safe-bottom));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: var(--safe-bottom);
    border-top: 1px solid var(--border-light);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    flex: 1;
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.bottom-nav-item.active {
    color: #FFC107;
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bottom-nav-item:active {
    background: var(--bg-input);
    transform: scale(0.95);
}

/* 页面容器样式 */
.page {
    min-height: 100vh;
    padding: 0;
}

/* 首页及各页面的顶部留白适配 */
.page-dashboard {
    padding-top: 95px !important;
}

.page-list, .page-bounty, .page-profile, .page-detail, .page-monitor {
    padding-top: 88px !important;
}

/* 个股详情的行情图会比普通页面更长。底部固定导航栏之外再保留一段空白，
 * 让成交量和大發指标的最后一行可以完整滚动出来。 */
.page-detail {
    padding-bottom: calc(96px + var(--safe-bottom)) !important;
    scroll-padding-bottom: calc(96px + var(--safe-bottom));
}

@media (max-width: 375px) {
    #superAdminViewToggle {
        min-width: 42px;
        padding-left: 10px;
        padding-right: 10px;
    }

    #superAdminViewToggle span {
        font-size: 0;
    }

    #superAdminViewToggle span::after {
        content: '超';
        font-size: 13px;
    }
}

.page-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    padding-top: var(--spacing-sm);
    background: var(--bg-card);
}

.back-btn, .star-btn, .refresh-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.back-btn:active, .star-btn:active, .refresh-btn:active {
    transform: scale(0.95);
    box-shadow: none;
}

.back-btn.active, .star-btn.active, .refresh-btn.active {
    color: #F39C12;
}

.bounty-tools {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 15px 12px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}

.bounty-tool-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bounty-tool-row .bounty-search-box {
    flex: 1;
    min-width: 0;
}

.bounty-refresh-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

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

.bounty-range-btn {
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

.bounty-range-btn.active {
    border-color: #facc15;
    background: #fffbeb;
    color: #92400e;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.18);
}

.bounty-search-box {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-input);
    color: var(--text-secondary);
}

.bounty-search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.bounty-search-box button {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: var(--border-light);
    color: var(--text-secondary);
}

.page-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
}

.add-btn {
    display: none;
}

.add-btn:active {
    transform: scale(0.95);
    opacity: 0.9;
}

/* 自选列表搜索与操作区 */
.list-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 var(--spacing-md) var(--spacing-sm);
}

.list-search-row .stock-list-search {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.list-search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

#listPage .list-search-actions .add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(245, 193, 7, 0.16);
    color: #1f2937;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
}

#listPage .list-search-actions .add-btn.hidden {
    display: none !important;
}

#listPage .list-search-actions .add-btn i {
    font-size: 0.9rem;
}

#listPage .list-search-actions .add-btn#batchAddStockBtn {
    background: rgba(37, 99, 235, 0.12);
}

#listPage .list-search-actions .refresh-btn {
    width: 42px;
    height: 42px;
}

/* ========================================
   首页 - Dashboard 移动端优化
   ======================================== */

/* 核心数据卡片 - 移动端保持横向排列 */
.data-cards {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--spacing-xs);
}

.data-cards::-webkit-scrollbar {
    height: 2px;
}

.data-card {
    flex: 1;
    min-width: 100px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.data-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.data-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.data-card.buy-warning::before {
    background: var(--color-buy);
}

.data-card.sell-warning::before {
    background: var(--color-sell);
}

.data-card.dual-warning::before {
    background: var(--color-info);
}

.data-card:active {
    transform: scale(0.98);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.buy-warning .card-icon {
    background: rgba(240, 101, 67, 0.12);
    color: var(--color-buy);
}

.sell-warning .card-icon {
    background: rgba(126, 159, 107, 0.12);
    color: var(--color-sell);
}

.dual-warning .card-icon {
    background: rgba(91, 143, 185, 0.12);
    color: var(--color-info);
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.card-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.btn-outline {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:active {
    background: var(--bg-input);
    transform: scale(0.98);
}

.btn-outline i {
    transition: var(--transition-normal);
}

.btn-outline:active i {
    transform: rotate(180deg);
}

.btn-primary {
    background: var(--color-info);
    color: #212529;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-warning {
    background: #E9B44C;
    color: white;
}

.btn-warning:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-danger {
    background: #EF4444;
    color: white;
}

.btn-danger:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-full {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
}

/* 快捷选股标签 - 横向滚动 */
.quick-tags {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
    padding-bottom: var(--spacing-xs);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.quick-tags::-webkit-scrollbar {
    display: none;
}

.tag-group {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.tag-group::after {
    content: '';
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 var(--spacing-xs);
}

.tag-group:last-of-type::after {
    display: none;
}

.tag-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    transition: var(--transition-fast);
}

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

.tag-btn.active {
    background: var(--color-info);
    border-color: var(--color-info);
    color: #212529;
}

/* 自选股模块 */
.watchlist-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.watchlist-section::after {
    content: '↕ 上下 / ↔ 左右滑动';
    position: absolute;
    right: var(--spacing-md);
    top: var(--spacing-md);
    font-size: 0.6rem;
    color: var(--text-muted);
    opacity: 0.5;
    pointer-events: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stock-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.watchlist {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    max-height: 310px; /* 约显示5条 */
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
    padding-right: 4px;
}

.watchlist::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.watchlist::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.watchlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    gap: var(--spacing-md);
    flex-shrink: 0;
    min-width: max-content;
}

.watchlist-item:active {
    background: #E8EBEE;
    transform: scale(0.99);
}

.stock-name-code {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 100px;
}

.stock-name-code .name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    font-size: 0.9rem;
}

.stock-name-code .code {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.watchlist-change {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 55px;
    margin-right: var(--spacing-xs);
    flex-shrink: 0;
}

.watchlist-change.positive .watchlist-percent {
    color: var(--color-buy);
}

.watchlist-change.negative .watchlist-percent {
    color: var(--color-sell);
}

.watchlist-percent {
    font-weight: 600;
    font-size: 0.8rem;
}

.watchlist-price {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.rate-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-shrink: 0;
    align-items: center;
}

.rate-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 42px;
}

.rate-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.rate-number {
    font-weight: 600;
    font-size: 0.8rem;
}

.rate-number.buy {
    color: var(--color-buy);
}

.rate-number.sell {
    color: var(--color-sell);
}

.time-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 65px;
    margin-left: auto;
    justify-content: center;
}

.time-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    line-height: 1.2;
}

.time-text .date-text {
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.time-text .time-text {
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.empty-watchlist {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
}

.empty-watchlist i {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    display: block;
    opacity: 0.5;
}

/* ========================================
   股票列表页 - 移动端优化
   ======================================== */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 132px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stock-table {
    width: 100%;
    min-width: 380px;
    border-collapse: collapse;
}

.stock-table tbody tr.stock-card-row td {
    padding: 0;
    border-bottom: 0;
    padding-bottom: 6px;
}

.stock-card {
    background: rgba(255, 251, 235, 0.9);
    border: 1px solid rgba(245, 208, 101, 0.34);
    border-radius: 13px;
    padding: 7px 9px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035);
    transition: var(--transition-fast);
    cursor: pointer;
}

.stock-card:active {
    transform: scale(0.995);
    background: rgba(255, 247, 204, 0.86);
}

.stock-card.needs-review {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.98), rgba(226, 232, 240, 0.9));
    border-color: rgba(148, 163, 184, 0.76);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18), 0 4px 12px rgba(15, 23, 42, 0.045);
}

.stock-card.needs-review:active {
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.96), rgba(203, 213, 225, 0.9));
}

.stock-card-top {
    display: flex;
    align-items: center;
    gap: 7px;
}

.stock-card-check,
.stock-card-star {
    flex-shrink: 0;
    width: 26px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    padding: 0;
}

.stock-card-check input {
    width: 15px;
    height: 15px;
    margin: 0;
}

.stock-card-star {
    cursor: pointer;
}

.stock-card-star i {
    font-size: 0.9rem;
}

.stock-card-star .filled {
    color: #f59e0b;
}

.stock-card-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stock-card-line {
    display: grid;
    align-items: center;
    min-width: 0;
    line-height: 1.1;
    column-gap: 8px;
}

.stock-card-line-primary {
    grid-template-columns: minmax(0, 1.25fr) minmax(4rem, 1fr) minmax(4.5rem, 1.1fr) minmax(5.25rem, 1.25fr);
}

.stock-card-line-secondary {
    grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
}

.stock-card-line-secondary.has-trend-stage {
    grid-template-columns: minmax(0, 1.15fr) repeat(4, minmax(0, 1fr));
}

.trend-stage-gate {
    cursor: pointer;
}

.trend-stage-gate:active {
    filter: brightness(0.96);
}

.trend-stage-gate:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.stock-name-text {
    min-width: 0;
    flex: 1;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-card-price,
.stock-card-change,
.stock-code-text,
.stock-card-date {
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    white-space: nowrap;
}

.stock-code-trend {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    white-space: nowrap;
}

.stock-trend-text {
    overflow: hidden;
    text-overflow: ellipsis;
    color: #7c3aed;
    font-size: 0.72rem;
    font-weight: 800;
}

.stock-trend-text.up {
    color: #ef4444;
}

.stock-trend-text.sideways {
    color: #7c3aed;
}

.stock-trend-text.down {
    color: #16a34a;
}

.stock-code-text,
.stock-card-date {
    color: var(--text-secondary);
}

.stock-card-change,
.stock-card-metric.buy {
    text-align: right;
}

.stock-card-price,
.stock-card-metric.sell {
    text-align: right;
}

.stock-card-date,
.stock-card-metric.position {
    text-align: right;
}

.stock-card-change.positive {
    color: var(--color-buy);
}

.stock-card-change.negative {
    color: var(--color-sell);
}

.date-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.date-line .date-text,
.date-line .time-text {
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1;
    white-space: nowrap;
}

.stock-card-metric {
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.stock-card-metric.buy {
    color: var(--color-buy);
}

.stock-card-metric.sell {
    color: var(--color-sell);
}

.stock-card-metric.position {
    color: #8b5cf6;
}

.stock-card-metric.trend-stage {
    color: #d97706;
    text-align: right;
}

#batchDeleteBtn {
    width: 42px;
    min-width: 42px;
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
}

#batchDeleteBtn i {
    margin: 0;
}

.stock-table th,
.stock-table td {
    padding: 10px 8px;
    text-align: left;
    white-space: nowrap;
    font-size: 0.8rem;
}

.stock-table th {
    background: var(--bg-input);
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.stock-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.stock-table th.sortable:active {
    color: var(--color-info);
}

.stock-table th.sortable i {
    font-size: 0.65rem;
    margin-left: var(--spacing-xs);
    opacity: 0.5;
}

.stock-table th.sorted i {
    opacity: 1;
    color: var(--color-info);
}

.stock-table tbody tr {
    transition: var(--transition-fast);
    cursor: pointer;
}

.stock-table tbody tr:active {
    background: var(--bg-input);
}

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

.col-checkbox { width: 36px; }
.col-star { width: 36px; }
.col-name { min-width: 90px; }
.col-rate { min-width: 60px; }
.col-change { min-width: 75px; }
.col-date { min-width: 80px; }
.col-delete { width: 40px; }

.stock-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stock-name-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.stock-code-text {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.change-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.change-cell.positive .change-percent {
    color: var(--color-buy);
}

.change-cell.negative .change-percent {
    color: var(--color-sell);
}

.change-percent {
    font-weight: 600;
    font-size: 0.85rem;
}

.change-price {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.rate-cell-combined {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.rate-buy {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-buy);
}

.rate-sell {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-sell);
}

.stock-star {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition-fast);
}

.stock-star:active {
    transform: scale(1.2);
}

.stock-star.filled {
    color: #F39C12;
}

.rate-cell.buy {
    color: var(--color-buy);
    font-weight: 600;
    font-size: 0.9rem;
}

.rate-cell.sell {
    color: var(--color-sell);
    font-weight: 600;
    font-size: 0.9rem;
}

.date-cell {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.date-cell .date-text {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.date-cell .time-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.table-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-info);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: white;
    transition: var(--transition-fast);
}

.table-checkbox:checked {
    background: var(--color-info);
    border-color: var(--color-info);
}

.table-checkbox:checked::after {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: #212529;
    font-size: 14px;
    font-weight: bold;
}

.stock-delete {
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-size: 14px;
}

.stock-delete:active {
    color: #E74C3C;
    background: rgba(231, 76, 60, 0.1);
}

/* 列表底部操作区 - 固定底部 */
.list-footer {
    position: fixed !important;
    bottom: calc(65px + var(--safe-bottom));
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 12px;
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1100;
    pointer-events: auto;
}

.page-list {
    padding-bottom: calc(var(--spacing-xl) + 150px + var(--safe-bottom));
}

.select-all {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.select-all input {
    width: 17px;
    height: 17px;
    accent-color: var(--color-info);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.select-all input:checked {
    background: var(--color-info);
    border-color: var(--color-info);
}

.list-footer .btn-primary {
    padding: 6px 10px;
    font-size: 0.76rem;
}

.footer-buttons {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.footer-buttons .btn {
    padding: 6px 10px;
    font-size: 0.76rem;
    line-height: 1.1;
    white-space: nowrap;
    flex: 0 0 auto;
}

.footer-buttons .btn i {
    font-size: 0.78rem;
}

.footer-buttons::-webkit-scrollbar {
    display: none;
}

.batch-auto-calc-btn {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    border: none;
    font-weight: 700;
}

.batch-auto-calc-btn.is-loading {
    opacity: 0.78;
}

/* ========================================
   个股详情页 - 移动端优化
   ======================================== */
.detail-combo-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(255, 193, 7, 0.18), transparent 34%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 58%, rgba(239, 246, 255, 0.9) 100%);
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 24px;
    padding: 14px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    margin: 12px 0 14px;
}

.stock-header {
    position: relative;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 10px;
}

.stock-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stock-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

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

.stock-title-block {
    min-width: 0;
}

.stock-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.stock-name {
    font-size: 1.18rem;
    line-height: 1.18;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stock-code {
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.detail-trend-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
}

.detail-trend-badge.up {
    color: #dc2626;
    background: rgba(254, 226, 226, 0.9);
}

.detail-trend-badge.sideways {
    color: #7c3aed;
    background: rgba(237, 233, 254, 0.95);
}

.detail-trend-badge.down {
    color: #2563eb;
    background: rgba(219, 234, 254, 0.95);
}

.detail-trend-badge.pending {
    color: #64748b;
    background: rgba(241, 245, 249, 0.95);
}

/* 股票头部买卖率徽章 */
.stock-rates {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.detail-note-actions {
    display: block;
    margin-top: 9px;
}

.kelly-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    flex: 1 1 auto;
    margin: 0;
    padding: 7px 9px;
    border-radius: 12px;
    font-size: 0.68rem;
    line-height: 1.38;
    color: #64748b;
    background: rgba(241, 245, 249, 0.84);
}

.kelly-note i {
    margin-top: 2px;
    color: #94a3b8;
}

.risk-model-summary {
    margin: 2px 0 10px;
    padding: 9px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 15px;
    background: rgba(255, 251, 235, 0.76);
}

.risk-model-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.7rem;
}

.detail-disclosure-summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.detail-disclosure-summary::-webkit-details-marker {
    display: none;
}

.detail-disclosure-summary:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.5);
    outline-offset: 3px;
}

.detail-disclosure-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    color: #64748b;
    font-size: 0.66rem;
    white-space: nowrap;
}

.detail-disclosure-action i {
    font-size: 0.62rem;
    transition: transform 160ms ease;
}

.detail-disclosure-open {
    display: none;
}

details[open] > .detail-disclosure-summary .detail-disclosure-closed {
    display: none;
}

details[open] > .detail-disclosure-summary .detail-disclosure-open {
    display: inline;
}

details[open] > .detail-disclosure-summary .detail-disclosure-action i {
    transform: rotate(180deg);
}

.risk-model-summary:not([open]) .risk-model-summary-head {
    margin-bottom: 0;
}

.risk-model-summary-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.risk-model-summary-head strong { color: var(--text-primary); }
.risk-model-summary-head strong i { color: #f59e0b; }
.risk-model-summary-head span { font-weight: 800; }
.risk-model-summary-head .allowed { color: #16a34a; }
.risk-model-summary-head .blocked { color: #dc2626; }

.risk-model-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.risk-model-summary-grid > div {
    min-width: 0;
    padding: 7px 8px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.82);
}

.risk-model-summary-grid span,
.risk-model-summary-grid small {
    display: block;
    color: #64748b;
    font-size: 0.61rem;
    line-height: 1.35;
}

.risk-model-summary-grid strong {
    display: block;
    margin: 2px 0;
    color: var(--text-primary);
    font-size: 0.78rem;
}

body.dark-mode .risk-model-summary { background: rgba(69, 55, 16, 0.42); }
body.dark-mode .risk-model-summary-grid > div { background: rgba(30, 41, 59, 0.72); }
body.dark-mode .params-section-summary {
    border-color: rgba(71, 85, 105, 0.72);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(69, 55, 16, 0.56));
    box-shadow: none;
}
body.dark-mode .detail-disclosure-action { color: #cbd5e1; }

.rate-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 6px 5px;
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    width: 100%;
    font: inherit;
    font-weight: 700;
}

.rate-badge.buy {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.9), rgba(255, 247, 237, 0.74));
    border-color: rgba(248, 113, 113, 0.18);
    color: var(--color-buy);
}

.rate-badge.sell {
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.88), rgba(240, 253, 244, 0.72));
    border-color: rgba(16, 185, 129, 0.16);
    color: var(--color-sell);
}

.rate-badge.position {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(239, 246, 255, 0.74));
    border-color: rgba(59, 130, 246, 0.16);
    color: #2563EB;
}

.rate-badge.trend-stage {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.9), rgba(255, 241, 242, 0.74));
    border-color: rgba(239, 68, 68, 0.18);
    color: var(--color-buy);
    cursor: default;
}

.rate-badge-label {
    font-size: 0.64rem;
    line-height: 1;
    font-weight: 700;
    opacity: 0.9;
}

.rate-badge-value {
    font-size: 0.94rem;
    line-height: 1.15;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.rate-badge-value.vip-only {
    font-size: 0.68rem;
    white-space: nowrap;
}

.stock-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    flex: 0 0 auto;
}

.current-price {
    font-size: 1.36rem;
    line-height: 1;
    font-weight: 900;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.current-price.positive {
    color: var(--color-buy);
}

.current-price.negative {
    color: var(--color-sell);
}

.price-change {
    font-size: 0.68rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-variant-numeric: tabular-nums;
}

.price-change.positive {
    background: rgba(240, 101, 67, 0.12);
    color: var(--color-buy);
}

.price-change.negative {
    background: rgba(126, 159, 107, 0.12);
    color: var(--color-sell);
}

.detail-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0;
}

.detail-action-btn {
    min-height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: none;
    flex: 1 1 0;
}

#detailPage.pro-detail-mode .detail-action-btn.auto {
    order: 1;
}

#detailPage.pro-detail-mode .detail-action-btn.bounty {
    order: 2;
}

.detail-action-btn.bounty {
    flex-grow: 1.35;
}

.detail-action-btn.auto {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.detail-action-btn.bounty {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    color: #1e293b;
    box-shadow: 0 12px 22px rgba(234, 179, 8, 0.2);
}

.detail-action-btn.favorite {
    flex: 1 1 0;
    min-width: 0;
    order: 1;
    padding: 0 10px;
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.detail-action-btn.favorite.active {
    background: #fef3c7;
    border-color: rgba(245, 158, 11, 0.34);
}

.detail-action-btn.group {
    order: 2;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.detail-calculation-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin: 0 0 var(--spacing-md);
}

.detail-calculation-actions .detail-action-btn,
.detail-calculation-actions > .bounty-submit-wrap {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
}

.detail-calculation-actions .detail-action-btn,
.detail-calculation-actions .bounty-submit-btn {
    height: 40px;
    min-height: 40px;
    font-size: 11px;
}

.detail-calculation-actions > .bounty-submit-wrap {
    display: flex;
    margin: 0;
    order: 3;
}

.detail-calculation-actions .bounty-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
}

.detail-calculation-actions .bounty-submit-btn i,
.detail-calculation-actions .bounty-submit-btn span {
    flex: 0 0 auto;
}

.detail-calculation-actions .bounty-submit-btn.save-result-button {
    border: 1px solid rgba(244, 114, 182, 0.28);
    color: #dc2626;
    background: linear-gradient(135deg, #fff1f6 0%, #fce7f3 100%);
    box-shadow: 0 8px 18px rgba(244, 114, 182, 0.16);
}

.detail-calculation-actions .bounty-submit-btn.save-result-button i {
    color: #db2777;
}

/* 个股详情行情图：默认浅色，图表内部会在夜间模式自动切换深色主题。 */
.detail-market-section {
    margin: 0 0 var(--spacing-md);
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.detail-market-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.detail-market-section-head h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 900;
}

.detail-market-section-head h2 i {
    color: #f59e0b;
}

.detail-market-section-head p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.detail-market-period-tabs {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    margin-top: 12px;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #f8fafc;
}

.detail-market-period-tabs button {
    min-height: 32px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
}

.detail-market-period-tabs button.active {
    background: #fff7d6;
    color: #a16207;
    box-shadow: 0 1px 3px rgba(146, 64, 14, 0.12);
}

.detail-market-period-tabs .detail-market-refresh {
    min-width: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #475569;
    background: #f8fafc;
    font-size: 0.72rem;
    white-space: nowrap;
}

.detail-market-period-tabs .detail-market-refresh:hover:not(:disabled) {
    border-color: #f59e0b;
    color: #b45309;
    background: #fffbeb;
}

.detail-market-period-tabs .detail-market-refresh:disabled {
    cursor: wait;
    opacity: 0.58;
}

.detail-market-chart .strategy-market-chart-card {
    margin-top: 10px;
}

#detailPage.market-asset-detail-mode .stock-rates,
#detailPage.market-asset-detail-mode .detail-note-actions,
#detailPage.market-asset-detail-mode #riskModelSummary,
#detailPage.market-asset-detail-mode .params-section,
#detailPage.market-asset-detail-mode #detailCalculationActions,
#detailPage.market-asset-detail-mode #monitorSubmitWrap,
#detailPage.market-asset-detail-mode .trend-selector,
#detailPage.market-asset-detail-mode .trend-modules,
#detailPage.market-asset-detail-mode #bountySubmitWrap {
    display: none !important;
}

#detailPage.market-asset-detail-mode .detail-combo-card {
    margin-bottom: var(--spacing-md);
}

#detailPage.market-asset-detail-mode .stock-header {
    padding-bottom: 0;
}

body.dark-mode .detail-market-section {
    border-color: var(--border-color);
    background: var(--bg-card);
}

body.dark-mode .detail-market-period-tabs {
    border-color: var(--border-color);
    background: #1e293b;
}

body.dark-mode .detail-market-period-tabs button.active {
    background: rgba(244, 196, 0, 0.18);
    color: #fde047;
}

body.dark-mode .detail-market-period-tabs .detail-market-refresh {
    border-color: rgba(148, 163, 184, 0.45);
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.7);
}

body.dark-mode .detail-market-period-tabs .detail-market-refresh:hover:not(:disabled) {
    border-color: #eab308;
    color: #facc15;
}

@media (max-width: 380px) {
    .detail-market-section { padding: 10px; }
    .detail-market-period-tabs { gap: 3px; padding: 3px; }
    .detail-market-period-tabs button { font-size: 0.68rem; }
    .detail-market-period-tabs .detail-market-refresh { padding-left: 3px; padding-right: 3px; }
}

/* 趋势选择器 */
.trend-selector {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.trend-selector label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    padding: var(--spacing-md);
    padding-right: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.select-wrapper select:active {
    border-color: var(--color-info);
}

.select-wrapper i {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 12px;
}

/* 核心参数区 */
.params-section {
    display: block;
    margin-bottom: 0;
}

.params-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 8px;
    margin-top: 8px;
}

.params-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid rgba(226, 232, 240, 0.76);
    border-radius: 14px;
    color: var(--text-primary);
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.92), rgba(255, 251, 235, 0.9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    font-weight: 900;
}

.params-section-summary strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.params-section-summary strong i {
    color: #f59e0b;
}

.param-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border-radius: 18px;
    padding: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.64);
    min-width: 0;
}

.param-card.input-param {
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.96), rgba(239, 246, 255, 0.86));
}

.param-card.calc-param {
    background: linear-gradient(145deg, rgba(255, 251, 235, 0.98), rgba(239, 246, 255, 0.82));
}

.param-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.param-label i {
    color: #f59e0b;
}

.param-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.param-main-label {
    min-width: 0;
    flex: 1;
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
    line-height: 1.2;
}

.param-field {
    margin-top: 8px;
}

.param-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.param-field-row .param-field {
    flex: 1;
    min-width: 0;
}

.param-field-row .param-input-group input {
    width: 100%;
}

.param-sub-label {
    display: block;
    font-size: 0.64rem;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 3px;
}

.param-default-note {
    display: block;
    margin-top: 3px;
    font-size: 0.6rem;
    line-height: 1.25;
    color: #94a3b8;
}

.param-input-group input {
    width: 64px;
    min-width: 0;
    padding: 7px 7px;
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text-primary);
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.78);
    font-variant-numeric: tabular-nums;
}

.param-value-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 0;
}

.param-value-group + .param-value-group {
    border-top: 1px solid rgba(226, 232, 240, 0.72);
}

.param-metric-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.param-metric-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
}

.param-value {
    font-size: 1.08rem;
    font-weight: 900;
    color: #C9920E;
    font-variant-numeric: tabular-nums;
}

#profitLossRatio {
    color: #2563EB;
}

.param-unit {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-secondary);
}

.param-hint {
    display: block;
    font-size: 0.62rem;
    color: #94a3b8;
    margin-top: 5px;
    line-height: 1.35;
}

@media (max-width: 380px) {
    .detail-combo-card {
        padding: 12px;
    }

    .current-price {
        font-size: 1.24rem;
    }

    .rate-badge-value {
        font-size: 0.92rem;
    }

    .params-section-grid {
        grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
        gap: 6px;
    }

    .detail-actions {
        flex: 0 0 auto;
        flex-wrap: nowrap;
    }

    .detail-action-btn {
        min-height: 36px;
    }

}

/* 趋势模块 */
.trend-modules {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.trend-content {
    display: none;
    padding: var(--spacing-md);
}

.trend-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.bounty-submit-wrap {
    margin: 0 var(--spacing-xs) var(--spacing-xl);
}

.bounty-submit-wrap:has(> .bounty-submit-btn.hidden) {
    display: none;
}

.bounty-submit-btn {
    width: 100%;
    min-height: 52px;
    font-size: 1.08rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #FFD700, #FFC300);
    color: #111111;
    box-shadow: 0 8px 20px rgba(255, 195, 0, 0.35);
    letter-spacing: 0.5px;
    margin-top: 0;
}

.bounty-submit-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(255, 195, 0, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.indicators-group {
    margin-bottom: var(--spacing-lg);
}

.indicators-group:last-child {
    margin-bottom: 0;
}

.indicator-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.indicator-title i {
    color: var(--color-info);
}

.indicator-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.indicator-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    border: 2px solid transparent;
}

.indicator-item:active {
    background: #E0E4E8;
}

/* 选中状态 - 明显的高亮效果 */
.indicator-item.checked {
    background: #fff8dc;
    border-color: var(--color-info);
    box-shadow: inset 0 0 0 1px rgba(255, 193, 7, 0.22);
}

.indicator-item.checked .indicator-text {
    color: #9a6700;
    font-weight: 700;
}

.indicator-item.needs-review:not(.checked) {
    background: rgba(241, 245, 249, 0.92);
    border-color: #94a3b8;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.indicator-item.needs-review:not(.checked) .indicator-text {
    color: #64748b;
    font-weight: 600;
}

.indicator-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 14px 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.indicator-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.indicator-diagnostic {
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.indicator-item input[type="checkbox"]:checked {
    background-color: var(--color-info);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    border-color: var(--color-info);
}

.indicator-item input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(255, 193, 7, 0.42);
    outline-offset: 2px;
}

.indicator-item input[type="checkbox"]:disabled {
    cursor: default;
    opacity: 1;
}

.indicator-text {
    font-size: 0.8rem;
    color: var(--text-primary);
    display: inline-block;
    max-width: 7em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    line-height: 1.3;
}

.rate-display {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.rate-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 40px;
}

.rate-bar {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.rate-bar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(148, 163, 184, 0.7);
    z-index: 2;
}

.rate-fill {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
    transition: width 0.5s ease;
}

.rate-fill-negative {
    position: absolute;
    top: 0;
    right: 50%;
    height: 100%;
    background: var(--color-sell);
    border-radius: var(--radius-full) 0 0 var(--radius-full);
    transition: width 0.5s ease;
}

.rate-fill.buy {
    background: var(--color-buy);
}

.rate-fill.sell {
    background: var(--color-sell);
}

.rate-value {
    font-size: 0.95rem;
    font-weight: 700;
    min-width: 48px;
    text-align: right;
}

.rate-value.buy {
    color: var(--color-buy);
}

.rate-value.sell {
    color: var(--color-sell);
}

.rate-value.negative {
    color: var(--color-sell);
}

/* ========================================
   个人中心页 - 移动端优化
   ======================================== */
.sign-in-card {
    margin: 20px 20px 0 20px;
    height: 280px;
    box-sizing: border-box;
    padding: 12px 12px 10px;
    border-radius: 22px;
    background: radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.28) 0%, transparent 28%),
        linear-gradient(135deg, #facc15 0%, #f59e0b 52%, #fb8c00 100%);
    box-shadow: 0 18px 34px rgba(217, 119, 6, 0.22);
    border: 1px solid rgba(255, 237, 213, 0.5);
    overflow: hidden;
}

.invite-reward-card {
    margin: 20px 20px 0 20px;
    padding: 18px 20px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
    border: 1px solid rgba(124, 58, 237, 0.18);
    box-shadow: var(--shadow-sm);
}

.invite-reward-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.invite-reward-title {
    font-size: 1rem;
    font-weight: 800;
    color: #6d28d9;
}

.invite-reward-desc {
    margin-top: 6px;
    font-size: 0.84rem;
    line-height: 1.55;
    color: #4c1d95;
}

.invite-referral-code {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.1);
    color: #5b21b6;
}

.invite-copy-code-btn {
    width: 24px;
    height: 24px;
    margin-left: 2px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.14);
    font-size: 0.72rem;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.invite-copy-code-btn:active {
    transform: scale(0.94);
    background: rgba(124, 58, 237, 0.24);
    color: #5b21b6;
}

.invite-reward-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
    font-size: 1.25rem;
}

.sign-in-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding: 0 4px;
}

.sign-in-card-title {
    font-size: 0.96rem;
    font-weight: 900;
    color: #7c2d12;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.26);
}

.sign-in-card-status {
    margin-top: 3px;
    font-size: 0.78rem;
    color: rgba(124, 45, 18, 0.78);
    font-weight: 700;
}

.sign-in-share-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 36px;
    padding: 6px 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    color: #9a3412;
    font-size: 0.74rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(146, 64, 14, 0.12);
    white-space: nowrap;
    cursor: pointer;
}

.sign-in-calendar {
    display: flex;
    width: 100%;
    min-width: 0;
    gap: 6px;
    overflow-x: auto;
    padding: 1px 2px 6px;
}

.sign-in-day {
    position: relative;
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    min-height: 80px;
    padding: 4px 6px;
    box-sizing: border-box;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 247, 237, 0.9);
    box-shadow: 0 10px 20px rgba(146, 64, 14, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.sign-in-day.today {
    border-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 24px rgba(146, 64, 14, 0.16), inset 0 0 0 1px rgba(251, 146, 60, 0.16);
}

.sign-in-day.checked {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
}

.sign-in-coin {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    box-sizing: border-box;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fbbf24;
    border: 4px solid #fde68a;
    color: #ffffff;
    font-size: 0.7rem;
    line-height: 1;
    font-weight: 900;
    box-shadow: none;
}

.sign-in-coin.checked {
    background: #94a3b8;
    border-color: #cbd5e1;
    font-size: 0.56rem;
    white-space: nowrap;
}

.sign-in-coin.missed {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #94a3b8;
}

.sign-in-coin-action {
    padding: 0;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.sign-in-coin-action:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.sign-in-day-reward {
    margin-top: 0;
    font-size: 0.68rem;
    line-height: 1.35;
    font-weight: 800;
    color: rgba(124, 45, 18, 0.66);
}

.sign-in-day.checked .sign-in-day-reward {
    color: #64748b;
}

.sign-in-day.past:not(.checked) .sign-in-day-reward { color: #94a3b8; }

.strategy-market-period-tabs-slot {
    margin: 8px 0;
}

.strategy-market-period-tabs-slot .detail-market-period-tabs {
    margin-top: 0;
}

.sign-in-card-tip {
    margin: 8px 4px 0;
    font-size: 0.72rem;
    line-height: 1.42;
    color: rgba(124, 45, 18, 0.72);
    font-weight: 700;
}

.profile-header {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.profile-edit-btn {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    border-radius: var(--radius-full);
    padding: 6px 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.profile-edit-btn:active {
    transform: scale(0.95);
}

.profile-avatar-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-info), #E0A800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #212529;
    font-size: 28px;
    box-shadow: var(--shadow-md);
}

.avatar-edit {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 10px;
    box-shadow: var(--shadow-sm);
}

.profile-info {
    flex: 1;
    text-align: left;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-id {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-referral-code {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.profile-referral-code span {
    color: #7c3aed;
    letter-spacing: 0.4px;
}

.profile-wechat-bind-btn {
    margin-top: 10px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    background: #1aad19;
    color: #fff;
    box-shadow: 0 8px 18px rgba(26, 173, 25, 0.22);
}

.profile-wechat-bind-btn i {
    margin-right: 6px;
}

/* 设置列表 */
.settings-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.settings-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    background: var(--bg-input);
}

.settings-list {
    padding: var(--spacing-xs) 0;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    transition: var(--transition-fast);
}

.settings-item.clickable:active {
    background: var(--bg-input);
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.settings-item-left i {
    width: 20px;
    text-align: center;
    color: var(--color-info);
}

.danger-text {
    color: #E74C3C !important;
}

.settings-item i:last-child {
    color: var(--text-muted);
    font-size: 12px;
}

.version-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 开关 */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--color-info);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ========================================
   弹窗 - 移动端优化
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1600;
    animation: fadeIn 0.2s ease;
}

#vipPurchaseModal {
    z-index: 1700;
}

.modal-content {
    width: 100%;
    max-width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    transition: var(--transition-fast);
}

.modal-close:active {
    background: var(--bg-input);
    transform: scale(0.95);
}

.modal-body {
    padding: var(--spacing-lg);
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    padding-bottom: calc(var(--spacing-md) + var(--safe-bottom));
    border-top: 1px solid var(--border-light);
}

.modal-footer .btn {
    flex: 1;
    padding: var(--spacing-md);
    font-size: 1rem;
}

.modal-small .modal-body {
    text-align: center;
}

.burst-alert-modal-content {
    max-width: 520px;
}

.burst-alert-modal-content .modal-header small {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.burst-alert-modal-body {
    display: grid;
    gap: 16px;
}

.burst-alert-access-status {
    padding: 10px 12px;
    border: 1px solid #fde68a;
    border-radius: 12px;
    color: #92400e;
    background: #fffbeb;
    font-size: 0.84rem;
    line-height: 1.45;
}

.burst-alert-period-fieldset,
.burst-alert-signal-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.burst-alert-period-fieldset legend,
.burst-alert-signal-fieldset legend,
.burst-alert-enabled-head strong {
    margin-bottom: 9px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.burst-alert-period-options,
.burst-alert-signal-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.burst-alert-signal-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.burst-alert-period-options label,
.burst-alert-signal-options label {
    position: relative;
    cursor: pointer;
}

.burst-alert-period-options input,
.burst-alert-signal-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.burst-alert-period-options span,
.burst-alert-signal-options span {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    background: var(--bg-input);
    font-size: 0.88rem;
    font-weight: 700;
}

.burst-alert-period-options input:checked + span,
.burst-alert-signal-options input:checked + span {
    border-color: #f4c400;
    color: #7c5700;
    background: #fff7d6;
    box-shadow: inset 0 0 0 1px rgba(244, 196, 0, 0.25);
}

.burst-alert-period-options input:focus-visible + span,
.burst-alert-signal-options input:focus-visible + span {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.burst-alert-period-options input:disabled + span,
.burst-alert-signal-options input:disabled + span {
    cursor: not-allowed;
    opacity: 0.55;
}

.burst-alert-threshold-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.burst-alert-threshold-input {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-input);
}

.burst-alert-threshold-input b {
    color: #d89600;
}

.burst-alert-threshold-input input {
    width: 76px;
    border: 0;
    outline: 0;
    color: var(--text-primary);
    background: transparent;
    font: inherit;
    text-align: center;
}

.burst-alert-threshold-input em {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 600;
}

.burst-alert-explanation {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-secondary);
    background: var(--bg-input);
    font-size: 0.8rem;
    line-height: 1.55;
}

.burst-alert-enabled-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.burst-alert-enabled-head strong {
    margin: 0;
}

.burst-alert-enabled-head span {
    color: #b77900;
    font-size: 0.82rem;
    font-weight: 800;
}

.burst-alert-enabled-list {
    display: grid;
    gap: 8px;
}

.burst-alert-enabled-empty {
    padding: 16px 10px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-align: center;
}

.burst-alert-enabled-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-card);
}

.burst-alert-enabled-item > div {
    min-width: 0;
    flex: 1;
}

.burst-alert-enabled-item strong,
.burst-alert-enabled-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.burst-alert-enabled-item strong {
    color: var(--text-primary);
    font-size: 0.86rem;
}

.burst-alert-enabled-item small {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.burst-alert-enabled-item button {
    flex: none;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    background: #fff7f7;
    font-size: 0.78rem;
    font-weight: 700;
}

.burst-alert-enabled-item button:disabled,
.burst-alert-save-btn:disabled {
    cursor: wait;
    opacity: 0.6;
}

body.dark-mode .burst-alert-access-status {
    border-color: #854d0e;
    color: #fde68a;
    background: rgba(120, 53, 15, 0.35);
}

body.dark-mode .burst-alert-period-options input:checked + span,
body.dark-mode .burst-alert-signal-options input:checked + span {
    border-color: #f4c400;
    color: #fde68a;
    background: rgba(244, 196, 0, 0.16);
}

body.dark-mode .burst-alert-enabled-item button {
    border-color: #7f1d1d;
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.2);
}

.invite-reward-modal-content .modal-header h3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #7c2d12;
}

.invite-modal-hero {
    padding: 10px 4px 2px;
}

.invite-modal-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 14px 28px rgba(236, 72, 153, 0.22);
}

.invite-modal-title {
    font-size: 1.16rem;
    font-weight: 900;
    color: #1f2937;
}

.invite-modal-desc {
    margin: 10px auto 0;
    max-width: 310px;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.58;
}

.invite-modal-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid rgba(251, 146, 60, 0.2);
    font-weight: 800;
}

.bounty-choice {
    position: relative;
    box-sizing: border-box;
    margin: 0 !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.bounty-choice-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.bounty-choice-text {
    display: block;
    width: 100%;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.bounty-mode-choice {
    min-width: 98px;
    min-height: 40px;
    padding: 0 14px !important;
}

.bounty-cycle-choice {
    min-height: 44px;
    padding: 0 8px !important;
}

.auto-calc-plan-submit-progress {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 10px;
    background: rgba(255, 251, 235, 0.9);
}

.auto-calc-plan-submit-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.4;
}

.auto-calc-plan-submit-progress-meta strong {
    flex: 0 0 auto;
    color: #b45309;
    font-size: 0.84rem;
}

.auto-calc-plan-submit-progress-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.16);
}

.auto-calc-plan-submit-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, #f97316);
    transition: width 0.2s ease;
}

.auto-calc-plan-submit-progress[data-state="completed"] {
    border-color: rgba(22, 163, 74, 0.28);
    background: rgba(240, 253, 244, 0.92);
}

.auto-calc-plan-submit-progress[data-state="completed"] .auto-calc-plan-submit-progress-meta strong {
    color: #15803d;
}

.auto-calc-plan-submit-progress[data-state="completed"] .auto-calc-plan-submit-progress-bar {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.auto-calc-plan-submit-progress[data-state="partial"] {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(254, 242, 242, 0.92);
}

.auto-calc-plan-submit-progress[data-state="partial"] .auto-calc-plan-submit-progress-meta strong {
    color: #dc2626;
}

.auto-calc-plan-submit-progress[data-state="partial"] .auto-calc-plan-submit-progress-bar {
    background: linear-gradient(90deg, #f97316, #dc2626);
}

.auto-plan-manager-modal-content {
    max-height: 86vh;
}

.auto-plan-type-filter {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-input);
}

.auto-plan-type-filter label {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
}

.auto-plan-type-filter select {
    width: 100%;
    min-height: 40px;
    padding: 0 34px 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
    outline: none;
}

.auto-plan-type-filter select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.auto-plan-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.auto-plan-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.auto-plan-select-all input,
.auto-plan-card input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    display: inline-grid;
    place-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin: 0;
    border: 2px solid #2563eb;
    border-radius: 7px;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auto-plan-select-all input:checked,
.auto-plan-card input[type="checkbox"]:checked {
    background: #2563eb;
    border-color: #1d4ed8;
}

.auto-plan-select-all input:checked::after,
.auto-plan-card input[type="checkbox"]:checked::after {
    content: "";
    width: 7px;
    height: 12px;
    border: solid #ffffff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) translateY(-1px);
}

.auto-plan-manager-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auto-plan-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding-top: 14px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
}

.auto-plan-pagination button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
}

.auto-plan-pagination button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.auto-plan-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-card);
}

.auto-plan-card input[type="checkbox"] {
    margin-top: 4px;
}

.auto-plan-card-main {
    min-width: 0;
}

.auto-plan-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.auto-plan-stock-name {
    min-width: 0;
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auto-plan-stock-code {
    margin-left: 4px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.auto-plan-type-badge {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.74rem;
    font-weight: 700;
}

.auto-plan-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

.auto-plan-card-meta span {
    min-width: 0;
}

.auto-plan-card-meta strong {
    color: var(--text-primary);
    font-weight: 600;
}

.auto-plan-empty,
.auto-plan-loading,
.auto-plan-error {
    padding: 24px 12px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
}

.auto-plan-error {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
}

body.dark-mode .auto-plan-type-badge {
    background: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
}

.vip-expiry-reminder-modal {
    align-items: center;
    padding: 24px;
}

.vip-expiry-reminder {
    max-width: 360px;
    width: 100%;
    padding: 28px 22px 22px;
    border-radius: 22px;
    text-align: center;
    animation: fadeIn 0.18s ease;
}

.vip-expiry-reminder-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed 0%, #f59e0b 100%);
    color: #fff;
    font-size: 1.55rem;
    box-shadow: 0 14px 28px rgba(124, 58, 237, 0.24);
}

.vip-expiry-reminder-title {
    font-size: 1.1rem;
    line-height: 1.45;
    font-weight: 800;
    color: var(--text-primary);
}

.vip-expiry-reminder-copy {
    margin-top: 12px;
    font-size: 1.175rem;
    line-height: 1.5;
    font-weight: 700;
    color: #e91c9d;
}

.vip-expiry-reminder-message {
    margin: 14px auto 0;
    max-width: 300px;
    color: var(--text-secondary);
    font-size: 0.83rem;
    line-height: 1.65;
}

.vip-expiry-reminder-message p {
    margin: 0;
}

.vip-expiry-reminder-message p + p {
    margin-top: 8px;
}

.vip-expiry-reminder-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 10px;
    margin-top: 22px;
}

.vip-expiry-reminder-actions .btn {
    min-height: 44px;
    border-radius: 999px;
    font-weight: 800;
}

.about-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, var(--color-info), #E0A800);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #212529;
    font-size: 28px;
}

.about-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.about-content > p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.about-features {
    text-align: left;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    color: var(--text-secondary);
}

.about-feature i {
    color: var(--color-sell);
}

/* ========================================
   响应式布局 - 适配更大屏幕
   ======================================== */
@media (min-width: 768px) {
    .page {
        max-width: 720px;
        margin: 0 auto;
        padding-left: var(--spacing-xl);
        padding-right: var(--spacing-xl);
    }

    .data-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }

    .data-card {
        flex-direction: row;
        padding: var(--spacing-lg);
    }

    .card-content {
        align-items: flex-start;
        text-align: left;
    }

    .card-number {
        font-size: 2rem;
    }

    .card-label {
        font-size: 0.875rem;
    }

    .indicator-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .params-section-grid {
        gap: var(--spacing-md);
    }

    .param-card {
        padding: var(--spacing-lg);
    }

    .login-container {
        max-width: 400px;
    }

}

@media (min-width: 1024px) {
    .page {
        max-width: 800px;
    }

    .data-card {
        padding: var(--spacing-xl);
    }

    .indicator-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 平板横屏 */
@media (min-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-width: 480px;
        border-radius: var(--radius-xl);
        margin: auto;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: scale(0.95); }
        to { opacity: 1; transform: scale(1); }
    }

    @keyframes slideUp {
        from { opacity: 0; transform: scale(0.95) translateY(20px); }
        to { opacity: 1; transform: scale(1) translateY(0); }
    }
}

/* 安全区域适配 - iPhone X以上 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .list-footer {
        padding-bottom: 8px;
    }

    .page {
        padding-bottom: calc(var(--spacing-xl) + env(safe-area-inset-bottom));
    }
}

/* ========================================
   深色模式
   ======================================== */
body.dark-mode {
    --text-primary: #E2E8F0;
    --text-secondary: #A0AEC0;
    --text-muted: #718096;

    --bg-main: #1A202C;
    --bg-card: #2D3748;
    --bg-input: #4A5568;

    --border-color: #4A5568;
    --border-light: #3D4852;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-mode .top-nav,
body.dark-mode .page-nav {
    background: rgba(45, 55, 72, 0.95);
    border-bottom-color: var(--border-color);
}

body.dark-mode .login-form {
    background: var(--bg-card);
}

body.dark-mode .phone-input-group,
body.dark-mode .code-input-group {
    background: var(--bg-input);
    border-color: var(--border-color);
}

body.dark-mode .country-code {
    background: var(--bg-card);
    border-right-color: var(--border-color);
}

body.dark-mode .phone-input-group:focus-within,
body.dark-mode .code-input-group:focus-within {
    background: var(--bg-card);
    border-color: var(--color-info);
}

body.dark-mode .data-card {
    background: var(--bg-card);
}

body.dark-mode .watchlist-section,
body.dark-mode .detail-combo-card,
body.dark-mode .stock-header,
body.dark-mode .trend-selector,
body.dark-mode .trend-modules,
body.dark-mode .invite-reward-card,
body.dark-mode .sign-in-card,
body.dark-mode .profile-header,
body.dark-mode .stat-item,
body.dark-mode .settings-section,
body.dark-mode .table-container {
    background: var(--bg-card);
}

body.dark-mode .watchlist-item,
body.dark-mode .indicator-item,
body.dark-mode .rate-display {
    background: var(--bg-input);
}

body.dark-mode .detail-combo-card .stock-header {
    background: transparent;
}

body.dark-mode .watchlist-item:active {
    background: #5A6577;
}

body.dark-mode .indicator-item:active {
    background: #5A6577;
}

body.dark-mode .indicator-item.needs-review:not(.checked) {
    background: rgba(51, 65, 85, 0.88);
    border-color: #94a3b8;
    box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.16);
}

body.dark-mode .indicator-item.needs-review:not(.checked) .indicator-text {
    color: #cbd5e1;
}

body.dark-mode .stock-table th {
    background: var(--bg-input);
}

body.dark-mode .stock-card {
    background: rgba(17, 24, 39, 0.92);
    border-color: rgba(71, 85, 105, 0.8);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

body.dark-mode .stock-card:active {
    background: rgba(30, 41, 59, 0.96);
}

body.dark-mode .stock-card.needs-review {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.96), rgba(30, 41, 59, 0.94));
    border-color: rgba(148, 163, 184, 0.9);
    box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.14), 0 8px 18px rgba(0, 0, 0, 0.2);
}

body.dark-mode .stock-card-metric.position {
    color: #a78bfa;
}

body.dark-mode .stock-card-metric.trend-stage,
body.dark-mode .stock-trend-text {
    color: #fbbf24;
}

body.dark-mode .stock-trend-text.up {
    color: #f87171;
}

body.dark-mode .stock-trend-text.sideways {
    color: #c084fc;
}

body.dark-mode .stock-trend-text.down {
    color: #4ade80;
}

body.dark-mode .stock-table tbody tr:active {
    background: var(--bg-input);
}

@media (max-width: 640px) {
    .stock-table {
        min-width: 0;
    }

    .stock-card {
        padding: 6px 8px 6px;
    }

    .stock-card-top {
        gap: 6px;
    }

    .stock-card-line {
        column-gap: 7px;
    }

    .stock-card-metric {
        font-size: 0.76rem;
    }
}

.vip-hero {
    margin: 18px 12px 12px;
    padding: 18px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 42%, #a855f7 100%);
    color: #fff;
    box-shadow: 0 18px 34px rgba(91, 33, 182, 0.24);
}

.vip-hero-refresh {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease;
}

.vip-hero-refresh:active {
    transform: scale(0.92);
}

.vip-hero-refresh:disabled {
    cursor: wait;
    opacity: 0.7;
}

.vip-hero-refresh.is-refreshing i {
    animation: vip-hero-refresh-spin 0.8s linear infinite;
}

@keyframes vip-hero-refresh-spin {
    to { transform: rotate(360deg); }
}

.vip-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.vip-hero-heading,
.vip-hero-title-group {
    display: flex;
    align-items: center;
}

.vip-hero-heading {
    justify-content: space-between;
    gap: 12px;
}

.vip-hero-title-group {
    min-width: 0;
    gap: 8px;
}

.vip-hero h3 {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.2;
    white-space: nowrap;
}

.vip-hero p {
    margin-top: 8px;
    font-size: 0.82rem;
    opacity: 0.92;
}

.vip-hero-note {
    display: grid;
    gap: 3px;
    line-height: 1.42;
}

.vip-hero-note span {
    display: block;
}

.vip-card-distribution {
    margin-top: 14px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.vip-distribution-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.76rem;
    font-weight: 800;
}

.vip-distribution-total {
    opacity: 0.82;
    font-variant-numeric: tabular-nums;
}

.vip-distribution-bar {
    display: flex;
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.vip-distribution-segment {
    min-width: 0;
    height: 100%;
    transition: width 0.25s ease;
}

.vip-distribution-segment.red {
    background: #fb2f68;
}

.vip-distribution-segment.yellow {
    background: #facc15;
}

.vip-distribution-segment.white {
    background: #ffffff;
}

.vip-distribution-segment.green {
    background: #10b981;
}

.vip-distribution-legend {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    margin-top: 8px;
}

.vip-distribution-item {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    font-size: 0.64rem;
    font-weight: 800;
    white-space: nowrap;
}

.vip-distribution-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.44);
}

.vip-distribution-dot.red {
    background: #fb2f68;
}

.vip-distribution-dot.yellow {
    background: #facc15;
}

.vip-distribution-dot.white {
    background: #ffffff;
}

.vip-distribution-dot.green {
    background: #10b981;
}

.vip-distribution-empty {
    font-size: 0.74rem;
    font-weight: 700;
    opacity: 0.82;
}

.vip-card-filters {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.vip-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 800;
    opacity: 0.9;
}

.vip-filter-head span:last-child {
    opacity: 0.76;
    font-weight: 700;
}

.vip-filter-group {
    display: grid;
    gap: 6px;
}

.vip-filter-label {
    font-size: 0.68rem;
    font-weight: 800;
    opacity: 0.82;
}

.vip-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vip-filter-chip {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.vip-filter-chip:active {
    transform: scale(0.98);
}

.vip-filter-chip.active {
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.vip-filter-chip.inactive {
    opacity: 0.45;
    background: rgba(255, 255, 255, 0.08);
}

.vip-filter-chip-red.active {
    border-color: rgba(251, 47, 104, 0.5);
    background: rgba(251, 47, 104, 0.22);
}

.vip-filter-chip-yellow.active {
    border-color: rgba(250, 204, 21, 0.55);
    background: rgba(250, 204, 21, 0.22);
    color: #fffdf2;
}

.vip-filter-chip-white.active {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.18);
}

.vip-filter-chip-green.active {
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.22);
}

.vip-filter-chip-up.active,
.vip-filter-chip-sideways.active,
.vip-filter-chip-down.active {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
}

.vip-filter-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.44);
}

.vip-filter-dot.red {
    background: #fb2f68;
}

.vip-filter-dot.yellow {
    background: #facc15;
}

.vip-filter-dot.white {
    background: #ffffff;
}

.vip-filter-dot.green {
    background: #10b981;
}

.vip-list-section {
    margin: 0 12px 16px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.86);
    box-shadow: var(--shadow-sm);
}

.vip-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
}

.vip-list-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
    padding: 3px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.14);
}

.vip-list-tab {
    border: none;
    border-radius: 10px;
    padding: 7px 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.vip-list-tab.active {
    background: #ffffff;
    color: #6d28d9;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
}

.vip-stock-list {
    display: grid;
    gap: 8px;
}

.vip-stock-card {
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.08), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(124, 58, 237, 0.14);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.vip-stock-card.high-sell {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(236, 253, 245, 0.94));
    border-color: rgba(16, 185, 129, 0.26);
}

.vip-stock-card.strong-buy {
    background: linear-gradient(135deg, rgba(255, 45, 122, 0.36) 0%, rgba(244, 63, 148, 0.22) 46%, rgba(255, 245, 248, 0.98) 100%);
    border: 2px solid rgba(250, 204, 21, 0.96);
    box-shadow: 0 12px 28px rgba(225, 29, 72, 0.20), 0 0 22px rgba(250, 204, 21, 0.28), inset 0 0 0 1px rgba(254, 240, 138, 0.86);
}

.vip-stock-card.strong-buy.gold-edge {
    border-color: #facc15;
    box-shadow: 0 12px 28px rgba(225, 29, 72, 0.24), 0 0 0 1px rgba(161, 98, 7, 0.16), 0 0 26px rgba(250, 204, 21, 0.38), inset 0 0 0 1px rgba(254, 240, 138, 0.95);
}

.vip-stock-card.yellow-buy.yellow-edge {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.46) 0%, rgba(254, 240, 138, 0.34) 48%, rgba(255, 251, 235, 0.98) 100%);
    border: 2px solid #eab308;
    box-shadow: 0 12px 28px rgba(202, 138, 4, 0.18), 0 0 24px rgba(250, 204, 21, 0.32), inset 0 0 0 1px rgba(254, 249, 195, 0.92);
}

.vip-stock-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.vip-stock-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.vip-stock-name {
    min-width: 0;
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vip-trend-badge {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
}

.vip-trend-badge.up {
    color: #dc2626;
    background: rgba(254, 226, 226, 0.9);
}

.vip-trend-badge.sideways {
    color: #7c3aed;
    background: rgba(237, 233, 254, 0.95);
}

.vip-trend-badge.down {
    color: #2563eb;
    background: rgba(219, 234, 254, 0.95);
}

.vip-trend-badge.pending {
    color: #64748b;
    background: rgba(241, 245, 249, 0.95);
}

.vip-realtime-change {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.vip-realtime-change.positive {
    color: #dc2626;
    background: rgba(254, 226, 226, 0.92);
    border: 1px solid rgba(248, 113, 113, 0.22);
}

.vip-realtime-change.negative {
    color: #16a34a;
    background: rgba(220, 252, 231, 0.94);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.vip-realtime-change.flat {
    color: #0f766e;
    background: rgba(204, 251, 241, 0.95);
    border: 1px solid rgba(20, 184, 166, 0.18);
}

.vip-stock-rate {
    font-size: 0.95rem;
    font-weight: 800;
    color: #e11d48;
    white-space: nowrap;
}

.vip-stock-sub {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.vip-stock-sell {
    color: #16a34a;
    font-weight: 800;
}

.vip-stock-position {
    color: #7c3aed;
    font-weight: 800;
}

.vip-stock-trend-stage {
    color: var(--color-buy);
    font-weight: 800;
}

.vip-empty {
    padding: 18px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.86rem;
}

#vipPage {
    padding-top: 88px;
    padding-bottom: 72px;
}

#vipPage .vip-hero {
    margin-top: 18px;
}

@media (max-width: 640px) {
    #vipPage {
        padding-bottom: 80px;
    }

    .vip-hero {
        margin: 18px 10px 10px;
        padding: 16px 14px;
    }

    .vip-list-section {
        margin: 0 10px 14px;
        padding: 12px;
    }
}

body.dark-mode .settings-title {
    background: var(--bg-input);
}

body.dark-mode .settings-item.clickable:active {
    background: var(--bg-input);
}

body.dark-mode .sign-in-card {
    border-color: rgba(148, 163, 184, 0.16);
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
}

body.dark-mode .sign-in-card-title {
    color: #fbbf24;
}

body.dark-mode .sign-in-card-status,
body.dark-mode .sign-in-card-tip {
    color: #cbd5e1;
}

body.dark-mode .sign-in-day {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.16);
}

body.dark-mode .sign-in-day.today {
    border-color: rgba(251, 191, 36, 0.5);
}

body.dark-mode .sign-in-day-reward {
    color: #e2e8f0;
}

body.dark-mode .sign-in-day.checked .sign-in-day-reward {
    color: #94a3b8;
}

body.dark-mode .sign-in-day.checked {
    background: rgba(71, 85, 105, 0.65);
    border-color: rgba(148, 163, 184, 0.36);
}

body.dark-mode .sign-in-coin.checked {
    background: #64748b;
    border-color: #94a3b8;
}

body.dark-mode .sign-in-coin.missed {
    background: #1e293b;
    border-color: #475569;
    color: #64748b;
}

body.dark-mode .list-footer {
    background: rgba(45, 55, 72, 0.98);
}

body.dark-mode .bottom-nav {
    background: rgba(45, 55, 72, 0.96);
    border-top-color: var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .bottom-nav-item {
    color: #9FB0C3;
}

body.dark-mode .bottom-nav-item.active {
    color: #FFD24A;
}

body.dark-mode .bottom-nav-item:active {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .modal-content {
    background: var(--bg-card);
}

body.dark-mode .modal-header {
    border-bottom-color: var(--border-color);
}

body.dark-mode .modal-footer {
    border-top-color: var(--border-color);
}

body.dark-mode .modal-close:active {
    background: var(--bg-input);
}

body.dark-mode .back-btn,
body.dark-mode .star-btn {
    background: var(--bg-card);
}

body.dark-mode .back-btn:active,
body.dark-mode .star-btn:active {
    background: var(--bg-input);
}

body.dark-mode .param-card.input-param {
    background: linear-gradient(135deg, #2D3A2D, #2A362A);
}

body.dark-mode .param-card.calc-param {
    background: linear-gradient(135deg, #3A3520, #363020);
}

body.dark-mode .param-input-group input {
    background: var(--bg-input);
    color: var(--text-primary);
}

body.dark-mode .select-wrapper select {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .indicator-item.checked {
    background: rgba(255, 193, 7, 0.18);
    border-color: #facc15;
}

body.dark-mode .indicator-item.checked .indicator-text {
    color: #fde68a;
}

body.dark-mode .indicator-item input[type="checkbox"] {
    border-color: #64748b;
    background: #1f2937;
}

body.dark-mode .indicator-item input[type="checkbox"]:checked {
    border-color: #facc15;
    background-color: #facc15;
}

body.dark-mode .avatar-circle {
    background: linear-gradient(135deg, var(--color-info), #7BA3C4);
}

body.dark-mode .avatar-edit {
    background: var(--bg-card);
}

body.dark-mode .about-logo {
    background: linear-gradient(135deg, var(--color-info), #7BA3C4);
}

body.dark-mode .toast {
    background: rgba(45, 55, 72, 0.95) !important;
}

body.dark-mode .table-checkbox,
body.dark-mode .select-all input {
    background: var(--bg-input);
    border-color: var(--border-color);
}

body.dark-mode .table-checkbox:checked,
body.dark-mode .select-all input:checked {
    background: var(--color-info);
    border-color: var(--color-info);
}

/* ========================================
   分组相关样式
   ======================================== */
.group-tabs {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.group-tabs::-webkit-scrollbar {
    display: none;
}

.group-tab {
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    transition: var(--transition-fast);
    cursor: pointer;
}

.group-tab:active {
    transform: scale(0.95);
}

.group-tab.active {
    background: var(--color-info);
    border-color: var(--color-info);
    color: #212529;
}

.stock-list-search {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: 0 var(--spacing-md) var(--spacing-sm);
    padding: 0 var(--spacing-md);
    min-height: 42px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.stock-list-search i {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex: 0 0 auto;
}

.stock-list-search input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 40px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.stock-list-search input::placeholder {
    color: var(--text-muted);
}

.stock-list-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: pointer;
}

.stock-list-search-clear:active {
    transform: scale(0.95);
}

body.dark-mode .stock-list-search {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.dark-mode .stock-list-search-clear {
    background: var(--bg-input);
    color: var(--text-secondary);
}

.group-selection-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.group-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.group-option:active {
    background: #E8E4E0;
    transform: scale(0.99);
}

.group-option.selected {
    border: 2px solid #FFC107;
    background: #FFF9E6;
}

.group-option.selected .group-option-name {
    color: #FFC107;
    font-weight: 700;
}

.group-option.selected input[type="checkbox"] {
    accent-color: #FFC107;
}

.group-option-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.group-option-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.group-rename-btn,
.group-delete-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    color: var(--text-secondary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.group-rename-btn i,
.group-delete-btn i {
    pointer-events: none;
}

.group-rename-btn:hover {
    background: rgba(91, 143, 185, 0.15);
    color: #5B8FB9;
}

.group-delete-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.group-rename-btn:active,
.group-delete-btn:active {
    transform: scale(0.9);
}

.group-option input[type="radio"],
.group-option input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--color-info);
    cursor: pointer;
}

.group-option input[type="checkbox"] {
    margin-left: 4px;
}

.btn-info {
    background: #5B8FB9;
    color: white;
}

.btn-info:active {
    transform: scale(0.98);
    opacity: 0.9;
}

body.dark-mode .group-tabs {
    background: var(--bg-card);
}

body.dark-mode .group-tab {
    background: var(--bg-input);
    border-color: var(--border-color);
}

body.dark-mode .group-tab.active {
    background: var(--color-info);
    border-color: var(--color-info);
}

body.dark-mode .group-option {
    background: var(--bg-input);
}

body.dark-mode .group-option:active {
    background: #5A6577;
}

/* 股票选择列表样式 */
.stock-select-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.stock-select-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.stock-select-item:last-child {
    border-bottom: none;
}

.stock-select-item:hover {
    background: var(--bg-hover);
}

.stock-select-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stock-select-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.stock-select-code {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.stock-select-add {
    padding: 6px 16px;
    background: rgba(255, 200, 0, 0.15);
    color: var(--color-primary);
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.stock-select-add:hover {
    background: rgba(255, 200, 0, 0.25);
}

.stock-select-add.added {
    background: var(--color-success);
    color: white;
}

/* 深色模式适配 */
body.dark-mode .stock-select-list {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.dark-mode .stock-select-item:hover {
    background: var(--bg-hover);
}

/* ========================================
   股票显示区域 - 新样式
   ======================================== */
.dashboard-market-strip {
    display: flex;
    gap: 7px;
    min-height: 68px;
    margin: 2px 0 8px;
    padding: 1px 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    touch-action: pan-x;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-market-strip::-webkit-scrollbar {
    display: none;
}

.dashboard-market-item {
    display: flex;
    flex: 0 0 28%;
    min-width: 0;
    min-height: 66px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    padding: 7px 5px 6px;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid #e5eaf1;
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    cursor: pointer;
    font: inherit;
    box-shadow: 0 3px 10px rgba(30, 41, 59, 0.06);
    -webkit-tap-highlight-color: transparent;
}

.dashboard-market-item.up {
    border-color: rgba(239, 68, 68, 0.16);
}

.dashboard-market-item.down {
    border-color: rgba(22, 163, 74, 0.16);
}

.dashboard-market-item:active {
    transform: translateY(1px);
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.06);
}

.dashboard-market-item:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: -3px;
}

.dashboard-market-name {
    color: #68758a;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.dashboard-market-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 3px;
    line-height: 1.05;
    white-space: nowrap;
}

.dashboard-market-value,
.dashboard-market-change {
    color: #475569;
    font-variant-numeric: tabular-nums;
}

.dashboard-market-value {
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: -0.015em;
}

.dashboard-market-change {
    min-width: 42px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.56rem;
    font-weight: 700;
    line-height: 1.15;
}

.dashboard-market-item.up .dashboard-market-value,
.dashboard-market-item.up .dashboard-market-change {
    color: #ef4444;
}

.dashboard-market-item.up .dashboard-market-change {
    background: rgba(239, 68, 68, 0.09);
}

.dashboard-market-item.down .dashboard-market-value,
.dashboard-market-item.down .dashboard-market-change {
    color: #16a34a;
}

.dashboard-market-item.down .dashboard-market-change {
    background: rgba(22, 163, 74, 0.09);
}

body.dark-mode .dashboard-market-strip {
    background: transparent;
}

body.dark-mode .dashboard-market-item {
    border-color: rgba(71, 85, 105, 0.72);
    background: #172033;
    box-shadow: 0 3px 10px rgba(2, 6, 23, 0.2);
}

body.dark-mode .dashboard-market-item.up {
    border-color: rgba(248, 113, 113, 0.22);
}

body.dark-mode .dashboard-market-item.down {
    border-color: rgba(74, 222, 128, 0.22);
}

body.dark-mode .dashboard-market-name {
    color: #94a3b8;
}

body.dark-mode .dashboard-market-value,
body.dark-mode .dashboard-market-change {
    color: #cbd5e1;
}

body.dark-mode .dashboard-market-change {
    background: rgba(148, 163, 184, 0.12);
}

body.dark-mode .dashboard-market-item.up .dashboard-market-value,
body.dark-mode .dashboard-market-item.up .dashboard-market-change {
    color: #f87171;
}

body.dark-mode .dashboard-market-item.up .dashboard-market-change {
    background: rgba(248, 113, 113, 0.14);
}

body.dark-mode .dashboard-market-item.down .dashboard-market-value,
body.dark-mode .dashboard-market-item.down .dashboard-market-change {
    color: #4ade80;
}

body.dark-mode .dashboard-market-item.down .dashboard-market-change {
    background: rgba(74, 222, 128, 0.14);
}

body.dark-mode .dashboard-market-item:active {
    transform: translateY(1px);
}

.stock-sections-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 2px 0 18px;
    padding: 0;
    width: 100%;
}

.stock-display-section {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.78);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
    min-width: 0;
}

.stock-display-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 14px;
    right: 14px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    opacity: 0.9;
}

.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dashboard-section-header .section-title-strong {
    margin-bottom: 0;
    min-width: 0;
}

.dashboard-section-more {
    flex: 0 0 auto;
    padding: 4px 10px;
    font-size: 0.8rem;
}

.dashboard-watchlist-section {
    margin: 18px 0;
}

.dashboard-watchlist-section::before {
    background: linear-gradient(90deg, #f59e0b, #facc15);
}

.dashboard-watchlist-list,
.dashboard-my-orders-list {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
}

.dashboard-watchlist-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 204px;
}

.dashboard-watchlist-list::-webkit-scrollbar,
.dashboard-my-orders-list::-webkit-scrollbar {
    width: 4px;
}

.dashboard-watchlist-list::-webkit-scrollbar-thumb,
.dashboard-my-orders-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
}

.dashboard-watchlist-item {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(68px, 0.7fr) minmax(112px, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #1e293b;
    background: #f8fafc;
    text-align: left;
}

.dashboard-watchlist-item:active {
    transform: scale(0.995);
    background: #f1f5f9;
}

.dashboard-watchlist-item.loading {
    opacity: 0.62;
}

/* A homepage snapshot is readable immediately, but never an editable record. */
#detailPage.dashboard-detail-preview .detail-actions,
#detailPage.dashboard-detail-preview .params-section,
#detailPage.dashboard-detail-preview .risk-model-summary,
#detailPage.dashboard-detail-preview .trend-selector,
#detailPage.dashboard-detail-preview .trend-modules,
#detailPage.dashboard-detail-preview .detail-calculation-actions,
#detailPage.dashboard-detail-preview #bountySubmitWrap {
    display: none !important;
}
#detailPage.dashboard-detail-chart-pending #detailMarketChart > * {
    display: none;
}
#detailPage.dashboard-detail-chart-pending #detailMarketChart::before {
    content: '行情加载中……';
    display: block;
    padding: 48px 16px;
    color: #56677c;
    text-align: center;
}
.detail-snapshot-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #f5f9fd;
    color: #56677c;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.detail-snapshot-status button {
    flex: none;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #c6d5e5;
    border-radius: 8px;
    background: #fff;
    color: #365b83;
    font: inherit;
    touch-action: manipulation;
}

.dashboard-watchlist-identity,
.dashboard-watchlist-quote {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dashboard-watchlist-identity strong,
.dashboard-watchlist-quote strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.82rem;
    font-weight: 700;
}

.dashboard-watchlist-identity small,
.dashboard-watchlist-quote small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
}

.dashboard-watchlist-quote {
    align-items: flex-end;
}

.dashboard-watchlist-quote.up strong {
    color: #ef4444;
}

.dashboard-watchlist-quote.down strong {
    color: #10b981;
}

.dashboard-watchlist-rates {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

.dashboard-watchlist-rates span {
    min-width: 0;
    padding: 3px 2px;
    overflow: hidden;
    border-radius: 7px;
    white-space: nowrap;
    text-align: center;
    text-overflow: ellipsis;
    font-size: 0.66rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dashboard-watchlist-rates .buy {
    color: #ef4444;
    background: #fef2f2;
}

.dashboard-watchlist-rates .sell {
    color: #10b981;
    background: #ecfdf5;
}

.dashboard-list-message {
    padding: 22px 10px;
    color: #94a3b8;
    text-align: center;
    font-size: 0.8rem;
}

.dashboard-list-message.error {
    color: #ef4444;
}

.dashboard-my-orders-section {
    margin: 18px 0;
}

.dashboard-my-orders-list {
    max-height: 194px;
}

.dashboard-my-order-head,
.dashboard-my-order-status-line {
    display: flex;
    align-items: center;
}

.dashboard-my-order-head {
    justify-content: space-between;
    gap: 8px;
}

.dashboard-my-order-status-line {
    flex: 0 0 auto;
    gap: 6px;
}

.dashboard-my-order-date {
    color: #64748b;
    white-space: nowrap;
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
}

.dashboard-my-order-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-top: 5px;
}

.dashboard-my-order-metric {
    min-width: 0;
    padding: 3px 2px;
    overflow: hidden;
    border-radius: 8px;
    white-space: nowrap;
    text-align: center;
    text-overflow: ellipsis;
    font-size: clamp(0.58rem, 2.45vw, 0.72rem);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.dashboard-my-order-metric.buy {
    color: #ef4444;
    background: #fef2f2;
}

.dashboard-my-order-metric.sell {
    color: #10b981;
    background: #ecfdf5;
}

.dashboard-my-order-metric.stage {
    color: #2563eb;
    background: #eff6ff;
}

.dashboard-my-order-metric.position {
    color: #7c3aed;
    background: #f5f3ff;
}

#strongStocksSection {
    background: #fff7f7;
}

#strongStocksSection::before {
    background: linear-gradient(90deg, #ef4444, #f59e0b);
}

#sellStocksSection {
    background: #f4fffb;
}

#sellStocksSection::before {
    background: linear-gradient(90deg, #14b8a6, #22c55e);
}

.stock-count {
    font-size: 0.85rem;
    font-weight: 400;
    color: #999;
    margin-left: 4px;
}

.dashboard-bounty-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 247, 237, 0.92);
    color: #92400e;
    font-size: 0.74rem;
    line-height: 1.2;
    white-space: nowrap;
}

.dashboard-bounty-stats strong {
    color: #ea580c;
    font-size: 0.82rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.dashboard-bounty-stats-divider {
    width: 1px;
    height: 12px;
    background: rgba(251, 146, 60, 0.45);
    flex: 0 0 auto;
}

.section-title-strong {
    position: relative;
    font-size: 1rem;
    font-weight: 700;
    color: #F06543;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.section-title-sell {
    position: relative;
    font-size: 1rem;
    font-weight: 700;
    color: #7E9F6B;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.stock-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    height: auto;
    overflow: hidden;
    position: relative;
}

.stock-list .stock-item {
    animation: fadeInUp 0.3s ease-in-out;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.72);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 7px 14px rgba(15, 23, 42, 0.05);
    padding: 0 10px;
}

.dashboard-promo-section {
    margin: 18px 0 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
}

.dashboard-promo-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 86px;
    padding: 14px 13px;
    border-radius: 16px;
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.dashboard-promo-card[data-promo="vip"] {
    grid-column: span 2;
}

.dashboard-promo-card[data-promo="signin"],
.dashboard-promo-card[data-promo="invite"] {
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 11px 9px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
}

.dashboard-promo-card.signing {
    pointer-events: none;
    filter: saturate(0.92) brightness(0.98);
}

.dashboard-promo-card.signin-success {
    animation: dashboardSignInCardPop 0.72s ease both;
}

.dashboard-promo-card[data-promo="vip"] {
    background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 58%, #a855f7 100%);
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.2);
}

.dashboard-promo-card[data-promo="signin"] {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.dashboard-promo-card[data-promo="invite"] {
    background: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
    box-shadow: 0 14px 30px rgba(236, 72, 153, 0.18);
}

.dashboard-promo-title {
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.2;
}

.dashboard-promo-title.has-red-packet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dashboard-vip-red-packet {
    width: 20px;
    height: 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fde68a;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 58%, #b91c1c 100%);
    border: 1px solid rgba(254, 240, 138, 0.86);
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.16), 0 6px 14px rgba(127, 29, 29, 0.26);
    font-size: 0.68rem;
    line-height: 1;
    transform-origin: 50% 70%;
    animation: dashboardVipRedPacketWiggle 1.8s ease-in-out infinite;
}

.dashboard-promo-card[data-promo="signin"] .dashboard-promo-title,
.dashboard-promo-card[data-promo="invite"] .dashboard-promo-title {
    font-size: 0.82rem;
    letter-spacing: -0.02em;
}

.dashboard-promo-subtitle {
    margin-top: 6px;
    font-size: 0.74rem;
    opacity: 0.92;
    line-height: 1.35;
}

.dashboard-promo-card[data-promo="signin"] .dashboard-promo-subtitle,
.dashboard-promo-card[data-promo="invite"] .dashboard-promo-subtitle {
    margin-top: 4px;
    font-size: 0.62rem;
    line-height: 1.22;
    letter-spacing: -0.03em;
}

.dashboard-promo-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.dashboard-promo-card[data-promo="signin"] .dashboard-promo-icon,
.dashboard-promo-card[data-promo="invite"] .dashboard-promo-icon {
    align-self: flex-end;
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
}

.dashboard-signin-success-burst {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.34) 0%, rgba(251, 191, 36, 0.24) 34%, rgba(217, 119, 6, 0.08) 72%);
    backdrop-filter: blur(1px);
    pointer-events: none;
    animation: dashboardSignInBurst 1.5s ease both;
    z-index: 2;
}

.dashboard-signin-success-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    color: #f59e0b;
    font-size: 1rem;
    box-shadow: 0 10px 24px rgba(120, 53, 15, 0.22);
    animation: dashboardSignInCheckPop 0.55s cubic-bezier(0.2, 1.35, 0.32, 1) both;
}

.dashboard-signin-success-text {
    font-size: 0.86rem;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(120, 53, 15, 0.28);
    animation: dashboardSignInTextRise 1.2s ease both;
}

@keyframes dashboardSignInCardPop {
    0% { transform: scale(1); }
    36% { transform: scale(1.035); box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28); }
    100% { transform: scale(1); }
}

@keyframes dashboardSignInBurst {
    0% { opacity: 0; transform: scale(0.92); }
    18% { opacity: 1; transform: scale(1); }
    72% { opacity: 1; }
    100% { opacity: 0; transform: scale(1.08); }
}

@keyframes dashboardSignInCheckPop {
    0% { opacity: 0; transform: scale(0.3) rotate(-18deg); }
    70% { opacity: 1; transform: scale(1.08) rotate(0deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes dashboardSignInTextRise {
    0% { opacity: 0; transform: translateY(10px); }
    20% { opacity: 1; transform: translateY(0); }
    78% { opacity: 1; transform: translateY(-2px); }
    100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes dashboardVipRedPacketWiggle {
    0%, 74%, 100% { transform: rotate(0deg) scale(1); }
    80% { transform: rotate(-8deg) scale(1.08); }
    86% { transform: rotate(7deg) scale(1.08); }
    92% { transform: rotate(-4deg) scale(1.04); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 36px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
    gap: var(--spacing-sm);
    width: 100%;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.04);
}

.stock-item:active {
    background: rgba(255, 255, 255, 0.86);
    transform: scale(0.99);
}

.stock-item .stock-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.stock-rate {
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.stock-rate.buy-rate {
    color: var(--color-buy);
}

.stock-rate.sell-rate {
    color: var(--color-sell);
}

.empty-stocks {
    text-align: center;
    padding: var(--spacing-md);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 深色模式适配 */
body.dark-mode .stock-display-section {
    background: var(--bg-card);
}

body.dark-mode .dashboard-watchlist-item {
    border-color: #4a5568;
    color: #e2e8f0;
    background: #2d3748;
}

body.dark-mode .dashboard-watchlist-item:active {
    background: #364153;
}

body.dark-mode .dashboard-watchlist-rates .buy,
body.dark-mode .dashboard-my-order-metric.buy {
    background: #3f1f1f;
}

body.dark-mode .dashboard-watchlist-rates .sell,
body.dark-mode .dashboard-my-order-metric.sell {
    background: #1f3a2d;
}

body.dark-mode .dashboard-my-order-metric.stage {
    background: #1e3a5f;
}

body.dark-mode .dashboard-my-order-metric.position {
    background: #3a2a5f;
}

body.dark-mode .dashboard-my-order-date {
    color: #a0aec0;
}

body.dark-mode .dashboard-bounty-stats {
    background: rgba(120, 53, 15, 0.28);
    color: #fed7aa;
}

body.dark-mode .dashboard-bounty-stats strong {
    color: #fdba74;
}

body.dark-mode .stock-item {
    background: var(--bg-input);
}

body.dark-mode .stock-item:active {
    background: #5A6577;
}

/* VIP套餐网格 */
.vip-plans-grid {
    display: block;
    margin-bottom: 20px;
}

.vip-purchase-modal-content {
    max-width: 600px;
}

.vip-purchase-body {
    padding: 18px;
}

.vip-plan-type-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.vip-plan-type-card {
    min-width: 0;
    min-height: 66px;
    padding: 10px 8px;
    border: 1.5px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transition: var(--transition-fast);
}

.vip-plan-type-card:disabled {
    cursor: default;
    opacity: 0.72;
}

.vip-plan-type-card.active {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.22);
}

.vip-plan-type-card.svip.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #5b21b6 100%);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.22);
}

.vip-plan-type-card.vip.active {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    box-shadow: 0 12px 24px rgba(180, 83, 9, 0.22);
}

.vip-plan-type-card.trial.active {
    background: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.2);
}

.vip-plan-type-main,
.vip-plan-type-sub {
    display: block;
    min-width: 0;
}

.vip-plan-type-main {
    font-size: 0.78rem;
    line-height: 1.18;
    font-weight: 900;
}

.vip-plan-type-main i {
    margin-right: 5px;
}

.vip-plan-type-sub {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1.18;
}

.vip-plan-type-card.active .vip-plan-type-sub {
    color: rgba(255, 255, 255, 0.82);
}

.vip-privilege-panel {
    padding: 18px;
    border-radius: 18px;
    color: white;
    margin-bottom: 18px;
    background: radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.22) 0%, transparent 28%),
        linear-gradient(135deg, #7C3AED 0%, #4C1D95 100%);
    box-shadow: 0 16px 34px rgba(76, 29, 149, 0.22);
}

.vip-privilege-panel[data-vip-privilege-type="svip"] {
    background: radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.22) 0%, transparent 28%),
        linear-gradient(135deg, #7C3AED 0%, #4C1D95 100%);
}

.vip-privilege-panel[data-vip-privilege-type="vip"] {
    background: radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 28%),
        linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    box-shadow: 0 16px 34px rgba(180, 83, 9, 0.2);
}

.vip-privilege-panel[data-vip-privilege-type="trial"] {
    background: radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 28%),
        linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
    box-shadow: 0 16px 34px rgba(236, 72, 153, 0.16);
}

.vip-privilege-panel h4 {
    margin-bottom: 12px;
    font-size: 1.12rem;
    font-weight: 900;
}

.vip-privilege-panel ul {
    display: grid;
    gap: 8px;
    font-size: 0.9rem;
    opacity: 0.95;
    list-style: none;
    padding-left: 0;
}

.vip-privilege-panel li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.42;
}

.vip-privilege-panel li i {
    color: #FBBF24;
    margin-top: 2px;
}

.vip-plan-section-title {
    margin-bottom: 12px;
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 900;
}

.vip-plans-layout {
    display: grid;
    gap: 12px;
}

.vip-plan-tier-block {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.14fr) minmax(104px, 0.86fr);
    gap: 10px;
    padding-top: 16px;
}

.vip-plan-tier-label {
    position: absolute;
    top: 0;
    left: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
    box-shadow: 0 7px 16px rgba(76, 29, 149, 0.16);
}

.vip-plan-tier-block.svip .vip-plan-tier-label {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}

.vip-plan-stack {
    display: grid;
    gap: 8px;
}

.vip-plan-card {
    border: 1.5px solid rgba(226, 232, 240, 0.94);
    border-radius: 16px;
    padding: 13px 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background: var(--bg-card);
    min-height: 0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.vip-plan-card.featured {
    min-height: 214px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-color: rgba(124, 58, 237, 0.28);
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}

.vip-plan-tier-block.svip .vip-plan-card.featured {
    border-color: rgba(245, 158, 11, 0.34);
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
}

.vip-plan-card.compact {
    min-height: 103px;
    padding: 9px 7px;
}

.vip-plan-card.trial {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    text-align: left;
    padding: 14px 16px;
    border-color: rgba(245, 158, 11, 0.36);
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
}

.vip-plan-trial-block {
    display: grid;
    gap: 10px;
    margin-top: 2px;
}

.vip-plan-empty {
    padding: 24px 12px;
    border-radius: 16px;
    text-align: center;
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.08);
}

.vip-plan-card:active {
    border-color: #7C3AED;
    background: #F5F3FF;
}

.vip-plan-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.vip-plan-price-block {
    margin-bottom: 4px;
}

.vip-plan-original-price {
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    line-height: 1.2;
}

.vip-plan-discount-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 3px 0 2px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #ffedd5;
    color: #ea580c;
    font-size: 0.64rem;
    font-weight: 900;
    white-space: nowrap;
}

.vip-plan-price {
    font-size: 1.52rem;
    font-weight: 900;
    color: #7C3AED;
    line-height: 1.1;
}

.vip-plan-tier-block.svip .vip-plan-price {
    color: #d97706;
}

.vip-plan-card.upgrade-quote {
    border-color: rgba(245, 158, 11, 0.54);
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}

.vip-plan-card.upgrade-quote .vip-plan-discount-label {
    color: #7c2d12;
    background: linear-gradient(135deg, #fde68a 0%, #fed7aa 100%);
}

.vip-plan-card.upgrade-pending {
    border-color: rgba(245, 158, 11, 0.42);
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.vip-plan-card.upgrade-pending .vip-plan-upgrade-hint {
    color: #92400e;
    text-decoration: none;
}

.vip-plan-card.upgrade-pending .vip-plan-discount-label {
    color: #7c2d12;
    background: linear-gradient(135deg, #fde68a 0%, #fed7aa 100%);
}

.vip-plan-card.upgrade-pending .vip-plan-price-pending {
    font-size: 1.02rem;
    color: #b45309;
    line-height: 1.25;
}

.vip-upgrade-note {
    margin: 4px auto 0;
    max-width: 92%;
    color: #b45309;
    font-size: 0.62rem;
    line-height: 1.3;
    font-weight: 800;
}

.vip-plan-card.compact .vip-plan-title {
    font-size: 0.82rem;
    margin-bottom: 2px;
}

.vip-plan-card.compact .vip-plan-original-price {
    font-size: 0.56rem;
}

.vip-plan-card.compact .vip-plan-discount-label {
    font-size: 0.52rem;
    padding: 1px 5px;
}

.vip-plan-card.compact .vip-plan-price {
    font-size: 0.98rem;
}

.vip-plan-card.compact .vip-plan-price-pending {
    font-size: 0.72rem;
}

.vip-plan-card.compact .vip-upgrade-note {
    display: none;
}

.vip-plan-duration {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.vip-plan-card.compact .vip-plan-duration {
    font-size: 0.62rem;
    margin-bottom: 3px;
}

.vip-plan-benefit {
    font-size: 0.78rem;
    color: #D97706;
    font-weight: 700;
}

.vip-plan-gift {
    font-size: 0.76rem;
    color: #8B5CF6;
    font-weight: 700;
    margin-top: 4px;
}

.vip-plan-card.compact .vip-plan-benefit,
.vip-plan-card.compact .vip-plan-gift {
    font-size: 0.6rem;
    line-height: 1.22;
    margin-top: 2px;
}

.vip-plan-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.35;
}

.vip-plan-card.compact .vip-plan-desc {
    display: none;
}

.vip-plan-card.trial .vip-plan-title,
.vip-plan-card.trial .vip-plan-price-block,
.vip-plan-card.trial .vip-plan-duration,
.vip-plan-card.trial .vip-plan-benefit,
.vip-plan-card.trial .vip-plan-gift,
.vip-plan-card.trial .vip-plan-desc {
    margin: 0;
}

.vip-plan-card.trial .vip-plan-title {
    color: #882ba1;
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: 0;
}

.vip-pay-tip {
    margin-top: 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-align: center;
}

.wallet-modal-content,
.profile-edit-modal-content {
    max-width: 526px;
    overflow: hidden;
}

.wallet-modal-body,
.profile-edit-body {
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 44%, #f8fafc 100%);
}

.wallet-balance-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-radius: 22px;
    color: white;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.22);
}

.wallet-balance-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 4px;
}

.wallet-balance-value {
    font-size: 2.15rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
}

.wallet-balance-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.22);
    font-size: 26px;
}

.wallet-plan-section {
    margin-top: 18px;
}

.wallet-plan-section > label,
.exchange-input-card > label,
.profile-edit-field > label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 800;
    color: #334155;
    margin-bottom: 10px;
}

.recharge-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.recharge-package {
    position: relative;
    border: 1.5px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px 10px 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
    color: var(--text-primary);
    min-height: 118px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.recharge-package::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid #e2e8f0;
    background: white;
}

.recharge-package.selected {
    border-color: #f59e0b;
    background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.2);
    transform: translateY(-1px);
}

.recharge-package.selected::after {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-color: #f59e0b;
    background: #f59e0b;
    font-size: 12px;
    font-weight: 900;
}

.recharge-package-points {
    font-size: 1.32rem;
    font-weight: 900;
    color: #c2410c;
}

.recharge-package-price {
    color: #0f172a;
    font-size: 1rem;
    margin-top: 8px;
    font-weight: 900;
}

.recharge-package-desc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #b45309;
    background: rgba(251, 191, 36, 0.14);
    font-size: 0.72rem;
    line-height: 1.25;
}

.wallet-stats-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wallet-stat-card {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.wallet-stat-card span {
    display: block;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.wallet-stat-card strong {
    display: block;
    color: #0f172a;
    font-size: 2rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.exchange-input-card {
    margin-top: 16px;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.exchange-input-card input {
    width: 100%;
    height: 50px;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 0 14px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
    font-size: 1.05rem;
}

.exchange-rule-tip {
    margin-top: 8px;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.exchange-summary-card {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #9a3412;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.55;
}

.profile-edit-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
    border: 1px solid #fed7aa;
    margin-bottom: 16px;
}

.profile-edit-avatar {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c2d12;
    background: linear-gradient(135deg, #facc15 0%, #fb923c 100%);
    font-size: 24px;
    box-shadow: 0 10px 22px rgba(234, 88, 12, 0.18);
}

.profile-edit-title {
    font-size: 1.04rem;
    font-weight: 900;
    color: #0f172a;
}

.profile-edit-subtitle {
    margin-top: 3px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #64748b;
}

.profile-edit-field {
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.profile-edit-field input,
.profile-edit-field textarea {
    width: 100%;
    border: 0;
    background: #f8fafc;
    border-radius: 14px;
    padding: 13px 14px;
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
}

.profile-edit-field textarea {
    resize: none;
    line-height: 1.5;
}

.profile-edit-hint {
    margin-top: 10px;
    color: #94a3b8;
    font-size: 0.78rem;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .vip-plans-grid {
        display: block;
    }
}

@media (max-width: 600px) {
    .recharge-plans-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vip-plans-grid {
        display: block;
    }

    .recharge-package {
        min-height: 116px;
        padding: 18px 8px;
    }

    .recharge-package-points {
        font-size: 1.16rem;
    }

    .recharge-package-price {
        font-size: 0.88rem;
    }

    .vip-plan-card {
        padding: 11px 8px;
    }

    .vip-plan-title {
        font-size: 0.88rem;
    }

    .vip-plan-original-price {
        font-size: 0.62rem;
    }

    .vip-plan-discount-label {
        font-size: 0.58rem;
        padding: 2px 5px;
    }

    .vip-plan-price {
        font-size: 1.18rem;
    }

    .vip-plan-desc {
        display: none;
    }

    .vip-purchase-body {
        padding: 14px;
    }

    .vip-plan-type-tabs {
        gap: 6px;
        margin-bottom: 10px;
    }

    .vip-plan-type-card {
        min-height: 62px;
        padding: 9px 7px;
        border-radius: 13px;
    }

    .vip-plan-type-main {
        font-size: 0.7rem;
    }

    .vip-plan-type-sub {
        font-size: 0.55rem;
    }

    .vip-privilege-panel {
        padding: 15px;
        margin-bottom: 14px;
    }

    .vip-privilege-panel ul {
        font-size: 0.82rem;
    }

    .vip-plan-tier-block {
        grid-template-columns: minmax(0, 1.1fr) minmax(94px, 0.9fr);
        gap: 8px;
        padding-top: 15px;
    }

    .vip-plan-card.featured {
        min-height: 198px;
        padding: 12px 8px;
    }

    .vip-plan-card.compact {
        min-height: 95px;
        padding: 8px 6px;
    }

    .vip-plan-card.compact .vip-plan-title {
        font-size: 0.74rem;
    }

    .vip-plan-card.compact .vip-plan-price {
        font-size: 0.9rem;
    }

    .vip-plan-card.compact .vip-plan-benefit,
    .vip-plan-card.compact .vip-plan-gift {
        font-size: 0.56rem;
    }
}

/* 模拟交易 V1 */
.page-simulation {
    padding: 88px 16px calc(90px + var(--safe-bottom)) !important;
    background: #f5f7fb;
}

.simulation-hero,
.simulation-toolbar,
.simulation-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.simulation-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    margin-bottom: 12px;
}

.simulation-eyebrow {
    margin: 0 0 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.simulation-hero h2 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
}

.simulation-hero p:not(.simulation-eyebrow) {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.simulation-badge {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 800;
}

.simulation-message {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
}

.simulation-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.simulation-stat {
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.simulation-stat span,
.simulation-status-line span {
    color: #64748b;
    font-size: 12px;
}

.simulation-stat strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

.simulation-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 12px;
}

.simulation-status-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.simulation-status-line strong {
    color: #0f172a;
    font-size: 14px;
}

.simulation-actions,
.simulation-add-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.simulation-btn,
.simulation-primary {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #dbe2ea;
    border-radius: 7px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.simulation-primary {
    border-color: #0f766e;
    background: #0f766e;
    color: #ffffff;
}

.simulation-danger {
    border-color: #fecaca;
    color: #b91c1c;
}

.simulation-section {
    padding: 15px;
    margin-bottom: 12px;
}

.simulation-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.simulation-section-heading h3 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
}

.simulation-section-heading span {
    color: #94a3b8;
    font-size: 12px;
}

.simulation-add-row {
    margin-bottom: 12px;
}

.simulation-add-row input {
    flex: 1 1 160px;
    min-width: 120px;
    height: 36px;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid #dbe2ea;
    border-radius: 7px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
}

.simulation-table-wrap {
    overflow-x: auto;
}

.simulation-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 12px;
}

.simulation-table th,
.simulation-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    white-space: nowrap;
}

.simulation-table th {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.simulation-table td {
    color: #334155;
}

.simulation-table strong {
    color: #0f172a;
}

.simulation-risk {
    color: #b91c1c !important;
    font-weight: 800;
}

.simulation-empty {
    padding: 18px 8px;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}

.simulation-journal-item {
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

.simulation-journal-item:last-child { border-bottom: 0; }
.simulation-journal-title { color: #0f172a; font-size: 13px; font-weight: 800; }
.simulation-journal-meta { margin-top: 4px; color: #64748b; font-size: 12px; line-height: 1.5; }
.simulation-disclaimer { margin: 8px 0 0; color: #94a3b8; font-size: 11px; text-align: center; }

body.dark-mode .page-simulation { background: #0f172a; }
body.dark-mode .simulation-hero,
body.dark-mode .simulation-toolbar,
body.dark-mode .simulation-section,
body.dark-mode .simulation-stat,
body.dark-mode .simulation-btn { background: #111827; border-color: #263244; }
body.dark-mode .simulation-hero h2,
body.dark-mode .simulation-section-heading h3,
body.dark-mode .simulation-stat strong,
body.dark-mode .simulation-status-line strong,
body.dark-mode .simulation-table strong,
body.dark-mode .simulation-journal-title { color: #f8fafc; }
body.dark-mode .simulation-add-row input { background: #0f172a; border-color: #334155; color: #f8fafc; }

@media (max-width: 700px) {
    .simulation-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .simulation-toolbar { align-items: flex-start; flex-direction: column; }
    .simulation-actions { width: 100%; }
    .simulation-actions button { flex: 1 1 auto; }
}
