:root {
    /* 极简风配色系统 */
    --bg-page: #F5F0E1; /* Soft Cream */
    --bg-card: rgba(255, 255, 255, 0.85);
    
    --text-primary: #000000;
    --text-secondary: #6B7B3C; /* Olive Green */
    --text-emphasis: #B5651D; /* Warm Clay */
    
    --border-color: rgba(181, 101, 29, 0.2);
    
    /* 状态色 - 仅作点缀 */
    --risk-high: #EF4444;      /* Red 500 */
    --risk-medium: #F59E0B;    /* Amber 500 */
    --risk-low: #10B981;       /* Emerald 500 */
    --accent-blue: #C67B5C;    /* Terracotta */

    --border-radius: 0px;     /* Minimalist border radius */
    --shadow-sm: none;
    --shadow-hover: 0 4px 20px rgba(181, 101, 29, 0.05);
    
    --font-family: 'Inter', "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Reset body margin/padding for cleaner look */
body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    overflow: hidden; /* Ensure shapes don't spill out */
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    position: relative;
    z-index: 1;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: -1px; /* Overlap with border-bottom */
}

.tab-btn:hover {
    color: var(--text-emphasis);
}

.tab-btn.active {
    background-color: transparent;
    color: var(--text-emphasis);
    border-bottom-color: var(--text-emphasis);
    box-shadow: none;
    font-weight: 600;
}

/* Modules */
.module {
    /* 保持原有的淡入动画 */
    position: relative;
    z-index: 1;
}

.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.empty-state-card {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 40px auto;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.empty-state-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.empty-state-card p {
    font-size: 14px;
    margin-bottom: 24px;
}

.empty-state-card button {
    width: auto;
    display: inline-block;
    padding: 10px 20px;
}
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-emphasis);
    margin: 0; /* Override default */
}

/* Risk Distribution Card */
.card-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.total-asset-badge {
    background: transparent;
    padding: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    border: none;
    box-shadow: none;
}

.total-asset-badge .label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-asset-badge .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-emphasis);
    font-family: var(--font-family);
    letter-spacing: -0.5px;
}

/* Income Settings Styles (Removed) */


.risk-legend {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.risk-legend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.legend-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-label {
    color: var(--text-primary);
    font-weight: 500;
}

.legend-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.legend-value {
    color: var(--text-emphasis);
    font-weight: 600;
}

.legend-percent {
    color: var(--text-secondary);
    font-size: 12px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    min-width: 40px;
    text-align: right;
}

/* Projection Card */
/* Removed Wealth Projection specific styles */

.chart-container-small {
    position: relative;
    height: 180px;
    width: 100%;
}

.projection-mini-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

/* Charts */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: left;
    padding: 16px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-bottom: 2px solid var(--border-color);
    background-color: transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

th:first-child {
    border-top-left-radius: 0;
}
th:last-child {
    border-top-right-radius: 0;
}

td {
    padding: 20px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-primary);
    transition: background-color 0.2s, color 0.2s;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.4);
    color: var(--text-emphasis);
}

tr:last-child td {
    border-bottom: none;
}

/* Risk Badges (Capsule Style) */
.badge {
    padding: 2px 8px;
    border-radius: 999px; /* Capsule */
    font-size: 10px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: #fff;
    white-space: nowrap;
}

.badge-low {
    border-color: var(--border-color);
    color: var(--risk-low);
}
.badge-low::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--risk-low);
    margin-right: 4px;
}

.badge-medium {
    border-color: var(--border-color);
    color: var(--risk-medium);
}
.badge-medium::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--risk-medium);
    margin-right: 4px;
}

.badge-high {
    border-color: var(--border-color);
    color: var(--risk-high);
}
.badge-high::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--risk-high);
    margin-right: 4px;
}


/* Data Values */
.value-emphasis {
    color: var(--text-emphasis);
    font-weight: bold;
    font-family: var(--font-family);
}

.value-positive {
    color: var(--risk-low);
}

.value-negative {
    color: var(--risk-high);
}

/* Buttons */
.btn-icon {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--text-emphasis);
    color: var(--bg-page);
    border-color: var(--text-emphasis);
    box-shadow: none;
}

.btn-edit {
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 0;
    transition: all 0.2s;
    margin-right: 4px;
}

.btn-edit:hover {
    background-color: rgba(181, 101, 29, 0.1);
    color: var(--text-emphasis);
}

.btn-delete {
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 0;
    transition: all 0.2s;
}

.btn-delete:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--risk-high);
}

.btn-primary {
    background: var(--text-emphasis);
    color: var(--bg-page);
    border: none;
    padding: 12px 24px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    margin-top: 0;
    transition: all 0.3s ease;
    box-shadow: none;
}

.btn-primary:hover {
    background: var(--accent-blue);
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text-emphasis);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    margin-top: 0;
    transition: all 0.3s ease;
    box-shadow: none;
}

.btn-secondary:hover {
    border-color: var(--text-emphasis);
    background: rgba(181, 101, 29, 0.05);
}

/* Time Toggle Styles */
.toggle-group {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.radio-label input {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    cursor: pointer;
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-row input {
    flex: 2;
}

.input-row select {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-size: 13px;
    background: transparent;
    color: var(--text-emphasis);
    font-family: var(--font-family);
}

.hint-text {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(245, 240, 225, 0.8); /* Soft Cream backdrop */
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: var(--bg-page);
    margin: 10% auto;
    padding: 40px;
    border-radius: 0;
    width: 90%;
    max-width: 480px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    animation: modalSlideUp 0.3s ease-out;
}

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

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text-emphasis);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-size: 14px;
    background: transparent;
    color: var(--text-emphasis);
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--text-emphasis);
    background: transparent;
    box-shadow: none;
}

/* Performance Bars & Charts */
.perf-bar-container {
    margin-bottom: 12px;
}
.perf-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}
.perf-bar-bg {
    height: 6px;
    background: #F1F5F9;
    border-radius: 3px;
    overflow: hidden;
}
.perf-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reinvestment Simulator */
.reinvestment-simulator {
    margin-top: 16px;
    padding: 24px;
    background: transparent;
    border-radius: 0;
    border: 1px solid var(--border-color);
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.highlight-blue {
    color: var(--text-emphasis);
    font-weight: 600;
}

.slider-container {
    margin-bottom: 20px;
}

input[type=range] {
    width: 100%;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    background: rgba(181, 101, 29, 0.2);
    border-radius: 0;
    height: 2px;
    cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
    margin-top: -7px;
    width: 16px;
    height: 16px;
    background: var(--text-emphasis);
    border-radius: 0;
    cursor: pointer;
    -webkit-appearance: none;
    box-shadow: none;
}

.reinvestment-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

.re-label {
    color: var(--text-secondary);
}

.re-value {
    font-weight: 600;
    color: var(--text-emphasis);
    font-family: var(--font-family);
}

/* Income Settings Styles */
.extra-income-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.extra-income-row select {
    width: 80px;
}

.extra-income-row input {
    flex: 1;
}

.btn-remove-row {
    color: var(--risk-high);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

/* Stats in Projection */
.projection-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.stat-box {
    text-align: center;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-emphasis);
}

.stat-value.gain {
    color: var(--risk-low);
}

/* Daily Income Badge */
.daily-income-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    padding: 16px 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.daily-income-badge .label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-emphasis);
    margin-bottom: 2px;
}

.daily-income-badge .sub-text {
    font-size: 11px;
    color: var(--text-secondary);
}

.daily-income-badge .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-emphasis);
    text-align: right;
    font-family: var(--font-family);
    letter-spacing: -0.5px;
}


/* Background Graphical Elements - Minimalist Textures */
.graphic-shape {
    position: fixed;
    z-index: -1;
    opacity: 0.1;
    filter: blur(80px);
}

.shape-circle {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
}

.shape-dots {
    bottom: -10%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    border-radius: 50%;
    background: radial-gradient(circle, var(--text-emphasis) 0%, transparent 70%);
}

.shape-line {
    display: none;
}
