:root{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif}*{box-sizing:border-box}body{margin:0}a{color:inherit}:root{--bg:#f6f7fb;--card:#ffffff;--muted:#777;--accent:#4f46e5;--panel-height:260px}html,body,#root{height:100%}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial;background:var(--bg);color:#111827}.container{max-width:1280px;margin:18px auto;padding:20px 28px}header{display:flex;flex-direction:column;gap:6px;margin-bottom:18px}.tag{color:var(--muted);margin:0}header h1{margin:0;font-weight:700;letter-spacing:-.3px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.brand{display:flex;flex-direction:column}.brand small{color:var(--muted);font-size:13px}.main-grid{display:grid;grid-template-columns:360px 1fr;gap:20px}.panel{background:var(--card);padding:16px;border-radius:12px;box-shadow:0 6px 18px #0f172a0f}.panel.wide{grid-column:1 / -1}.main-grid>.panel{margin-bottom:8px}.main-grid{align-items:start}.panel h2{margin:0 0 10px;font-size:16px}.card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.row{display:flex;gap:8px}.col{display:flex;flex-direction:column;gap:8px}input,select{padding:10px;border:1px solid #e6e9ef;border-radius:10px}input:focus,select:focus{outline:none;box-shadow:0 6px 18px #4f46e514;border-color:#4f46e540}button{background:linear-gradient(90deg,var(--accent),#6d28d9);color:#fff;border:none;padding:10px 14px;border-radius:10px;cursor:pointer;box-shadow:0 6px 18px #4f46e51f}button.secondary{background:#f3f4f6;color:#111;box-shadow:none}.list{list-style:none;padding:0;margin:8px 0}.list li{padding:0 12px;border-radius:8px;margin-bottom:8px;background:linear-gradient(180deg,#fff,#fbfbff);box-shadow:0 2px 8px #1018280a;display:flex;align-items:center;gap:12px;height:44px}.member-row{display:flex;align-items:center}.mname{font-weight:600}.members-panel{min-height:var(--panel-height);max-height:var(--panel-height);display:flex;flex-direction:column}.members-panel .list{flex:1;overflow-y:auto;padding-right:6px}.members-panel .list li{margin-bottom:8px}.members-panel .panel-footer{margin-top:auto}.expense-panel{min-height:var(--panel-height);display:flex;flex-direction:column}.expense-panel .form-grid{flex:0 0 auto;display:flex;flex-direction:column;gap:12px}.expense-panel .form-row{align-items:start}.expense-panel .actions{margin-top:8px}.members-panel .list::-webkit-scrollbar{width:10px}.members-panel .list::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#e6e0ff,#c9b8ff);border-radius:8px}.members-panel .list::-webkit-scrollbar-track{background:transparent}.muted{color:var(--muted)}.tiny{font-size:12px}.table{width:100%;border-collapse:collapse;border-radius:8px;overflow:hidden}.table thead{background:linear-gradient(90deg,#fafafa,#f7f6ff)}.table th,.table td{padding:12px;text-align:left;border-bottom:1px solid #f6f7fb}.amount{font-weight:700;color:#0f172a}.actions{display:flex;gap:8px}.form-grid{display:flex;flex-direction:column;gap:12px}.form-row{display:grid;grid-template-columns:1fr 160px;gap:12px}.field{display:flex;flex-direction:column;gap:6px}.field.full{grid-column:1 / -1}.field-label{font-size:13px;color:var(--muted)}.secondary{padding:10px 12px;border-radius:10px}.error{position:fixed;right:18px;bottom:18px;background:#fee2e2;color:#7f1d1d;padding:10px;border-radius:6px}.foot{margin-top:14px;color:var(--muted)}.debts-list{display:flex;flex-direction:column;gap:8px}.debt-row{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;background:linear-gradient(180deg,#fff,#fbfbff);border-radius:8px;box-shadow:0 2px 8px #1018280a}.debt-info{display:flex;align-items:center;gap:10px;flex:1}.debt-ower{font-weight:600}.debt-arrow{color:var(--muted)}.debt-receiver{font-weight:600}.debt-amount{font-weight:700;color:#0f172a;font-size:15px}.filter-controls{margin-bottom:14px}.member-filter-select{width:100%;max-width:300px}.member-debts-view{display:flex;flex-direction:column;gap:16px}.calculations-summary h3{margin:0 0 12px;font-size:15px;font-weight:600}.summary-cards{display:grid;grid-template-columns:1fr 1fr;gap:12px}.summary-card{padding:14px;border-radius:10px;display:flex;flex-direction:column;gap:6px;border:2px solid}.summary-card.owes{background:#fff5f5;border-color:#fecaca}.summary-card.receives{background:#f0fdf4;border-color:#bbf7d0}.summary-label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}.summary-amount{font-size:24px;font-weight:700}.summary-card.owes .summary-amount{color:#dc2626}.summary-card.receives .summary-amount{color:#16a34a}.member-debts-sections{display:grid;grid-template-columns:1fr 1fr;gap:14px}.debts-section h4{margin:0 0 10px;font-size:14px;font-weight:600}.colored-debts-list{display:flex;flex-direction:column;gap:8px}.debt-item{padding:12px;border-radius:8px;display:flex;justify-content:space-between;align-items:center;border-left:4px solid}.debt-item.owes{background:linear-gradient(135deg,#fef2f2,#fff5f5);border-left-color:#dc2626}.debt-item.receives{background:linear-gradient(135deg,#f0fdf4,#dcfce7);border-left-color:#16a34a}.debt-to,.debt-from{color:#333;font-size:14px}.debt-value{font-weight:700;font-size:15px}.debt-item.owes .debt-value{color:#dc2626}.debt-item.receives .debt-value{color:#16a34a}.debt-item strong{font-weight:600}@media(max-width:800px){.main-grid,.form-row,.summary-cards,.member-debts-sections{grid-template-columns:1fr}}
