.bkg-table-mobile-head,.bkg-table-extra { display:none; }
.bkg-table-details {
    width:calc(100% - 24px); max-width:640px; max-height:88vh; max-height:88dvh;
    padding:0; border:1px solid var(--bkg-line,#334155); border-radius:8px;
    background:var(--bkg-panel,#0f1c30); color:var(--bkg-text,#e2e8f0);
    box-shadow:0 18px 60px rgba(0,0,0,.3); overflow:auto;
}
html body.bkg-ui-ready dialog.bkg-table-details { overflow:auto !important; border-radius:8px !important; }
.bkg-table-details::backdrop { background:rgba(0,0,0,.55); }
.bkg-table-details-head { display:flex; align-items:center; justify-content:space-between; gap:12px; position:sticky; top:0; padding:12px 16px; background:var(--bkg-panel,#0f1c30); border-bottom:1px solid var(--bkg-line,#334155); z-index:1; }
.bkg-table-details-head h2 { font-size:18px !important; margin:0; }
.bkg-table-details-close { flex:none; width:40px; height:40px; border:1px solid var(--bkg-line,#334155); border-radius:6px; background:transparent; color:inherit; font-size:28px; line-height:1; }
.bkg-table-details-body { padding:0 16px; margin:0; }
.bkg-table-details-body>div { padding:12px 0; border-bottom:1px solid var(--bkg-line,#334155); }
.bkg-table-details-body>div:last-child { border-bottom:0; }
.bkg-table-details-body dt { color:var(--bkg-muted,#94a3b8); font-size:12px; font-weight:600; margin-bottom:6px; }
.bkg-table-details-body dd { margin:0; font-size:14px; white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
.bkg-table-details-body img { display:block; width:auto; max-width:100%; max-height:280px; object-fit:contain; margin-block:8px; }
.bkg-table-detail-action { display:inline-flex; align-items:center; justify-content:center; margin:4px 6px 4px 0; min-height:40px; padding:8px 12px; border:1px solid var(--bkg-line,#334155); border-radius:6px; background:transparent; color:inherit; font:inherit; }
.bkg-table-detail-action:disabled { opacity:.45; }
@media screen and (max-width:1199.98px) {
    html:is([data-bkg-page="sales/editcus"],[data-bkg-page="rent/editcus_tenant"],[data-bkg-page="rent/editcus_owner"]) body #tableBody > tr > :is(td:nth-child(2),td:nth-child(4)) { text-align:left !important; }
    html[data-bkg-page="sales/editcus"] body #tableBody > tr > td:nth-child(5),
    html[data-bkg-page="rent/editcus_tenant"] body #tableBody > tr > td:nth-child(6),
    html[data-bkg-page="rent/editcus_owner"] body #tableBody > tr > td:nth-child(7) { text-align:right !important; }
    html:is([data-bkg-page="sales/editcus"],[data-bkg-page="rent/editcus_tenant"],[data-bkg-page="rent/editcus_owner"]) body #tableBody > tr > td:nth-child(2) > [data-bkg-table-extra="3"] { text-align:left !important; font-size:12px !important; color:inherit; }
    html:is([data-bkg-page="sales/editcus"],[data-bkg-page="rent/editcus_tenant"]) body table:has(> #tableBody) > thead > .bkg-table-mobile-head > th:nth-child(2) { text-align:right !important; }
    html[data-bkg-page="rent/editcus_owner"] body table:has(> #tableBody) > thead > .bkg-table-mobile-head > th:nth-child(3) { text-align:right !important; }
    html body .bkg-mobile-table-wrap { width:100% !important; max-width:100% !important; min-width:0 !important; overflow-x:clip !important; }
    html body table.bkg-mobile-table { display:table !important; width:100% !important; min-width:0 !important; max-width:100% !important; table-layout:fixed !important; }
    html body table.bkg-mobile-table>colgroup { display:none !important; }
    html body table.bkg-mobile-table>thead>tr:not(.bkg-table-mobile-head) { display:none !important; }
    html body table.bkg-mobile-table>thead>.bkg-table-mobile-head { display:table-row !important; }
    html body table.bkg-mobile-table>thead>.bkg-table-mobile-head>th,
    html body table.bkg-mobile-table>:is(tbody,tfoot)>tr>[data-bkg-table-keep="1"] {
        display:table-cell !important; width:var(--bkg-table-width) !important; min-width:0 !important; max-width:none !important;
        position:static !important; padding:9px 6px !important; white-space:normal !important; overflow-wrap:anywhere; word-break:normal;
        font-size:12px !important; line-height:1.4 !important; vertical-align:middle;
    }
    html body table.bkg-mobile-table>:is(tbody,tfoot)>tr>[data-bkg-table-keep="0"] { display:none !important; }
    html body table.bkg-mobile-table>:is(tbody,tfoot)>tr>[data-bkg-table-keep="1"] :is(div,span,p,a,small,strong) { min-width:0 !important; max-width:100% !important; white-space:normal !important; overflow-wrap:anywhere; }
    html body table.bkg-mobile-table :is(td,th) .badge { max-width:100%; font-size:11px !important; line-height:1.35; white-space:normal !important; }
    html body table.bkg-mobile-table td img { max-width:100%; height:auto; max-height:64px; object-fit:contain; }
    html body table.bkg-mobile-table .bkg-table-header-control { display:inline-flex !important; align-items:center; justify-content:center; min-width:32px !important; width:32px; min-height:32px !important; height:32px; padding:3px !important; margin:2px; vertical-align:middle; }
    html body .bkg-table-detail-row { cursor:pointer; }
    html body .bkg-table-detail-row:focus-visible { outline:2px solid var(--bkg-accent,#0ea5e9); outline-offset:-2px; }
    html body .bkg-table-extra { display:block !important; margin-top:4px; font-size:10px !important; line-height:1.35; color:var(--bkg-muted,#94a3b8); }
    html body table.bkg-mobile-table-editor { display:block !important; width:100% !important; max-width:100% !important; min-width:0 !important; }
    html body table.bkg-mobile-table-editor>:is(thead,colgroup) { display:none !important; }
    html body table.bkg-mobile-table-editor>:is(tbody,tfoot) { display:block !important; width:100%; }
    html body table.bkg-mobile-table-editor>:is(tbody,tfoot)>tr { display:block; width:100%; padding:8px 0; border-bottom:1px solid var(--bkg-line,#334155); }
    html body table.bkg-mobile-table-editor>:is(tbody,tfoot)>tr>:is(td,th) { display:grid !important; grid-template-columns:minmax(80px,32%) minmax(0,1fr); align-items:center; gap:8px; width:100% !important; max-width:100% !important; min-width:0 !important; position:static !important; white-space:normal !important; overflow-wrap:anywhere; padding:6px !important; box-sizing:border-box; }
    html body table.bkg-mobile-table-editor>:is(tbody,tfoot)>tr>:is(td,th)::before { content:attr(data-bkg-table-label); color:var(--bkg-muted,#94a3b8); font-size:11px; line-height:1.35; }
    html body table.bkg-mobile-table-editor :is(input,select,textarea,div) { min-width:0 !important; max-width:100% !important; }
    html body table.bkg-mobile-table-calendar { width:100% !important; min-width:0 !important; table-layout:fixed !important; }
    html body table.bkg-mobile-table-calendar :is(th,td) { min-width:0 !important; max-width:100%; padding:4px 2px !important; overflow-wrap:anywhere; }
    html body table.bkg-mobile-table-calendar th { font-size:10px !important; white-space:normal !important; }
    html body table.bkg-mobile-table-calendar td>* { max-width:100%; min-width:0; overflow-wrap:anywhere; }
    html body table.bkg-mobile-table-calendar .chip { box-sizing:border-box; width:100%; padding:1px !important; gap:2px !important; }
    html body table.bkg-mobile-table-calendar .chip .nm { display:none !important; }
    html body table.bkg-mobile-table-calendar .chip .ava { width:18px !important; height:18px !important; font-size:9px !important; }
    html body table.bkg-mobile-table-calendar .chip .bar { width:2px !important; }
    html body table.bkg-mobile-table-calendar .more { font-size:9px !important; white-space:normal !important; }
    html[data-bkg-page="sales/settingsales"] .tab-pane>.d-flex.justify-content-between,
    html[data-bkg-page="rent/settingrent"] .tab-pane>.d-flex.justify-content-between { flex-wrap:wrap !important; gap:8px; }
    html[data-bkg-page="sales/settingsales"] .tab-pane>.d-flex.justify-content-between>.d-flex,
    html[data-bkg-page="rent/settingrent"] .tab-pane>.d-flex.justify-content-between>.d-flex { flex-wrap:wrap !important; width:100%; max-width:100%; min-width:0; }
    html[data-bkg-page="sales/settingsales"] .tab-pane>.d-flex.justify-content-between .input-group,
    html[data-bkg-page="rent/settingrent"] .tab-pane>.d-flex.justify-content-between .input-group { flex:1 1 160px; width:auto !important; min-width:0 !important; max-width:100%; }
    html[data-bkg-page="sales/settingsales"] #attachList,
    html[data-bkg-page="rent/settingrent"] #attachList { margin-inline:0 !important; width:100%; }
}
