/* SenseCore mobile — RIAYAH Care (babies and older patients, hospital and home). Only the RIAYAH Care app loads this file.
   The light look of the RIAYAH Care artwork: white rounded cards on sky blue, the green "All good" card,
   the red "Abnormal vital signs · Take action" card, vital tiles with coloured icons. */
.care-app { --care-blue: #1a62d6; --care-navy: #0d3b8c; --care-green: #19b38a; --care-red: #e5484d; --care-amber: #f5a524; --card-shadow: 0 6px 18px rgba(13, 59, 140, .08); }
.care-app body { background: radial-gradient(900px 500px at 90% -10%, rgba(90, 162, 255, .22), transparent 60%), var(--bg); }
.care-app .bar { background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); }
.care-app .bar-mark { background: #fff; border-radius: 10px; }

/* sign-in */
.c-auth-hero { display: grid; gap: 14px; margin: 0 0 18px; padding: 18px; border-radius: 26px; background: linear-gradient(160deg, #f7fbff, #e2eefc); border: 1px solid var(--line); box-shadow: var(--card-shadow); }
.c-auth-copy h2 { margin: 0 0 6px; font: 800 1.45rem/1.15 var(--font-head); color: var(--care-navy); }
.c-auth-copy p { margin: 0; color: var(--muted); }
.c-auth-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.c-glass { padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .9); border: 1px solid #fff; box-shadow: var(--card-shadow); display: grid; gap: 6px; }
.c-glass .g-h { display: flex; gap: 8px; align-items: center; }
.c-glass b { display: block; font-size: .9rem; color: var(--care-navy); }
.c-glass .g-ok { display: flex; gap: 4px; align-items: center; font-size: .78rem; font-weight: 700; color: #127a55; }
.c-glass .g-ok svg { inline-size: 14px; block-size: 14px; padding: 2px; border-radius: 50%; background: var(--care-green); color: #fff; }
.c-glass p { margin: 0; display: flex; justify-content: space-between; gap: 6px; font-size: .82rem; color: var(--muted); }
.c-glass p b { font-size: .85rem; }
.c-flow { display: flex; flex-wrap: wrap; gap: 6px; }
.c-flow span { padding: 5px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--care-blue); }

/* icons */
.c-ico { inline-size: 38px; block-size: 38px; border-radius: 12px; display: inline-grid; place-items: center; background: #eaf2fe; color: var(--care-blue); flex: none; }
.c-ico svg { inline-size: 22px; block-size: 22px; }

/* the family card */
.follow.care-family { display: grid; gap: 12px; padding: 14px; border-radius: 24px; background: color-mix(in srgb, #fff 70%, var(--bg)); border: 1px solid var(--line); box-shadow: var(--card-shadow); }
.c-patient { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 20px; background: #fff; box-shadow: var(--card-shadow); color: var(--text); text-decoration: none; }
.c-patient b { display: block; font: 700 1.15rem/1.2 var(--font-head); }
.c-patient small { display: block; color: var(--muted); font-size: .85rem; }
.c-patient > i, .c-status > i { margin-inline-start: auto; font-style: normal; font-size: 1.4rem; color: var(--care-blue); }
.c-patient.big { box-shadow: none; background: transparent; padding: 4px 0; }
.c-avatar { inline-size: 58px; block-size: 58px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: linear-gradient(135deg, #dbe9ff, #c3dafe); color: var(--care-navy); font-weight: 800; font-size: 1.1rem; }
.c-avatar.baby { background: linear-gradient(135deg, #ffe3cf, #ffd0b0); color: #b5622f; }
.c-avatar svg { inline-size: 36px; block-size: 36px; }
.c-avatar.sm { inline-size: 40px; block-size: 40px; font-size: .85rem; }.c-avatar.sm svg { inline-size: 26px; block-size: 26px; }
.c-status { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; text-decoration: none; }
.c-status .dot { inline-size: 44px; block-size: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.c-status .dot svg { inline-size: 24px; block-size: 24px; color: #fff; }
.c-status b { display: block; font: 700 1.15rem/1.2 var(--font-head); }
.c-status small { display: block; font-size: .85rem; }
.c-status em { display: inline-block; margin-top: 4px; font-style: normal; font-weight: 700; font-size: .85rem; padding: 3px 10px; border-radius: 999px; background: var(--care-red); color: #fff; }
.c-status.good { background: linear-gradient(120deg, #e3f8ee, #d2f2e3); color: #127a55; }
.c-status.good .dot { background: var(--care-green); }
.c-status.bad { background: linear-gradient(120deg, #fdeced, #fbdfe1); color: #b42326; }
.c-status.bad .dot { background: var(--care-red); }
.c-status.bad > i { color: var(--care-red); }
.c-status.quiet { background: #eef1f6; color: var(--muted); }
.c-status.quiet .dot { background: #9aa8be; }
.c-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.c-tile { display: grid; gap: 2px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: var(--card-shadow); }
.c-tile .c-ico { inline-size: 34px; block-size: 34px; background: transparent; }
.c-tile.hr .c-ico, .c-tile.tp .c-ico { color: var(--care-red); }
.c-tile.o2 .c-ico, .c-tile.bp .c-ico { color: var(--care-blue); }
.c-tile small { color: var(--muted); font-size: .82rem; }
.c-tile b { font: 700 1.2rem/1.2 var(--font-head); color: var(--text); }
.c-tile b i { font-style: normal; font-size: .78rem; color: var(--muted); font-weight: 600; }
.c-tile.wide { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
.c-tile.wide .c-ico { grid-row: span 2; }
.c-info { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.c-info li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 16px; background: #fff; }
.c-info small { display: block; color: var(--muted); font-size: .78rem; }
.c-info b { font-size: .92rem; }
.c-more { display: block; text-align: center; padding: 11px; border-radius: 16px; background: #fff; color: var(--care-blue); font-weight: 700; text-decoration: none; box-shadow: var(--card-shadow); }
.care-family .sos-to { margin-top: 2px; }

/* patient page */
.care-page .c-tabs { margin: 12px 0; }
.c-flag { margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: #fff2e0; color: #8a4b00; font-size: .9rem; }
.c-body { display: grid; gap: 12px; }
.c-doses, .c-vacc, .c-visits { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.c-doses li { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 16px; background: #fff; box-shadow: var(--card-shadow); }
.c-doses li > b { color: var(--care-blue); }
.c-doses li small { display: block; color: var(--muted); font-size: .8rem; }
.c-doses li small.by { color: #127a55; font-weight: 600; }
.c-doses li.dose-late { background: #fff6f6; box-shadow: inset 0 0 0 1px #f6c9ce; }
.c-doses li.dose-late > b { color: var(--care-red); }
.c-doses li.empty, .c-vacc li.empty, .c-visits li.empty { display: block; color: var(--muted); }
.c-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #eef1f6; color: var(--muted); white-space: nowrap; }
.c-pill svg { inline-size: 16px; block-size: 16px; }
.c-pill.given, .c-pill.completed { background: #e3f8ee; color: #127a55; }
.c-pill.late, .c-pill.missed { background: #fdeced; color: #b42326; }
.c-pill.due, .c-pill.on_the_way { background: #fff2e0; color: #8a4b00; }
.c-pill.planned { background: #eaf2fe; color: var(--care-blue); }
.c-chart-box { padding: 10px; border-radius: 18px; background: #fff; box-shadow: var(--card-shadow); }
.c-chart { inline-size: 100%; block-size: 130px; display: block; }
.c-rec { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.c-rec input[name=note] { grid-column: 1 / -1; }
.c-rec button { grid-column: 1 / -1; }
.c-vacc li, .c-visits li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: #fff; box-shadow: var(--card-shadow); }
.c-vacc li small, .c-visits li small { display: block; color: var(--muted); font-size: .8rem; }
.c-vacc li > span:nth-child(2), .c-visits li > span:nth-child(2) { flex: 1; }
.c-vacc li.given .c-ico { background: #e3f8ee; color: #127a55; }
.c-vacc li.late { box-shadow: inset 0 0 0 1px #f8dfa9; background: #fffaf0; }
.c-visits li.missed { box-shadow: inset 0 0 0 1px #f6c9ce; }
.c-visits .row-actions { display: flex; gap: 6px; margin-top: 6px; }
.c-file-btn { margin: 12px 0; }

/* staff: ward board */
.c-beds { display: grid; gap: 8px; }
.c-bed { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: #fff; color: var(--text); text-decoration: none; border-inline-start: 5px solid var(--c, #b8c4d6); box-shadow: var(--card-shadow); }
.c-bed.ok { --c: var(--care-green); }.c-bed.alert { --c: var(--care-red); background: #fff7f7; }.c-bed.nosignal { --c: #b8c4d6; }
.c-bed .no { inline-size: 38px; block-size: 38px; border-radius: 10px; display: grid; place-items: center; background: #eef5fd; font-weight: 800; flex: none; }
.c-bed b { display: block; }
.c-bed small { display: block; color: var(--muted); font-size: .8rem; }
.c-bed small.v { color: var(--text); }
.c-bed em { display: block; font-style: normal; font-size: .8rem; font-weight: 700; color: var(--care-red); }
.list li.warn > a { box-shadow: inset 3px 0 0 var(--care-red); }
.tiles .tile .c-ico { inline-size: 30px; block-size: 30px; background: transparent; }

/* staff screens: a photo banner from the RIAYAH Care artwork */
.c-banner { position: relative; display: flex; align-items: flex-end; min-block-size: 132px; margin: 0 0 14px; border-radius: 22px; overflow: hidden; box-shadow: var(--card-shadow); }
.c-banner img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 35%; }
.c-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 59, 140, .88), rgba(13, 59, 140, .1) 70%); }
.c-banner span { position: relative; z-index: 1; padding: 14px 16px; color: #fff; }
.c-banner b { display: block; font: 700 1.2rem/1.2 var(--font-head); }
.c-banner small { display: block; opacity: .9; font-size: .85rem; }
.c-avatar.photo { overflow: hidden; background: #e6f0fd; }
.c-avatar.photo img { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 25%; }

/* reminders, follow-ups and motion (everything rests in its final state; motion only adds life) */
@keyframes c-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
@keyframes c-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .45); } 70% { box-shadow: 0 0 0 14px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
@keyframes c-ecg { from { background-position: 0 50%; } to { background-position: -160px 50%; } }
@keyframes c-ring { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: var(--off); } }
@keyframes c-rise { from { transform: translateY(8px); } to { transform: none; } }
.c-tile.hr .c-ico svg { animation: c-beat 1.4s ease-in-out infinite; transform-origin: 50% 55%; }
.c-status.bad .dot { animation: c-pulse 1.8s ease-out infinite; }
.c-status.good { position: relative; overflow: hidden; }
.c-status.good::after { content: ""; position: absolute; inset-inline: 0; bottom: 6px; height: 18px; opacity: .35; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 18'%3E%3Cpath d='M0 10h40l4-5 4 5h10l4-9 6 16 4-11 3 4h85' fill='none' stroke='%23127a55' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x 0 50% / 160px 18px;
  animation: c-ecg 2.6s linear infinite; }
.c-tile, .c-info li, .c-remind, .c-doses li { animation: c-rise .4s ease both; }
.c-mini-ring { inline-size: 22px; block-size: 22px; vertical-align: middle; margin-inline-start: 8px; transform: rotate(-90deg); }
.c-mini-ring circle { fill: none; stroke-width: 3.4; }
.c-mini-ring .bg { stroke: #dbe7f6; }
.c-mini-ring .fg { stroke: var(--care-green); stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--off); animation: c-ring 1s ease both; }
.c-remind { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(120deg, #eef7ff, #e8f7f1); border: 1px solid #cfe3fb; position: relative; }
.c-remind small { display: block; font-size: .76rem; color: var(--muted); }
.c-remind b { display: block; font-size: .92rem; color: var(--care-navy); }
.c-remind .dot { position: absolute; inset-inline-end: 12px; top: 12px; inline-size: 9px; block-size: 9px; border-radius: 50%; background: var(--care-red); animation: c-pulse 1.8s ease-out infinite; }
.c-rem { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.c-rem li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: #fff; box-shadow: var(--card-shadow); }
.c-rem li.new { box-shadow: inset 3px 0 0 var(--care-blue), var(--card-shadow); }
.c-rem li small { display: block; color: var(--muted); font-size: .8rem; }
.c-rem li.empty, .c-fu li.empty { display: block; color: var(--muted); }
.c-fu li.missed { box-shadow: inset 0 0 0 1px #f6c9ce; background: #fff7f7; }
@media (prefers-reduced-motion: reduce) { .c-tile.hr .c-ico svg, .c-status .dot, .c-status.good::after, .c-tile, .c-info li, .c-remind, .c-doses li, .c-mini-ring .fg, .c-remind .dot { animation: none !important; } }
