*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{min-height:100%;font-family:Noto Sans Arabic,Inter,system-ui,sans-serif;-webkit-font-smoothing:antialiased;background:#f5f8fa;color:#1e293b}html[lang=en] body{font-family:Inter,Noto Sans Arabic,system-ui,sans-serif}.page{max-width:640px;margin:0 auto;padding:calc(16px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));display:grid;gap:14px}.brand{display:flex;align-items:center;gap:10px;font-size:16px}.banner{padding:10px 14px;border-radius:12px;background:#d977061a;color:#b45309;font-size:14px}.card{background:#fff;border:1px solid #DEE5ED;border-radius:20px;padding:20px 18px;display:grid;gap:12px}h1{font-size:24px;font-weight:800;line-height:1.35}h2{font-size:15px;font-weight:700;color:#64748b}h3{font-size:14px;font-weight:700;color:#157a8c}.muted{font-size:14px;color:#64748b;line-height:1.6}.updated{justify-self:start;padding:4px 12px;border-radius:999px;background:#1a8a9e1a;color:#157a8c;font-size:13px;font-weight:600;line-height:1.6}.addendum{display:grid;gap:6px;padding-top:12px;border-top:1px dashed #DEE5ED}.letter{font-size:17px;line-height:1.95;white-space:pre-wrap;word-break:break-word}.privacy{display:grid;gap:4px;padding:12px 14px;border-radius:14px;background:#1a8a9e14;color:#157a8c;font-size:15px;line-height:1.6}button,.primary,.secondary{font:inherit;cursor:pointer}.primary,.secondary{display:block;width:100%;padding:14px 16px;border-radius:14px;font-size:17px;font-weight:700;text-align:center;text-decoration:none;border:none}.primary{background:#1a8a9e;color:#fff}.secondary{background:#fff;color:#1a8a9e;border:1px solid #1A8A9E55}button:disabled{opacity:.55;cursor:default}.link{background:none;border:none;color:#1a8a9e;font-size:15px;font-weight:600;padding:6px}.code{width:100%;padding:14px;border-radius:14px;border:1px solid #DEE5ED;font:inherit;font-size:26px;letter-spacing:.4em;text-align:center;direction:ltr}.error{color:#dc2626;font-size:15px;line-height:1.6}.meds{list-style:none;display:grid;gap:12px}.meds li{display:grid;gap:6px;padding:12px 14px;border-radius:14px;background:#f5f8fa;font-size:16px}.meds dl{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;font-size:15px}.meds dt{color:#64748b}.urgent{display:grid;gap:6px;padding:16px 18px;border-radius:20px;background:#dc26260f;border:1px solid rgba(220,38,38,.25);color:#991b1b;font-size:15px;line-height:1.7}.thread{list-style:none;display:flex;flex-direction:column;gap:10px}.bubble{max-width:85%;display:grid;gap:4px;padding:10px 14px;border-radius:16px;font-size:16px;line-height:1.7}.bubble p{white-space:pre-wrap;word-break:break-word}.bubble.patient{margin-left:auto;background:#157485;color:#fff;border-bottom-right-radius:4px}.bubble.doctor{margin-right:auto;background:#f5f8fa;border:1px solid #DEE5ED;color:#1e293b;border-bottom-left-radius:4px}.bubble-who{display:flex;flex-wrap:wrap;gap:2px 10px;font-size:12px;opacity:.8}.bubble-who span{font-weight:700}.bubble.patient .bubble-who{opacity:1}.ask{display:grid;gap:10px}.ask textarea{width:100%;min-height:112px;padding:12px 14px;border-radius:14px;border:1px solid #DEE5ED;background:#fff;color:inherit;font:inherit;font-size:16px;line-height:1.7;resize:vertical}.ask textarea:focus{outline:2px solid rgba(26,138,158,.45);outline-offset:1px;border-color:#1a8a9e}.counter{justify-self:end;margin-top:-4px;font-size:13px;color:#94a3b8}.counter.full{color:#b45309}.closed-line{padding:12px 14px;border-radius:14px;background:#f5f8fa;color:#475569;font-size:15px;line-height:1.6}.sent-line{color:#157a8c;font-size:15px;line-height:1.6}.sos{display:grid;gap:10px;padding:16px 18px;border-radius:16px;background:#fef2f2;border:2px solid #DC2626;color:#991b1b;font-size:17px;line-height:1.7;outline:none}.sos p{font-size:14px}.sos-call{display:block;padding:14px 16px;border-radius:14px;background:#dc2626;color:#fff;font-size:18px;font-weight:800;text-align:center;text-decoration:none}.actions{display:grid;gap:10px}.foot{text-align:center;font-size:13px;color:#94a3b8;line-height:1.8}.skeleton{height:220px;border-radius:20px;background:linear-gradient(90deg,#edf2f7,#f8fafc,#edf2f7);background-size:200% 100%;animation:shimmer 1.2s infinite linear}@keyframes shimmer{to{background-position:-200% 0}}@media print{body{background:#fff}.no-print{display:none!important}.card,.urgent{border:1px solid #CBD5E1;break-inside:avoid}.page{padding:0}.bubble.patient{background:#fff;color:#1e293b;border:1px solid #CBD5E1}.bubble{break-inside:avoid}}
