:root{--bg:#071620;--surface:#0e2432;--surface-2:#123044;--line:rgba(120,180,205,0.16);--ink:#eaf6fb;--muted:#8fb0c2;--brand:#38bdf8;--brand-deep:#0284c7;--ok:#34d399;--warn:#fbbf24;--danger:#f87171;--radius:18px;--radius-sm:13px;--safe-bottom:env(safe-area-inset-bottom,0px)}*{box-sizing:border-box}body,html{margin:0;padding:0;background:var(--bg);color:var(--ink);font-family:Segoe UI,Tahoma,system-ui,-apple-system,sans-serif;-webkit-font-smoothing:antialiased;overscroll-behavior-y:none}body{padding-bottom:calc(72px + var(--safe-bottom))}button,input,select,textarea{font:inherit}.shell{max-width:560px;margin-inline:auto;min-height:100dvh}.topbar{position:-webkit-sticky;position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:linear-gradient(180deg,rgba(7,22,32,.98),rgba(7,22,32,.9));-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}.topbar h1{margin:0;font-size:1.05rem;font-weight:700}.topbar small{display:block;color:var(--muted);font-size:.72rem;font-weight:400}.ghost-btn{padding:7px 13px;color:var(--muted);background:rgba(255,255,255,.05);border:1px solid var(--line);border-radius:999px;font-size:.76rem;cursor:pointer}.ghost-btn:active{transform:scale(.97)}.page{padding:16px;display:grid;grid-gap:14px;gap:14px}.tabbar{position:fixed;inset:auto 0 0;z-index:30;display:grid;grid-template-columns:repeat(4,1fr);max-width:560px;margin-inline:auto;padding:8px 8px calc(8px + var(--safe-bottom));background:rgba(9,28,40,.97);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-top:1px solid var(--line)}.tabbar button{display:grid;justify-items:center;grid-gap:3px;gap:3px;padding:8px 4px;color:var(--muted);background:none;border:0;border-radius:var(--radius-sm);font-size:.7rem;cursor:pointer}.tabbar button.active{color:var(--brand);background:rgba(56,189,248,.1)}.tabbar .tab-icon{font-size:1.25rem;line-height:1}.card{padding:15px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}.card-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px;font-size:.95rem;font-weight:700}.card-title small{color:var(--muted);font-size:.72rem;font-weight:400}.stat-grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:10px;gap:10px}.stat{padding:13px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm)}.stat b{display:block;font-size:1.5rem;color:var(--brand)}.stat span{color:var(--muted);font-size:.74rem}.search-row{display:flex;gap:8px}.field,input,select,textarea{width:100%;min-height:46px;padding:11px 14px;color:var(--ink);background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-sm);font-size:.9rem}textarea{min-height:84px;resize:vertical;line-height:1.7}.field::placeholder,input::placeholder,textarea::placeholder{color:#6b8ea3}.field:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none;border-color:rgba(56,189,248,.55)}label{display:grid;grid-gap:6px;gap:6px;color:var(--muted);font-size:.76rem;font-weight:600}.form-grid{display:grid;grid-gap:12px;gap:12px}.form-row{display:grid;grid-template-columns:1fr 1fr;grid-gap:10px;gap:10px}.btn{min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 18px;color:#04202c;background:linear-gradient(145deg,#56ccf6,#0ea5e9);border:1px solid transparent;border-radius:var(--radius-sm);font-size:.88rem;font-weight:700;cursor:pointer}.btn:disabled{opacity:.5;cursor:not-allowed}.btn:active:not(:disabled){transform:scale(.99)}.btn-wide{width:100%}.btn-soft{color:var(--ink);background:rgba(56,189,248,.1);border-color:rgba(56,189,248,.28)}.patient-row{display:flex;align-items:center;gap:12px;width:100%;padding:13px;color:inherit;text-align:right;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);cursor:pointer}.patient-row:active{background:var(--surface-2)}.avatar{flex:0 0 auto;display:grid;place-items:center;width:42px;height:42px;color:#04202c;background:linear-gradient(145deg,#56ccf6,#0284c7);border-radius:13px;font-weight:800}.patient-row .meta{flex:1 1;min-width:0;display:grid;grid-gap:3px;gap:3px}.patient-row .meta strong{font-size:.92rem}.patient-row .meta span{color:var(--muted);font-size:.75rem}.badge{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:999px;font-size:.7rem;font-weight:700;white-space:nowrap}.badge-ok{color:#052e22;background:var(--ok)}.badge-warn{color:#2a1c02;background:var(--warn)}.badge-danger{color:#2b0808;background:var(--danger)}.badge-mute{color:var(--muted);background:rgba(255,255,255,.07)}.badge-brand{color:#04202c;background:var(--brand)}.detail-list{display:grid;grid-gap:9px;gap:9px}.detail{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:9px;border-bottom:1px dashed rgba(120,180,205,.14)}.detail:last-child{border-bottom:0;padding-bottom:0}.detail dt{color:var(--muted);font-size:.78rem;margin:0}.detail dd{margin:0;font-size:.86rem;font-weight:600;text-align:left}.case-card{padding:13px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-sm);display:grid;grid-gap:9px;gap:9px}.case-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.case-head strong{font-size:.88rem}.money-row{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:7px;gap:7px;padding:10px;background:rgba(0,0,0,.22);border-radius:11px}.money-row div{text-align:center}.money-row b{display:block;font-size:.9rem;color:var(--brand)}.money-row span{color:var(--muted);font-size:.66rem}.empty{padding:30px 16px;color:var(--muted);text-align:center;font-size:.85rem}.notice{padding:11px 14px;border-radius:var(--radius-sm);font-size:.82rem;line-height:1.7}.notice-error{color:#ffd9d9;background:rgba(248,113,113,.14);border:1px solid rgba(248,113,113,.3)}.notice-ok{color:#ccfbef;background:rgba(52,211,153,.13);border:1px solid rgba(52,211,153,.3)}.notice-info{color:#d5ecf7;background:rgba(56,189,248,.1);border:1px solid rgba(56,189,248,.26)}.type-picker{display:grid;grid-gap:8px;gap:8px}.type-option{display:flex;align-items:flex-start;gap:11px;padding:13px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-sm);cursor:pointer;text-align:right}.type-option.selected{border-color:var(--brand);background:rgba(56,189,248,.12)}.type-option .n{flex:0 0 auto;display:grid;place-items:center;width:26px;height:26px;border-radius:9px;background:rgba(255,255,255,.09);font-size:.8rem;font-weight:800}.type-option.selected .n{background:var(--brand);color:#04202c}.type-option .t{display:grid;grid-gap:3px;gap:3px}.type-option .t strong{font-size:.87rem}.type-option .t span{color:var(--muted);font-size:.73rem;line-height:1.6}.login-wrap{min-height:100dvh;display:grid;place-items:center;padding:24px}.login-card{width:100%;max-width:380px;padding:26px 22px;background:var(--surface);border:1px solid var(--line);border-radius:24px;display:grid;grid-gap:14px;gap:14px}.login-card h1{margin:0;font-size:1.3rem}.login-card p{margin:0;color:var(--muted);font-size:.83rem;line-height:1.7}.brand-mark{display:grid;place-items:center;width:54px;height:54px;background:linear-gradient(145deg,#56ccf6,#0284c7);border-radius:17px;font-size:1.5rem}.skeleton{height:66px;border-radius:var(--radius-sm);background:linear-gradient(90deg,var(--surface),var(--surface-2),var(--surface));background-size:200% 100%;animation:shimmer 1.4s infinite}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}input[type=email],input[type=number],input[type=password],input[type=tel],input[type=text]{background:var(--surface-2);color:var(--ink);-webkit-text-fill-color:var(--ink)}select option{background:var(--surface-2);color:var(--ink)}.action-grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:8px;gap:8px}.open-hint{padding-top:4px;color:var(--brand);font-size:.74rem;font-weight:700}