:root {
    --bg: #07111f;
    --bg-elevated: #0b1627;
    --surface: rgba(12, 22, 38, 0.82);
    --surface-strong: rgba(15, 29, 49, 0.96);
    --surface-soft: rgba(120, 168, 255, 0.08);
    --border: rgba(139, 179, 255, 0.16);
    --border-strong: rgba(139, 179, 255, 0.3);
    --text: #ecf3ff;
    --muted: #93a4c2;
    --green: #34d399;
    --red: #fb7185;
    --accent: #78a8ff;
    --accent-strong: #96c2ff;
    --shadow: 0 24px 80px rgba(2, 8, 18, 0.55);
    --glow: radial-gradient(circle at top, rgba(120, 168, 255, 0.22), transparent 36%), radial-gradient(circle at 85% 18%, rgba(52, 211, 153, 0.12), transparent 22%);
}

* {
    box-sizing: border-box;
}

.is-hidden {
    display: none !important;
}

html {
    background:
        radial-gradient(circle at top left, rgba(120, 168, 255, 0.12), transparent 28%),
        radial-gradient(circle at 85% 15%, rgba(52, 211, 153, 0.1), transparent 18%),
        linear-gradient(180deg, #09111d 0%, #07111f 52%, #050b14 100%);
    min-height: 100%;
}

body {
    background: transparent;
    color: var(--text);
    font-family: "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
    margin: 0;
    min-height: 100vh;
    line-height: 1.5;
}

a {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
    position: relative;
}

.app-shell-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: var(--glow);
    opacity: 0.9;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 18px 32px;
    backdrop-filter: blur(18px);
    background: rgba(7, 17, 31, 0.72);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    gap: 2px;
}

.brand-mark {
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    transition: 180ms ease;
}

.nav-link:hover {
    color: var(--text);
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.nav-auth-area {
    margin-left: auto;
}

.nav-cta,
.nav-ghost-btn,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-cta,
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #07111f;
    border: none;
    box-shadow: 0 14px 28px rgba(120, 168, 255, 0.22);
    cursor: pointer;
}

.nav-ghost-btn {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
}

.danger-btn {
    color: #fecdd3;
    border-color: rgba(251, 113, 133, 0.36);
    background: rgba(251, 113, 133, 0.08);
}

.danger-btn:hover {
    border-color: rgba(251, 113, 133, 0.58);
    background: rgba(251, 113, 133, 0.14);
}

.nav-cta:hover,
.nav-ghost-btn:hover,
.btn-primary:hover {
    transform: translateY(-1px);
}

.app-page-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.page-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-kicker {
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.page-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.page-description {
    color: var(--muted);
    margin: 10px 0 0;
    max-width: 640px;
    font-size: 15px;
}

.page-meta {
    color: var(--muted);
    text-align: right;
    font-size: 13px;
}

/* Dash DatePicker uses react-dates. Keep the calendar grid at a fixed width so
   global box-sizing/layout rules do not squeeze Saturday/Sunday hit areas. */
.SingleDatePicker_picker,
.DateRangePicker_picker {
    z-index: 50;
}

.DayPicker {
    width: 318px !important;
    min-width: 318px;
    color: #17233f;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 56px rgba(2, 8, 18, 0.28);
}

.DayPicker_transitionContainer,
.CalendarMonthGrid,
.CalendarMonth {
    width: 318px !important;
    min-width: 318px;
}

.CalendarMonth {
    padding: 0 12px 12px !important;
    background: #ffffff;
}

.CalendarMonth_table {
    width: 294px !important;
    min-width: 294px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.DayPicker_weekHeader {
    top: 58px;
    width: 294px !important;
    padding: 0 12px !important;
}

.DayPicker_weekHeader_ul {
    display: grid;
    grid-template-columns: repeat(7, 42px);
    width: 294px;
    margin: 0;
    padding: 0;
}

.DayPicker_weekHeader_li {
    width: 42px !important;
    color: #6b7890;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.CalendarDay {
    width: 42px !important;
    min-width: 42px;
    height: 38px !important;
    padding: 0 !important;
    line-height: 38px !important;
    text-align: center;
    vertical-align: middle;
}

.CalendarDay__default {
    border-color: #edf1f7;
    color: #17233f;
}

.CalendarDay__default:hover {
    background: #eef4ff;
    border-color: #d7e6ff;
    color: #2468db;
}

.CalendarDay__selected,
.CalendarDay__selected:active,
.CalendarDay__selected:hover {
    background: #3377ee;
    border-color: #3377ee;
    color: #ffffff;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card,
.market-card,
.hero-panel {
    background: linear-gradient(180deg, rgba(14, 27, 46, 0.96) 0%, rgba(10, 20, 34, 0.94) 100%);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.hero-panel {
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(15, 29, 49, 0.98) 0%, rgba(10, 20, 34, 0.94) 100%),
        radial-gradient(circle at top right, rgba(120, 168, 255, 0.12), transparent 30%);
}

.market-card {
    position: relative;
    overflow: hidden;
    min-height: 144px;
}

.market-card::after {
    content: "";
    position: absolute;
    inset: auto -20px -30px auto;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(120, 168, 255, 0.2), transparent 70%);
}

.metric-label {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

.metric-change {
    font-size: 15px;
    font-weight: 600;
}

.quote-update-time {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.quote-time-cell {
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ai-float-link {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    border: 1px solid rgba(120, 168, 255, 0.42);
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #07111f;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 18px 42px rgba(120, 168, 255, 0.28);
    cursor: pointer;
}

.ai-context-title {
    font-size: 22px;
    letter-spacing: 0;
}

.ai-chat-card {
    min-height: 360px;
    margin-bottom: 18px;
}

.ai-message-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-message {
    max-width: 78%;
    padding: 16px 18px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 18px;
    background: rgba(7, 17, 31, 0.54);
}

.ai-message-user {
    align-self: flex-end;
    border-color: rgba(52, 211, 153, 0.28);
    background: rgba(52, 211, 153, 0.1);
}

.ai-message-role {
    margin-bottom: 8px;
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ai-message-content {
    color: var(--text);
    white-space: pre-wrap;
    line-height: 1.7;
}

.ai-chat-compose {
    display: grid;
    gap: 14px;
}

.ai-quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ai-chat-input {
    min-height: 104px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(7, 17, 31, 0.7);
    color: var(--text);
    font-family: inherit;
    resize: vertical;
}

.ai-chat-send {
    justify-self: end;
    min-width: 120px;
}

.price-up {
    color: var(--green);
}

.price-down {
    color: var(--red);
}

.funds-page .price-up {
    color: var(--red);
}

.funds-page .price-down {
    color: var(--green);
}

.table-shell {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(139, 179, 255, 0.12);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(120, 168, 255, 0.08);
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(139, 179, 255, 0.1);
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.login-page {
    min-height: calc(100vh - 110px);
    display: grid;
    place-items: center;
    padding: 32px 0;
}

.login-shell {
    width: min(460px, 100%);
}

.login-card {
    padding: 34px;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--accent-strong);
    background: rgba(120, 168, 255, 0.08);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.login-title {
    font-size: 40px;
    margin: 0 0 10px;
    letter-spacing: -0.05em;
}

.login-subtitle {
    color: var(--muted);
    margin: 0 0 26px;
}

.login-tabs {
    margin-bottom: 22px;
}

.login-tabs .tab {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.login-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px !important;
    margin-right: 10px;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--muted) !important;
    border-radius: 999px !important;
    transition: 160ms ease;
}

.login-tab--selected {
    border-color: var(--border-strong) !important;
    color: var(--text) !important;
    background: rgba(120, 168, 255, 0.1) !important;
}

.login-card input {
    width: 100%;
    margin-bottom: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-card input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(120, 168, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.login-card ::placeholder {
    color: #6f84a8;
}

.section-title {
    margin: 0 0 16px;
    font-size: 20px;
}

.muted-text {
    color: var(--muted);
}

.backtest-engine-section {
    margin-bottom: 14px;
}

.backtest-select {
    margin-bottom: 0;
}

.backtest-select .Select-control {
    min-height: 52px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
    box-shadow: none;
}

.backtest-select .Select-control:hover {
    border-color: var(--border-strong);
}

.backtest-select.is-focused > .Select-control {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(120, 168, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.backtest-select .Select-placeholder,
.backtest-select .Select--single > .Select-control .Select-value,
.backtest-select .Select-input,
.backtest-select .Select-arrow-zone,
.backtest-select .Select-clear-zone {
    height: 50px;
    line-height: 50px;
}

.backtest-select .Select-placeholder,
.backtest-select .Select-value-label {
    color: var(--text) !important;
    font-size: 14px;
}

.backtest-select .Select-input > input {
    color: var(--text);
}

.backtest-select .Select-arrow {
    border-top-color: var(--muted);
}

.backtest-select.is-open .Select-arrow {
    border-bottom-color: var(--muted);
}

.backtest-select .Select-menu-outer {
    margin-top: 8px;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: rgba(11, 22, 39, 0.98);
    box-shadow: 0 24px 48px rgba(2, 8, 18, 0.38);
    overflow: hidden;
}

.backtest-select .Select-option {
    padding: 12px 14px;
    color: var(--text);
    background: transparent;
    border-bottom: 1px solid rgba(139, 179, 255, 0.08);
}

.backtest-select .Select-option:last-child {
    border-bottom: none;
}

.backtest-select .Select-option.is-focused {
    background: rgba(120, 168, 255, 0.1);
}

.backtest-select .Select-option.is-selected {
    background: rgba(120, 168, 255, 0.16);
    color: var(--accent-strong);
    font-weight: 600;
}

.backtest-engine-help {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    background: rgba(120, 168, 255, 0.06);
}

.backtest-engine-help-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.backtest-engine-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(120, 168, 255, 0.14);
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.backtest-engine-help-name {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.backtest-engine-help-text {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.funds-grid {
    display: grid;
    grid-template-columns: minmax(600px, 660px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.fund-watchlist,
.fund-detail-panel {
    min-height: 420px;
}

.fund-empty-state {
    margin-top: 12px;
    border-radius: 18px;
    border: 1px dashed rgba(139, 179, 255, 0.22);
    background: rgba(255, 255, 255, 0.02);
    padding: 18px 16px;
    text-align: center;
}

.fund-empty-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.fund-empty-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.error-text {
    color: var(--red);
    margin-top: 12px;
    text-align: center;
}

.fund-watchlist-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.fund-add-input {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(139, 179, 255, 0.18);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    outline: none;
    box-sizing: border-box;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.fund-add-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(120, 168, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.fund-add-input::placeholder {
    color: #6f84a8;
}

.fund-add-btn {
    flex-shrink: 0;
    min-width: 76px;
}

.stock-suggestion-list {
    display: grid;
    gap: 8px;
    margin: -2px 0 12px;
}

.stock-suggestion-btn {
    width: 100%;
    min-height: 46px;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.stock-suggestion-btn:hover {
    border-color: rgba(120, 168, 255, 0.38);
    background: rgba(120, 168, 255, 0.08);
}

.stock-suggestion-symbol {
    color: var(--accent-strong);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.stock-suggestion-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-suggestion-pinyin {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.watchlist-group-controls {
    margin-top: 10px;
}

.watchlist-group-row {
    padding: 12px 14px !important;
    background: rgba(120, 168, 255, 0.08);
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.watchlist-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 268px;
}

.watchlist-icon-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
}

.watchlist-group-dropdown {
    min-width: 112px;
    font-size: 12px;
}

.stock-history-panel {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(139, 179, 255, 0.12);
    background: rgba(255, 255, 255, 0.018);
}

.stock-history-empty {
    margin-top: 16px;
    padding: 22px;
    border-radius: 16px;
    border: 1px dashed rgba(139, 179, 255, 0.2);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.stock-history-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.stock-history-title {
    color: var(--text);
    font-size: 16px;
    font-weight: 850;
}

.stock-history-graph {
    min-height: 260px;
    border-radius: 16px;
    border: 1px solid rgba(139, 179, 255, 0.1);
    background: rgba(255, 255, 255, 0.012);
    overflow: hidden;
}

.stock-history-table {
    display: grid;
    grid-template-columns: minmax(90px, 1.2fr) repeat(4, minmax(72px, 1fr));
    gap: 0 10px;
    margin-top: 14px;
    border-radius: 16px;
    border: 1px solid rgba(139, 179, 255, 0.12);
    overflow: hidden;
}

.stock-history-head-cell,
.stock-history-cell {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(139, 179, 255, 0.08);
}

.stock-history-head-cell {
    background: rgba(120, 168, 255, 0.08);
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
}

.stock-history-cell {
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.stock-history-head-cell--num,
.stock-history-cell--num {
    text-align: right;
}

.fund-watchlist .error-text {
    text-align: left;
    margin-top: 4px;
    min-height: 18px;
}

.fund-watchlist-table {
    margin-top: 12px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(139, 179, 255, 0.12);
    background: rgba(255, 255, 255, 0.01);
}

.fund-watchlist-headrow {
    display: grid;
    grid-template-columns: minmax(176px, 1fr) minmax(58px, 0.34fr) minmax(66px, 0.36fr) auto;
    padding: 12px 14px;
    gap: 10px;
    background: rgba(120, 168, 255, 0.08);
    border-bottom: 1px solid rgba(139, 179, 255, 0.1);
}

.fund-watchlist-col {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    white-space: nowrap;
}

.fund-watchlist-col--nav,
.fund-watchlist-col--pct,
.fund-watchlist-col--action {
    text-align: right;
}

.fund-watchlist-body {
    display: flex;
    flex-direction: column;
}

.fund-watch-group-row {
    padding: 12px 14px;
    background: rgba(120, 168, 255, 0.08);
    border-bottom: 1px solid rgba(139, 179, 255, 0.1);
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.fund-watch-row-shell {
    display: grid;
    grid-template-columns: minmax(176px, 1fr) minmax(58px, 0.34fr) minmax(66px, 0.36fr) auto;
    gap: 10px;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid rgba(139, 179, 255, 0.08);
}

.fund-watch-row {
    grid-column: 1 / 4;
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    display: grid;
    grid-template-columns: minmax(176px, 1fr) minmax(58px, 0.34fr) minmax(66px, 0.36fr);
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.fund-watch-action {
    display: flex;
    justify-content: flex-end;
}

.fund-watch-action .watchlist-actions {
    gap: 6px;
    min-width: 0;
}

.fund-watch-action .watchlist-icon-btn {
    width: 28px;
    min-width: 28px;
    height: 28px;
}

.fund-watch-action .watchlist-group-dropdown {
    min-width: 88px;
    max-width: 108px;
}

.fund-watch-action .btn-ghost:not(.watchlist-icon-btn) {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
}

.fund-watch-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.fund-watch-row:active {
    transform: translateY(0.5px);
}

.fund-watch-row.is-selected {
    background: rgba(120, 168, 255, 0.08);
    border-bottom-color: rgba(120, 168, 255, 0.14);
}

.fund-watch-row.is-error {
    background: rgba(255, 255, 255, 0.012);
}

.fund-watch-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fund-watch-code {
    width: fit-content;
    max-width: 100%;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(120, 168, 255, 0.1);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
    white-space: nowrap;
}

.fund-watch-name {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.35;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.fund-watch-update {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #6f84a8;
    font-size: 11px;
    line-height: 1.3;
}

.fund-watch-update-label {
    flex-shrink: 0;
    color: var(--accent-strong);
    font-weight: 700;
}

.fund-watch-error {
    font-size: 11px;
    color: var(--red);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fund-watch-error:empty {
    display: none;
}

.fund-watch-cell {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    text-align: right;
    white-space: nowrap;
}

.fund-watch-time-stack {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    line-height: 1.3;
}

.fund-watch-time-date,
.fund-watch-time-clock,
.fund-watch-time-single {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fund-watch-time-date {
    font-size: 11px;
}

.fund-watch-time-clock,
.fund-watch-time-single {
    font-size: 11px;
}

.fund-watch-row:last-child {
    border-bottom: none;
}

.fund-watch-row-shell:last-child {
    border-bottom: none;
}

.fund-detail-status {
    min-height: 20px;
}

.fund-range-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.fund-range-tab-label {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.fund-range-tab-label:has(.fund-range-tab-input:checked) {
    border-color: rgba(51, 119, 238, 0.64);
    background: rgba(51, 119, 238, 0.16);
    color: var(--text);
}

.fund-range-tab-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fund-status-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.fund-status-tip--warn {
    border: 1px solid rgba(251, 113, 133, 0.26);
    background: rgba(251, 113, 133, 0.08);
    color: rgba(236, 243, 255, 0.92);
}

.fund-detail-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fund-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.fund-detail-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fund-detail-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.fund-detail-code {
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
}

.fund-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.fund-detail-meta-label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.fund-detail-meta-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.fund-detail-metrics {
    border-radius: 18px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
}

.fund-detail-metric-label {
    margin-bottom: 10px;
}

.fund-detail-metric-value {
    font-size: 34px;
    margin-bottom: 8px;
}

.fund-detail-change {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.fund-detail-change-pct {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
}

.fund-info-list {
    border-radius: 18px;
    border: 1px solid rgba(139, 179, 255, 0.12);
    background: rgba(255, 255, 255, 0.01);
    overflow: hidden;
}

.fund-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(139, 179, 255, 0.08);
}

.fund-info-row:last-child {
    border-bottom: none;
}

.fund-info-label {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.02em;
}

.fund-info-value {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fund-history-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 2px;
}

.fund-holdings-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.fund-history-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.fund-history-title {
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
}

.fund-history-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.fund-history-graph {
    min-height: 260px;
    border-radius: 18px;
    border: 1px solid rgba(139, 179, 255, 0.12);
    background: rgba(255, 255, 255, 0.015);
    overflow: hidden;
}

.fund-history-table {
    border-radius: 18px;
    border: 1px solid rgba(139, 179, 255, 0.12);
    overflow: hidden;
}

.fund-holdings-table {
    border-radius: 18px;
    border: 1px solid rgba(139, 179, 255, 0.12);
    overflow: hidden;
}

.fund-holding-head,
.fund-holding-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.4fr) minmax(72px, 0.8fr) minmax(72px, 0.8fr);
    gap: 10px;
    align-items: center;
}

.fund-holding-head {
    padding: 11px 14px;
    background: rgba(120, 168, 255, 0.08);
    border-bottom: 1px solid rgba(139, 179, 255, 0.1);
}

.fund-holding-row {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(139, 179, 255, 0.08);
}

.fund-holding-row:last-child {
    border-bottom: none;
}

.fund-holding-main {
    min-width: 0;
}

.fund-holding-name {
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fund-holding-meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.fund-holding-head-cell {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.fund-holding-cell {
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.fund-holding-head-cell--num,
.fund-holding-cell--num {
    text-align: right;
}

.fund-history-head,
.fund-history-row {
    display: grid;
    grid-template-columns: minmax(90px, 1.2fr) repeat(3, minmax(72px, 1fr));
    gap: 10px;
    align-items: center;
}

.fund-history-head {
    padding: 11px 14px;
    background: rgba(120, 168, 255, 0.08);
    border-bottom: 1px solid rgba(139, 179, 255, 0.1);
}

.fund-history-row {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(139, 179, 255, 0.08);
}

.fund-history-row:last-child {
    border-bottom: none;
}

.fund-history-head-cell {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.fund-history-cell {
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.fund-history-head-cell--num,
.fund-history-cell--num {
    text-align: right;
}

.fund-history-body {
    max-height: 420px;
    overflow: auto;
}

.fund-history-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    border-radius: 18px;
    border: 1px dashed rgba(139, 179, 255, 0.18);
    color: var(--muted);
    font-size: 13px;
}

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

.nav-user-email {
    color: var(--muted);
    font-size: 13px;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users-page .error-text {
    text-align: left;
    margin-top: 0;
    margin-bottom: 16px;
}

.users-grid {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.user-side-card,
.user-main-card,
.user-reset-card {
    min-height: 220px;
}

.user-form-input {
    width: 100%;
    margin-bottom: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 14px;
    box-sizing: border-box;
    outline: none;
}

.user-form-message {
    min-height: 20px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.user-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.user-refresh-btn {
    min-width: 76px;
}

.user-table {
    margin-top: 12px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(139, 179, 255, 0.12);
    background: rgba(255, 255, 255, 0.01);
}

.user-table-head,
.user-row {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) 120px 120px minmax(260px, 300px);
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
}

.user-table-head {
    background: rgba(120, 168, 255, 0.08);
    border-bottom: 1px solid rgba(139, 179, 255, 0.1);
}

.user-table-col {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.user-table-col--actions {
    text-align: right;
}

.user-table-body {
    display: flex;
    flex-direction: column;
}

.user-row {
    border-bottom: 1px solid rgba(139, 179, 255, 0.08);
}

.user-row:last-child {
    border-bottom: none;
}

.user-row-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-row-name {
    font-size: 14px;
    font-weight: 700;
}

.user-row-email {
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-row-cell {
    display: flex;
    align-items: center;
}

.user-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.user-action-btn {
    min-width: 88px;
}

.user-delete-btn {
    color: #ff9f9f;
    border-color: rgba(255, 128, 128, 0.28);
}

.user-delete-btn:disabled {
    color: rgba(166, 178, 204, 0.55);
    border-color: rgba(139, 179, 255, 0.12);
    cursor: not-allowed;
    opacity: 0.65;
}

.user-delete-card {
    margin-top: 16px;
}

.user-delete-target {
    min-height: 72px;
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 128, 128, 0.2);
    background: rgba(255, 128, 128, 0.045);
    color: var(--muted);
}

.user-delete-name {
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
    margin-top: 6px;
}

.user-delete-email {
    color: #ffb3b3;
    font-size: 13px;
    font-weight: 700;
    margin: 3px 0 8px;
    overflow-wrap: anywhere;
}

.user-delete-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-danger {
    border: 1px solid rgba(255, 128, 128, 0.42);
    background: rgba(255, 91, 91, 0.14);
    color: #ffd6d6;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.btn-danger:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(139, 179, 255, 0.18);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
    font-weight: 600;
}

.user-chip.is-admin {
    color: var(--accent-strong);
    border-color: rgba(120, 168, 255, 0.28);
    background: rgba(120, 168, 255, 0.1);
}

.user-chip.is-active {
    color: var(--green);
    border-color: rgba(52, 211, 153, 0.22);
    background: rgba(52, 211, 153, 0.08);
}

.user-chip.is-inactive {
    color: var(--red);
    border-color: rgba(251, 113, 133, 0.22);
    background: rgba(251, 113, 133, 0.08);
}

.user-reset-target {
    margin: 8px 0 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.report-hero-time {
    font-size: 26px;
}

.report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin: -8px 0 18px;
}

.report-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.report-history-card {
    position: sticky;
    top: 102px;
}

.report-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-history-item {
    width: 100%;
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: 160ms ease;
}

.report-history-item:hover,
.report-history-item.is-active {
    border-color: rgba(120, 168, 255, 0.42);
    background: rgba(120, 168, 255, 0.1);
}

.report-history-date,
.report-history-type,
.report-history-summary {
    display: block;
}

.report-history-date {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.report-history-type {
    margin-top: 2px;
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 700;
}

.report-history-summary {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.report-empty {
    padding: 18px;
    border: 1px dashed rgba(139, 179, 255, 0.22);
    border-radius: 16px;
}

.report-empty-title {
    color: var(--text);
    font-weight: 800;
    margin-bottom: 6px;
}

.report-detail-card {
    min-height: 520px;
}

.report-detail-head,
.news-brief-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.copy-clipboard {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(45, 212, 191, 0.26);
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.12);
    color: #a7f3d0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.copy-clipboard:hover {
    border-color: rgba(45, 212, 191, 0.58);
    background: rgba(20, 184, 166, 0.2);
    transform: translateY(-1px);
}

.report-title {
    margin: 0;
    color: var(--text);
    font-size: 28px;
    line-height: 1.2;
}

.report-meta-line {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
}

.report-summary {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid rgba(45, 212, 191, 0.18);
    border-radius: 16px;
    background: rgba(20, 184, 166, 0.08);
    color: #dffcf7;
    font-size: 15px;
}

.report-factor-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 20px;
}

.report-factor-badge {
    min-height: 90px;
    padding: 14px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
}

.report-factor-value {
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
}

.warning-text {
    color: #fbbf24;
    font-size: 13px;
}

.report-markdown {
    margin-top: 18px;
    padding-top: 8px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.78;
    user-select: text;
}

.report-markdown h1,
.report-markdown h2,
.report-markdown h3 {
    margin: 26px 0 12px;
    color: var(--text);
    letter-spacing: 0;
    line-height: 1.25;
}

.report-markdown h1 {
    font-size: 24px;
}

.report-markdown h2 {
    font-size: 20px;
}

.report-markdown h3 {
    font-size: 17px;
}

.report-markdown p,
.report-markdown li {
    color: #dce8f8;
}

.report-markdown ul,
.report-markdown ol {
    margin: 12px 0 18px;
    padding-left: 22px;
}

.report-markdown li {
    margin: 7px 0;
}

.report-markdown strong {
    color: #ffffff;
    font-weight: 800;
}

.report-markdown pre {
    overflow-x: auto;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid rgba(139, 179, 255, 0.16);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.7);
}

.report-markdown code {
    border-radius: 6px;
    padding: 2px 6px;
    background: rgba(2, 6, 23, 0.7);
    color: #bae6fd;
}

.report-markdown blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 4px solid rgba(45, 212, 191, 0.72);
    background: rgba(20, 184, 166, 0.08);
    color: var(--muted);
}

.report-markdown table {
    width: 100%;
    margin: 18px 0;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid rgba(139, 179, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.report-markdown th,
.report-markdown td {
    padding: 11px 12px;
    border-top: 1px solid rgba(139, 179, 255, 0.12);
    color: #dce8f8;
    text-align: left;
    vertical-align: top;
}

.report-markdown th {
    border-top: 0;
    color: #ffffff;
    background: rgba(20, 184, 166, 0.12);
    font-weight: 800;
}

.news-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.news-workspace {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.news-sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 18px;
    min-height: 620px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(13, 25, 43, 0.98), rgba(7, 17, 31, 0.94));
    box-shadow: var(--shadow);
}

.news-side-kicker {
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.news-side-title {
    margin: -8px 0 0;
    color: var(--text);
    font-size: 25px;
    line-height: 1.18;
}

.news-side-menu {
    display: grid;
    gap: 10px;
}

.news-side-channel {
    width: 100%;
    min-height: 74px;
    padding: 13px 14px;
    border: 1px solid rgba(139, 179, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.news-side-channel:hover {
    transform: translateY(-1px);
    border-color: rgba(139, 179, 255, 0.28);
}

.news-side-channel.is-active {
    border-color: rgba(45, 212, 191, 0.46);
    background: rgba(20, 184, 166, 0.12);
}

.news-side-label,
.news-side-desc {
    display: block;
}

.news-side-label {
    font-size: 15px;
    font-weight: 900;
}

.news-side-desc {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.news-side-today {
    align-self: end;
    padding-top: 14px;
    border-top: 1px solid rgba(139, 179, 255, 0.12);
}

.news-main-panel {
    min-width: 0;
}

.news-page-hero {
    margin-bottom: 20px;
}

.news-channel-label {
    margin-bottom: 6px;
    color: var(--text);
    font-size: 26px;
    font-weight: 900;
    line-height: 1.12;
}

.news-private-empty {
    min-height: 240px;
}

.news-session-btn {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
}

.news-session-btn.is-active {
    border-color: rgba(45, 212, 191, 0.5);
    background: rgba(20, 184, 166, 0.14);
    color: #a7f3d0;
}

.news-filter-dropdown {
    min-width: 150px;
    color: #07111f;
}

.news-private-source-filter {
    min-width: 190px;
}

.news-filter-dropdown .Select-control {
    min-height: 42px;
    border-radius: 999px;
    border-color: rgba(139, 179, 255, 0.2);
    background: rgba(236, 243, 255, 0.96);
}

.news-filter-dropdown .Select-placeholder,
.news-filter-dropdown .Select-value-label {
    line-height: 40px;
}

.news-date-picker .DateInput,
.news-date-picker .SingleDatePickerInput {
    background: rgba(236, 243, 255, 0.96);
}

.news-date-picker .SingleDatePickerInput {
    min-height: 42px;
    border: 1px solid rgba(139, 179, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
}

.news-date-picker .DateInput_input {
    width: 132px;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: #07111f;
    font-size: 14px;
    font-weight: 700;
}

.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.news-layout.is-source-channel {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.news-layout.is-source-channel #news-brief {
    display: none;
}

.news-brief-card {
    min-height: 520px;
}

.news-brief-title {
    margin: 0;
    color: var(--text);
    font-size: 30px;
    line-height: 1.2;
}

.news-point-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.news-point {
    min-height: 112px;
    padding: 14px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
}

.news-point-category {
    margin-bottom: 8px;
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.news-point-title {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
}

.news-feed-shell {
    min-width: 0;
}

.news-list-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.news-list-copy {
    width: 34px;
    height: 34px;
}

.news-list {
    display: grid;
    gap: 14px;
}

.news-item-card {
    padding: 18px;
}

.news-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.news-tag,
.news-impact {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.news-tag {
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(125, 211, 252, 0.18);
}

.news-source-tag {
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(216, 180, 254, 0.18);
}

.news-custom-tag {
    color: #ccfbf1;
    background: rgba(20, 184, 166, 0.1);
    border-color: rgba(94, 234, 212, 0.18);
}

.news-impact {
    color: #dbeafe;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.news-impact-high {
    color: #fecdd3;
    background: rgba(251, 113, 133, 0.12);
    border-color: rgba(251, 113, 133, 0.22);
}

.news-impact-low {
    color: #bbf7d0;
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.18);
}

.news-item-title {
    display: block;
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.42;
    text-decoration: none;
}

.news-item-title:hover {
    color: var(--accent-strong);
}

.news-item-summary-box {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid rgba(139, 179, 255, 0.16);
    border-radius: 8px;
    background: rgba(139, 179, 255, 0.06);
}

.news-item-summary-label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-bottom: 8px;
    padding: 0 9px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(96, 165, 250, 0.16);
    font-size: 12px;
    font-weight: 800;
}

.news-item-summary {
    margin: 0;
    color: #dce8f8;
    font-size: 14px;
    line-height: 1.65;
}

.news-item-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.news-source-url-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 8px;
    background: rgba(139, 179, 255, 0.06);
}

.news-source-url-label {
    color: #93c5fd;
    font-size: 12px;
    font-weight: 800;
}

.news-source-url-link {
    min-width: 0;
    overflow: hidden;
    color: #dbeafe;
    font-size: 12px;
    line-height: 1.45;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-source-url-link:hover {
    color: var(--accent-strong);
}

.news-source-url-link.is-empty {
    color: var(--muted);
    cursor: default;
}

.news-url-copy {
    width: 28px;
    height: 28px;
    border-color: rgba(139, 179, 255, 0.22);
    background: rgba(139, 179, 255, 0.1);
    color: #dbeafe;
}

.news-article-details {
    margin-top: 12px;
}

.news-article-summary-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(139, 179, 255, 0.2);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(139, 179, 255, 0.08);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.news-article-panel {
    margin-top: 12px;
    border: 1px solid rgba(139, 179, 255, 0.16);
    border-radius: 8px;
    background: rgba(7, 17, 31, 0.42);
    overflow: hidden;
}

.news-article-source-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(139, 179, 255, 0.14);
    background: rgba(139, 179, 255, 0.06);
}

.news-article-content-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(139, 179, 255, 0.08);
    background: rgba(139, 179, 255, 0.03);
}

.news-article-source-link {
    min-width: 0;
    overflow: hidden;
    color: #dbeafe;
    font-size: 12px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-article-source-link:hover {
    color: var(--accent-strong);
}

.news-article-source-link.is-empty {
    color: var(--muted);
    cursor: default;
}

.news-article-content {
    max-height: 520px;
    overflow: auto;
    padding: 18px;
    color: #e5edf8;
    font-size: 14px;
    line-height: 1.82;
    white-space: pre-wrap;
    user-select: text;
}

.news-article-empty {
    padding: 18px;
    color: var(--muted);
    font-size: 14px;
}

.settings-message {
    min-height: 24px;
    margin-bottom: 14px;
    color: #a7f3d0;
    font-size: 14px;
    font-weight: 700;
}

.settings-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.settings-metric-card {
    min-height: 132px;
}

.settings-group-head {
    margin: 24px 0 14px;
    padding: 18px 20px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 8px;
    background: rgba(10, 23, 44, 0.72);
}

.settings-group-head-spaced {
    margin-top: 28px;
}

.settings-group-title {
    margin: 4px 0 6px;
    color: var(--text);
    font-size: 24px;
    letter-spacing: 0;
}

.settings-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.settings-lower-grid {
    margin-top: 18px;
}

.settings-card {
    min-width: 0;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.automation-input-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.automation-input-card.is-active {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(59, 130, 246, 0.08);
}

.automation-input-card.is-inactive {
    opacity: 0.58;
}

.automation-input-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.automation-input-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.automation-input-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border: 1px solid rgba(147, 197, 253, 0.24);
    border-radius: 999px;
    background: rgba(147, 197, 253, 0.08);
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 800;
}

.automation-input-help {
    font-size: 12px;
}

.settings-input,
.settings-textarea {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(139, 179, 255, 0.18);
    border-radius: 8px;
    background: rgba(236, 243, 255, 0.96);
    color: #07111f;
    font-size: 14px;
    box-sizing: border-box;
}

.settings-textarea {
    min-height: 136px;
    padding: 12px 14px;
    line-height: 1.5;
    resize: vertical;
}

.credential-textarea {
    min-height: 220px;
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.65;
    word-break: break-all;
}

.settings-dropdown,
.settings-date {
    min-width: 0;
    color: #07111f;
}

.settings-dropdown .Select-control {
    min-height: 42px;
    border-radius: 8px;
    border-color: rgba(139, 179, 255, 0.18);
    background: rgba(236, 243, 255, 0.96);
}

.settings-dropdown .Select-placeholder,
.settings-dropdown .Select-value-label {
    line-height: 40px;
}

.settings-actions,
.settings-check-row,
.settings-inline-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.settings-inline-status {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.settings-checklist label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #dce8f8;
    font-size: 13px;
    font-weight: 700;
}

.settings-checklist input {
    width: 16px;
    height: 16px;
}

.settings-status-line {
    margin-top: 10px;
}

.settings-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.settings-status-healthy {
    color: #bbf7d0;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.settings-status-suspicious,
.settings-status-unknown {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.settings-status-failed {
    color: #fecdd3;
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.24);
}

.settings-status-running {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.24);
}

.settings-status-expired {
    color: #fecdd3;
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.24);
}

.settings-account-list {
    margin-top: 16px;
}

.settings-table {
    display: grid;
    gap: 8px;
}

.settings-table-row {
    display: grid;
    grid-template-columns: 1.05fr 0.58fr 0.48fr 0.55fr 0.55fr 0.95fr minmax(120px, 1.25fr) 0.42fr;
    gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: #dce8f8;
    font-size: 13px;
}

.settings-table-row-head {
    min-height: 34px;
    background: rgba(139, 179, 255, 0.08);
}

.settings-table-head {
    color: #93c5fd;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.settings-table-main {
    color: var(--text);
    font-weight: 800;
}

.settings-table-code {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-hint {
    margin-top: 12px;
}

.automation-input-card .settings-input:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    background: rgba(226, 232, 240, 0.78);
}

.settings-history-grid {
    margin-top: 18px;
}

.settings-run-list {
    margin-top: 16px;
}

.settings-run-table {
    display: grid;
    gap: 8px;
}

.settings-run-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 0.62fr 0.58fr 0.46fr 0.62fr 0.5fr minmax(220px, 1.7fr);
    gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: #dce8f8;
    font-size: 13px;
}

.settings-run-row-head {
    min-height: 34px;
    background: rgba(139, 179, 255, 0.08);
}

.settings-run-message {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-run-empty {
    min-height: 120px;
}

.settings-history-page {
    display: grid;
    gap: 12px;
}

.settings-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-height: 42px;
}

.settings-pager-btn {
    min-width: 92px;
    min-height: 36px;
    padding: 0 14px;
}

.settings-pager-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.settings-pager-text {
    min-width: 150px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.settings-subsection-title {
    margin-top: 22px;
}

.settings-deal-source-list {
    display: grid;
    gap: 12px;
}

.settings-deal-source-card {
    display: grid;
    grid-template-columns: minmax(160px, 0.9fr) auto minmax(0, 1.35fr);
    gap: 14px;
    align-items: start;
    padding: 14px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.settings-deal-source-main {
    min-width: 0;
}

.settings-deal-title {
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-deal-key,
.settings-deal-url,
.settings-deal-note {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-deal-key {
    margin-top: 6px;
    color: #93c5fd;
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
    font-size: 12px;
}

.settings-deal-meta-grid {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.settings-deal-meta-grid div {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 8px;
    background: rgba(139, 179, 255, 0.07);
}

.settings-deal-meta-grid span {
    display: block;
    color: #93c5fd;
    font-size: 11px;
    font-weight: 800;
}

.settings-deal-meta-grid strong {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: #dce8f8;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-deal-url {
    grid-column: 1 / -1;
    color: var(--muted);
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
    font-size: 12px;
}

.settings-deal-note {
    grid-column: 1 / -1;
}

.settings-run-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.settings-compact-metric {
    min-width: 0;
    min-height: 112px;
    padding: 14px;
    border: 1px solid rgba(139, 179, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.settings-compact-metric-wide {
    grid-column: 1 / -1;
}

.settings-summary-status {
    margin: 8px 0;
}

.settings-summary-message {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .funds-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .navbar {
        flex-wrap: wrap;
        padding: 18px 20px;
    }

    .nav-auth-area {
        margin-left: 0;
    }

    .app-page-shell {
        width: min(100vw - 24px, 1180px);
        padding-top: 24px;
    }

    .page-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-meta {
        text-align: left;
    }

    .funds-grid {
        grid-template-columns: 1fr;
    }

    .users-grid {
        grid-template-columns: 1fr;
    }

    .report-layout {
        grid-template-columns: 1fr;
    }

    .news-layout {
        grid-template-columns: 1fr;
    }

    .news-workspace {
        grid-template-columns: 1fr;
    }

    .news-sidebar {
        position: relative;
        top: auto;
        min-height: auto;
    }

    .news-side-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-point-grid {
        grid-template-columns: 1fr;
    }

    .settings-summary-grid,
    .settings-two-column,
    .settings-form-grid,
    .settings-run-summary {
        grid-template-columns: 1fr;
    }

    .settings-table-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .settings-run-table {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .settings-run-row {
        grid-template-columns: 150px 86px 76px 52px 86px 68px minmax(220px, 1fr);
        min-width: 820px;
    }

    .settings-deal-source-card {
        grid-template-columns: 1fr;
    }

    .settings-deal-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-table-row-head {
        display: none;
    }

    .report-history-card {
        position: static;
    }

    .report-factor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fund-watchlist-headrow,
    .fund-watch-row-shell {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr) minmax(0, 0.9fr) auto;
    }

    .fund-watch-row {
        grid-column: 1 / 4;
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
    }

    .fund-watchlist-col--time,
    .fund-watch-cell--time {
        display: none;
    }

    .fund-history-table,
    .fund-holdings-table,
    .stock-history-table {
        overflow-x: auto;
    }

    .fund-history-head,
    .fund-history-row {
        min-width: 520px;
    }

    .fund-holding-head,
    .fund-holding-row {
        min-width: 420px;
    }

    .stock-history-table {
        min-width: 620px;
    }

    .stock-history-panel {
        padding: 14px;
    }
}
