:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;min-width:320px}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}#root{max-width:800px;margin:0 auto;padding:1rem}.loading{display:flex;justify-content:center;align-items:center;height:100vh;font-size:1.2rem;color:#666}.login-container{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.login-container h1{margin-bottom:2rem}.login-form{display:flex;flex-direction:column;gap:1rem;width:100%;max-width:320px}.form-field{display:flex;flex-direction:column;gap:.25rem}.form-field label{font-size:.875rem;color:#666}.form-field input{padding:.75rem;border:1px solid #ccc;border-radius:4px;font-size:1rem}.form-field input:focus{outline:none;border-color:#646cff}.login-form button{padding:.75rem;background:#646cff;color:#fff;border:none;border-radius:4px;font-size:1rem;cursor:pointer;margin-top:.5rem}.login-form button:hover{background:#535bf2}.login-form button:disabled{background:#999;cursor:not-allowed}.error{color:#dc2626;font-size:.875rem;padding:.5rem;background:#fef2f2;border-radius:4px}.app-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 0;border-bottom:1px solid #eee;margin-bottom:1rem}.app-header span{font-size:.875rem;color:#666}.app-header button{padding:.5rem 1rem;background:transparent;border:1px solid #ccc;border-radius:4px;cursor:pointer}.app-header button:hover{background:#f5f5f5}.dashboard{padding:1rem 0}.dashboard h2{text-align:center;margin-bottom:2rem}.entry-list{display:flex;flex-direction:column;gap:1.5rem}.entry-group{background:#f9f9f9;border-radius:8px;padding:1rem}.group-title{font-size:.875rem;font-weight:600;color:#666;text-transform:uppercase;letter-spacing:.05em;margin:0 0 .75rem}.group-entries{display:flex;flex-direction:column;gap:.5rem}.entry-row{display:flex;justify-content:space-between;align-items:center;padding:.75rem;background:#fff;border-radius:4px;border:1px solid #eee}.entry-row.disabled{opacity:.5}.entry-info{display:flex;flex-direction:column;gap:.25rem}.entry-name{font-weight:500}.entry-amount{font-size:1.1rem;font-weight:600}.frequency-note{font-size:.75rem;color:#888;font-weight:400;margin-left:.25rem}.family-member-tag{font-size:.75rem;color:#fff;background:#888;padding:.125rem .5rem;border-radius:12px;margin-left:.5rem;font-weight:400}.toggle{position:relative;display:inline-block;width:48px;height:24px}.toggle input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.2s;border-radius:24px}.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;transition:.2s;border-radius:50%}.toggle input:checked+.toggle-slider{background-color:#646cff}.toggle input:checked+.toggle-slider:before{transform:translate(24px)}.empty-state{text-align:center;color:#888;padding:2rem}.dashboard-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}.dashboard-header h2{margin:0}.btn-add{padding:.75rem 1.5rem;background:#646cff;color:#fff;border:none;border-radius:4px;font-size:1rem;cursor:pointer}.btn-add:hover{background:#535bf2}button.entry-info{all:unset;display:flex;flex-direction:column;gap:.25rem;cursor:pointer;flex:1}button.entry-info:hover{opacity:.8}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.modal-content{background:#fff;border-radius:8px;width:100%;max-width:400px;max-height:90vh;overflow-y:auto;margin:1rem}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;border-bottom:1px solid #eee}.modal-header h2{margin:0;font-size:1.25rem}.modal-close{background:none;border:none;font-size:1.5rem;cursor:pointer;color:#666;padding:0;line-height:1}.modal-close:hover{color:#333}.modal-body{padding:1.5rem}.entry-form{display:flex;flex-direction:column;gap:1rem}.entry-form .form-field select{padding:.75rem;border:1px solid #ccc;border-radius:4px;font-size:1rem;background:#fff}.entry-form .form-field select:focus{outline:none;border-color:#646cff}.checkbox-field label{display:flex;align-items:center;gap:.5rem;cursor:pointer}.checkbox-field input[type=checkbox]{width:18px;height:18px}.field-error{color:#dc2626;font-size:.75rem}.form-actions{display:flex;justify-content:space-between;gap:.5rem;margin-top:.5rem}.form-actions-right{display:flex;gap:.5rem}.btn-cancel{padding:.75rem 1rem;background:transparent;border:1px solid #ccc;border-radius:4px;cursor:pointer}.btn-cancel:hover{background:#f5f5f5}.btn-submit{padding:.75rem 1rem;background:#646cff;color:#fff;border:none;border-radius:4px;cursor:pointer}.btn-submit:hover{background:#535bf2}.btn-delete{padding:.75rem 1rem;background:#dc2626;color:#fff;border:none;border-radius:4px;cursor:pointer}.btn-delete:hover{background:#b91c1c}.summary{background:#f0f4f8;border-radius:8px;padding:1rem;margin-bottom:1.5rem}.summary h3{margin:0 0 1rem;font-size:1rem;color:#666}.summary-grid{display:flex;flex-direction:column;gap:.5rem}.summary-row{display:flex;justify-content:space-between;padding:.5rem;background:#fff;border-radius:4px}.summary-row.income .summary-value{color:#16a34a}.summary-row.expense .summary-value{color:#dc2626}.summary-row.net{font-weight:600}.summary-row.net.positive .summary-value{color:#16a34a}.summary-row.net.negative .summary-value{color:#dc2626}.summary-label{color:#333}.summary-value{font-weight:500}.summary-divider{height:1px;background:#ddd;margin:.5rem 0}.tabs{display:flex;flex-direction:column}.tabs-header{display:flex;border-bottom:2px solid #eee;margin-bottom:1.5rem}.tab-button{padding:.75rem 1.5rem;background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;cursor:pointer;font-size:1rem;color:#666;transition:all .2s}.tab-button:hover{color:#333}.tab-button.active{color:#646cff;border-bottom-color:#646cff;font-weight:500}.tab-content{min-height:200px}.tab-panel{display:flex;flex-direction:column;gap:2rem}.table-section{background:#f9f9f9;border-radius:8px;padding:1rem}.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.section-header h3{margin:0;font-size:1rem;color:#333}.btn-add-small{padding:.5rem 1rem;background:#646cff;color:#fff;border:none;border-radius:4px;font-size:.875rem;cursor:pointer}.btn-add-small:hover{background:#535bf2}.entry-table{width:100%;border-collapse:collapse;background:#fff;border-radius:4px;overflow:hidden}.entry-table th,.entry-table td{padding:.75rem;text-align:left;border-bottom:1px solid #eee}.entry-table th{font-weight:600;font-size:.875rem;color:#666;background:#f5f5f5}.entry-table tbody tr{cursor:pointer;transition:background .2s}.entry-table tbody tr:hover{background:#f9f9f9}.entry-table tbody tr.disabled{opacity:.5}.entry-table tbody tr:last-child td{border-bottom:none}.empty-table{text-align:center;color:#888;padding:1rem;background:#fff;border-radius:4px}.loan-section{background:#fff;border-radius:8px;padding:1rem;border:1px solid #eee;margin-bottom:1rem}.loan-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.loan-name-input{font-size:1.1rem;font-weight:600;border:none;border-bottom:2px solid transparent;padding:.25rem 0;background:transparent;flex:1;margin-right:1rem}.loan-name-input:focus{outline:none;border-bottom-color:#646cff}.btn-delete-loan{padding:.5rem 1rem;background:transparent;border:1px solid #ccc;border-radius:4px;cursor:pointer;font-size:.875rem;color:#666}.btn-delete-loan:hover{border-color:#dc2626;color:#dc2626}.btn-delete-loan.confirm{background:#dc2626;border-color:#dc2626;color:#fff}.loan-fields{display:flex;flex-direction:column;gap:.75rem}.loan-field{display:flex;flex-direction:column;gap:.25rem}.loan-field label{font-size:.75rem;color:#666;text-transform:uppercase;letter-spacing:.05em}.loan-field input,.loan-field select{padding:.5rem;border:1px solid #ddd;border-radius:4px;font-size:1rem}.loan-field input:focus,.loan-field select:focus{outline:none;border-color:#646cff}.loan-field-row{display:flex;gap:1rem}.loan-field-row .loan-field{flex:1}.input-with-prefix,.input-with-suffix{display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;overflow:hidden}.input-with-prefix input,.input-with-suffix input{border:none;flex:1;min-width:0}.input-with-prefix input:focus,.input-with-suffix input:focus{outline:none}.input-with-prefix:focus-within,.input-with-suffix:focus-within{border-color:#646cff}.input-prefix,.input-suffix{padding:.5rem;background:#f5f5f5;color:#666;font-size:.875rem}.loan-divider{height:1px;background:#eee;margin:1rem 0}.loan-result{display:flex;justify-content:space-between;align-items:center;padding:.75rem;background:#f0f4f8;border-radius:4px}.loan-result-label{font-weight:500;color:#333}.loan-result-value{font-size:1.25rem;font-weight:600;color:#646cff}.stress-test{margin-top:1rem;padding:.75rem;background:#fff8e6;border-radius:4px;border:1px solid #ffd966}.stress-test-header{font-size:.75rem;font-weight:600;color:#b38600;text-transform:uppercase;letter-spacing:.05em;margin-bottom:.5rem}.stress-test-row{display:flex;justify-content:space-between;align-items:center;padding:.5rem 0;border-bottom:1px solid #ffd96633;font-size:.875rem}.stress-test-row:last-child{border-bottom:none}.stress-rate{color:#666;min-width:80px}.stress-payment{font-weight:500}.stress-buffer{font-weight:500;min-width:120px;text-align:right}.stress-buffer.positive{color:#16a34a}.stress-buffer.negative{color:#dc2626}.investment-section{background:#fff;border-radius:8px;padding:1rem;border:1px solid #eee;margin-bottom:1rem}.investment-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.investment-name-input{font-size:1.1rem;font-weight:600;border:none;border-bottom:2px solid transparent;padding:.25rem 0;background:transparent;flex:1;margin-right:1rem}.investment-name-input:focus{outline:none;border-bottom-color:#646cff}.btn-delete-investment{padding:.5rem 1rem;background:transparent;border:1px solid #ccc;border-radius:4px;cursor:pointer;font-size:.875rem;color:#666}.btn-delete-investment:hover{border-color:#dc2626;color:#dc2626}.btn-delete-investment.confirm{background:#dc2626;border-color:#dc2626;color:#fff}.investment-type-selector{display:flex;gap:.5rem;margin-bottom:1rem}.type-btn{flex:1;padding:.5rem 1rem;background:#f5f5f5;border:1px solid #ddd;border-radius:4px;cursor:pointer;font-size:.875rem;color:#666;transition:all .2s}.type-btn:hover{background:#eee}.type-btn.active{background:#646cff;border-color:#646cff;color:#fff}.investment-fields{display:flex;flex-direction:column;gap:.75rem}.investment-field{display:flex;flex-direction:column;gap:.25rem}.investment-field label{font-size:.75rem;color:#666;text-transform:uppercase;letter-spacing:.05em}.investment-field input,.investment-field select{padding:.5rem;border:1px solid #ddd;border-radius:4px;font-size:1rem}.investment-field input:focus,.investment-field select:focus{outline:none;border-color:#646cff}.investment-divider{height:1px;background:#eee;margin:1rem 0}.costs-section{margin-top:.5rem}.costs-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.costs-label{font-size:.75rem;color:#666;text-transform:uppercase;letter-spacing:.05em}.btn-add-cost{padding:.25rem .75rem;background:transparent;border:1px solid #646cff;border-radius:4px;cursor:pointer;font-size:.75rem;color:#646cff}.btn-add-cost:hover{background:#646cff;color:#fff}.costs-list{display:flex;flex-direction:column;gap:.5rem}.no-costs{font-size:.875rem;color:#888;font-style:italic}.cost-input{background:#f9f9f9;border-radius:4px;padding:.5rem}.cost-input-row{display:flex;align-items:center;gap:.5rem}.cost-field{display:flex;align-items:center}.cost-name{flex:2}.cost-name input{width:100%;padding:.375rem .5rem;border:1px solid #ddd;border-radius:4px;font-size:.875rem}.cost-name input:focus{outline:none;border-color:#646cff}.cost-value{flex:1}.cost-value input{width:100%;padding:.375rem .5rem;border:1px solid #ddd;border-radius:4px;font-size:.875rem;text-align:right}.cost-value input:focus{outline:none;border-color:#646cff}.cost-type{display:flex;gap:0}.type-toggle{padding:.375rem .5rem;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:.75rem;color:#666}.type-toggle:first-child{border-radius:4px 0 0 4px}.type-toggle:last-child{border-radius:0 4px 4px 0;border-left:none}.type-toggle.active{background:#646cff;border-color:#646cff;color:#fff}.recurring-toggle{padding:.375rem .5rem;border:1px solid #ddd;border-radius:4px;background:#fff;cursor:pointer;font-size:.75rem;color:#666}.recurring-toggle.active{background:#16a34a;border-color:#16a34a;color:#fff}.cost-delete{padding:.25rem .5rem;border:none;background:none;cursor:pointer;font-size:1rem;color:#999}.cost-delete:hover{color:#dc2626}.cost-calculated{font-size:.75rem;color:#666;text-align:right;margin-top:.25rem}.investment-metrics{display:flex;flex-direction:column;gap:.5rem}.metric-row{display:flex;justify-content:space-between;align-items:center;padding:.5rem .75rem;background:#f9f9f9;border-radius:4px}.metric-row.highlight{background:#f0f4f8}.metric-row.info{background:transparent;border:1px dashed #ddd}.metric-label{font-size:.875rem;color:#666}.metric-value{font-weight:600;font-size:.875rem}.metric-value.positive{color:#16a34a}.metric-value.negative{color:#dc2626}.metric-divider{height:1px;background:#eee;margin:.25rem 0}.investments-list{display:flex;flex-direction:column;gap:1rem}
