/* Sidebar and content surfaces; newly authored for the existing templates. */
#dwrLoadingMessage { display: flex; align-items: center; gap: 20px; padding: 28px 40px; border: 1px solid var(--green-line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow); font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
#dwrLoadingMessage > span { white-space: nowrap; overflow-wrap: normal; }
.login-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow-wrap: anywhere; }
.login-card-header { padding: 28px 26px 20px; border-bottom: 1px solid var(--green-line); border-radius: var(--radius) var(--radius) 0 0; background: var(--green-soft); text-align: center; }
.login-logo { display: block; width: 220px; max-width: 100%; height: 64px; margin: 0 auto 20px; object-fit: contain; }
.login-card-header h1 { margin: 0 0 6px; color: var(--green-700); font-size: 20px; }
.login-system-name { margin: 0; font-size: 13px; }
.login-development { display: inline-block; margin: 10px 0 0; padding: 4px 8px; border: 1px solid var(--green-line); border-radius: 6px; color: var(--green-700); font-size: 11px; font-weight: 600; }
.login-card-content { padding: 24px 26px; }
.login-card .loginform { margin: 0; }
.login-card fieldset { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.login-message > p { margin: 0 0 16px; }
.login-message .remark { color: var(--error); }
.login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.login-field label { font-size: 13px; font-weight: 500; }
.relaunch-brand { padding: 2px 6px 18px; }
.relaunch-logo { width: 65%; height: 44px; padding: 7px 10px; border-radius: 11px; background-color: var(--surface); background-repeat: no-repeat; background-position: center; background-origin: content-box; background-size: contain; box-shadow: 0 1px 4px rgba(0, 0, 0, .16); }
.relaunch-brand-caption { margin-top: 9px; padding-left: 3px; color: rgba(255, 255, 255, .66); font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: -.01em; }
.div-menu ul { margin: 0; padding: 0; list-style: none; }
.div-menu > ul { margin-bottom: 12px; }
.div-menu h3, .div-menu h4 { margin: 10px 0 5px; }
.div-menu .menu-rubric { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 32px; padding: 5px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--side-ink-muted); text-align: left; text-transform: uppercase; letter-spacing: 1px; font-size: 10.5px; font-weight: 600; }
.div-menu .menu-rubric:hover { background: var(--side-hover); color: var(--surface); }
.div-menu .nav-item { display: flex; align-items: center; gap: 11px; margin-bottom: 1px; padding: 9px 11px; border-radius: 10px; color: var(--side-ink); font-size: 14px; font-weight: 500; }
.div-menu .nav-item span { min-width: 0; overflow-wrap: anywhere; }
.div-menu .nav-item { scroll-margin-block: 64px; }
.div-menu .nav-item:hover { background: var(--side-hover); color: var(--surface); }
.div-menu .nav-item.active { background: var(--surface); color: var(--green-700); font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.div-menu :focus-visible { outline-color: var(--surface); outline-offset: -2px; }
.relaunch-session { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--side-line); font-size: 11.5px; color: var(--side-ink-muted); overflow-wrap: anywhere; }
.relaunch-version { margin-bottom: 12px; }
.relaunch-user { color: var(--surface); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.relaunch-development { padding: 5px 8px; margin: 10px 0 0; border: 1px solid var(--side-line); border-radius: 6px; color: var(--surface); font-size: 12px; font-weight: 700; }
.relaunch-session form { margin-top: 12px; }
.relaunch-session button { width: 100%; border-color: var(--side-line); background: var(--side-hover); color: var(--surface); }
.relaunch-session button:hover { background: rgba(255, 255, 255, .25); }
fieldset { min-width: 0; margin: 0 0 22px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
legend { padding: 0 8px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.form-field { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; }
.form-label { flex: 0 0 180px; padding-top: 8px; font-size: 13px; color: var(--ink-2); }
.form-field > input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), .form-field > select, .form-field > textarea { flex: 1; min-width: 0; }
.form-field > .form-noscale { flex: none; }
.page-header { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 30px; }
.page-heading-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: var(--radius-small); background: var(--green-soft); color: var(--green-700); }
.page-headings { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.page-header > .page-heading-icon { align-self: flex-start; }
.page-headings p { margin: 4px 0 0; }
.page-headings > :last-child { margin-bottom: 0; }
.page-header + p { margin-bottom: 6px; }
.div-content > .contentstart, .div-content-fixed > .contentstart { height: 0; overflow: hidden; }
.page-actions { width: 100%; min-width: 0; margin-bottom: 8px; }
.page-header > .page-actions { flex: 0 1 auto; width: auto; max-width: 50%; margin-bottom: 0; }
.page-actions ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0; padding: 0; list-style: none; }
.page-actions li { min-width: 0; max-width: 100%; }
.page-actions.detail-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.detail-form-actions > [hidden] { display: none; }
.search-panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.search-panel > form { margin: 0; border-bottom: 1px solid var(--line); }
.search-panel > form > fieldset { margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.search-panel > .search-results { min-width: 0; border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px); overflow-x: auto; }
.search-panel .searchresults { margin: 0; border-radius: 0; }
.search-panel .searchresults tbody > tr:last-child > td { border-bottom: 0; }
.search-panel-actions { margin: 0; padding: 18px 22px; border-top: 1px solid var(--line); }
.order-position-article { overflow-wrap: anywhere; }
.searchresults:has(> thead .order-results-sales) { min-width: 760px; table-layout: fixed; }
.order-results-selection { width: 44px; }
.order-results-number { width: 14%; }
.order-results-purchase { width: 23%; }
.order-results-sales { width: 38%; }
.order-results-notes { width: 25%; }
.order-overview-sales-date { width: 170px; min-width: 170px; }
.searchresults:has(> thead .cost-results-company) { min-width: 860px; table-layout: fixed; }
.cost-results-company { width: 26%; }
.cost-results-document { width: 30%; }
.cost-results-date, .cost-results-amount { width: 13%; }
.cost-results-account { width: 18%; }
.searchresults:has(> thead .inbound-results-company) { min-width: 640px; table-layout: fixed; }
.inbound-results-document { width: 30%; }
.inbound-results-date { width: 18%; }
.inbound-results-company { width: 52%; }
.searchresults:has(> thead :is(.cost-results-company, .inbound-results-company)) > tbody > tr > td { overflow-wrap: anywhere; }
.cost-result-date, .inbound-result-date, .cost-result-amount { white-space: nowrap; }
.cost-result-amount { font-variant-numeric: tabular-nums; }
.inbound-position-selection { table-layout: fixed; min-width: 1160px; }
.inbound-position-check, .inbound-position-toggle { width: 56px; }
.inbound-position-type { width: 44px; }
.inbound-position-article { width: 28%; }
.inbound-position-note { font-size: 13px; }
.inbound-position-note + .inbound-position-note { margin-top: 8px; }
.inbound-position-note-heading { display: block; margin-bottom: 2px; color: var(--ink-3); font-size: 11px; font-weight: 600; }
.inbound-position-amount { width: 96px; }
.inbound-position-quantity { width: 76px; }
.inbound-position-date { width: 128px; }
.inbound-position-selection > tbody > tr > td { overflow-wrap: anywhere; }
.inbound-position-selection > :is(thead, tbody) > tr > :is(td:first-child, td:nth-child(2), td:nth-child(3)) { padding-inline: 6px; }
.inbound-position-selection > tbody > tr > :is(td:first-child, td:nth-child(2)) { text-align: center; }
.inbound-position-selection > tbody > tr > :is(td:nth-child(5), td:nth-child(6), td:nth-child(7)) { white-space: nowrap; }
.inbound-document-totals { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; padding: 16px 20px; border: 1px solid var(--green-line); border-radius: var(--radius-small); background: var(--green-soft); }
.inbound-document-totals > .clearfix { flex: 1 1 160px; min-width: 0; }
.inbound-document-totals > .clearfix > .form-field { grid-column: 1 / -1; }
.inbound-document-totals .form-label { font-size: 13px; }
.inbound-document-totals b { font-size: 18px; font-variant-numeric: tabular-nums; }
.searchresults:has(> thead .order-results-sales) > tbody > tr > td { overflow-wrap: anywhere; }
.order-result-company, .order-result-number { display: block; font-weight: 600; }
.order-result-secondary { display: block; margin-top: 3px; color: var(--ink-3); font-size: 12px; line-height: 1.4; }
.order-result-note { display: block; font-size: 13px; }
.order-result-note + .order-result-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.order-result-note-heading { display: block; margin-bottom: 3px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.order-result-positions { margin: 10px 0 0; padding: 0; list-style: none; }
.order-result-positions > li { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: start; gap: 12px; padding: 3px 0; font-size: 13px; line-height: 1.4; }
.order-result-article { min-width: 0; overflow-wrap: anywhere; }
.order-result-quantity { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.listview .order-position-status { width: 1%; padding-inline: 6px; text-align: center; white-space: nowrap; }
.listview .order-position-exchange-factor { width: 1%; padding-inline: 6px; white-space: nowrap; }
.order-position-article-name { display: block; font-weight: 600; }
.order-position-quality, .order-position-upgrade { display: block; margin-top: 3px; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.order-position-article .order-position-upgrade { margin-top: 8px; }
.order-position-upgrade-heading { display: block; font-weight: 500; }
.order-position-upgrade-source { display: block; margin-top: 2px; }
.accounting-document-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.accounting-document-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface); }
.accounting-document-card-heading { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--green-line); border-radius: var(--radius-small) var(--radius-small) 0 0; background: var(--green-soft); color: var(--green-700); font-size: 14px; font-weight: 600; }
.accounting-document-list { margin: 0; padding: 0; list-style: none; }
.accounting-document-row + .accounting-document-row { border-top: 1px solid var(--line); }
.accounting-document-number { min-width: 0; overflow-wrap: anywhere; }
.accounting-document-canceled { padding: 3px 6px; border-radius: 5px; background: var(--error-soft); color: var(--error); font-size: 11px; font-weight: 500; }
.accounting-documents-empty { margin: 0; padding: 18px 16px; color: var(--ink-3); font-size: 13px; }
.order-document-toolbar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.order-document-download-grid, .order-document-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.order-document-download-grid > :only-child { grid-column: 1 / -1; }
.order-document-card, .order-document-upload-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface); }
.order-document-card-heading { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--green-line); border-radius: var(--radius-small) var(--radius-small) 0 0; background: var(--green-soft); color: var(--green-700); font-size: 14px; font-weight: 600; }
.order-document-row { margin: 0; }
.order-document-empty { margin: 0; padding: 16px; color: var(--ink-3); font-size: 13px; }
.order-document-row + .order-document-row { border-top: 1px solid var(--line); }
.order-document-name { min-width: 0; overflow-wrap: anywhere; }
.order-document-uploads { margin-top: 24px; }
.order-document-uploads > h4 { margin-bottom: 12px; font-size: 14px; }
.order-document-upload-card .document-upload { display: flex; flex-direction: column; grid-column: 1 / -1; width: 100%; gap: 0; margin: 0; }
.order-document-upload-card .document-upload-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; align-self: stretch; gap: 10px 16px; margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--green-line); border-radius: var(--radius-small) var(--radius-small) 0 0; background: var(--green-soft); color: var(--green-700); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.order-document-upload-card .document-upload-header > label { flex: 1 1 120px; min-width: 0; }
.order-document-upload-card .document-upload > p:empty { display: none; }
.order-document-upload-card .progress { align-self: stretch; height: 5px; margin: 16px 16px 0; border-radius: 3px; background: var(--line); overflow: hidden; }
.order-document-upload-card .progress-bar { width: 0; height: 100%; background: var(--green); transition: width .15s ease; }
@media (max-width: 800px) {
    .order-document-download-grid, .order-document-upload-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
    .accounting-document-cards { grid-template-columns: minmax(0, 1fr); }
}
.searchresults, .listview, .listview-inner { width: 100%; border-collapse: collapse; background: var(--surface); }
body:has(.relaunch-app) table :is(td, th) { vertical-align: top; }
.searchresults { border-collapse: separate; border-spacing: 0; border-radius: var(--radius); overflow: hidden; }
.role-privileges { width: 100%; min-width: 0; }
.searchresults th, .searchresults td, .listview td, .listview-inner td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
:is(.searchresults, .listview, .listview-inner) > thead { background: var(--surface); }
:is(.searchresults, .listview, .listview-inner) > thead > tr > :is(th, td) {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-3);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}
:is(.searchresults, .listview, .listview-inner) > thead a { color: inherit; font-weight: inherit; }
:is(.searchresults, .listview, .listview-inner) > thead a:hover,
:is(.searchresults, .listview, .listview-inner) > thead a.sort-selected { color: var(--green-700); }
.table-header-title { display: block; }
.table-header-detail { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.billing-run-table > :is(thead, tbody) > tr > :is(td, th):nth-child(-n + 5):not([colspan]) {
    width: 1%;
    padding-right: 6px;
    padding-left: 6px;
    white-space: nowrap;
}
.searchresults tbody tr:hover { background: var(--green-soft); }
.searchresults .selected { background: var(--green-soft); }
.searchresults .search-initial-hint > td { padding: 20px 14px; color: var(--ink-2); text-align: center; }
.searchresults .search-initial-hint:hover { background: var(--surface); }
.table-row-actions-row { position: relative; }
.table-row-action-cell { position: static; width: 0; min-width: 0; max-width: 0; height: 44px; padding: 0 !important; border-bottom: 0 !important; vertical-align: top; }
.table-row-actions-overlay .table-action-heading { width: 0; min-width: 0; max-width: 0; padding: 0; font-size: 0; }
.table-row-action-viewport { position: absolute; z-index: 2; top: 0; right: 0; width: calc(var(--row-action-size, 44px) * var(--row-action-count, var(--table-action-columns, 2))); height: var(--row-action-size, 44px); overflow: hidden; pointer-events: none; }
.table-row-actions { position: relative; display: inline-flex; height: var(--row-action-size, 44px); opacity: 0; transform: translateX(100%); pointer-events: none; transition: transform 140ms ease-out, opacity 100ms ease-out; }
tr:hover > .table-row-action-cell > .table-row-action-viewport, tr:focus-within > .table-row-action-cell > .table-row-action-viewport { pointer-events: auto; }
tr:hover > .table-row-action-cell .table-row-actions, tr:focus-within > .table-row-action-cell .table-row-actions { opacity: 1; transform: translateX(0); pointer-events: auto; }
@media (hover: none), (pointer: coarse) {
    .table-row-action-cell > .table-row-action-viewport { pointer-events: auto; }
    .table-row-action-cell .table-row-actions { opacity: 1; transform: none; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .table-row-actions { transition: none; }
}
.contentstart { height: 12px; }

/* Linked object sections retain their existing jQuery UI tab behavior. */
.tabsContainerMain.ui-tabs {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    padding: 0;
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink-2);
    font: inherit;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.tabsContainerMain.ui-tabs > .ui-tabs-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 12px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface-subtle);
}
.tabsContainerMain.ui-tabs > .ui-tabs-nav::before,
.tabsContainerMain.ui-tabs > .ui-tabs-nav::after { display: none; }
.tabsContainerMain.ui-tabs > .ui-tabs-nav > li {
    float: none;
    top: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    white-space: normal;
}
.tabsContainerMain > .ui-tabs-nav > li > .ui-tabs-anchor {
    position: relative;
    display: flex;
    float: none;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.tabsContainerMain > .ui-tabs-nav > li > .ui-tabs-anchor:hover { background: var(--surface-hover); color: var(--ink-2); }
.tabsContainerMain > .ui-tabs-nav > li > .ui-tabs-anchor > span { min-width: 0; overflow-wrap: anywhere; }
.tabsContainerMain > .ui-tabs-nav > li.ui-tabs-active > .ui-tabs-anchor { background: var(--green-soft); color: var(--green-700); font-weight: 600; }
.tabsContainerMain > .ui-tabs-nav > .ui-tabs-active > .ui-tabs-anchor::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); }
.tabsContainerMain > .tabsContainerInner { min-width: 0; min-height: 300px; padding: 24px 26px; box-shadow: inset 3px 0 0 var(--green); }
.tabsContainerMain.ui-tabs .ui-tabs-panel { padding: 0; border: 0; border-radius: 0; background: none; }
.detail-tab-heading { display: flex; align-items: center; gap: 10px; margin: -24px -26px 20px; padding: 14px 26px; background: var(--green-soft); border-bottom: 1px solid var(--green-line); }
.detail-tab-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); color: var(--green-700); box-shadow: 0 1px 2px rgba(15, 19, 25, .05); }
.detail-tab-heading h3 { margin: 0; color: var(--green-700); font-size: 15.5px; font-weight: 600; }
.company-section-card { min-width: 0; margin: 0 0 18px; border: 1px solid var(--line-2); border-radius: var(--radius-small); background: var(--surface); }
.company-section-card:last-child { margin-bottom: 0; }
.company-section-heading { margin: 0; font-size: 15px; font-weight: 600; }
.company-section-label { display: flex; align-items: center; gap: 10px; padding: 16px 18px; color: var(--ink-2); }
.company-section-body { padding: 0 18px 18px; }
.company-section-exports { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 18px; }
.company-section-results { min-width: 0; overflow-x: auto; }
.filter-list-container.company-section-card > .company-section-results { margin: 0; border-top: 1px solid var(--line); }
.company-booking-toolbar { display: flex; align-items: flex-end; gap: 16px; }
body:has(.relaunch-app) .company-section-card .company-booking-filters { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; }
.company-booking-toolbar > .company-section-exports { flex: 0 0 auto; margin: 0; }
.company-bookings { min-width: 840px; }
.company-bookings > thead > tr > th { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.company-bookings > thead > tr > th.right { text-align: right; }
.company-bookings > tbody > tr > td { overflow-wrap: anywhere; }
.company-booking-document-column { width: 22%; }
.company-booking-number { display: block; font-weight: 600; }
.company-booking-label { display: block; margin-top: 6px; color: var(--ink-3); font-size: 11px; font-weight: 400; line-height: 1.3; }
.company-booking-label:first-child { margin-top: 0; }
.company-booking-order { display: block; font-size: 12px; }
.company-booking-date { display: block; white-space: nowrap; font-size: 13px; }
.company-booking-amount + .company-booking-amount { margin-top: 8px; }
.company-booking-amount { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; }
.company-booking-amount > span:last-child { display: block; }
.company-booking-canceled { display: inline-block; margin-top: 5px; padding: 2px 6px; border-radius: 5px; background: var(--error-soft); color: var(--error); font-size: 11px; }
.company-bookings .company-booking-actions-cell { width: 118px; }
.company-booking-actions { display: flex; justify-content: flex-end; gap: 6px; }
.company-booking-summary { background: var(--green-soft); font-weight: 600; }
@media (max-width: 980px) {
    .company-booking-toolbar { flex-wrap: wrap; }
    .company-booking-toolbar > .company-section-exports { margin-left: auto; }
}
.company-analysis-card .analysis-container-content-table:not(:empty) { margin-top: 18px; }
body:has(.relaunch-app) .company-analysis-card .form-field:has(> input[type="submit"]) { grid-column: 1 / -1; }
@media (max-width: 640px) {
    .company-section-label { padding: 14px; }
    .company-section-body { padding: 0 14px 14px; }
}
.relaunch-search-dialog.ui-dialog { max-width: calc(100vw - 32px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); font: inherit; box-shadow: var(--shadow); }
.relaunch-search-dialog .ui-dialog-titlebar { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 58px 14px 26px; border: 0; border-bottom: 1px solid var(--green-line); border-radius: var(--radius) var(--radius) 0 0; background: var(--green-soft); color: var(--green-700); }
.relaunch-search-dialog .ui-dialog-title { float: none; width: auto; min-width: 0; margin: 0; white-space: normal; overflow-wrap: anywhere; font-size: 15.5px; font-weight: 600; }
.relaunch-search-dialog .ui-dialog-titlebar-close { display: grid; place-items: center; right: 16px; width: 28px; height: 28px; min-height: 0; margin-top: -14px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--green-700); }
.relaunch-search-dialog .ui-dialog-titlebar-close:hover { background: var(--green-line); }
.relaunch-search-dialog .ui-dialog-content { padding: 20px 26px; color: inherit; font: inherit; }
/* Override the inline maximum height set by jQuery UI when opening the dialog. */
.relaunch-company-search-dialog .ui-dialog-content { display: flex; flex-direction: column; gap: 16px; box-sizing: border-box; max-height: calc(100vh - 160px) !important; max-height: calc(100dvh - 160px) !important; overflow: hidden; }
.relaunch-company-search-dialog .embeddedSearch { flex: 0 0 auto; margin: 0; }
.relaunch-company-search-dialog .ui-dialog-content > p { display: none; }
.relaunch-company-search-dialog .scrollbox-embedded { min-height: 0; max-height: none; overflow: auto; overscroll-behavior: contain; }
.relaunch-send-documents-dialog .ui-dialog-content { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); overflow-y: auto; }
.relaunch-send-documents-dialog #sendDocumentsForm > fieldset { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.relaunch-send-documents-dialog #sendDocumentsForm .send-document-actions { grid-column: 1 / -1; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.relaunch-send-documents-dialog #sendDocumentsForm .form-field:has(textarea) { grid-column: 1 / -1; }
.relaunch-send-documents-dialog #sendDocumentsForm textarea { width: 100%; }
:is(.address-section-header, .object-section-header) { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
:is(.address-section-header, .object-section-header) h3 { margin: 0; font-size: 16px; color: var(--ink-2); }
:is(.address-section-header, .object-section-header) > button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#addressFormFieldsContainer:has(> *), .object-editor-slot:has(> *) { margin-bottom: 22px; }
:is(.address-editor, .object-editor) { padding: 18px; border: 1px solid var(--green-line); border-radius: var(--radius-small); background: var(--surface); }
:is(.address-editor-heading, .object-editor-heading) { padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
:is(.address-editor-heading, .object-editor-heading) h4 { margin: 0; color: var(--ink-2); font-size: 15px; font-weight: 600; }
.object-editor:has(> .form-field) > .object-editor-heading { margin-bottom: 0; }
.object-editor-subheading { margin: 0; color: var(--green-700); font-size: 13px; font-weight: 600; }
.object-list-section { min-width: 0; margin: 0 0 24px; }
.object-list-section:last-child { margin-bottom: 0; }
.address-editor-section { margin-bottom: 22px; }
.address-editor-section h5 { margin: 0 0 14px; color: var(--green-700); font-size: 13px; font-weight: 600; }
.address-editor-section-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }
.address-editor-section-header h5 { margin: 0; }
.address-editor-section-header > a { font-size: 12px; }
.address-field-hint { margin: 0; color: var(--ink-3); font-size: 12px; }
:is(.address-form-actions, .object-editor-actions) { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
#addressList, .object-list { min-width: 0; overflow-x: auto; }
.address-list { min-width: 640px; }
.address-list td { overflow-wrap: anywhere; }
.address-company-name { display: block; color: var(--ink-2); font-weight: 500; }
.address-contact-name { display: block; margin-top: 3px; color: var(--ink-2); font-size: 13px; }
.address-list ul { margin: 0; padding-left: 16px; }
@media (max-width: 640px) {
    :is(.address-editor, .object-editor) { padding: 14px; }
    .tabsContainerMain.ui-tabs { grid-template-columns: minmax(0, 1fr); }
    .tabsContainerMain.ui-tabs > .ui-tabs-nav { border-right: 0; border-bottom: 1px solid var(--line); }
    .tabsContainerMain > .tabsContainerInner { padding: 20px 16px; box-shadow: inset 0 3px 0 var(--green); }
    .detail-tab-heading { margin: -20px -16px 20px; padding: 14px 16px; }
}
/* Functional utility hooks used by existing controllers, templates and jQuery. */
.hidden { display: none; }
.clearLeft { clear: left; height: 0; overflow: hidden; }
.clearfix::after { content: ""; display: table; clear: both; }
.right { text-align: right; }
body:has(.relaunch-app) td.right { text-align: right; }
.left, .float-left { float: left; }
.fl-right { float: right; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linebreak { white-space: pre-wrap; overflow-wrap: anywhere; }
.error, .negative { color: var(--error); }
.success, .positive { color: var(--green-700); }
.confirmation-status { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 6px 10px; border: 1px solid var(--green-line); border-radius: 999px; background: var(--green-soft); color: var(--green-700); font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
/* Page and AJAX status messages; field-level validation keeps its own styling. */
:is(.relaunch-app, .relaunch-login) :is(p.success, p.error, .login-message > p.remark):not(.form-field *):not(.login-field *):not(.field-error-message):not(.help-block) {
    position: relative;
    min-height: 48px;
    margin: 0 0 22px;
    padding: 13px 16px 13px 47px;
    border: 1px solid var(--green-line);
    border-radius: var(--radius-small);
    background: var(--green-soft);
    color: var(--green-700);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
:is(.relaunch-app, .relaunch-login) :is(p.error, .login-message > p.remark):not(.form-field *):not(.login-field *):not(.field-error-message):not(.help-block) {
    border-color: var(--error-line);
    background: var(--error-soft);
    color: var(--error);
}
:is(.relaunch-app, .relaunch-login) :is(p.success, p.error, .login-message > p.remark):not(.form-field *):not(.login-field *):not(.field-error-message):not(.help-block) a { color: inherit; text-decoration: underline; }
.warning, .important { color: var(--error); font-weight: 600; }
@media (max-width: 640px) {
    .page-header { flex-wrap: wrap; row-gap: 10px; }
    .page-headings { flex: 1 1 calc(100% - 52px); }
    .page-header > .page-actions { flex: 1 1 100%; width: 100%; max-width: 100%; }
    .page-actions { width: 100%; }
    .page-actions ul { justify-content: flex-start; }
    .page-actions.detail-form-actions { justify-content: flex-start; }
    fieldset { padding: 14px; }
    .form-label { flex-basis: 100%; padding-top: 0; }
}

.align-right { text-align: right; }
.clearBoth { clear: both; }
.form-error, .form-warning, .form-warn { color: var(--error); }
.field-error-message { display: flex; align-items: flex-start; gap: 5px; flex: 0 0 100%; width: 100%; margin: 0; color: var(--error); font-size: 12.5px; font-weight: 500; line-height: 1.4; }
:is(.lookup-control, .date-input-control, .company-picker, .second-input) > .field-error-message { margin-top: 7px; }
.form-error.help-block:empty { display: none; }
.field-error-text { min-width: 0; overflow-wrap: anywhere; }
.required-indicator { color: var(--error); }
.relaunch-delete-dialog.ui-dialog { max-width: calc(100vw - 32px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); font: inherit; box-shadow: var(--shadow); }
.relaunch-delete-dialog .ui-dialog-titlebar { margin: 0; padding: 20px 52px 16px 22px; border: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--surface); color: var(--ink-2); font-size: 18px; font-weight: 600; }
.relaunch-delete-dialog .ui-dialog-titlebar-close { display: grid; place-items: center; right: 14px; width: 28px; height: 28px; min-height: 0; margin-top: -14px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); }
.relaunch-delete-dialog .ui-dialog-titlebar-close:hover { background: var(--page); }
.relaunch-delete-dialog .ui-dialog-content { padding: 0 22px 22px; color: inherit; font: inherit; }
.deletion-dialog-message { display: flex; align-items: flex-start; gap: 14px; }
.deletion-dialog-message > .fa-solid { flex: 0 0 24px; margin-top: 3px; color: var(--error); font-size: 24px; }
.deletion-dialog-message p { margin: 0; }
.deletion-dialog-message .deletion-dialog-object { margin-bottom: 6px; color: var(--ink-2); font-weight: 600; overflow-wrap: anywhere; }
.deletion-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.deletion-dialog-actions .deletion-dialog-confirm { background: var(--error); border-color: var(--error); }
.deletion-dialog-actions .deletion-dialog-confirm:hover { filter: brightness(.92); }
.deletion-dialog-actions .deletion-dialog-cancel { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.deletion-dialog-actions .deletion-dialog-cancel:hover { background: var(--page); }
.relaunch-delete-overlay.ui-widget-overlay { background: #0f1319; opacity: .35; }
.searchresults tr.row-error, .listview tr.row-error { background: #fdeaea; }
.searchresults td.components { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.searchresults .td-text { overflow: hidden; text-overflow: ellipsis; white-space: normal; margin-right: 10px; }

.searchresults tr[data-detail-url] { cursor: pointer; }

/* Main record forms have no tab navigation; secondary sections keep their tabs. */
.detail-form {
    padding: 22px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.detail-form-header { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-bottom: 20px; }
.detail-form-header > .page-heading-icon { flex-basis: 38px; width: 38px; height: 38px; border-radius: 11px; }
.detail-form-header h2 { margin: 0; color: var(--ink-2); font-size: 16px; font-weight: 600; }
.detail-form form:has(> .form-field) > .detail-form-header { margin-bottom: 2px; }
.detail-form-scope { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green-700); font-size: 11.5px; font-weight: 600; }
.detail-form-scope > .fa-solid { font-size: 13px; }
.detail-form-hint { margin-left: auto; color: var(--ink-3); font-size: 13px; }
@media (max-width: 640px) {
    .detail-form-hint { flex-basis: 100%; margin-left: 0; }
}
body:has(.relaunch-app) :is(form, fieldset, div):has(> .form-field):not(.form-field):not(.hidden):not([hidden]):not(.company-booking-filters) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
    align-items: start;
}
body:has(.relaunch-app) :is(form, fieldset, div):has(> .form-field):not(.form-field):not(.hidden):not([hidden]) > :not(.form-field) {
    grid-column: 1 / -1;
    min-width: 0;
}
body:has(.relaunch-app) :is(form, fieldset, div):has(> .form-field) > :is(.clearLeft, .clearBoth),
body:has(.relaunch-app) .clearfix:has(> .form-field)::after { display: none; }
body:has(.relaunch-app) .form-field {
    min-width: 0;
    margin: 0;
    gap: 8px;
    align-items: center;
}
.detail-form :is(form, #tabsTop0):not(:has(> .form-field)) > .clearfix + .clearfix { margin-top: 18px; }
.detail-form .form-field > p { margin: 0; }
body:has(.relaunch-app) .form-label {
    flex: 0 0 100%;
    padding: 0;
    color: var(--ink-2);
    font-weight: 500;
}
body:has(.relaunch-app) .form-label:not(:has(label)) { min-height: 0; }
body:has(.relaunch-app) .form-field > :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea, .selectize-control) {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
}
body:has(.relaunch-app) .form-field:has(> input[type="checkbox"]) > .form-label:not(:has(label)),
body:has(.relaunch-app) .form-field-submit > .form-label { display: none; }
body:has(.relaunch-app) .form-field:has(> input[type="checkbox"]) {
    padding-top: 0;
    min-height: 40px;
    align-content: center;
    align-self: end;
}
body:has(.relaunch-app) .form-field > input[type="checkbox"] {
    order: -2;
    flex-shrink: 0;
}
body:has(.relaunch-app) .form-field:has(> input[type="checkbox"]) > .form-label:has(label),
body:has(.relaunch-app) .form-field > input[type="checkbox"] + label {
    order: -1;
    flex: 1 1 0;
    min-width: 0;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 500;
}
body:has(.relaunch-app) .form-field > .form-field { flex: 1 1 100%; }
body:has(.relaunch-app) .form-field > .date-input-control { flex: 1 1 0; min-width: 0; }
body:has(.relaunch-app) .form-field > :is(.company-picker, .second-input) {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
}
body:has(.relaunch-app) :is(.company-picker, .second-input) > .form-label { margin-bottom: 8px; }
body:has(.relaunch-app) .second-input > :is(select, .selectize-control) { width: 100%; min-width: 0; }
body:has(.relaunch-app) .form-field:has(> .form-field-level2) { grid-column: 1 / -1; }
body:has(.relaunch-app) .form-field-level2 { width: 100%; min-width: 0; }
body:has(.relaunch-app) form.embeddedSearch input.searchTerm { width: calc((100% - 24px) / 2); }
body:has(.relaunch-app) .form-field:has(table) { grid-column: 1 / -1; }
body:has(.relaunch-app) .form-field:has(table) > div:not(.form-label) { max-width: 100%; overflow-x: auto; }
body:has(.relaunch-app) .form-field-submit { grid-column: 1 / -1; margin-top: 6px; }
@media (max-width: 640px) {
    .detail-form { padding: 14px; }
    body:has(.relaunch-app) :is(form, fieldset, div):has(> .form-field):not(.form-field):not(.hidden):not([hidden]):not(.company-booking-filters) { grid-template-columns: minmax(0, 1fr); }
    body:has(.relaunch-app) form.embeddedSearch input.searchTerm { width: 100%; }
}
