:root {
    --red: #d80d24;
    --red-dark: #b4081b;
    --navy: #17243d;
    --text: #253047;
    --muted: #59657a;
    --line: #e1e5eb;
    --canvas: #f6f6f4;
    --surface: #fff;
    --danger: #9f1e30;
    --shadow: 0 5px 18px rgba(26, 35, 55, .055);
    --sidebar-bg: #e9ecf1;
    --sidebar-hover: #dce2ea;
    --sidebar-active: #d80d24;
    --sidebar-text: #344052;
    --sidebar-muted: #898d9e;
    --button-radius: 999px;
    --card-radius: 12px;
    --field-radius: 10px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --focus-ring: 0 0 0 3px rgba(216, 13, 36, .22);
}

/* Rental car imagery, shared by list rows and the rental detail summary. */
.car-photo-frame { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; border: 1px solid #dce2e9; background: #edf0f4; color: #8290a2; }
.car-photo-frame > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.car-photo-frame > .car-photo-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(145deg, #e9edf2, #f6f7f9); }
.car-photo-frame .app-icon { width: 24px; height: 24px; }
.rental-car-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rental-list-photo { width: 54px; height: 46px; border-radius: 8px; }
.rental-car-name { min-width: 0; color: #1d2b42; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.rental-detail-strip { gap: 16px; }
.rental-detail-photo { width: 142px; height: 96px; border-radius: 9px; }
.rental-detail-photo .app-icon { width: 42px; height: 42px; }
.rental-detail-strip-info { display: grid; gap: 2px; min-width: 0; }
.rental-detail-strip-info strong { font-size: 1.12rem; line-height: 1.4; }
.rental-detail-strip-info span { font-size: .88rem; }
.renter-contact-phone { display: block; margin-top: 2px; color: #526176; font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; }
.rental-detail-number { color: var(--red-dark); font-weight: 750; }
.rental-detail-strip > .status { margin-left: auto; }
@media (max-width: 680px) { .rental-detail-photo { width: 100px; height: 78px; } .rental-detail-strip-info { flex: 1 1 140px; } .rental-detail-strip > .status { margin-left: 0; } }

/* Compact view switching and modal-only filters. */
.view-chip-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.view-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border: 1px solid #d9dfe8; border-radius: 999px; background: #fff; color: #46536a; text-decoration: none; font-size: .9rem; font-weight: 700; line-height: 1.4; cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
.view-chip:hover { background: #fff4f5; border-color: #e5a9b2; color: var(--red-dark); }
.view-chip.is-active { background: #fff0f2; border-color: var(--red); color: var(--red-dark); box-shadow: inset 0 0 0 1px rgba(216,13,36,.15); }
.view-chip:focus-visible { outline: 3px solid rgba(216,13,36,.4); outline-offset: 2px; }
.filter-trigger { white-space: nowrap; }
.filter-trigger svg { width: 18px; height: 18px; }
.detail-filter-action { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.dialog-backdrop { animation: filter-backdrop-in .18s ease-out both; }
.app-dialog { animation: filter-dialog-in .22s cubic-bezier(.2,.8,.2,1) both; }
@keyframes filter-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes filter-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .dialog-backdrop, .app-dialog { animation: none; } .view-chip { transition: none; } }
@media (max-width: 680px) { .view-chip-group { gap: 6px; } .view-chip { padding-inline: 12px; font-size: .85rem; } }
html, body { font-family: "Noto Sans Myanmar", "Myanmar Text", "Segoe UI", sans-serif; font-size: 16px; line-height: 1.55; color: var(--text); background: var(--canvas); }
html:lang(en) body { font-family: Inter, "Segoe UI", Arial, sans-serif; }
html:lang(zh-CN) body { font-family: "Microsoft YaHei UI", "Noto Sans SC", "Segoe UI", sans-serif; }
body { min-width: 320px; }
button, input, select, textarea { font: inherit; }
a { color: var(--red-dark); }
:focus-visible { outline: 3px solid rgba(216, 13, 36, .48); outline-offset: 2px; }
.btn:focus-visible, .app-input:focus-visible, .app-select:focus-visible, .app-textarea:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; box-shadow: var(--focus-ring); }
.btn, .btn-primary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 9px 16px; border-radius: var(--button-radius); text-decoration: none; font-size: .91rem; line-height: 1.5; font-weight: 650; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn.primary, .btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover, .btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn.secondary { color: var(--text); background: #fff; border-color: var(--line); }
.btn.secondary:hover { background: #f8f9fb; border-color: #bbc3ce; }
.btn.danger { color: var(--danger); background: #fff; border-color: #d99ca5; }
.btn.danger:hover { background: #fff0f2; border-color: var(--danger); }
.btn:disabled { opacity: .65; cursor: not-allowed; box-shadow: none; }
.btn:active:not(:disabled) { box-shadow: inset 0 2px 6px rgba(23, 36, 61, .13); }
.app-dialog header .dialog-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer; }
.app-dialog header .dialog-close:hover { background: #f4f5f7; }
.app-dialog header .dialog-close .app-icon { width: 19px; height: 19px; }
.btn-link { color: var(--red-dark); }
.app-input, .app-select, .app-textarea { min-height: 44px; border-radius: var(--field-radius); font-size: .94rem; border-color: #cfd6e0; line-height: 1.5; }
.app-input:hover:not(:disabled), .app-select:hover:not(:disabled), .app-textarea:hover:not(:disabled) { border-color: #aeb8c7; }
.app-input.invalid, .app-select.invalid, .app-textarea.invalid { border-color: var(--danger); }
.app-input[readonly] { color: #3c485c; background: #f2f4f6; }
.app-input:disabled, .app-select:disabled, .app-textarea:disabled { background: #f2f4f6; color: #637087; }
label { font-size: .89rem; line-height: 1.45; margin: 13px 0 6px; }
.form-note, .module-card small, .car-meta, .setup-log-foot { font-size: .84rem; color: var(--muted); }
.form-grid { gap: 7px 18px; }
.form-grid > div { min-width: 0; }
.form-grid .full { grid-column: 1 / -1; }
.page-header { margin-bottom: var(--space-5); align-items: center; }
.page-header h1 { font-size: clamp(1.5rem, 2vw, 1.85rem); line-height: 1.4; margin-bottom: 6px; }
.page-header p { font-size: .95rem; max-width: 68ch; }
.page-title-accessible { 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; }
.page-header-actions-only { justify-content: flex-end; margin-bottom: 18px; }
.page-header-actions-only .page-actions { width: 100%; justify-content: flex-end; }
.page-header-actions-only:has(.page-actions:empty) { display: none; }
.car-list-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; margin-right: auto; color: var(--navy); font-family: "Noto Sans Myanmar", "Myanmar Text", "Pyidaungsu", system-ui, sans-serif; font-size: 1rem; font-weight: 700; line-height: 1.6; }
.car-list-summary span + span { color: #245d45; }
.car-status-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 2px 0 16px; padding: 9px 13px; border: 1px solid #e1e5eb; border-radius: 10px; background: #fff; color: #26334a; }
.car-status-legend > strong { flex: none; font-size: .82rem; }
.car-status-legend-items { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 13px; }
.car-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: .79rem; font-weight: 650; white-space: nowrap; }
.car-legend-swatch { display: inline-block; width: 12px; height: 12px; border: 2px solid; border-radius: 50%; }
.car-legend-swatch.available { border-color: #19cb78; background: #d9ffea; }
.car-legend-swatch.renting { border-color: #d80d24; background: #ffe2e7; }
.car-legend-swatch.maintenance { border-color: #d99012; background: #fff0bc; }
.car-legend-swatch.paymentdue { border-color: #b85c0b; background: #ffe2c4; }
.car-legend-swatch.inactive { border-color: #8c97a8; background: #e7ebf0; }
.car-status-legend > small { color: #647187; font-size: .74rem; }
.breadcrumb { margin-bottom: 7px; font-size: .82rem; color: var(--muted); }
.page-actions { flex-wrap: wrap; align-items: center; }
.panel, .stat-card, .module-card, .auth-card, .setup-header, .setup-main, .setup-log-panel { border-radius: var(--card-radius); border-color: var(--line); box-shadow: var(--shadow); }
.panel-body { padding: var(--space-5); }
.toolbar { flex-wrap: wrap; gap: 12px; }
.toolbar-group { flex-wrap: wrap; }
.data-table { font-variant-numeric: tabular-nums; }
.data-table th { font-size: .82rem; letter-spacing: 0; text-transform: none; color: #3f4c62; white-space: nowrap; padding: 13px 15px; }
.data-table td { font-size: .91rem; line-height: 1.5; padding: 14px 15px; vertical-align: middle; }
.data-table tbody tr:hover { background: #fafbfc; }
.data-table td:has(> .status), .data-table th:last-child { white-space: nowrap; }
.rental-charge-table .charge-date-reference > span { display: block; }
.rental-charge-table .charge-date-reference > .row-title { margin-top: 3px; }
.rental-charge-table tfoot th, .rental-charge-table tfoot td { padding: 12px 15px; border-top: 2px solid #dce3ea; background: #f8fafc; font-size: .87rem; font-weight: 750; }
.rental-charge-table tfoot td.money { text-align: right; }
@media (max-width: 680px) { .detail-explorer .rental-charge-table tbody td.charge-date-reference { display: block; text-align: left; } .detail-explorer .rental-charge-table tbody td.charge-date-reference::before { display: none; } .detail-explorer .rental-charge-table tfoot { display: block; padding: 10px; } .detail-explorer .rental-charge-table tfoot tr { display: grid; padding: 12px; border: 1px solid #dce3ea; border-radius: 9px; background: #f8fafc; } .detail-explorer .rental-charge-table tfoot th, .detail-explorer .rental-charge-table tfoot td { padding: 4px 0; border: 0; background: transparent; text-align: left; } .detail-explorer .rental-charge-table tfoot td.money { display: flex; justify-content: space-between; gap: 10px; text-align: right; } .detail-explorer .rental-charge-table tfoot td.money::before { content: attr(data-label); color: var(--table-muted); font-weight: 600; text-align: left; } .detail-explorer .rental-charge-table tfoot td:last-child:empty { display: none; } }
.money { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-icon.green, .stat-icon.red, .stat-icon.amber, .stat-icon.orange { background: #f3f4f7; color: var(--red); }
.stat-grid { gap: 16px; }
.stat-card { min-height: 116px; padding: 22px; }
.stat-card strong { font-size: 1.45rem; line-height: 1.3; }
.stat-card small { font-size: .86rem; color: var(--muted); }
.module-grid { gap: 16px; }
.module-card { padding: 22px; }
.module-card:hover { border-color: #e9a7b0; }
.dialog-backdrop { background: rgba(17, 24, 39, .55); }
.app-dialog { border: 1px solid #e2e7ee; border-radius: var(--card-radius); max-height: min(92dvh, 960px); display: flex; flex-direction: column; }
.app-dialog header, .app-dialog footer { flex: none; background: #fff; }
.app-dialog header { gap: var(--space-3); padding: var(--space-3) var(--space-5); }
.app-dialog header h2 { font-size: 1.2rem; line-height: 1.5; overflow-wrap: anywhere; }
.app-dialog .dialog-body { min-height: 0; overflow: auto; padding: var(--space-4) var(--space-5); }
.app-dialog.car-rental-full-dialog { width: min(1500px, calc(100vw - 24px)); height: min(980px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); animation: none; transform: none; }
.app-dialog.car-rental-full-dialog .dialog-body { flex: 1; min-height: 0; overflow: auto; padding: 16px 20px; }
@media (max-width: 680px) { .dialog-backdrop:has(.car-rental-full-dialog) { padding: 0; } .app-dialog.car-rental-full-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; } .app-dialog.car-rental-full-dialog .dialog-body { padding: 12px; } }
.app-dialog footer { position: sticky; bottom: 0; padding: var(--space-3) var(--space-5); }
.dialog-close { min-width: 44px; min-height: 44px; border-radius: 50%; color: var(--text); cursor: pointer; }
.dialog-close:hover { background: #f2f4f6; }
.confirm-impact { padding: 12px 14px; background: #fff7e7; border-left: 3px solid #b87a16; color: #67440b; }
.state-panel { padding: clamp(24px, 4vw, 40px); background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius); }
.state-panel strong { display: block; font-size: 1.05rem; margin-bottom: 7px; }
.state-panel p { margin: 0 0 12px; overflow-wrap: anywhere; }
.state-icon { width: 48px; height: 48px; border: 1px solid #f0dce0; border-radius: 50%; background: #fff7f8; display: grid; place-items: center; margin: 0 auto var(--space-3); color: var(--red-dark); }
.state-icon .app-icon { width: 22px; height: 22px; }
.error-state .state-icon { border-color: #f2c7cf; background: #fff0f2; }
.state-actions { margin-top: 14px; }
.state-skeleton { max-width: 600px; margin: 16px auto 0; display: grid; gap: 9px; }
.state-skeleton span { height: 13px; border-radius: 6px; background: #eceef2; }
.state-skeleton span:nth-child(2) { width: 82%; }
.state-skeleton span:nth-child(3) { width: 66%; }
.search-select-input { position: relative; }
.search-select-input .app-input { padding-right: 50px; }
.select-clear { position: absolute; right: 1px; top: 0; display: grid; place-items: center; width: 44px; height: 44px; background: transparent; border: 0; color: var(--muted); border-radius: 50%; cursor: pointer; }
.select-clear:hover { background: #f1f2f4; color: var(--text); }
.select-clear .app-icon { width: 16px; height: 16px; }
.select-clear:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.search-select-options { border-radius: 8px; margin-top: 4px; }
.search-select-option { min-height: 44px; font-size: .91rem; }
.search-select-option.is-active, .search-select-option:hover { background: #fff0f2; color: #8d1422; }
.app-shell.app-shell { grid-template-columns: 246px minmax(0, 1fr); background: var(--canvas); }
.app-shell:has(.sidebar.is-collapsed) { grid-template-columns: 70px minmax(0, 1fr); }
.sidebar.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--sidebar-bg); border-right: 1px solid #d6dbe3; box-shadow: 4px 0 18px rgba(36, 34, 55, .035); z-index: 31; }
.main-area { min-width: 0; }
.topbar.topbar { height: 76px; padding: 0 clamp(18px, 3vw, 40px); border-bottom: 1px solid #e8ebef; box-shadow: 0 2px 12px rgba(18, 30, 48, .035); }
.topbar-leading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-leading strong { display: block; font-size: 1.04rem; color: var(--navy); }
.topbar-leading small { display: block; font-size: .8rem; color: var(--muted); }
.top-actions { gap: 13px; }
.icon-action { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--text); text-decoration: none; }
.icon-action:hover { background: #fff2f3; color: var(--red); }
.notification-count { position: absolute; top: 0; right: 0; min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 9px; background: var(--red); color: #fff; font-size: .65rem; }
.user-menu-wrap { position: relative; }
.user-chip { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); background: #fff; border-radius: var(--button-radius); cursor: pointer; }
.user-chip:hover { background: #f9fafb; border-color: #cbd1da; }
.topbar-user-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: 7px; background: #f3f4f6; color: var(--red-dark); }
.topbar-user-icon .app-icon { width: 18px; height: 18px; }
.topbar-user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chevron { color: var(--muted); font-size: 1.1rem; }
.user-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; padding: 6px; z-index: 40; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 43px; padding: 8px 13px; border: 0; border-radius: 13px; text-align: left; color: var(--text); background: #fff; text-decoration: none; cursor: pointer; }
.user-menu a:hover, .user-menu button:hover { background: #fff1f3; color: var(--red-dark); }
.app-icon { flex: none; }
.page-content.page-content { min-width: 0; padding: clamp(18px, 2.5vw, 32px); max-width: 1600px; margin: 0 auto; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: #fff; }
.sidebar-backdrop { display: none; }
.nav-list .nav-group a, .nav-list .nav-group a:visited { min-height: 46px; margin: 0; padding: 8px 13px; font-size: .875rem; font-weight: 400; line-height: 1.55; border-radius: 24px; color: var(--sidebar-text); text-decoration: none; }
.nav-list .nav-group a:hover { background: var(--sidebar-hover); color: #b4081b; text-decoration: none; }
.nav-list .nav-group a.active, .nav-list .nav-group a.active:visited { background: linear-gradient(100deg, #df1b32, #c90c25); color: #fff; box-shadow: 0 5px 13px rgba(216, 13, 36, .17); font-weight: 500; text-decoration: none; }
.nav-list .nav-group a:focus-visible { outline: 2px solid #d80d24; outline-offset: 2px; }
.nav-list .nav-group a .app-icon { color: #777b8c; }
.nav-list .nav-group a:hover .app-icon { color: #b4081b; }
.nav-list .nav-group a.active .app-icon { color: #fff; }
.sidebar.is-collapsed .brand { justify-content: center; padding-inline: 9px; min-height: 110px; flex-wrap: wrap; align-content: center; gap: 8px; }
.sidebar.is-collapsed .brand-copy, .sidebar.is-collapsed .sidebar-user, .sidebar.is-collapsed .nav-list a span { display: none; }
.sidebar.is-collapsed .sidebar-collapse-toggle { margin: 0; }
.sidebar.is-collapsed .nav-list { padding-inline: 10px; }
.sidebar.is-collapsed .nav-list .nav-group a { justify-content: center; padding-inline: 0; border-radius: 50%; }
.sidebar.is-collapsed .nav-list .nav-group a .app-icon { width: 20px; height: 20px; }
.sidebar.is-collapsed .sidebar-footer { justify-content: center; padding-inline: 0; margin-inline: 10px; }
.auth-card { padding: 32px; }
.auth-card .btn.full { margin-top: 14px; }
.setup-log li { font-size: .84rem; grid-template-columns: 90px 80px 1fr; }
.setup-step strong { font-size: .85rem; }
.setup-step small { font-size: .78rem; }
.setup-badge { font-size: .78rem; }
.setup-log-foot { font-size: .78rem; }
@media (max-width: 900px) {
    .app-shell.app-shell { display: block; }
    .app-shell:has(.sidebar.is-collapsed) { display: block; }
    .sidebar.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(320px, 88vw); height: 100vh; transform: translateX(-105%); transition: transform .18s ease; box-shadow: 10px 0 30px rgba(0,0,0,.16); }
    .sidebar.sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 30; border: 0; background: rgba(20, 27, 42, .48); }
    .nav-toggle { display: grid; place-items: center; cursor: pointer; }
    .brand { justify-content: flex-start; }
    .nav-list .nav-group a { justify-content: flex-start; }
    .sidebar.is-collapsed .brand { justify-content: flex-start; flex-wrap: nowrap; padding-inline: 14px; min-height: 82px; }
    .sidebar.is-collapsed .brand-copy, .sidebar.is-collapsed .sidebar-user, .sidebar.is-collapsed .nav-list a span { display: initial; }
    .sidebar.is-collapsed .nav-list { padding-inline: 12px; }
    .sidebar.is-collapsed .nav-list .nav-group a { justify-content: flex-start; padding-inline: 13px; border-radius: 24px; }
    .sidebar.is-collapsed .sidebar-footer { justify-content: flex-start; padding-inline: 8px; margin-inline: 12px; }
    .sidebar-collapse-toggle { display: none; }
}
@media (max-width: 680px) {
    .page-content.page-content { padding: 18px 14px 32px; }
    .topbar.topbar { padding: 0 14px; height: 68px; }
    .topbar-leading small { display: none; }
    .topbar-leading strong { font-size: .92rem; }
    .user-chip { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .page-header { align-items: flex-start; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1 1 auto; }
    .stat-grid, .module-grid, .car-grid, .form-grid { grid-template-columns: 1fr; }
    .app-dialog, .app-dialog.wide { width: min(100%, 96vw); }
    .app-dialog footer { flex-wrap: wrap; }
    .app-dialog footer .btn { flex: 1; }
    .data-table { min-width: 640px; }
    .setup-log li { grid-template-columns: 75px 1fr; }
}

/* Read-only entity detail drill-downs. */
.entity-information-card { margin: 10px 0 14px; }
.entity-information-card h2 { margin: 0 0 12px; font-size: 1.08rem; }
.entity-information-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.entity-information-grid > div { display: grid; align-content: start; gap: 5px; min-width: 0; padding: 12px 14px; border: 1px solid #e8edf2; border-radius: 9px; background: #fbfcfd; }
.entity-information-grid strong { color: #1d2b42; font-size: 1rem; overflow-wrap: anywhere; }
.detail-profile-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.detail-profile-summary > div { display: grid; gap: 6px; min-width: 0; padding: 10px 14px; border: 1px solid #e8edf2; border-radius: 9px; background: #fbfcfd; }
.detail-profile-summary strong { color: #1d2b42; font-size: 1rem; overflow-wrap: anywhere; }
.detail-explorer { margin: 24px 0 34px; }
.detail-explorer-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.detail-explorer-heading h2 { margin: 0; color: #1d2b42; font-size: 1.17rem; }
.detail-tabs-shell { min-width: 0; margin-bottom: 16px; border-bottom: 1px solid #dce2e9; background: #fff; }
.detail-tabs { display: flex; align-items: stretch; gap: 18px; overflow-x: auto; padding: 0 4px; scrollbar-width: thin; scrollbar-color: #b9c3d0 transparent; scroll-snap-type: x proximity; }
.detail-tabs .detail-tab { position: relative; flex: none; min-height: 48px; padding: 10px 8px 13px; border: 0; border-radius: 0; background: transparent; color: #5c687a; font-size: .94rem; font-weight: 700; line-height: 1.5; white-space: nowrap; scroll-snap-align: start; cursor: pointer; transition: color .16s ease, background .16s ease; }
.detail-tabs .detail-tab:hover { background: #fff5f6; color: var(--red-dark); }
.detail-tabs .detail-tab.active { color: var(--red-dark); }
.detail-tabs .detail-tab.active::after { position: absolute; right: 6px; bottom: 0; left: 6px; height: 3px; border-radius: 3px 3px 0 0; background: var(--red); content: ""; }
.detail-tabs .detail-tab:focus-visible { outline: 3px solid rgba(216,13,36,.4); outline-offset: -3px; }
.detail-tab-panel { min-width: 0; }
.detail-tab-panel:focus { outline: none; }
.detail-tab-panel:focus-visible { outline: 3px solid rgba(216,13,36,.35); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .detail-tabs .detail-tab { transition: none; } }
.detail-filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.detail-filter-bar > div { display: grid; gap: 4px; min-width: 150px; }
.detail-filter-bar label { color: #40506a; font-size: .82rem; font-weight: 650; }
@media (max-width: 680px) {
    .entity-information-grid { grid-template-columns: 1fr; }
    .detail-profile-summary { grid-template-columns: 1fr 1fr; }
    .detail-filter-bar > div { flex: 1 1 140px; min-width: 0; }
    .detail-filter-bar .btn { flex: 1 1 130px; }
}
@media (max-width: 600px) {
    .detail-explorer .data-table { min-width: 0; }
    .detail-explorer .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .detail-explorer .data-table tbody { display: grid; gap: 10px; padding: 10px; }
    .detail-explorer .data-table tbody tr { display: grid; gap: 6px; padding: 12px; border: 1px solid #e4e9ef; border-radius: 9px; }
    .detail-explorer .data-table tbody td { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 28px; height: auto; padding: 2px 0; border: 0; text-align: right; }
    .detail-explorer .data-table tbody td::before { content: attr(data-label); flex: 0 0 38%; color: var(--table-muted); font-size: .8rem; font-weight: 600; text-align: left; }
    .detail-explorer .data-table tbody td.money { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Guided operational workflows */
.workflow-layout { max-width: 1080px; margin: 0 auto; display: grid; gap: 18px; }
.workflow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.workflow-steps:has(.workflow-step:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workflow-step { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 8px 14px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--muted); font-weight: 650; cursor: pointer; }
.workflow-step span { display: grid; place-items: center; width: 29px; height: 29px; flex: none; border-radius: 50%; background: #eef0f3; color: var(--muted); font-size: .8rem; }
.workflow-step.active { border-color: var(--red); background: #fff5f6; color: var(--red-dark); }
.workflow-step.active span { background: var(--red); color: #fff; }
.workflow-step.done { color: var(--text); }
.workflow-step.done span { background: #e8f5ee; color: #126b3f; }
.workflow-panel { min-height: 420px; }
.workflow-panel h2 { margin: 0 0 7px; font-size: 1.28rem; }
.workflow-panel > .muted { margin: 0 0 22px; }
.workflow-panel .form-grid { margin-top: 20px; }
.renter-select-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: end; gap: 8px; min-width: 0; }
.renter-add-button { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 1.35rem; line-height: 1; }
.workflow-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 22px; margin-top: 24px; border-top: 1px solid var(--line); }
.workflow-actions > a:first-child { margin-right: auto; }
.calculation-summary, .review-grid { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(170px, 1fr); gap: 0 22px; margin-top: 22px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.calculation-summary > *, .review-grid > * { padding: 11px 16px; border-bottom: 1px solid var(--line); }
.calculation-summary > :nth-last-child(-n+2), .review-grid > :nth-last-child(-n+2) { border-bottom: 0; }
.calculation-summary span, .review-grid span { color: var(--muted); background: #f8f9fb; }
.calculation-summary strong, .review-grid strong { text-align: right; font-weight: 700; }
.detail-facts .review-grid dt { color: var(--muted); background: #f8f9fb; margin: 0; }
.detail-facts .review-grid dd { text-align: right; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.context-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 13px 16px; background: #f8f9fb; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.context-strip strong { color: var(--navy); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.detail-grid > .panel { min-width: 0; }
.detail-grid h2 { font-size: 1.05rem; }
.detail-grid .review-grid { margin: 0; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rental-action-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 9px; margin: 18px 0 24px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rental-action-bar .rental-action, .rental-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 16px; font-weight: 700; text-decoration: none; white-space: nowrap; border-radius: var(--button-radius); box-shadow: 0 2px 7px rgb(12 28 48 / 8%); transition: transform .15s ease, box-shadow .15s ease; }
.rental-action .app-icon { width: 18px; height: 18px; flex: none; }
.rental-action-bar .rental-void-action { order: 99; }
.car-financial-summary { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.car-financial-metric { display: grid; gap: 7px; min-width: 0; padding: 17px 19px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 5px 18px rgb(12 28 48 / 6%); }
.car-financial-metric span { color: var(--muted); font-weight: 700; }
.car-financial-metric strong { color: var(--navy); font-size: 1.3rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.car-financial-metric small { color: var(--muted); }
@media(max-width:1000px){.car-financial-summary{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:520px){.car-financial-summary{grid-template-columns:1fr;}}
.rental-action:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 14px rgb(12 28 48 / 13%); }
.rental-action:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.btn.danger-outline { color: #ae1730; border: 1px solid #e7a0ac; background: #fff7f8; }
.btn.danger-outline:hover:not(:disabled) { background: #ffe8ec; border-color: #cd4259; }
@media (max-width: 640px) { .rental-action-bar .rental-action { white-space: normal; text-align: center; } }
@media (prefers-reduced-motion: reduce) { .rental-action { transition: none; } .rental-action:hover:not(:disabled) { transform: none; } }
.work-queue { display: grid; gap: 8px; }
.work-queue a { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); text-decoration: none; }
.work-queue a:hover { border-color: #e99aa6; background: #fff8f9; }
.work-queue strong { color: var(--red-dark); }
.money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.detail-car-image { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 8px; margin: 12px 0 18px; }
.stat-card { text-decoration: none; color: inherit; }
.stat-card:hover { border-color: #e99aa6; }

/* Dashboard: live operational KPIs and compact, accessible trend charts. */
.dashboard-kpi-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 12px 0 18px; }
.dashboard-kpi { min-width: 0; min-height: 102px; padding: 18px; text-decoration: none; color: inherit; }
.dashboard-kpi strong { font-size: clamp(1.1rem,1.5vw,1.5rem); overflow-wrap: anywhere; }
.dashboard-kpi:focus-visible, .dashboard-work-grid a:focus-visible, .dashboard-bar-link:focus-visible { outline: 3px solid rgba(216,13,36,.45); outline-offset: 3px; }
.dashboard-work-section { margin-bottom: 22px; }
.dashboard-work-section h2, .dashboard-charts-heading h2 { margin: 0 0 13px; font-size: 1.12rem; }
.dashboard-work-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.dashboard-work-grid a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); text-decoration: none; background: #fbfcfd; }
.dashboard-work-grid a:hover { border-color: #e99aa6; background: #fff8f9; }
.dashboard-work-grid strong { color: var(--red-dark); font-size: 1.05rem; }
.dashboard-charts-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 13px; }
.dashboard-charts-heading h2 { margin: 0 auto 0 0; }
.dashboard-charts-heading label { font-weight: 700; }
.dashboard-charts-heading select { width: 112px; min-height: 44px; }
.dashboard-charts-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 28px; }
.dashboard-chart-panel { min-width: 0; }
.dashboard-chart-panel h3 { font-size: 1.04rem; margin: 0 0 12px; }
.dashboard-line-panel { grid-column: 1 / -1; }
.dashboard-chart-legend { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.dashboard-chart-legend span::before { display: inline-block; width: 12px; height: 3px; margin-right: 7px; vertical-align: middle; border-radius: 3px; content: ""; }
.dashboard-legend-billed::before { background: var(--red); }
.dashboard-legend-received::before { background: #243953; }
.dashboard-line-chart { display: block; width: 100%; height: auto; max-height: 300px; margin-top: 9px; overflow: visible; }
.dashboard-chart-axis { stroke: #dfe5eb; stroke-width: 1; }
.dashboard-chart-zero { stroke: #b3bfca; stroke-width: 1; stroke-dasharray: 4 5; }
.dashboard-series-billed, .dashboard-series-received { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-series-billed { stroke: var(--red); }
.dashboard-series-received { stroke: #243953; }
.dashboard-point-billed { fill: var(--red); stroke: white; stroke-width: 2; }
.dashboard-point-received { fill: #243953; stroke: white; stroke-width: 2; }
.dashboard-line-chart circle:focus-visible, .dashboard-donut circle:focus-visible { outline: 3px solid var(--red-dark); }
.dashboard-chart-tick { fill: #66758b; font-size: 13px; font-weight: 700; }
.dashboard-month-axis { display: flex; justify-content: space-between; padding: 0 2% 0 7.5%; color: #66758b; font-size: .76rem; font-weight: 700; }
.dashboard-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.dashboard-bars { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.dashboard-bar-link { display: grid; grid-template-columns: 38px minmax(100px,1fr) minmax(70px,2fr) auto; align-items: center; gap: 11px; min-height: 44px; text-decoration: none; color: var(--text); }
.dashboard-bar-photo { width: 38px; height: 38px; border-radius: 10px; overflow: hidden; }
.dashboard-bar-photo img, .dashboard-bar-photo .car-photo-placeholder { width: 100%; height: 100%; object-fit: cover; }
.dashboard-bar-name { font-weight: 700; overflow-wrap: anywhere; }
.dashboard-bar-track { display: block; height: 12px; border-radius: 8px; background: #f3e8ea; overflow: hidden; }
.dashboard-bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--red-dark),var(--red)); }
.dashboard-bar-link strong { text-align: right; font-size: .86rem; white-space: nowrap; }
.dashboard-bar-link:hover .dashboard-bar-name { color: var(--red-dark); text-decoration: underline; }
.dashboard-donut-wrap { display: flex; align-items: center; gap: 16px; }
.dashboard-donut-graphic { position: relative; width: min(190px,45%); flex: none; }
.dashboard-donut { display: block; width: 100%; }
.dashboard-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.dashboard-donut-center strong { color: var(--text); font-size: 1.5rem; line-height: 1.1; }
.dashboard-donut-center small { color: var(--muted); font-size: .65rem; text-align: center; }
.dashboard-donut-total { fill: var(--text); font-size: 25px; font-weight: 800; }
.dashboard-donut-caption { fill: var(--muted); font-size: 10px; }
.dashboard-donut-legend { flex: 1; list-style: none; padding: 0; margin: 0; min-width: 0; }
.dashboard-donut-legend li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: .84rem; }
.dashboard-donut-legend strong { margin-left: auto; }
.dashboard-status-swatch { width: 10px; height: 10px; flex: none; border-radius: 50%; }
@media (max-width: 1050px) { .dashboard-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .dashboard-kpi-grid, .dashboard-work-grid, .dashboard-charts-grid { grid-template-columns: 1fr; } .dashboard-line-panel { grid-column: auto; } .dashboard-chart-panel { padding: 16px; } .dashboard-bar-link { grid-template-columns: 38px minmax(80px,1fr) minmax(50px,1.1fr); } .dashboard-bar-link strong { grid-column: 3; } }
@media (prefers-reduced-motion: reduce) { .dashboard-bar-fill, .dashboard-series-billed, .dashboard-series-received { transition: none; } }
.report-catalog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.report-catalog-group { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.report-catalog-group > strong { display: block; margin-bottom: 9px; color: var(--navy); font-size: .85rem; }
.report-links { display: flex; flex-wrap: wrap; gap: 5px; }
.report-links a { padding: 7px 9px; border-radius: 6px; font-size: .78rem; color: var(--muted); text-decoration: none; }
.report-links a:hover, .report-links a.active { color: var(--red-dark); background: #fff0f2; }
.report-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.report-filters > div { min-width: 170px; }
.report-filters label { display: block; margin-bottom: 5px; }
.result-count { margin: 13px 0 9px; color: var(--muted); font-size: .85rem; }
.pagination { justify-content: flex-end; gap: 10px; }
.pagination span { align-self: center; }
.audit-timeline p { display: grid; grid-template-columns: minmax(110px, .55fr) 1fr; gap: 12px; margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.audit-timeline p:last-child { border-bottom: 0; }
.audit-timeline span { color: var(--muted); }
.permission-group th { background: #f5f6f8; color: var(--navy); text-align: left; font-size: .85rem; }
@media (max-width: 1100px) { .report-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
    .workflow-steps, .workflow-steps:has(.workflow-step:nth-child(3):last-child) { grid-template-columns: 1fr; }
    .workflow-step { min-height: 44px; }
    .detail-grid { grid-template-columns: 1fr; }
    .workflow-actions .btn { flex: 1 1 auto; }
    .workflow-actions > a:first-child { margin-right: 0; }
    .report-catalog { grid-template-columns: 1fr; }
    .calculation-summary, .review-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
    .calculation-summary > *, .review-grid > * { min-width: 0; overflow-wrap: anywhere; padding: 10px; }
}

/* Compact car catalog */
.car-filter-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 5px; background: #fff0f2; color: var(--red-dark); font-size: .73rem; }
.car-filter-fields { display: grid; gap: 13px; }
.car-filter-fields label { margin-top: 0; }
.car-filter-fields .app-input, .car-filter-fields .app-select { width: 100%; }

.car-grid.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; align-items: start; }
.car-grid .car-card { position: relative; isolation: isolate; min-width: 0; min-height: 180px; overflow: hidden; border: 1.5px solid var(--line); border-radius: 10px; background: #e8ebee; box-shadow: 0 5px 16px rgba(23, 34, 50, .09); transition: min-height .28s ease, box-shadow .28s ease, transform .28s ease; }
.car-grid .car-card.info-expanded { min-height: 232px; }
.car-grid .car-card.actions-expanded { min-height: 190px; }
.car-grid .car-card.info-expanded.actions-expanded { min-height: 232px; }
.car-grid .car-card.available { border-color: transparent; background: linear-gradient(#e8ebee, #e8ebee) padding-box, linear-gradient(135deg, #afffce, #19cb78 48%, #dcffe7) border-box; box-shadow: 0 0 0 1px rgba(59, 222, 123, .14), 0 5px 19px rgba(33, 190, 102, .20); }
.car-grid .car-card.renting { border-color: transparent; background: linear-gradient(#e8ebee, #e8ebee) padding-box, linear-gradient(135deg, #ffb1bd, #d80d24 50%, #ffdde2) border-box; box-shadow: 0 0 0 1px rgba(216, 13, 36, .13), 0 5px 16px rgba(143, 23, 42, .14); }
.car-grid .car-card.maintenance { border-color: transparent; background: linear-gradient(#e8ebee, #e8ebee) padding-box, linear-gradient(135deg, #fff0b5, #d99012 50%, #ffe2a0) border-box; box-shadow: 0 0 0 1px rgba(217, 144, 18, .14), 0 5px 16px rgba(143, 90, 16, .13); }
.car-grid .car-card.paymentdue { border-color: transparent; background: linear-gradient(#e8ebee, #e8ebee) padding-box, linear-gradient(135deg, #ffd0a1, #b85c0b 50%, #ffb77a) border-box; box-shadow: 0 0 0 1px rgba(184, 92, 11, .16), 0 5px 16px rgba(125, 64, 17, .15); }
.car-grid .car-card.inactive { border-color: #8c97a8; }
.car-grid .car-card.payment-attention { --car-flash-color: rgba(184, 92, 11, .72); }
.car-grid .car-card.license-attention:not(.payment-attention) { --car-flash-color: rgba(216, 13, 36, .7); }
.car-grid .car-photo { position: absolute; inset: 0; overflow: hidden; background: #dfe4e9; }
.car-grid .car-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.car-grid .car-photo::after { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(15, 24, 36, .07), transparent 30%, rgba(8, 15, 25, .53)); }
.car-grid .car-status-flash { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: var(--car-flash-color, transparent); opacity: 0; animation: car-image-triple-flash 1.5s linear infinite; }
@keyframes car-image-triple-flash {
    0%, 7.9%, 16%, 23.9%, 32%, 39.9%, 48%, 100% { opacity: 0; }
    8%, 15.9%, 24%, 31.9%, 40%, 47.9% { opacity: 1; }
}
.car-grid .car-photo-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(145deg, #cbd4de, #e9edf0); color: #657488; }
.car-grid .car-card-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; cursor: pointer; }
.car-grid .car-card-link:focus-visible { outline: 3px solid #fff; outline-offset: -5px; box-shadow: inset 0 0 0 5px #b5122e; }
@media (hover: hover) and (pointer: fine) {
    .car-grid .car-card:has(> .car-card-link:hover) { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(23, 34, 50, .22), 0 0 0 2px rgba(185, 18, 46, .24); }
    .car-grid .car-card:has(> .car-card-link:hover) .car-photo img { transform: scale(1.035); }
}
.car-grid .car-card:has(> .car-card-link:focus-visible) { box-shadow: 0 12px 26px rgba(23, 34, 50, .20), 0 0 0 2px rgba(185, 18, 46, .30); }
.car-grid .car-photo-placeholder .app-icon { width: 62px; height: 62px; stroke-width: 1.2; }
.car-available-glow { position: absolute; top: 8px; left: 8px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #c9ffdf; border-radius: 50%; background: linear-gradient(135deg, #b9ffd4, #37d881); color: #0a6335; box-shadow: 0 0 12px rgba(62, 255, 137, .78); }
.car-available-glow .app-icon { width: 17px; height: 17px; stroke-width: 2.5; }
.car-primary-actions { position: absolute; top: 7px; left: 44px; z-index: 4; display: flex; align-items: center; gap: 5px; }
.car-card:not(.available) .car-primary-actions { left: 8px; }
.car-primary-actions .btn { display: flex; min-width: 0; min-height: 34px; padding: 4px 8px; border: 1px solid rgba(255,255,255,.78); font-size: 12px; white-space: nowrap; box-shadow: 0 2px 8px rgba(19,30,45,.16); }
.car-primary-actions .btn.secondary { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); }
.car-action-menu { position: absolute; top: 8px; right: 8px; z-index: 4; display: grid; justify-items: center; gap: 4px; }
.car-action-rail { display: grid; gap: 4px; max-height: 0; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.94); transform-origin: top center; pointer-events: none; transition: max-height .28s ease, opacity .2s ease, transform .28s ease, visibility .28s; }
.car-action-rail.is-open { max-height: 150px; opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.car-rail-action { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid rgba(255, 255, 255, .78); border-radius: 50%; background: rgba(255, 255, 255, .90); backdrop-filter: blur(8px); color: #203049; box-shadow: 0 2px 8px rgba(19, 30, 45, .16); cursor: pointer; }
.car-more-toggle { background: rgba(255,255,255,.96); }
.car-more-toggle[aria-expanded="true"] { color: var(--red-dark); background: #fff; }
.car-rail-action:hover { color: var(--red-dark); background: #fff; transform: translateX(-2px); }
.car-rail-action:disabled { opacity: .52; cursor: not-allowed; transform: none; }
.car-rail-action .app-icon { width: 16px; height: 16px; }
.car-grid .car-content { position: relative; z-index: 3; pointer-events: none; display: flex; flex-direction: column; box-sizing: border-box; width: 50%; min-width: 0; min-height: 0; margin: 100px 0 7px 7px; padding: 0; border: 1px solid rgba(255, 255, 255, .55); border-radius: 8px; background: rgb(207 207 207 / 22%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(21, 32, 46, .09); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.65); }
.car-grid .car-card.available .car-content { background: rgb(11 103 57 / 64%); border-color: rgb(161 255 198 / 70%); }
.car-grid .car-card.renting .car-content { background: rgb(145 20 43 / 70%); border-color: rgb(255 179 189 / 72%); }
.car-grid .car-card.maintenance .car-content { background: rgb(131 85 10 / 74%); border-color: rgb(255 221 148 / 72%); }
.car-grid .car-card.paymentdue .car-content { background: rgb(150 65 12 / 76%); border-color: rgb(255 190 126 / 72%); }
.car-grid .car-card.inactive .car-content { background: rgb(55 66 84 / 72%); border-color: rgb(206 214 226 / 70%); }
.car-info-header { position: relative; display: grid; gap: 3px; min-height: 52px; padding: 7px 20px 7px 7px; }
.car-info-toggle { position: absolute; top: 5px; right: 2px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; pointer-events: auto; background: transparent; color: #fff; cursor: pointer; }
.car-info-toggle:hover { background: rgba(255,255,255,.08); }
.car-info-toggle:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.car-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: .95rem; line-height: 1.35; font-weight: 750; }
.car-price { display: block; min-width: 0; overflow: hidden; font-size: 10px; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.car-info-chevron { position: absolute; right: 4px; top: 8px; width: 11px; height: 11px; transition: transform .28s ease; }
.car-content.is-expanded .car-info-chevron { transform: rotate(180deg); }
.car-detail-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .28s ease, opacity .2s ease; }
.car-content.is-expanded .car-detail-reveal { grid-template-rows: 1fr; opacity: 1; }
.car-detail-inner { min-height: 0; overflow: hidden; }
.car-detail-inner > .status { max-width: calc(100% - 12px); margin: 0 6px 4px; overflow: hidden; font-size: .7rem; text-overflow: ellipsis; }
.car-license-alert { display: block; margin: 0 6px 4px; color: #fff; font-size: .68rem; font-weight: 750; }
.car-grid .car-meta { display: grid; grid-template-columns: 1fr; gap: 2px; min-width: 0; padding: 0 6px 7px; font-size: 10px; line-height: 1.35; color: #fff; }
.car-grid .car-meta span { display: flex; align-items: center; gap: 3px; min-width: 0; }
.car-grid .car-meta .app-icon { width: 13px; height: 13px; flex: none; color: #fff; stroke-width: 1.8; }
.car-grid .car-meta b { display: block; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 680px) {
    .car-grid.car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .car-grid .car-card { min-height: 180px; }
    .car-grid .car-card.info-expanded { min-height: 250px; }
    .car-grid .car-card.actions-expanded { min-height: 218px; }
    .car-grid .car-card.info-expanded.actions-expanded { min-height: 250px; }
    .car-grid .car-content { margin: 100px 0 6px 6px; }
    .car-name { font-size: .9rem; }
    .car-grid .car-meta { font-size: 10px; gap: 2px; }
    .car-grid .car-meta .app-icon { width: 13px; height: 13px; }
    .car-primary-actions { top: 6px; left: 43px; gap: 4px; }
    .car-card:not(.available) .car-primary-actions { left: 6px; }
    .car-primary-actions .btn { min-height: 34px; padding: 4px 6px; font-size: 12px; }
    .car-action-menu { top: 50px; right: 6px; gap: 3px; }
    .car-action-rail { gap: 3px; }
    .car-rail-action { width: 30px; height: 30px; }
}

@media (max-width: 360px) {
    .car-available-glow { top: 7px; left: 6px; width: 24px; height: 24px; }
    .car-primary-actions { left: 34px; gap: 3px; }
    .car-primary-actions .btn.primary { min-height: 32px; padding-inline: 3px; }
}

@media (prefers-reduced-motion: reduce) { .car-rail-action:hover { transform: none; } .car-grid .car-card:has(> .car-card-link:hover) { transform: none; } .car-grid .car-card:has(> .car-card-link:hover) .car-photo img { transform: none; } .car-grid .car-status-flash { animation: none; opacity: 0; } .car-grid .car-card.payment-attention { outline: 3px solid #b85c0b; } .car-grid .car-card.license-attention:not(.payment-attention) { outline: 3px solid #d80d24; } }

/* Shared Puzzler-inspired business tables: readable Burmese, quiet surfaces, semantic states. */
:root { --table-line: #e9edf2; --table-muted: #667389; --table-header: #f7f8fa; }
.panel.table-scroll, .table-scroll:has(> .data-table) { border: 1px solid #e4e9ef; border-radius: 11px; background: #fff; box-shadow: 0 8px 28px rgba(28,39,58,.045); }
.data-table, .car-record-table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.data-table thead th, .car-record-table thead th { padding: 13px 16px; background: var(--table-header); color: #42506a; font-size: .84rem; font-weight: 700; line-height: 1.55; text-align: left; white-space: nowrap; border-bottom: 1px solid #dce3ea; }
.data-table thead th:first-child, .car-record-table thead th:first-child { border-top-left-radius: 10px; }
.data-table thead th:last-child, .car-record-table thead th:last-child { border-top-right-radius: 10px; }
.data-table tbody td, .car-record-table tbody td { height: 55px; padding: 11px 16px; color: #26334a; font-size: .91rem; font-weight: 450; line-height: 1.6; vertical-align: middle; border-bottom: 1px solid var(--table-line); overflow-wrap: anywhere; }
.data-table tbody tr:last-child td, .car-record-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover, .car-record-table tbody tr:hover { background: #fcf7f8; }
.data-table tbody tr:focus-within, .car-record-table tbody tr:focus-within { background: #fff9fa; }
.data-table .row-title, .car-record-table .row-title { color: #1c2a40; font-size: .94rem; font-weight: 700; }
.data-table .cell-secondary, .car-record-table .cell-secondary { color: var(--table-muted); font-size: .83rem; font-weight: 450; }
.data-table .cell-identity { display: grid; gap: 2px; min-width: 0; }
.data-table .cell-identity > strong { color: #1d2b42; font-size: .94rem; line-height: 1.45; }
.data-table .cell-identity > small { color: var(--table-muted); font-size: .81rem; line-height: 1.45; }
.data-table .money, .car-record-table .money { color: #203048; font-weight: 650; text-align: right; white-space: nowrap; }
.data-table tfoot th, .data-table tfoot td { padding: 13px 16px; background: #fafbfc; border-top: 1px solid #dce3ea; color: #243149; font-size: .88rem; font-weight: 750; }
.data-table .btn { min-height: 44px; }
.data-table .inline-actions { align-items: center; gap: 6px; }
.table-scroll:focus-visible { outline: 3px solid rgba(216,13,36,.4); outline-offset: 2px; }
.table-scroll.table-matrix-scroll { scrollbar-color: #aab6c7 #f4f6f8; }
.table-scroll.table-matrix-scroll::after { content: "←  →"; display: block; padding: 5px 14px; color: var(--table-muted); font-size: .9rem; letter-spacing: .4em; text-align: center; }
.table-more { min-width: 116px; }
.table-more summary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1px solid #d7dee8; border-radius: var(--button-radius); background: #fff; color: #27364e; font-size: .84rem; font-weight: 700; cursor: pointer; list-style: none; }
.table-more summary::-webkit-details-marker { display: none; }
.table-more summary:hover, .table-more[open] summary { border-color: #d89ba7; background: #fff7f8; }
.table-more summary:focus-visible { outline: 3px solid rgba(216,13,36,.35); outline-offset: 2px; }
.table-more summary .app-icon { width: 15px; height: 15px; transition: transform .16s ease; }
.table-more[open] summary .app-icon { transform: rotate(180deg); }
.table-more-actions { display: grid; gap: 6px; padding: 7px 0; }
.table-more-actions .btn { justify-content: flex-start; white-space: normal; text-align: left; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #f0f2f5; color: #405069; font-size: .79rem; font-weight: 700; line-height: 1.4; white-space: normal; }
.status::before { content: none; }
.status-mark { display: inline-grid; place-items: center; flex: none; width: 15px; height: 15px; border-radius: 50%; background: currentColor; color: inherit; font-family: "Segoe UI",sans-serif; font-size: 10px; line-height: 1; }
.status-mark::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.status.available, .status.active, .status.paid, .status.closed, .status.completed { background: #eaf6ef; color: #246548; }
.status.available .status-mark::after, .status.active .status-mark::after, .status.paid .status-mark::after, .status.closed .status-mark::after, .status.completed .status-mark::after { content: "✓"; width: auto; height: auto; background: none; font-weight: 800; }
.status.draft, .status.pending, .status.pendingapproval, .status.open, .status.unpaid { background: #fff4db; color: #815c17; }
.status.renting, .status.paymentdue, .status.partiallypaid { background: #fff0e8; color: #985030; }
.status.maintenance { background: #fff3dc; color: #805a18; }
.status.overdue, .status.failed, .status.cancelled, .status.voided, .status.reversed, .status.inactive { background: #fcecef; color: #a52d44; }
.status.posted, .status.approved { background: #eaf0f7; color: #385975; }
.status.equitymovement { background: #f1edfa; color: #5d4885; }
@media (max-width: 680px) {
    .panel.table-scroll:has(> table.data-table:not(.table-matrix)), .table-scroll:has(> table.car-record-table) { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    table.data-table:not(.table-matrix), table.car-record-table { display: block; min-width: 0; background: transparent; }
    table.data-table:not(.table-matrix) thead, table.car-record-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    table.data-table:not(.table-matrix) tbody, table.car-record-table tbody { display: grid; gap: 10px; }
    table.data-table:not(.table-matrix) tbody tr, table.car-record-table tbody tr { display: grid; gap: 0; min-width: 0; padding: 10px 13px; border: 1px solid #e1e6ed; border-radius: 11px; background: #fff; box-shadow: 0 6px 18px rgba(29,39,58,.045); }
    table.data-table:not(.table-matrix) tbody td, table.car-record-table tbody td { display: grid; grid-template-columns: minmax(90px,38%) minmax(0,1fr); align-items: center; gap: 10px; height: auto; min-height: 36px; padding: 6px 2px; border-bottom: 1px solid #f0f2f5; font-size: .87rem; }
    table.data-table:not(.table-matrix) tbody td:last-child, table.car-record-table tbody td:last-child { border-bottom: 0; }
    table.data-table:not(.table-matrix) tbody td::before, table.car-record-table tbody td::before { content: attr(data-label); color: var(--table-muted); font-size: .8rem; font-weight: 600; line-height: 1.5; text-align: left; white-space: normal; }
    table.data-table:not(.table-matrix) tbody td.money, table.car-record-table tbody td.money { text-align: right !important; }
    table.data-table:not(.table-matrix) tfoot { display: block; margin-top: 10px; border: 1px solid #dce3ea; border-radius: 9px; background: #fafbfc; }
    table.data-table:not(.table-matrix) tfoot tr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
    table.data-table:not(.table-matrix) tfoot th, table.data-table:not(.table-matrix) tfoot td { border: 0; padding: 7px 9px; }
    table.data-table.table-matrix { min-width: 680px; }
}
.data-table tbody tr.clickable-row { cursor: pointer; }
.data-table tbody tr.clickable-row:hover { background: rgba(193, 24, 43, .045); }
.data-table tbody tr.clickable-row:focus-within { outline: 2px solid rgba(193, 24, 43, .45); outline-offset: -2px; }
.section-tabs-shell { margin: 0 0 var(--space-4); border-bottom: 1px solid #dfe3e9; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #b9c3d0 transparent; }
.section-tabs { display: flex; align-items: stretch; gap: 6px; min-width: max-content; }
.section-tab { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 16px; border-bottom: 3px solid transparent; color: #596678; text-decoration: none; font-size: .9rem; font-weight: 550; line-height: 1.5; white-space: nowrap; }
.section-tab:hover { color: #b30c23; background: #fff5f6; }
.section-tab.active, .section-tab[aria-current="page"] { color: #bb1029; border-bottom-color: #d4072c; background: #fff7f8; }
.section-tab:focus-visible { outline: 2px solid #bb1029; outline-offset: -3px; border-radius: 5px; }
@media (max-width: 680px) {
    .panel-body { padding: var(--space-4); }
    .page-header-actions-only { margin-bottom: var(--space-3); }
    .app-dialog:not(.car-rental-full-dialog) { width: min(100%, 96vw); max-height: calc(100dvh - 24px); }
    .app-dialog header, .app-dialog footer { padding-inline: var(--space-4); }
    .app-dialog .dialog-body { padding: var(--space-4); }
    .section-tab { padding-inline: var(--space-3); }
    .table-more { min-width: 0; }
    table.data-table:not(.table-matrix) tbody td, table.car-record-table tbody td { grid-template-columns: minmax(80px, 38%) minmax(0, 1fr); }
    table.data-table:not(.table-matrix) tbody td > *, table.car-record-table tbody td > * { min-width: 0; }
}
.reminder-inline{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:10px 20px;background:#fff6df;color:#694608;border:1px solid #e9c670;box-shadow:0 8px 24px rgba(66,48,11,.12)}
.reminder-inline strong{display:block;margin-bottom:3px}
@media(max-width:700px){.reminder-inline{align-items:stretch;flex-direction:column}.reminder-inline .page-actions{width:100%}}
