/* Chat workspace (patient ⇄ doctor) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cx {
    display: grid; grid-template-columns: 330px 1fr; background: #fff; border-radius: 12px; overflow: hidden;
    height: min(740px, calc(100dvh - 150px)); min-height: 520px;
    box-shadow: 0 0 0 1px rgba(15, 107, 138, .09), 0 24px 48px -28px rgba(18, 52, 70, .3);
}

/* conversation list */
.cx-list { border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; background: #fbfdfe; }
.cx-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 12px; position: sticky; top: 0; background: #fbfdfe; z-index: 1; }
.cx-tabs a { text-align: center; padding: 8px 6px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: .9rem; transition: background .25s var(--spring), color .25s; }
.cx-tabs a:hover { background: var(--tint); }
.cx-tabs a.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.cx-item { display: flex; gap: 12px; padding: 12px 14px; color: var(--ink); border-top: 1px solid var(--tint); transition: background .2s; }
.cx-item:hover { background: var(--tint); color: var(--ink); }
.cx-item.is-active { background: var(--accent-soft); }
.cx-item .avatar { flex: none; width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.cx-item__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cx-item__top, .cx-item__bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.cx-item__top small { color: var(--ink-3); font-size: .75rem; flex: none; }
.cx-preview { color: var(--ink-2); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-item .badge { justify-self: start; }
.cx-empty { padding: 28px 18px; display: grid; gap: 12px; justify-items: start; color: var(--ink-2); }

/* main column */
.cx-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cx-placeholder { margin: auto; text-align: center; padding: 24px; display: grid; gap: 6px; }
.cx-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cx-head .avatar { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.cx-head__who { display: grid; line-height: 1.5; margin-inline-end: auto; min-width: 0; }
.cx-head form { margin: 0; }
.cx-back { display: none; font-size: 1.3rem; padding: 4px 8px; color: var(--ink-2); }

.cx-tools { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; padding: 12px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.cx-tools > p { margin: 0; flex: 1 1 260px; font-size: .9rem; }
.cx-tools form { margin: 0; }
.cx-tools--pay { background: var(--warn-soft); }
.cx-paybox { position: relative; }
.cx-paybox summary { list-style: none; cursor: pointer; }
.cx-paybox summary::-webkit-details-marker { display: none; }
.cx-pay { position: absolute; z-index: 5; inset-inline-start: 0; top: calc(100% + 8px); width: min(340px, 86vw); display: grid; gap: 10px; padding: 18px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 24px 40px -18px rgba(18, 52, 70, .4); }
.cx-pay__row { display: flex; justify-content: space-between; align-items: baseline; }
.cx-pay__row output { font-size: 1.3rem; font-weight: 800; color: var(--accent-ink); }
.cx-range { width: 100%; accent-color: var(--accent); height: 28px; cursor: pointer; }
.cx-ticks { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-3); font-size: .78rem; }
.cx-ticks small { font-size: .72rem; }

/* thread */
.cx-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; background: #f6fafc; overscroll-behavior: contain; }
.cx-day { align-self: center; margin: 10px 0 4px; }
.cx-day span { background: #fff; color: var(--ink-3); font-size: .76rem; padding: 2px 14px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.cx-system { align-self: center; text-align: center; max-width: 80%; background: var(--warn-soft); color: var(--warn); padding: 6px 16px; border-radius: 12px; font-size: .85rem; display: grid; gap: 0; }
.cx-system small { opacity: .7; font-size: .7rem; }
.cx-msg { align-self: flex-end; max-width: min(74%, 520px); background: #fff; padding: 8px 12px 6px; border-radius: 12px; box-shadow: 0 1px 2px rgba(18, 52, 70, .08); display: grid; gap: 4px; }
.cx-msg--me { align-self: flex-start; background: var(--accent); color: #fff; border-radius: 12px; }
.cx-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .7rem; opacity: .72; justify-content: flex-end; }
.cx-read--yes { opacity: 1; color: #bff0d9; }
.cx-img { display: block; border-radius: 12px; overflow: hidden; }
.cx-img img { display: block; width: 100%; max-width: 280px; max-height: 300px; object-fit: cover; }
.cx-voice { display: flex; align-items: center; gap: 8px; }
.cx-voice audio { height: 38px; max-width: 230px; }
.cx-voice small { opacity: .75; }

/* composer */
.cx-composer { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; background: #fff; }
.cx-row { display: flex; gap: 8px; align-items: flex-end; }
.cx-input { resize: none; max-height: 130px; min-height: 44px; border-radius: 12px; padding: 10px 14px; line-height: 1.7; }
.cx-tool { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--tint); display: grid; place-items: center; cursor: pointer; transition: background .25s, transform .3s var(--spring); }
.cx-tool:hover { background: var(--accent-soft); }
.cx-tool:active { transform: scale(.94); }
.cx-tool svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cx-attach { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--tint); padding: 6px 14px; border-radius: 12px; font-size: .88rem; }
.cx-attach button { border: 0; background: transparent; cursor: pointer; font-size: 1rem; color: var(--ink-2); }
.cx-rec { display: flex; align-items: center; gap: 12px; padding: 6px 4px; }
.cx-rec[hidden], .cx-row[hidden], .cx-attach[hidden], .cx-error[hidden] { display: none; }
.cx-rec__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bad); animation: cx-pulse 1.1s ease-in-out infinite; }
.cx-rec .btn:first-of-type { margin-inline-start: auto; }
@keyframes cx-pulse { 50% { opacity: .25; transform: scale(.8); } }
.cx-error { margin: 0; color: var(--bad); background: var(--bad-soft); padding: 6px 12px; border-radius: 12px; font-size: .86rem; }
.cx-hint { margin: 0; padding: 6px 16px 0; color: var(--ink-3); font-size: .82rem; background: #fff; border-top: 1px solid var(--line); }
.cx-locked { margin: 0; padding: 14px 18px; text-align: center; background: var(--tint); color: var(--ink-2); border-top: 1px solid var(--line); }

@media (max-width: 900px) {
    .cx { grid-template-columns: 1fr; height: calc(100dvh - 190px); border-radius: 12px; }
    .cx--open .cx-list { display: none; }
    .cx:not(.cx--open) .cx-main { display: none; }
    .cx-back { display: block; }
    .cx-msg { max-width: 88%; }
    .cx-pay { inset-inline-start: auto; inset-inline-end: 0; }
}
@media (prefers-reduced-motion: reduce) { .cx-rec__dot { animation: none; } }
.cx-spec { color: var(--accent-ink); font-size: .8rem; font-weight: 500; }

/* ---- Messenger look (matches the client's reference) ---- */
.theme-sky .cx { grid-template-columns: 300px 1fr; background: var(--sky-bg); box-shadow: none; gap: 14px; border-radius: 0; overflow: visible; height: min(780px, calc(100dvh - 150px)); }
.theme-sky .cx--open { grid-template-columns: 290px minmax(0, 1fr) 330px; }
.theme-sky .cx-list, .theme-sky .cx-main { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--sky-line), 0 18px 36px -26px rgba(10, 80, 130, .3); border: 0; overflow: hidden; }
.theme-sky .cx-list { overflow-y: auto; }
.theme-sky .cx-tabs, .theme-sky .cx-list { background: #fff; }
.theme-sky .cx-item.is-active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.theme-sky .cx-head { padding: 14px 18px; }
.theme-sky .cx-head__who b { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.theme-sky .cx-head__who a { color: var(--accent); font-weight: 600; }
.cx-role { font-size: .72rem; font-weight: 600; padding: 1px 10px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.cx-role--p { background: #eef2f6; color: var(--ink-2); }
.theme-sky .cx-thread { background: #fff; padding: 20px 22px; gap: 16px; }

.cx-row-msg { display: flex; gap: 10px; align-items: flex-end; align-self: flex-end; max-width: min(82%, 560px); }
.cx-row-msg--me { align-self: flex-start; flex-direction: row; }
.cx-av { flex: none; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.cx-av--txt { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.theme-sky .cx-msg { max-width: none; align-self: auto; background: #fff; border: 1px solid var(--sky-line); color: var(--ink); border-radius: 12px; padding: 12px 16px 8px; box-shadow: 0 6px 16px -12px rgba(10, 80, 130, .35); gap: 8px; }
.theme-sky .cx-msg--me { background: #eaf4fd; border-color: #cfe5f6; color: var(--ink); border-radius: 12px; }
.cx-msg__head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-bottom: 6px; border-bottom: 1px solid var(--tint); }
.cx-msg__head b { font-size: .88rem; }
.cx-msg__head small { margin-inline-start: auto; color: var(--ink-3); font-size: .74rem; }
.theme-sky .cx-meta { justify-content: flex-start; opacity: 1; color: var(--ink-3); }
.theme-sky .cx-read--yes { color: var(--accent); }
.theme-sky .cx-composer { padding: 14px 16px; }
.theme-sky .cx-input { border-radius: 12px; background: var(--sky-bg); border-color: transparent; padding-inline: 18px; }
.theme-sky .cx-tool { background: transparent; }
.theme-sky .cx-tool svg { stroke: var(--ink-3); }
.cx-sendbtn { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); cursor: pointer; display: grid; place-items: center; transition: transform .3s var(--spring), background .2s; }
.cx-sendbtn:hover { background: var(--accent-ink); }
.cx-sendbtn:active { transform: scale(.94); }
.cx-sendbtn:disabled { opacity: .5; }
.cx-sendbtn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1); }

/* right-hand info column */
.cx-side { display: grid; gap: 14px; align-content: start; overflow-y: auto; min-height: 0; padding-bottom: 4px; }
.cx-card { background: #fff; border-radius: 12px; padding: 18px; display: grid; gap: 12px; box-shadow: 0 0 0 1px var(--sky-line), 0 14px 30px -24px rgba(10, 80, 130, .3); }
.cx-card h3 { font-size: .98rem; font-weight: 700; }
.cx-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cx-person { display: flex; gap: 12px; align-items: center; }
.cx-person .avatar { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.cx-person div { display: grid; line-height: 1.5; }
.cx-state { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-size: .9rem; }
.cx-state--1 { background: var(--warn-soft); color: var(--warn); }
.cx-state--3 { background: var(--accent-soft); color: var(--accent-ink); }
.cx-state--4, .cx-state--5 { background: var(--bad-soft); color: var(--bad); }
.cx-feat { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cx-feat li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--sky-line); font-size: .9rem; }
.cx-feat em { font-style: normal; }
.cx-tariff { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--accent-ink); padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); }
.cx-tariff small { font-size: .85rem; font-weight: 500; }
.cx-secure { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: .85rem; }
.theme-sky .cx-tools { background: var(--accent-soft); }

@media (max-width: 1100px) {
    .theme-sky .cx--open { grid-template-columns: 250px minmax(0, 1fr); }
    .theme-sky .cx--open .cx-side { display: none; }
}
@media (max-width: 900px) {
    .theme-sky .cx, .theme-sky .cx--open { grid-template-columns: 1fr; height: calc(100dvh - 190px); }
    .cx-row-msg { max-width: 94%; }
}
.cx-empty-thread { margin: auto; text-align: center; max-width: 420px; display: grid; gap: 6px; color: var(--ink-2); padding: 24px 12px; }
.cx-empty-thread p { margin: 0; color: var(--ink-3); font-size: .9rem; }
.dp-chat { padding: 0; overflow: hidden; gap: 0; }
.dp-chat__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--sky-line); }
.dp-chat .cx-thread { height: 380px; flex: none; }
.dp-chat .cx-tools { border-radius: 0; }
.dp-chat .cx-locked { border-radius: 0; }

/* Doctor panel: patients list */
.pt-search { position: relative; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 6px 8px 6px 8px; box-shadow: 0 0 0 1px var(--sky-line); }
.pt-search svg { position: absolute; inset-inline-start: 18px; width: 20px; height: 20px; fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-linecap: round; }
.pt-search .input { border: 0; background: transparent; padding-inline-start: 38px; box-shadow: none; }
.pt-list { display: grid; gap: 12px; }
.pt-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--sky-line), 0 14px 30px -26px rgba(10, 80, 130, .35); transition: transform .4s var(--spring); }
.pt-row:hover { transform: translateY(-2px); }
.pt-av { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--accent-soft); }
.pt-av--txt { display: grid; place-items: center; font-weight: 800; color: var(--accent-ink); font-size: 1.2rem; }
.pt-info { flex: 1; min-width: 0; }
.pt-info h3 { font-size: 1.05rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pt-info h3 small { font-weight: 400; color: var(--ink-3); background: var(--tint); padding: 0 10px; border-radius: 12px; font-size: .78rem; }
.pt-info p { margin: 2px 0 0; font-size: .88rem; }
.pt-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.pt-actions form { margin: 0; }
.pt-btn { display: inline-flex; gap: 8px; align-items: center; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; color: var(--accent-ink); background: var(--accent-soft); padding: 8px 18px; border-radius: 12px; box-shadow: 0 0 0 1px #cfe5f6; transition: background .25s, color .25s, transform .3s var(--spring); }
.pt-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pt-btn:hover { background: var(--accent); color: #fff; }
.pt-btn:active { transform: scale(.96); }
.pt-link { font-weight: 600; color: var(--accent-ink); }
@media (max-width: 700px) { .pt-row { flex-wrap: wrap; } .pt-actions { width: 100%; justify-content: space-between; } }
.cx-tariff-box { display: grid; gap: 12px; padding: 18px 22px 22px; border-top: 1px solid var(--sky-line); background: var(--sky-bg); }
.cx-tariff-box h3 { font-size: 1rem; }
.cx-tariff-box p { margin: 2px 0 0; font-size: .88rem; }
.cx-docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cx-docs a { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--tint); }
.cx-docs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.pp-main, .pp-side { display: grid; gap: 18px; }
.pp-main .dp-card .table-wrap { margin: 0; }
@media (max-width: 1000px) { .pp-grid { grid-template-columns: 1fr; } .pp-side { order: -1; } }
.pp-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.pp-main, .pp-side { display: grid; gap: 18px; }
.pp-main .dp-card .table-wrap { margin: 0; }
@media (max-width: 1000px) { .pp-grid { grid-template-columns: 1fr; } .pp-side { order: -1; } }
.cx-tabs--3 { grid-template-columns: repeat(3, 1fr); }
.cx-tabs--4 { grid-template-columns: repeat(4, 1fr); }

/* Tariff cards (doctor) */
.cx-tariff-box__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tf-card { background: #fff; border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; box-shadow: 0 0 0 1px var(--sky-line); }
.tf-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tf-card__top b { display: flex; gap: 8px; align-items: center; font-size: .92rem; }
.tf-card__top svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tf-chip { font-size: .8rem; font-weight: 700; padding: 2px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; }
.tf-card:nth-child(2) svg { stroke: #5b3df5; } .tf-card:nth-child(2) .tf-chip { background: #ece8ff; color: #4328c9; } .tf-card:nth-child(2) .cx-range { accent-color: #5b3df5; }
.tf-card:nth-child(3) svg { stroke: #0f9d82; } .tf-card:nth-child(3) .tf-chip { background: #dff6ef; color: #0b7a65; } .tf-card:nth-child(3) .cx-range { accent-color: #0f9d82; }
.tf-card:nth-child(4) svg { stroke: #e0245e; } .tf-card:nth-child(4) .tf-chip { background: #fde6ee; color: #b3123f; } .tf-card:nth-child(4) .cx-range { accent-color: #e0245e; }
.tf-card.is-custom .cx-range { opacity: .35; }
.tf-card small { font-size: .78rem; line-height: 1.7; }
.tf-custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tf-custom__btn { border: 1px dashed var(--accent); background: transparent; color: var(--accent-ink); font: inherit; font-size: .82rem; font-weight: 600; padding: 3px 14px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.tf-custom__btn:hover { background: var(--accent-soft); }
.tf-custom__field { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.tf-custom__field[hidden] { display: none; }
.tf-custom__field .input { width: 150px; padding: 5px 10px; border-radius: 12px; }

/* New-message notices (doctor dashboard / patient panel) */
.notice-board { background: #fff; border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; display: grid; gap: 10px; box-shadow: 0 0 0 1px #cfe5f6, 0 14px 30px -24px rgba(10, 80, 130, .35); }
.notice-board h2 { font-size: 1.05rem; display: flex; gap: 10px; align-items: center; }
.notice-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--tint); }
.notice-row__body { flex: 1; min-width: 0; display: grid; line-height: 1.6; }
.notice-row__body span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-av--sm { width: 40px; height: 40px; border-radius: 12px; font-size: 1rem; }
.pt-actions .count { padding: 1px 12px; }
@media (max-width: 700px) { .notice-row { flex-wrap: wrap; } }
.pp-file { margin: 0; color: var(--ink-2); font-size: .92rem; }
.pp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pp-list li { padding: 10px 14px; border-radius: 12px; background: var(--sky-bg); }
.pp-list p { margin: 2px 0 0; }
.pp-timeline { list-style: none; margin: 0; padding: 0 16px 0 0; border-inline-start: 2px solid var(--sky-line); display: grid; gap: 12px; }
.pp-timeline li { display: grid; gap: 0; position: relative; padding-inline-start: 6px; }
.pp-timeline li::before { content: ""; position: absolute; inset-inline-start: -23px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.pp-timeline time { font-size: .78rem; color: var(--ink-3); }


/* Doctor mini card + locked chat */
.dm { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dm div { display: grid; line-height: 1.55; }
.dm b { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 1.02rem; }
.dm small { font-size: .84rem; }
.dm__av { flex: none; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.dm__av--txt { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 1.15rem; }
.cx-thread--idle { display: grid; place-items: center; height: 300px; }
.cx-empty-thread--lock { justify-items: center; }
.cx-empty-thread--lock b { color: var(--ink); }
.cx-lock { width: 52px; height: 52px; border-radius: 12px; background: var(--tint); display: grid; place-items: center; }
.cx-lock svg { width: 26px; height: 26px; fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cx-lock-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.cx-composer--off { opacity: .55; pointer-events: none; }
.cx-composer--off .cx-sendbtn { background: #9db8cc; }
.cx-composer--off .cx-sendbtn svg { stroke: #fff; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; width: 22px; height: 22px; transform: scaleX(-1); }

/* Doctor inbox: compact rows (new requests + unread messages) */
.inbox { display: grid; gap: 8px; margin-bottom: 24px; }
.inbox__head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.inbox__head h2 { font-size: 1.1rem; }
.ib-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; background: #fff; border-radius: 12px; padding: 10px 16px; box-shadow: 0 0 0 1px var(--sky-line); transition: box-shadow .3s, transform .4s var(--spring); }
.ib-row:hover { box-shadow: 0 0 0 1px #b9d9f0, 0 14px 28px -22px rgba(10, 80, 130, .5); transform: translateY(-1px); }
.ib-row form { margin: 0; }
.ib-who { display: grid; justify-items: center; gap: 3px; min-width: 0; }
.ib-who b { font-size: .8rem; font-weight: 600; max-width: 76px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-av { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: var(--accent-soft); }
.ib-av--txt { display: grid; place-items: center; font-weight: 800; color: var(--accent-ink); }
.ib-text { margin: 0; color: var(--ink-2); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.8; }
.ib-tag { display: inline-block; margin-inline-end: 8px; padding: 0 10px; border-radius: 12px; font-size: .72rem; font-weight: 700; background: #fff4dc; color: #a15c07; vertical-align: 1px; }
.ib-tag--msg { background: var(--accent-soft); color: var(--accent-ink); }
.ib-time { color: var(--ink-3); font-size: .78rem; white-space: nowrap; }
@media (max-width: 720px) {
    .ib-row { grid-template-columns: 60px minmax(0, 1fr); row-gap: 8px; }
    .ib-time { grid-column: 2; grid-row: 2; }
    .ib-row .btn, .ib-row form { grid-column: auto; }
}

/* Patient profile side column */
.pp-facts { margin: 0; display: grid; gap: 0; }
.pp-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--tint); font-size: .9rem; }
.pp-facts div:first-child { border-top: 0; }
.pp-facts dt { color: var(--ink-3); } .pp-facts dd { margin: 0; font-weight: 600; }
.pp-total { margin: 0; display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); }
.pp-total b { color: var(--accent-ink); font-size: 1.05rem; }
.pp-pay { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pp-pay li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; font-size: .85rem; padding: 8px 0; border-top: 1px solid var(--tint); }
.pp-pay li span:first-child { grid-column: 1 / -1; font-size: .78rem; }
.pp-rx { margin: 0; white-space: pre-line; background: var(--sky-bg); padding: 12px 14px; border-radius: 12px; font-size: .9rem; line-height: 1.9; }
