:root{--panel-bg: var(--color-surface-2);--panel-border: rgba(255, 255, 255, .15);--field-bg: rgba(255, 255, 255, .07);--field-bg-active: rgba(255, 255, 255, .12);--text: var(--color-text-primary);--text-muted-local: var(--color-text-muted);--accent: var(--color-accent-start);--positive: #10B981;--negative: #EF4444;--font-numbers: var(--font-mono);--placeholder-color: rgba(255, 255, 255, .3);--select-arrow: url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E)}[data-theme=light]{--panel-border: rgba(0, 0, 0, .1);--field-bg: rgba(0, 0, 0, .04);--field-bg-active: rgba(0, 0, 0, .08);--placeholder-color: rgba(0, 0, 0, .4);--select-arrow: url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%230f172a%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E)}.app-main{display:grid;gap:1.5rem;padding:2rem 1rem 4rem;max-width:1200px;margin:0 auto;width:100%}.app-header{text-align:center;margin-bottom:1rem;padding-bottom:2rem;border-bottom:1px solid var(--panel-border)}.app-title{font-size:clamp(2rem,4vw,3rem);font-weight:800;margin:0;background:linear-gradient(135deg,var(--color-accent-start),var(--color-accent-end));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;text-transform:uppercase;letter-spacing:-.02em}.header-note{color:var(--text-muted-local);font-family:var(--font-mono);font-size:.9rem;margin-top:.5rem;opacity:.9}@media(min-width:960px){.app-main{grid-template-columns:1fr 1fr;align-items:start}.app-header{grid-column:1 / -1}}.panel{background:var(--glass-bg);backdrop-filter:blur(12px);border:1px solid var(--panel-border);border-radius:16px;padding:1.5rem;display:flex;flex-direction:column;gap:1.25rem;box-shadow:var(--shadow-lg);transition:border-color .3s ease,box-shadow .3s ease}.panel:hover{border-color:var(--accent);box-shadow:0 10px 30px -5px #0003}.panel-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.panel h2{margin:0;font-size:1.25rem;font-weight:700;color:var(--text);display:flex;align-items:center;gap:.5rem}.form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-row{display:flex;flex-direction:column;gap:.5rem}.app-main label{font-size:.75rem;font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted-local);font-weight:700}.app-main input,.app-main select{width:100%;background:var(--field-bg);border:1px solid var(--panel-border);color:var(--text);padding:.75rem;border-radius:8px;font-family:var(--font-sans);font-size:.95rem;transition:all .2s}.app-main select{appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:var(--select-arrow);background-repeat:no-repeat;background-position:right .7rem center;background-size:1rem;padding-right:2.5rem;cursor:pointer}.app-main select:hover,.app-main select:focus{background:var(--field-bg-active);border-color:var(--accent);box-shadow:0 0 0 2px #7c3aed4d}.app-main select option{background-color:var(--color-base);color:var(--text)}.app-main select option:hover,.app-main select option:checked{background-color:var(--field-bg-active);color:var(--text)}.app-main input[inputmode=decimal]{font-family:var(--font-numbers)}.app-main input:focus,.app-main select:focus{outline:none;border-color:var(--accent);background:var(--field-bg-active);box-shadow:0 0 0 2px #7c3aed4d}.app-main input::placeholder{color:var(--placeholder-color)}.app-main button{cursor:pointer;padding:.6rem 1.2rem;border-radius:8px;font-weight:600;font-size:.9rem;transition:all .2s;display:inline-flex;align-items:center;justify-content:center;gap:.5rem}.app-main button.primary{background:var(--text);color:var(--color-base);border:1px solid transparent}.app-main button.primary:hover{transform:translateY(-1px);box-shadow:0 4px 12px #00000026;filter:brightness(1.1)}.app-main button.primary:disabled{opacity:.5;cursor:not-allowed;transform:none;box-shadow:none}.app-main button.secondary{background:var(--field-bg);border:1px solid var(--panel-border);color:var(--text-muted-local)}.app-main button.secondary:hover{color:var(--text);border-color:var(--text);background:var(--field-bg-active)}.app-main .btn-xs{padding:.4rem .6rem;font-size:1.1rem;line-height:1;border-radius:6px;height:32px;width:32px;display:inline-flex;align-items:center;justify-content:center}.people-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.75rem}.person-row{display:grid;grid-template-columns:1fr auto;gap:.75rem;align-items:center;padding:.5rem .75rem;background:var(--field-bg);border:1px solid var(--panel-border);border-radius:8px;transition:all .2s}.person-row:hover,.person-row:focus-within{border-color:var(--accent);background:var(--field-bg-active)}.person-name{background:transparent;border:none;padding:0;font-weight:600;color:var(--text);font-size:1rem}.person-name:focus{box-shadow:none;background:transparent;border:none}.table-wrapper{width:100%;overflow-x:auto;border:1px solid var(--panel-border);border-radius:12px;background:var(--field-bg)}.app-main table{width:100%;border-collapse:collapse;font-size:.9rem}.app-main thead{background:var(--field-bg-active);border-bottom:1px solid var(--panel-border)}.app-main th{text-align:left;padding:.75rem 1rem;font-family:var(--font-mono);text-transform:uppercase;font-size:.75rem;color:var(--text-muted-local);letter-spacing:.05em;white-space:nowrap}.app-main th:nth-child(2),.app-main td:nth-child(2),.app-main th:nth-child(3),.app-main td:nth-child(3){text-align:right}.app-main td{padding:.75rem 1rem;border-bottom:1px solid var(--panel-border);color:var(--text)}.app-main tr:last-child td{border-bottom:none}.app-main td:nth-child(2){font-family:var(--font-numbers);font-weight:600}.table-actions{display:flex;justify-content:flex-end;gap:.5rem}.table-actions .btn-xs{font-size:.75rem;width:auto;padding:0 .75rem}.table-actions .btn-delete{font-size:1.2rem;width:32px;padding:0}.balances-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.75rem}.balance-item{display:grid;grid-template-columns:1fr auto;gap:.5rem;padding:1rem;background:var(--field-bg);border:1px solid var(--panel-border);border-left:3px solid var(--text-muted-local);border-radius:8px;align-items:center}.balance-positive{border-left-color:var(--positive);background:linear-gradient(90deg,rgba(16,185,129,.1),transparent)}.balance-negative{border-left-color:var(--negative);background:linear-gradient(90deg,rgba(239,68,68,.1),transparent)}.balance-info{display:flex;flex-direction:column;gap:.4rem}.balance-name{font-weight:700;font-size:1rem;color:var(--text)}.balance-metrics{display:flex;gap:.5rem}.metric-badge{font-family:var(--font-mono);font-size:.75rem;padding:2px 8px;border-radius:4px;background:var(--field-bg-active);color:var(--text-muted-local);white-space:nowrap;border:1px solid var(--panel-border)}.balance-net{font-family:var(--font-numbers);font-weight:700;font-size:1.1rem;text-align:right}.text-pos{color:var(--positive)}.text-neg{color:var(--negative)}.text-muted{color:var(--text-muted-local);opacity:.7}.settlement-bar{display:flex;justify-content:space-between;align-items:center;background:var(--field-bg);padding:1.25rem;border-radius:12px;border:1px solid var(--panel-border)}.total-label{display:block;font-size:.75rem;color:var(--text-muted-local);text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px}.total-val{font-family:var(--font-numbers);font-size:1.5rem;font-weight:700;color:var(--accent)}.settlement-results{display:flex;flex-direction:column;gap:.75rem}.transfer-line{display:flex;justify-content:space-between;align-items:center;padding:1rem;background:#10b98114;border:1px solid rgba(16,185,129,.3);border-radius:8px;font-size:1rem;color:var(--text)}.transfer-arrow{color:var(--text-muted-local);margin:0 .5rem}.transfer-money{font-family:var(--font-numbers);font-weight:700;color:var(--positive)}.form-feedback{color:var(--negative);font-size:.85rem;margin-top:.5rem;min-height:1.2em}.expenses-empty td{text-align:center;padding:2rem;color:var(--text-muted-local);font-style:italic}.settlement-empty{text-align:center;color:var(--text-muted-local);font-style:italic;opacity:.8;padding:1rem}
