* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: #0b0f19;
    color: #f1f5f9;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
}

.app-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: calc(100vh - 12px);
}

/* Glassmorphism Design Token */
.glass {
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.35);
}

/* Header Navbar */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    background: rgba(17, 24, 39, 0.85);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    height: 48px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.badge-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: block;
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.header h1 {
    font-size: 17px;
    font-weight: 700;
    background: linear-gradient(90deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Time Selector Dropdown */
.time-selector-container {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.select-label {
    font-size: 12px;
    color: #cbd5e1;
    white-space: nowrap;
}

.select-box {
    background: #1e293b;
    color: #38bdf8;
    border: 1px solid #38bdf8;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

/* Buttons */
.btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: translateY(-1px);
}

.btn-refresh {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.btn-refresh:hover {
    background: rgba(56, 189, 248, 0.2);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border-radius: 4px;
}

.btn-sm:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
}

.btn-sm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    flex-shrink: 0;
}

.kpi-card {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 10px;
}

.kpi-title {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.kpi-value {
    font-size: 20px;
    font-weight: 700;
    margin: 2px 0;
    line-height: 1.2;
}

.unit {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
}

.highlight-gold {
    color: #fbbf24;
}

.highlight-blue {
    color: #38bdf8;
}

.kpi-sub {
    font-size: 11px;
    color: #64748b;
}

.kpi-tags {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.tag-up {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.tag-down {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.tag-new {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Financial Score Badges */
.score-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.score-badge-S {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(245, 158, 11, 0.15));
    color: #facc15;
    border: 1px solid #facc15;
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.3);
}

.score-badge-A {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid #4ade80;
}

.score-badge-B {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.score-badge-C {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid #64748b;
}

/* Single Screen Split View Grid */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.chart-card {
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

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

.card-header h3 {
    font-size: 13px;
    font-weight: 600;
}

.card-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}

.chart-box {
    width: 100%;
    flex: 1;
    min-height: 0;
}

/* Data Table Section */
.table-section {
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.table-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-title h3 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.count-badge {
    font-size: 11px;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.table-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-filter-bullish {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(225, 29, 72, 0.1);
    border: 1px solid rgba(225, 29, 72, 0.35);
    color: #fda4af;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
    height: 32px;
    box-sizing: border-box;
}

.btn-filter-bullish:hover {
    background: rgba(225, 29, 72, 0.18);
    border-color: rgba(225, 29, 72, 0.55);
    color: #fff;
}

.btn-filter-bullish.active {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.35), rgba(245, 158, 11, 0.35));
    border-color: #f43f5e;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.35);
}


.filter-chip-bullish {
    background: rgba(225, 29, 72, 0.15) !important;
    border-color: rgba(225, 29, 72, 0.4) !important;
    color: #fecdd3 !important;
}

.th-hint {
    font-size: 10px;
    opacity: 0.65;
    margin-left: 3px;
    cursor: help;
    vertical-align: middle;
}
.th-hint:hover {
    opacity: 1;
}

.tag-stale {
    font-size: 9px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
    font-weight: normal;
    vertical-align: middle;
}

.pnl-sub-note {
    font-size: 10px;
    color: #94a3b8;
    display: block;
    font-weight: normal;
    line-height: 1.1;
    margin-top: 2px;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    padding: 3px;
    border-radius: 6px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn.active {
    background: #0284c7;
    color: #fff;
    font-weight: 600;
}

.search-box {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    font-size: 13px;
    color: #64748b;
    pointer-events: none;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.search-box input {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 7px 30px 7px 30px;
    color: #fff;
    font-size: 13px;
    outline: none;
    width: 240px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.search-box input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.search-box input::placeholder {
    color: #475569;
}

.search-box input::-webkit-search-cancel-button,
.search-box input::-webkit-search-decoration,
.search-box input::-webkit-search-results-button,
.search-box input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: none;
    color: #cbd5e1;
    font-size: 10px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
    z-index: 2;
}

.search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Data Table Styling */
.table-wrapper {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 14, 24, 0.35);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 8;
    background: rgba(15, 23, 42, 0.98);
    color: #7d8ea8;
    padding: 8px 8px;
    font-size: 11.5px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    user-select: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: color 0.15s ease, background 0.15s ease;
}

.data-table th[data-col] {
    cursor: pointer;
}
.data-table th[data-col]:hover {
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.98);
}
.data-table th.sorted-col {
    color: #38bdf8 !important;
}
.th-sort-icon {
    display: inline-block;
    font-size: 10px;
    margin-left: 3px;
    color: #38bdf8;
    vertical-align: middle;
}

/* Sticky Left Columns for Mobile & Desktop */
.data-table th.col-sticky-1 {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 12;
    background: #0f172a;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4);
}
.data-table td.col-sticky-1 {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #0f172a;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4);
}

.data-table th.col-sticky-2 {
    position: sticky;
    top: 0;
    left: 95px;
    z-index: 12;
    background: #0f172a;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4);
}
.data-table td.col-sticky-2 {
    position: sticky;
    left: 95px;
    z-index: 4;
    background: #0f172a;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4);
}

.data-table tbody tr:hover td.col-sticky-1,
.data-table tbody tr:hover td.col-sticky-2 {
    background: #1c2b45;
}

.data-table td {
    padding: 7px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #d5dde8;
    white-space: nowrap;
    font-size: 12px;
}

/* 数值列右对齐 (财务评分/价格/持股/持仓金额/盈亏/调仓) */
.data-table th:nth-child(4), .data-table td:nth-child(4),
.data-table th:nth-child(n+6):nth-child(-n+12), .data-table td:nth-child(n+6):nth-child(-n+12) {
    text-align: right;
}

/* 斑马纹 + 悬浮高亮 (含吸顶列) */
.data-table tbody tr:nth-child(even) td {
    background: rgba(148, 163, 184, 0.045);
}
.data-table tbody tr:nth-child(even) td.col-sticky-1,
.data-table tbody tr:nth-child(even) td.col-sticky-2 {
    background: #121b30;
}
.data-table tbody tr:hover td {
    background: rgba(56, 189, 248, 0.09);
}
.data-table .score-badge {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
}
.data-table .tag {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 5px;
}
.data-table .badge-ind {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 5px;
}
.data-table .lock-hint {
    font-size: 11px;
    padding: 3px 8px;
}

/* ===== 表头多列筛选 ===== */
.th-filter-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 10px;
    padding: 0 3px;
    margin-left: 4px;
    border-radius: 3px;
    line-height: 1.4;
    vertical-align: middle;
}
.th-filter-btn:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
}
.th-filter-btn.filtering {
    color: #fbbf24;
}
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
    align-items: center;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fbbf24;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chip-x {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 12px;
    padding: 0 0 0 2px;
    line-height: 1;
}
.chip-clear {
    color: #94a3b8;
}
.filter-pop {
    position: fixed;
    z-index: 1000;
    min-width: 230px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    padding: 10px;
}
.filter-pop.loading {
    opacity: 0.6;
    pointer-events: none;
}
.fp-title {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 8px;
}
.fp-row {
    margin-bottom: 8px;
}
.fp-label {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
}
.fp-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    padding: 4px 8px;
    color: #fff;
    font-size: 12px;
    outline: none;
    color-scheme: dark;
}
.fp-input:focus {
    border-color: #0284c7;
}
.fp-range {
    display: flex;
    gap: 6px;
    align-items: center;
}
.fp-num {
    width: 76px;
}
.fp-date {
    width: 118px;
}
.fp-unit {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
}
.fp-multi {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}
.fp-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #cbd5e1;
    cursor: pointer;
}
.fp-check input {
    accent-color: #0284c7;
}
.fp-btns {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
}

/* 安全中心-用户管理: 可见字段列允许换行, 避免与到期时间、操作列文字重叠 */
.data-table td.user-fields-cell {
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.45;
    min-width: 150px;
}

.data-table tbody tr {
    transition: background 0.12s ease;
    cursor: default;
}

.data-table tbody tr:hover {
    background: rgba(56, 189, 248, 0.08);
}

.loading-text {
    text-align: center;
    padding: 36px !important;
    color: #64748b;
    font-size: 13px;
    letter-spacing: 0.5px;
    animation: softPulse 1.6s ease-in-out infinite;
}
@keyframes softPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.badge-ind {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-shrink: 0;
}
.pagination .btn-sm {
    min-width: 74px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.22);
    transition: all 0.15s ease;
}
.pagination .btn-sm:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}
.pagination .btn-sm:disabled {
    opacity: 0.35;
}

.page-info {
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    color: #a3b3c7;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.18s ease;
}

/* Security Center as full page */
.security-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0b0f19;
    z-index: 200;
    overflow: hidden;
}

.security-page.active {
    display: block;
}

.security-page-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px 28px;
    box-sizing: border-box;
    overflow: hidden;
}

.security-page-content .modal-header {
    margin-bottom: 14px;
}

.security-page-content .modal-header h2 {
    font-size: 22px;
}

.security-page-content .modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    padding-right: 6px;
}
/* 安全中心: 内容面板为唯一纵向滚动容器 (PC 鼠标滚轮 / 移动端滑动均可靠) */
#sec-content-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
}
#sec-pane-users,
#sec-pane-sessions,
#sec-pane-logs {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
#sec-pane-sessions > .card-header,
#sec-pane-logs > .card-header,
#sec-pane-sessions > .kpi-grid,
#sec-pane-logs > .sec-pagination {
    flex-shrink: 0;
}
/* 表格容器桌面端不参与纵向滚动, 滚轮直达内容面板; 窄屏保留表格横向滚动 */
#sec-pane-sessions > .table-wrapper,
#sec-pane-logs > .table-wrapper {
    flex: 0 0 auto;
    min-height: 120px;
    overflow: visible;
}
#sec-pane-sessions .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
}
/* 页签吸顶、页码吸底: 滚动时始终可切换/翻页 */
#sec-content-panel > .modal-tabs {
    position: sticky;
    top: 0;
    z-index: 6;
    background: #0b0f19;
}
#sec-pane-logs .sec-pagination {
    position: sticky;
    bottom: 0;
    z-index: 6;
    background: #0b0f19;
    padding: 8px 2px;
}
@media (max-width: 768px) {
    #sec-pane-sessions > .table-wrapper,
    #sec-pane-logs > .table-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
    }
}
#sec-log-body td:nth-child(5) {
    white-space: normal;
    min-width: 200px;
    max-width: 340px;
    overflow-wrap: break-word;
}
#sec-session-body td:nth-child(2),
#sec-log-body td:nth-child(3) {
    white-space: normal;
    min-width: 90px;
}
#sec-session-body tr:nth-child(even) td,
#sec-log-body tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}
@media (max-width: 768px) {
    .security-page-content {
        padding: 16px 12px;
    }
    .security-page-content .modal-header h2 {
        font-size: 18px;
    }
}

.modal-large {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content {
    padding: 20px;
    position: relative;
    animation: modalPop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}

.modal-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}

.modal-tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.modal-tab-btn.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
}

.modal-panel {
    display: none;
}

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

.finance-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.finance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.finance-table th {
    background: #1e293b;
    color: #94a3b8;
    padding: 10px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.finance-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    white-space: nowrap;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #0284c7;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.15);
    backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   新一代手机端自适应股票卡片 (Native Mobile Stock Card UI)
   专为移动端单手浏览设计：大字号、高对比、规整网格、零横向滚动
   ═══════════════════════════════════════════════════════════════════════════ */
.mobile-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.msc3-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #38bdf8;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, background 0.15s ease;
    cursor: default;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.msc3-card:active {
    transform: scale(0.985);
    background: rgba(30, 41, 59, 0.98);
}

/* Header Row: Name, Code, Badges, Price */
.msc3-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.msc3-id {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.msc3-name {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.3px;
}

.msc3-code {
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #38bdf8;
    font-weight: 600;
}

.msc3-tag-tag {
    font-size: 10px;
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 600;
}

.msc3-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.msc3-price {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
}

.msc3-pnl-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

/* Subbar: Industry, Score, Quality Stamping */
.msc3-subbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 11px;
}

.msc3-ind {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.msc3-score {
    font-size: 11px;
    font-weight: 600;
}

.msc3-stamp-quality {
    font-size: 11px;
    font-weight: 700;
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.35);
    padding: 1px 6px;
    border-radius: 4px;
}

.msc3-stamp-signal {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

/* Dates Row */
.msc3-dates {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    gap: 6px;
}

.msc3-date-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.msc3-date-lbl {
    color: #64748b;
}

.msc3-date-val {
    color: #cbd5e1;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 11px;
}

/* Dynamic Metrics Grid (自适应 1~3 列) */
.msc3-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 10px;
    background: rgba(10, 14, 24, 0.45);
    border-radius: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.msc3-grid.cols-1 {
    grid-template-columns: 1fr;
}

.msc3-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

.msc3-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.msc3-lbl {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msc3-val {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.msc3-val small {
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 2px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ─────────────────────────────────────────────
    Compact Mobile List Card (msc2) - one screen multi
    ───────────────────────────────────────────── */
.msc2-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 10px 12px 10px 14px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    cursor: default;
    transition: border-left-color 0.15s, background 0.15s;
    gap: 6px;
    min-height: 72px;
}

.msc2-card:active {
    background: rgba(56, 189, 248, 0.07);
    border-left-color: #38bdf8;
}

.msc2-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.msc2-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.msc2-name {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    flex-shrink: 0;
}

.msc2-code {
    font-size: 11px;
    color: #38bdf8;
    font-family: monospace;
    flex-shrink: 0;
}

.msc2-tag {
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.msc-tag-up  { background: rgba(239,68,68,0.15);  color: #f87171; }
.msc-tag-dn  { background: rgba(34,197,94,0.15);  color: #4ade80; }
.msc-tag-new { background: rgba(251,191,36,0.15); color: #fbbf24; }
.msc-tag-flat{ background: rgba(255,255,255,0.06); color: #64748b; }

.msc2-bottom {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.msc2-meta {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.msc2-sep {
    color: #334155;
    font-size: 10px;
    flex-shrink: 0;
}

.msc2-score {
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    padding: 0 3px;
    border-radius: 3px;
}

.msc2-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 90px;
}

.msc2-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 2px;
}

.msc2-cap {
    font-size: 14px;
    font-weight: 700;
    color: #fbbf24;
}

.msc2-cap small {
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 1px;
}

.msc2-price {
    font-size: 12px;
    font-weight: 600;
}

.msc2-mid {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
}

.msc2-estcap {
    font-size: 11px;
    font-weight: 700;
}

.msc2-top-price {
    margin-left: auto;
    font-size: 14px;
    font-weight: 700;
    color: #38bdf8;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 优质标识: 印章样式盖在卡片右下角 */
.msc2-quality-stamp {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #e11d48;
    background: rgba(225, 29, 72, 0.10);
    border: 2px solid #e11d48;
    border-radius: 6px;
    transform: rotate(-10deg);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.92;
    flex-shrink: 0;
}

.msc2-label {
    font-size: 10px;
    color: #64748b;
    margin-right: 3px;
    flex-shrink: 0;
}

.msc2-date-row {
    margin-top: 3px;
}

.msc2-date-row .msc2-meta {
    max-width: none;
    flex-shrink: 0;
    color: #fbbf24;
    font-weight: 600;
}

.msc2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 4px 8px;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.msc2-grid-item {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.msc2-grid-label {
    font-size: 10px;
    color: #64748b;
    flex-shrink: 0;
}

.msc2-grid-val {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
}

.msc2-grid-val small {
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
}

@keyframes priceFlashUp {
    0% { background: rgba(239,68,68,0.2); }
    100% { background: transparent; }
}

@keyframes priceFlashDown {
    0% { background: rgba(34,197,94,0.2); }
    100% { background: transparent; }
}

[data-price-code] {
    border-radius: 4px;
    padding: 1px 3px;
    transition: background 0.6s ease;
}

/* Mobile Native Stock Cards Styling */
.mobile-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.mobile-stock-card {
    padding: 0;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(56, 189, 248, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.mobile-stock-card:active {
    transform: scale(0.985);
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
}

.msc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px 10px 14px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.msc-name {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.msc-code {
    color: #38bdf8;
    font-size: 13px;
    font-weight: 600;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 4px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.msc-change {
    flex-shrink: 0;
}

.msc-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
}

.msc-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border-right: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

.msc-item:last-child {
    border-right: none;
}

.msc-label {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.msc-val {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.msc-sub {
    font-size: 11px;
    color: #64748b;
}

.msc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 14px;
    font-size: 11px;
    color: #64748b;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.04);
    gap: 6px;
}

.msc-footer span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spinning {
    display: inline-block;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 1200px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
    .app-container {
        height: auto;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
        background: #080c14;
    }

    .app-container {
        gap: 0;
        height: auto;
        border-radius: 0;
        padding: 0;
    }

    /* ── Header ── */
    .header {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 10px 12px;
        gap: 8px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        background: rgba(8, 12, 20, 0.98);
    }

    .logo-title {
        display: none;
    }

    .header h1 {
        font-size: 14px;
        line-height: 1.3;
    }

    .subtitle {
        font-size: 10px;
    }

    .badge-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .header-actions {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .time-selector-container {
        flex-shrink: 0;
        padding: 4px 8px;
    }

    .select-label {
        display: none;
    }

    .select-box {
        font-size: 11px;
        padding: 4px 6px;
        max-width: 130px;
    }

    .btn {
        font-size: 11px;
        padding: 6px 10px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ── KPI Grid: hidden on mobile ── */
    .kpi-grid {
        display: none;
    }

    .kpi-card {
        padding: 10px 12px;
        border-radius: 10px;
    }

    .kpi-title {
        font-size: 10px;
        line-height: 1.3;
    }

    .kpi-value {
        font-size: 20px;
        margin: 3px 0;
    }

    .kpi-sub {
        font-size: 10px;
    }

    .kpi-tags {
        flex-wrap: wrap;
        gap: 4px;
    }

    .tag {
        font-size: 10px;
        padding: 1px 5px;
    }

    /* ── Charts: hide chart card only on mobile, table-section stays ── */
    .dashboard-main-grid {
        display: block;     /* single column, no grid */
        padding: 0;
        background: transparent;
        flex: unset;
        min-height: unset;
    }

    /* Hide only the pie chart, keep the table/card list */
    .chart-card {
        display: none;
    }

    /* Chart card header: centered on mobile */
    .chart-card .card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .chart-card .card-header h3 {
        font-size: 14px;
        font-weight: 700;
        background: linear-gradient(90deg, #f1f5f9, #94a3b8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        letter-spacing: 0.3px;
    }

    .chart-card .card-tag {
        font-size: 11px;
        padding: 2px 10px;
        border-radius: 20px;
        background: rgba(239,68,68,0.12);
        color: #f87171;
        border: 1px solid rgba(239,68,68,0.25);
    }

    /* Chart box fixed height on mobile */
    .chart-box {
        height: 300px;
        width: 100%;
    }

    /* ── Table / Cards Section ── */
    .table-section {
        height: auto;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 8px 8px 12px;
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }

    .table-title {
        display: none;
    }

    .btn-view-toggle {
        flex-shrink: 0;
        height: 38px;
        padding: 0 8px;
        font-size: 12px;
        border-radius: 8px;
    }

    .table-controls {
        display: flex;
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .btn-filter-bullish {
        flex-shrink: 0;
        height: 38px;
        padding: 0 10px;
        font-size: 12px;
        border-radius: 8px;
    }

    .filter-tabs {
        overflow-x: auto;
        width: 100%;
        padding-bottom: 2px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        font-size: 11px;
        padding: 5px 10px;
    }

    .search-box {
        flex: 1;
        min-width: 0;
        display: flex;
    }

    .search-box input {
        width: 100% !important;
        font-size: 14px;
        padding: 8px 34px 8px 32px;
        height: 38px;
        border-radius: 8px;
    }

    .search-icon {
        left: 10px;
        font-size: 14px;
    }

    .search-clear-btn {
        right: 10px;
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    /* ── Pagination ── */
    .pagination {
        padding: 14px 12px;
        gap: 10px;
        font-size: 13px;
        justify-content: center;
    }

    .pagination .btn-sm {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 80px;
        border-radius: 10px;
    }

    .swipe-hint {
        display: block !important;
        text-align: center;
        font-size: 11px;
        color: #475569;
        margin-top: 4px;
        padding-bottom: 8px;
    }

    .btn-view-toggle-wrap {
        display: flex;
        justify-content: center;
        padding: 6px 12px 0;
    }

    /* ── Table vs Mobile Cards ── */
    #table-view-wrapper {
        display: none !important;
    }

    /* ── Mobile Cards Container ── */
    #mobile-cards-container {
        display: flex !important;
        flex-direction: column;
        padding: 6px 8px 20px 8px;
        gap: 8px;
        width: 100%;
    }

    .msc2-card {
        padding: 10px 12px 10px 14px;
    }

    .msc2-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px 8px;
    }

    .msc2-grid-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .msc2-grid-label {
        font-size: 9px;
    }

    .msc2-grid-val {
        font-size: 11px;
    }

    .msc2-name {
        font-size: 14px;
        max-width: 80px;
    }

    /* ── Modals ── */
    .modal-large {
        width: 96%;
        max-height: 94vh;
        border-radius: 14px;
    }

    .modal-content {
        border-radius: 14px;
    }
}


/* ===== 财务评分/调仓数据无权限提示 ===== */
.lock-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f87171;
    font-weight: 600;
    font-size: 12px;
    background: rgba(239,68,68,0.10);
    border: 1px dashed rgba(239,68,68,0.45);
    border-radius: 8px;
    padding: 3px 8px;
    white-space: nowrap;
}

/* 优质标识: 极力推荐 (财务评分>=90 且增持/新进, 或调仓信号强烈看多>=4) — 印章样式, 与移动端一致 */
.tag-quality {
    display: inline-block;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #e11d48 !important;
    background: rgba(225, 29, 72, 0.10) !important;
    border: 2px solid #e11d48 !important;
    border-radius: 6px;
    transform: rotate(-10deg);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.92;
}

/* ═══════════════════════════════════════════════════════════════
   PC 端数据展示体验优化 (追加覆盖, 不改变原有结构)
   ═══════════════════════════════════════════════════════════════ */

/* ── 全局: 自定义滚动条 (深色主题) ── */
* {
    scrollbar-width: thin;
    scrollbar-color: #2b3a55 transparent;
}
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 6px;
    border: 2px solid #0b0f19;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}
::selection {
    background: rgba(56, 189, 248, 0.35);
    color: #fff;
}


/* ── PC 大屏下搜索框更宽、控件更舒展 ── */
@media (min-width: 1400px) {
    .search-box input {
        width: 300px;
    }
    .data-table td {
        padding: 11px 14px;
    }
    .data-table th {
        padding: 12px 14px;
    }
}

/* 移动端: 搜索框铺满整行 + 收紧上下空白 (覆盖 PC 端追加样式) */
@media (max-width: 768px) {
    .search-box {
        flex: 1;
        min-width: 0;
    }
    .search-box input {
        width: 100% !important;
    }
    .dashboard-main-grid {
        gap: 2px;
    }
    .table-section {
        padding-top: 0;
    }
    .table-header {
        padding-top: 4px;
        padding-bottom: 4px;
        margin-bottom: 0;
        gap: 6px;
    }
}

@media (max-width: 360px) {
    .btn-filter-bullish {
        font-size: 11px;
        padding: 0 6px;
    }
}

/* 版本标识 (页面底部, 用于确认当前加载的是最新构建) */
.app-version {
    text-align: center;
    font-size: 10px;
    color: #334155;
    padding: 2px 0 8px;
    letter-spacing: 0.5px;
}
/* 用户管理: 字段权限勾选 */
.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px 12px;
}
.perm-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}
.perm-item:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
}
.perm-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #0284c7;
}

/* ═══════════════════════════════════════════════════════════════
   调仓信号（2026 实证规则）展示
   ═══════════════════════════════════════════════════════════════ */

/* 强烈看多: 金色印章 */
.tag-signal-strong {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.12) !important;
    border: 2px solid #fbbf24 !important;
    border-radius: 6px;
    transform: rotate(-6deg);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.92;
}

/* 回避: 红色印章 */
.tag-signal-avoid {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #f87171 !important;
    background: rgba(248, 113, 113, 0.12) !important;
    border: 2px solid #f87171 !important;
    border-radius: 6px;
    transform: rotate(-6deg);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.92;
}

/* 看多: 大角标 (琥珀粗框, 弱于强烈看多的纯金) */
.tag-signal-bull {
    display: inline-block;
    padding: 3px 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #fbbf24 !important;
    background: rgba(245, 158, 11, 0.12) !important;
    border: 2px solid #f59e0b !important;
    border-radius: 6px;
    transform: rotate(-8deg);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.92;
}

/* 中性: 灰色标签 (弱化, 不旋转) */
.tag-signal-neutral {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #94a3b8 !important;
    background: rgba(148, 163, 184, 0.08) !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}

/* 卡片模式: 强烈看多印章 */
.msc2-quality-stamp-signal {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.10);
    border: 2px solid #fbbf24;
    border-radius: 6px;
    transform: rotate(-10deg);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.92;
    flex-shrink: 0;
}

/* 卡片模式: 看多印章 (大角标, 琥珀粗框) */
.msc2-quality-stamp-bull {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    padding: 3px 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 2px solid #f59e0b;
    border-radius: 6px;
    transform: rotate(-10deg);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.92;
    flex-shrink: 0;
}

/* 卡片模式: 中性标签 (灰色) */
.msc2-quality-stamp-neutral {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.85;
    flex-shrink: 0;
}

/* 卡片模式: 回避印章 */
.msc2-quality-stamp-avoid {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #f87171;
    background: rgba(248, 113, 113, 0.10);
    border: 2px solid #f87171;
    border-radius: 6px;
    transform: rotate(-10deg);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.92;
    flex-shrink: 0;
}

/* 键盘可访问: 焦点可见 */
:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
    border-radius: 4px;
}

/* 红色提示条 */
.tip-warning {
    margin: -2px 0 8px;
    font-size: 12px;
    color: #f87171;
    font-weight: 600;
}

/* 公开持仓图片激活时彻底隐藏表格和筛选器 */
body.tab-images-active #table-view-wrapper,
body.tab-images-active #mobile-cards-container,
body.tab-images-active .table-title,
body.tab-images-active #table-controls,
body.tab-images-active #holding-tip,
body.tab-images-active #active-filters,
body.tab-images-active .pagination,
body.tab-images-active .swipe-hint,
body.tab-images-active #app-version {
    display: none !important;
}

/* 公开持仓图片 */
#public-images-section {
    flex: 1;
    min-height: 0;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}
.public-images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
    padding: 4px;
}
.public-image-card {
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}
.public-image-card.is-dragging {
    opacity: 0.35;
    transform: scale(0.97);
    border: 2px dashed #38bdf8 !important;
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3);
}
.public-image-card.drag-over-before {
    border-top: 3px solid #38bdf8 !important;
    box-shadow: 0 -4px 12px rgba(56, 189, 248, 0.35);
}
.public-image-card.drag-over-after {
    border-bottom: 3px solid #38bdf8 !important;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}
.public-card-drag-handle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.public-card-drag-handle:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.5);
    color: #38bdf8;
}
.public-card-drag-handle:active {
    cursor: grabbing;
}
.public-image-card img {
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: contain;
    background: #080c14;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.15s ease;
}
.public-image-card img:hover {
    opacity: 0.9;
}
.public-images-container {
    position: relative;
    background: #080c14;
    padding: 6px 6px 0;
    display: flex;
    flex-direction: column;
}
.public-images-container img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    cursor: zoom-in;
    margin-bottom: 8px;
}
.public-image-body {
    padding: 10px 12px;
}
.public-image-title {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 4px;
}
.public-image-pin-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    margin-left: 4px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.4);
    vertical-align: middle;
}
.public-image-note {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.public-image-note-edit {
    width: 100%;
    margin-top: 8px;
    background: #0b0f19;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    padding: 8px 10px;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1.5;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.public-image-note-edit:focus {
    outline: 2px solid rgba(56, 189, 248, 0.6);
    outline-offset: 1px;
    border-color: #38bdf8;
}
.public-rich-note {
    min-height: 72px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    cursor: text;
}
.public-rich-note:empty::before {
    content: attr(data-placeholder);
    color: #64748b;
}
.public-note-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}
.public-note-tool {
    width: 30px;
    height: 28px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 7px;
    background: rgba(56, 189, 248, 0.08);
    color: #38bdf8;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.public-note-tool:hover {
    background: rgba(56, 189, 248, 0.18);
}
.public-note-color {
    width: 34px;
    height: 28px;
    padding: 2px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 7px;
    background: rgba(56, 189, 248, 0.08);
    cursor: pointer;
}
.public-note-save {
    margin-top: 8px;
}
.public-image-time {
    font-size: 10px;
    color: #64748b;
    margin-top: 8px;
}
.public-image-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.public-image-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 10px;
    background: #f87171;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.55);
    animation: badgePulse 1.6s ease-in-out infinite;
}
.public-paste-zone {
    margin: -2px 0 10px;
    padding: 16px 18px;
    border: 2px dashed rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    color: #38bdf8;
    font-size: 13px;
    text-align: center;
    cursor: text;
    background: rgba(56, 189, 248, 0.04);
}
.public-paste-zone:focus {
    outline: 2px solid rgba(56, 189, 248, 0.6);
    outline-offset: 2px;
    border-color: #38bdf8;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.12); opacity: 1; }
}
@media (max-width: 768px) {
    .public-images-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .public-image-card img {
        max-height: 420px;
    }
}

@media (max-width: 768px) {
    .app-version {
        display: none !important;
    }
}

@media (min-width: 769px) {
    #mobile-cards-container {
        display: none !important;
    }
    #table-view-wrapper {
        display: block !important;
    }
    .swipe-hint {
        display: none !important;
    }
}

/* 减弱动态: 尊重系统"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 时滞抢跑预警与同频建仓标签 */
.tag-lag-warn {
    display: inline-block;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    white-space: nowrap;
}
.tag-lag-good {
    display: inline-block;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    white-space: nowrap;
}
.msc3-subbar .tag-lag-warn,
.msc3-subbar .tag-lag-good {
    margin-left: 0;
    font-size: 11px;
    padding: 2px 6px;
}

/* 公开持仓图片全屏大图查看弹窗: 保证电脑端与移动端完整看清左右两侧内容，不压缩、不截断任何信息 */
#image-view-modal .modal-content,
.public-image-view-modal-content {
    width: min(96vw, 1100px) !important;
    max-width: 1100px !important;
    max-height: 94vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 16px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
}
#image-view-modal #image-view-imgs {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    box-sizing: border-box !important;
}
.public-modal-img-wrap {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    background: rgba(11, 16, 28, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 10px;
    padding: 12px;
    box-sizing: border-box;
}
.public-modal-img-tag {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}
.public-view-tab-btn {
    padding: 5px 14px;
    font-size: 13px;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    background: rgba(15, 23, 42, 0.85);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}
.public-view-tab-btn:hover {
    color: #38bdf8;
    border-color: #38bdf8;
}
.public-view-tab-btn.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border-color: #38bdf8;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}
#image-view-modal #image-view-img,
#image-view-modal #image-view-imgs img {
    max-width: 100% !important;
    max-height: none !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    min-height: 0 !important;
    display: block !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
#image-view-modal #image-view-title {
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    text-align: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}
#image-view-modal #image-view-note {
    margin-top: 10px;
    font-size: 13px;
    color: #cbd5e1;
    text-align: left;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 220px;
    overflow-y: auto;
    padding: 0 4px;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════
   全屏幕自适应增强 (Responsive Adaptive Layout)
   ═══════════════════════════════════════════════════════════════ */

/* 1. 超窄屏手机优化 (<= 380px, 如 iPhone SE) */
@media (max-width: 380px) {
    .header {
        padding: 6px 8px;
    }
    .header-actions {
        gap: 4px;
    }
    .header-actions .btn,
    .header-actions span {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
    .table-controls {
        gap: 6px;
    }
    .btn-filter-bullish {
        font-size: 11px !important;
        padding: 0 6px !important;
        height: 34px !important;
    }
}

/* 2. 平板端与小屏电脑自适应 (600px - 1024px) */
@media (min-width: 600px) and (max-width: 1024px) {
    .header {
        height: auto;
        padding: 6px 12px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .header-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .data-table th,
    .data-table td {
        padding: 7px 6px;
        font-size: 11.5px;
    }
}

/* 3. 笔记本与主流 1080p 缩放显示器自适应 (1025px - 1600px, 如 1536x864 / 1366x768 / 1440x900) */
@media (min-width: 1025px) and (max-width: 1600px) {
    body {
        padding: 4px 8px;
    }
    .app-container {
        gap: 6px;
        min-height: calc(100vh - 8px);
    }
    .header {
        height: 44px;
        padding: 4px 12px;
    }
    .header h1 {
        font-size: 15px;
    }
    .kpi-card {
        padding: 6px 10px;
    }
    .kpi-value {
        font-size: 18px;
    }
    .table-section {
        padding: 8px 12px 10px;
    }
    .data-table th {
        padding: 7px 6px;
        font-size: 11px;
    }
    .data-table td {
        padding: 6px 6px;
        font-size: 11.5px;
    }
}

/* 4. 2K/4K 大屏显示器自适应 (>= 1601px) */
@media (min-width: 1601px) {
    .app-container {
        max-width: 100%;
        padding: 0 12px;
    }
    .data-table th {
        font-size: 12px;
        padding: 9px 10px;
    }
    .data-table td {
        font-size: 12.5px;
        padding: 8px 10px;
    }
}

/* 6. 弹窗在各种屏幕上的自适应 */
.modal-content,
.security-modal-content {
    width: min(94vw, 560px);
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}
@media (max-width: 480px) {
    .modal-content,
    .security-modal-content {
        width: 96vw;
        padding: 16px 14px;
        border-radius: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   公开持仓盈亏走势图 (Modern Tech Slate Glass - No Pitch Black)
   ═══════════════════════════════════════════════════════════════ */
.public-yield-card {
    background: linear-gradient(135deg, #1e293b 0%, #1e2b42 45%, #141f32 100%);
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: 12px;
    padding: 18px 22px;
    box-sizing: border-box;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}
.public-yield-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #38bdf8 30%, #818cf8 70%, transparent);
    pointer-events: none;
}
.yield-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.yield-card-title-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.yield-card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.yield-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}
.yield-card-sub {
    font-size: 11px;
    color: #38bdf8;
    font-weight: 600;
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.25);
}
.yield-card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
/* 分段控制选项卡 (Modern Segmented Pill) */
.yield-mode-tabs {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    padding: 3px;
    gap: 3px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}
.yield-mode-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.yield-mode-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}
.yield-mode-tab.active {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.4);
    font-weight: 700;
}
.yield-admin-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}
.btn-outline {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.16);
}
.btn-outline:hover {
    background: rgba(51, 65, 85, 0.8);
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.5);
}

/* 时间筛选与走势图模式控制工具栏 */
.yield-filter-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.yield-filter-controls {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
}
.yield-time-tabs {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    padding: 3px;
    gap: 2px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
    flex-wrap: wrap;
}
.yield-time-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.yield-time-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}
.yield-time-tab.active {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
    font-weight: 700;
}
.yield-custom-dates {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    padding: 3px 8px;
}
.yield-date-input {
    background: #0b1329;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    color: #f1f5f9;
    font-size: 11.5px;
    font-family: inherit;
    padding: 3px 6px;
    outline: none;
    color-scheme: dark;
    transition: border-color 0.15s;
}
.yield-date-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
.yield-date-sep {
    color: #64748b;
    font-size: 11px;
}
.yield-filter-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.09);
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 6px;
    padding: 3px 10px;
}
.yield-filter-info {
    font-weight: 500;
}
.yield-reset-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.15s;
}
.yield-reset-btn:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
}

/* 核心量化指标卡片网格 (Modern KPI Tiles - No Pitch Black) */
.yield-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.yield-kpi-item {
    background: linear-gradient(145deg, rgba(51, 65, 85, 0.6) 0%, rgba(30, 41, 59, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 11px 13px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}
.yield-kpi-item:hover {
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.yield-kpi-item.yield-kpi-primary {
    background: linear-gradient(145deg, rgba(30, 58, 95, 0.75) 0%, rgba(20, 36, 62, 0.85) 100%);
    border-color: rgba(56, 189, 248, 0.38);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.yield-kpi-label {
    font-size: 11px;
    color: #cbd5e1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}
.yield-kpi-value {
    font-size: 17px;
    font-weight: 700;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}
.highlight-gold {
    color: #fbbf24 !important;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}
.highlight-blue {
    color: #38bdf8 !important;
}

/* 图表容器 (Modern Slate Navy - NOT Pitch Black) */
.yield-chart-container {
    position: relative;
    width: 100%;
    min-height: 240px;
    background: radial-gradient(ellipse at 50% -10%, rgba(56, 189, 248, 0.14) 0%, transparent 65%), linear-gradient(180deg, #1e293b 0%, #131d2e 100%);
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 30px rgba(0, 0, 0, 0.22);
    overflow: visible;
    padding: 10px 12px;
    box-sizing: border-box;
    touch-action: pan-y;
}
.yield-chart-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
    padding: 20px;
}
.yield-chart-svg {
    width: 100%;
    height: 280px;
    display: block;
    overflow: visible;
    user-select: none;
    -webkit-user-select: none;
}
.yield-point {
    cursor: pointer;
    transition: r 0.15s ease, stroke-width 0.15s ease;
}
.yield-point:hover {
    r: 6;
    stroke-width: 3;
}
.yield-bar {
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.yield-bar:hover {
    opacity: 0.95;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
}

/* 终点高能脉冲呼吸环 (Modern Real-time Beacon) */
@keyframes yieldBeaconPulse {
    0% {
        r: 4.5;
        opacity: 0.95;
    }
    60% {
        r: 11;
        opacity: 0.35;
    }
    100% {
        r: 17;
        opacity: 0;
    }
}
.yield-beacon-ring {
    animation: yieldBeaconPulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
    pointer-events: none;
}
.yield-latest-badge {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
    pointer-events: none;
}

/* 图表悬浮卡片 (Modern Luminous Tooltip) */
.yield-chart-tooltip {
    position: absolute;
    pointer-events: auto;
    cursor: default;
    z-index: 100;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    color: #f8fafc;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 16px rgba(56, 189, 248, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: none;
    transition: opacity 0.12s ease;
    white-space: nowrap;
    line-height: 1.55;
    box-sizing: border-box;
    max-width: min(340px, calc(100% - 16px));
}

/* 悬浮框内部的专用跳转框 (The Inner Action Box inside Tooltip) */
.yield-tooltip-action-box {
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 7px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.35), rgba(56, 189, 248, 0.25));
    border: 1.5px solid rgba(56, 189, 248, 0.7);
    color: #38bdf8;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    user-select: none;
    -webkit-user-select: none;
}
.yield-tooltip-action-box:hover {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    border-color: #7dd3fc;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.55);
    transform: translateY(-1.5px);
}
.yield-tooltip-action-box:active {
    transform: translateY(0) scale(0.98);
}

/* 正负号快速切换按钮 (Quick Sign Toggle) */
.yield-sign-toggle {
    display: inline-flex;
    gap: 4px;
}
.btn-sign {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(51, 65, 85, 0.4);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #cbd5e1;
}
.btn-sign-pos:hover, .btn-sign-pos.active {
    background: rgba(248, 113, 113, 0.25);
    border-color: #f87171;
    color: #f87171;
}
.btn-sign-neg:hover, .btn-sign-neg.active {
    background: rgba(74, 222, 128, 0.25);
    border-color: #4ade80;
    color: #4ade80;
}

/* 颜色工具类 (国内A股标准: 红涨绿跌) */
.text-red { color: #f87171 !important; }
.text-green { color: #4ade80 !important; }

/* 公开持仓与走势图衔接栏 (Public Holdings Bridge Bar) */
.public-bridge-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(20, 31, 48, 0.85));
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.public-bridge-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.public-bridge-title {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.2px;
}
.public-bridge-badge {
    font-size: 11px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}
.public-bridge-right {
    font-size: 11px;
    color: #94a3b8;
}
.public-card-yield-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.2px;
    margin-left: 6px;
}
.yield-badge-pos {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.4);
}
.yield-badge-neg {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.4);
}
.yield-badge-flat {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}
/* 卡片联动高亮光环动画 */
@keyframes cardPulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.85), 0 0 20px rgba(56, 189, 248, 0.6);
        border-color: #38bdf8 !important;
        transform: scale(1.008);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.45), 0 0 30px rgba(56, 189, 248, 0.8);
        border-color: #38bdf8 !important;
        transform: scale(1.008);
    }
    100% {
        box-shadow: none;
        transform: scale(1);
    }
}
.card-highlight-pulse {
    animation: cardPulseGlow 1.6s ease-out;
}

/* ════════════ 手机端 UI 深度适配 (Mobile Breakpoints) ════════════ */
@media (max-width: 768px) {
    .public-yield-card {
        padding: 9px 11px;
        margin-bottom: 8px;
        border-radius: 10px;
    }
    .yield-card-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
        margin-bottom: 6px;
    }
    .yield-card-title-group {
        justify-content: flex-start;
        width: auto;
        gap: 6px;
    }
    .yield-card-title {
        font-size: 13px;
    }
    .yield-card-sub {
        font-size: 9.5px;
        padding: 1px 5px;
    }
    .yield-card-actions {
        width: auto;
        gap: 4px;
    }
    .yield-mode-tabs {
        padding: 2px;
        gap: 2px;
    }
    .yield-mode-tab {
        padding: 3px 6px;
        font-size: 10.5px;
    }
    .yield-admin-actions {
        gap: 4px;
    }
    .yield-admin-actions .btn {
        padding: 3px 6px;
        font-size: 10.5px;
    }
    .yield-filter-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }
    .yield-filter-controls {
        display: flex;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
        padding-bottom: 2px;
    }
    .yield-filter-controls::-webkit-scrollbar {
        display: none;
    }
    .yield-time-tabs {
        flex-shrink: 0;
        padding: 2px;
        gap: 1.5px;
        flex-wrap: nowrap;
    }
    .yield-time-tab {
        padding: 2.5px 6px;
        font-size: 10.5px;
        white-space: nowrap;
    }
    .yield-custom-dates {
        flex-shrink: 0;
        padding: 2px 5px;
        gap: 4px;
    }
    .yield-date-input {
        font-size: 10.5px;
        padding: 2px 4px;
        max-width: 105px;
    }
    .yield-filter-status {
        padding: 3px 8px;
        font-size: 10.5px;
        width: 100%;
        box-sizing: border-box;
        justify-content: space-between;
    }
    /* 手机端 KPI 指标紧凑优化 - 节约垂直屏高 */
    .yield-kpi-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
        margin-bottom: 6px;
    }
    .yield-kpi-item.yield-kpi-primary {
        grid-column: span 3;
        padding: 5px 7px;
        gap: 1px;
        border-radius: 6px;
    }
    .yield-kpi-item.yield-kpi-primary .yield-kpi-label {
        font-size: 9.5px;
    }
    .yield-kpi-item.yield-kpi-primary .yield-kpi-value {
        font-size: 13.5px;
    }
    .yield-kpi-item:not(.yield-kpi-primary) {
        grid-column: span 2;
        padding: 4px 5px;
        gap: 1px;
        border-radius: 6px;
    }
    .yield-kpi-item:not(.yield-kpi-primary) .yield-kpi-label {
        font-size: 8.5px;
    }
    .yield-kpi-item:not(.yield-kpi-primary) .yield-kpi-value {
        font-size: 11px;
    }
    .yield-chart-container {
        padding: 4px 6px;
        min-height: 165px;
        border-radius: 8px;
    }
    .yield-chart-svg {
        height: 170px;
    }
    /* 手机端走势图悬浮卡片轻量化：不挡数据、点击穿透、极简紧凑 */
    .yield-chart-tooltip {
        padding: 5px 8px;
        font-size: 10.5px;
        border-radius: 8px;
        max-width: 220px;
        line-height: 1.35;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 10px rgba(56, 189, 248, 0.2);
        pointer-events: none; /* 卡片本身不拦截触摸，触摸穿透至下方的图表点位 */
    }
    .yield-chart-tooltip .yield-tooltip-action-box,
    .yield-chart-tooltip .yield-tooltip-close-btn {
        pointer-events: auto; /* 仅内部操作按钮响应触摸点击 */
    }
    .yield-tooltip-action-box.yield-tooltip-action-mobile {
        margin-top: 4px;
        padding: 3px 8px;
        font-size: 10.5px;
        border-radius: 5px;
    }
    .public-bridge-bar {
        padding: 6px 10px;
        margin-bottom: 8px;
        border-radius: 7px;
    }
    .public-bridge-title {
        font-size: 12px;
    }
    .public-bridge-tip {
        font-size: 10px;
    }
}


