@font-face { font-family: Vazir; src: url('../fonts/Vazir-Regular.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Vazir; src: url('../fonts/Vazir-Bold.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }
:root { --ui-accent: #19395f; --ui-accent-hover: #122c49; --ui-border: #d6e0eb; --ui-background: #f2f5fa; --ui-panel: #fff; --ui-muted: #657180; }
[data-bs-theme="dark"] { --ui-accent: #a7ceff; --ui-accent-hover: #c6e0ff; --ui-border: #34495f; --ui-background: #101b28; --ui-panel: #18293c; --ui-muted: #a7b8cb; }
html { direction: rtl; }
body, input, button, select, textarea, table, .btn, .form-control, .form-select { font-family: Vazir, Tahoma, sans-serif !important; }
body { background: var(--ui-background); color: var(--bs-body-color); font-size: 13px; min-height: 100vh; }
a { color: var(--ui-accent); }
.app-container { max-width: 1480px; }
.top-header { background: var(--ui-panel); border-bottom: 1px solid var(--ui-border); }
.header-logo { width: 51px; height: 51px; object-fit: contain; }
.header-title { font-weight: 700; font-size: 17px; letter-spacing: -.2px; }
.header-caption { color: var(--ui-muted); font-size: 11px; margin-top: 5px; }
.primary-nav .nav-link { border: 1px solid transparent; color: var(--bs-body-color); padding: 9px 17px; border-radius: 5px; font-weight: 700; }
.primary-nav .nav-link:hover, .primary-nav .nav-link.is-active { border-color: var(--ui-border); background: var(--ui-background); color: var(--ui-accent); }
.card { border: 1px solid var(--ui-border); box-shadow: none !important; background: var(--ui-panel); }
.section-title { margin: 0; font-weight: 700; font-size: 19px; }
.section-description { margin-top: 8px; color: var(--ui-muted); font-size: 12px; }
.stat-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--ui-muted); }
.pill-filter { border-radius: 5px; }
.pill-filter.active { background: #19395f; color: #fff; border-color: #19395f; }
[data-bs-theme="dark"] .pill-filter.active { background: #315c8a; border-color: #315c8a; color: #fff; }
.pill-filter:not(.active) { color: var(--bs-body-color); border-color: var(--ui-border); }
.form-control, .form-select { border-color: var(--ui-border); font-size: 13px; min-height: 39px; }
.btn { font-size: 13px; }
.btn-primary { --bs-btn-bg: #19395f; --bs-btn-border-color: #19395f; --bs-btn-hover-bg: #122c49; --bs-btn-hover-border-color: #122c49; --bs-btn-active-bg: #0d223b; --bs-btn-active-border-color: #0d223b; }
[data-bs-theme="dark"] .btn-primary { --bs-btn-bg: #315c8a; --bs-btn-border-color: #315c8a; --bs-btn-hover-bg: #416d9b; --bs-btn-hover-border-color: #416d9b; }
.table { --bs-table-bg: transparent; font-size: 12px; margin-bottom: 0; }
.table th { font-weight: 700; background: var(--ui-background); color: var(--bs-body-color); white-space: nowrap; border-color: var(--ui-border); padding: 13px 12px; }
.table td { border-color: var(--ui-border); padding: 13px 12px; vertical-align: middle; }
.table tbody tr:hover { --bs-table-bg: rgba(25, 57, 95, .045); }
[data-bs-theme="dark"] .table tbody tr:hover { --bs-table-bg: rgba(255,255,255,.04); }
.address-cell { min-width: 220px; max-width: 410px; line-height: 1.85; }
.nowrap { white-space: nowrap; }
.office-type { border-radius: 3px; display: inline-block; padding: 5px 8px; font-weight: 700; font-size: 11px; }
.type-single { color: #234d76; background: rgba(35,77,118,.10); }
.type-shared { color: #315f90; background: rgba(49,95,144,.13); }
[data-bs-theme="dark"] .type-single { color: #99c3f4; }
[data-bs-theme="dark"] .type-shared { color: #b5d7ff; }
.pagination .page-link { color: var(--bs-body-color); border-color: var(--ui-border); }
.pagination .page-item.active .page-link { background: #19395f; border-color: #19395f; color: #fff; }
[data-bs-theme="dark"] .pagination .page-item.active .page-link { background: #315c8a; border-color: #315c8a; color: #fff; }
.site-footer { border-top: 1px solid var(--ui-border); padding-top: 15px; color: var(--ui-muted); font-size: 11px; text-align: center; }
.text-muted-ui { color: var(--ui-muted); }
.amount { direction: ltr; display: inline-block; unicode-bidi: isolate; white-space: nowrap; }
.dir-ltr { direction: ltr; text-align: right; unicode-bidi: isolate; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--ui-muted); }
.table-responsive { scrollbar-width: thin; }
.theme-switch { min-width: 104px; white-space: nowrap; }
@media(max-width: 768px) { .header-title { font-size: 14px; }.header-caption { font-size: 10px; }.section-title { font-size: 16px; }.primary-nav .nav-link { padding: 8px 10px; }.stat-value { font-size: 20px; }.app-container { padding-left: 12px; padding-right: 12px; }}
@media print { .top-header .theme-switch, .primary-nav, .no-print, .site-footer { display: none !important; } body { background: #fff !important; color:#000!important; } .card { border: 1px solid #aaa; } }
.offices-grid tbody tr.office-row { cursor: pointer; }
.offices-grid tbody tr.office-row td { user-select: none; -webkit-user-select: none; }
.offices-grid tbody tr.office-row:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: -2px; }
.offices-grid tbody tr.office-row.is-selected,
.offices-grid tbody tr.office-row.is-selected:hover { --bs-table-bg: #e7f0fb; background: #e7f0fb !important; }
[data-bs-theme="dark"] .offices-grid tbody tr.office-row.is-selected,
[data-bs-theme="dark"] .offices-grid tbody tr.office-row.is-selected:hover { --bs-table-bg: #254059; background: #254059 !important; }
.offices-grid tbody tr.office-row.is-selected td:first-child { border-right: 4px solid #19395f; }
[data-bs-theme="dark"] .offices-grid tbody tr.office-row.is-selected td:first-child { border-right-color: #83bdf8; }
.expiry-expired { color: #b42333; font-weight: 700; }
[data-bs-theme="dark"] .expiry-expired { color: #ff8f9b; }
/* Dates remain red only when an office has expired. Hover/focus reveals the original date. */
.expiry-expired { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.expiry-expired:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
.phone-link { color: var(--ui-accent); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.phone-link:hover, .phone-link:focus-visible { color: var(--ui-accent-hover); }
/* Shared right-hand navigation and report layouts. */
.app-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); align-items: start; gap: 20px; }
.app-sidebar { background: var(--ui-panel); border: 1px solid var(--ui-border); border-radius: 7px; padding: 12px; position: sticky; top: 14px; }
.app-content { min-width: 0; }
.sidebar-caption { display: block; padding: 9px 10px 7px; color: var(--ui-muted); font-size: 11px; font-weight: 700; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-nav .nav-link { display: block; border-radius: 5px; padding: 11px 12px; font-size: 12px; font-weight: 700; text-align: right; }
.sidebar-separator { height: 1px; background: var(--ui-border); margin: 8px 3px; }
.sidebar-nav .nav-link.is-active { border-color: #c2d7ee; background: #e7f0fb; color: #19395f; }
[data-bs-theme="dark"] .sidebar-nav .nav-link.is-active { border-color: #416c98; background: #263f59; color: #cce6ff; }
.report-table-wrap { max-width: 100%; overflow-x: auto; }
.report-table { min-width: 900px; font-size: 12px; }
.report-table th { white-space: nowrap; }
.report-table td { vertical-align: middle; max-width: 320px; }
.report-number { direction: ltr; unicode-bidi: isolate; white-space: nowrap; display: inline-block; font-variant-numeric: tabular-nums; }
.report-table tbody tr:hover { --bs-table-bg: rgba(25, 57, 95, .06); }
@media (max-width: 991.98px) {
    .app-layout { display: block; }
    .app-sidebar { position: static; margin-bottom: 15px; }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
    .sidebar-separator, .sidebar-nav .sidebar-caption { display: none; }
    .sidebar-nav .nav-link { flex: 1 1 auto; }
    .sidebar-caption { padding: 5px 8px 9px; }
}
@media print {
    .app-layout { display: block; }
    .app-sidebar { display: none; }
    .report-table { min-width: 0; }
}
/* All data grids keep one-line cells; wide content scrolls horizontally rather than changing row heights. */
.table-responsive, .report-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive > .table { width: max-content; min-width: 100%; table-layout: auto; }
.table th, .table td, .report-table th, .report-table td,
.offices-grid th, .offices-grid td { white-space: nowrap; overflow-wrap: normal; word-break: normal; max-width: none; vertical-align: middle; }
.table td.address-cell { white-space: nowrap; max-width: none; min-width: 0; line-height: 1.4; }
.table tbody tr { height: 48px; }
.table tbody td { line-height: 1.35; }
.table .phone-cell { width: 132px; min-width: 132px; max-width: 132px; white-space: normal; text-align: center; }
.table .phone-cell a { font-size: 10px; line-height: 1.1; max-width: 122px; white-space: normal; overflow-wrap: normal; display: inline-block; text-decoration: none; }
.table .phone-cell a:hover, .table .phone-cell a:focus-visible { text-decoration: underline; }
.table a.phone-value { unicode-bidi: isolate; direction: ltr; }
/* Read-only grids: prevent ordinary selection and clipboard copy, not extraction via HTTP/devtools. */
.table th, .table td { user-select: none; -webkit-user-select: none; -moz-user-select: none; }
.table td .expiry-expired { user-select: none; }
.landing-empty { min-height: 280px; }

/* Responsive fixed-width data grids: fit the available content width without x-scroll.
   Use concise headings, restrained spacing and title tooltips for abbreviated values. */
.app-container { max-width: 1700px; }
@media (min-width: 992px) {
    .app-layout { grid-template-columns: 205px minmax(0, 1fr); gap: 14px; }
}
.table-responsive, .report-table-wrap { max-width: 100%; overflow-x: hidden; }
.table-responsive > table.table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
}
.table-responsive table.table th,
.table-responsive table.table td {
    min-width: 0;
    max-width: none;
    padding: 10px 5px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.table-responsive table.table th { font-weight: 700; }
.table-responsive table.table tbody tr { height: 43px; }
.table-responsive table.table .report-number { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.table-responsive table.table td.address-cell { min-width: 0; max-width: none; }
.table-responsive table.table td.phone-cell {
    padding: 4px 2px;
    width: auto; min-width: 0; max-width: none;
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
}
.table-responsive table.table td.phone-cell a {
    max-width: 100%;
    font-size: 9.5px;
    line-height: 1.12;
    text-align: center;
    overflow-wrap: anywhere;
}
/* Distribution of the available width in the twelve-column laboratory report. */
.lab-grid th:nth-child(1), .lab-grid td:nth-child(1) { width: 17%; }
.lab-grid th:nth-child(2), .lab-grid td:nth-child(2) { width: 8%; }
.lab-grid th:nth-child(3), .lab-grid td:nth-child(3),
.lab-grid th:nth-child(4), .lab-grid td:nth-child(4) { width: 5%; }
.lab-grid th:nth-child(n+5):nth-child(-n+10),
.lab-grid td:nth-child(n+5):nth-child(-n+10) { width: 7%; }
.lab-grid th:nth-child(11), .lab-grid td:nth-child(11) { width: 11%; }
.lab-grid th:nth-child(12), .lab-grid td:nth-child(12) { width: 12%; }
.lab-grid th, .lab-grid td { font-size: 10px !important; padding: 9px 3px !important; }
.lab-grid td.phone-cell { padding: 4px 1px !important; }
.lab-grid td.phone-cell a { font-size: 9px !important; }
.contractor-grid th:nth-child(1), .contractor-grid td:nth-child(1) { width: 22%; }
.contractor-grid th:nth-child(2), .contractor-grid td:nth-child(2) { width: 7%; }
.contractor-grid th:nth-child(3), .contractor-grid td:nth-child(3) { width: 21%; }
.contractor-grid th:nth-child(4), .contractor-grid td:nth-child(4) { width: 14%; }
.contractor-grid th:nth-child(5), .contractor-grid td:nth-child(5) { width: 10%; }
.contractor-grid th:nth-child(6), .contractor-grid td:nth-child(6) { width: 12%; }
.contractor-grid th:nth-child(7), .contractor-grid td:nth-child(7) { width: 14%; }
.registry-grid th:nth-child(1), .registry-grid td:nth-child(1) { width: 10%; }
.registry-grid th:nth-child(2), .registry-grid td:nth-child(2) { width: 13%; }
.registry-grid th:nth-child(3), .registry-grid td:nth-child(3) { width: 15%; }
.registry-grid th:nth-child(4), .registry-grid td:nth-child(4),
.registry-grid th:nth-child(5), .registry-grid td:nth-child(5) { width: 12%; }
.registry-grid th:nth-child(6), .registry-grid td:nth-child(6) { width: 10%; }
.registry-grid th:nth-child(7), .registry-grid td:nth-child(7) { width: 19%; }
.registry-grid th:nth-child(8), .registry-grid td:nth-child(8) { width: 9%; }
.offices-grid th:nth-child(1), .offices-grid td:nth-child(1) { width: 5%; }
.offices-grid th:nth-child(2), .offices-grid td:nth-child(2) { width: 9%; }
.offices-grid th:nth-child(3), .offices-grid td:nth-child(3) { width: 10%; }
.offices-grid th:nth-child(4), .offices-grid td:nth-child(4) { width: 10%; }
.offices-grid th:nth-child(5), .offices-grid td:nth-child(5) { width: 16%; }
.offices-grid th:nth-child(6), .offices-grid td:nth-child(6) { width: 12%; }
.offices-grid th:nth-child(7), .offices-grid td:nth-child(7) { width: 20%; }
.offices-grid th:nth-child(8), .offices-grid td:nth-child(8) { width: 10%; }
.offices-grid th:nth-child(9), .offices-grid td:nth-child(9) { width: 8%; }
.offices-grid td:nth-child(9) .btn { padding: 4px 3px; font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* Mobile grids: preserve regular table rows and allow horizontal touch scrolling. */
@media (max-width: 767.98px) {
    .table-responsive, .report-table-wrap {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        touch-action: pan-x pan-y;
    }
    .table-responsive > table.table {
        display: table;
        width: max-content;
        min-width: 900px;
        max-width: none;
        table-layout: auto;
    }
    .table-responsive > table.table.report-table.lab-grid { min-width: 1180px; }
    .table-responsive > table.table.offices-grid { min-width: 1050px; }
    .table-responsive > table.table.registry-grid { min-width: 990px; }
    .table-responsive > table.table.contractor-grid { min-width: 890px; }
    .table-responsive > table.table thead { display: table-header-group; }
    .table-responsive > table.table tbody { display: table-row-group; }
    .table-responsive > table.table tbody tr {
        display: table-row;
        height: 44px;
        margin: 0;
        padding: 0;
        border-radius: 0;
    }
    .table-responsive > table.table th,
    .table-responsive > table.table td,
    .table-responsive > table.table tbody td.phone-cell {
        display: table-cell;
        width: auto !important;
        height: auto;
        min-width: 0;
        max-width: none;
        padding: 9px 8px !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
        font-size: 11px !important;
        text-align: right;
    }
    .table-responsive > table.table tbody td::before { content: none; display: none; }
    .table-responsive > table.table td.address-cell { white-space: nowrap; }
    .table-responsive > table.table td.phone-cell {
        width: 120px !important;
        min-width: 120px;
        max-width: 120px;
        padding: 4px 6px !important;
        white-space: normal;
        overflow: visible;
        text-align: center;
    }
    .table-responsive > table.table td.phone-cell a { font-size: 10px !important; }
    .table-responsive > table.table tbody td a,
    .table-responsive > table.table tbody td span {
        max-width: 100%;
    }
}
.phone-stack { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; max-width: 100%; line-height: 1.06; }
.table-responsive .phone-stack a { font-size: 9px !important; line-height: 1.07; white-space: nowrap; }
@media (max-width: 767.98px) { .table-responsive .phone-stack { align-items: center; } .table-responsive .phone-stack a { font-size: 10px !important; } }
/* Consultants: five columns fit the desktop grid, with touch scrolling on mobile. */
.consultant-grid th:nth-child(1), .consultant-grid td:nth-child(1) { width: 23%; }
.consultant-grid th:nth-child(2), .consultant-grid td:nth-child(2) { width: 15%; }
.consultant-grid th:nth-child(3), .consultant-grid td:nth-child(3) { width: 30%; }
.consultant-grid th:nth-child(4), .consultant-grid td:nth-child(4) { width: 19%; }
.consultant-grid th:nth-child(5), .consultant-grid td:nth-child(5) { width: 13%; }
.consultant-grid td.address-cell { min-width: 0; max-width: none; }
@media (max-width: 767.98px) {
    .table-responsive > table.table.consultant-grid { min-width: 940px; }
}
/* Registration report: dedicated county as the first column (nine columns total). */
.registry-grid th:nth-child(1), .registry-grid td:nth-child(1) { width: 11%; }
.registry-grid th:nth-child(2), .registry-grid td:nth-child(2) { width: 9%; }
.registry-grid th:nth-child(3), .registry-grid td:nth-child(3) { width: 11%; }
.registry-grid th:nth-child(4), .registry-grid td:nth-child(4) { width: 15%; }
.registry-grid th:nth-child(5), .registry-grid td:nth-child(5),
.registry-grid th:nth-child(6), .registry-grid td:nth-child(6) { width: 11%; }
.registry-grid th:nth-child(7), .registry-grid td:nth-child(7) { width: 9%; }
.registry-grid th:nth-child(8), .registry-grid td:nth-child(8) { width: 15%; }
.registry-grid th:nth-child(9), .registry-grid td:nth-child(9) { width: 8%; }
@media (max-width: 767.98px) {
    .table-responsive > table.table.registry-grid { min-width: 1080px; }
}
/* Consultant grid refinements: more room for the name and manager, compact address with full hover tooltip. */
.consultant-grid th:nth-child(1), .consultant-grid td:nth-child(1) { width: 29%; }
.consultant-grid th:nth-child(2), .consultant-grid td:nth-child(2) { width: 15%; }
.consultant-grid th:nth-child(3), .consultant-grid td:nth-child(3) { width: 22%; }
.consultant-grid th:nth-child(4), .consultant-grid td:nth-child(4) { width: 21%; }
.consultant-grid th:nth-child(5), .consultant-grid td:nth-child(5) { width: 13%; }
.table-responsive table.table.consultant-grid th,
.table-responsive table.table.consultant-grid td { font-size: 12px; }
.table-responsive table.table.consultant-grid th:first-child,
.table-responsive table.table.consultant-grid td:first-child { padding-right: 16px; padding-left: 8px; }
.table-responsive table.table.consultant-grid td.address-cell {
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: help;
}
.table-responsive table.table.consultant-grid td.phone-cell a { font-size: 10px; }
@media (max-width: 767.98px) {
    .table-responsive table.table.consultant-grid th:first-child,
    .table-responsive table.table.consultant-grid td:first-child { padding-right: 16px; padding-left: 8px; }
}
/* Active earth-well installers: compact five-column desktop grid; horizontal touch scroll on mobile. */
.earth-grid th:nth-child(1), .earth-grid td:nth-child(1) { width: 24%; }
.earth-grid th:nth-child(2), .earth-grid td:nth-child(2) { width: 18%; }
.earth-grid th:nth-child(3), .earth-grid td:nth-child(3) { width: 14%; }
.earth-grid th:nth-child(4), .earth-grid td:nth-child(4) { width: 30%; }
.earth-grid th:nth-child(5), .earth-grid td:nth-child(5) { width: 14%; }
.table-responsive table.table.earth-grid th,
.table-responsive table.table.earth-grid td { font-size: 12px; }
.table-responsive table.table.earth-grid th:first-child,
.table-responsive table.table.earth-grid td:first-child { padding-right: 16px; padding-left: 8px; }
.table-responsive table.table.earth-grid td.address-cell {
    min-width: 0; max-width: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: help;
}
.table-responsive table.table.earth-grid td.phone-cell a { font-size: 10px; }
@media (max-width: 767.98px) {
    .table-responsive > table.table.earth-grid { min-width: 950px; }
}
/* Natural gas contractors: compact county and phone columns, readable manager and address. */
.gas-grid th:nth-child(1), .gas-grid td:nth-child(1) { width: 14%; }
.gas-grid th:nth-child(2), .gas-grid td:nth-child(2) { width: 28%; }
.gas-grid th:nth-child(3), .gas-grid td:nth-child(3) { width: 16%; }
.gas-grid th:nth-child(4), .gas-grid td:nth-child(4) { width: 42%; }
.table-responsive table.table.gas-grid th,
.table-responsive table.table.gas-grid td { font-size: 12px; }
.table-responsive table.table.gas-grid th:first-child,
.table-responsive table.table.gas-grid td:first-child { padding-right: 14px; }
.table-responsive table.table.gas-grid td.address-cell {
    min-width: 0; max-width: none; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; cursor: help;
}
@media (max-width: 767.98px) {
    .table-responsive > table.table.gas-grid { min-width: 880px; }
}
/* Legal contractor manager and direct-call mobile number. */
.contractor-grid .manager-contact {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    white-space: nowrap;
    max-width: 100%;
}
.contractor-grid .manager-contact .manager-name { white-space: nowrap; }
.contractor-grid .manager-contact .phone-link { font-size: 10px; direction: ltr; }

/* Responsive right-side navigation drawer. Desktop keeps the persistent sidebar. */
.mobile-menu-toggle { display: none; }
.mobile-menu-backdrop { display: none; }
@media (max-width: 991.98px) {
    .top-header { position: sticky; top: 0; z-index: 1080; }
    .header-brand { gap: 10px !important; min-width: 0; }
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid var(--ui-border);
        color: var(--ui-accent);
        background: var(--ui-panel);
    }
    .menu-toggle-icon { width: 19px; height: 15px; display: inline-flex; flex-direction: column; justify-content: space-between; }
    .menu-toggle-icon span { display: block; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
    .mobile-menu-toggle.is-open .menu-toggle-icon span:first-child { transform: translateY(6.5px) rotate(45deg); }
    .mobile-menu-toggle.is-open .menu-toggle-icon span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.is-open .menu-toggle-icon span:last-child { transform: translateY(-6.5px) rotate(-45deg); }
    .app-layout { display: block; }
    .app-sidebar {
        display: block !important;
        position: fixed;
        top: var(--mobile-header-height, 78px);
        right: 0;
        bottom: 0;
        width: min(340px, 88vw);
        max-height: none;
        margin: 0;
        padding: 15px 13px 24px;
        overflow-x: hidden;
        overflow-y: auto;
        border-radius: 0;
        z-index: 1060;
        visibility: hidden;
        transform: translateX(105%);
        transition: transform .24s ease, visibility .24s ease;
        box-shadow: none;
    }
    .app-sidebar.is-open { visibility: visible; transform: translateX(0); box-shadow: -12px 0 32px rgba(12, 28, 46, .18); }
    body.mobile-menu-open .app-sidebar { visibility: visible; transform: translateX(0); box-shadow: -12px 0 32px rgba(12, 28, 46, .18); }
    .sidebar-caption { display: block !important; padding: 7px 10px 12px; }
    .sidebar-nav { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 5px; }
    .sidebar-nav .nav-link {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex: 0 0 auto;
        min-height: 48px;
        padding: 11px 13px;
        border: 1px solid transparent;
        background: transparent;
        white-space: normal;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }
    .sidebar-nav .nav-link:hover,
    .sidebar-nav .nav-link:focus-visible,
    .sidebar-nav .nav-link.is-active { border-color: var(--ui-border); background: var(--ui-background); }
    .mobile-menu-backdrop:not([hidden]) {
        display: block;
        position: fixed;
        top: var(--mobile-header-height, 78px);
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: rgba(8, 18, 30, .48);
        z-index: 1050;
    }
    body.mobile-menu-open { overflow: hidden; }
}
@media (max-width: 575.98px) {
    .header-logo { width: 38px; height: 38px; }
    .header-title { font-size: 12px; }
    .header-caption { font-size: 9px; margin-top: 3px; }
    .theme-switch { min-width: 0; padding: 6px 8px; font-size: 10px; }
}
@media (max-width: 359.98px) {
    .header-caption { display: none; }
    .header-logo { width: 34px; height: 34px; }
    .mobile-menu-toggle { flex-basis: 38px; width: 38px; height: 38px; }
    .header-title { font-size: 11px; }
}
@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
    .app-sidebar, .menu-toggle-icon span { transition: none; }
}
@media print {
    .mobile-menu-toggle, .mobile-menu-backdrop { display: none !important; }
}

/* Gas contractor mobile numbers: align to the right, beside the contractor name. */
.table-responsive table.table.gas-grid th:nth-child(3),
.table-responsive table.table.gas-grid td:nth-child(3) {
    text-align: right !important;
    direction: rtl;
    padding-right: 14px !important;
}
.table-responsive table.table.gas-grid td:nth-child(3) a {
    display: inline-block;
    direction: ltr;
    text-align: right;
    unicode-bidi: isolate;
}
@media (max-width: 767.98px) {
    .table-responsive > table.table.gas-grid th:nth-child(3),
    .table-responsive > table.table.gas-grid td:nth-child(3) {
        min-width: 145px;
        width: 145px !important;
        text-align: right !important;
        padding-right: 12px !important;
    }
}