/* Staff workspace, layered after the existing brand. No status or accounting rules. */
.hp-auth>.container,.hp-auth>div>.container { min-height:100svh; display:flex; align-items:center; padding-block:2rem; }
.hp-auth .container>.row { width:100%; height:auto!important; margin:0; }
.hp-auth .container>.row>div { width:min(100%,32rem); }
.hp-auth .card { margin-inline:auto; width:100%; }
.hp-auth :is(.btn,.form-control) { min-height:44px; }
.hp-auth .input-group>.form-control { min-width:0; }
.hp-auth form a { text-align:center; text-decoration:underline; }
.hp-workspace { --hp-space:.75rem; --hp-focus:#176b78; }
.hp-workspace .content-inner { min-width:0; padding-block-start:1.25rem; padding-block-end:2rem!important; }
.hp-workspace .main-content,.hp-workspace .card-body,.hp-workspace .row>* { min-width:0; }
.hp-workspace dl.row dd { margin-inline:0; }
.hp-workspace .btn { min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:.35rem; }
.hp-workspace .btn-sm { min-height:40px; }
.hp-workspace :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { max-width:100%; }
/* 014 (2026-11-02): a switch inside a shrink-to-fit flex row (settings, forms) has a zero-width content box; the generic
   max-width above collapsed it to its 2px border. Switches keep their own size, never shrink, and show their state by the
   knob position and an optional text (.hp-switch-state), not by color alone. */
.form-switch { flex-shrink:0; }
.form-switch .form-check-input { max-width:none; flex-shrink:0; min-width:2em; border-color:#6b8a8f; }
.form-switch .form-check-input:focus-visible { outline:2px solid #1f6f78; outline-offset:2px; }
html:not([data-bs-theme=dark]) .form-switch .form-check-input:not(:checked) { background-color:#ffffff; --bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%236b8a8f'/%3e%3c/svg%3e"); }
.hp-switch-state { display:inline-flex; align-items:center; gap:.4rem; }
.hp-switch-state::after { content:attr(data-off); font-size:.875rem; color:#5a6b6e; white-space:nowrap; }
.hp-switch-state:has(.form-check-input:checked)::after { content:attr(data-on); color:#145438; font-weight:600; }
.hp-workspace :is(.form-control,.form-select,.multiselect),.hp-workspace .select2-container--default :is(.select2-selection--single,.select2-selection--multiple) { border-color:var(--hp-field, #7E9599); }
.hp-workspace :is(.form-control,.form-select),.hp-workspace .select2-container--default .select2-selection--single { min-height:44px; }
.hp-workspace .alert-success { color:#145438; background:#eef8f0; border-color:#9ac5a6; }
.hp-workspace .alert-danger { color:#7f1d2d; background:#fff1f2; border-color:#eab0b8; }
.hp-workspace .alert-warning { color:#6b4200; background:#fff6d9; border-color:#e0c77c; }
.hp-workspace .alert-info { color:#184f63; background:#edf7fb; border-color:#9dc4d3; }
.hp-workspace .badge.bg-success { background:#EFF6E0!important; color:#1E6B47; border-color:#CFE69A; }
.hp-workspace .badge.bg-danger { background:#FFE8F0!important; color:#7A2633; border-color:#FFCFDF; }
.hp-workspace .badge.bg-warning { background:#FEFDCA!important; color:#6B4A00; border-color:#E6CA8E; }
.hp-workspace .badge.bg-info { background:#E6F6F8!important; color:#184F63; border-color:#A5DEE5; }
/* Brand skin (2026-11-14): one badge shape - pill, 28px, 14px bold, 1px border, a Phosphor icon before the text
   (empty alternative text, so screen readers read the words only). Same class names, text and markup. */
.hp-workspace .badge:is(.bg-success,.bg-danger,.bg-warning,.bg-info),.hp-payment-mark,.hp-fee-mark,.hp-due-mark,.hp-unbilled-mark {
 display:inline-flex; align-items:center; gap:.3rem; min-height:28px; padding:.1rem .65rem; border-radius:999px; border:1px solid; font-size:14px; font-weight:700; line-height:1.3; white-space:nowrap; }
.hp-workspace .badge:is(.bg-success,.bg-danger,.bg-warning,.bg-info)::before,.hp-payment-mark::before,.hp-fee-mark::before,.hp-due-mark::before,.hp-unbilled-mark::before {
 font-family:'Phosphor'!important; font-size:16px; font-weight:normal; line-height:1; speak:never; }
.hp-workspace .badge.bg-success::before,.hp-payment-paid::before { content:"\e182" / ""; }
.hp-workspace .badge.bg-warning::before,.hp-payment-partial::before { content:"\e78e" / ""; }
.hp-due-mark::before,.hp-unbilled-mark::before { content:"\e3ec" / ""; }
.hp-workspace .badge.bg-danger::before,.hp-payment-unpaid::before,.hp-fee-mark::before { content:"\e4e2" / ""; }
.hp-workspace .badge.bg-info::before { content:"\e19a" / ""; }
:root[data-bs-theme=dark] .hp-workspace .badge.bg-success,:root[data-bs-theme=dark] .hp-payment-paid { background:#26361A!important; color:#CFE69A; border-color:#4C6A2A; }
:root[data-bs-theme=dark] .hp-workspace .badge.bg-warning,:root[data-bs-theme=dark] :is(.hp-payment-partial,.hp-due-mark,.hp-unbilled-mark) { background:#3D3A1A!important; color:#FEFDCA; border-color:#6B6630; }
:root[data-bs-theme=dark] .hp-workspace .badge.bg-danger,:root[data-bs-theme=dark] :is(.hp-payment-unpaid,.hp-fee-mark) { background:#4A2530!important; color:#FFCFDF; border-color:#7A4050; }
:root[data-bs-theme=dark] .hp-workspace .badge.bg-info { background:#1A3A40!important; color:#A5DEE5; border-color:#356870; }
:root[data-bs-theme=dark] .hp-workspace .alert-success { color:#cfefd0; background:#1f4932; }
:root[data-bs-theme=dark] .hp-workspace .alert-danger { color:#ffdce1; background:#572934; }
:root[data-bs-theme=dark] .hp-workspace .alert-warning { color:#fff0bd; background:#51451e; }
:root[data-bs-theme=dark] .hp-workspace .alert-info { color:#d1eef8; background:#214650; }
.hp-workspace .table { font-variant-numeric:tabular-nums; }
.hp-workspace .table th { vertical-align:middle; }
.hp-workspace .table td { overflow-wrap:anywhere; }
/* Fixes after f33c54a (item 4): a button in a table cell keeps its words whole («فتح الفرع» broke one letter per line on a
   phone); the table scrolls in its own frame (.table-responsive) instead of squeezing the button. */
.hp-workspace .table td .btn, .table-responsive .table td .btn { white-space:nowrap; overflow-wrap:normal; word-break:keep-all; }
.hp-workspace .table-responsive { max-width:100%; overscroll-behavior-inline:contain; }
.hp-workspace .table-responsive:focus-visible { outline:3px solid var(--hp-focus); outline-offset:2px; }
.hp-table-hint { font-size:.875rem; color:var(--hp-muted); margin:.5rem 0; }
/* Brand skin (2026-11-14): buttons keep their own two-ring focus from happy-paws.css. */
.hp-workspace :is(a,button,input,select,textarea,summary,[tabindex]):not(.btn):focus-visible { outline:3px solid var(--hp-focus); outline-offset:3px; }
:root[data-bs-theme=dark] .hp-workspace { --hp-focus:#CFE69A; }
.hp-skip-link { position:fixed; inset-block-start:.5rem; inset-inline-start:1rem; transform:translateY(-180%); z-index:2000; background:var(--hp-action); color:#fff; padding:.75rem 1rem; border-radius:.5rem; }
.hp-skip-link:focus { transform:none; color:#fff; }
.hp-page-header { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:1rem; margin-block-end:1.5rem; }
.hp-page-heading { flex:1 1 20rem; min-width:0; }
.hp-page-heading h1 { font-size:clamp(1.5rem,2.5vw,2rem); margin:0; overflow-wrap:anywhere; }
.hp-page-heading p { color:var(--hp-muted); margin:.5rem 0 0; max-width:75ch; }
.hp-back-link { display:inline-flex; gap:.4rem; align-items:center; margin-block-end:.5rem; text-decoration:underline; text-underline-offset:.2em; }
.hp-page-actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.hp-section-nav { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; padding:.75rem 1rem; margin-block-end:1.25rem; border:1px solid var(--hp-line); border-radius:.75rem; background:var(--hp-surface); position:sticky; top:5.5rem; z-index:10; box-shadow:0 3px 12px #18373d08; }
.hp-section-nav[hidden] { display:none; }
.hp-section-nav-label { font-weight:700; color:var(--hp-muted); font-size:.875rem; }
[data-ux-outline-links] { display:flex; flex-wrap:wrap; gap:.3rem; }
.hp-section-nav a { padding:.4rem .65rem; border-radius:.5rem; min-height:2.5rem; display:inline-flex; align-items:center; text-decoration:none; border:1px solid transparent; }
.hp-section-nav a:hover,.hp-section-nav a:focus-visible { background:var(--hp-soft); border-color:var(--hp-line); }
.hp-workspace :is([data-ux-section],[id^=queue-],#cat-clinical,#cat-appointments,#cat-veterinary-profile) { scroll-margin-block-start:10rem; }
.hp-workspace details { border:1px solid var(--hp-line); border-radius:.65rem; padding:.75rem 1rem; margin-block:.5rem; background:var(--hp-surface); }
.hp-workspace summary { cursor:pointer; min-height:2.75rem; padding-block:.5rem; font-weight:700; overflow-wrap:anywhere; }
.hp-workspace details[open]>summary { border-block-end:1px solid var(--hp-line); margin-block-end:1rem; }
.hp-workspace details[id] { scroll-margin-block-start:11rem; }
.hp-workspace details details { background:var(--hp-soft); }
.hp-workspace .hp-history-entry { border-inline-start:4px solid var(--hp-sky); margin-block-end:1rem; }
.hp-workspace .hp-history-entry header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.75rem; }
.hp-workspace .hp-history-entry h3 { font-size:1.1rem; margin:0; }
.hp-clinical-text { white-space:pre-wrap; overflow-wrap:anywhere; max-width:100ch; }
.hp-identity { display:grid; grid-template-columns:auto minmax(0,1fr); gap:1rem; align-items:center; padding:1.25rem; margin-block-end:1rem; background:var(--hp-soft); border-radius:.75rem; }
.hp-identity h1 { font-size:1.8rem; margin:0 0 .3rem; }
.hp-identity p { margin:0; }
.hp-identity img { width:72px; height:72px; object-fit:cover; border-radius:50%; }
.hp-record-id { font-family:Tajawal,Arial,sans-serif; font-size:1rem; color:var(--hp-muted); font-weight:500; }
.hp-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(12rem,1fr)); gap:.5rem 1.5rem; margin-block:1rem; }
.hp-facts>div { padding:.5rem 0; border-block-end:1px solid var(--hp-line); }
.hp-facts dt { font-size:.875rem; color:var(--hp-muted); font-weight:500; }
.hp-facts dd { margin:0; font-weight:700; overflow-wrap:anywhere; }
.hp-empty-state { padding:1.5rem; text-align:center; border:1px dashed var(--hp-line); border-radius:.75rem; background:var(--hp-soft); }
.hp-empty-state>img { display:block; width:56px; height:56px; margin-inline:auto; margin-block-end:.5rem; }
td .hp-empty-state>img { width:40px; height:40px; }
.hp-queue-metrics { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:.6rem; margin-block-end:1.5rem; }
.hp-queue-metrics a { display:flex; flex-direction:column; gap:.3rem; text-decoration:none; padding:1rem; border:1px solid var(--hp-line); border-radius:.75rem; background:var(--hp-surface); }
.hp-queue-metrics strong { font-size:1.5rem; color:var(--hp-ink); }
.hp-queue-row { display:grid; grid-template-columns:4rem minmax(12rem,1fr) minmax(0,auto); gap:1rem; padding:1rem; border:1px solid var(--hp-line); border-radius:.75rem; margin-block:.75rem; }
.hp-queue-row>time { font-size:1.1rem; font-weight:700; font-variant-numeric:tabular-nums; }
.hp-queue-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.hp-queue-actions form { margin:0; }
.hp-queue-other { flex-basis:100%; }
.hp-queue-other>div { display:flex; flex-wrap:wrap; gap:.5rem; }
.hp-workspace .clinic-account-links { border-block-end:1px solid var(--hp-line); padding-block-end:.75rem; }
.hp-workspace .clinic-account-links a[aria-current=page] { background:var(--hp-action); color:#fff; border-color:var(--hp-action); }
.hp-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(12rem,1fr)); gap:.75rem; margin-block:1rem 1.5rem; }
.hp-summary-card { display:flex; flex-direction:column; gap:.35rem; border:1px solid var(--hp-line); border-inline-start:4px solid var(--hp-sky); border-radius:.75rem; padding:1rem; background:var(--hp-surface); text-decoration:none; }
.hp-summary-card strong { font-size:1.4rem; color:var(--hp-ink); font-variant-numeric:tabular-nums; }
.hp-sidebar-search { padding:.6rem 1rem 1rem; }
.hp-sidebar-search label { display:block; margin-block-end:.35rem; font-weight:700; font-size:.9rem; }
.hp-sidebar-search input { width:100%; }
.hp-sidebar-search p { margin:.5rem 0 0; font-size:.875rem; }
.hp-workspace .sidebar-mini .hp-sidebar-search { display:none; }
.hp-workspace .sidebar-toggle { border:0; background:transparent; color:inherit; width:44px; min-width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; border-radius:.5rem; }
.hp-workspace .sidebar-toggle:hover { background:var(--hp-soft); }
.hp-workspace .sidebar .sub-nav .nav-link { min-height:44px; }
.hp-workspace #sidebar-menu [hidden] { display:none!important; }
.hp-sidebar-backdrop { display:none; }
.hp-workspace .offcanvas { max-width:100vw; }
.hp-workspace .offcanvas-footer { background:var(--hp-surface); padding:1rem; }
.hp-workspace .btn-close-offcanvas { min-width:44px; min-height:44px; }
.hp-workspace .btn-toolbar { flex-wrap:wrap; }
.hp-workspace #setting-list .btn { width:100%; justify-content:flex-start; text-align:start; }
.hp-workspace #setting-list .router-link-exact-active { background:var(--hp-action); color:#fff; font-weight:700!important; border-color:var(--hp-action); }
.hp-workspace .dataTables_wrapper .row { row-gap:.75rem; }
.hp-workspace .dataTables_wrapper .dataTables_processing { background:var(--hp-surface); color:var(--hp-ink); border:1px solid var(--hp-line); z-index:20; }
.hp-workspace .hp-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:1rem; align-items:end; }
.hp-workspace .hp-form-grid>button { justify-self:start; }
.hp-workspace .hp-inventory :is(input:not([type=hidden]):not([type=checkbox]),select) { display:block; width:100%; min-height:44px; padding:.5rem .75rem; border:1px solid var(--hp-line); border-radius:.5rem; color:var(--hp-ink); background:var(--hp-surface); }
.hp-workspace .hp-inventory form:not([method=get]) { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap:.75rem; align-items:end; }
.hp-workspace .hp-inventory td:last-child { min-width:18rem; }
.hp-workspace .hp-inventory td details { min-width:16rem; }
.hp-workspace .hp-inventory details form { margin-block-start:1rem; }
.hp-workspace .hp-financial .hp-form-grid label { width:auto; }
.hp-workspace .hp-financial :is(h2,h3,h4) { margin-block:1.5rem .75rem; }
.hp-workspace .hp-financial h1 { margin:0; }
.hp-workspace :is(#accounting-workspace,#adjustment-workspace) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea) { min-height:44px; max-width:100%; padding:.5rem .75rem; border:1px solid var(--hp-field, #7E9599); border-radius:.5rem; background:var(--hp-surface); color:var(--hp-ink); }
.hp-workspace :is(#accounting-workspace,#adjustment-workspace) label { max-width:100%; }
.hp-workspace :is(#accounting-workspace,#adjustment-workspace) label>:is(input:not([type=checkbox]):not([type=radio]),select,textarea) { display:block; width:100%; }
.hp-workspace :is(#accounting-workspace,#adjustment-workspace) form:is(.accounting-form,.accounting-report,.adjustment-form,.adjustment-limit) { display:flex; flex-wrap:wrap; align-items:flex-end; gap:.75rem; }
.hp-workspace :is(#accounting-workspace,#adjustment-workspace) form>label { flex:1 1 14rem; }
.hp-workspace :is(#accounting-workspace,#adjustment-workspace) form>:is(div,fieldset,h3,h4,.table-responsive,details) { flex-basis:100%; }
.hp-workspace :is(#accounting-workspace,#adjustment-workspace) [data-remove] { color:#a62c3b; }
.hp-workspace .hp-validation a { color:inherit; text-decoration:underline; }
@media(max-width:1199.98px) { .hp-queue-row { grid-template-columns:4rem minmax(0,1fr); }.hp-queue-actions { grid-column:1/-1; } }
@media(max-width:767.98px) {
 .hp-workspace .offcanvas:not(.iq-product-menu-responsive) { width:100vw!important; }
 .hp-section-nav { position:static; padding:.75rem; }
 .hp-section-nav-label { flex-basis:100%; }
 .hp-page-heading { flex-basis:100%; }
 .hp-page-actions { width:100%; }
 .hp-page-actions>.btn { flex:1 1 auto; }
 .hp-queue-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .hp-identity { padding:1rem; gap:.75rem; }.hp-identity img { width:56px; height:56px; }
 .hp-identity h1 { font-size:1.45rem; }
 .hp-workspace .clinic-account-links { flex-direction:row; }.hp-workspace .clinic-account-links .btn { flex:1 1 auto; }
 .hp-workspace .content-inner>.container-fluid { padding-inline:0!important; }
 .hp-workspace .hp-section-nav a { padding:.4rem .5rem; }
 .hp-workspace .hp-form-grid { grid-template-columns:1fr; }
 .hp-workspace .table td,.hp-workspace .table th { font-size:.9rem; }
 .hp-workspace .hp-queue-actions .btn { min-height:44px; }
 .hp-workspace .btn-sm { min-height:44px; }
 .hp-workspace .btn-toolbar { width:100%; justify-content:flex-start!important; }
 .hp-workspace .btn-toolbar>.input-group { width:100%; flex:1 1 100%; }
 .hp-workspace .btn-toolbar>* { max-width:100%; }
 .hp-workspace .input-group.flex-nowrap { min-width:0; }
 .hp-workspace .user-info h1 { font-size:1.6rem; overflow-wrap:anywhere; }
}
@media(min-width:768px) and (max-width:1024px) { .hp-workspace .offcanvas-w-40 { width:min(42rem,100vw)!important; } }
/* Item 23 (2026-11-08): the overlay menu is for screens under 768px (it was under 1025px). */
@media(max-width:767.98px) {
 .hp-workspace .sidebar { inset-inline-start:0!important; inset-inline-end:auto!important; transform:none!important; width:min(20rem,86vw)!important; max-width:86vw; z-index:1055; height:100dvh; overflow-y:auto; }
 .hp-workspace .sidebar.sidebar-mini { visibility:hidden; pointer-events:none; }
 .hp-workspace .sidebar:not(.sidebar-mini) { visibility:visible; }
 .hp-workspace .sidebar+.main-content { margin-inline:0!important; width:100%!important; }
 .hp-sidebar-backdrop:not([hidden]) { display:block; position:fixed; inset:0; border:0; background:rgba(10,35,40,.5); z-index:1054; }
 .hp-workspace.hp-nav-open { overflow:hidden; }
 .hp-workspace .sidebar-mini .hp-sidebar-search { display:block; }
}
@media(max-width:1024px) { .hp-workspace .content-inner .row { --bs-gutter-x:1.5rem; } }
@media(prefers-reduced-motion:reduce) { .hp-workspace * { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; } }
@media print {
 .hp-skip-link,.hp-sidebar-search,.hp-section-nav,.hp-page-actions,.hp-back-link,.hp-table-hint { display:none!important; }
 .hp-workspace .table-responsive { overflow:visible; max-width:none; }
 .hp-workspace details { border:0; padding:0; }
 .hp-workspace .hp-history-entry { break-inside:avoid; }
 .hp-workspace .hp-page-header { margin-block-end:1rem; }
 .hp-workspace .table { font-size:9pt; }
 .hp-workspace .card { box-shadow:none; }
}

/* Shared clinic dashboard (video brief REQ-001/003/004): filters on top, appointments first (right in RTL), invoices beside them. */
.hp-board-filters .card-body { padding:.75rem 1rem; }
.hp-board-day { display:flex; flex-wrap:wrap; align-items:flex-end; gap:.5rem; }
.hp-board { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; align-items:start; }
.hp-board-section .card-body { display:flex; flex-direction:column; gap:.75rem; }
.hp-board-appointment,.hp-board-invoice { border:1px solid var(--hp-line); border-inline-start:4px solid var(--hp-sky); border-radius:.75rem; padding:.75rem 1rem; background:var(--hp-surface); display:flex; flex-direction:column; gap:.5rem; }
.hp-board-appointment-head { display:flex; justify-content:space-between; align-items:flex-start; gap:.5rem; flex-wrap:wrap; }
.hp-board-cat { font-weight:700; font-size:1.05rem; }
.hp-board-status { display:inline-flex; align-items:center; min-height:28px; font-size:14px; font-weight:700; padding:.1rem .65rem; border-radius:999px; background:var(--hp-soft); border:1px solid rgba(24,55,61,.18); white-space:nowrap; }
.hp-board-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(8rem,1fr)); gap:.25rem 1rem; margin:0; }
.hp-board-facts dt { font-size:.875rem; color:var(--hp-muted); font-weight:500; }
.hp-board-facts dd { margin:0; }
.hp-board-appointment .hp-queue-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.hp-board-appointment .hp-queue-actions form { display:inline; }
.hp-money { font-variant-numeric:tabular-nums; }
/* Cat file tabs: overview first; chart and images one click away. */
.hp-cat-tabs { display:flex; flex-wrap:wrap; gap:.5rem; margin-block:0 1rem; border-block-end:1px solid var(--hp-line); padding-block-end:.5rem; }
.hp-cat-tabs a { padding:.5rem 1rem; border-radius:.5rem; border:1px solid var(--hp-line); text-decoration:none; background:var(--hp-surface); }
.hp-cat-tabs a[aria-current=page] { background:var(--hp-action); color:#fff; border-color:var(--hp-action); font-weight:700; }
/* Chart (REQ-007/006/010): sections bar, shortcut grid, previous services. */
.hp-chart .card { margin-block-end:1rem; }
.hp-chart-sections { display:flex; flex-wrap:wrap; gap:.5rem; margin-block:.75rem; }
.hp-chart-sections [role=tab] { border:1px solid var(--hp-line); border-block-end:3px solid var(--hp-sky); border-radius:.5rem; padding:.45rem 1rem; background:var(--hp-surface); color:var(--hp-ink); }
.hp-chart-sections [role=tab][aria-selected=true] { background:var(--hp-soft); border-block-end-color:var(--hp-action); font-weight:700; }
.hp-chart-panel { border:1px solid var(--hp-line); border-radius:.75rem; padding:1rem; background:var(--hp-soft); }
.hp-chart-services { display:grid; grid-template-columns:repeat(auto-fill,minmax(14rem,1fr)); gap:.5rem; margin:0; }
.hp-chart-service,.hp-chart-shortcut { width:100%; display:flex; justify-content:space-between; align-items:center; gap:.5rem; text-align:start; border:1px solid var(--hp-line); border-radius:.5rem; padding:.6rem .8rem; background:var(--hp-surface); color:var(--hp-ink); }
.hp-chart-shortcuts { display:grid; grid-template-columns:repeat(auto-fill,minmax(12rem,1fr)); gap:.75rem; margin:0; }
.hp-chart-shortcut { flex-direction:column; justify-content:center; min-height:7rem; font-size:1.05rem; text-align:center; border-inline-start:4px solid var(--hp-sky); }
.hp-chart-shortcut .hp-chart-service-name { font-weight:700; }
button.hp-chart-service:hover,button.hp-chart-shortcut:hover { background:var(--hp-soft); border-color:var(--hp-action); }
.hp-chart-history-date { margin-block:1rem .25rem; color:var(--hp-muted); }
.hp-order-input { max-width:6rem; }
.hp-chart-dialog { border:1px solid var(--hp-line); border-radius:.75rem; padding:1.25rem; width:min(36rem,calc(100vw - 2rem)); background:var(--hp-surface); color:var(--hp-ink); }
.hp-chart-dialog::backdrop { background:#18373d66; }
/* Images and imaging (REQ-009). */
.hp-gallery-upload { display:grid; grid-template-columns:repeat(auto-fit,minmax(12rem,1fr)); gap:.5rem 1rem; align-items:end; border:1px dashed var(--hp-line); border-radius:.75rem; padding:1rem; }
.hp-gallery-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(12rem,1fr)); gap:1rem; margin:0; }
.hp-gallery-item { border:1px solid var(--hp-line); border-radius:.75rem; overflow:hidden; background:var(--hp-surface); display:flex; flex-direction:column; }
.hp-gallery-thumb { display:flex; align-items:center; justify-content:center; height:9rem; background:var(--hp-soft); }
.hp-gallery-thumb img { width:100%; height:100%; object-fit:cover; }
.hp-gallery-thumb i { font-size:3rem; color:var(--hp-action); }
.hp-gallery-meta { display:flex; flex-direction:column; gap:.25rem; padding:.75rem; font-size:.875rem; }
/* Owner order 2026-11-25: video card, inline player and upload progress. */
button.hp-gallery-thumb { width:100%; border:0; cursor:pointer; }
.hp-gallery-player { display:block; width:100%; height:9rem; background:#000; }
.hp-gallery-progress { display:flex; align-items:center; gap:.5rem; grid-column:1 / -1; }
.hp-gallery-progress progress { flex:1; height:.75rem; }
@media(max-width:1024px) { .hp-board { grid-template-columns:minmax(0,1fr); } }
/* Video review 2026-10-29: configurable status colors (text always shown), waiting time and reception note. */
/* Brand skin (2026-11-14): size, type and border only; the colour still comes from the settings (inline style). */
.hp-status-badge { display:inline-flex; align-items:center; min-height:28px; font-size:14px; font-weight:700; padding:.1rem .65rem; border-radius:999px; border:1px solid rgba(24,55,61,.18); white-space:nowrap; }
.hp-wait { display:block; font-size:.875rem; color:var(--hp-muted, #6b7280); margin-top:.15rem; }
.hp-reception-note { font-size:.875rem; background:var(--hp-soft); border-radius:.5rem; padding:.25rem .5rem; margin-top:.35rem; }
.hp-reception-note span { font-weight:600; }
/* Video review 2026-10-29 (D7): invoice mark and payment state are separate. */
.hp-invoice-mark { display:inline-flex; align-items:center; gap:.15rem; margin-inline-start:.35rem; color:var(--hp-action); }
.hp-payment-mark { margin-inline-start:.25rem; }
.hp-payment-paid { background:#EFF6E0; color:#1E6B47; border-color:#CFE69A; } .hp-payment-partial { background:#FEFDCA; color:#6B4A00; border-color:#E6CA8E; } .hp-payment-unpaid { background:#FFE8F0; color:#7A2633; border-color:#FFCFDF; }
/* 008 (2026-11-02): the Saudi-only phone group stays inside its column (RTL drawers, mobile). */
.hp-sa-phone { width:100%; max-width:100%; }
.hp-sa-phone .form-control { min-width:0; }

/* A3/A4 (owner, 2026-11-07): unpaid exam fee (orange) and unbilled dues marks. */
.hp-fee-mark { background:#FFE8F0; color:#7A2633; border-color:#FFCFDF; margin-inline-end:.25rem; }
.hp-due-mark { background:#FEFDCA; color:#6B4A00; border-color:#E6CA8E; margin-inline-end:.25rem; cursor:pointer; }
.hp-due-mark:hover, .hp-due-mark:focus-visible { background:#F8F1B4; border-color:#D9B871; }
/* Fixes after f33c54a (item 7): «بنود غير مفوترة (N)» - a link to the cat's chart, beside the other invoice marks. */
.hp-unbilled-mark { background:#FEFDCA; color:#6B4A00; border-color:#E6CA8E; margin-inline-end:.25rem; text-decoration:none; }
.hp-unbilled-mark:hover, .hp-unbilled-mark:focus-visible { background:#F8F1B4; color:#6B4A00; border-color:#D9B871; }
.hp-visit-invoice { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }

/* Doctor round (2026-11-07): the visit log's last row is never clipped by its scroll container (half a pixel of border). */
.table-responsive > .hp-visit-log { overflow: visible; }
.table-responsive:has(> .hp-visit-log) { padding-bottom: 2px; }
/* Item 15 (2026-11-08): a mobile with 1-8 digits shows a warning border and "complete 9 digits (N left)" (Vue and Blade). */
.hp-sa-phone .form-control.hp-sa-phone-short { border-color:#9a3412; box-shadow:0 0 0 .1rem rgba(154,52,18,.25); }
.hp-sa-phone-hint { color:#9a3412; }
/* Item 22 (2026-11-08): the date range filter (Medicolize's behaviour, our colours). */
.hp-range { position:relative; margin-bottom:.75rem; }
.hp-range-bar { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; }
.hp-range-field { display:flex; align-items:center; border:1px solid var(--hp-line, #D6E7E7); border-radius:.5rem; background:var(--hp-surface, #fff); min-width:0; max-width:100%; }
.hp-range-toggle { display:flex; align-items:center; gap:.4rem; border:0; background:transparent; padding:.35rem .65rem; color:inherit; min-width:0; text-align:start; }
.hp-range-toggle span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hp-range-clear { padding:0 .55rem; font-size:1.2rem; line-height:1; color:var(--hp-muted, #586D72); text-decoration:none; }
.hp-range-panel { position:absolute; z-index:1060; inset-inline-start:0; top:calc(100% + .35rem); display:flex; gap:.75rem; padding:.75rem; background:var(--hp-surface, #fff);
  border:1px solid var(--hp-line, #D6E7E7); border-radius:.75rem; box-shadow:0 .75rem 2rem rgba(24,55,61,.18); max-width:calc(100vw - 32px); }
.hp-range-panel[hidden] { display:none; }
.hp-range-presets { list-style:none; margin:0; padding:0 0 0 .5rem; border-inline-end:1px solid var(--hp-line, #D6E7E7); min-width:8.5rem; }
.hp-range-preset { display:block; padding:.3rem .5rem; border-radius:.35rem; color:inherit; text-decoration:none; white-space:nowrap; }
.hp-range-preset:hover, .hp-range-preset:focus-visible { background:var(--hp-soft, #EAF7F8); }
.hp-range-preset.is-current { background:var(--hp-action, #28636B); color:#fff; font-weight:600; }
.hp-range-head { display:flex; align-items:center; }
.hp-range-months { display:flex; gap:1rem; }
.hp-range-month-title { text-align:center; font-weight:600; margin-bottom:.35rem; }
.hp-range-grid { display:grid; grid-template-columns:repeat(7, 2.1rem); gap:.15rem; }
.hp-range-dow { text-align:center; font-size:.8rem; color:var(--hp-muted, #586D72); }
.hp-range-day { width:2.1rem; height:2.1rem; border:1px solid transparent; border-radius:.4rem; background:transparent; color:inherit; font-size:.85rem; }
.hp-range-day:hover { background:var(--hp-soft, #EAF7F8); }
.hp-range-day.is-today { border-color:var(--hp-action, #28636B); }
.hp-range-day.is-in { background:var(--hp-soft, #EAF7F8); }
.hp-range-day.is-start, .hp-range-day.is-end { background:var(--hp-action, #28636B); color:#fff; font-weight:700; }
.hp-range-hint { position:absolute; bottom:.35rem; inset-inline-end:.75rem; color:var(--hp-muted, #586D72); }
@media (max-width: 759px) {
  .hp-range-panel { flex-direction:column; inset-inline-start:0; inset-inline-end:auto; }
  .hp-range-presets { display:flex; flex-wrap:wrap; gap:.25rem; padding:0 0 .5rem; border-inline-end:0; border-bottom:1px solid var(--hp-line, #D6E7E7); }
  .hp-range-grid { grid-template-columns:repeat(7, 2.4rem); }
  .hp-range-day { width:2.4rem; height:2.4rem; }
}
/* Item 23 (2026-11-08): from 768px the side menu is an icon rail (default) or the full menu (remembered); both push the
   content and never cover it. A section's pages show in a flyout beside its icon. Under 768px: the overlay menu above. */
@media (max-width:767.98px) { .hp-workspace .hp-nav-full-toggle { display:none!important; } }
@media (min-width:768px) {
 .hp-workspace .iq-navbar .sidebar-toggle, .hp-workspace .sidebar .sidebar-toggle { display:none!important; }
 .hp-nav-full-toggle { display:inline-flex; align-items:center; gap:.35rem; }
 .hp-workspace .sidebar.sidebar-base { visibility:visible!important; transform:none!important; pointer-events:auto!important; inset-inline-start:0!important; inset-inline-end:auto!important; height:100vh; }
 .hp-workspace .sidebar.sidebar-base:not(.sidebar-mini) { width:16.2rem!important; max-width:16.2rem; --sidebar-width:16.2rem; }
 .hp-workspace .sidebar.sidebar-base:not(.sidebar-mini)+.main-content { --sidebar-width:16.2rem; margin-inline-start:16.2rem!important; margin-inline-end:0!important; }
 html.hp-nav-rail .hp-workspace .sidebar.sidebar-base { width:4.5rem!important; max-width:4.5rem!important; --sidebar-width:4.5rem; overflow:visible; }
 html.hp-nav-rail .hp-workspace .sidebar.sidebar-base+.main-content { --sidebar-width:4.5rem; margin-inline-start:4.5rem!important; margin-inline-end:0!important; }
 html.hp-nav-rail .hp-workspace .sidebar .sub-nav, html.hp-nav-rail .hp-workspace .sidebar .right-icon, html.hp-nav-rail .hp-workspace .sidebar .hp-sidebar-search { display:none!important; }
 html.hp-nav-rail .hp-workspace .sidebar .clinic-nav-section > .nav-link .item-name { position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; margin:0!important; }
 html.hp-nav-rail .hp-workspace .sidebar .navbar-nav .nav-item { padding-inline:.5rem!important; }
 html.hp-nav-rail .hp-workspace .sidebar .clinic-nav-section > .nav-link { justify-content:center; padding:.6rem 0!important; min-height:2.75rem; }
 html.hp-nav-rail .hp-workspace .sidebar .clinic-nav-section > .nav-link .icon { margin:0!important; font-size:1.35rem; }
 html.hp-nav-rail .hp-workspace .sidebar .clinic-nav-section > .nav-link[aria-expanded=true] { background:var(--hp-soft); color:var(--hp-ink); }
 html.hp-nav-rail .hp-workspace .sidebar .clinic-nav-section > .nav-link.active { outline:2px solid var(--hp-action); outline-offset:-2px; }
}
.hp-nav-flyout { position:fixed; z-index:1060; min-width:13rem; max-width:min(18rem, calc(100vw - 6rem)); max-height:calc(100vh - 16px); overflow:auto; background:var(--hp-surface, #fff);
  border:1px solid var(--hp-line, #D6E7E7); border-radius:.75rem; box-shadow:0 .75rem 2rem rgba(24,55,61,.2); padding:.5rem; }
.hp-nav-flyout[hidden] { display:none; }
.hp-nav-flyout-title { font-weight:700; padding:.35rem .6rem .5rem; color:var(--hp-ink, #18373D); border-bottom:1px solid var(--hp-line, #D6E7E7); margin-bottom:.35rem; }
.hp-nav-flyout-list { list-style:none; margin:0; padding:0; }
.hp-nav-flyout-list a, .hp-nav-flyout-list > li > span { display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.5rem .6rem; border-radius:.5rem; color:var(--hp-ink, #18373D); text-decoration:none; min-height:2.5rem; }
.hp-nav-flyout-list a:hover, .hp-nav-flyout-list a:focus-visible { background:var(--hp-soft, #EAF7F8); }
.hp-nav-flyout-list a.is-current { background:var(--hp-sky, #A5DEE5); font-weight:700; }
.hp-nav-flyout-list a.is-current::after { content:"●"; font-size:.6em; }
.hp-nav-flyout-list a .item-name { margin:0!important; }

/* Reception notes (2026-11-09, reception feedback): the note a receptionist writes on an appointment is read at a glance.
   Inputs: body-size text, a darker border than other secondary fields, a bold label, three lines. Displays: body size,
   dark ink, never small grey. The board card clamps a long note to two lines; the title and the summary show it in full. */
/* Fixes after f33c54a (item 1): backend.css styles labels and fields inside .card/.modal/.offcanvas with two classes
   (".offcanvas label.form-label", ".offcanvas .form-control"), which beat the single class above - the booking drawer,
   the calendar form and the edit page showed a 500 label and a 1px, 14px box. These selectors are a step more precise,
   for the reception note only (no !important, nothing else in backend.css touched). 16px is written in px: this
   layout's root font is 14px, so 1rem was 14px. */
.hp-reception-note-label, :is(.card, .modal, .offcanvas, form) label.hp-reception-note-label.form-label { font-weight:700; color:var(--hp-ink, #18373D); }
textarea.hp-reception-note-input, :is(.card, .modal, .offcanvas, form) textarea.form-control.hp-reception-note-input { font-size:16px; line-height:1.5; color:var(--hp-ink, #18373D); border:2px solid var(--hp-muted, #586D72); }
textarea.hp-reception-note-input::placeholder { color:var(--hp-muted, #586D72); opacity:.75; }
textarea.hp-reception-note-input:focus { border-color:var(--hp-action, #28636B); }
.hp-reception-note, .hp-reception-note-text, :is(.card, .modal, .offcanvas, dl) .hp-reception-note-text { font-size:16px; line-height:1.5; color:var(--hp-ink, #18373D); }
.hp-reception-note > span { font-weight:700; }

/* Dates (2026-11-09, reception feedback): a date or date-time field reads left to right in the Arabic interface, so its
   "dd/mm/yyyy" mask is not drawn reversed. Only the native inputs; text inputs that a picker library decorates are untouched. */
input[type=date], input[type=datetime-local], input[type=month], input[type=time] { direction:ltr; text-align:right; }
