/*
 * Compact screens (owner 19-11-2026, preview ui-preview/open-items-1235.html section 5, K1–K4, K3 = always ON).
 * Same idea as pharmacy-compact.css: only box heights, row heights, gaps and padding change. Font sizes stay
 * (12.5–13 px), every field, button, column, tab and badge stays, buttons stay ≥ 28 px. Every rule sits under the
 * screen's own wrapper, so other screens are not touched. Loaded after the screen CSS (layout head + the screens
 * that link their CSS inside the page). Popups (html[data-vx-popup]) are already compact and are left alone.
 */

/* ---- IP Patient List (+ IP / OP Bill Reprint): row 48 → 32, header 36 → 30 ------------------------------------- */
.ipl-table th { height: 30px; }
.ipl-table td { height: 32px; padding-top: 3px; padding-bottom: 3px; }
/* Two-line cells (name + UHID, DOA + DOD, payer + rate card): same font, tighter lines (owner 19-11-2026, K2). */
.ipl-table td { line-height: 1.25; }
.ipl-table td .ipl-meta, .ipl-doadod .ipl-dod, .ipl-doadod .ipl-cxat { margin-top: 0; line-height: 1.2; }

/* ---- IP Nursing Desk list: row 42 → 30, header 36 → 30, filter boxes 32 → 28 ------------------------------------ */
.ndx .ndx-tbl th { height: 30px; }
.ndx .ndx-tbl td { height: 30px; padding-top: 1px; padding-bottom: 1px; }
.ndx .nd-f select, .ndx .nd-f input { height: 28px; }
.ndx .ndx-search button { height: 28px; }
.ndx .ndx-reset { height: 28px; }
/* Two-line cells (patient + UHID, floor + ward): same font, tighter lines (owner 19-11-2026, K2). */
.ndx .ndx-tbl td { line-height: 1.25; }
.ndx .ndx-tbl td small { line-height: 1.2; }

/* ---- Appointment: row 40 → 30, header 34 → 30, boxes 34 → 28, buttons 34 → 30 ----------------------------------- */
.apx .apx-table th { height: 30px; }
.apx .apx-table td { height: 30px; padding-top: 2px; padding-bottom: 2px; }
.apx .apx-f input, .apx .apx-f select { height: 28px; }
.apx .apx-find .patient-search-input { height: 28px; }
.apx .apx-seg { height: 28px; }
.apx .apx-doctor, .apx .apx-date, .apx .apx-today { height: 30px; }
.apx .apx-btn { height: 30px; }

/* ---- OP Bill grid: row 38 → 30, header 34 → 30 (in-grid boxes stay 26 px; the + add row keeps its size) -------- */
.opb .ob-grid thead th { height: 30px; }
.opb .ob-grid td { height: 30px; padding-top: 2px; padding-bottom: 2px; }

/* ---- IP Patient Care: tabs 40 → 32, table rows 34 → 28, header 34/32 → 28, boxes 32 → 28, buttons 32 → 30 ------- */
.pcx .pcx-nav button { height: 32px; }
.pcx .pc-tbl th { height: 28px; }
.pcx .pc-tbl td { height: 28px; padding-top: 4px; padding-bottom: 4px; }
.pcx-a .pcx-box .pc-tbl th { height: 28px; }
.pcx-a .pcx-tbl td { height: 28px; }
.pcx .pc-f input, .pcx .pc-f select, .pcx .pc-row > input, .pcx .pc-row > select, .pcx .pc-plan-st input, .pcx .pc-plan-st select, .pcx .pc-in { height: 28px; }
.pcx-a .pc-f input, .pcx-a .pc-f select, .pcx-a .pc-in { height: 28px; }
.pcx-a .pcx-ctbl input { height: 28px; }
.pcx .pc-h select, .pcx .pc-h input[type="date"] { height: 28px; }
.pcx .pc-request-search { height: 28px; }
.pcx .ot-care-form .hospital-input { height: 28px; } /* textarea keeps height: auto (more specific rule in ip-care.css) */
.pcx .pc-btn, .pcx-a .pc-btn { height: 30px; }
.pcx .pc-a { height: 30px; }
.pcx .pc-voice select { height: 30px; }
.pcx .hospital-page-back { height: 30px; }

/* ---- New OPD Registration / Edit OP visit (desktop): boxes, gaps and section heads are already 28 / 4 / 26 px
        (29-10 clean look); the Existing Patient box 32 → 28 and the edit reason box 30 → 28 join them. Tablet keeps 36. */
@media (min-width: 901px) {
    .opd7 .ph5 .ph5-field .hospital-input { height: 28px; }
    .opd7 .opd7-reason input { height: 28px; }
}

/* ---- IP Admission / Edit Details (desktop, .ipa8): already 28 px boxes, 26 px section heads, 4 px gaps (03-11);
        the remaining boxes follow: Existing Patient 30 → 28, bed picker 32 → 28, deposit lines 40 → 32 (boxes 30 → 28),
        Edit Details reason 32 → 28. Tablet keeps 36. */
@media (min-width: 901px) {
    .ipa7 .ph5 .ph5-field--any .hospital-input { height: 28px; }
    .ipa8 .ipa7-bedbox { height: 28px; }
    .ipa8 .ipa7-bedpick > select { height: 28px; }
    .ipa8 .ipa7-bedinput { height: 24px; }
    .ipa8 .pay-lines-cols { height: 28px; }
    .ipa8 .pay-line { height: 32px; }
    .ipa8 .pay-line select, .ipa8 .pay-line input { height: 28px; }
    .ipe .ipe-reason .hospital-input { height: 28px; }
}

/* ---- Masters list + full-page Add / Edit: boxes 38 → 30 (padding 9×12 → 4×8), table cells 7×10 → 4×8,
        filter / form buttons and row links trimmed (still ≥ 28 px). Not inside popups (already 28 px there). ---------- */
html:not([data-vx-popup]) .navigation-master-filter .hospital-input,
html:not([data-vx-popup]) .department-master-filter .hospital-input,
html:not([data-vx-popup]) .doctor-master-filter .hospital-input,
html:not([data-vx-popup]) .rate-card-master-filter .hospital-input,
html:not([data-vx-popup]) .rate-type-master-filter .hospital-input,
html:not([data-vx-popup]) .service-group-master-filter .hospital-input,
html:not([data-vx-popup]) .service-master-filter .hospital-input,
html:not([data-vx-popup]) .navigation-master-form .hospital-input,
html:not([data-vx-popup]) .department-master-form .hospital-input,
html:not([data-vx-popup]) .hospital-detail-form .hospital-input,
html:not([data-vx-popup]) .hospital-configuration-form .hospital-input,
html:not([data-vx-popup]) .doctor-master-form .hospital-input,
html:not([data-vx-popup]) .hospital-users-form .hospital-input,
html:not([data-vx-popup]) .user-access-card .hospital-input,
html:not([data-vx-popup]) .rate-card-master-form .hospital-input,
html:not([data-vx-popup]) .rate-type-master-form .hospital-input,
html:not([data-vx-popup]) .service-group-master-form .hospital-input,
html:not([data-vx-popup]) .service-master-form .hospital-input {
    min-height: 30px;
    padding: 4px 8px;
}
html:not([data-vx-popup]) .navigation-master-table th,
html:not([data-vx-popup]) .navigation-master-table td,
html:not([data-vx-popup]) .department-master-table th,
html:not([data-vx-popup]) .department-master-table td,
html:not([data-vx-popup]) .doctor-master-table th,
html:not([data-vx-popup]) .doctor-master-table td,
html:not([data-vx-popup]) .hospital-users-table th,
html:not([data-vx-popup]) .hospital-users-table td,
html:not([data-vx-popup]) .rate-card-master-table th,
html:not([data-vx-popup]) .rate-card-master-table td,
html:not([data-vx-popup]) .rate-type-master-table th,
html:not([data-vx-popup]) .rate-type-master-table td,
html:not([data-vx-popup]) .service-group-master-table th,
html:not([data-vx-popup]) .service-group-master-table td,
html:not([data-vx-popup]) .service-master-table th,
html:not([data-vx-popup]) .service-master-table td {
    padding: 4px 8px;
}
html:not([data-vx-popup]) .navigation-master-table .hospital-inline-link,
html:not([data-vx-popup]) .department-master-table .hospital-inline-link,
html:not([data-vx-popup]) .doctor-master-table .hospital-inline-link,
html:not([data-vx-popup]) .hospital-users-table .hospital-inline-link,
html:not([data-vx-popup]) .rate-card-master-table .hospital-inline-link,
html:not([data-vx-popup]) .rate-type-master-table .hospital-inline-link,
html:not([data-vx-popup]) .service-group-master-table .hospital-inline-link,
html:not([data-vx-popup]) .service-master-table .hospital-inline-link {
    min-height: 28px;
    padding-top: 4px;
    padding-bottom: 4px;
}
html:not([data-vx-popup]) .navigation-master-filter .hospital-button--compact,
html:not([data-vx-popup]) .department-master-filter .hospital-button--compact,
html:not([data-vx-popup]) .doctor-master-filter .hospital-button--compact,
html:not([data-vx-popup]) .hospital-users-add-user,
html:not([data-vx-popup]) .rate-card-master-filter .hospital-button--compact,
html:not([data-vx-popup]) .rate-type-master-filter .hospital-button--compact,
html:not([data-vx-popup]) .service-group-master-filter .hospital-button--compact,
html:not([data-vx-popup]) .service-master-filter .hospital-button--compact,
html:not([data-vx-popup]) .navigation-master-form-actions .hospital-button,
html:not([data-vx-popup]) .department-master-form-actions .hospital-button,
html:not([data-vx-popup]) .doctor-master-form-actions .hospital-button,
html:not([data-vx-popup]) .hospital-users-form-actions .hospital-button,
html:not([data-vx-popup]) .rate-card-master-form-actions .hospital-button,
html:not([data-vx-popup]) .rate-type-master-form-actions .hospital-button,
html:not([data-vx-popup]) .service-group-master-form-actions .hospital-button,
html:not([data-vx-popup]) .service-master-form-actions .hospital-button {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* ---- Reports (OP / IP registration, bill, receipt, ledger…): filter boxes / buttons 32 → 28, rows 5×8 → 3×8.
        Only on screens (.hospital-app-content); the print pages are not touched. --------------------------------------- */
.hospital-app-content .apr-filter { padding-top: 6px; padding-bottom: 6px; }
.hospital-app-content .apr-in { height: 28px; }
.hospital-app-content .apr-btn { height: 28px; }
.hospital-app-content .rgr-doctor .hospital-combo-input { height: 28px; min-height: 28px; }
.hospital-app-content .rgr-t th { padding-top: 4px; padding-bottom: 4px; }
.hospital-app-content .rgr-t td { padding-top: 3px; padding-bottom: 3px; }
.hospital-app-content .report-table th { padding-top: 4px; padding-bottom: 4px; }
.hospital-app-content .report-table td { padding-top: 3px; padding-bottom: 3px; }

/* ---- OP Patient List (OPD Registration / OPD Billing / Credit Notes lists): row 34 → 30 ----------------------- */
.opl7 .opl-table td { height: 30px; }

/* ---- IP Partial / Final Bill grid: row 30 → 28 (boxes stay 24 px) ---------------------------------------------- */
.ipb .pb-grid td { height: 28px; }
