:root{--primary:#0d9488;--primary-dark:#0f766e;--bg:#f8fafc;--card:#fff;--text:#0f172a;--muted:#64748b;--border:#e2e8f0;--credit:#0d9488;--debt:#dc2626;--safe-bottom:env(safe-area-inset-bottom,0px);color:var(--text);background:var(--bg);font-family:Segoe UI,system-ui,-apple-system,sans-serif}*{box-sizing:border-box}html,body,#root{min-height:100%;margin:0}body{background:var(--bg);-webkit-tap-highlight-color:transparent}a{color:inherit;text-decoration:none}button,input,textarea{font:inherit}.app-shell{min-height:100dvh;padding-bottom:calc(64px + var(--safe-bottom));flex-direction:column;display:flex}.topbar{z-index:10;background:var(--card);border-bottom:1px solid var(--border);padding:12px 16px;position:sticky;top:0}.topbar h1{margin:0;font-size:1.1rem;font-weight:800}.topbar .sub{color:var(--muted);margin:2px 0 0;font-size:.75rem}.content{flex:1;padding:16px}.nav{height:calc(64px + var(--safe-bottom));padding-bottom:var(--safe-bottom);background:var(--card);border-top:1px solid var(--border);z-index:20;grid-template-columns:repeat(5,1fr);display:grid;position:fixed;bottom:0;left:0;right:0}.nav a{color:var(--muted);flex-direction:column;justify-content:center;align-items:center;gap:2px;font-size:.65rem;font-weight:600;display:flex}.nav a.active{color:var(--primary)}.nav svg{width:22px;height:22px}.card{background:var(--card);border:1px solid var(--border);border-radius:14px;margin-bottom:10px;padding:14px}.stat-grid{grid-template-columns:1fr 1fr;gap:10px;display:grid}.stat label{color:var(--muted);font-size:.75rem;display:block}.stat strong{margin-top:4px;font-size:1.25rem;display:block}.btn{background:var(--primary);color:#fff;cursor:pointer;border:none;border-radius:12px;justify-content:center;align-items:center;width:100%;min-height:48px;font-weight:700;display:inline-flex}.btn:disabled{opacity:.6;cursor:not-allowed}.btn.ghost{color:var(--debt);border:1px solid var(--border);background:0 0}.field{flex-direction:column;gap:6px;margin-bottom:12px;display:flex}.field label{color:var(--muted);font-size:.8rem;font-weight:600}.field input,.field textarea{border:1px solid var(--border);background:var(--card);border-radius:12px;padding:12px 14px}.field input:focus,.field textarea:focus{outline:2px solid color-mix(in srgb, var(--primary) 40%, transparent);border-color:var(--primary)}.seg{grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px;display:grid}.seg button{border:1px solid var(--border);background:var(--card);cursor:pointer;border-radius:12px;min-height:44px;font-weight:700}.seg button.on-credit{background:color-mix(in srgb, var(--credit) 15%, white);border-color:var(--credit);color:var(--credit)}.seg button.on-debt{background:color-mix(in srgb, var(--debt) 12%, white);border-color:var(--debt);color:var(--debt)}.row{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:8px;padding:10px 0;display:flex}.row:last-child{border-bottom:none}.muted{color:var(--muted);font-size:.85rem}.credit{color:var(--credit);font-weight:800}.debt{color:var(--debt);font-weight:800}.login-wrap{flex-direction:column;justify-content:center;max-width:420px;min-height:100dvh;margin:0 auto;padding:24px;display:flex}.brand{text-align:center;margin-bottom:28px}.brand h1{color:var(--primary);letter-spacing:.08em;margin:0;font-size:2rem}.alert{color:#991b1b;background:#fef2f2;border:1px solid #fecaca;border-radius:12px;margin-bottom:12px;padding:12px;font-size:.9rem}.sheet-backdrop{z-index:40;background:#0f172a73;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{background:var(--card);width:100%;padding:16px 16px calc(16px + var(--safe-bottom));border-radius:18px 18px 0 0;max-height:90dvh;overflow:auto}.amount-input{text-align:center;font-size:2rem;font-weight:800}.install-tip{color:#065f46;background:#ecfdf5;border:1px solid #a7f3d0;border-radius:12px;margin-bottom:12px;padding:12px;font-size:.85rem}.section-head{background:var(--primary);color:#fff;border-radius:14px 14px 0 0;padding:10px 14px;font-weight:700}.section-head.debt-head{background:var(--debt)}.list-card{padding:0;overflow:hidden}.list-card .row{padding:12px 14px}
