:root{--bg:#f5f7f6;--surface:#fff;--surface2:#eef3f2;--text:#0f1a1c;--muted:#55666a;--border:#dce4e2;--line:#c9d4d1;--accent:#0f766e;--on-accent:#fff;--accent-soft:#ddf2ef;--warn:#9a4a00;--warn-soft:#fdebd7;--ok:#166534;--ok-soft:#dcfce7;--bad:#a61b1b;--bad-soft:#fde2e2;--radius:14px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;font-family:Inter,Noto Sans Sinhala,Noto Sans Tamil,Iskoola Pota,Latha,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}[data-theme=dark]{--bg:#0b1214;--surface:#141e21;--surface2:#1c2a2e;--text:#e8f0ef;--muted:#9db0ad;--border:#2a3a3e;--line:#3a4c50;--accent:#5eead4;--on-accent:#06201d;--accent-soft:#123a36;--warn:#fbbf77;--warn-soft:#3a2a14;--ok:#86efac;--ok-soft:#14301f;--bad:#fca5a5;--bad-soft:#3b1616;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}html,body{background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;margin:0;font-size:15px;line-height:1.45}button,input,select,textarea{font:inherit;color:inherit}a{color:var(--accent)}h1,h2,h3,p{margin:0}h1{font-size:24px;font-weight:700}h2{font-size:17px;font-weight:700}.muted{color:var(--muted)}.small{font-size:13px}.tiny{font-size:12px}.stack{gap:var(--gap,12px);flex-direction:column;display:flex}.row{align-items:center;gap:var(--gap,10px);flex-wrap:wrap;display:flex}.between{justify-content:space-between}.grow{flex:1;min-width:0}.grid{grid-template-columns:repeat(auto-fit, minmax(var(--min,200px), 1fr));gap:12px;display:grid}.card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:16px}.card.flat{background:var(--surface2);border:none}.hero{background:var(--accent);color:var(--on-accent);border-radius:20px;padding:20px}.hero .big{font-size:30px;font-weight:700}.btn{border:1px solid var(--line);background:var(--surface);cursor:pointer;min-height:44px;color:var(--text);white-space:nowrap;border-radius:12px;justify-content:center;align-items:center;gap:8px;padding:0 16px;font-weight:600;text-decoration:none;display:inline-flex}.btn.primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}.btn.ghost{color:var(--accent);background:0 0;border-color:#0000}.btn.block{width:100%;min-height:52px;font-size:16px}.btn.sm{border-radius:9px;min-height:34px;padding:0 12px;font-size:13px}.btn:disabled{opacity:.55;cursor:not-allowed}.btn.danger{color:var(--bad)}.field{flex-direction:column;gap:6px;display:flex}.field>span:first-child{font-size:14px;font-weight:600}.input,select.input{border:1px solid var(--line);background:var(--surface);border-radius:12px;outline:none;width:100%;min-width:0;height:48px;padding:0 14px}.input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.input.lg{height:56px;font-size:22px;font-weight:700}.prefix{border:1px solid var(--line);background:var(--surface);border-radius:12px;align-items:center;gap:8px;height:48px;padding:0 14px;display:flex}.prefix input{background:0 0;border:none;outline:none;flex:1;min-width:0;height:100%}.seg{background:var(--surface2);border-radius:12px;grid-auto-columns:1fr;grid-auto-flow:column;gap:4px;padding:4px;display:grid}.seg button{height:40px;color:var(--muted);cursor:pointer;background:0 0;border:none;border-radius:9px;font-weight:600}.seg button[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px #00000014}.chip{background:var(--surface2);white-space:nowrap;border-radius:999px;align-items:center;padding:3px 10px;font-size:12px;font-weight:600;display:inline-flex}.chip.ok{background:var(--ok-soft);color:var(--ok)}.chip.warn{background:var(--warn-soft);color:var(--warn)}.switch{background:var(--line);cursor:pointer;border:none;border-radius:14px;flex:none;width:46px;height:28px;padding:3px;display:inline-flex}.switch:after{content:"";background:#fff;border-radius:11px;width:22px;height:22px;transition:transform .15s}.switch[aria-checked=true]{background:var(--accent)}.switch[aria-checked=true]:after{transform:translate(18px)}.option{border:1px solid var(--border);background:var(--surface);cursor:pointer;text-align:left;border-radius:14px;align-items:center;gap:12px;width:100%;padding:14px;display:flex}.option[aria-pressed=true]{border:2px solid var(--accent);padding:13px}.radio{border:2px solid var(--line);border-radius:10px;flex:none;width:20px;height:20px}.option[aria-pressed=true] .radio{border:6px solid var(--accent)}.avatar{background:var(--accent-soft);width:44px;height:44px;color:var(--accent);border-radius:22px;flex:none;justify-content:center;align-items:center;font-weight:700;display:flex}.icon-box{background:var(--accent-soft);width:40px;height:40px;color:var(--accent);border-radius:12px;flex:none;justify-content:center;align-items:center;display:flex}.alert{border-radius:12px;padding:12px 14px;font-size:14px;font-weight:600}.alert.bad{background:var(--bad-soft);color:var(--bad)}.alert.ok{background:var(--ok-soft);color:var(--ok)}.alert.info{background:var(--accent-soft);color:var(--accent)}.list>*+*{border-top:1px solid var(--border)}.list-item{align-items:center;gap:12px;padding:12px 0;display:flex}.combo{position:relative}.combo-list{z-index:5;background:var(--surface);border:1px solid var(--border);border-radius:14px;max-height:260px;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow:auto;box-shadow:0 10px 30px #0000001f}.combo-list button{border:none;border-bottom:1px solid var(--border);text-align:left;cursor:pointer;background:0 0;flex-direction:column;align-items:flex-start;width:100%;padding:11px 14px;display:flex}.combo-list button:hover,.combo-list button:focus{background:var(--surface2);outline:none}.app{max-width:520px;min-height:100vh;flex-direction:column;min-height:100dvh;margin:0 auto;display:flex}.app-main{flex-direction:column;flex:1;gap:18px;padding:20px 18px 24px;display:flex}.topbar{align-items:center;gap:6px;padding:12px 8px 0;display:flex}.icon-btn{cursor:pointer;width:44px;height:44px;color:var(--text);background:0 0;border:none;border-radius:22px;justify-content:center;align-items:center;display:flex}.tabbar{background:var(--surface);border-top:1px solid var(--border);padding:4px 6px calc(6px + env(safe-area-inset-bottom));grid-template-columns:repeat(3,1fr);display:grid;position:-webkit-sticky;position:sticky;bottom:0}.tabbar button{min-height:54px;color:var(--muted);cursor:pointer;background:0 0;border:none;flex-direction:column;align-items:center;gap:2px;font-size:12px;font-weight:600;display:flex}.tabbar button[aria-current=page]{color:var(--accent)}.footer-bar{padding:12px 18px calc(16px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--border);position:-webkit-sticky;position:sticky;bottom:0}.portal{flex-wrap:wrap;min-height:100vh;display:flex}.side{background:var(--surface);border-right:1px solid var(--border);flex-direction:column;flex:230px;gap:16px;max-width:100%;padding:18px 12px;display:flex}.side nav{flex-direction:column;gap:2px;display:flex}.side nav button{text-align:left;min-height:40px;color:var(--muted);cursor:pointer;background:0 0;border:none;border-radius:10px;align-items:center;gap:8px;padding:0 12px;font-weight:600;display:flex}.side nav button[aria-current=page]{background:var(--accent-soft);color:var(--accent)}.content{flex-direction:column;flex:999 600px;gap:18px;min-width:0;padding:24px max(16px,min(3vw,32px)) 48px;display:flex}@media (max-width:860px){.side{border-right:none;border-bottom:1px solid var(--border)}.side nav{flex-flow:wrap}}.table-wrap{background:var(--surface);border:1px solid var(--border);border-radius:16px;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:14px}th{text-align:left;color:var(--muted);background:var(--surface2);white-space:nowrap;padding:10px 14px;font-size:12px;font-weight:600}td{border-top:1px solid var(--border);vertical-align:middle;padding:11px 14px}td.num,th.num{text-align:right;white-space:nowrap}.kpi{flex-direction:column;gap:4px;display:flex}.kpi b{font-size:22px}.center-screen{justify-content:center;align-items:center;min-height:100vh;padding:24px;display:flex}.spinner{border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;width:28px;height:28px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.sr-only{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.app-header{z-index:5;background:var(--surface);border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:6px;padding:6px 8px 6px 14px;display:flex;position:-webkit-sticky;position:sticky;top:0}.brand{color:var(--text);cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;padding:0;font-size:17px;display:flex}.brand-mark{background:var(--accent);width:30px;height:30px;color:var(--on-accent);border-radius:9px;justify-content:center;align-items:center;display:inline-flex}.header-icons{align-items:center;gap:0;display:flex}.header-icons .icon-btn{width:40px;height:40px}.menu{z-index:10;background:var(--surface);border:1px solid var(--border);border-radius:12px;flex-direction:column;min-width:150px;padding:4px;display:flex;position:absolute;top:44px;right:0;box-shadow:0 8px 24px #00000024}.menu button{min-height:42px;color:var(--text);cursor:pointer;text-align:left;background:0 0;border:none;border-radius:8px;justify-content:space-between;align-items:center;gap:10px;padding:0 12px;font-size:15px;display:flex}.menu button:hover,.menu button[aria-checked=true]{background:var(--surface2)}.chips{flex-wrap:wrap;gap:6px;display:flex}.chip-btn{border:1px solid var(--border);background:var(--surface);min-height:34px;color:var(--text);cursor:pointer;border-radius:999px;padding:0 14px;font-weight:600}.chip-btn[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.chip.bad{background:var(--bad-soft);color:var(--bad)}.chip.accent{background:var(--accent-soft);color:var(--accent)}.msg.mine{background:var(--accent-soft);border-color:#0000}.msg.unread{border-left:3px solid var(--accent)}textarea.input{resize:vertical;height:auto;font:inherit;padding-top:10px;padding-bottom:10px}.portal-head{justify-content:flex-end;align-items:center;gap:2px;display:flex;position:relative}.badge{color:#fff;text-align:center;box-sizing:border-box;border:2px solid var(--surface);pointer-events:none;background:#d92d20;border-radius:999px;min-width:18px;height:18px;padding:0 5px;font-size:11px;font-weight:700;line-height:18px;position:absolute;top:3px;right:1px}
