:root{--bg: #f4f5f7;--surface: #ffffff;--surface-2: #f8f9fa;--text: #222;--muted: #666;--border: #dcdfe4;--primary: #0b65d8;--primary-text: #fff;--selected: #e3eefc;--danger: #c62828;--error-bg: #fdecea;--ok: #2e7d32;color-scheme:light}:root[data-theme=dark]{--bg: #111;--surface: #1e1e1e;--surface-2: #262626;--text: #e4e4e4;--muted: #9a9a9a;--border: #3a3a3a;--primary: #4a9eff;--primary-text: #0b1320;--selected: #1d3350;--danger: #ef6b6b;--error-bg: #3b1d1d;--ok: #81c784;color-scheme:dark}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:15px}a{color:var(--primary)}input,textarea,button{font:inherit;color:inherit}input,textarea{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:7px 10px;width:100%}input:focus,textarea:focus{outline:2px solid var(--primary);outline-offset:-1px}button{background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:6px 12px;cursor:pointer;white-space:nowrap}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--primary);color:var(--primary-text);border-color:var(--primary)}button.icon{background:none;border:none;padding:2px 8px;font-size:18px;line-height:1;color:var(--muted)}button.icon.danger:hover{color:var(--danger)}button.link{background:none;border:none;padding:0;color:var(--primary);text-decoration:underline}.muted{color:var(--muted)}.small{font-size:13px}.error{background:var(--error-bg);color:var(--danger);padding:8px 10px;border-radius:6px;margin:8px 0}.error.banner{margin:0;border-radius:0;cursor:pointer}.empty{color:var(--muted);padding:12px 4px;list-style:none}.loading{padding:40px;text-align:center;color:var(--muted)}.app{display:flex;flex-direction:column;height:100vh}.topbar{display:flex;align-items:center;gap:12px;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--border)}.topbar h1{font-size:18px;margin:0}.topbar .spacer{flex:1}.home-link{text-decoration:none;font-size:14px;white-space:nowrap}.layout{display:flex;flex:1;min-height:0}.sidebar{width:300px;flex-shrink:0;display:flex;flex-direction:column;gap:8px;padding:16px;background:var(--surface);border-right:1px solid var(--border);overflow:hidden}.sidebar h2,.notes-header h2{font-size:16px;margin:0}.add-row{display:flex;gap:6px}.insurer-list{list-style:none;margin:0;padding:0;overflow-y:auto;flex:1}.insurer-list li{display:flex;align-items:center;border-radius:6px}.insurer-list li:hover{background:var(--surface-2)}.insurer-list li.selected{background:var(--selected)}.insurer-name{flex:1;display:flex;justify-content:space-between;gap:8px;text-align:left;background:none;border:none;padding:8px 10px;min-width:0}.insurer-name span:first-child{overflow:hidden;text-overflow:ellipsis}.insurer-list li.selected .insurer-name{font-weight:600}.count{color:var(--muted);font-size:12px}.rename{margin:2px}.notes-panel{flex:1;overflow-y:auto;padding:16px 24px;min-width:0}.notes-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.notes-search{display:flex;gap:8px;margin-bottom:16px}.scope{display:flex}.scope button{border-radius:0}.scope button:first-child{border-radius:6px 0 0 6px}.scope button:last-child{border-radius:0 6px 6px 0;border-left:none}.scope button.active{background:var(--selected);font-weight:600}.notes{display:flex;flex-direction:column;gap:12px;max-width:900px}.note{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:12px 14px}.note-top{display:flex;align-items:center;gap:6px}.note-heading{font-size:17px;font-weight:600;border-color:transparent;padding:4px 6px}.note-body{margin-top:6px;resize:vertical;min-height:70px;line-height:1.5;border-color:transparent;padding:6px}.note-heading:hover,.note-body:hover{border-color:var(--border)}.note-meta{display:flex;gap:14px;justify-content:flex-end;font-size:12px;color:var(--muted);margin-top:4px}.note-meta button.link{margin-right:auto;font-size:12px}.save-state.saved{color:var(--ok)}.save-state.error{color:var(--danger)}@media (max-width: 720px){.app{height:auto;min-height:100vh}.layout{flex-direction:column}.sidebar{width:auto;border-right:none;border-bottom:1px solid var(--border)}.insurer-list{max-height:240px}.notes-panel{padding:16px}.notes-search{flex-direction:column}.topbar .muted{display:none}}
