/* SosTriage additions on top of the CAREAdmin theme. Theme classes do the layout; these cover clinical states. */

.care-auth-bg { background: url("/brand-assets/careadmin/assets/images/authentication/img-auth-bg.jpg") center / cover no-repeat; }
[data-pc-theme="dark"] .care-auth-bg { background: none; }

.care-avatar {
  width: 45px; height: 45px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #4680ff1a; color: #4680ff; font-weight: 600; font-size: 18px;
}
.care-session { font-size: 12px; color: #5b6b79; }

.care-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.care-12 { grid-column: span 12; }
.care-8 { grid-column: span 12; }
.care-6 { grid-column: span 12; }
.care-4 { grid-column: span 12; }
.care-3 { grid-column: span 12; }
@media (min-width: 768px) { .care-6 { grid-column: span 6; } .care-3 { grid-column: span 6; } .care-4 { grid-column: span 6; } }
@media (min-width: 1280px) { .care-8 { grid-column: span 8; } .care-4 { grid-column: span 4; } .care-3 { grid-column: span 3; } }
.care-grid > * { min-width: 0; }
.care-grid .card { margin-bottom: 0; height: 100%; }

.care-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.care-cardhead h5 { margin: 0; }
.care-muted { color: #5b6b79; font-size: 13px; }
[data-pc-theme="dark"] .care-muted { color: #8996a4; }

.care-kpi { display: flex; align-items: center; gap: 14px; }
.care-kpi .icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.care-kpi h3 { margin: 0; font-size: 24px; }
.care-kpi span { font-size: 13px; color: #5b6b79; }

.care-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: #bec8d0; }
.care-acuity { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f3f5f7; color: #3e4853; white-space: nowrap; }
.care-acuity.red { background: #dc26261a; color: #b91c1c; }
.care-acuity.yellow { background: #e58a001f; color: #9a5b00; }
.care-acuity.green { background: #2ca87f1f; color: #1d7a5b; }
.care-acuity.red .care-dot { background: #dc2626; }
.care-acuity.yellow .care-dot { background: #e58a00; }
.care-acuity.green .care-dot { background: #2ca87f; }

.care-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: #4680ff14; color: #3060d9; white-space: nowrap; }
.care-pill.warn { background: #e58a001f; color: #9a5b00; }
.care-pill.danger { background: #dc26261a; color: #b91c1c; }
.care-pill.ok { background: #2ca87f1f; color: #1d7a5b; }
.care-pill.muted { background: #f3f5f7; color: #5b6b79; }

.care-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.care-table th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #5b6b79; padding: 10px 12px; border-bottom: 1px solid #e7eaee; }
.care-table td { padding: 12px; border-bottom: 1px solid #f0f2f5; vertical-align: top; }
.care-table tr[data-href] { cursor: pointer; }
.care-table tr[data-href]:hover td { background: #4680ff0a; }
[data-pc-theme="dark"] .care-table th, [data-pc-theme="dark"] .care-table td { border-color: #303f50; }

.care-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.care-tabs button { border: 1px solid #e7eaee; background: transparent; border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; color: inherit; }
.care-tabs button.active { background: #4680ff; border-color: #4680ff; color: #fff; }
.care-tabs .count { margin-left: 6px; font-weight: 600; }

.care-banner { border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.care-banner.warn { background: #fff6e0; border: 1px solid #f5c76a; color: #7a4d00; }
.care-banner.danger { background: #fdecec; border: 1px solid #f3a3a3; color: #8a1c1c; }
.care-banner.info { background: #eef3ff; border: 1px solid #c4d4ff; color: #22408f; }
.care-banner h6 { margin: 0 0 4px; color: inherit; }

.care-fields { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.care-fields dt { color: #5b6b79; font-weight: 500; }
.care-fields dd { margin: 0; }

.care-list { list-style: none; margin: 0; padding: 0; }
.care-list li { padding: 10px 0; border-bottom: 1px solid #f0f2f5; }
.care-list li:last-child { border-bottom: 0; }
.care-quote { display: block; margin-top: 4px; font-style: italic; color: #5b6b79; }

.care-timeline { position: relative; margin: 0; padding: 0 0 0 22px; list-style: none; }
.care-timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: #e7eaee; }
.care-timeline li { position: relative; padding: 0 0 18px; }
.care-timeline li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #4680ff; }
.care-timeline li.red::before { border-color: #dc2626; background: #dc2626; }
.care-timeline li.yellow::before { border-color: #e58a00; background: #e58a00; }
.care-timeline li.green::before { border-color: #2ca87f; background: #2ca87f; }
.care-timeline a { color: inherit; }

.care-transcript { max-height: 420px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.care-line { max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 14px; background: #f3f5f7; }
.care-line.caller { align-self: flex-end; background: #4680ff14; }
.care-line small { display: block; font-size: 11px; color: #5b6b79; margin-bottom: 2px; }

.care-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.care-actions .btn { font-size: 13px; }
.care-form label { display: block; font-size: 13px; font-weight: 500; margin: 10px 0 4px; }
.care-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.care-form textarea { min-height: 80px; }
#qr svg, #enroll svg { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto; }
.care-secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; letter-spacing: 2px; padding: 12px 16px; background: #f3f5f7; border-radius: 8px; text-align: center; user-select: all; }
.care-toast { position: fixed; right: 24px; bottom: 24px; z-index: 2000; padding: 12px 18px; border-radius: 10px; background: #1d2630; color: #fff; font-size: 14px; box-shadow: 0 10px 30px #0003; opacity: 0; transform: translateY(10px); transition: all .2s; }
.care-toast.show { opacity: 1; transform: none; }
.care-toast.error { background: #b91c1c; }
.care-empty { padding: 28px; text-align: center; color: #5b6b79; }
.care-skeleton { color: #8996a4; font-size: 13px; }

dialog.care-dialog { border: 0; border-radius: 14px; padding: 0; width: min(640px, 94vw); box-shadow: 0 24px 60px #0004; }
dialog.care-dialog::backdrop { background: #1d263080; }
dialog.care-dialog .care-dialog-body { padding: 24px; }
dialog.care-dialog .care-dialog-foot { padding: 16px 24px; border-top: 1px solid #e7eaee; display: flex; justify-content: flex-end; gap: 8px; }

/* Printable report sheets */
.care-sheet { max-width: 820px; margin: 24px auto; background: #fff; color: #1d2630; padding: 36px 42px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.care-sheet h1 { font-size: 22px; margin: 0 0 4px; }
.care-sheet h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: #3060d9; margin: 24px 0 8px; border-bottom: 1px solid #e7eaee; padding-bottom: 4px; }
.care-sheet .meta { color: #5b6b79; font-size: 12px; }
.care-sheet .stamp { border: 2px solid #b91c1c; color: #b91c1c; padding: 6px 12px; display: inline-block; border-radius: 6px; font-weight: 700; font-size: 12px; margin-top: 10px; }
.care-sheet .toolbar { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 12px; }
@media print {
  body { background: #fff !important; }
  .care-sheet { margin: 0; padding: 0; box-shadow: none; }
  .care-sheet .toolbar { display: none; }
}

/* Patient portal */
.my-wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }
.my-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.my-top img { height: 32px; }
.my-hero { border-radius: 16px; padding: 24px; color: #fff; background: linear-gradient(135deg, #2f5bd9, #4680ff); margin-bottom: 24px; }
.my-hero.red { background: linear-gradient(135deg, #a61b1b, #dc2626); }
.my-hero.yellow { background: linear-gradient(135deg, #b36b00, #e58a00); }
.my-hero.green { background: linear-gradient(135deg, #1d7a5b, #2ca87f); }
.my-hero h2, .my-hero p { color: #fff; margin: 0; }
.my-hero p { opacity: .92; margin-top: 6px; }
.my-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.my-steps li { counter-increment: step; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px solid #f0f2f5; }
.my-steps li::before { content: counter(step); position: absolute; left: 0; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: #4680ff; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.my-emergency { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.my-handover { position: fixed; inset: 0; z-index: 3000; background: #fff; overflow: auto; padding: 24px; display: none; }
.my-handover.open { display: block; }
