:root {
    --navy-950: #061738;
    --navy-900: #082452;
    --navy-800: #123266;
    --navy-700: #23467c;
    --lime: #b9d900;
    --lime-dark: #8bab00;
    --cyan: #24b6ca;
    --red: #d92d3f;
    --amber: #d89000;
    --green: #198754;
    --ink: #14213d;
    --muted: #68738a;
    --line: #dce1e9;
    --line-strong: #cbd2dd;
    --canvas: #f3f5f8;
    --surface: #ffffff;
    --sidebar-width: 244px;
    --radius: 5px;
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
html { min-height: 100%; }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}
button, input, select, textarea { font: inherit; }
input:not([type="hidden"]),
select,
textarea {
    max-width: 100%;
    color: var(--ink);
    background-color: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
select {
    padding-right: 34px !important;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #536278 50%), linear-gradient(135deg, #536278 50%, transparent 50%);
    background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
}
input:not([type="hidden"]):hover,
select:hover,
textarea:hover { border-color: #9eabbc; }
input:not([type="hidden"]):focus,
select:focus,
textarea:focus { outline: 0; border-color: #2b77ae; box-shadow: 0 0 0 3px rgba(43,119,174,.13); }
input[type="file"] { padding: 7px; background: #f8fafc; }
input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 11px; color: var(--navy-800); cursor: pointer; background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; font-weight: 650; }
a { color: inherit; }

.admin-layout,
.cabinet-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar,
.cabinet-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    color: #fff;
    background: var(--navy-900);
    border-right: 1px solid #051b40;
}

.sidebar-logo,
.cabinet-logo-wrap {
    display: flex;
    min-height: 112px;
    align-items: center;
    justify-content: center;
    padding: 14px 20px 12px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.brand-link { display: flex; width: 100%; align-items: center; justify-content: center; text-decoration: none; }
.brand-logo {
    display: block;
    width: 178px;
    height: 78px;
    object-fit: contain;
    object-position: center;
}
.workspace-label {
    padding: 17px 22px 8px;
    color: rgba(255,255,255,.54);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.sidebar-nav,
.cabinet-nav {
    display: grid;
    gap: 2px;
    padding: 4px 12px;
}
.sidebar-nav a,
.sidebar-nav span.disabled,
.cabinet-nav a {
    position: relative;
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    color: rgba(255,255,255,.75);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.sidebar-badge-slot { display: inline-flex; flex: 0 0 auto; margin-left: auto; }
.sidebar-badge-slot:empty { display: none; }
.sidebar-badge { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0 6px; border-radius: 11px; color: #082452; background: #d4ec69; font-size: 12px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }

/* Employee workspace: compact operational screens. */
.staff-workspace { --sidebar-width: 224px; background: #f3f6f8; }
.staff-workspace .sidebar { background: #0d3155; border-right: 0; }
.staff-workspace .sidebar-logo { min-height: 92px; padding: 9px 18px; }
.staff-workspace .brand-logo { width: 174px; height: 68px; }
.staff-workspace .workspace-label { padding-top: 12px; }
.staff-workspace .sidebar-nav { padding-inline: 10px; }
.staff-workspace .sidebar-nav a { min-height: 40px; padding: 8px 11px; border-radius: 5px; }
.staff-workspace .sidebar-nav a.active { background: #174874; }
.staff-workspace .sidebar-nav a.active::before { inset: 7px auto 7px -10px; width: 4px; background: #6bc33c; }
.staff-workspace .nav-icon { display: block; min-height: 0; padding: 0; }
.staff-workspace .topbar { min-height: 62px; padding-inline: 24px; }
.staff-workspace .content { max-width: 1720px; padding: 24px 24px 42px; }
.staff-avatar { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; background: #245382; border-radius: 50%; font-size: 13px; font-weight: 750; }
.topbar-user-name { display: grid; line-height: 1.2; }
.topbar-user-name small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.staff-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.staff-page-heading h1 { font-size: 27px; }
.page-header-actions { display: flex; align-items: center; gap: 9px; }
.page-header-actions .primary-button,
.staff-page-heading > .primary-button { white-space: nowrap; }
.request-list-heading-actions { display: flex; min-height: 40px; align-items: center; justify-content: flex-end; margin-bottom: 12px; }
.request-list-heading-actions .page-header-actions > a { min-width: 156px; justify-content: center; }
.workspace-tabs { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 0; overflow: hidden; padding-right: 16px; background: #fff; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; }
.workspace-tabs a { position: relative; flex: 0 0 auto; padding: 16px 3px 13px; color: #344057; text-decoration: none; font-weight: 650; }
.workspace-tabs a:first-child { margin-left: 18px; }
.workspace-tabs a span,
.request-scope-tabs a span { display: inline-grid; min-width: 25px; height: 21px; margin-left: 5px; padding: 0 6px; place-items: center; color: #4d5a70; background: #edf1f4; border-radius: 11px; font-size: 11px; }
.workspace-tabs a.active { color: var(--navy-900); }
.workspace-tabs a.active::after { position: absolute; inset: auto 0 -1px; height: 3px; content: ""; background: #4ba832; }
.status-workspace-tabs { gap: 8px 16px; }
.status-workspace-tabs a { padding-block: 14px 12px; font-size: 13px; }
.request-workspace-card,
.resident-registry-card { border-top: 0; border-radius: 0 0 6px 6px; }
.compact-filters { display: flex; flex-wrap: nowrap; align-items: center; gap: 9px; padding: 12px 14px; background: #fbfcfd; }
.request-filters.compact-filters { flex-wrap: nowrap; }
.compact-filters select { width: auto; min-width: 145px; }
.search-field { display: flex; min-width: 240px; flex: 1; align-items: center; gap: 8px; min-height: 38px; padding: 0 11px; background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; }
.search-field > span { color: #69768a; font-size: 21px; line-height: 1; }
.search-field input { width: 100%; min-width: 0; min-height: 0; padding: 0; border: 0; outline: 0; background: transparent; }
.text-button { padding: 8px 5px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.request-scope-tabs { display: flex; gap: 3px; padding: 0 14px 10px; overflow-x: auto; background: #fbfcfd; border-bottom: 1px solid var(--line); }
.request-scope-tabs a { flex: 0 0 auto; padding: 8px 13px; color: #344057; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; font-weight: 650; }
.request-scope-tabs a.active { color: #fff; background: #123d67; border-color: #123d67; }
.request-scope-tabs a.active span { color: #173a5c; background: #fff; }
.dense-table-wrap { width: 100%; overflow: visible; }
.request-dense-table { width: 100%; table-layout: fixed; font-size: 12.5px; }
.request-dense-table th,
.request-dense-table td { padding: 9px 8px; vertical-align: middle; overflow-wrap: anywhere; }
.request-dense-table th:nth-child(1) { width: 12%; }
.request-dense-table th:nth-child(2) { width: 14%; }
.request-dense-table th:nth-child(3) { width: 9%; }
.request-dense-table th:nth-child(4) { width: 14%; }
.request-dense-table th:nth-child(5) { width: 10%; }
.request-dense-table th:nth-child(6) { width: 10%; }
.request-dense-table th:nth-child(7) { width: 13%; }
.request-dense-table th:nth-child(8) { width: 9%; }
.request-dense-table th:nth-child(9) { width: 9%; }
.request-dense-table tbody tr:hover,
.resident-registry-table tbody tr:hover { background: #f4f9fc; }
.clickable-table-row { cursor: pointer; }
.clickable-table-row:focus { outline: 2px solid #2b77ae; outline-offset: -2px; background: #edf6fc; }
.request-number-link { font-weight: 750; white-space: nowrap; }
.request-title-link { color: #164f82; font-weight: 650; text-decoration: none; }
.meeting-cell strong,
.meeting-cell small,
.table-date,
.table-date small { display: block; }
.meeting-cell small,
.table-date small { color: var(--muted); font-size: 11px; }
.meeting-cell > span { color: #9aa3b1; }
.request-dense-table .status { max-width: 100%; white-space: normal; line-height: 1.2; }
.meeting-cell strong,
.table-date { white-space: nowrap; }

.request-hero { padding: 19px 20px 16px; margin-bottom: 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.request-hero-number { display: flex; align-items: center; gap: 10px; color: #344057; font-size: 16px; font-weight: 750; }
.request-hero-title h1 { margin: 5px 0 0; color: var(--navy-950); font-size: 24px; line-height: 1.2; }
.request-hero-meta { display: grid; grid-template-columns: 1.35fr .65fr 1fr 1fr 1fr; gap: 0; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.request-hero-meta-compact { grid-template-columns: 1.4fr .6fr 1fr 1.15fr; }
.request-hero-meta > span { display: grid; gap: 2px; min-width: 0; padding: 0 14px; border-right: 1px solid var(--line); overflow-wrap: anywhere; }
.request-hero-meta > span:first-child { padding-left: 0; }
.request-hero-meta > span:last-child { border-right: 0; }
.request-hero-meta small { color: var(--muted); font-size: 11px; }
.request-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 12px; align-items: start; }
.request-detail-main,
.request-detail-side { display: grid; gap: 12px; min-width: 0; }
.request-content-card { margin: 0; }
.split-card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.split-card-header > span small { margin-left: 5px; color: var(--muted); }
.split-card-header a { color: #175483; font-size: 13px; text-decoration: none; }
.split-card-header a.primary-button { color: #fff; }
.inline-action { position: relative; }
.inline-action > summary,
.side-action-card > summary { color: #174b77; cursor: pointer; font-size: 13px; font-weight: 650; list-style: none; }
.inline-action > summary::-webkit-details-marker,
.side-action-card > summary::-webkit-details-marker { display: none; }
.inline-action[open] > summary::after { position: fixed; inset: 0; z-index: 30; content: ""; background: rgba(6,23,56,.18); }
.inline-action > form { position: absolute; top: calc(100% + 12px); right: 0; z-index: 31; width: min(410px, 82vw); padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 14px 40px rgba(6,23,56,.18); }
.request-attachment-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow-y: auto; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 24px 70px rgba(6,23,56,.25); }
.request-attachment-dialog::backdrop { background: rgba(6,23,56,.42); }
.request-attachment-dialog-heading { display: flex; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.request-attachment-dialog-heading h2 { margin: 0; font-size: 18px; }
.request-attachment-dialog-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.request-attachment-dialog-close { align-self: start; color: var(--muted); cursor: pointer; background: none; border: 0; font-size: 24px; line-height: 1; }
.request-attachment-dialog-form { display: grid; gap: 10px; padding: 18px 20px 20px; }
.request-attachment-dialog-form label { font-size: 13px; font-weight: 650; }
.request-attachment-dialog-form input[type="file"] { width: 100%; }
.request-attachment-dialog-form small { color: var(--muted); }
.request-attachment-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 8px; }
.compact-action-form { display: grid; gap: 10px; }
.request-description { padding: 15px 17px; line-height: 1.55; }
.request-problem-card { overflow: hidden; border-left: 4px solid #2586cf; box-shadow: 0 4px 16px rgba(11,53,108,.06); }
.request-problem-card .section-card-header { color: #103b69; background: #f1f7fb; }
.request-problem-card .request-description-prominent { min-height: 76px; padding: 19px 20px; color: #10233f; background: #fff; font-size: 16px; font-weight: 520; line-height: 1.7; }
.request-attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; padding: 13px; }
.request-attachment-card { display: grid; min-width: 0; min-height: 130px; align-content: end; gap: 4px; padding: 12px; color: var(--ink); background: #f7f9fb; border: 1px solid var(--line); border-radius: 5px; text-decoration: none; }
.request-attachment-card:hover { border-color: #7da4c5; }
.request-attachment-card img { width: 100%; height: 112px; margin-bottom: 5px; object-fit: cover; border-radius: 3px; }
.request-attachment-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.request-attachment-card small { color: var(--muted); font-size: 10px; }
.file-extension { display: grid; width: 48px; height: 55px; place-items: center; color: #fff; background: #287fc5; border-radius: 4px; font-size: 10px; font-weight: 800; }
.request-comment-feed { display: grid; max-height: 520px; align-content: start; grid-auto-rows: max-content; gap: 9px; padding: 14px; overflow-y: auto; background: #f7f9fc; }
.request-comment-feed.is-empty { min-height: 104px; place-content: center; }
.request-comment { display: grid; width: min(82%, 760px); grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 11px 13px; border: 1px solid; border-radius: 8px; box-shadow: 0 1px 2px rgba(6,23,56,.04); }
.request-comment.is-public { justify-self: end; background: #edf7ff; border-color: #c9e3f5; }
.request-comment.is-internal { justify-self: end; background: #fff8df; border-color: #eadb9f; }
.request-comment.is-resident { justify-self: start; background: #edf8ed; border-color: #c7e4c8; }
.request-comment-icon { display: grid; width: 42px; height: 42px; place-items: center; color: #fff; background: #2586cf; border: 2px solid rgba(255,255,255,.88); border-radius: 50%; font-size: 15px; box-shadow: 0 1px 4px rgba(10,44,85,.18); text-decoration: none; }
.request-comment-icon.is-clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.request-comment-icon.is-clickable:hover, .request-comment-icon.is-clickable:focus-visible { transform: scale(1.08); box-shadow: 0 0 0 3px rgba(37,134,207,.2); outline: none; }
.request-comment-icon img, .resident-chat-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.request-comment.is-internal .request-comment-icon { background: #d79c12; }
.request-comment.is-resident .request-comment-icon { background: #3a9748; }
.request-comment-head { display: flex; justify-content: space-between; gap: 12px; }
.request-comment-author { color: var(--navy-900); font-weight: 700; text-decoration: none; }
.request-comment-author:hover, .request-comment-author:focus-visible { color: #1d6da3; text-decoration: underline; }
.request-comment-head span { color: var(--muted); font-size: 11px; }
.request-comment p { margin: 5px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.conversation-empty { color: var(--muted); text-align: center; }
.conversation-legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 500; }
.conversation-legend i { width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; }
.conversation-legend .public-dot { background: #2586cf; }
.conversation-legend .internal-dot { background: #d79c12; }
.request-chat-composer { display: grid; gap: 11px; padding: 14px; background: #fff; border-top: 1px solid var(--line); }
.composer-mode { display: flex; gap: 6px; padding: 0; margin: 0; border: 0; }
.composer-mode legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.composer-mode label { cursor: pointer; }
.composer-mode input { position: absolute; opacity: 0; pointer-events: none; }
.composer-mode span { display: inline-flex; min-height: 34px; align-items: center; padding: 7px 12px; color: #455269; background: #f4f6f9; border: 1px solid var(--line); border-radius: 17px; font-size: 12px; font-weight: 650; }
.composer-mode input:checked + span { color: #fff; background: var(--navy-800); border-color: var(--navy-800); }
.composer-mode label:last-child input:checked + span { color: #735500; background: #fff4c9; border-color: #e2ca70; }
.composer-message-box { overflow: hidden; background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; transition: border-color .15s ease, box-shadow .15s ease; }
.composer-message-box:focus-within { border-color: #2b77ae; box-shadow: 0 0 0 3px rgba(43,119,174,.13); }
.composer-message-box textarea { display: block; width: 100%; min-height: 68px; padding: 11px 13px 7px; resize: vertical; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.composer-message-box textarea:focus { border: 0; box-shadow: none; }
.composer-toolbar { display: flex; min-height: 48px; align-items: center; gap: 8px; padding: 5px 7px; border-top: 1px solid #edf0f4; }
.composer-icon-button { display: inline-grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; padding: 0; cursor: pointer; border: 1px solid var(--line-strong); border-radius: 50%; }
.composer-icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.composer-attachment-button { color: var(--navy-800); background: #fff; }
.composer-attachment-button:hover { background: #eef4f9; border-color: #91abc2; }
.composer-send-button { margin-left: auto; color: #fff; background: var(--navy-900); border-color: var(--navy-900); }
.composer-send-button:hover { background: var(--navy-800); border-color: var(--navy-800); }
.composer-send-button svg { width: 20px; height: 20px; }
.composer-file-name { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.request-chat-composer > small { color: var(--muted); }
.conversation-closed-note { padding: 13px 15px; color: var(--muted); background: #f7f8fa; border-top: 1px solid var(--line); text-align: center; }
.request-timeline { display: grid; padding: 12px 16px 15px; }
.timeline-event { position: relative; display: grid; grid-template-columns: 76px 14px minmax(0, 1fr); gap: 10px; min-height: 54px; }
.timeline-event::before { position: absolute; top: 15px; bottom: -8px; left: 92px; width: 1px; content: ""; background: #d8e0e8; }
.timeline-event:last-child::before { display: none; }
.timeline-event time { display: grid; align-content: start; color: var(--muted); font-size: 11px; line-height: 1.25; }
.timeline-event time span,
.timeline-event time small { display: block; }
.timeline-dot { z-index: 1; width: 10px; height: 10px; margin-top: 4px; background: #348dd1; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #9bbfda; }
.timeline-event > div { display: grid; min-width: 0; align-content: start; gap: 3px; overflow-wrap: anywhere; }
.timeline-event small { color: var(--muted); font-size: 11px; }
.next-action-card { display: grid; gap: 4px; padding: 14px 16px; color: #0d5635; background: #ecf9f0; border: 1px solid #b8dec4; border-radius: 6px; }
.next-action-card.is-pending { color: #725400; background: #fff7db; border-color: #ead68b; }
.next-action-card small { font-weight: 650; }
.next-action-card strong { font-size: 17px; }
.side-control-card,
.side-action-card { margin: 0; }
.request-person-panel { margin: 0; overflow: hidden; }
.request-person-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; color: var(--ink); background: #fff; text-decoration: none; }
.request-person-card.is-clickable { transition: background .15s ease, box-shadow .15s ease; }
.request-person-card.is-clickable:hover { background: #f3f8fc; box-shadow: inset 3px 0 #2586cf; }
.request-person-card.is-clickable:focus-visible { background: #f3f8fc; box-shadow: inset 0 0 0 2px #2586cf; outline: none; }
.request-person-avatar { display: grid; width: 58px; height: 58px; place-items: center; object-fit: cover; color: #fff; background: #2586cf; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 9px rgba(10,44,85,.18); font-size: 20px; font-weight: 750; }
.request-person-details { display: grid; gap: 3px; min-width: 0; }
.request-person-details small { color: var(--muted); font-size: 11px; }
.request-person-details strong { color: var(--navy-900); overflow-wrap: anywhere; }
.request-person-details > span { color: #54647a; font-size: 12px; }
.request-person-arrow { color: #2586cf; font-size: 20px; transition: transform .15s ease; }
.request-person-card.is-clickable:hover .request-person-arrow { transform: translateX(3px); }
.side-facts { margin: 0; }
.side-facts > div { display: grid; grid-template-columns: 42% 58%; gap: 8px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.side-facts dt { color: var(--muted); font-size: 12px; }
.side-facts dd { margin: 0; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.side-form { display: grid; gap: 9px; padding: 14px; background: #fbfcfe; border-top: 1px solid var(--line); }
.side-form label { font-size: 12px; font-weight: 650; }
.side-form select,
.side-form input,
.side-form textarea { width: 100%; min-height: 42px; padding: 9px 11px; }
.side-form textarea { min-height: 96px; resize: vertical; }
.side-form button { width: 100%; }
.side-action-card > summary { padding: 14px 16px; }
.side-action-body { border-top: 1px solid var(--line); }
.side-action-body > p,
.side-note { margin: 0; padding: 13px; }

/* Request operator workspace: fixed controls with an independently scrolling case file. */
.request-detail-toolbar { display: flex; flex-wrap: wrap; min-height: 28px; align-items: center; justify-content: space-between; gap: 10px 16px; }
.request-detail-toolbar .cabinet-back { margin: 0; }
.request-save-notice { color: #17683f; font-size: 12px; font-weight: 700; }
.request-detail-screen .request-hero { margin-bottom: 0; padding-block: 15px 13px; }
.request-detail-screen .request-hero-title { text-align: center; }
.request-detail-screen .request-hero-number { justify-content: center; }
.request-detail-screen .request-hero-title h1 { max-width: 920px; margin: 5px auto 0; }
.request-detail-screen .request-hero-meta { margin-top: 13px; padding-top: 11px; text-align: center; }
.request-detail-screen .request-problem-card .section-card-header { justify-content: center; text-align: center; }
.request-detail-screen .request-description-prominent { max-width: 980px; margin: 0 auto; text-align: left; }
.request-detail-main,
.request-detail-side { scrollbar-width: thin; scrollbar-color: #b8c4d1 transparent; }
.request-detail-main { align-content: start; grid-auto-rows: max-content; padding-right: 5px; }
.request-detail-side { padding-right: 3px; }
.request-detail-main::-webkit-scrollbar,
.request-detail-side::-webkit-scrollbar { width: 7px; }
.request-detail-main::-webkit-scrollbar-thumb,
.request-detail-side::-webkit-scrollbar-thumb { background: #b8c4d1; border-radius: 7px; }
.request-chat-composer { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -8px 18px rgba(12, 40, 75, .05); }

.request-operator-panel { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 5px 18px rgba(12, 40, 75, .06); }
.request-operator-heading { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.request-operator-heading > div { display: grid; gap: 1px; }
.request-operator-heading small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.request-operator-heading strong { color: var(--navy-950); font-size: 16px; }
.request-operator-time { display: grid; gap: 2px; padding: 10px 14px; color: #0d5635; background: #eff8f2; border-bottom: 1px solid #d2e9d9; }
.request-operator-time.is-pending { color: #725400; background: #fff9e8; border-color: #eee0aa; }
.request-operator-time small { font-size: 10px; font-weight: 700; text-transform: uppercase; }
.request-operator-time strong { font-size: 14px; }
.request-operator-person { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.request-operator-person .request-person-avatar { width: 48px; height: 48px; border-width: 2px; font-size: 17px; }
.request-quick-controls { display: grid; gap: 11px; padding: 13px 14px 14px; }
.request-quick-control { display: grid; gap: 5px; margin: 0; }
.request-quick-control label { color: #344057; font-size: 11px; font-weight: 700; }
.request-quick-control > div { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 6px; }
.request-quick-control select { width: 100%; min-width: 0; min-height: 38px; padding: 7px 32px 7px 10px; font-size: 13px; }
.request-quick-control button { display: grid; width: 38px; min-height: 38px; place-items: center; padding: 0; color: #fff; cursor: pointer; background: var(--navy-800); border: 1px solid var(--navy-800); border-radius: 7px; font-size: 16px; font-weight: 800; }
.request-quick-control button:hover { background: var(--navy-700); }
.request-quick-control button:focus-visible { outline: 3px solid rgba(43,119,174,.22); outline-offset: 1px; }
.request-operator-facts { display: grid; gap: 8px; padding: 13px 14px; margin: 0; }
.request-operator-facts > div { display: flex; justify-content: space-between; gap: 12px; }
.request-operator-facts dt { color: var(--muted); font-size: 12px; }
.request-operator-facts dd { margin: 0; text-align: right; font-size: 12px; font-weight: 700; }
.request-operator-action { border-top: 1px solid var(--line); }
.request-operator-action > summary { display: flex; min-height: 43px; align-items: center; justify-content: space-between; padding: 10px 14px; color: #174b77; cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; }
.request-operator-action > summary::-webkit-details-marker { display: none; }
.request-operator-action > summary:hover { background: #f6f9fc; }
.request-operator-action > summary span { color: #8190a4; font-size: 21px; line-height: 1; transition: transform .15s ease; }
.request-operator-action[open] > summary span { transform: rotate(90deg); }
.request-operator-action .side-action-body { padding: 0 14px 13px; background: #fbfcfe; border-top: 0; }
.request-operator-action .side-action-body > p { padding: 10px 0 2px; font-size: 12px; }
.request-operator-action .side-form { gap: 7px; padding: 10px 0 0; background: transparent; border: 0; }
.request-operator-action .side-form label { font-size: 11px; }
.request-operator-action .side-form input,
.request-operator-action .side-form textarea { min-height: 38px; font-size: 12px; }
.request-operator-action .side-form textarea { min-height: 80px; }
.request-operator-action .side-form button { min-height: 36px; font-size: 12px; }
.request-operator-note { display: grid; gap: 3px; padding: 12px 14px; color: #725400; background: #fff9e8; border-top: 1px solid #eee0aa; }
.request-operator-note strong { font-size: 12px; }
.request-operator-note small { font-size: 11px; }

@media (min-width: 981px) {
    body.request-detail-workspace { height: 100vh; overflow: hidden; }
    .request-detail-workspace .admin-main { height: 100vh; min-height: 0; }
    .request-detail-workspace .content { height: calc(100vh - 62px); max-width: none; padding: 14px 20px 18px; overflow: hidden; }
    .request-detail-screen { display: grid; height: 100%; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); gap: 10px; }
    .request-detail-screen .request-detail-layout { min-height: 0; align-items: stretch; }
    .request-detail-screen .request-detail-main,
    .request-detail-screen .request-detail-side { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}

.resident-registry-table { width: 100%; table-layout: fixed; font-size: 12px; }
.resident-registry-table th,
.resident-registry-table td { padding: 10px 9px; overflow-wrap: anywhere; }
.resident-registry-table th:nth-child(1) { width: 22%; }
.resident-registry-table th:nth-child(2) { width: 21%; }
.resident-registry-table th:nth-child(3) { width: 25%; }
.resident-registry-table th:nth-child(4) { width: 10%; }
.resident-registry-table th:nth-child(5) { width: 13%; }
.resident-registry-table th:nth-child(6) { width: 9%; }
.resident-registry-table.has-status-column th:nth-child(1) { width: 20%; }
.resident-registry-table.has-status-column th:nth-child(2) { width: 19%; }
.resident-registry-table.has-status-column th:nth-child(3) { width: 23%; }
.resident-registry-table.has-status-column th:nth-child(4) { width: 10%; }
.resident-registry-table.has-status-column th:nth-child(5) { width: 15%; }
.resident-registry-table.has-status-column th:nth-child(6) { width: 13%; }
.resident-sort-link { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: inherit; text-decoration: none; }
.resident-sort-link b { color: #8491a3; font-size: 12px; font-weight: 700; }
.resident-sort-link:hover,
.resident-registry-table th[aria-sort="ascending"] .resident-sort-link,
.resident-registry-table th[aria-sort="descending"] .resident-sort-link { color: var(--navy-800); }
.resident-registry-table th[aria-sort="ascending"] .resident-sort-link b,
.resident-registry-table th[aria-sort="descending"] .resident-sort-link b { color: #1684cc; }
.resident-registry-table tr.is-selected { background: #eaf4ff; }
.resident-row-link { display: flex; align-items: center; gap: 8px; color: #173f68; text-decoration: none; }
.person-icon { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; color: #1d5f92; background: #eaf2f8; border-radius: 50%; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(6,23,56,.24); }
.resident-drawer { position: fixed; inset: 0 0 0 auto; z-index: 51; width: min(470px, 94vw); padding: 20px 22px 28px; overflow-y: auto; background: #fff; box-shadow: -12px 0 38px rgba(6,23,56,.18); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 4px 0 8px; font-size: 19px; }
.drawer-header > div > small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.drawer-close { color: #68738a; font-size: 28px; line-height: 1; text-decoration: none; }
.drawer-section { padding: 17px 0; border-bottom: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 11px; font-size: 14px; }
.drawer-section p { margin: 0; }
.drawer-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.drawer-section-heading h3 { margin: 0; }
.resident-edit-toggle { flex: 0 0 auto; padding: 5px 8px; color: var(--navy-800); background: #f3f7fa; border: 1px solid #cdd8e3; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 700; }
.resident-edit-toggle:hover { background: #eaf2f8; border-color: #9fb5c8; }
.resident-edit-toggle[hidden],
[data-resident-profile-summary][hidden],
.resident-profile-form[hidden] { display: none !important; }
.resident-profile-form { display: grid; gap: 12px; padding: 14px; background: #f8fafc; border: 1px solid var(--line); border-radius: 7px; }
.resident-card-actions { display: flex; padding: 14px 0 0; }
.resident-card-actions > a { width: 100%; justify-content: space-between; }
.resident-password-fields { display: grid; gap: 10px; margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.resident-password-fields > strong { font-size: 13px; }
.resident-password-fields > small { margin-top: -6px; color: var(--muted); font-size: 11px; }
.resident-profile-actions { display: flex; gap: 8px; padding-top: 2px; }
.resident-profile-actions > button { flex: 1; }
.icon-detail-list { margin: 0; }
.icon-detail-list > div { display: grid; grid-template-columns: 43% 57%; gap: 8px; padding: 7px 0; }
.icon-detail-list dt { color: var(--muted); font-size: 12px; }
.icon-detail-list dd { margin: 0; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.drawer-form { display: grid; gap: 8px; margin-top: 12px; }
.drawer-form label { font-size: 12px; font-weight: 650; }
.drawer-form-field { display: grid; gap: 6px; }
.drawer-form-field input, .drawer-form-field select, .drawer-form-field textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: #0b2447; background: #f8fafc; border: 1px solid #cbd6e2; border-radius: 7px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.drawer-form-field input:focus, .drawer-form-field select:focus, .drawer-form-field textarea:focus { background: #fff; border-color: #2586cf; box-shadow: 0 0 0 3px rgba(37,134,207,.12); outline: none; }
.drawer-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.drawer-identity small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.resident-drawer-avatar { width: 66px; height: 66px; flex: 0 0 66px; object-fit: cover; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 9px rgba(10,44,85,.18); }
.resident-drawer-avatar.is-placeholder { display: grid; place-items: center; color: #fff; background: #2586cf; font-size: 24px; font-weight: 750; }
.request-category-tabs { display: flex; gap: 7px; margin: 10px 0 12px; padding-bottom: 3px; overflow-x: auto; scrollbar-width: thin; }
.request-category-tabs a { flex: 0 0 auto; padding: 8px 12px; color: #42536c; background: #fff; border: 1px solid #d4dde8; border-radius: 999px; font-size: 12px; font-weight: 650; text-decoration: none; }
.request-category-tabs a:hover { border-color: #8fb7d8; color: #0b356c; }
.request-category-tabs a.active { color: #fff; background: #0b356c; border-color: #0b356c; }
.table-resident-avatar { width: 36px; height: 36px; flex: 0 0 36px; object-fit: cover; border-radius: 50%; }
.table-resident-avatar.is-placeholder { display: grid; place-items: center; color: #fff; background: #2586cf; font-size: 14px; font-weight: 750; }
.psd-resident-summary { padding: 18px 20px; }
.psd-resident-identity { display: flex; align-items: center; gap: 14px; }
.psd-resident-identity > div { flex: 1; min-width: 0; }
.psd-resident-identity h2 { margin: 3px 0 4px; font-size: 21px; }
.psd-resident-identity p, .psd-resident-identity small { margin: 0; color: var(--muted); }
.rejection-form { padding-top: 14px; border-top: 1px dashed var(--line); }
.drawer-history { display: grid; gap: 8px; }
.drawer-history > div { display: grid; gap: 2px; padding: 9px 10px; background: #f7f9fb; border-radius: 4px; }
.drawer-history small { color: var(--muted); font-size: 11px; }

.export-dropdown,
.inline-create,
.house-photo-action { position: relative; }
.export-dropdown > summary,
.inline-create > summary { display: inline-flex; min-height: 38px; align-items: center; padding: 7px 13px; cursor: pointer; background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; font-weight: 650; list-style: none; }
.inline-create > summary { color: #fff; background: #2f8a24; border-color: #2f8a24; }
.export-dropdown > summary::-webkit-details-marker,
.inline-create > summary::-webkit-details-marker { display: none; }
.export-dropdown > div,
.inline-create > form { position: absolute; top: calc(100% + 6px); right: 0; z-index: 25; min-width: 180px; padding: 7px; background: #fff; border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 10px 28px rgba(6,23,56,.15); }
.export-dropdown > div a { display: block; padding: 8px 10px; text-decoration: none; border-radius: 3px; }
.export-dropdown > div a:hover { background: #f1f5f8; }
.inline-create > form { width: min(420px, calc(100vw - 32px)); padding: 0; overflow: hidden; border-radius: 7px; }
.house-create-form { gap: 0; }
.house-create-heading { display: grid; gap: 3px; padding: 16px 18px 13px; background: #f7f9fb; border-bottom: 1px solid var(--line); }
.house-create-heading strong { color: var(--navy-950); font-size: 16px; }
.house-create-heading small { color: var(--muted); font-size: 12px; }
.house-create-form > label { display: grid; gap: 7px; padding: 13px 18px 0; color: var(--ink); font-size: 13px; font-weight: 650; }
.house-create-form > label span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.house-create-form > label b { color: #b42335; font-weight: 750; }
.house-create-form > label em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 400; }
.house-create-form input { width: 100%; min-height: 42px; padding: 9px 11px; background: #fff; border: 1px solid #bdc9d6; border-radius: 5px; outline: 0; }
.house-create-form input:focus { border-color: #2b77ae; box-shadow: 0 0 0 3px rgba(43,119,174,.13); }
.house-create-form input::placeholder { color: #98a2b1; }
.house-create-actions { display: flex; justify-content: flex-end; margin-top: 15px; padding: 13px 18px 16px; background: #fbfcfd; border-top: 1px solid var(--line); }
.house-create-actions .primary-button { min-width: 145px; }
.houses-workspace { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 12px; align-items: stretch; }
.house-list-panel,
.house-overview-panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.house-list-title { display: flex; align-items: center; justify-content: space-between; padding: 15px; border-bottom: 1px solid var(--line); }
.house-list-title span { color: var(--muted); font-size: 12px; }
.house-search { padding: 11px; border-bottom: 1px solid var(--line); }
.house-search .search-field { min-width: 0; }
.house-list-scroll { max-height: calc(100vh - 260px); overflow-y: auto; }
.house-list-row { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 12px 13px; color: #26364c; border-bottom: 1px solid #edf0f3; text-decoration: none; }
.house-list-row[hidden] { display: none; }
.house-list-row:hover { background: #f6fafc; }
.house-list-row.active { background: #edf8eb; box-shadow: inset 3px 0 #37a23b; }
.house-list-row > span:last-child { display: grid; min-width: 0; gap: 3px; }
.house-list-row strong { overflow-wrap: anywhere; }
.house-list-row small { color: var(--muted); }
.house-list-icon { color: #3b6d96; font-size: 20px; }
.house-overview-panel { padding: 14px; }
.house-overview-hero { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; }
.house-photo { position: relative; min-height: 136px; background: #edf2f4; border-radius: 5px; }
.house-photo > img { display: block; width: 100%; height: 136px; object-fit: cover; border-radius: 5px; }
.house-photo-placeholder { display: grid; height: 136px; place-content: center; justify-items: center; color: #7990a3; }
.house-photo-placeholder span { font-size: 44px; line-height: 1; }
.house-photo-action { position: absolute; inset: auto 7px 7px; z-index: 2; }
.house-photo-action > summary { display: inline-flex; padding: 6px 9px; color: #fff; cursor: pointer; background: rgba(8,36,82,.88); border-radius: 4px; font-size: 11px; list-style: none; }
.house-photo-action[open] > summary::after { position: fixed; inset: 0; z-index: 60; content: ""; background: rgba(6,23,56,.35); }
.house-photo-action > form { position: fixed; inset: 50% auto auto 50%; z-index: 61; display: grid; gap: 10px; width: min(390px, calc(100vw - 32px)); padding: 18px; transform: translate(-50%, -50%); background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 18px 55px rgba(6,23,56,.28); }
.house-photo-action > form small { color: var(--muted); }
.house-overview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-top: 4px; }
.house-overview-heading h2 { margin: 0; font-size: 23px; }
.house-overview-heading p { margin: 3px 0 9px; color: var(--muted); }
.house-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 13px; }
.house-stat-row > div,
.house-stat-row > a { display: grid; grid-template-columns: 38px auto; grid-template-rows: auto auto; column-gap: 9px; padding: 10px; color: inherit; background: #f7f9fb; border: 1px solid #e7ebef; border-radius: 5px; text-decoration: none; }
.house-stat-row > a:hover { background: #eef5f9; border-color: #cbd8e2; }
.stat-icon { display: grid; grid-row: 1 / 3; width: 36px; height: 36px; place-items: center; border-radius: 4px; font-size: 19px; }
.stat-icon svg { width: 19px; height: 19px; }
.stat-icon.green { color: #24813b; background: #e8f7eb; }
.stat-icon.blue { color: #197bc2; background: #e8f3fc; }
.stat-icon.navy { color: #244c78; background: #e9eef5; }
.stat-icon.amber { color: #b76b07; background: #fff1df; }
.house-stat-row strong { font-size: 18px; line-height: 1.1; }
.house-stat-row small { color: var(--muted); font-size: 11px; }
.house-section-tabs { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 14px; padding: 0 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 5px 5px 0 0; }
.house-section-tabs a { position: relative; padding: 13px 2px 11px; color: #4a566b; text-decoration: none; font-weight: 650; }
.house-section-tabs a.active::after { position: absolute; inset: auto 0 -1px; height: 3px; content: ""; background: #36a03d; }
.house-section-tabs a span { display: inline-grid; min-width: 21px; height: 20px; margin-left: 4px; padding: 0 6px; place-items: center; color: var(--muted); background: #edf1f4; border-radius: 10px; font-size: 10px; }
.house-documents-section { padding: 14px; border: 1px solid var(--line); border-radius: 0 0 5px 5px; }
.house-documents-section h3 { margin: 0; }
.house-documents-section p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.house-document-table { margin-top: 12px; table-layout: fixed; font-size: 12px; }
.file-type-small { display: inline-flex; padding: 2px 5px; color: #245c8a; background: #e8f2fa; border-radius: 3px; font-size: 10px; font-weight: 750; }
.house-related-table { width: 100%; margin-top: 12px; table-layout: fixed; }
.house-related-table th,
.house-related-table td { padding: 9px 8px; white-space: normal; overflow-wrap: anywhere; }
.house-related-table .status { max-width: 100%; white-space: normal; line-height: 1.2; }
.house-request-table th:nth-child(1) { width: 8%; }
.house-request-table th:nth-child(2) { width: 23%; }
.house-request-table th:nth-child(3) { width: 9%; }
.house-request-table th:nth-child(4) { width: 21%; }
.house-request-table th:nth-child(5) { width: 20%; }
.house-request-table th:nth-child(6) { width: 19%; }

.dashboard-stat-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 13px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.dashboard-stat-strip a { display: grid; gap: 2px; padding: 14px 17px; border-right: 1px solid var(--line); text-decoration: none; }
.dashboard-stat-strip a:last-child { border-right: 0; }
.dashboard-stat-strip a:hover { background: #f7fafb; }
.dashboard-stat-strip span { color: var(--muted); font-size: 12px; }
.dashboard-stat-strip strong { color: var(--navy-900); font-size: 24px; line-height: 1.1; }
.resident-dashboard-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.resident-max-content { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; }
.resident-max-icon { display: grid; width: 42px; height: 42px; place-items: center; color: #1c7840; background: #eaf5ec; border: 1px solid #d5ead8; border-radius: 10px; font-size: 23px; font-weight: 750; }
.resident-max-copy { display: grid; min-width: 0; justify-items: start; gap: 5px; }
.resident-max-copy p { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.resident-max-status { display: inline-flex; align-items: center; gap: 7px; color: #805900; font-size: 14px; font-weight: 700; }
.resident-max-status::before { width: 7px; height: 7px; flex: 0 0 7px; content: ""; background: #d9a32c; border-radius: 50%; }
.resident-max-status.is-connected { color: #197844; }
.resident-max-status.is-connected::before { background: #239c58; }
.resident-max-action { margin: 0; }
.resident-max-action .secondary-button { white-space: nowrap; }
.resident-form-card { padding: 18px; }
.dashboard-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 13px; align-items: start; }
.dashboard-request-card { margin: 0; }
.dashboard-request-card .section-card-header small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
.dashboard-request-table { width: 100%; table-layout: fixed; font-size: 12px; }
.dashboard-request-table td { vertical-align: middle; }
.dashboard-request-table td small { display: block; margin-top: 2px; color: var(--muted); }
.dashboard-request-table th:nth-child(1) { width: 34%; }
.dashboard-request-table th:nth-child(2) { width: 30%; }
.dashboard-request-table th:nth-child(3) { width: 21%; }
.dashboard-request-table th:nth-child(4) { width: 15%; }
.dashboard-side { display: grid; gap: 13px; }
.dashboard-side .section-card { margin: 0; }
.attention-card > a { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; padding: 12px 13px; border-bottom: 1px solid var(--line); text-decoration: none; }
.attention-card > a:last-child { border-bottom: 0; }
.attention-card > a > span:nth-child(2) { display: grid; }
.attention-card small { color: var(--muted); font-size: 11px; }
.attention-card b { font-size: 18px; }
.attention-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; font-weight: 800; }
.attention-icon.amber { color: #9d6100; background: #fff1d3; }
.attention-icon.green { color: #277d34; background: #e8f7eb; }
.quick-links-card > a { display: flex; justify-content: space-between; padding: 11px 13px; border-bottom: 1px solid var(--line); text-decoration: none; }
.quick-links-card > a:last-child { border-bottom: 0; }

@media (max-width: 1180px) {
    .request-dense-table th:nth-child(3), .request-dense-table td:nth-child(3),
    .request-dense-table th:nth-child(9), .request-dense-table td:nth-child(9) { display: none; }
    .request-detail-layout { grid-template-columns: minmax(0, 1fr) 310px; }
    .houses-workspace { grid-template-columns: 270px minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .compact-filters,
    .request-filters.compact-filters { flex-wrap: wrap; }
    .compact-filters .search-field { flex-basis: 100%; }
    .request-detail-layout,
    .dashboard-workspace,
    .houses-workspace { grid-template-columns: 1fr; }
    .request-hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
    .request-hero-meta > span { border-right: 0; padding-left: 0; }
    .request-detail-screen { display: block; }
    .request-detail-screen .request-hero { margin-bottom: 12px; }
    .request-detail-toolbar { margin-bottom: 10px; }
    .request-detail-main,
    .request-detail-side { padding-right: 0; overflow: visible; }
    .request-detail-side { margin-top: 12px; }
    .request-chat-composer { position: static; box-shadow: none; }
    .house-list-scroll { max-height: 330px; }
    .dashboard-stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-stat-strip a { border-bottom: 1px solid var(--line); }
}
@media (max-width: 680px) {
    .staff-page-heading { align-items: flex-start; flex-direction: column; }
    .page-header-actions { width: 100%; flex-wrap: wrap; }
    .workspace-tabs { gap: 20px; }
    .request-dense-table th:nth-child(5), .request-dense-table td:nth-child(5),
    .request-dense-table th:nth-child(6), .request-dense-table td:nth-child(6),
    .resident-registry-table th:nth-child(2), .resident-registry-table td:nth-child(2),
    .resident-registry-table th:nth-child(4), .resident-registry-table td:nth-child(4) { display: none; }
    .request-dense-table thead { display: none; }
    .request-dense-table tbody { display: grid; }
    .request-dense-table tbody tr { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(118px, auto); grid-template-rows: auto auto; padding: 10px 8px; border-bottom: 1px solid #e7eaf0; }
    .request-dense-table tbody tr:last-child { border-bottom: 0; }
    .request-dense-table tbody td { display: block; width: auto; padding: 4px 6px; border: 0; overflow-wrap: anywhere; }
    .request-dense-table tbody td:nth-child(1) { grid-column: 1; grid-row: 1 / 3; align-self: center; }
    .request-dense-table tbody td:nth-child(2) { grid-column: 2; grid-row: 1; }
    .request-dense-table tbody td:nth-child(4) { grid-column: 2; grid-row: 2; color: var(--muted); }
    .request-dense-table tbody td:nth-child(7) { grid-column: 3; grid-row: 1; justify-self: end; }
    .request-dense-table tbody td:nth-child(8) { grid-column: 3; grid-row: 2; justify-self: end; text-align: right; }
    .request-dense-table tbody td[colspan] { grid-column: 1 / -1; grid-row: 1; }
    .resident-registry-table th:nth-child(1) { width: 32%; }
    .resident-registry-table th:nth-child(3) { width: 31%; }
    .resident-registry-table th:nth-child(5) { width: 17%; }
    .resident-registry-table th:nth-child(6) { width: 20%; }
    .house-overview-hero { grid-template-columns: 1fr; }
    .house-photo > img, .house-photo-placeholder { height: 190px; }
    .house-stat-row { grid-template-columns: repeat(2, 1fr); }
    .dashboard-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-request-table th:nth-child(2), .dashboard-request-table td:nth-child(2) { display: none; }
    .dashboard-request-table th:nth-child(1) { width: 48%; }
    .dashboard-request-table th:nth-child(3) { width: 30%; }
    .dashboard-request-table th:nth-child(4) { width: 22%; }
    .request-comment { width: 100%; }
    .request-comment-head { align-items: flex-start; flex-direction: column; gap: 2px; }
    .conversation-legend { display: none; }
    .composer-mode { flex-wrap: wrap; }
    .composer-input-row { grid-template-columns: 1fr; }
    .composer-input-row .primary-button { width: 100%; }
}
.sidebar-nav a:hover,
.cabinet-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-nav a.active,
.cabinet-nav a.active {
    color: #fff;
    background: var(--navy-800);
}
.sidebar-nav a.active::before,
.cabinet-nav a.active::before {
    position: absolute;
    inset: 8px auto 8px -12px;
    width: 3px;
    content: "";
    background: var(--lime);
}
.sidebar-nav span.disabled { opacity: .45; cursor: default; }
.nav-icon {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .86;
}
.sidebar-footer {
    margin-top: auto;
    padding: 16px 22px 20px;
    color: rgba(255,255,255,.48);
    font-size: 11px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer a { color: rgba(255,255,255,.8); display: inline-block; margin-top: 8px; text-underline-offset: 3px; }
.request-result[hidden] { display: none !important; }
.request-result .request-files-body, .resident-result-card .request-files-body { padding: 0 16px 14px; border-top: 0; }
.request-result > summary { list-style: none; cursor: pointer; }
.request-result > summary::-webkit-details-marker { display: none; }
.business-legal-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; padding: 18px 24px; font-size: 12px; }
.business-legal-footer a { color: var(--navy-700); text-underline-offset: 3px; }
.resident-service-contacts-body { padding: 14px 18px; }
.resident-service-contacts-body p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.resident-duty-phones { display: flex; flex-wrap: wrap; gap: 10px; }
.resident-duty-heading { display: block; margin-bottom: 10px; font-size: 13px; }
.resident-duty-phones a { flex: 1 1 240px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.resident-duty-phones small { display: block; font-size: 11px; color: var(--muted); }
.resident-duty-phones strong { white-space: nowrap; }

.admin-main,
.cabinet-main-shell {
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}
.topbar,
.cabinet-header {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 30px;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--line);
}
.topbar-context { min-width: 0; }
.topbar-eyebrow {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.topbar-title {
    overflow: hidden;
    margin-top: 2px;
    font-size: 17px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-user,
.cabinet-user { display: flex; align-items: center; gap: 12px; }
.topbar-user-name,
.cabinet-user-name { color: #3b465d; font-size: 13px; white-space: nowrap; }
.notification-button {
    position: relative;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    color: var(--navy-800);
    text-decoration: none;
    background: #f5f7fa;
    border: 1px solid var(--line);
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
}
.profile-topbar-link { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.profile-topbar-link:hover .topbar-user-name strong { text-decoration: underline; }
.profile-avatar { display: block; object-fit: cover; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 18px; }
.profile-photo-preview { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; }
.profile-photo-placeholder { display: grid; width: 120px; height: 120px; place-items: center; color: #fff; background: var(--navy-800); border-radius: 50%; font-size: 48px; }
.profile-card-body { display: grid; gap: 16px; padding: 20px; }
.profile-card-body .form-group { max-width: 580px; }
.profile-card-body .primary-button, .profile-card-body .secondary-button { justify-self: start; }
.profile-card-body input:not([type="hidden"]) { width: 100%; }
.profile-photo-trigger { position: relative; width: 120px; height: 120px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; overflow: hidden; }
.profile-photo-trigger:focus-visible { outline: 3px solid #1d78bc; outline-offset: 4px; }
.profile-camera-overlay { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(8, 28, 59, .65); font-size: 28px; opacity: 0; transition: opacity .15s; }
.profile-camera-overlay svg { width: 30px; height: 30px; }
.profile-photo-trigger:hover .profile-camera-overlay, .profile-photo-trigger:focus-visible .profile-camera-overlay { opacity: 1; }
.profile-photo-help { margin: -8px 0 0; color: var(--muted); font-size: 13px; }
.profile-photo-editor { width: min(440px, calc(100vw - 28px)); max-height: calc(100vh - 24px); padding: 22px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 80px rgba(5, 22, 49, .3); overflow-y: auto; }
.profile-photo-editor::backdrop { background: rgba(5, 20, 42, .68); }
.photo-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.photo-editor-heading h2 { margin: 0; font-size: 20px; }
.photo-editor-heading button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--navy-800); font-size: 27px; cursor: pointer; }
.profile-photo-editor p { margin: 8px 0 16px; color: var(--muted); font-size: 14px; }
.photo-editor-viewport { position: relative; width: min(300px, 100%); margin: 0 auto; border-radius: 12px; overflow: hidden; touch-action: none; cursor: grab; }
.photo-editor-viewport:active { cursor: grabbing; }
.photo-editor-viewport canvas { display: block; width: 100%; height: auto; }
.photo-editor-viewport::after { content: ''; position: absolute; inset: 0; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 150px rgba(7, 23, 47, .36); pointer-events: none; }
.photo-editor-zoom { display: grid; gap: 8px; margin: 18px 0; font-weight: 600; }
.photo-editor-zoom input { width: 100%; }
.photo-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 820px) { .profile-grid { grid-template-columns: 1fr; } }
.resident-unit-with-photo { min-height: 82px; }
.notification-button::-webkit-details-marker { display: none; }
.notification-button:hover { border-color: var(--navy-700); }
.notification-button svg { width: 18px; height: 18px; }
.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    color: #fff;
    background: var(--red);
    border: 2px solid #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}
.notification-center { position: relative; }
.notification-popover {
    position: fixed;
    inset: 62px 0 0 auto;
    z-index: 45;
    display: flex;
    width: min(410px, 100vw);
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-left: 1px solid var(--line);
    box-shadow: -16px 14px 38px rgba(6, 23, 56, .16);
    animation: notification-panel-in .16s ease-out;
}
@keyframes notification-panel-in {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
}
.notification-popover-header { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.notification-popover-header > div { display: grid; gap: 2px; }
.notification-popover-header strong { color: var(--navy-950); font-size: 20px; }
.notification-popover-header small { color: var(--muted); font-size: 12px; }
.notification-popover-header button { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; color: var(--muted); cursor: pointer; background: transparent; border: 0; border-radius: 50%; font-size: 23px; line-height: 1; }
.notification-popover-header button:hover { color: var(--navy-900); background: #eef2f6; }
.notification-read-all { padding: 7px 12px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.notification-read-all button { width: 100%; min-height: 30px; padding: 5px 10px; color: #315272; background: #fff; border: 1px solid #d4dee8; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 700; }
.notification-read-all button:hover { color: var(--navy-900); background: #eef5fa; border-color: #a9bed0; }
.browser-notification-enable {
    width: calc(100% - 24px);
    min-height: 34px;
    margin: 9px 12px 2px;
    padding: 6px 11px;
    color: #24577f;
    cursor: pointer;
    background: #f2f7fb;
    border: 1px solid #cddce8;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}

/* Calm, auto-hiding scrollbars across the authenticated portal. */
html.portal-scrollbars,
html.portal-scrollbars body,
html.portal-scrollbars * {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

html.portal-scrollbars::-webkit-scrollbar,
html.portal-scrollbars *::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

html.portal-scrollbars::-webkit-scrollbar-track,
html.portal-scrollbars *::-webkit-scrollbar-track {
    background: transparent;
}

html.portal-scrollbars::-webkit-scrollbar-thumb,
html.portal-scrollbars *::-webkit-scrollbar-thumb {
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    background-clip: padding-box;
    transition: background-color 220ms ease;
}

html.portal-scrollbars.is-scrollbar-active,
html.portal-scrollbars .is-scrollbar-active {
    scrollbar-color: #c8d0d9 transparent;
}

html.portal-scrollbars.is-scrollbar-active::-webkit-scrollbar-thumb,
html.portal-scrollbars .is-scrollbar-active::-webkit-scrollbar-thumb {
    background-color: #c8d0d9;
}

html.portal-scrollbars.is-scrollbar-active::-webkit-scrollbar-thumb:hover,
html.portal-scrollbars .is-scrollbar-active::-webkit-scrollbar-thumb:hover {
    background-color: #aeb9c5;
}

.person-preview-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    align-items: center;
    gap: 8px;
}

.person-preview-copy-value,
.person-preview-copy-button {
    appearance: none;
    border: 0;
    font: inherit;
}

.person-preview-copy-value {
    min-width: 0;
    padding: 0;
    color: #ffffff;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    overflow-wrap: anywhere;
    cursor: copy;
}

.person-preview-copy-button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 9px;
    color: #d8e6f3;
    background: rgb(255 255 255 / 8%);
    cursor: copy;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.person-preview-copy-button:hover,
.person-preview-copy-button:focus-visible,
.person-preview-detail.is-copied .person-preview-copy-button {
    border-color: rgb(61 207 194 / 55%);
    color: #6ee7d8;
    background: rgb(61 207 194 / 14%);
    outline: none;
}

.person-preview-copy-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.person-preview-detail .person-preview-copy-status {
    display: block;
    color: #6ee7d8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

.person-preview-detail .person-preview-copy-status:empty {
    display: none;
}
.browser-notification-enable:hover { background: #e8f2f9; border-color: #a9c2d6; }
.notification-popover-list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.notification-popover-empty { display: grid; min-height: 240px; place-content: center; justify-items: center; gap: 5px; padding: 24px; color: var(--muted); text-align: center; }
.notification-popover-empty > span { display: grid; width: 42px; height: 42px; place-items: center; color: var(--green); background: #eaf7ee; border-radius: 50%; font-size: 20px; }
.notification-popover-empty strong { color: var(--ink); }
.notification-entry { margin: 0; border-bottom: 1px solid #e8ecf1; }
.notification-entry > button { position: relative; display: grid; width: 100%; grid-template-columns: 38px minmax(0, 1fr) 8px; gap: 11px; align-items: start; padding: 15px 17px; color: inherit; cursor: pointer; background: #fff; border: 0; text-align: left; }
.notification-entry.is-unread > button { background: #f5f9fd; }
.notification-entry > button:hover { background: #eef5fa; }
.notification-entry > button:disabled { cursor: default; }
.notification-entry.is-read { opacity: .7; }
.notification-entry-avatar { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; background: #315b84; border-radius: 50%; font-size: 12px; font-weight: 750; }
.notification-entry-content { display: grid; min-width: 0; gap: 5px; }
.notification-entry-action { display: grid; min-width: 0; gap: 1px; color: #4f5b70; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.notification-entry-action strong { color: var(--ink); font-size: 12px; }
.notification-entry-action > span { display: block; }
.notification-entry-subject { color: var(--navy-900); font-size: 13px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.notification-entry-event { display: block; color: #566278; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.notification-entry time { display: block; color: #8a94a5; font-size: 11px; }
.notification-unread-dot { width: 7px; height: 7px; margin-top: 6px; background: #2d82c7; border-radius: 50%; }
.resident-workspace .notification-popover { border-top: 3px solid #54a83d; }
.resident-workspace .notification-entry-avatar { background: #4b8f3b; }
.resident-workspace .notification-unread-dot { background: #54a83d; }
.notification-toast-container {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 100;
    display: flex;
    width: min(370px, calc(100vw - 28px));
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.notification-toast {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    overflow: hidden;
    pointer-events: auto;
    background: #fff;
    border: 1px solid #dbe3eb;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(18, 42, 69, .2);
    animation: notification-toast-in .2s ease-out;
}
.notification-toast.is-leaving { animation: notification-toast-out .18s ease-in forwards; }
.notification-toast-open {
    display: grid;
    min-width: 0;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 13px 4px 13px 14px;
    color: inherit;
    cursor: pointer;
    background: transparent;
    border: 0;
    text-align: left;
}
.notification-toast-open:hover { background: #f8fafc; }
.notification-toast-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: #2f86d8;
    border-radius: 50%;
}
.notification-toast-icon svg { width: 22px; height: 22px; }
.notification-toast-content { display: grid; min-width: 0; gap: 2px; }
.notification-toast-content strong { color: var(--navy-950); font-size: 14px; }
.notification-toast-content > span { color: #3e4c5f; font-size: 13px; line-height: 1.35; }
.notification-toast-content small { overflow: hidden; color: #7c8796; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.notification-toast-close {
    display: grid;
    width: 28px;
    height: 28px;
    margin: 8px 6px 0 0;
    place-items: center;
    padding: 0;
    color: #7b8592;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
}
.notification-toast-close:hover { color: #1f2937; background: #eef2f6; }
@keyframes notification-toast-in {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes notification-toast-out {
    to { opacity: 0; transform: translateX(18px) scale(.98); }
}
@media (max-width: 680px) {
    .notification-toast-container { right: 14px; bottom: 14px; }
}
.logout-form,
.cabinet-logout-form { margin: 0; }
.logout-button,
.cabinet-logout-button {
    min-height: 36px;
    padding: 7px 13px;
    color: var(--navy-800);
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    font-weight: 600;
}
.logout-button:hover,
.cabinet-logout-button:hover { background: #f5f7fa; border-color: var(--navy-700); }

.content,
.cabinet-main {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px 30px 46px;
}
.page-header,
.cabinet-page-header { margin: 0 0 22px; }
.page-header h1,
.cabinet-page-header h1 {
    margin: 0 0 5px;
    color: var(--ink);
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
}
.page-header p,
.cabinet-page-header p { margin: 0; color: var(--muted); }

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 22px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.card {
    display: block;
    position: relative;
    min-height: 94px;
    padding: 16px 18px;
    color: inherit;
    background: var(--surface);
    text-decoration: none;
}
.sidebar-nav .sidebar-nav-section { padding: 16px 12px 5px; color: rgba(255,255,255,.46); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.card[href]:hover { background: #f7fafc; }
.card::after {
    position: absolute;
    inset: auto 18px 0;
    height: 2px;
    content: "";
    background: transparent;
}
.card:first-child::after { background: var(--lime); }
.card-title { margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.card-value { color: var(--navy-900); font-size: 27px; font-weight: 720; line-height: 1.15; }
.card-danger .card-value { color: var(--red); }

.section-card,
.cabinet-card,
.cabinet-empty,
.notice {
    margin-bottom: 20px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.section-card-header {
    padding: 14px 18px;
    color: var(--ink);
    background: #fafbfc;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    font-weight: 700;
}
.cabinet-card { padding: 19px; }
.notice { padding: 18px; color: var(--muted); }
.empty-state,
.cabinet-empty { padding: 36px 20px; color: var(--muted); text-align: center; }

.house-toolbar,
.cabinet-actions {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 10px;
    margin: -4px 0 18px;
}
.house-toolbar:empty { display: none; }
.primary-button,
.secondary-button,
.danger-button,
.cabinet-button,
.cabinet-read-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}
.primary-button,
.cabinet-button { color: #fff; background: var(--navy-900); border: 1px solid var(--navy-900); }
.primary-button:hover,
.cabinet-button:hover { background: var(--navy-800); border-color: var(--navy-800); }
.secondary-button { color: var(--navy-800); background: #fff; border: 1px solid var(--line-strong); }
.secondary-button:hover { background: #f6f8fa; border-color: var(--navy-700); }
.danger-button { color: #fff; background: var(--red); border: 1px solid var(--red); }
.danger-button:hover { background: #b81f31; }
.danger-outline-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 7px 13px; color: #a92435; cursor: pointer; background: #fff; border: 1px solid #d9a5ad; border-radius: 5px; font-weight: 650; }
.danger-outline-button:hover { color: #fff; background: #b82b3c; border-color: #b82b3c; }
.cabinet-read-button { color: #765700; background: #fff9df; border: 1px solid #ead886; }

.house-form,
.edit-form,
.psd-create-form,
.cabinet-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
    padding: 18px;
}
.cabinet-form { padding: 0; }
.house-form { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; }
.document-upload-form { grid-template-columns: minmax(260px, .95fr) minmax(420px, 1fr) auto; align-items: end; }
.document-upload-form .form-group { align-content: end; }
.document-upload-form input[type="file"] { height: 40px; min-height: 40px; padding: 4px 8px; }
.document-upload-form input[type="file"]::file-selector-button { height: 30px; margin: 0 10px 0 0; padding: 4px 11px; color: var(--navy-800); cursor: pointer; background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; font: inherit; font-weight: 650; }
.document-upload-form .form-actions,
.document-upload-form .primary-button { min-height: 40px; }
.staff-create-card { width: min(1100px, 100%); margin-inline: auto; }
.staff-create-form { padding: 20px; }
.staff-create-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.staff-create-wide { grid-column: 1 / -1; }
.staff-create-grid > .form-group:not(.staff-create-wide) { grid-template-rows: 18px 40px minmax(17px, auto); align-content: start; }
.staff-create-grid > .form-group:not(.staff-create-wide) > label { align-self: end; }
.staff-create-grid > .form-group:not(.staff-create-wide) > input,
.staff-create-grid > .form-group:not(.staff-create-wide) > select,
.staff-create-grid > .form-group:not(.staff-create-wide) > .request-house-combobox { height: 40px; min-height: 40px; }
.staff-create-grid > .form-group:not(.staff-create-wide) > small { align-self: start; }
.staff-create-grid .form-group small { color: var(--muted); font-size: 12px; }
.staff-create-grid textarea { min-height: 144px; }
.staff-register-type { min-width: 0; margin: 0 auto 3px; padding: 0; border: 0; width: min(640px, 100%); }
.staff-register-type legend { width: 100%; margin-bottom: 8px; padding: 0; font-weight: 650; text-align: center; }
.staff-register-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 5px; background: #edf1f5; border-radius: 10px; }
.staff-register-options label { min-width: 0; cursor: pointer; }
.staff-register-options input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.staff-register-options span { min-height: 44px; padding: 8px 10px; display: flex; align-items: center; justify-content: center; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px; text-align: center; }
.staff-register-options strong { color: var(--ink); font-size: 13px; }
.staff-register-options input:checked + span { color: var(--navy-800); background: #fff; border-color: #b8c7d8; box-shadow: 0 2px 7px rgba(6, 35, 74, .09); }
.staff-register-options input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.request-house-combobox { width: 100%; }
.request-house-combobox > input { width: 100%; }
.house-options-empty { margin: 0; padding: 12px 13px; color: var(--muted); font-size: 12px; }
.staff-create-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.staff-create-footer small { color: var(--muted); }
.house-form.category-create-form { grid-template-columns: minmax(0, 1fr) 190px auto; }
.category-order-help { margin: -6px 18px 18px; color: var(--muted); font-size: 12px; }
.category-list-help { margin: 0; padding: 11px 18px; color: var(--muted); background: #fbfcfd; border-bottom: 1px solid var(--line); font-size: 12px; }
.category-table th:nth-child(2) { width: 110px; }
.category-table th:nth-child(3) { width: 135px; }
.category-table th:last-child { width: 295px; }
.category-actions { display: grid; grid-template-columns: repeat(3, minmax(104px, 1fr)); gap: 8px; min-width: 340px; }
.category-actions form { display: contents; }
.category-action-button { width: 100%; min-height: 38px; padding-inline: 10px; white-space: nowrap; }
.category-actions .danger-outline-button:disabled { opacity: .45; cursor: not-allowed; }
.category-edit-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 10px; box-shadow: 0 22px 60px rgba(5,26,58,.24); }
.category-edit-dialog::backdrop { background: rgba(8,31,62,.46); }
.category-edit-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 19px; border-bottom: 1px solid var(--line); }
.category-edit-heading h2 { margin: 0; font-size: 19px; }
.category-edit-heading button { width: 32px; height: 32px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 50%; cursor: pointer; font-size: 24px; }
.category-edit-heading button:hover { color: var(--navy-900); background: #eef2f6; }
.category-edit-form { display: grid; gap: 14px; padding: 19px; }
.house-form.employee-profile-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.employee-profile-form .form-actions { grid-column: 1 / -1; }
.employee-status-form { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; }
.employee-status-form p { display: flex; align-items: center; gap: 9px; margin: 0; }
.house-form.employee-password-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.employee-password-form .form-actions { grid-column: 1 / -1; }
.edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; }
.psd-create-form .form-actions,
.psd-houses { grid-column: 1 / -1; }
.psd-access-form { display: grid; gap: 18px; }
.psd-resident-filters { display: grid; grid-template-columns: minmax(260px, 1.35fr) minmax(260px, 1fr) auto; gap: 10px; padding: 14px 16px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.psd-resident-filters > input, .psd-house-filter > input { width: 100%; min-height: 40px; padding: 8px 11px; background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; }
.psd-resident-list { display: grid; max-height: 480px; overflow-y: auto; }
.psd-resident-option { display: grid; grid-template-columns: 20px 38px minmax(220px, 1fr) minmax(240px, 1.1fr); align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--line); }
.psd-resident-option:last-child { border-bottom: 0; }
.psd-resident-option:hover { background: #f4f8fb; }
.psd-resident-option:has(input:checked) { background: #edf6fc; box-shadow: inset 3px 0 0 #2586cf; }
.psd-resident-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--navy-700); }
.psd-resident-main, .psd-resident-address { display: grid; gap: 3px; min-width: 0; }
.psd-resident-main small, .psd-resident-address small { color: var(--muted); font-size: 11px; }
.psd-resident-main strong, .psd-resident-address strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psd-house-assignment { padding: 16px; }
.psd-house-assignment > p { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.psd-house-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.psd-house-search input,
.psd-house-sort select { width: 100%; min-height: 40px; padding: 8px 11px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; }
.psd-house-sort { display: grid; grid-template-columns: auto minmax(165px, auto); align-items: center; gap: 8px; }
.psd-house-sort > span { color: var(--muted); font-size: 12px; }
.psd-selected-houses { margin-bottom: 12px; padding: 11px 12px; background: #eef7fc; border: 1px solid #c8dfef; border-radius: 7px; }
.psd-selected-houses[hidden] { display: none; }
.psd-selected-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--navy-900); font-size: 12px; }
.psd-selected-heading span { display: grid; min-width: 22px; height: 22px; place-items: center; color: #fff; background: var(--navy-800); border-radius: 999px; font-size: 11px; }
.psd-selected-list { display: flex; flex-wrap: wrap; gap: 7px; }
.psd-selected-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 7px; padding: 6px 8px 6px 10px; color: #173f68; background: #fff; border: 1px solid #abc9dd; border-radius: 999px; cursor: pointer; font-size: 12px; }
.psd-selected-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psd-selected-chip b { color: #657b90; font-size: 15px; line-height: 1; }
.psd-selected-chip:hover { border-color: #6fa5c9; box-shadow: 0 2px 7px rgba(23,63,104,.08); }
.checkbox-list.psd-house-options-list { grid-template-columns: 1fr; max-height: 390px; padding: 7px; overflow-y: auto; }
.psd-house-option { min-height: 39px; }
.psd-house-option[hidden] { display: none; }
.psd-house-option:has(input:checked) { background: #edf6fc; border-color: #8ebbd7; box-shadow: inset 3px 0 #2586cf; }
.psd-house-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psd-access-submit { display: flex; justify-content: flex-end; padding: 0 16px 16px; }
.form-group,
.cabinet-form-group { display: grid; gap: 6px; min-width: 0; }
.form-group label,
.cabinet-form-group label { color: #25324b; font-size: 13px; font-weight: 650; }
.form-group input,
.form-group select,
.form-group textarea,
.cabinet-form-group input,
.cabinet-form-group select,
.cabinet-form-group textarea {
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
}
.form-group textarea,
.cabinet-form-group textarea { resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.cabinet-form-group input:focus,
.cabinet-form-group select:focus,
.cabinet-form-group textarea:focus {
    outline: 2px solid rgba(36,182,202,.18);
    border-color: var(--cyan);
}
.form-actions { display: flex; align-items: center; gap: 9px; }
.form-group-wide { grid-column: span 2; }
.text-muted { color: var(--muted); font-size: 12px; }
.export-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 18px;
    padding: 18px;
}
.export-filter-actions { grid-column: 1 / -1; }
.export-toolbar { justify-content: space-between; }
.export-toolbar small { color: var(--muted); }
.export-preview-table td { max-width: 320px; overflow-wrap: anywhere; }
.checkbox-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 7px; padding: 10px; background: #f7f8fa; border: 1px solid var(--line); border-radius: 5px; }
.checkbox-item { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; background: #fff; border: 1px solid #e4e8ee; border-radius: 5px; font-size: 13px; }
.checkbox-item:hover { border-color: #b9c6d4; }
.checkbox-item input[type="checkbox"],
.permission-check input[type="checkbox"] { width: 15px; height: 15px; min-height: 0; flex: 0 0 15px; margin: 0; padding: 0; accent-color: var(--navy-700); box-shadow: none; }
.permission-access-form { display: grid; gap: 16px; padding: 18px; }
.permission-role-row { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 18px; align-items: end; }
.employee-permission-intro,
.form-static-value { display: grid; gap: 4px; color: var(--ink); }
.employee-permission-intro small,
.employee-role-note small { color: var(--muted); font-size: 12px; font-weight: 400; }
.form-static-value { min-height: 40px; align-content: center; padding: 8px 11px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 4px; font-weight: 650; }
.permission-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.permission-checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.permission-check { display: flex; min-width: 0; align-items: flex-start; gap: 9px; padding: 10px 12px; cursor: pointer; background: #f8fafc; border: 1px solid #e1e6ec; border-radius: 5px; }
.permission-check:hover { border-color: #aebdca; background: #fff; }
.permission-check span { display: grid; gap: 2px; min-width: 0; }
.permission-check strong { font-size: 13px; }
.permission-check small { color: var(--muted); font-size: 11px; }
.user-admin-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 8px 18px 18px; }
.user-admin-facts > div { min-width: 0; padding: 10px 12px; border-bottom: 1px solid #e7ebef; }
.user-admin-facts dt { color: var(--muted); font-size: 11px; }
.user-admin-facts dd { margin: 3px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.user-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.user-admin-grid .section-card { margin: 0; }
.user-admin-action { display: grid; gap: 14px; padding: 18px; }
.user-admin-action p { margin: 0; }
.user-admin-action small { color: var(--muted); }
.user-directory-action-column { width: 150px; text-align: right; }
.user-directory-edit-button { width: 132px; min-height: 36px; padding-inline: 11px; }
.user-profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; padding: 18px; }
.user-profile-meta { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; }
.user-profile-meta > span { display: grid; min-width: 0; gap: 3px; padding: 12px 14px; border-right: 1px solid var(--line); }
.user-profile-meta > span:last-child { border-right: 0; }
.user-profile-meta small { color: var(--muted); font-size: 11px; }
.user-profile-meta strong { overflow-wrap: anywhere; font-size: 13px; }
.user-profile-actions { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 16px; padding-top: 2px; }
.user-profile-actions > span { color: var(--muted); font-size: 12px; }
.user-password-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.user-password-form label { display: grid; gap: 5px; font-size: 12px; font-weight: 650; }
.user-password-form input { min-height: 40px; padding: 8px 11px; }
.user-password-form button { justify-self: start; }
.clickable-table-row,
[data-href] { cursor: pointer; }
.data-table tbody tr[data-href]:hover { background: #f3f8fb; }

.table-wrapper { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th,
.data-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid #e7eaf0;
    font-size: 13px;
    vertical-align: middle;
}
.data-table th {
    color: #58647b;
    background: #f7f8fa;
    font-size: 11px;
    font-weight: 720;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f7fafb; }
.table-link { color: var(--navy-800); font-weight: 700; text-decoration: none; }
.table-link:hover { color: #087d91; text-decoration: underline; }

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.status::before { width: 6px; height: 6px; content: ""; background: currentColor; border-radius: 50%; }
.status-active { color: #0b7144; background: #e5f5ec; }
.status-inactive { color: #68738a; background: #eef0f3; }
.status-new { color: #096f82; background: #e5f7fa; }
.status-progress { color: #765700; background: #fff5cf; }
.status-closed { color: #356046; background: #e9f2ed; }

.house-details,
.cabinet-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 24px;
    padding: 19px;
}
.house-details > div,
.cabinet-detail-grid > div { display: grid; gap: 5px; min-width: 0; }
.detail-label,
.cabinet-detail-grid span { color: var(--muted); font-size: 12px; }
.detail-value { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.detail-value pre,
pre.detail-value { margin: 0; white-space: pre-wrap; font-family: Consolas, monospace; font-size: 12px; }
.status-actions { padding: 18px; }

.alert,
.cabinet-alert { margin-bottom: 18px; padding: 12px 14px; border: 1px solid; border-radius: 4px; }
.alert-success,
.cabinet-alert-success { color: #0b633c; background: #edf8f2; border-color: #b9e2ca; }
.alert-error,
.cabinet-alert-error { color: #922336; background: #fff0f2; border-color: #efbcc4; }

.cabinet-houses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cabinet-house-card {
    position: relative;
    display: block;
    min-height: 150px;
    padding: 20px;
    overflow: hidden;
    color: var(--ink);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.cabinet-house-card::before { position: absolute; inset: 0 auto 0 0; width: 3px; content: ""; background: var(--lime); }
.cabinet-house-card:hover { border-color: var(--navy-700); }
.cabinet-house-address { font-size: 17px; font-weight: 700; }
.cabinet-house-name { margin-top: 5px; color: var(--muted); font-size: 13px; }
.cabinet-house-link { margin-top: 22px; color: #087d91; font-size: 13px; font-weight: 700; }
.resident-psd-houses .cabinet-house-card { display: flex; min-height: 210px; flex-direction: column; }
.resident-psd-houses .cabinet-house-link { margin-top: auto; padding-top: 18px; }
.resident-house-placeholder { display: grid; height: 110px; margin-bottom: 12px; place-items: center; color: #628098; background: #edf3f6; border-radius: 6px; font-size: 32px; }
.resident-psd-filter { display: grid; grid-template-columns: minmax(220px, 320px) minmax(280px, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 16px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.resident-psd-filter .primary-button { min-height: 40px; }
.section-counter { display: inline-grid; min-width: 24px; height: 24px; place-items: center; padding: 0 7px; color: var(--muted); background: #edf1f4; border-radius: 999px; font-size: 11px; }
.resident-house-documents .cabinet-documents { padding: 14px; }
.resident-house-request-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.request-description-highlight { margin: 0 19px 19px; padding: 18px 20px; background: #f4f8fb; border-left: 4px solid var(--cyan); border-radius: 4px; }
.request-description-highlight > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.request-description-highlight p { margin: 0; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.request-description-highlight.is-result { background: #f0f8f2; border-left-color: var(--green); }
.cabinet-back { margin-bottom: 16px; }
.cabinet-back a { color: var(--navy-700); font-size: 13px; font-weight: 650; text-decoration: none; }
.cabinet-back a:hover { text-decoration: underline; }
.cabinet-section-header { margin: 28px 0 13px; }
.cabinet-section-header h2 { margin: 0; font-size: 19px; }
.cabinet-documents,
.cabinet-request-list { display: grid; gap: 10px; }
.cabinet-document-batch { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.cabinet-document-batch-date { padding: 9px 15px; color: var(--muted); background: #f7f8fa; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 650; }
.cabinet-document { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px; border-bottom: 1px solid var(--line); }
.cabinet-document:last-child { border-bottom: 0; }
.cabinet-document-info { min-width: 0; }
.cabinet-document-name { font-weight: 650; overflow-wrap: anywhere; }
.cabinet-document-meta { margin-top: 4px; color: var(--muted); font-size: 12px; }
.cabinet-document-actions { display: flex; flex-shrink: 0; align-items: center; gap: 10px; }
.cabinet-document-status { color: #8a6200; font-size: 12px; font-weight: 650; }
.cabinet-document-status-read { color: var(--green); }
.cabinet-read-form { margin: 0; }
.cabinet-request-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 15px 18px;
    color: #344057;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.cabinet-request-card:hover { border-color: var(--navy-700); background: #fbfcfd; }
.cabinet-request-date { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.cabinet-request-attachments { margin-top: 16px; }
.cabinet-request-attachments h2 { margin: 0 0 15px; font-size: 18px; }
.resident-attachment-upload { grid-template-columns: 1fr; }
.resident-attachment-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.resident-upload-button { min-width: 124px; min-height: 40px; padding: 8px 16px; }
.cabinet-muted { color: var(--muted); }
.resident-scheduled-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 17px 20px;
    color: var(--navy-950);
    background: #f5f9dc;
    border: 1px solid #cfdf72;
    border-left: 4px solid var(--lime-dark);
    border-radius: var(--radius);
}
.resident-scheduled-time span { font-size: 13px; font-weight: 700; }
.resident-scheduled-time strong { font-size: 19px; }
.cabinet-request-responses h2 { margin: 0 0 15px; font-size: 18px; }
.cabinet-attachment-list { display: grid; gap: 7px; margin-top: 16px; }
.cabinet-attachment-list a { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; color: #087d91; text-decoration: none; background: #f6f8fa; border-radius: 4px; }
.cabinet-attachment-list small { flex-shrink: 0; color: var(--muted); }
.cabinet-comment { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cabinet-comment small { margin-left: 8px; color: var(--muted); }
.cabinet-comment p { margin: 7px 0 0; overflow-wrap: anywhere; }
.resident-conversation-card { padding: 0; overflow: hidden; }
.resident-conversation-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.resident-conversation-heading h2 { margin: 0; font-size: 18px; }
.resident-conversation-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.resident-conversation-heading > span { display: grid; min-width: 28px; height: 28px; padding: 0 8px; place-items: center; color: var(--navy-800); background: #edf2f7; border-radius: 14px; font-size: 12px; font-weight: 750; }
.resident-chat-feed { display: grid; max-height: 520px; align-content: start; grid-auto-rows: max-content; gap: 10px; padding: 16px 18px; overflow-y: auto; background: #f7f9fc; }
.resident-chat-feed.is-empty { min-height: 116px; place-content: center; }
.resident-chat-message { display: grid; width: min(78%, 720px); grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 11px 13px; border: 1px solid; border-radius: 9px; box-shadow: 0 1px 2px rgba(6,23,56,.04); }
.resident-chat-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #fff; background: #2586cf; font-size: 12px; overflow: hidden; }
.resident-chat-message.is-own .resident-chat-avatar { background: #3a9748; }
.resident-chat-content { min-width: 0; }
.resident-chat-message.is-staff { justify-self: start; background: #edf7ff; border-color: #c9e3f5; }
.resident-chat-message.is-own { justify-self: end; background: #edf8ed; border-color: #c7e4c8; }
.resident-chat-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.resident-chat-meta strong { font-size: 12px; }
.resident-chat-meta time { color: var(--muted); font-size: 11px; }
.resident-chat-message p { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.resident-chat-composer { display: block; padding: 14px 18px 17px; background: #fff; border-top: 1px solid var(--line); }
.resident-chat-composer .composer-message-box textarea { min-height: 68px; max-height: 140px; }
.cabinet-history { display: grid; gap: 10px; }
.cabinet-history > div { display: grid; gap: 3px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cabinet-history span { color: var(--muted); font-size: 12px; }
.cabinet-description { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.cabinet-description p { margin: 7px 0 0; overflow-wrap: anywhere; }

/* Resident request: the problem and resident actions lead, operational details stay compact. */
.resident-request-hero { margin-bottom: 12px; }
.resident-request-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.resident-request-hero-top .request-hero-title { min-width: 0; }
.resident-request-hero-top form { flex: 0 0 auto; margin: 0; }
.resident-request-hero-meta { grid-template-columns: 1.4fr .55fr 1.2fr .85fr; }
.resident-request-hero-meta.has-meeting { grid-template-columns: 1.25fr .5fr 1fr .8fr 1.2fr; }
.resident-request-hero-meta > .resident-meeting-meta { padding: 4px 12px; background: #eff8f1; border-left: 3px solid #5db44a; border-radius: 4px; }
.resident-meeting-meta strong { color: #176342; font-size: 14px; }
.resident-request-main > .cabinet-card { margin: 0; }
.resident-request-main > .request-content-card,
.resident-request-side > .request-content-card,
.resident-request-side > .resident-progress-card { margin: 0; }
.resident-request-main > .cabinet-card h2 { margin: 0 0 12px; font-size: 17px; }
.resident-request-main > .cabinet-card p { line-height: 1.55; }
.resident-action-card { border-left: 3px solid #5db44a; }
.resident-action-card .cabinet-form { grid-template-columns: 1fr; gap: 12px; }
.resident-action-card .form-actions { align-self: end; }
.resident-request-description {
    padding: 19px 21px;
    color: var(--navy-950);
    background: #f8fbfd;
    border-left: 3px solid #5db44a;
    font-size: 17px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.house-import-body { display: grid; gap: 14px; padding: 18px; }
.house-import-body > p { margin: 0; color: var(--muted); }
.house-import-form { display: grid; max-width: 720px; gap: 16px; }
.house-import-form label { display: grid; gap: 7px; font-weight: 650; }
.house-import-form label small { color: var(--muted); font-weight: 400; }
.house-import-form input[type="file"] { width: 100%; padding: 11px; background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; }
.house-import-summary { padding: 13px 18px; color: var(--muted); background: #fbfcfd; border-bottom: 1px solid var(--line); }
.resident-request-description p { max-width: 78ch; margin: 0; }
.resident-result-card .request-description { font-size: 15px; overflow-wrap: anywhere; }
.resident-progress-card .side-facts > div:last-child { border-bottom: 0; }
.resident-files-card .resident-attachment-upload { padding: 10px 14px; margin: 0; background: #fbfcfd; border-bottom: 1px solid var(--line); }
.resident-files-card .resident-attachment-upload .cabinet-form-group { margin: 0; }
.resident-files-card .resident-attachment-upload small { display: block; margin-top: 7px; color: var(--muted); }
.resident-attachment-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 14px; }
.resident-attachment-grid .request-attachment-card { display: grid; min-height: 52px; max-width: 260px; grid-template-columns: 36px minmax(0, 1fr); align-content: center; gap: 3px 8px; padding: 7px; }
.resident-attachment-grid .request-attachment-card img,
.resident-attachment-grid .file-extension { width: 36px; height: 36px; grid-row: span 2; margin: 0; object-fit: cover; font-size: 10px; }
.resident-attachment-grid .request-attachment-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.resident-attachment-grid .request-attachment-card small { font-size: 10px; }
.resident-history-card { display: flex; min-height: 0; max-height: var(--resident-chat-height, 640px); flex-direction: column; overflow: hidden; }
.resident-history-card > .section-card-header { flex: 0 0 auto; }
.resident-history-card .request-timeline { min-height: 0; padding-top: 17px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

.notification-item { padding: 15px 18px; border-bottom: 1px solid var(--line); }
.notification-item:last-child { border-bottom: 0; }
.notification-item.is-read { opacity: .62; }
.notification-item p { margin: 5px 0 0; color: var(--muted); }
.notification-item form { margin: 10px 0 0; }

.dashboard-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.dashboard-links a {
    display: grid;
    min-height: 164px;
    grid-template-rows: auto 1fr auto;
    align-content: start;
    gap: 8px;
    padding: 17px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    text-decoration: none;
}
.dashboard-links a:hover { background: #f8fbfd; border-color: #adc0d0; box-shadow: 0 8px 20px rgba(7,31,61,.07); }
.dashboard-links strong { color: var(--navy-800); font-size: 16px; }
.dashboard-links span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.dashboard-links i { align-self: end; justify-self: start; padding: 7px 10px; color: var(--navy-800); background: #f2f6f9; border: 1px solid #d5e0e9; border-radius: 5px; font-size: 12px; font-style: normal; font-weight: 700; }
.dashboard-links a:hover i { color: #fff; background: var(--navy-800); border-color: var(--navy-800); }
.settings-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.settings-status-card { display: grid; gap: 5px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 7px; }
.settings-status-card.is-pending { border-left-color: #d39b17; }
.settings-status-card > span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.settings-status-card strong { color: var(--navy-900); font-size: 16px; }
.settings-status-card small { color: var(--muted); line-height: 1.45; }
.settings-form { display: grid; gap: 18px; }
.settings-form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 17px 18px; padding: 20px; }
.settings-form-grid > .form-group { align-content: start; }
.settings-form-grid input, .settings-form-grid select { min-height: 42px; }
.settings-field-host { grid-column: span 6; }
.settings-field-port { grid-column: span 2; }
.settings-field-secure { grid-column: span 4; }
.settings-field-half { grid-column: span 6; }
.settings-field-full { grid-column: 1 / -1; }
.settings-clear-secret { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: 4px; color: #922f3e; font-size: 12px; font-weight: 650; }
.settings-clear-secret input { width: 16px; height: 16px; margin: 0; accent-color: #a92d42; }
.settings-save-bar { position: sticky; z-index: 5; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; background: rgba(255,255,255,.97); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 28px rgba(7,31,61,.12); }
.settings-save-bar > div { display: grid; gap: 3px; }
.settings-save-bar small { color: var(--muted); }
.settings-save-actions { display: flex !important; flex: 0 0 auto; align-items: center; gap: 9px !important; }
.config-explanation-card { margin-top: 18px; }
.config-explanation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.config-explanation-grid > div { padding: 18px; border-right: 1px solid var(--line); }
.config-explanation-grid > div:last-child { border-right: 0; }
.config-explanation-grid strong { color: var(--navy-900); }
.config-explanation-grid p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.request-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.request-tabs a {
    position: relative;
    padding: 0 1px 11px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}
.request-tabs a.active { color: var(--navy-900); }
.request-tabs a.active::after { position: absolute; inset: auto 0 -1px; height: 3px; content: ""; background: var(--lime); }
.request-filters { display: flex; flex-wrap: wrap; gap: 9px; padding: 13px 16px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.request-filters input,
.request-filters select { min-height: 36px; padding: 6px 10px; background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; }
.request-filters input { min-width: 260px; flex: 1; }
.request-register-tabs { display: flex; gap: 8px; margin: 0 0 12px; padding: 4px; width: fit-content; background: #e9eef5; border-radius: 8px; }
.request-register-tabs a { padding: 9px 16px; color: var(--muted); font-weight: 700; text-decoration: none; border-radius: 6px; }
.request-register-tabs a:hover { color: var(--navy-800); background: rgba(255, 255, 255, .72); }
.request-register-tabs a.is-active { color: #fff; background: var(--navy-900); box-shadow: 0 2px 6px rgba(9, 42, 92, .22); }
.request-register-form { padding-top: 14px; border-top: 1px solid var(--line); }
.resident-search { background: #fff; }
.resident-search input[type="search"] { min-width: 0; flex: 1; }
[data-live-region="resident-registration-list"] { transition: opacity .15s ease; }
[data-live-region="resident-registration-list"].is-loading { opacity: .62; }
.request-description { padding: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.data-table small { color: var(--muted); }
.pagination-toolbar { padding: 16px; margin: 0; }

.login-page {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(320px, 43%) 1fr;
    background: #fff;
}
.login-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    overflow: hidden;
    background: var(--navy-900);
}
.login-brand::after { position: absolute; inset: auto 0 0; height: 6px; content: ""; background: linear-gradient(90deg, var(--lime), #43a739, var(--cyan)); }
.login-brand img { width: min(440px, 90%); height: auto; }
.login-brand a { display: flex; align-items: center; justify-content: center; width: 100%; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 42px; background: var(--canvas); }
.login-card { width: min(420px, 100%); padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.login-card h1 { margin: 0 0 7px; font-size: 27px; }
.login-card > p { margin: 0 0 24px; color: var(--muted); }
.login-form { display: grid; gap: 16px; }
.login-form .primary-button { width: 100%; margin-top: 4px; }
.registration-card { width: min(720px, 100%); }
.registration-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.registration-form .form-group { min-width: 0; align-content: start; }
.registration-form .form-group input { width: 100%; }
.registration-form .form-group label { min-height: 21px; }
.house-combobox { position: relative; display: flex; }
.house-combobox > input { padding-right: 44px; }
.house-combobox > button { position: absolute; inset: 1px 1px 1px auto; width: 42px; color: var(--navy-800); background: #fff; border: 0; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 18px; }
.house-combobox > button:hover { background: #f0f4f8; }
.house-options { position: absolute; top: calc(100% + 5px); right: 0; left: 0; z-index: 30; max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; box-shadow: 0 12px 30px rgba(6,23,56,.16); }
.house-options[hidden], .house-options button[hidden] { display: none; }
.house-options button { display: block; width: 100%; padding: 10px 13px; color: var(--ink); background: #fff; border: 0; text-align: left; cursor: pointer; }
.house-options button:hover, .house-options button:focus { background: #edf5fb; outline: 0; }
.registration-wide { grid-column: 1 / -1; }
.registration-consents { display: grid; gap: 10px; padding: 14px 15px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 7px; }
.registration-consent { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--ink); font-size: 13px; line-height: 1.45; cursor: pointer; }
.registration-consent input { width: 17px !important; height: 17px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--navy-700); box-shadow: none; }
.registration-consent a { color: var(--navy-700); font-weight: 700; }
.registration-consent a:hover { color: var(--cyan); }
.form-group small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.auth-switch { margin: 20px 0 0 !important; color: var(--muted); font-size: 13px; text-align: center; }
.auth-switch a { color: var(--navy-700); font-weight: 650; }
.resend-form { margin-top: 12px; }
.resend-form .secondary-button { width: 100%; }
.resident-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.moderation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.moderation-card { min-width: 0; }
.moderation-form { grid-template-columns: 1fr; padding: 18px; }
.moderation-form .primary-button,
.moderation-form .danger-button { justify-self: start; }
.resident-dashboard-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.resident-unit-list,
.resident-request-list { display: grid; }
.resident-unit { display: grid; gap: 4px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.resident-unit-with-photo { grid-template-columns: 76px 1fr; align-items: center; gap: 14px; }
.resident-unit-with-photo:not(:has(img)) { grid-template-columns: 1fr; }
.resident-unit-with-photo > img { width: 76px; height: 58px; object-fit: cover; border-radius: 6px; }
.resident-unit-with-photo > div { display: grid; gap: 4px; min-width: 0; }
.cabinet-house-photo { display: block; width: 100%; height: 135px; margin-bottom: 12px; object-fit: cover; border-radius: 6px; }
.cabinet-house-hero-photo { display: block; width: min(100%, 540px); max-height: 260px; margin: 0 0 18px; object-fit: cover; border-radius: 7px; }
.resident-unit:last-child { border-bottom: 0; }
.resident-unit span { color: var(--muted); font-size: 12px; }
.resident-request-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 15px 18px; color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-bottom: 0; }
.resident-request-row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.resident-request-row:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.resident-request-row:only-child { border-radius: var(--radius); }
.resident-request-row:hover { background: #f8fafb; border-color: var(--line-strong); }
.resident-request-row > span:not(.status) { display: grid; gap: 5px; min-width: 0; }
.resident-request-row > .status { flex: 0 0 auto; align-self: center; }
.resident-request-row small { color: var(--muted); }
.resident-request-meta { justify-items: end; flex-shrink: 0; }
.resident-request-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.resident-form-wide { grid-column: 1 / -1; }

@media (max-width: 1100px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cabinet-houses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .house-details, .cabinet-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .resident-request-hero-meta,
    .resident-request-hero-meta.has-meeting { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .staff-create-grid { grid-template-columns: 1fr; }
    .staff-create-wide { grid-column: 1; }
    .staff-create-footer { align-items: flex-start; flex-direction: column; }
    .house-form.category-create-form,
    .house-form.employee-profile-form,
    .house-form.employee-password-form { grid-template-columns: 1fr; }
    .category-create-form .form-actions,
    .employee-profile-form .form-actions,
    .employee-password-form .form-actions { grid-column: 1; }
    .resident-max-content { grid-template-columns: 42px minmax(0, 1fr); }
    .resident-max-action { grid-column: 2; justify-self: start; }
    :root { --sidebar-width: 100%; }
    .admin-layout, .cabinet-layout { display: block; }
    .sidebar, .cabinet-sidebar { position: static; width: 100%; }
    .sidebar-logo, .cabinet-logo-wrap { min-height: 82px; padding: 8px 16px; }
    .brand-logo { width: 150px; height: 62px; }
    .workspace-label { display: none; }
    .sidebar-footer { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 18px; font-size: 0; }
    .sidebar-footer br { display: none; }
    .sidebar-footer a { margin-top: 0; font-size: 11px; }
    .sidebar-nav, .cabinet-nav { display: flex; padding: 7px 12px; overflow-x: auto; }
    .sidebar-nav .sidebar-nav-section { display: none; }
    .sidebar-nav a, .cabinet-nav a { flex: 0 0 auto; }
    .sidebar-nav a.active::before, .cabinet-nav a.active::before { inset: auto 8px -7px; width: auto; height: 3px; }
    .admin-main, .cabinet-main-shell { width: 100%; margin-left: 0; }
    .topbar, .cabinet-header { position: static; padding: 0 18px; }
    .content, .cabinet-main { padding: 22px 18px 36px; }
    .house-form, .edit-form, .psd-create-form, .cabinet-form { grid-template-columns: 1fr; }
    .form-group-wide { grid-column: 1; }
    .export-filter-form { grid-template-columns: 1fr; }
    .resident-psd-filter { grid-template-columns: 1fr; }
    .psd-resident-filters { grid-template-columns: 1fr; }
    .psd-house-toolbar { grid-template-columns: 1fr; }
    .psd-house-sort { grid-template-columns: auto 1fr; }
    .psd-resident-option { grid-template-columns: 20px 38px minmax(0, 1fr); }
    .psd-resident-address { grid-column: 3; }
    .export-filter-actions { grid-column: 1; }
    .form-actions, .psd-create-form .form-actions, .psd-houses { grid-column: 1; }
    .login-page { grid-template-columns: 1fr; }
    .login-brand { min-height: 210px; padding: 22px; }
    .login-brand img { width: min(310px, 86%); }
    .registration-form { grid-template-columns: 1fr; }
    .registration-wide { grid-column: 1; }
    .moderation-grid { grid-template-columns: 1fr; }
    .resident-request-form { grid-template-columns: 1fr; }
    .resident-form-wide { grid-column: 1; }
    .permission-role-row { grid-template-columns: 1fr; }
    .user-admin-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-admin-grid { grid-template-columns: 1fr; }
    .user-profile-form { grid-template-columns: 1fr; }
    .user-profile-form > .form-group,
    .user-profile-meta,
    .user-profile-actions { grid-column: 1; }
    .settings-field-host,
    .settings-field-full { grid-column: 1 / -1; }
    .settings-field-port,
    .settings-field-secure,
    .settings-field-half { grid-column: span 6; }
    .settings-save-bar { position: static; align-items: stretch; flex-direction: column; }
    .settings-save-actions { align-self: flex-start; }
}
@media (max-width: 560px) {
    .employee-status-form { align-items: flex-start; flex-direction: column; }
    .category-table th:nth-child(2),
    .category-table td:nth-child(2) { display: none; }
    .category-actions { grid-template-columns: 1fr; min-width: 118px; }
    .resident-request-hero-top { flex-direction: column; gap: 14px; }
    .resident-request-hero-meta,
    .resident-request-hero-meta.has-meeting { grid-template-columns: 1fr; }
    .resident-request-hero-meta > span { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
    .resident-request-hero-meta > span:last-child { padding-bottom: 0; border-bottom: 0; }
    .resident-request-description { padding: 16px; font-size: 16px; }
    .resident-max-content { gap: 10px 12px; padding: 15px; }
    .resident-max-action .secondary-button { white-space: normal; }
    .notification-popover { top: 58px; width: 100vw; }
    .topbar-title { font-size: 15px; }
    .topbar-eyebrow, .topbar-user-name, .cabinet-user-name { display: none; }
    .topbar, .cabinet-header { min-height: 58px; gap: 8px; }
    .cards, .cabinet-houses, .house-details, .cabinet-detail-grid { grid-template-columns: 1fr; }
    .resident-counts { grid-template-columns: 1fr; }
    .resident-dashboard-counts { grid-template-columns: 1fr; }
    .resident-dashboard-strip { grid-template-columns: 1fr; }
    .resident-request-row { align-items: flex-start; flex-direction: column; gap: 10px; }
    .resident-request-row > .status { align-self: flex-start; }
    .resident-request-meta { justify-items: start; }
    .resident-scheduled-time { align-items: flex-start; flex-direction: column; gap: 5px; }
    .card { min-height: 78px; }
    .page-header h1, .cabinet-page-header h1 { font-size: 24px; }
    .cabinet-document, .cabinet-request-card { align-items: flex-start; flex-direction: column; gap: 10px; }
    .cabinet-document-actions { width: 100%; justify-content: space-between; }
    .resident-chat-message { width: 94%; }
    .resident-chat-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
    .resident-attachment-input-row { grid-template-columns: 1fr; }
    .resident-upload-button { justify-self: start; }
    .user-admin-facts,
    .user-password-form { grid-template-columns: 1fr; }
    .user-profile-meta { grid-template-columns: 1fr; }
    .user-profile-meta > span { border-right: 0; border-bottom: 1px solid var(--line); }
    .user-profile-meta > span:last-child { border-bottom: 0; }
    .user-profile-actions { align-items: stretch; flex-direction: column; }
    .user-profile-actions .primary-button { width: 100%; }
    .request-filters input { min-width: 100%; }
    .login-panel { padding: 20px; }
    .login-card { padding: 24px; }
    .dashboard-links { grid-template-columns: 1fr; }
    .settings-status-grid, .settings-form-grid, .config-explanation-grid { grid-template-columns: 1fr; }
    .settings-field-host, .settings-field-port, .settings-field-secure, .settings-field-half, .settings-field-full { grid-column: 1; }
    .settings-save-bar { position: static; align-items: stretch; flex-direction: column; }
    .settings-save-actions { width: 100%; align-items: stretch; flex-direction: column; }
    .settings-save-actions .primary-button,
    .settings-save-actions .secondary-button { width: 100%; }
    .config-explanation-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
    .config-explanation-grid > div:last-child { border-bottom: 0; }
    .dashboard-links { grid-template-columns: 1fr; padding: 12px; }
    .dashboard-links a { min-height: 150px; }
}

/* Employee request workspace: the two columns start at the same top edge. */
.request-detail-workspace .request-detail-screen { display: block; height: 100%; min-height: 0; }
.request-detail-workspace .request-detail-layout { height: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: stretch; }
.request-detail-workspace .request-detail-main { display: flex; flex-direction: column; min-height: 0; gap: 0; padding: 0; overflow: hidden; }
.request-central-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; display: flex; flex-direction: column; gap: 10px; }
.request-central-scroll > * { flex-shrink: 0; }
.request-detail-workspace .request-detail-side { display: flex; min-height: 0; padding: 0; margin: 0; overflow: hidden; }
.request-detail-workspace .request-operator-panel { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.request-operator-heading { flex-shrink: 0; flex-wrap: wrap; gap: 6px; padding: 12px 16px; }
.request-operator-heading .status { white-space: normal; font-size: 11px; }
.request-operator-middle { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.request-settings { display: grid; gap: 12px; padding: 14px 16px; }
.request-setting { display: grid; gap: 5px; min-width: 0; }
.request-setting label { font-weight: 600; font-size: 13px; }
.request-setting select, .request-setting input:not([type=hidden]):not([type=checkbox]) { width: 100%; min-width: 0; height: 39px; padding: 7px 10px; font-size: 13px; }
.request-setting small { color: var(--muted); font-size: 10px; }
.reminder-toggle { display: flex; justify-content: space-between; align-items: center; }
.request-setting input[type=checkbox] { appearance: none; width: 36px; height: 21px; border: 0; border-radius: 14px; background: #a4b0c2; cursor: pointer; position: relative; }
.request-setting input[type=checkbox]::after { content: ''; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; border-radius: 50%; background: #fff; }
.request-setting input[type=checkbox]:checked { background: #1684cc; }
.request-setting input[type=checkbox]:checked::after { left: 18px; }
.reminder-fields { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 8px; }
.reminder-fields input:disabled { background: #f2f4f7; opacity: .65; }
.request-actions { padding: 12px 16px; border-top: 1px solid var(--line); }
.request-actions > strong { font-size: 13px; }
.request-actions > div { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.request-actions button { width: 100%; white-space: normal; min-width: 0; padding: 10px 12px; min-height: 42px; font-size: 13px; line-height: 1.4; }
.request-assignees { border: 1px solid var(--line); border-radius: 6px; padding: 9px; max-height: 260px; overflow-y: auto; }
.request-assignees summary { cursor: pointer; font-size: 13px; }
.request-setting .request-assignees label { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 13px; }
.request-setting .request-assignees input[type="checkbox"] { appearance: auto; width: 17px; height: 17px; flex: 0 0 17px; border-radius: 2px; background: initial; padding: 0; }
.request-setting .request-assignees input[type="checkbox"]::after { content: none; }
.request-action-dialog .side-form textarea { min-height: 140px; resize: vertical; }
.request-work-period-fields { display: grid; gap: 9px; min-width: 0; margin: 4px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.request-work-period-fields legend { padding: 0 4px; font-size: 12px; font-weight: 650; }
.request-work-period-fields small { line-height: 1.5; color: var(--muted); }
.request-work-period { margin: 0; padding: 0 16px 14px; font-size: 13px; line-height: 1.6; }
.cabinet-card > .request-work-period, .request-description-highlight + .request-work-period { padding: 12px 0 0; }
.request-action-dialog .side-form > p { line-height: 1.5; font-size: 13px; color: var(--muted); }
.archive-filters { padding: 18px; display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.archive-filters label { display: grid; gap: 6px; }
.archive-record { padding: 20px; }
.archive-record dt { color: var(--muted); margin-top: 12px; font-size: 13px; }
.archive-record dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.request-save-footer { flex-shrink: 0; padding: 10px 16px 16px; border-top: 1px solid var(--line); background: #fff; }
.request-save-footer button { width: 100%; min-height: 42px; }
.request-save-footer p { font-size: 12px; color: #157448; margin: 0 0 6px; overflow-wrap: anywhere; }
.request-save-footer p:empty { display: none; }
.request-save-footer p.is-error { color: #b42318; }
.request-detail-workspace button:disabled { opacity: .5; cursor: default; }
.request-detail-screen .request-hero { padding: 12px 16px; }
.request-detail-screen .request-hero-title h1 { font-size: 23px; }
.request-detail-screen .request-hero-meta { margin-top: 9px; padding-top: 9px; }
.request-detail-screen .request-problem-card .section-card-header { justify-content: flex-start; padding: 9px 14px; }
.request-detail-screen .request-description-prominent { padding: 12px 14px; margin: 0; font-size: 14px; }
.request-files .section-card-header { padding: 8px 14px; border-bottom: 0; min-height: 47px; }
.request-files .request-attachment-grid { display: flex; flex-wrap: wrap; padding: 8px 14px; gap: 8px; }
.request-files .request-attachment-card { display: grid; min-height: 52px; grid-template-columns: 36px minmax(0, 1fr); align-content: center; gap: 3px 8px; max-width: 260px; padding: 7px; }
.request-files .request-attachment-card img, .request-files .file-extension { width: 36px; height: 36px; grid-row: span 2; object-fit: cover; font-size: 10px; }
.request-files .request-attachment-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.request-files .request-attachment-card small { font-size: 10px; }
.request-detail-workspace .request-conversation-card { flex: 1; margin-bottom: 0; min-height: 150px; }
.request-detail-workspace .request-comment-feed { max-height: none; overflow: visible; }
.request-detail-workspace .request-comment { position: relative; width: min(92%, 760px); padding-right: 35px; }
.request-comment-head { flex-wrap: wrap; gap: 3px 10px; }
.comment-actions { position: absolute; top: 6px; right: 7px; }
.comment-actions > button { border: 0; background: transparent; cursor: pointer; font-size: 23px; line-height: 1; color: var(--navy-800); padding: 0 3px; }
.comment-menu { position: absolute; right: 0; top: 26px; width: 215px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 20px #0c284b22; z-index: 5; }
.comment-menu button { display: block; width: 100%; padding: 9px; text-align: left; background: transparent; border: 0; font-size: 12px; cursor: pointer; }
.comment-menu button:hover { background: #f1f5fa; }
.danger-text { color: #b42318; }
.comment-deleted { color: var(--muted); font-style: italic; }
.comment-file { display: block; margin-top: 7px; overflow-wrap: anywhere; font-size: 12px; }
.request-detail-workspace .request-chat-composer { position: static; padding: 10px 14px; gap: 7px; border: 1px solid var(--line); border-radius: 0 0 7px 7px; }
.request-chat-composer.is-internal { background: #fff9e8; border-color: #eadb9f; }
.request-chat-composer.is-internal .composer-mode input:checked + span { color: #fff; background: #8b6605; border-color: #8b6605; }
.request-chat-composer.is-internal .composer-message-box { border-color: #d9bf68; }
.request-chat-composer .composer-message-box textarea { max-height: 140px; }
.table-context-link { color: var(--navy-800); font-weight: 650; text-decoration: none; }
.table-context-link:hover, .table-context-link:focus-visible { color: #1d6da3; text-decoration: underline; }
.person-preview-trigger { cursor: pointer; }
.person-preview-card { position: fixed; z-index: 1200; width: min(320px, calc(100vw - 20px)); overflow: hidden; color: #f4f7fb; background: #263446; border: 1px solid #415269; border-radius: 8px; box-shadow: 0 18px 45px rgba(6,23,56,.32); }
.person-preview-card[hidden] { display: none; }
.person-preview-card header { display: flex; align-items: center; gap: 11px; padding: 15px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.person-preview-card header > div { display: grid; min-width: 0; gap: 2px; }
.person-preview-card header strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.person-preview-card header small { color: #9dd6f0; font-size: 11px; }
.person-preview-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; object-fit: cover; color: #fff; background: #2786be; border-radius: 50%; font-size: 14px; font-weight: 750; }
.person-preview-details { display: grid; gap: 13px; padding: 14px 16px; }
.person-preview-detail { display: grid; gap: 3px; }
.person-preview-detail span { color: #aeb9c7; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.person-preview-detail strong,
.person-preview-detail a { color: #fff; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.person-preview-detail a:hover,
.person-preview-detail a:focus-visible { color: #80d3f6; text-decoration: underline; }
.person-preview-card footer { padding: 11px 16px 13px; border-top: 1px solid rgba(255,255,255,.12); }
.person-preview-card footer a { color: #80d3f6; font-size: 12px; font-weight: 700; text-decoration: none; }
.person-preview-card footer a:hover,
.person-preview-card footer a:focus-visible { color: #b6e8fb; text-decoration: underline; }
.history-button { margin-left: auto; padding: 3px; font-size: 12px; border: 0; color: var(--navy-700); background: transparent; text-decoration: underline; cursor: pointer; }
.request-action-dialog { width: min(500px, calc(100% - 28px)); max-height: 85dvh; padding: 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.request-action-dialog::backdrop { background: #06173870; }
.request-action-dialog > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.request-action-dialog h2 { margin: 0; font-size: 20px; }
.request-action-dialog header button { font-size: 24px; border: 0; background: transparent; cursor: pointer; }
.request-action-dialog .side-action-body { padding: 12px 0; border: 0; background: transparent; }
.request-action-dialog .side-form { padding: 10px 0; border: 0; }
@media (min-width: 981px) {
    .request-detail-workspace .admin-main { display: flex; flex-direction: column; height: 100dvh; }
    .request-detail-workspace .topbar { flex-shrink: 0; }
    .request-detail-workspace .content { flex: 1; min-height: 0; height: auto; padding: 10px 14px; }
    .request-detail-workspace .request-hero { position: sticky; top: 0; z-index: 8; transition: padding .18s ease, box-shadow .18s ease; }
    .request-detail-screen.is-request-header-compact .request-hero { padding: 8px 14px; box-shadow: 0 7px 20px rgba(12,40,75,.12); }
    .request-detail-screen.is-request-header-compact .request-hero-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; }
    .request-detail-screen.is-request-header-compact .request-hero-title h1 { min-width: 0; margin: 0; overflow: hidden; font-size: 17px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
    .request-detail-screen.is-request-header-compact .request-hero-number { flex: 0 0 auto; order: 2; justify-content: flex-end; font-size: 12px; }
    .request-detail-screen.is-request-header-compact .request-hero-meta { display: none; }

    body.resident-request-workspace { height: 100vh; overflow: hidden; }
    .resident-request-workspace .admin-main { display: flex; height: 100dvh; min-height: 0; flex-direction: column; }
    .resident-request-workspace .topbar { flex: 0 0 auto; }
    .resident-request-workspace .content { flex: 1; min-height: 0; height: auto; padding: 10px 14px 14px; overflow: hidden; }
    .resident-request-screen { display: grid; height: 100%; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); gap: 10px; }
    .resident-request-toolbar { display: flex; min-height: 28px; align-items: center; justify-content: space-between; gap: 14px; }
    .resident-request-toolbar .cabinet-back { margin: 0; }
    .resident-request-toolbar .cabinet-alert { margin: 0; padding: 7px 11px; }
    .resident-request-screen > .resident-request-hero { margin: 0; transition: padding .18s ease, box-shadow .18s ease; }
    .resident-request-screen > .resident-request-layout { height: 100%; min-height: 0; align-items: stretch; }
    .resident-request-main { min-height: 0; align-content: start; grid-auto-rows: max-content; padding-right: 5px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
    .resident-request-side { display: flex; min-height: 0; align-items: stretch; flex-direction: column; gap: 12px; overflow: hidden; }
    .resident-request-side .resident-progress-card { flex: 0 0 auto; }
    .resident-request-side .resident-history-card { flex: 0 1 auto; }
    .resident-request-screen.is-request-header-compact { grid-template-rows: auto minmax(0, 1fr); }
    .resident-request-screen.is-request-header-compact .resident-request-toolbar { display: none; }
    .resident-request-screen.is-request-header-compact > .resident-request-hero { padding: 8px 14px; box-shadow: 0 7px 20px rgba(12,40,75,.1); }
    .resident-request-screen.is-request-header-compact .resident-request-hero-top { align-items: center; }
    .resident-request-screen.is-request-header-compact .request-hero-title { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 16px; }
    .resident-request-screen.is-request-header-compact .request-hero-title h1 { min-width: 0; margin: 0; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
    .resident-request-screen.is-request-header-compact .request-hero-number { flex: 0 0 auto; order: 2; font-size: 12px; }
    .resident-request-screen.is-request-header-compact .resident-request-hero-meta,
    .resident-request-screen.is-request-header-compact .resident-request-hero-top > form { display: none; }
}
@media (max-width: 980px) {
    .request-detail-workspace .request-detail-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
    .request-detail-workspace .request-detail-main, .request-central-scroll { overflow: visible; }
    .request-detail-workspace .request-detail-side { margin-top: 12px; }
    .request-operator-middle { overflow: visible; }
    .resident-request-toolbar .cabinet-back { margin-bottom: 16px; }
    .resident-history-card { max-height: none !important; overflow: visible; }
    .resident-history-card .request-timeline { overflow: visible; }
}

.request-central-scroll > .section-card { margin: 0; }
.request-detail-screen .request-problem-card .section-card-header { text-align: left; }
.request-detail-screen .request-description-prominent { min-height: 0; line-height: 1.5; }
.request-detail-workspace .request-conversation-card { flex: 1 0 auto; overflow: visible; }
.composer-mode input:focus-visible + span { outline: 2px solid #1684cc; outline-offset: 2px; }

@media (min-width: 981px) and (max-height: 850px) {
    .request-detail-workspace .request-operator-heading { min-height: 54px; padding: 9px 14px; }
    .request-detail-workspace .request-operator-person { padding: 9px 14px; }
    .request-detail-workspace .request-operator-time { padding: 7px 14px; }
    .request-detail-workspace .request-settings { gap: 9px; padding: 11px 14px; }
    .request-detail-workspace .request-setting select, .request-detail-workspace .request-setting input:not([type=hidden]):not([type=checkbox]) { height: 36px; }
    .request-detail-workspace .request-actions { padding: 9px 14px; }
    .request-detail-screen .request-hero-meta { font-size: 13px; }
    .request-detail-screen .request-hero { padding: 10px 14px; }
    .request-detail-screen .request-hero-meta > span { padding-inline: 8px; }
    .request-detail-screen .request-hero-title h1 { font-size: 22px; }
    .request-detail-screen .request-description-prominent { padding-block: 9px; }
    .request-conversation-card .section-card-header { padding: 10px 14px; }
}

/* Fixed request conversations: only messages and history scroll. */
.request-files > summary,
.resident-files-card > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.request-files > summary::-webkit-details-marker,
.resident-files-card > summary::-webkit-details-marker { display: none; }
.request-files-toggle { margin-left: auto; color: #1d6da3; font-size: 0; font-weight: 700; white-space: nowrap; }
.request-files-toggle::after { content: "Показать"; font-size: 11px; }
.request-files[open] .request-files-toggle::after,
.request-result[open] .request-files-toggle::after,
.resident-files-card[open] .request-files-toggle::after { content: "Скрыть"; }
.request-files-body { max-height: 220px; overflow-y: auto; border-top: 1px solid var(--line); overscroll-behavior: contain; }
.request-files-actions { display: flex; justify-content: flex-end; padding: 10px 14px; }
.request-details-dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
.request-files-actions .secondary-button { min-height: 32px; padding: 6px 11px; font-size: 11px; }

.request-chat-composer,
.resident-chat-composer { padding: 7px 10px 8px; }
.request-detail-workspace .request-chat-composer { grid-template-columns: auto minmax(0, 1fr); align-items: end; }
.request-detail-workspace .composer-mode { padding-bottom: 5px; }
.composer-mode span { min-height: 28px; padding: 5px 9px; font-size: 11px; }
.composer-message-box {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: end;
    padding: 4px;
    border-radius: 15px;
}
.composer-message-box textarea,
.request-chat-composer .composer-message-box textarea,
.resident-chat-composer .composer-message-box textarea {
    height: 42px;
    min-height: 42px;
    max-height: 140px;
    grid-column: 2;
    grid-row: 1;
    padding: 10px 7px 8px;
    overflow-y: hidden;
    resize: none;
}
.composer-toolbar { display: contents; }
.composer-attachment-button { grid-column: 1; grid-row: 1; align-self: end; }
.composer-send-button { grid-column: 3; grid-row: 1; align-self: end; margin: 0; }
.composer-icon-button { width: 36px; height: 36px; flex-basis: 36px; border: 0; }
.composer-file-name {
    min-width: 0;
    padding: 2px 7px 4px;
    grid-column: 2;
    grid-row: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.composer-file-name:empty { display: none; }

@media (min-width: 981px) {
    .request-detail-workspace .request-central-scroll {
        min-height: 0;
        gap: 6px;
        overflow: hidden;
    }
    .request-detail-workspace .request-detail-toolbar { min-height: 24px; flex: 0 0 auto; }
    .request-detail-workspace .request-hero {
        position: static;
        padding: 8px 14px;
        flex: 0 0 auto;
        box-shadow: none;
    }
    .request-detail-workspace .request-hero-title h1 { margin-top: 2px; font-size: 19px; }
    .request-detail-workspace .request-hero-number { gap: 7px; font-size: 12px; }
    .request-detail-workspace .request-hero-meta {
        margin-top: 7px;
        padding-top: 7px;
        font-size: 12px;
    }
    .request-detail-workspace .request-hero-meta small { font-size: 9px; }
    .request-detail-workspace .request-problem-card {
        display: flex;
        flex-direction: column;
        flex: 0 1 auto;
        min-height: 0;
    }
    .request-detail-workspace .request-problem-card .section-card-header { flex: 0 0 auto; min-height: 34px; padding: 8px 16px; font-size: 14px; }
    .request-detail-workspace .request-problem-card .request-description-prominent {
        flex: 0 1 auto;
        min-height: 0;
        max-height: min(360px, 40dvh);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
    .request-detail-workspace .request-files { flex: 0 0 auto; }
    .request-detail-workspace .request-files > summary { min-height: 35px; padding: 6px 12px; }
    .request-detail-workspace .request-conversation-card {
        min-height: 150px;
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        overflow: hidden;
    }
    .request-detail-workspace .request-conversation-card > .section-card-header { flex: 0 0 auto; }
    .request-detail-workspace .request-conversation-card:has(.request-comment-feed.is-empty) { flex: 0 0 130px; min-height: 130px; }
    .request-detail-workspace .request-comment-feed {
        min-height: 0;
        max-height: none;
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    .resident-request-screen { grid-template-rows: auto auto minmax(0, 1fr); }
    .resident-request-screen > .resident-request-hero {
        padding: 8px 14px;
        box-shadow: none;
    }
    .resident-request-screen .request-hero-title h1 { margin-top: 2px; font-size: 19px; }
    .resident-request-screen .request-hero-number { gap: 7px; font-size: 12px; }
    .resident-request-screen .resident-request-hero-meta {
        margin-top: 7px;
        padding-top: 7px;
        font-size: 12px;
    }
    .resident-request-screen .resident-request-hero-meta small { font-size: 9px; }
    .resident-request-main {
        min-height: 0;
        padding-right: 4px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        overflow: hidden;
    }
    .resident-request-main > * { flex: 0 0 auto; }
    .resident-description-card .section-card-header { padding: 6px 12px; font-size: 12px; }
    .resident-request-description { padding: 8px 12px; font-size: 13px; line-height: 1.4; }
    .resident-conversation-card {
        min-height: 150px;
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        overflow: hidden;
    }
    .resident-conversation-heading { padding: 8px 12px; flex: 0 0 auto; }
    .resident-conversation-heading h2 { font-size: 14px; }
    .resident-conversation-heading p { display: none; }
    .resident-chat-feed {
        min-height: 0;
        max-height: none;
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
    .resident-chat-composer { flex: 0 0 auto; }
    .resident-files-card { flex: 0 0 auto; }
    .resident-files-card > summary { min-height: 35px; padding: 6px 12px; }
    .resident-request-side .resident-progress-card { flex: 0 0 auto; }
    .resident-request-side .resident-history-card {
        min-height: 0;
        max-height: none;
        flex: 1 1 0;
    }
    .resident-history-card .request-timeline {
        min-height: 0;
        flex: 1 1 auto;
        overflow-y: auto;
    }
}

/* Give the problem text the full card width, including on narrow screens. */
.request-sort-link { color: inherit; text-decoration: none; }
.request-sort-link:hover, .request-sort-link:focus-visible { color: var(--primary); text-decoration: underline; }
.request-sort-link span { white-space: nowrap; }
.request-sort-mobile { display: none; }
@media (max-width: 760px) {
    .request-sort-mobile { display: grid; gap: 4px; min-width: 0; }
}
.request-detail-workspace .request-problem-card .request-description-prominent {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 16px 18px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
@media (min-width: 981px) {
    .request-detail-workspace .request-central-scroll { overflow-y: auto; }
}
