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

        body {
            background-color: #f5f5f5;
            min-height: 100vh;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 30px;
        }

        .cloud-sync-status {
            margin: -16px auto 20px;
            width: fit-content;
            max-width: 100%;
            padding: 6px 12px;
            border-radius: 999px;
            border: 1px solid #d0d7de;
            background: #f6f8fa;
            color: #334155;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.4;
            text-align: center;
        }

        .cloud-sync-status.status-syncing {
            background: #eff6ff;
            border-color: #bfdbfe;
            color: #1d4ed8;
        }

        .cloud-sync-status.status-synced {
            background: #ecfdf3;
            border-color: #bbf7d0;
            color: #166534;
        }

        .cloud-sync-status.status-error {
            background: #fef2f2;
            border-color: #fecaca;
            color: #b91c1c;
        }

        .cloud-sync-status.status-disabled {
            background: #fff7ed;
            border-color: #fed7aa;
            color: #9a3412;
        }

        .view-hidden {
            display: none;
        }

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

        .ledger-list {
            display: flex;
            flex-direction: column;
            gap: 14px;
            margin-bottom: 16px;
        }

        .ledger-card {
            background: #fff;
            border: 1px solid #e3e8ef;
            border-radius: 10px;
            padding: 16px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.06);
            cursor: pointer;
            transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
        }

        .ledger-card:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.08);
            border-color: #cfd8e3;
        }

        .ledger-title {
            font-size: 18px;
            color: #222;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .ledger-subtitle {
            font-size: 13px;
            color: #8b95a1;
            margin-bottom: 10px;
        }

        .ledger-metrics {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
        }

        .ledger-metric {
            background: #f8fafc;
            border: 1px solid #edf1f5;
            border-radius: 8px;
            padding: 10px;
        }

        .ledger-metric-label {
            color: #697586;
            font-size: 12px;
            margin-bottom: 6px;
        }

        .ledger-metric-value {
            color: #1f2937;
            font-size: 15px;
            font-weight: 600;
        }

        .ledger-empty {
            background: #fff;
            border: 1px dashed #ccd5df;
            border-radius: 10px;
            padding: 28px 20px;
            color: #7b8795;
            text-align: center;
        }

        .home-actions {
            display: flex;
            justify-content: center;
            margin-top: 10px;
        }

        .detail-topbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            gap: 12px;
            flex-wrap: wrap;
        }

        .detail-ledger-tag {
            color: #6b7280;
            font-size: 14px;
        }

        .nav-tabs {
            display: flex;
            flex-wrap: wrap;
            background-color: white;
            border-radius: 8px 8px 0 0;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .nav-tab {
            flex: 1;
            padding: 15px 20px;
            background-color: #f8f9fa;
            border: none;
            cursor: pointer;
            font-size: 16px;
            color: #666;
            transition: all 0.3s;
        }

        .nav-tab:hover {
            background-color: #e9ecef;
        }

        .nav-tab.active {
            background-color: white;
            color: #333;
            font-weight: 600;
            box-shadow: inset 0 3px 0 #4CAF50;
        }

        .tab-content {
            background-color: white;
            border-radius: 0 0 8px 8px;
            padding: 30px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            min-height: 600px;
        }

        .form-section {
            margin-bottom: 30px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        .form-group-half {
            flex: 1;
        }

        label {
            display: block;
            margin-bottom: 8px;
            color: #555;
            font-weight: 500;
        }

        input, select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 16px;
        }

        input:focus, select:focus {
            outline: none;
            border-color: #4CAF50;
            box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
        }

        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s;
        }

        .btn-primary {
            background-color: #4CAF50;
            color: white;
        }

        .btn-primary:hover {
            background-color: #45a049;
        }

        .btn-secondary {
            background-color: #2196F3;
            color: white;
        }

        .btn-secondary:hover {
            background-color: #1976D2;
        }

        .btn-toggle-active {
            background-color: #1976D2;
        }

        .chart-tabs {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-top: 12px;
            flex-wrap: wrap;
        }

        .chart-range-shortcuts {
            margin-bottom: 14px;
            flex-wrap: wrap;
        }

        .chart-range-date-grid {
            margin-bottom: 0;
        }

        .btn-group {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }

        .chart-container {
            position: relative;
            height: 400px;
            margin: 30px 0;
        }

        .benchmark-signal-summary {
            margin-top: -12px;
            margin-bottom: 12px;
            padding: 10px 12px;
            border: 1px solid #d9e2ec;
            border-radius: 10px;
            background: #f8fafc;
        }

        .benchmark-signal-status {
            font-size: 14px;
            font-weight: 700;
            margin-bottom: 6px;
        }

        .benchmark-signal-reason {
            font-size: 13px;
            color: #334155;
            line-height: 1.6;
        }

        .benchmark-signal-buy {
            color: #2e7d32;
        }

        .benchmark-signal-sell {
            color: #c62828;
        }

        .benchmark-signal-hold {
            color: #475569;
        }

        .chart-controls {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            align-items: center;
        }

        .chart-controls select {
            flex: 1;
        }

        .history-controls select {
            min-width: 220px;
        }

        .scope-controls {
            flex-wrap: wrap;
            align-items: center;
        }

        .scope-controls .btn-group {
            margin-bottom: 0;
        }

        .scope-controls select {
            flex: 0 1 340px;
            max-width: 340px;
        }

        .dashboard-scope-hint {
            color: var(--text-2);
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
        }

        .funds-controls {
            justify-content: flex-start;
        }

        .funds-controls label {
            margin-bottom: 0;
            min-width: 80px;
        }

        .funds-layout {
            background-color: #f8f9fa;
            border-radius: 10px;
            padding: 24px;
            border: 1px solid #e7ebef;
        }

        .funds-flow {
            max-width: 980px;
            margin: 0 auto;
        }

        .funds-flow-row {
            display: grid;
            gap: 16px;
            align-items: stretch;
            justify-items: center;
            margin: 6px 0;
        }

        .funds-flow-top {
            grid-template-columns: repeat(3, minmax(140px, 1fr));
        }

        .funds-flow-mid {
            grid-template-columns: repeat(3, minmax(140px, 1fr));
        }

        .funds-flow-bottom {
            grid-template-columns: minmax(180px, 260px);
            justify-content: center;
        }

        .funds-card {
            width: 100%;
            max-width: 260px;
            background: white;
            border: 1px solid #e3e8ef;
            border-radius: 8px;
            padding: 16px 14px;
            text-align: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        }

        .funds-card.emphasis {
            border-color: #2196F3;
            box-shadow: 0 2px 8px rgba(33, 150, 243, 0.12);
        }

        .funds-audit {
            margin-top: 18px;
            background: #fff;
            border: 1px solid #e3e8ef;
            border-radius: 8px;
            padding: 14px 16px;
        }

        .funds-audit-title {
            font-weight: 600;
            color: #333;
            margin-bottom: 8px;
        }

        .funds-audit-line {
            font-size: 14px;
            color: #4a4a4a;
            line-height: 1.7;
        }

        .funds-audit-line code {
            background: #f4f6f8;
            border: 1px solid #e6eaee;
            border-radius: 4px;
            padding: 1px 4px;
        }

        .funds-label {
            font-size: 14px;
            color: #666;
            margin-bottom: 8px;
            font-weight: 600;
        }

        .funds-subdate {
            font-size: 12px;
            color: #8b97a3;
            margin-top: 2px;
            font-weight: 500;
        }

        .funds-value {
            font-size: 22px;
            font-weight: 700;
        }

        .value-red {
            color: #d32f2f;
        }

        .value-green {
            color: #2e7d32;
        }

        .value-black {
            color: #111;
        }

        .funds-link {
            width: 100%;
            height: 42px;
            margin: 2px 0;
        }

        .funds-link line {
            stroke: #b7c2cc;
            stroke-width: 2;
            stroke-dasharray: 4 4;
        }

        .data-summary {
            background-color: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            margin: 20px 0;
        }

        .summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
        }

        .summary-item {
            text-align: center;
        }

        .summary-label {
            font-size: 14px;
            color: #666;
            margin-bottom: 5px;
        }

        .summary-value {
            font-size: 20px;
            font-weight: bold;
            color: #333;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }

        th, td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }

        th {
            background-color: #f8f9fa;
            font-weight: 600;
        }

        tr:hover {
            background-color: #f5f5f5;
        }

        .history-list {
            max-height: 540px;
            overflow-y: auto;
            border: 1px solid #ddd;
            border-radius: 4px;
            margin: 20px 0;
        }

        .history-item {
            padding: 12px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }

        .history-item:hover {
            background-color: #f9f9f9;
        }

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

        .history-date {
            font-weight: 600;
            flex: 1;
        }

        .history-details {
            font-size: 14px;
            color: #666;
            flex: 2;
            text-align: right;
        }

        .history-note {
            font-size: 12px;
            color: #999;
            margin-top: 5px;
            text-align: right;
        }

        .history-value-total-title {
            font-size: 18px;
            font-weight: 700;
            color: #111;
            margin-top: 8px;
            text-align: right;
            letter-spacing: -0.01em;
        }

        .history-fund-total-title {
            font-size: 16px;
            font-weight: 700;
            color: #243246;
            margin-top: 8px;
            text-align: right;
        }

        .history-actions {
            margin-top: 8px;
            text-align: right;
        }

        .history-edit-btn {
            background-color: #2196F3;
            color: white;
            border: none;
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: background-color 0.3s;
        }

        .history-edit-btn:hover {
            background-color: #1976D2;
        }

        /* 弹窗样式 */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.4);
        }

        .modal-content {
            background-color: #fefefe;
            margin: 15% auto;
            padding: 30px;
            border: 1px solid #888;
            width: 80%;
            max-width: 600px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

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

        .modal-title {
            font-size: 18px;
            font-weight: 600;
            color: #333;
        }

        .close {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }

        .close:hover,
        .close:focus {
            color: black;
            text-decoration: none;
            cursor: pointer;
        }

        .modal-footer {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 20px;
        }

        .update-action-wrap {
            margin-bottom: 20px;
        }

        .update-action-wrap .btn {
            min-width: 160px;
        }

        .update-tip {
            color: #666;
            margin-top: 8px;
            font-size: 13px;
        }

        .update-modal-desc {
            color: #666;
            font-size: 14px;
            margin-bottom: 14px;
            line-height: 1.6;
        }

        .update-option-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .update-option-card {
            border: 1px solid #dce3ea;
            border-radius: 8px;
            padding: 14px;
            background: #fff;
            cursor: pointer;
            transition: border-color 0.2s, box-shadow 0.2s;
            text-align: left;
        }

        .update-option-card:hover {
            border-color: #2196F3;
            box-shadow: 0 2px 8px rgba(33, 150, 243, 0.12);
        }

        .update-option-title {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 6px;
        }

        .update-option-sub {
            font-size: 13px;
            color: #8b97a3;
        }

        .channel-input-row {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 8px;
            align-items: center;
        }

        .channel-add-btn {
            white-space: nowrap;
            padding: 10px 12px;
        }

        .channel-manage-list {
            max-height: 320px;
            overflow-y: auto;
            border: 1px solid #e3e8ef;
            border-radius: 6px;
            padding: 8px;
            background: #fafbfd;
        }

        .channel-manage-row {
            display: grid;
            grid-template-columns: 1fr auto auto;
            gap: 8px;
            align-items: center;
            padding: 6px 4px;
        }

        .fund-manage-row {
            grid-template-columns: minmax(130px, 1fr) minmax(120px, 0.9fr) minmax(180px, 1.3fr) minmax(120px, 1fr) auto;
        }

        .fund-manage-actions {
            display: flex;
            gap: 6px;
            justify-content: flex-end;
            flex-wrap: wrap;
        }

        .fund-manage-name-wrap {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }

        .fund-manage-name-wrap input {
            width: 100%;
        }

        .fund-manage-meta-weak {
            font-size: 12px;
            color: #9aa4b2;
            line-height: 1.3;
            padding: 0 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .fund-manage-header {
            background: rgba(15, 23, 42, 0.04);
            border-radius: 8px;
            margin-bottom: 6px;
            font-size: 12px;
            color: #61748f;
            font-weight: 700;
            padding: 8px 6px;
        }

        .fund-manage-header div {
            padding: 0 2px;
        }

        .channel-manage-row input {
            padding: 8px;
            font-size: 14px;
        }

        .channel-manage-row select {
            padding: 8px;
            font-size: 14px;
        }

        .channel-flat-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            align-items: center;
            padding: 6px 4px;
        }

        .channel-flat-name {
            font-size: 14px;
            color: #444;
        }

        .channel-flat-input {
            width: 100%;
        }

        .value-update-modal-content {
            max-width: 780px;
        }

        .value-update-modal-content .channel-flat-row {
            grid-template-columns: minmax(180px, 1fr) minmax(300px, 1.6fr);
        }

        .value-update-modal-content .channel-manage-list {
            max-height: 420px;
        }

        .fund-detail-modal-content {
            max-width: 980px;
        }

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

        .fund-detail-title {
            font-size: 20px;
            font-weight: 700;
            color: #1f2937;
            margin-bottom: 4px;
        }

        .fund-detail-code {
            font-size: 13px;
            color: #98a2b3;
        }

        .fund-detail-actions {
            margin-bottom: 0;
            flex-wrap: wrap;
        }

        .fund-detail-kpi-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 12px;
        }

        .fund-detail-kpi-card {
            background: #f7fafc;
            border: 1px solid #e8eef5;
            border-radius: 8px;
            padding: 12px 14px;
            min-height: 88px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 8px;
        }

        .fund-detail-kpi-label {
            font-size: 12px;
            color: #8091a7;
        }

        .fund-detail-kpi-value {
            font-size: 32px;
            color: #1f2937;
            font-weight: 600;
            line-height: 1;
            letter-spacing: -0.02em;
        }

        .fund-detail-basic-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px 18px;
            margin-bottom: 10px;
        }

        .fund-detail-basic-item {
            font-size: 14px;
            color: #4b5563;
            line-height: 1.5;
        }

        .fund-detail-basic-item span {
            color: #1f2937;
        }

        .fund-detail-chart-title {
            font-size: 14px;
            color: #6b7280;
            font-weight: 600;
            margin-top: 4px;
        }

        .fund-detail-chart-container {
            height: 360px;
            margin: 14px 0 8px;
        }

        .fund-detail-range-tabs {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 8px;
            margin-top: 8px;
        }

        .fund-range-tab {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
            padding: 10px 10px;
            min-height: 62px;
            background: #f4f7fb;
            color: #374151;
            border: 1px solid #dde6f1;
        }

        .fund-range-tab:hover {
            background: #ecf2fa;
        }

        .fund-range-tab.btn-toggle-active {
            background: #e2ecff;
            border-color: #b8cbf1;
        }

        .fund-range-tab-label {
            font-size: 12px;
            opacity: 0.9;
        }

        .fund-range-tab-value {
            font-size: 14px;
            font-weight: 700;
            color: #111827;
        }

        .fund-range-tab .fund-range-tab-value.value-red {
            color: #d32f2f;
        }

        .fund-range-tab .fund-range-tab-value.value-green {
            color: #2e7d32;
        }

        .fund-range-tab .fund-range-tab-value.value-black {
            color: #111827;
        }

        .fund-range-more-menu {
            margin-top: 8px;
            padding: 10px;
            border: 1px solid #dce5ee;
            border-radius: 8px;
            background: #f9fbfd;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .fund-range-more-menu .btn {
            padding: 8px 10px;
            font-size: 13px;
        }

        .channel-default-tag {
            font-size: 12px;
            color: #666;
            background: #eef2f6;
            border: 1px solid #d8e0e8;
            border-radius: 999px;
            padding: 4px 8px;
            white-space: nowrap;
        }

        /* Toast提示样式 */
        .toast {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 15px 20px;
            border-radius: 4px;
            color: white;
            font-size: 14px;
            z-index: 10000;
            opacity: 0;
            transition: opacity 0.3s, transform 0.3s;
            transform: translateX(100%);
        }

        .toast.success {
            background-color: #4CAF50;
        }

        .toast.error {
            background-color: #f44336;
        }

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

        .fund-in {
            color: #d32f2f;
        }

        .fund-out {
            color: #2e7d32;
        }

        .error-message {
            color: #f44336;
            font-size: 14px;
            margin-top: 5px;
            display: none;
        }

        .error-message.show {
            display: block;
        }

        .input-error {
            border-color: #f44336 !important;
        }

        .connection-line {
            position: absolute;
            background-color: #ddd;
            z-index: 1;
        }

        .connection-text {
            position: absolute;
            font-size: 12px;
            color: #666;
            z-index: 2;
        }

        /* Apple-like UI overrides */
        :root {
            --bg-top: #f4f7fb;
            --bg-bottom: #eef2f8;
            --surface: rgba(255, 255, 255, 0.72);
            --surface-strong: rgba(255, 255, 255, 0.9);
            --text-1: #111827;
            --text-2: #4b5563;
            --text-3: #8a94a6;
            --line: rgba(15, 23, 42, 0.08);
            --shadow-1: 0 10px 28px rgba(16, 24, 40, 0.08);
            --shadow-2: 0 3px 10px rgba(16, 24, 40, 0.05);
            --primary: #0a84ff;
            --primary-strong: #0071e3;
            --danger: #ff453a;
            --success: #30d158;
            --warning: #ff9f0a;
        }

        body {
            background:
                radial-gradient(1200px 600px at 8% -10%, #eaf2ff 0%, transparent 60%),
                radial-gradient(1200px 600px at 95% 0%, #f0ebff 0%, transparent 55%),
                linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
            color: var(--text-1);
        }

        .container {
            max-width: 1240px;
            padding: 24px 20px 40px;
        }

        h1 {
            font-size: clamp(30px, 3.2vw, 42px);
            line-height: 1.1;
            letter-spacing: -0.03em;
            font-weight: 700;
            color: #0b1220;
            margin-bottom: 22px;
        }

        h2, h3 {
            letter-spacing: -0.015em;
            color: #121926;
        }

        .detail-topbar,
        .home-header {
            background: var(--surface);
            backdrop-filter: blur(14px) saturate(1.2);
            -webkit-backdrop-filter: blur(14px) saturate(1.2);
            border: 1px solid var(--line);
            border-radius: 18px;
            padding: 12px 14px;
            box-shadow: var(--shadow-2);
        }

        .detail-ledger-tag {
            color: var(--text-2);
            font-weight: 600;
        }

        .ledger-card,
        .summary-item,
        .funds-card,
        .funds-audit,
        .update-option-card,
        .history-item {
            background: var(--surface-strong);
            backdrop-filter: blur(10px) saturate(1.15);
            -webkit-backdrop-filter: blur(10px) saturate(1.15);
            border: 1px solid var(--line);
            box-shadow: var(--shadow-2);
        }

        .ledger-card {
            border-radius: 18px;
            padding: 18px;
            transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
        }

        .ledger-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-1);
            border-color: rgba(10, 132, 255, 0.25);
        }

        .ledger-title {
            font-size: 20px;
            letter-spacing: -0.01em;
            color: #0f172a;
        }

        .ledger-subtitle {
            color: var(--text-3);
        }

        .ledger-metric {
            border-radius: 14px;
            background: rgba(248, 250, 255, 0.85);
        }

        .ledger-metric-value {
            letter-spacing: -0.01em;
        }

        .ledger-empty {
            border-radius: 18px;
            border: 1px dashed rgba(15, 23, 42, 0.2);
            background: rgba(255, 255, 255, 0.5);
        }

        .nav-tabs {
            background: rgba(255, 255, 255, 0.64);
            backdrop-filter: blur(12px) saturate(1.2);
            -webkit-backdrop-filter: blur(12px) saturate(1.2);
            border: 1px solid var(--line);
            border-radius: 16px 16px 0 0;
            box-shadow: var(--shadow-2);
        }

        .nav-tab {
            background: transparent;
            color: #607089;
            font-weight: 600;
            border-right: 1px solid rgba(15, 23, 42, 0.05);
        }

        .nav-tab:last-child {
            border-right: none;
        }

        .nav-tab:hover {
            background: rgba(255, 255, 255, 0.7);
            color: #1f2a3f;
        }

        .nav-tab.active {
            background: rgba(255, 255, 255, 0.95);
            color: #0b1220;
            box-shadow: inset 0 3px 0 var(--primary);
        }

        .tab-content {
            border: 1px solid var(--line);
            border-top: none;
            border-radius: 0 0 18px 18px;
            background: rgba(255, 255, 255, 0.84);
            backdrop-filter: blur(14px) saturate(1.15);
            -webkit-backdrop-filter: blur(14px) saturate(1.15);
            box-shadow: var(--shadow-1);
        }

        label {
            color: #2e3a4f;
            font-size: 14px;
        }

        input, select {
            border-radius: 12px;
            border: 1px solid rgba(15, 23, 42, 0.12);
            background: rgba(255, 255, 255, 0.95);
            color: #111827;
            transition: all .18s ease;
        }

        input:focus, select:focus {
            border-color: rgba(10, 132, 255, 0.75);
            box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.16);
        }

        .btn {
            border-radius: 999px;
            font-weight: 600;
            letter-spacing: 0.01em;
            transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
        }

        .btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.02);
        }

        .btn:active {
            transform: translateY(0);
        }

        .btn-primary {
            background: linear-gradient(180deg, #2f95ff 0%, var(--primary-strong) 100%);
            box-shadow: 0 6px 14px rgba(0, 113, 227, 0.28);
        }

        .btn-secondary {
            background: linear-gradient(180deg, #7fb7ff 0%, #2f82f6 100%);
            box-shadow: 0 6px 12px rgba(47, 130, 246, 0.24);
        }

        .btn-toggle-active {
            background: linear-gradient(180deg, #2f95ff 0%, var(--primary-strong) 100%) !important;
        }

        .update-tip,
        .update-modal-desc,
        .summary-label,
        .history-note,
        .ledger-subtitle,
        .funds-subdate {
            color: var(--text-3);
        }

        .data-summary {
            border-radius: 16px;
            background: rgba(250, 252, 255, 0.85);
            border: 1px solid var(--line);
            box-shadow: var(--shadow-2);
        }

        .summary-item {
            border-radius: 14px;
            padding: 14px;
            text-align: left;
        }

        .summary-value {
            color: #0f172a;
            letter-spacing: -0.01em;
        }

        .chart-container {
            border-radius: 16px;
            background: rgba(255, 255, 255, 0.62);
            border: 1px solid var(--line);
            padding: 10px 12px;
            box-shadow: var(--shadow-2);
        }

        table {
            border-radius: 14px;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.86);
            border: 1px solid var(--line);
            box-shadow: var(--shadow-2);
        }

        th {
            background: rgba(245, 248, 253, 0.98);
            color: #2d3b53;
        }

        tr:hover {
            background-color: rgba(10, 132, 255, 0.06);
        }

        .history-list {
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.8);
            box-shadow: var(--shadow-2);
        }

        .history-item {
            margin: 8px;
            border-radius: 12px;
            padding: 12px 14px;
        }

        .history-item:hover {
            background-color: rgba(10, 132, 255, 0.06);
        }

        .history-date {
            color: #0f172a;
        }

        .history-details {
            color: var(--text-2);
        }

        .history-edit-btn {
            border-radius: 999px;
            padding: 6px 12px;
            background: linear-gradient(180deg, #4ba3ff 0%, #1976d2 100%);
        }

        .modal {
            background-color: rgba(15, 23, 42, 0.28);
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
        }

        .modal-content {
            margin: 8vh auto;
            border-radius: 20px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(20px) saturate(1.2);
            -webkit-backdrop-filter: blur(20px) saturate(1.2);
            box-shadow: 0 26px 60px rgba(2, 8, 20, 0.24);
        }

        .modal-title {
            font-size: 20px;
            letter-spacing: -0.015em;
        }

        .close {
            color: #8a94a6;
        }

        .close:hover,
        .close:focus {
            color: #0f172a;
        }

        .update-option-card {
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.86);
        }

        .update-option-card:hover {
            border-color: rgba(10, 132, 255, 0.48);
            box-shadow: 0 10px 22px rgba(10, 132, 255, 0.15);
        }

        .channel-manage-list {
            border-radius: 12px;
            border: 1px solid var(--line);
            background: rgba(248, 250, 255, 0.8);
        }

        .funds-layout {
            border-radius: 16px;
            background: rgba(250, 252, 255, 0.88);
            border: 1px solid var(--line);
            box-shadow: var(--shadow-2);
        }

        .portfolio-module {
            margin-top: 18px;
            background: rgba(250, 252, 255, 0.86);
            border: 1px solid var(--line);
            border-radius: 16px;
            padding: 16px;
            box-shadow: var(--shadow-2);
        }

        .portfolio-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
            margin-top: 10px;
        }

        .portfolio-card {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 12px;
        }

        .portfolio-card-title {
            font-size: 14px;
            font-weight: 700;
            color: #1a2a40;
            margin-bottom: 10px;
        }

        .portfolio-target-row {
            display: grid;
            grid-template-columns: 1fr 130px;
            align-items: center;
            gap: 10px;
            padding: 6px 0;
            border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
        }

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

        .portfolio-target-label {
            font-size: 14px;
            color: #25344b;
        }

        .portfolio-target-input-wrap {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .portfolio-target-input {
            text-align: right;
        }

        .portfolio-target-readonly {
            min-width: 96px;
            text-align: right;
            font-size: 14px;
            font-weight: 700;
            color: #1d2d44;
        }

        .portfolio-target-unit {
            font-size: 13px;
            color: #667890;
        }

        .portfolio-total-line {
            margin-top: 10px;
            font-size: 13px;
            font-weight: 600;
            color: #5c6f87;
        }

        .portfolio-total-ok {
            color: #166534;
        }

        .portfolio-total-warn {
            color: #b42318;
        }

        .portfolio-card-actions {
            margin-top: 10px;
        }

        .portfolio-progress-wrap {
            border: 1px solid var(--line);
            border-radius: 12px;
            background: rgba(247, 250, 255, 0.95);
            padding: 12px;
            margin-bottom: 12px;
        }

        .portfolio-progress-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            color: #3a4b63;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .portfolio-progress-track {
            width: 100%;
            height: 10px;
            border-radius: 999px;
            background: rgba(15, 23, 42, 0.09);
            overflow: hidden;
        }

        .portfolio-progress-fill {
            height: 100%;
            width: 0;
            border-radius: 999px;
            background: linear-gradient(90deg, #2f95ff 0%, #0071e3 100%);
            transition: width 0.2s ease;
        }

        .portfolio-progress-text {
            margin-top: 8px;
            font-size: 13px;
            font-weight: 600;
            color: #5c6f87;
        }

        .portfolio-actual-item {
            border: 1px solid var(--line);
            background: #fff;
            border-radius: 10px;
            padding: 10px;
            margin-top: 10px;
        }

        .portfolio-actual-head {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            align-items: baseline;
            flex-wrap: wrap;
            margin-bottom: 8px;
        }

        .portfolio-bucket-name {
            font-size: 15px;
            font-weight: 700;
            color: #18263a;
        }

        .portfolio-bucket-metrics {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            font-size: 13px;
            color: #5f7188;
        }

        .portfolio-fund-list {
            border-top: 1px dashed rgba(15, 23, 42, 0.1);
            padding-top: 8px;
        }

        .portfolio-fund-item {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            padding: 4px 0;
            font-size: 13px;
        }

        .portfolio-fund-name {
            color: #2a3b52;
        }

        .portfolio-fund-value {
            color: #667890;
            white-space: nowrap;
        }

        .portfolio-fund-empty,
        .portfolio-empty {
            font-size: 13px;
            color: #8b97a3;
            padding: 8px 0;
        }

        .catalog-tip {
            color: #6d7f96;
            font-size: 13px;
            margin-bottom: 14px;
        }

        .catalog-advanced {
            margin-top: 16px;
            border: 1px solid var(--line);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.7);
            padding: 10px 12px;
        }

        .catalog-advanced summary {
            cursor: pointer;
            font-weight: 700;
            color: #1d2d44;
            user-select: none;
        }

        .catalog-advanced-content {
            margin-top: 12px;
        }

        .funds-card {
            border-radius: 14px;
        }

        .funds-card.emphasis {
            border-color: rgba(10, 132, 255, 0.42);
            box-shadow: 0 10px 18px rgba(10, 132, 255, 0.12);
        }

        .funds-audit {
            border-radius: 14px;
        }

        .funds-link line {
            stroke: rgba(120, 137, 161, 0.75);
        }

        .fund-in {
            color: var(--danger);
            font-weight: 600;
        }

        .fund-out {
            color: #16a34a;
            font-weight: 600;
        }

        .toast {
            top: 18px;
            right: 18px;
            border-radius: 12px;
            background: rgba(12, 18, 32, 0.88);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            box-shadow: 0 10px 24px rgba(2, 8, 20, 0.24);
        }

        .toast.success {
            background: rgba(15, 102, 52, 0.9);
        }

        .toast.error {
            background: rgba(180, 35, 24, 0.92);
        }

        .summary-value.value-red,
        .ledger-metric-value.value-red {
            color: #d32f2f !important;
        }

        .summary-value.value-green,
        .ledger-metric-value.value-green {
            color: #2e7d32 !important;
        }

        .summary-value.value-black,
        .ledger-metric-value.value-black {
            color: #111 !important;
        }

        .review-overall-card {
            border: 1px solid var(--line);
            border-radius: 14px;
            background: rgba(250, 252, 255, 0.9);
            box-shadow: var(--shadow-2);
            padding: 14px 16px;
            margin: 18px 0;
        }

        .review-overall-title {
            font-size: 14px;
            color: var(--text-3);
            margin-bottom: 6px;
            font-weight: 600;
        }

        .review-overall-text {
            font-size: 15px;
            color: #142033;
            line-height: 1.65;
            font-weight: 500;
        }

        .review-table-wrap {
            overflow-x: auto;
        }

        .review-density-tabs {
            justify-content: flex-end;
            margin-top: 10px;
            margin-bottom: 4px;
        }

        #review-core-top-drift,
        #review-core-dd-driver {
            font-size: 15px;
            line-height: 1.45;
        }

        #review-bucket-table {
            min-width: 840px;
        }

        #review-bucket-table th,
        #review-bucket-table td {
            white-space: nowrap;
            font-size: 13px;
        }

        #review-bucket-table td:first-child {
            font-weight: 600;
        }

        #review-phase-bucket-table {
            min-width: 980px;
            margin-top: 12px;
        }

        #review-phase-bucket-table th,
        #review-phase-bucket-table td {
            white-space: nowrap;
            font-size: 13px;
        }

        #review-phase-bucket-table td:first-child {
            font-weight: 600;
        }

        #review-dd-bucket-table {
            min-width: 860px;
            margin-top: 12px;
        }

        #review-dd-bucket-table th,
        #review-dd-bucket-table td {
            white-space: nowrap;
            font-size: 13px;
        }

        #review-dd-bucket-table td:first-child {
            font-weight: 600;
        }

        .review-score-badge {
            display: inline-block;
            min-width: 62px;
            text-align: center;
            padding: 4px 8px;
            border-radius: 999px;
            font-weight: 700;
            font-size: 12px;
        }

        .review-score-good {
            color: #b42318;
            background: rgba(255, 235, 238, 0.95);
            border: 1px solid rgba(180, 35, 24, 0.2);
        }

        .review-score-mid {
            color: #7a5c00;
            background: rgba(255, 248, 225, 0.95);
            border: 1px solid rgba(122, 92, 0, 0.22);
        }

        .review-score-bad {
            color: #166534;
            background: rgba(232, 245, 233, 0.95);
            border: 1px solid rgba(22, 101, 52, 0.2);
        }

        .review-suggestion-list {
            margin-left: 18px;
            color: #243246;
            line-height: 1.8;
        }

        .review-v21-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 16px;
            margin-bottom: 4px;
        }

        .review-kpi-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 12px;
        }

        .review-kpi-item {
            border: 1px solid var(--line);
            background: #fff;
            border-radius: 12px;
            padding: 10px 12px;
        }

        .review-kpi-label {
            font-size: 12px;
            color: var(--text-3);
            margin-bottom: 6px;
        }

        .review-kpi-value {
            font-size: 16px;
            font-weight: 700;
            color: #17263a;
        }

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

        .review-phase-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 16px;
            margin-top: 10px;
        }

        .review-phase-card {
            border: 1px solid var(--line);
            background: rgba(251, 252, 255, 0.95);
            border-radius: 14px;
            padding: 12px;
        }

        .review-phase-title {
            font-size: 14px;
            font-weight: 700;
            color: #1a2a40;
            margin-bottom: 10px;
        }

        .review-profile-text {
            font-size: 14px;
            color: #22334a;
            line-height: 1.7;
        }

        .review-dimension-score {
            display: inline-block;
            min-width: 58px;
            border-radius: 999px;
            padding: 4px 10px;
            text-align: center;
            font-size: 12px;
            font-weight: 700;
            color: #203047;
            background: rgba(221, 232, 248, 0.72);
        }

        @media (max-width: 768px) {
            .ledger-metrics {
                grid-template-columns: 1fr;
            }

            .form-row {
                flex-direction: column;
            }

            .nav-tabs {
                flex-direction: column;
            }

            .nav-tab {
                text-align: left;
            }

            .chart-controls {
                flex-direction: column;
                align-items: stretch;
            }

            .scope-controls .btn-group {
                width: 100%;
                margin-bottom: 6px;
            }

            .scope-controls select,
            .history-controls select {
                max-width: none;
                width: 100%;
            }

            .dashboard-scope-hint {
                white-space: normal;
            }

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

            .container {
                padding: 10px;
            }

            .tab-content {
                padding: 20px;
            }

            .chart-container {
                height: 300px;
            }

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

            .update-option-grid {
                grid-template-columns: 1fr;
            }

            .review-v21-grid {
                grid-template-columns: 1fr;
            }

            .review-kpi-grid {
                grid-template-columns: 1fr;
            }

            .review-kpi-grid-2 {
                grid-template-columns: 1fr;
            }

            .review-phase-grid {
                grid-template-columns: 1fr;
            }

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

            .fund-manage-row {
                grid-template-columns: 1fr;
            }

            .fund-manage-actions {
                justify-content: flex-start;
            }

            .fund-manage-meta-weak {
                white-space: normal;
            }

            .fund-manage-header {
                display: none;
            }

            .fund-detail-kpi-grid {
                grid-template-columns: 1fr;
            }

            .fund-detail-kpi-value {
                font-size: 28px;
            }

            .fund-detail-basic-grid {
                grid-template-columns: 1fr;
            }

            .fund-detail-chart-container {
                height: 280px;
            }

            .fund-detail-range-tabs {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .funds-card {
                width: 100%;
            }

            .funds-link {
                display: none;
            }
        }

        @media (max-width: 480px) {
            h1 {
                font-size: 20px;
                margin-bottom: 20px;
            }

            .cloud-sync-status {
                margin-top: -8px;
                margin-bottom: 14px;
                font-size: 12px;
            }

            h2 {
                font-size: 18px;
            }

            h3 {
                font-size: 16px;
            }

            .btn {
                padding: 10px 16px;
                font-size: 14px;
            }

            .chart-container {
                height: 250px;
            }

            .history-list {
                max-height: 320px;
            }
        }
