:root{--surface-0: #f4f5f7;--surface-1: #ffffff;--surface-2: #eceef2;--text-primary: #16181d;--text-secondary: #4b5262;--text-muted: #7a8194;--border: #dde1e8;--accent: #2f6feb;--accent-soft: rgba(47, 111, 235, .12);--positive: #1a8a4a;--negative: #d1373f;--neutral-grey: #8b93a3;--purchase: #7c4dbf;--deposit: #1a8a4a;--withdrawal: #d1373f;--exchange: #b8860b;--dividend: #1f8f8f;--sale: #b4571f;--shadow: 0 1px 2px rgba(20, 22, 30, .04), 0 4px 14px rgba(20, 22, 30, .06);--radius: 10px;--font: system-ui, -apple-system, "Segoe UI", sans-serif}@media (prefers-color-scheme: dark){:root{--surface-0: #101216;--surface-1: #181b21;--surface-2: #20242c;--text-primary: #eef0f4;--text-secondary: #b7bdc9;--text-muted: #838a99;--border: #2b2f38;--accent: #5b9dff;--accent-soft: rgba(91, 157, 255, .16);--positive: #3ecb7a;--negative: #ff6b6b;--neutral-grey: #8b93a3;--purchase: #9b6fd6;--deposit: #3ecb7a;--withdrawal: #ff6b6b;--exchange: #e0af4b;--dividend: #4fd1d1;--sale: #e08a4f;--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 18px rgba(0, 0, 0, .35)}}:root[data-theme=light]{--surface-0: #f4f5f7;--surface-1: #ffffff;--surface-2: #eceef2;--text-primary: #16181d;--text-secondary: #4b5262;--text-muted: #7a8194;--border: #dde1e8;--accent: #2f6feb;--accent-soft: rgba(47, 111, 235, .12);--positive: #1a8a4a;--negative: #d1373f;--neutral-grey: #8b93a3;--purchase: #7c4dbf;--deposit: #1a8a4a;--withdrawal: #d1373f;--exchange: #b8860b;--dividend: #1f8f8f;--sale: #b4571f;--shadow: 0 1px 2px rgba(20, 22, 30, .04), 0 4px 14px rgba(20, 22, 30, .06)}:root[data-theme=dark]{--surface-0: #101216;--surface-1: #181b21;--surface-2: #20242c;--text-primary: #eef0f4;--text-secondary: #b7bdc9;--text-muted: #838a99;--border: #2b2f38;--accent: #5b9dff;--accent-soft: rgba(91, 157, 255, .16);--positive: #3ecb7a;--negative: #ff6b6b;--neutral-grey: #8b93a3;--purchase: #9b6fd6;--deposit: #3ecb7a;--withdrawal: #ff6b6b;--exchange: #e0af4b;--dividend: #4fd1d1;--sale: #e08a4f;--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 18px rgba(0, 0, 0, .35)}*{box-sizing:border-box}html,body{margin:0;padding:0}body{font-family:var(--font);background:var(--surface-0);color:var(--text-primary);-webkit-font-smoothing:antialiased}#root{min-height:100vh}button{font-family:inherit}input,select,textarea{font-family:inherit;font-size:14px;color:var(--text-primary);background:var(--surface-1);border:1px solid var(--border);border-radius:6px;width:100%;height:36px;padding:0 10px;box-sizing:border-box}input:focus,select:focus,textarea:focus{outline:2px solid var(--accent-soft);border-color:var(--accent)}label{font-size:12.5px;color:var(--text-secondary);display:block;margin-bottom:4px}.app-shell{min-height:100vh;display:flex;flex-direction:column}.app-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:31px 24px;background:var(--surface-1);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:20}.app-brand{font-size:18px;font-weight:700}.app-header-right{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.header-field{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--text-secondary)}.header-field select{width:auto;height:auto;padding:5px 8px;font-size:12.5px}.today-label{font-size:12.5px;color:var(--text-secondary);white-space:nowrap}.person-name{font-weight:600;font-size:13.5px}.role-badge{font-size:10.5px;font-weight:700;letter-spacing:.4px;padding:3px 7px;border-radius:5px;background:var(--accent-soft);color:var(--accent)}.btn{border:1px solid var(--border);background:var(--surface-1);color:var(--text-primary);border-radius:7px;padding:8px 14px;font-size:13.5px;cursor:pointer;transition:background .12s,border-color .12s}.btn:hover{background:var(--surface-2)}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{filter:brightness(1.06)}.btn-danger{background:var(--negative);border-color:var(--negative);color:#fff}.btn-full{width:100%}.btn-sm{padding:5px 10px;font-size:12.5px}.btn:disabled{opacity:.5;cursor:not-allowed}.app-main{flex:1;padding:24px;max-width:1320px;width:100%;margin:0 auto}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--surface-0);padding:20px}.login-card{background:var(--surface-1);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:32px;width:100%;max-width:360px}.login-card h1{margin:0 0 20px;font-size:22px;text-align:center}.login-field{margin-bottom:14px}.login-error{color:var(--negative);font-size:13px;min-height:18px;margin-bottom:10px}.tab-bar{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:20px;flex-wrap:wrap}.tab-button{background:none;border:none;padding:10px 16px;font-size:14px;color:var(--text-secondary);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}.tab-button.active{color:var(--text-primary);border-bottom-color:var(--accent);font-weight:600}.card{background:var(--surface-1);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;margin-bottom:18px}.card h2,.card h3{margin-top:0}.chart-card{background:var(--surface-1);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;margin-bottom:18px}.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:14px}.kpi-card{background:var(--surface-1);border:1px solid var(--border);border-radius:var(--radius);padding:22px 18px;min-height:108px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-start}.kpi-label{font-size:12px;color:var(--text-muted);display:block;margin-bottom:12px;min-height:32px;line-height:16px}.kpi-label-row{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:12px;min-height:32px}.kpi-label-row .kpi-label{margin-bottom:0}.kpi-value{font-size:21px;font-weight:700}.kpi-sub{font-size:12px;color:var(--text-muted);margin-top:2px}.kpi-positive{color:var(--positive)}.kpi-negative{color:var(--negative)}.kpi-neutral{color:var(--neutral-grey)}.kpi-editable-box{display:flex;align-items:center;gap:4px}.kpi-spinner{width:14px;height:14px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;display:inline-block;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.info-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;background:var(--surface-2);color:var(--text-muted);font-size:10px;cursor:default;position:relative}.info-icon .tooltip{visibility:hidden;opacity:0;position:absolute;bottom:130%;left:50%;transform:translate(-50%);background:var(--text-primary);color:var(--surface-1);padding:8px 11px;border-radius:6px;font-size:11.5px;white-space:nowrap;width:max-content;line-height:1.4;transition:opacity .12s;z-index:30;pointer-events:none}.info-icon:hover .tooltip{visibility:visible;opacity:1}.price-ticker{display:inline-flex;align-items:baseline;gap:6px;font-size:13px}.price-ticker .ticker-symbol{font-weight:700}.price-ticker .ticker-price{font-variant-numeric:tabular-nums}.price-ticker .ticker-delta{font-size:12px;font-variant-numeric:tabular-nums}.type-badge{display:inline-block;padding:3px 9px;border-radius:999px;font-size:11.5px;font-weight:600;color:#fff}.type-badge-deposit{background:var(--deposit)}.type-badge-withdrawal{background:var(--withdrawal)}.type-badge-currency-exchange{background:var(--exchange)}.type-badge-purchase{background:var(--purchase)}.type-badge-dividend{background:var(--dividend)}.type-badge-sale{background:var(--sale)}.tag-pill{display:inline-block;padding:2px 8px;border-radius:999px;font-size:10.5px;font-weight:600;background:var(--surface-2);color:var(--text-muted);margin-left:5px}table{width:100%;border-collapse:collapse;font-size:13.5px}th,td{padding:8px 10px;border-bottom:1px solid var(--border);text-align:left}th{color:var(--text-muted);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.3px}td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}tr.row-reversed{opacity:.5}tr.row-reversed td{text-decoration:line-through}.note-audit{font-size:11.5px;color:var(--text-muted);margin-top:3px;text-decoration:none!important}.table-filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px;align-items:flex-end}.table-filters .field{display:flex;flex-direction:column}.table-filters .field select,.table-filters .field input{width:auto;min-width:150px}.show-notes-btn{height:36px;min-width:150px;padding:0 14px;margin-left:auto;box-sizing:border-box}.table-scroll{overflow-x:auto}.pagination{display:flex;align-items:center;gap:10px;margin-top:12px;font-size:13px;color:var(--text-secondary)}.pagination select{width:auto}.amount-green{color:var(--positive);font-weight:600}.amount-red{color:var(--negative);font-weight:600}.amount-muted{color:var(--text-muted);font-size:12px}.form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin-bottom:14px}.form-grid>div label{min-height:32px}.form-row{display:flex;gap:12px;flex-wrap:wrap}.exchange-columns{display:flex;align-items:center;gap:10px;margin-bottom:14px}.exchange-labels-row{margin-bottom:4px}.exchange-col{flex:0 0 180px;width:180px;display:flex;flex-direction:column;gap:8px}.swap-spacer{width:52px;flex-shrink:0}.swap-button{width:52px;height:52px;border-radius:50%;border:2px solid var(--accent);background:var(--surface-1);color:var(--accent);cursor:pointer;font-size:22px;line-height:1;display:flex;align-items:center;justify-content:center;align-self:center;margin-bottom:0;flex-shrink:0;padding:0}.swap-button span{display:block;transform:translateY(-1px)}.swap-button:hover{background:var(--accent-soft)}.money-input-wrap{display:flex;align-items:baseline;gap:2px}.money-input-wrap .prefix{color:var(--text-primary);font-size:21px;font-weight:700}.kpi-value-input{font-size:21px;font-weight:700;font-family:inherit;color:var(--text-primary);border:none;border-bottom:1px solid transparent;background:transparent;padding:0;width:100%;height:auto;border-radius:0}.kpi-value-input:hover{border-bottom-color:var(--border)}.kpi-value-input:focus{outline:none;border-bottom-color:var(--accent)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0a0c1080;display:flex;align-items:center;justify-content:center;z-index:100;padding:20px}.modal-card{background:var(--surface-1);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.date-picker{position:relative;display:block;width:100%}.date-picker-button{display:flex;align-items:center;gap:6px;width:100%;height:36px;min-width:140px;justify-content:space-between;box-sizing:border-box}.date-picker-popover{position:absolute;top:calc(100% + 6px);left:0;z-index:50;background:var(--surface-1);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:12px;width:260px}.date-picker-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.date-picker-header button{background:none;border:none;cursor:pointer;font-size:15px;color:var(--text-secondary);padding:4px 8px}.date-picker-label-btn{background:none;border:none;cursor:pointer;font-weight:600;font-size:13.5px;color:var(--text-primary)}.date-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;text-align:center}.date-grid .weekday{font-size:10.5px;color:var(--text-muted);padding:4px 0}.date-cell{background:none;border:none;border-radius:6px;padding:6px 0;font-size:12.5px;cursor:pointer;color:var(--text-primary)}.date-cell:hover:not(:disabled){background:var(--surface-2)}.date-cell.selected{background:var(--accent);color:#fff}.date-cell.today{border:1px solid var(--accent)}.date-cell:disabled{color:var(--text-muted);opacity:.4;cursor:not-allowed}.month-grid,.year-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.month-cell,.year-cell{background:none;border:1px solid var(--border);border-radius:6px;padding:8px 4px;font-size:12.5px;cursor:pointer;color:var(--text-primary)}.month-cell:hover,.year-cell:hover{background:var(--surface-2)}.date-picker-footer{margin-top:8px;text-align:center}.date-picker-footer button{background:none;border:none;color:var(--accent);cursor:pointer;font-size:12.5px}.chart-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:8px}.chart-title{font-size:15px;font-weight:700}.chart-subtitle{font-size:12.5px;color:var(--text-muted);font-weight:400}.chart-legend{display:flex;gap:14px;font-size:12px;color:var(--text-secondary)}.legend-swatch{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px}.chart-ranges{display:flex;gap:4px;margin-bottom:8px;justify-content:flex-end}.range-btn{border:1px solid var(--border);background:var(--surface-1);color:var(--text-secondary);border-radius:6px;padding:4px 10px;font-size:12px;cursor:pointer}.range-btn.active{background:var(--accent);color:#fff;border-color:var(--accent)}.chart-empty{padding:40px 0;text-align:center;color:var(--text-muted)}.chart-tooltip{position:absolute;background:var(--text-primary);color:var(--surface-1);padding:8px 10px;border-radius:6px;font-size:12px;pointer-events:none;white-space:nowrap;z-index:10}.chart-compare-badge{position:absolute;background:var(--surface-1);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:8px;padding:8px 12px;font-size:12.5px;z-index:11}.chart-compare-badge .close-btn{background:none;border:none;cursor:pointer;color:var(--text-muted);float:right;margin-left:8px;font-size:12px}.chart-svg-wrap{position:relative;width:100%}.empty-state{padding:30px;text-align:center;color:var(--text-muted);border:1px dashed var(--border);border-radius:var(--radius)}.investor-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.investor-list-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;cursor:pointer;border:1px solid transparent}.investor-list-item:hover{background:var(--surface-2)}.investor-list-item.active{background:var(--accent-soft);border-color:var(--accent)}.investor-picker-layout{display:flex;gap:20px;align-items:flex-start}.investor-picker-sidebar{width:240px;flex-shrink:0;background:var(--surface-1);border:1px solid var(--border);border-radius:var(--radius);padding:12px}.investor-picker-main{flex:1;min-width:0}.chip-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}.chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);border-radius:999px;padding:6px 12px;font-size:12.5px;background:var(--surface-2)}.chip-tag{background:var(--purchase);color:#fff;border-radius:999px;padding:1px 7px;font-size:10px}.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:10.5px;font-weight:600;background:var(--negative);color:#fff;margin-left:6px}.section-title{font-size:16px;font-weight:700;margin:0 0 12px}.password-field{position:relative}.password-field input{width:100%;padding-right:34px}.password-field .eye-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:var(--text-muted);font-size:13px}.countdown-note{font-size:12px;color:var(--text-muted);margin-top:6px}.field-error{color:var(--negative);font-size:12px;margin-top:4px}.divider{border:none;border-top:1px solid var(--border);margin:18px 0}.collapsible-header{display:flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.chevron{transition:transform .15s;display:inline-block}.chevron.open{transform:rotate(90deg)}.stat-inline{display:flex;gap:20px;flex-wrap:wrap;margin-bottom:14px}.card-header-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.stacked-fields{display:flex;flex-direction:column;gap:12px;margin-bottom:14px}.warning-box{display:flex;gap:12px;align-items:center;background:#d1373f1a;border:1px solid var(--negative);color:var(--text-primary);border-radius:8px;padding:12px 14px;font-size:13px;line-height:1.5;margin-bottom:14px}.warning-icon{flex-shrink:0;font-size:28px;line-height:1}
