:root {
    --care-primary: #6b46c1;
    --care-primary-dark: #553c9a;
    --care-primary-light: #ede9fe;
    --care-risk-low: #10b981;
    --care-risk-medium: #f59e0b;
    --care-risk-high: #ef4444;
    --care-risk-critical: #991b1b;
    --care-handover: #3b82f6;
    --care-bg: #f8f7fc;
    --care-card-shadow: 0 2px 12px rgba(107, 70, 193, 0.08);
    --care-bottom-nav-height: 96px;
}

body.care-app {
    background-color: var(--care-bg);
    padding-bottom: calc(var(--care-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 16px);
    font-family: 'Nunito', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.55;
    min-height: 100vh;
    min-height: 100dvh;
}

.care-container {
    max-width: 480px;
    margin: 0 auto;
    padding: max(32px, calc(20px + env(safe-area-inset-top, 0px))) 16px 24px;
}

.care-page-head {
    margin-bottom: 24px;
    padding-top: 4px;
}

.care-section {
    margin-top: 28px;
    clear: both;
    display: flow-root;
}

.care-section:first-of-type {
    margin-top: 0;
}

.care-primary-action {
    display: flow-root;
    margin: 24px 0 32px;
    clear: both;
}

.care-header {
    padding: 0 0 8px;
}

.care-page-head .care-header {
    padding: 0;
}

.care-greeting {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}

.care-location {
    color: #6b7280;
    font-size: 1.05rem;
}

/* Slightly larger body copy and inputs across the care PWA */
.care-container .form-control,
.care-container .form-select,
.care-container textarea.form-control {
    font-size: 1.0625rem;
    padding: 0.625rem 0.75rem;
}

.care-container .form-control-sm {
    font-size: 1rem;
    padding: 0.5rem 0.65rem;
}

.care-container .form-label {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.care-container .small,
.care-container small {
    font-size: 0.9375rem;
}

.care-container .badge {
    font-size: 0.875rem;
    padding: 0.35em 0.65em;
}

.care-container p,
.care-container li {
    font-size: inherit;
}

.care-btn-record {
    display: block;
    box-sizing: border-box;
    background: var(--care-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 14px 20px;
    border-radius: 12px;
    width: 100%;
    margin: 0;
    box-shadow: var(--care-card-shadow);
    text-align: center;
    text-decoration: none;
    line-height: 1.3;
}

.care-primary-action .care-btn-record {
    margin: 0;
}

.care-btn-record:hover,
.care-btn-record:focus {
    background: var(--care-primary-dark);
    color: #fff;
}

.care-btn-handover {
    display: block;
    box-sizing: border-box;
    background: var(--care-handover);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: 10px;
    width: 100%;
    margin: 0;
    text-align: center;
    text-decoration: none;
    line-height: 1.3;
}

.care-btn-handover:hover,
.care-btn-handover:focus {
    background: #2563eb;
    color: #fff;
}

.care-card .care-btn-record,
.care-card .care-btn-handover {
    margin-top: 12px;
    margin-bottom: 0;
}

.care-card-actions {
    margin-top: 12px;
    padding-top: 0;
}

.care-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.care-stat-card {
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    color: #fff;
    font-weight: 600;
    box-shadow: var(--care-card-shadow);
}

.care-stat-card .count {
    font-size: 1.75rem;
    line-height: 1.2;
    display: block;
}

.care-stat-card .label {
    font-size: 0.75rem;
    opacity: 0.95;
}

.care-stat-due { background: linear-gradient(135deg, #ef4444, #dc2626); }
.care-stat-later { background: linear-gradient(135deg, #10b981, #059669); }
.care-stat-handover { background: linear-gradient(135deg, #3b82f6, #2563eb); }

.care-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--care-card-shadow);
    border: none;
    overflow: hidden;
}

.care-formal-record-list .care-formal-record {
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.care-formal-record-list .care-formal-record:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.care-formal-record__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.care-formal-record__title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.care-formal-record__icon {
    font-size: 1.25rem;
    color: var(--care-primary, #6b46c1);
    flex-shrink: 0;
}

.care-formal-record__name {
    font-size: 1.0625rem;
}

.care-formal-record-skip {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
}

.care-formal-record-skip__hint {
    margin-bottom: 8px !important;
}

.care-formal-record-skip__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.care-formal-record-skip__input {
    font-size: 1rem;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #d1d5db;
}

.care-formal-record-skip__input::placeholder {
    color: #9ca3af;
}

.care-formal-record-skip__btn {
    width: 100%;
    font-weight: 600;
    border-width: 2px;
}

.care-alert-card {
    border-left: 4px solid var(--care-handover);
}

.care-alert-card__meta {
    margin-bottom: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.care-stat-grid--two {
    grid-template-columns: repeat(2, 1fr);
}

.care-event-tab-panel {
    min-height: 120px;
    margin-bottom: 8px;
}

.care-event-tabs {
    gap: 4px;
}

.care-narrative-text {
    white-space: pre-wrap;
    word-break: break-word;
    color: #1f2937;
    line-height: 1.55;
}

.care-event-tab-hint {
    line-height: 1.4;
}

.care-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 16px;
    padding-top: 4px;
    color: #374151;
    clear: both;
}

.care-today-stats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.care-today-stat {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: var(--care-primary-light);
    border-radius: 10px;
}

.care-today-stat .num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--care-primary);
}

.care-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--care-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    z-index: 1000;
    max-width: 100%;
    overflow: visible;
}

.care-bottom-nav > a:not(.care-nav-record) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #9ca3af;
    font-size: 0.7rem;
    padding: 8px 4px 10px;
    min-width: 0;
    flex: 1;
}

.care-bottom-nav > a:not(.care-nav-record) i {
    font-size: 1.35rem;
    margin-bottom: 2px;
}

.care-bottom-nav > a:not(.care-nav-record).active,
.care-bottom-nav > a:not(.care-nav-record):hover {
    color: var(--care-primary);
}

.care-nav-record {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    color: var(--care-primary);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 88px;
    flex: 1;
    padding: 0 4px 6px;
    position: relative;
    top: -26px;
    z-index: 2;
    overflow: visible;
}

.care-nav-record__btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--care-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(107, 70, 193, 0.38);
    border: 5px solid #fff;
}

.care-nav-record__btn i {
    font-size: 2.1rem;
    margin: 0;
    line-height: 1;
}

.care-nav-record__caption {
    margin-top: 4px;
}

.care-nav-record.active .care-nav-record__btn,
.care-nav-record:hover .care-nav-record__btn {
    background: var(--care-primary-dark);
    color: #fff;
}

.care-nav-record.is-connecting .care-nav-record__btn,
.care-nav-record.is-connecting:hover .care-nav-record__btn,
.care-nav-record.is-connecting.active .care-nav-record__btn {
    background: var(--care-primary-dark);
}

.care-nav-record.is-connecting .care-nav-record__btn i {
    display: none;
}

.care-nav-record.is-connecting .care-nav-record__btn::after {
    content: '';
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: care-spin 0.7s linear infinite;
}

@keyframes care-spin {
    to { transform: rotate(360deg); }
}

.care-nav-record.is-listening,
.care-nav-record.is-listening:hover {
    color: #dc2626;
}

.care-nav-record.is-listening .care-nav-record__btn,
.care-nav-record.is-listening:hover .care-nav-record__btn,
.care-nav-record.is-listening.active .care-nav-record__btn {
    background: #dc2626;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.36);
}

.care-nav-record.is-listening .care-nav-record__btn i {
    opacity: 0;
}

.care-nav-wave {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
    height: 88px;
    width: 100%;
    pointer-events: none;
    z-index: 1;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.care-bottom-nav.is-listening .care-nav-wave {
    display: block;
}

.care-nav-record--disabled {
    opacity: 0.45;
    pointer-events: none;
}

.care-bottom-nav-spacer {
    flex: 1;
    min-width: 0;
}

.care-risk-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.care-risk-low { background: #d1fae5; color: #065f46; }
.care-risk-medium { background: #fef3c7; color: #92400e; }
.care-risk-high { background: #fee2e2; color: #991b1b; }
.care-risk-critical { background: #7f1d1d; color: #fff; }

.care-wizard-progress {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-bottom: 8px;
    overflow: hidden;
}

.care-wizard-progress .bar {
    height: 100%;
    background: var(--care-primary);
    transition: width 0.3s ease;
}

.care-clarify-speech .care-mic-btn {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
    margin: 12px auto 8px;
}

.care-mic-wrap {
    position: relative;
    width: 168px;
    height: 168px;
    margin: 8px auto 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.care-mic-ring {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px solid var(--care-primary);
    opacity: 0;
    pointer-events: none;
}

.care-mic-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--care-primary-light);
    border: 3px solid var(--care-primary);
    color: var(--care-primary);
    font-size: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    position: relative;
    z-index: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.care-mic-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.care-mic-btn.is-listening {
    animation: care-mic-pulse 1.2s ease-in-out infinite;
    background: #dc2626;
    border-color: #b91c1c;
    color: #fff;
}

.care-mic-wrap.is-listening .care-mic-ring {
    animation: care-mic-ring 1.6s ease-out infinite;
}

.care-mic-wrap.is-listening .care-mic-ring:nth-child(2) {
    animation-delay: 0.45s;
}

.care-speak-hint {
    text-align: center;
    font-weight: 700;
    color: var(--care-primary);
    margin-bottom: 0.5rem;
}

.care-listen {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--care-bottom-nav-height) - env(safe-area-inset-bottom, 0px) - 72px);
}

.care-record-overlay[hidden],
[data-care-page][hidden] {
    display: none !important;
}

.care-listen-label {
    margin: 0 0 16px;
    text-align: center;
    font-weight: 700;
    color: #6b7280;
    min-height: 1.5em;
}

.care-listen-label.is-connecting::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid rgba(107, 70, 193, 0.22);
    border-top-color: var(--care-primary);
    border-radius: 50%;
    animation: care-spin 0.7s linear infinite;
    vertical-align: -3px;
}

.care-listen.is-listening .care-listen-label {
    color: var(--care-primary);
}

.care-listen-box {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 220px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.care-listen.is-listening .care-listen-box {
    border-color: #c4b5fd;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.12);
}

.care-listen-field {
    flex: 1 1 auto;
    min-height: 180px;
    font-size: 1.2rem;
    line-height: 1.55;
    border: 0;
    border-radius: 0;
    padding: 16px 16px 8px;
    resize: none;
    box-shadow: none;
}

.care-listen-field:focus {
    box-shadow: none;
}

.care-listen-toolbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 6px 8px 10px;
    border-top: 1px solid #edf0f4;
}

.care-listen-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    border: 0;
    background: transparent;
    color: var(--care-primary);
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1.1;
    padding: 6px 4px;
}

.care-listen-tool i {
    font-size: 1.45rem;
    line-height: 1;
}

.care-listen-tool:disabled {
    color: #9ca3af;
}

.care-listen-tool.is-busy i {
    animation: care-spin 0.8s linear infinite;
}

.care-listen-tool--next:not(:disabled) {
    color: var(--care-primary-dark);
}

.care-listen.is-listening .care-listen-field {
    border-color: transparent;
    box-shadow: none;
}

.care-listen-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.care-listen-clear {
    display: block;
    width: 100%;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #4b5563;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 14px 20px;
    text-align: center;
}

.care-listen-clear:hover,
.care-listen-clear:focus {
    border-color: var(--care-primary);
    color: var(--care-primary);
}

.care-listen-stop,
.care-listen-start {
    display: block;
    width: 100%;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 16px 20px;
    text-align: center;
}

.care-listen-stop {
    background: #dc2626;
    color: #fff;
}

.care-listen-stop:disabled {
    opacity: 0.45;
}

.care-listen-start {
    background: var(--care-primary);
    color: #fff;
}

.care-listen-again {
    display: block;
    width: 100%;
    margin-top: 10px;
    border: none;
    background: transparent;
    color: var(--care-primary);
    font-weight: 700;
    padding: 10px 8px;
}

@keyframes care-listen-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.28); opacity: 0.7; }
}

.care-details-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 600;
    color: #374151;
}

.care-details-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.care-process-card {
    text-align: center;
    padding: 48px 16px 24px;
}

.care-people-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.care-people-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    margin: 0;
}

.care-people-row input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.care-people-row:has(input:checked) {
    border-color: var(--care-primary);
    background: var(--care-primary-light);
}

.care-people-row--yp {
    border-left: 4px solid var(--care-primary);
}

.care-people-row--coach {
    border-left: 4px solid #0d9488;
}

.care-people-row--coach:has(input:checked) {
    border-color: #0d9488;
    background: #f0fdfa;
}

.care-people-row.is-primary {
    opacity: 0.45;
}

.care-people-name {
    flex: 1 1 auto;
}

.care-people-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.care-people-tag {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 999px;
    padding: 3px 8px;
    white-space: nowrap;
}

.care-people-tag--yp {
    background: var(--care-primary-light);
    color: var(--care-primary-dark);
}

.care-people-tag--coach {
    background: #ccfbf1;
    color: #0f766e;
}

.care-review-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.care-btn-secondary {
    display: block;
    box-sizing: border-box;
    width: 100%;
    background: #fff;
    border: 2px solid var(--care-primary);
    color: var(--care-primary);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 12px 20px;
    border-radius: 12px;
    text-align: center;
}

.care-btn-secondary:hover,
.care-btn-secondary:focus {
    background: var(--care-primary-light);
    color: var(--care-primary-dark);
}

.care-review-tools {
    grid-template-columns: 1fr 1fr;
    border-top: 0;
    padding: 4px 0 0;
}

.care-review-tools form {
    margin: 0;
}

.care-review-tools .care-listen-tool {
    width: 100%;
}

.care-note-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--care-card-shadow);
    overflow: hidden;
}

.care-note-tabs {
    display: flex;
    background: #f3f0fa;
}

.care-note-tab {
    flex: 1 1 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 12px 10px;
}

.care-note-tab.is-active {
    background: #fff;
    color: var(--care-primary);
}

.care-note-panel {
    padding: 16px;
}

.care-task-modal {
    border-radius: 16px;
    border: 0;
}

.care-task-modal .modal-header,
.care-task-modal .modal-footer {
    border-color: #edf0f4;
}

.care-suggested-tasks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.care-suggested-task {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 10px 12px 14px;
}

.care-suggested-task__body {
    flex: 1 1 auto;
    min-width: 0;
}

.care-suggested-task__actions {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

.care-suggest-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    line-height: 1;
}

.care-suggest-btn--yes {
    background: #dcfce7;
    color: #15803d;
}

.care-suggest-btn--no {
    background: #fee2e2;
    color: #b91c1c;
}

.care-request-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 247, 252, 0.72);
}

.care-request-overlay[hidden] {
    display: none !important;
}

.care-request-overlay__card {
    text-align: center;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--care-card-shadow);
    padding: 28px 32px;
    min-width: 180px;
}

.timeline-chip-remove {
    border: 0;
    cursor: pointer;
}

.timeline-chip-remove i {
    font-size: 0.9rem;
}

.care-daily-log-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.care-daily-log-nav input[type="date"] {
    flex: 1;
}

.care-daily-log-group {
    margin-bottom: 1.25rem;
}

.care-daily-log-group__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

@keyframes care-mic-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

@keyframes care-mic-ring {
    0% { transform: scale(0.85); opacity: 0.45; }
    100% { transform: scale(1.35); opacity: 0; }
}

.care-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.care-type-tile {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: #374151;
    transition: border-color 0.2s, background 0.2s;
}

.care-type-tile:hover,
.care-type-tile.selected {
    border-color: var(--care-primary);
    background: var(--care-primary-light);
    color: var(--care-primary);
}

.care-type-tile i {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.care-yesno-group .btn {
    flex: 1;
    padding: 12px;
}

.care-task-card {
    border-left: 4px solid var(--care-primary);
}

.care-task-card.priority-high { border-left-color: var(--care-risk-high); }
.care-task-card.priority-medium { border-left-color: var(--care-risk-medium); }

.care-outcome-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: var(--care-card-shadow);
}

.care-outcome-card i {
    font-size: 1.5rem;
    color: var(--care-primary);
}

.care-rec-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--care-card-shadow);
    border-left: 4px solid #e5e7eb;
}

.care-rec-card--pending {
    border-left-color: var(--care-primary);
}

.care-rec-card--accepted,
.care-rec-card--auto_applied {
    border-left-color: var(--care-risk-low);
    opacity: 0.92;
}

.care-rec-card--declined {
    border-left-color: #9ca3af;
    background: #fafafa;
}

.care-rec-card__header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.care-rec-card__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--care-primary-light);
    color: var(--care-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.care-rec-card--declined .care-rec-card__icon {
    background: #f3f4f6;
    color: #6b7280;
}

.care-rec-card__type {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--care-primary);
    margin-bottom: 2px;
}

.care-rec-card--declined .care-rec-card__type {
    color: #6b7280;
}

.care-rec-card__label {
    display: block;
    font-size: 1rem;
    line-height: 1.3;
    color: #1f2937;
}

.care-rec-card__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.care-rec-card__status--accepted {
    color: #059669;
}

.care-rec-card__status--declined {
    color: #6b7280;
}

.care-rec-bypass-form textarea {
    font-size: 0.9rem;
}

@media (min-width: 481px) {
    .care-bottom-nav {
        left: 50%;
        transform: translateX(-50%);
        max-width: 480px;
        border-radius: 16px 16px 0 0;
    }
}

body.care-auth {
    padding-bottom: 24px;
}

.care-auth-container {
    display: flex;
    align-items: center;
    min-height: calc(100dvh - 48px);
}

.care-auth-card {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: var(--care-card-shadow);
}

.care-auth-logo {
    height: 72px;
    width: auto;
    max-width: 100%;
}

.care-btn-primary {
    background: var(--care-primary);
    border-color: var(--care-primary-dark);
    font-weight: 600;
}

.care-btn-primary:hover,
.care-btn-primary:focus {
    background: var(--care-primary-dark);
    border-color: var(--care-primary-dark);
}

.care-pathway-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.care-pathway--positive {
    background: #d1fae5;
    color: #065f46;
}

.care-pathway--negative {
    background: #fee2e2;
    color: #991b1b;
}

.care-pathway--mixed {
    background: #fef3c7;
    color: #92400e;
}

.care-pathway--neutral {
    background: #e5e7eb;
    color: #374151;
}

.care-flow-preview__item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.care-flow-preview__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.care-flow-preview__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--care-primary-light);
    color: var(--care-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.care-ai-summary {
    border-left: 4px solid var(--care-primary);
}

.care-analyse-loading {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.care-body-text {
    font-size: 1.0625rem;
    line-height: 1.55;
}

.care-intro-text {
    font-size: 1.05rem;
    line-height: 1.5;
}

.care-clarify-question {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
}

.care-radio-label {
    font-size: 1.0625rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.care-radio-label input {
    width: 1.125rem;
    height: 1.125rem;
}

/* Handover report */
.care-handover-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.care-handover-stats--compact .care-handover-stat {
    padding: 8px 4px;
}

.care-handover-stat {
    background: #fff;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: var(--care-card-shadow);
}

.care-handover-stat__num {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.care-handover-stat__label {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 2px;
}

.care-handover-stat--warning .care-handover-stat__num { color: var(--care-risk-medium); }
.care-handover-stat--success .care-handover-stat__num { color: var(--care-risk-low); }

.care-handover-resident__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--care-primary-light);
}

.care-handover-section__title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.care-handover-item,
.care-handover-read-item {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: var(--care-card-shadow);
    border-left: 4px solid #e5e7eb;
}

.handover-tone--positive,
.care-handover-section__title.handover-tone--success {
    border-left-color: var(--care-risk-low);
    color: #047857;
}

.handover-tone--warning,
.care-handover-section__title.handover-tone--warning {
    border-left-color: var(--care-risk-medium);
    color: #b45309;
}

.handover-tone--negative {
    border-left-color: var(--care-risk-high);
}

.handover-tone--primary,
.care-handover-section__title.handover-tone--primary {
    border-left-color: var(--care-handover);
    color: #1d4ed8;
}

.handover-tone--info,
.care-handover-section__title.handover-tone--info {
    border-left-color: #6366f1;
    color: #4338ca;
}

.care-handover-summary {
    border-left: 4px solid var(--care-handover);
}

.care-handover-item__meta {
    line-height: 1.4;
}

.timeline-chip {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    margin: 0 0.15rem 0.15rem 0;
}

.timeline-chip-sm {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
}

.timeline-chip-pending {
    background: #f3f4f6;
    color: #6b7280;
}

.timeline-label-editor {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-chip-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 999px;
    border: 2px solid #c7d2fe;
    background: #fff;
    color: #4338ca;
    cursor: pointer;
    user-select: none;
    margin: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.timeline-chip-toggle.is-selected {
    background: #e0e7ff;
    border-color: #6366f1;
    color: #312e81;
    box-shadow: inset 0 0 0 1px #6366f1;
}

.timeline-chip-toggle:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}
