/* Styles for components added in the 2026 upgrade. Uses the variables defined in app.css. */

/* Accessibility */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10000; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); }
.skip-link:focus { left: 8px; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.page-loading { padding: 48px; text-align: center; color: var(--text2); }
/* Headings receive focus after navigation (screen readers); no visible box for mouse users. */
h1:focus, h1:focus-visible, [tabindex="-1"]:focus { outline: none; }
/* Public header: desktop nav and login are shown from MudBlazor's md breakpoint (960px). */
@media (min-width: 960px) {
    .pub-appbar .pub-nav-links.d-md-flex { display: flex !important; }
    .pub-appbar .d-md-inline-flex { display: inline-flex !important; }
}

/* Banners */
.maintenance-banner { background: #FFF7E6; color: #92400E; border-bottom: 1px solid #FCD34D; padding: 10px 16px; text-align: center; font-weight: 600; }
.consent-banner { position: fixed; left: 16px; right: 16px; bottom: 84px; z-index: 1400; max-width: 720px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh-lg); padding: 14px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.consent-banner p { margin: 0; flex: 1 1 320px; color: var(--text); font-size: 14px; }
.consent-actions { display: flex; gap: 8px; }
.btn-outline-brand { background: transparent; border: 1.5px solid var(--brand); color: var(--brand); border-radius: var(--r-sm); padding: 7px 16px; font-weight: 700; cursor: pointer; }
.consent-actions .btn-brand { border: none; color: #fff; background: var(--brand); border-radius: var(--r-sm); padding: 8px 18px; font-weight: 700; cursor: pointer; }
.emergency-note { background: #FEF2F2; border-left: 4px solid #DC2626; color: #7F1D1D; padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; }
.sponsored-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text2); background: #F1F5F9; border-radius: 4px; padding: 2px 6px; }

/* Cards & layout helpers */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; box-shadow: var(--sh-sm); }
.panel + .panel { margin-top: 16px; }
.panel-title { font-weight: 800; font-size: 16px; margin: 0 0 12px; color: var(--text); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--text2); }
.kv dd { margin: 0; color: var(--text); }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--brand-light); color: var(--brand-dark); }
.status-pill.warn { background: #FFF7E6; color: #92400E; }
.status-pill.danger { background: #FEF2F2; color: #991B1B; }
.status-pill.muted { background: #F1F5F9; color: #475569; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--text2); }
.empty-state .material-icons { font-size: 42px; color: var(--text3); display: block; margin-bottom: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 12px 16px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.timeline time { color: var(--text2); font-size: 12px; display: block; }

/* OTP */
.otp-input input { letter-spacing: .5em; font-size: 22px; text-align: center; font-weight: 800; }
.otp-box { border: 1px dashed var(--brand); border-radius: var(--r); padding: 16px; background: var(--brand-light); }

/* Image cropper */
.crop-upload { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.crop-label { font-weight: 700; font-size: 14px; }
.crop-canvas { width: 100%; border-radius: var(--r-sm); border: 1px solid var(--border); cursor: grab; touch-action: none; background: #f1f5f9; }
.crop-canvas:active { cursor: grabbing; }
.crop-current { width: 160px; border-radius: var(--r-sm); object-fit: cover; border: 1px solid var(--border); }
.crop-controls { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* Prescription print view */
.rx-sheet { background: #fff; max-width: 820px; margin: 0 auto; padding: 28px 32px; border: 1px solid var(--border); border-radius: var(--r-sm); color: #111; font-size: 13.5px; }
.rx-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--brand); padding-bottom: 10px; gap: 16px; }
.rx-brand { color: var(--brand); font-weight: 800; font-size: 20px; }
.rx-doctor { text-align: right; font-size: 12.5px; line-height: 1.45; }
.rx-patient { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.rx-symbol { font-family: "Playfair Display", serif; font-size: 28px; color: var(--brand); margin: 10px 0 4px; }
.rx-table { width: 100%; border-collapse: collapse; }
.rx-table th { text-align: left; background: var(--brand-light); padding: 6px; font-size: 12px; }
.rx-table td { padding: 6px; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.rx-sign { margin-top: 48px; text-align: right; }
.rx-sign span { display: inline-block; border-top: 1px solid #111; padding-top: 4px; min-width: 200px; text-align: center; }
.rx-foot { margin-top: 18px; font-size: 11px; color: #64748B; border-top: 1px solid #e2e8f0; padding-top: 8px; }
.rx-draft { color: #B91C1C; font-weight: 800; text-transform: uppercase; }

@media print {
    body * { visibility: hidden; }
    .print-area, .print-area * { visibility: visible; }
    .print-area { position: absolute; left: 0; top: 0; width: 100%; }
    .no-print { display: none !important; }
    .rx-sheet { border: none; padding: 0; max-width: none; }
    @page { size: A4; margin: 14mm; }
}

/* Public content pages */
.content-page { max-width: 860px; margin: 0 auto; padding: 32px 16px 64px; line-height: 1.7; }
.content-page h1 { font-size: 30px; margin-bottom: 16px; }
.content-page h2 { font-size: 20px; margin-top: 24px; }
.breadcrumb { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--text3); }
.breadcrumb a { color: var(--brand); text-decoration: none; }

/* Charts */
.chart-card { min-height: 280px; }
.legend-abnormal { color: #B91C1C; font-weight: 700; }

@media (max-width: 600px) {
    .kv { grid-template-columns: 1fr; }
    .rx-head { flex-direction: column; }
    .rx-doctor { text-align: left; }
}

/* Trend charts (TrendChart.razor) */
.trend-chart { margin: 0; }
.trend-title { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
.trend-latest { font-weight: 700; color: var(--brand, #1A6B5A); }
.trend-latest.abn { color: #b3261e; }
.trend-svg { width: 100%; height: 110px; display: block; }
.trend-line { stroke: var(--brand, #1A6B5A); stroke-width: 2; vector-effect: non-scaling-stroke; }
.trend-band { fill: rgba(26, 107, 90, .08); }
.trend-dot { fill: var(--brand, #1A6B5A); }
.trend-dot.abn { fill: #b3261e; stroke: #fff; stroke-width: 1; }
.trend-axis { display: flex; justify-content: space-between; }
.simple-table { width: 100%; border-collapse: collapse; margin-top: .25rem; }
.simple-table th, .simple-table td { text-align: left; padding: .2rem .4rem; border-bottom: 1px solid rgba(0,0,0,.08); }
.vital-abn { color: #b3261e !important; font-weight: 700; }
.vital-abn::after { content: " ⚠"; }
@media (prefers-color-scheme: dark) { .trend-band { fill: rgba(120, 220, 210, .12); } }
.referral-code { font-size: 2rem; font-weight: 800; letter-spacing: .15em; font-family: ui-monospace, monospace; }
.finding-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sponsored-slot { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1rem 0; }
.sponsored-card { position: relative; display: flex; gap: .75rem; align-items: center; padding: .9rem; border: 1px solid rgba(0,0,0,.1); border-radius: 12px; text-decoration: none; color: inherit; background: var(--surface, #fff); }
.sponsored-card:hover, .sponsored-card:focus-visible { border-color: var(--brand); }
.sponsored-card img { border-radius: 8px; object-fit: cover; flex: none; }
.sponsored-text { display: flex; flex-direction: column; gap: .15rem; }
.sponsored-card .sponsored-label { position: absolute; top: 6px; right: 8px; }
.faq-item { border-bottom: 1px solid rgba(0,0,0,.08); padding: .8rem 0; }
.faq-item summary { font-weight: 700; cursor: pointer; }
.faq-item > div { margin-top: .5rem; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.area-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.area-card { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border: 1px solid rgba(0,0,0,.1); border-radius: 12px; text-decoration: none; color: inherit; }
.area-card:hover, .area-card:focus-visible { border-color: var(--brand); }
.setting-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(240px, 1.4fr); gap: 1rem; padding: .8rem 0; border-bottom: 1px solid rgba(0,0,0,.06); align-items: start; }
@media (max-width: 720px) { .setting-row { grid-template-columns: 1fr; gap: .4rem; } }
.stat-button { text-align: left; border: 3px solid transparent; cursor: pointer; font: inherit; color: #fff; }
.stat-button.active, .stat-button:focus-visible { border-color: var(--text); box-shadow: var(--sh-lg); outline: none; }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: start; }
.setting-row:last-child { border-bottom: none; }
.setting-input { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.setting-input > .mud-input-control { width: 100%; }
@media (max-width: 760px) { .setting-row { grid-template-columns: 1fr; } }
@media (min-width: 960px) { .booking-console { grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.2fr); align-items: start; } }

/* Health products */
a.product-card { text-decoration: none; color: inherit; display: block; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.product-grid .product-card { width: auto; min-width: 0; }
.product-detail { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; align-items: start; }
.product-detail-media { background: var(--brand-light); border-radius: var(--r); min-height: 260px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-detail-media img { width: 100%; height: auto; display: block; }
.pub-outline-btn { display: inline-flex; align-items: center; border: 1.5px solid var(--brand); color: var(--brand); border-radius: var(--r-sm); padding: 9px 18px; font-weight: 700; text-decoration: none; }
.pub-outline-btn:hover { background: var(--brand-light); }
@media (max-width: 700px) { .product-detail { grid-template-columns: 1fr; } }

/* UPI payment QR */
.upi-qr { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; }
.upi-qr img, .upi-qr-placeholder { width: 232px; height: 232px; image-rendering: pixelated; background: #fff; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; }
.upi-qr-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.upi-qr-amount { font-size: 26px; font-weight: 800; color: var(--brand-dark); }
.upi-open-app { align-self: flex-start; }
@media (min-width: 900px) { .upi-open-app { display: none; } } /* upi:// links only work on phones */
.sponsored-stack { grid-template-columns: 1fr; }
.sponsored-area { margin: -0.5rem 0 1rem; color: var(--text2); }
.sponsored-area button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

/* Map location picker */
.loc-picker { display: flex; flex-direction: column; gap: 8px; }
.loc-picker-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.loc-picker-bar button.link-brand { background: none; border: 0; padding: 0; cursor: pointer; }
.loc-picker-map { width: 100%; border: 1px solid var(--border); border-radius: var(--r-sm); z-index: 0; }
.loc-picker-coords { font-variant-numeric: tabular-nums; }
.area-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.area-chip { font-size: 12px; font-weight: 700; color: var(--brand-dark); background: var(--brand-light); border-radius: 999px; padding: 3px 10px; }

/* Admin: selected chips / select items clearly visible (filled brand colour instead of a faint tint) */
.mud-chip.mud-chip-selected, .mud-chip.mud-chip-selected.mud-chip-outlined {
    background-color: var(--brand) !important; color: #fff !important; border-color: var(--brand) !important; font-weight: 700;
}
.mud-chip.mud-chip-selected .mud-chip-icon, .mud-chip.mud-chip-selected .mud-icon-root { color: #fff !important; }
.mud-list-item.mud-selected-item, .mud-list-item.mud-selected-item:hover { background-color: var(--brand-light) !important; color: var(--brand-dark) !important; font-weight: 700; }
.mud-checkbox .mud-checked, .mud-list-item .mud-checked { color: var(--brand) !important; }
.link-plain { color: inherit; text-decoration: none; } .link-plain:hover { color: var(--brand); text-decoration: underline; }

/* Itemised bill */
.table-scroll { overflow-x: auto; }
.charges-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.charges-table th, .charges-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.charges-table th { font-size: 12px; color: var(--text2); font-weight: 700; }
.charges-table .num { text-align: right; white-space: nowrap; }
.charges-table tfoot td { border-bottom: none; }
.charges-table .charges-total td { font-weight: 800; font-size: 16px; border-top: 2px solid var(--text); }
.charge-minus td { color: #166534; }

/* Invoice */
.invoice { background: #fff; color: #111; max-width: 860px; margin: 0 auto; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 14px; }
.invoice h1 { font-size: 22px; margin: 0 0 6px; }
.invoice-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 12px; }
.invoice-meta { text-align: right; }
.invoice-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.invoice-parties .label { font-size: 11px; text-transform: uppercase; color: #555; font-weight: 700; }
.invoice-totals { margin-left: auto; margin-top: 10px; min-width: 280px; border-collapse: collapse; }
.invoice-totals td { padding: 4px 8px; }
.invoice-actions { max-width: 860px; margin: 0 auto 12px; }
@media print { .no-print { display: none !important; } .invoice { border: none; padding: 0; } }
@media (max-width: 640px) { .invoice-parties { grid-template-columns: 1fr; } .invoice-meta { text-align: left; } }

/* ── Universal search ─────────────────────────────── */
.site-search { position: relative; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #d5dde5; border-radius: 12px; padding: 0 12px; min-height: 48px; width: 100%; }
.site-search:focus-within { border-color: var(--brand, #0F766E); box-shadow: 0 0 0 3px rgba(15,118,110,.15); }
.site-search-icon { color: #64748b; }
.site-search-input { flex: 1; border: 0; outline: 0; font-size: 16px; background: transparent; min-width: 0; padding: 10px 0; color: inherit; }
.site-search-spinner { width: 16px; height: 16px; border: 2px solid #cbd5e1; border-top-color: var(--brand, #0F766E); border-radius: 50%; animation: ss-spin .7s linear infinite; }
@keyframes ss-spin { to { transform: rotate(360deg); } }
.site-search-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1300; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.14); max-height: 420px; overflow-y: auto; text-align: left; }
.site-search-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.site-search-item:hover, .site-search-item.active { background: #f1f5f9; }
.site-search-item-icon { color: var(--brand, #0F766E); font-size: 20px; }
.site-search-item-text { display: flex; flex-direction: column; min-width: 0; }
.site-search-item-title { font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-search-item-sub { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-search-all { padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--brand, #0F766E); cursor: pointer; border-top: 1px solid #f1f5f9; margin-top: 4px; }
.site-search-empty { padding: 10px; font-size: 13px; color: #475569; }
.hero-search .site-search { border: 0; box-shadow: none; background: transparent; padding: 0; min-height: 0; flex: 1 1 auto; width: auto; min-width: 0; }
.hero-search { position: relative; }
.hero-search .site-search { position: static; }
.hero-search .site-search-list { left: 0; right: 0; }
.hero-search .site-search:focus-within { box-shadow: none; }

/* ── Ratings & reviews ─────────────────────────────── */
.star-row { position: relative; display: inline-block; vertical-align: middle; line-height: 1; letter-spacing: 1px; white-space: nowrap; }
.star-row .star-bg { color: #d9dce1; }
.star-row .star-fg { position: absolute; left: 0; top: 0; overflow: hidden; color: #F4793B; }
.review-summary { display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(180px, 1fr); gap: 24px; align-items: center; padding: 16px; border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; background: var(--surface, #fff); }
.review-summary-score { text-align: center; min-width: 110px; }
.review-summary-avg { font-size: 40px; font-weight: 700; line-height: 1.1; }
.review-bars { display: flex; flex-direction: column; gap: 4px; }
.review-bar-row { display: grid; grid-template-columns: 28px 1fr 32px; gap: 8px; align-items: center; }
.review-bar { height: 8px; border-radius: 4px; background: #eef0f3; overflow: hidden; }
.review-bar > span { display: block; height: 100%; background: #F4793B; border-radius: 4px; }
.review-aspect-summary { display: flex; flex-direction: column; gap: 6px; }
.review-reply { margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--primary, #0d9488); background: rgba(13, 148, 136, .06); border-radius: 0 8px 8px 0; }
.review-aspects { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
@media (max-width: 720px) {
    .review-summary { grid-template-columns: 1fr; gap: 14px; }
}

/* ── Booking chat ─────────────────────────────── */
.booking-chat { margin-top: 12px; border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; padding: 12px; background: var(--surface, #fff); }
.booking-chat-head { display: flex; align-items: center; gap: 6px; color: var(--primary, #0d9488); }
.booking-chat-notice { font-size: 12px; color: #9a3412; background: #fff7ed; border-radius: 6px; padding: 4px 8px; margin: 6px 0; }
.booking-chat-list { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.chat-msg { max-width: 82%; padding: 8px 10px; border-radius: 12px; background: #f1f5f9; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; background: rgba(13, 148, 136, .12); }
.chat-msg.support { background: #eef2ff; }
.chat-from { font-size: 11px; font-weight: 700; color: var(--text-muted, #6b7280); margin-bottom: 2px; }
.chat-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.chat-body.withdrawn { font-style: italic; color: var(--text-muted, #6b7280); }
.chat-meta { font-size: 11px; color: var(--text-muted, #6b7280); margin-top: 2px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.booking-chat-compose { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.booking-chat-compose textarea { flex: 1 1 auto; resize: vertical; min-height: 44px; }
.chat-badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; margin-left: 4px; }

/* ── Clinical safety / care assessment ───────────────── */
.care-safety { border: 1px solid #fed7aa; background: #fff7ed; border-radius: 10px; padding: 10px 12px; margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.care-safety-row { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: #7c2d12; }
.care-safety-row .material-icons { font-size: 18px; color: #c2410c; margin-top: 1px; }
.care-request { border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; padding: 16px; margin: 12px 0; background: var(--surface, #fff); scroll-margin-top: 90px; }

/* ── Corporate enquiry ───────────────── */
.corp-interests { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 12px; }

/* ── Help assistant ─────────────────────────────── */
.assistant-fab { position: fixed; right: 20px; bottom: 158px; z-index: 1200; display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 16px 0 12px; border: 0; border-radius: 23px; background: #1e293b; color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.18); cursor: pointer; }
.assistant-fab .material-icons { font-size: 22px; }
.assistant-panel { position: fixed; right: 20px; bottom: 20px; z-index: 1300; width: 380px; max-width: calc(100vw - 32px); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--surface, #fff); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.22); overflow: hidden; }
.assistant-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--brand, #1A6B5A); color: #fff; }
.assistant-close { margin-left: auto; background: none; border: 0; color: #fff; cursor: pointer; display: flex; }
.assistant-note { font-size: 12px; color: #7c2d12; background: #fff7ed; padding: 6px 12px; }
.assistant-list { flex: 1 1 auto; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.assistant-msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; background: #f1f5f9; align-self: flex-start; word-break: break-word; }
.assistant-msg.me { align-self: flex-end; background: rgba(26, 107, 90, .12); }
.assistant-msg.safety { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }
.assistant-msg.typing { color: var(--text-muted, #6b7280); letter-spacing: 2px; }
.assistant-links, .assistant-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.assistant-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 16px; border: 1px solid var(--border-color, #e5e7eb); background: #fff; color: var(--brand, #1A6B5A); font-size: 13px; text-decoration: none; cursor: pointer; }
.assistant-chip .material-icons { font-size: 16px; }
.assistant-chip.danger { color: #b91c1c; border-color: #fecaca; }
.assistant-compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border-color, #e5e7eb); }
.assistant-compose textarea { flex: 1 1 auto; resize: none; border: 1px solid var(--border-color, #d1d5db); border-radius: 10px; padding: 8px 10px; font: inherit; min-height: 40px; max-height: 120px; }
.assistant-send { width: 40px; border: 0; border-radius: 10px; background: var(--brand, #1A6B5A); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.assistant-send:disabled { opacity: .45; cursor: default; }
@media (max-width: 768px) {
    .assistant-fab { bottom: 80px; right: 16px; height: 42px; }
    .assistant-fab-label { display: none; }
    .assistant-panel { right: 0; left: 0; bottom: 0; width: 100%; max-width: 100%; height: calc(100vh - 56px); border-radius: 16px 16px 0 0; }
}

/* ── Care plan & daily care log ── */
.care-log { margin-top: 12px; border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; padding: 12px; background: var(--surface, #fff); }
.care-log-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--primary, #0d9488); }
.care-plan, .care-entry { border-bottom: 1px dashed var(--border-color, #e5e7eb); padding-bottom: 10px; margin-bottom: 10px; }
.care-tasks { margin: 6px 0 6px 18px; padding: 0; font-size: .875rem; }
.care-tasks li { margin: 2px 0; }
.care-precautions { background: #fff8e6; border-radius: 8px; padding: 6px 8px; margin: 6px 0; }
.care-entries { list-style: none; margin: 0; padding: 0; }
.care-item { border-left: 4px solid #2e7d32; padding: 6px 10px; margin: 8px 0; background: #f7faf8; border-radius: 0 8px 8px 0; }
.care-item.cond-1 { border-left-color: #ed8b00; background: #fff8ee; }
.care-item.cond-2 { border-left-color: #c62828; background: #fff3f3; }
.care-item-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.care-cond { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; }
.care-item.cond-0 .care-cond { color: #2e7d32; }
.care-item.cond-1 .care-cond { color: #a85d00; }
.care-item.cond-2 .care-cond { color: #b71c1c; }
.care-obs { white-space: pre-line; overflow-wrap: anywhere; }
.care-ack { margin-top: 4px; color: #33573f; }
.care-ack.pending { color: #8a5a00; }
