:root{font-family:Cairo,Tajawal,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:linear-gradient(120deg,#2b547e,#4686c9);color:#1f2933}body{margin:0;direction:rtl;background-color:#eef1f4}.app{min-height:100vh;display:flex;flex-direction:column}.app__header{background:linear-gradient(120deg,#2b547e,#4686c9);color:#fff;padding:1.5rem 2rem;display:flex;flex-direction:row;gap:1.5rem;justify-content:space-between}.app__brand{display:flex;align-items:center}.app__logo{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:16px}.app__logo img{width:48px;height:48px}.app__brand-text{display:flex;flex-direction:column}.app__brand-title{line-height:22px;font-size:1.3rem;font-weight:700;letter-spacing:.04em}.app__brand-subtitle{font-size:.6rem;opacity:.85;word-spacing:12px}.app__nav{display:flex;gap:1rem;flex-wrap:wrap}.app__nav-link{color:#d7e8ff;text-decoration:none;padding:.5rem 1rem;border-radius:999px;transition:background .3s ease}.app__nav-link--active,.app__nav-link:hover{background:#fff3}.app__content{flex:1;padding:2rem;display:flex;flex-direction:column;gap:1rem}.app__footer{background:#1f2933;color:#fff;text-align:center;padding:1rem}.page{display:grid;gap:1.5rem}.page--grid{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}.page--cards{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.page__column{display:flex;flex-direction:column;gap:1.5rem}.panel{background:#fff;border-radius:18px;padding:1.5rem;box-shadow:0 12px 32px #0f172a1a}.panel h3{margin-top:0}.panel--actions{display:flex;flex-direction:column;gap:1rem;text-align:center}.panel__header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.link-button{background:none;border:none;color:#2563eb;font-weight:600;cursor:pointer;padding:0;font-family:Cairo,Tajawal,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.link-button:hover{text-decoration:underline}.panel--selector{margin-bottom:1rem}.panel--toggle{display:flex;align-items:center;justify-content:center}.mode-toggle{display:flex;align-items:center;gap:.75rem;font-weight:600}.switch{position:relative;display:inline-block;width:52px;height:28px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#cbd5f5;border-radius:34px;transition:.3s}.slider:before{position:absolute;content:"";height:22px;width:22px;right:4px;bottom:3px;background-color:#fff;border-radius:50%;transition:.3s}.switch input:checked+.slider{background-color:#2563eb}.switch input:checked+.slider:before{transform:translate(-24px)}.panel--toolbar{display:flex;flex-direction:column;justify-content:center}.panel--toolbar h3{margin:0 0 .5rem}.patient-toolbar .panel--selector{margin-bottom:0;flex:1 1 260px}.patient-toolbar .panel--actions,.patient-toolbar .panel--toggle{flex:1 1 260px}.panel--manual{margin-bottom:1.5rem;display:flex;flex-direction:column;gap:1rem}.panel--card{text-align:center}.card-id{color:#6b7280;font-size:.9rem}.alert-banner{border-radius:16px;padding:1rem 1.25rem;color:#fff;display:flex;flex-direction:column;gap:.35rem}.alert-banner--low{background:linear-gradient(120deg,#f97316,#fb923c)}.alert-banner--high{background:linear-gradient(120deg,#ef4444,#f87171)}.alert-banner--normal{background:linear-gradient(120deg,#22c55e,#4ade80)}.alert-banner__status{font-weight:700}.forecast-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:.75rem;list-style:none;padding:0;margin:1rem 0}.forecast-grid li{background:#f3f4f6;border-radius:12px;padding:.75rem;text-align:center}.forecast-grid strong{display:block;margin-top:.3rem;font-size:1.1rem}.forecast-confidence{margin:0;color:#475569}.form{display:flex;flex-direction:column;gap:.75rem}.form-field{display:flex;flex-direction:column;gap:.35rem}.form-field input,.form-field select{padding:.6rem;border-radius:10px;border:1px solid #cbd5e1;font-family:Cairo,Tajawal,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.form button{padding:.75rem;border:none;font-weight:600;border-radius:12px;background:#2563eb;color:#fff;cursor:pointer;font-family:Cairo,Tajawal,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.button-primary{padding:.35rem 1.5rem;border:none;border-radius:12px;background:linear-gradient(120deg,#2563eb,#3b82f6);color:#fff;cursor:pointer;font-weight:600;transition:transform .2s ease;font-family:Cairo,Tajawal,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.button-primary:hover{transform:translateY(-1px)}.button-secondary{padding:.35rem 1.5rem;border-radius:12px;border:1px solid #2563eb;background:transparent;color:#1f2937;cursor:pointer;font-weight:600;transition:background .2s ease,color .2s ease;font-family:Cairo,Tajawal,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.button-secondary:hover{background:#2563eb1f;color:#1d4ed8}.action-buttons{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap;font-family:Cairo,Tajawal,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.button{font-family:Cairo,Tajawal,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif!important}.form-divider{height:1px;background:#e2e8f0;margin:1rem 0}.form-feedback{color:#047857;font-weight:600}.patient-toolbar{display:flex;gap:1rem;flex-wrap:wrap}.guardian-header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.guardian-header form-field{align-self:right}.f-r{flex-direction:row;flex:1;display:flex;justify-content:center}.guardian-status{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin-top:1.5rem}.guardian-value{font-size:2.2rem;font-weight:700}.guardian-alert{padding:.6rem;border-radius:12px;font-weight:600}.guardian-alert--low{background:#f9731633;color:#9a3412}.guardian-alert--high{background:#f8717140;color:#b91c1c}.guardian-alert--normal{background:#22c55e33;color:#166534}.list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.5rem}.list-item{display:flex;flex-direction:column;gap:.2rem}.list-item__title{font-weight:700;color:#1f2937}.list-item__meta{font-size:.85rem;color:#64748b}.list__empty{color:#94a3b8}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a40;display:flex;align-items:center;justify-content:center;z-index:1000;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.modal-content{background:#fff;border-radius:20px;width:min(480px,90vw);box-shadow:0 20px 40px #0f172a2e;animation:modal-pop .2s ease}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:1.25rem 1.5rem .75rem}.modal-close{background:none;border:none;font-size:1.5rem;line-height:1;cursor:pointer;color:#1f2937}.modal-body{padding:0 1.5rem 1.5rem}.modal-form,.modal-section{display:flex;flex-direction:column;gap:1rem}.list--modal{max-height:360px;overflow-y:auto}.modal-pagination{display:flex;justify-content:space-between;align-items:center;gap:1rem}.modal-pagination .button-secondary{padding:.5rem 1.1rem}.toast{position:fixed;top:1rem;left:1.5rem;background:#2563eb;color:#fff;padding:.75rem 1.25rem;border-radius:999px;box-shadow:0 12px 32px #0f172a33;z-index:2000;font-weight:600}.last-source{margin-top:.75rem;font-weight:600;color:#475569}@keyframes modal-pop{0%{transform:translateY(12px);opacity:0}to{transform:translateY(0);opacity:1}}@media (max-width: 768px){.app__content{padding:1rem}.panel{padding:1.25rem}.patient-toolbar{flex-direction:column}}
