/* Shared BuildLedger workspace. Roboto is bundled locally in construction.css. */
:root {
    --brand: #087b65; --dark: #066451; --soft: #edf7f3;
    --ink: #172c3e; --muted: #627487; --line: #d8e0e7; --grid: #dce4ea;
    --canvas: #f3f5f7; --navy: #142a3d; --sidebar: 250px;
}
html { font-size: 13px; }
body, button, input, select, textarea, table, .mono { font-family: Roboto, Arial, sans-serif; }
body { font-size: 13px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.ui-icon { width: 18px; height: 18px; flex: 0 0 18px; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ledger-app { min-width: 320px; }
h1 { font-size: 23px; line-height: 1.3; letter-spacing: -.5px; }
h2 { font-size: 14px; line-height: 1.4; }
h3 { font-size: 13px; }
.text-link { color: var(--brand); }
.skip-link { z-index: 120; padding: 10px 14px; border-radius: 4px; }

/* The navy navigation and green active states follow the supplied reference. */
.sidebar { background: var(--navy); color: #cddae3; border: 0; height: 100vh; height: 100dvh; transition: transform .18s ease; }
.sidebar-heading { display: flex; align-items: center; min-height: 78px; border-bottom: 1px solid #2c4152; }
.sidebar .brand { height: auto; min-height: 77px; border: 0; flex: 1; gap: 10px; padding: 16px; min-width: 0; }
.brand-logo { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; background: #fff; border: 1px solid #3a5062; border-radius: 5px; }
.sidebar .brand strong { font-size: 20px; font-weight: 600; color: #fff; letter-spacing: -.6px; }
.sidebar .brand small { color: #b0c1cf; font-size: 9px; text-transform: none; letter-spacing: .25px; margin-top: 3px; }
.sidebar-close { display: none; }
.workspace { margin: 12px 12px 0; padding: 11px 12px; background: #1b3245; border: 1px solid #344b5c; border-radius: 5px; }
.workspace .workspace-label { color: #a5b9c8; font-size: 9px; letter-spacing: 1.1px; margin-bottom: 5px; }
.workspace strong { display: block; font-weight: 500; color: #eef4f8; font-size: 12px; overflow-wrap: anywhere; }
.workspace small { display: flex; align-items: center; gap: 6px; color: #afc4d1; font-size: 10px; margin-top: 4px; }
.workspace-dot { width: 5px; height: 5px; flex: 0 0 5px; background: #83c9ab; border-radius: 50%; }
.sidebar-search { margin: 12px 12px 5px; position: relative; }
.sidebar-search > .ui-icon { position: absolute; left: 10px; top: 10px; width: 15px; height: 15px; color: #a8bac8; pointer-events: none; }
.sidebar-search input { width: 100%; height: 35px; border: 1px solid #3a5062; border-radius: 4px; background: #1b3245; color: #fff; font-size: 12px; padding: 7px 30px 7px 33px; }
.sidebar-search input::placeholder { color: #b0c1cf; }
.sidebar-search input:focus { outline: 1px solid #75bda5; border-color: #75bda5; }
.sidebar-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sidebar-search kbd { position: absolute; right: 10px; top: 9px; color: #a5b9c8; font: 11px/16px Roboto, Arial, sans-serif; padding: 0 5px; border: 1px solid #4a6072; border-radius: 3px; pointer-events: none; }
.nav-scroll { padding: 5px 10px 18px; min-height: 0; scrollbar-color: #4b6173 transparent; overscroll-behavior: contain; }
.nav-caption { padding: 17px 10px 7px; font-size: 9px; letter-spacing: 1.2px; color: #99afbf; font-weight: 500; }
.sidebar .nav-item, .sidebar .nav-section summary { color: #cddae3; min-height: 36px; padding: 8px 10px; margin: 0 0 2px; font-size: 12px; font-weight: 400; border: 0; border-radius: 4px; line-height: 1.45; gap: 10px; }
.sidebar .nav-item:hover, .sidebar .nav-section summary:hover { background: #20394d; color: #fff; }
.sidebar .nav-item.active { background: #244a43; color: #e1fbef; font-weight: 500; box-shadow: inset 3px 0 #78c7a8 !important; }
.sidebar .nav-item .ui-icon, .nav-section summary .ui-icon { color: #a1b7c7; width: 17px; height: 17px; flex-basis: 17px; }
.sidebar .nav-item.active .ui-icon { color: #a3e5c8; }
.nav-section { margin: 0 0 3px; }
.nav-section summary { list-style: none; }
.nav-section summary::after { display: none; }
.nav-section summary::-webkit-details-marker { display: none; }
.nav-chevron { margin-left: auto; width: 13px; height: 13px; flex: 0 0 13px; color: #9bb1c3; transition: transform .16s ease; }
.nav-section[open] > summary .nav-chevron { transform: rotate(90deg); }
.nav-section.is-current > summary { color: #f1f6fa; font-weight: 500; }
.nav-children { margin: 5px 0 7px 18px; padding-left: 10px; border-left: 1px solid #3a5062; }
.sidebar .nav-section .nav-item { padding: 6px 8px; min-height: 29px; font-size: 11.5px; }
.sidebar .nav-section .nav-item.active { box-shadow: none !important; }
.menu-empty { padding: 16px 10px; color: #cddae3; font-size: 12px; }
.sidebar-bottom { padding: 12px; gap: 9px; min-height: 65px; border-top: 1px solid #2c4152; background: var(--navy); }
.user-mark { width: 32px; height: 32px; flex: 0 0 32px; background: #e8f1ed; color: #176750; font-size: 12px; font-weight: 600; border-radius: 5px; }
.sidebar-user { min-width: 0; flex: 1; }
.sidebar-user strong { display: block; color: #eef4f8; font-size: 11px; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user small { display: block; color: #a9bdcb; font-size: 10px; margin-top: 2px; }
.sidebar-bottom form { flex: 0 0 auto; }
.sidebar-signout { padding: 5px; background: transparent; color: #b8c9d5; border: 0; border-radius: 4px; }
.sidebar-signout:hover { background: #284456; color: #fff; }

/* One compact header; workspace selectors stay on its right. */
.main-wrap { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; transition: margin-left .18s ease; }
.topbar { position: sticky; top: 0; z-index: 20; height: auto; min-height: 46px; padding: 7px 12px; gap: 10px; background: #fff; flex-wrap: nowrap; }
.topbar-left { flex: 1 1 180px; gap: 9px; min-width: 0; }
.topbar-right { flex: 0 1 auto; gap: 9px; min-width: 0; }
.icon-btn { width: 32px; min-width: 32px; height: 32px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: white; }
.icon-btn:hover { color: var(--brand); background: var(--soft); }
.menu-toggle { display: inline-grid; }
.header-workspace { min-width: 0; }
.workspace-label { display: block; color: var(--muted); font-size: 10px; line-height: 1.4; }
.header-workspace strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-date { color: var(--muted); font-size: 11px; white-space: nowrap; }
.header-directory { display: grid; place-items: center; width: 32px; height: 32px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; }
.header-directory:hover { color: var(--brand); background: var(--soft); }
.header-profile { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.header-profile > span:last-child { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-selectors { display: flex; align-items: center; gap: 7px; min-width: 0; }
.header-selectors form, .company-workspace-name { display: flex; align-items: center; min-width: 0; }
.currency-label { font-size: 10px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.project-switch { min-width: 0; width: clamp(130px, 11vw, 180px); max-width: 180px; height: 28px; padding: 3px 22px 3px 7px; border: 1px solid var(--line); border-radius: 4px; background: white; font-size: 11px; font-weight: 400; text-overflow: ellipsis; }
.company-workspace-name strong { max-width: 160px; font-size: 11px; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.currency-label strong { display: inline-block; font-size: 10px; padding: 2px 6px; background: #edf1f4; color: #415a6c; border: 1px solid #dce4ea; border-radius: 3px; margin-left: 0; }
.content { flex: 1 0 auto; width: 100%; max-width: 1920px; padding: 10px 12px 6px; margin: 0 auto; min-width: 0; }
#main:focus { outline: none; }
.breadcrumb { font-size: 10px; line-height: 1.3; gap: 5px; color: #768796; margin-bottom: 6px; }
.breadcrumb span + span::before { content: none; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.page-heading { padding: 0; margin-bottom: 8px; gap: 8px; align-items: center; }
.ledger-app .page-heading h1 { font-size: 18px; line-height: 1.25; letter-spacing: -.25px; }
.page-heading p { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.page-actions { gap: 6px; }
.btn { min-height: 29px; height: auto; padding: 4px 9px; border: 1px solid #c8d3dc; border-radius: 4px; background: #fff; color: #3e5566; font-size: 12px; line-height: 1.4; }
.btn:hover { background: #f1f7f5; border-color: #9cbfb2; color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn-danger { color: #b32f40; border-color: #dbb2ba; }
.btn-danger:hover { color: #99283a; border-color: #c6818e; background: #fff4f5; }
.btn-xs { min-height: 26px; font-size: 10px; padding: 4px 7px; }
.btn-plain { background: transparent; border-color: transparent; }
.pill { border-radius: 3px; font-size: 10px; padding: 2px 6px; }
.panel, .catalog-group { border-radius: 5px; margin-bottom: 10px; border-color: var(--line); }
.panel-header { padding: 7px 10px; min-height: 34px; background: #f9fbfc; }
.panel-header small { font-size: 10px; }
.panel-body { padding: 9px 10px; }
.panel-index { color: var(--brand); }
.two-col, .dashboard-row, .split { gap: 10px; }
.panel.flush > .panel-body { padding: 0; }
.metrics { border-radius: 5px; margin-bottom: 10px; }
.metric { padding: 10px 12px; }
.metric-label { font-size: 11px; color: var(--muted); }
.metric-value, .metrics .metric-value { font-size: clamp(18px, 1.75vw, 26px); color: #1c3f53; letter-spacing: -.6px; margin: 5px 0; }
.metric-good, .metrics .metric-good { color: var(--brand); }
.metric-warn, .metrics .metric-warn { color: #9a650c; }
.metric-note { color: #768793; font-size: 10px; line-height: 1.5; }
.floor-grid { padding: 0; }
.floor-tile { padding: 9px 10px; }
.floor-tile:hover { background: #f3f9f6; }
.floor-cost { color: var(--ink); }
.floor-status { color: #6c7e8d; }
.bar-track { height: 4px; background: #e1ece7; border-radius: 2px; overflow: hidden; }
.bar-track > span { background: #38967e; height: 4px; }
.compact-list > a { padding: 8px 10px; font-size: 12px; }
.compact-list > a > span { color: var(--brand); font-size: 11px; }
.filters { padding: 7px 9px; gap: 7px; background: #fff; }
.filter label { margin-bottom: 1px; color: var(--muted); font-size: 10px; }
.filter input, .filter select { height: 29px; border: 1px solid #c7d3dc; border-radius: 4px; padding: 5px 8px; font-size: 12px; }
.filter.search { max-width: 360px; }
.filter-actions { gap: 6px; }
.sheet th { padding: 6px 7px; font-size: 11px; background: #f1f4f7; color: #475f70; }
.sheet th a { display: block; font-size: inherit; font-weight: 500; }
.sheet td { padding: 5px 7px; height: 29px; font-size: 12px; }
.sheet tbody tr:nth-child(even) { background: #fbfcfd; }
.sheet tbody tr:hover { background: #f1f7f5; }
.sheet .sl { color: #70828e; background: #f6f8fa; }
.sheet tfoot td { background: #edf6f2; border-top: 2px solid #a5c8b9; }
.sheet input:not([type=checkbox]), .sheet select { height: 33px; font-size: 12px; }
.sheet input[type=checkbox], .sheet th input[type=checkbox] { width: 14px; height: 14px; accent-color: var(--brand); }
.sheet-status { flex-wrap: wrap; padding: 5px 9px; background: #f8fafb; color: #6d808e; }
.sheet .actions { width: 1%; min-width: 0; white-space: nowrap; }
.sheet td.actions { padding: 2px 6px; }
.row-actions { display: inline-flex; align-items: center; justify-content: center; gap: 2px; vertical-align: middle; }
.row-actions form { display: inline-flex; margin: 0; }
.sheet .table-action { display: inline-flex; align-items: center; justify-content: center; width: 26px; min-width: 26px; height: 26px; padding: 4px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #496576; text-decoration: none; vertical-align: middle; cursor: pointer; }
.sheet .table-action:hover:not(:disabled) { color: var(--brand); border-color: #c8d9d2; background: #eaf4ef; text-decoration: none; }
.sheet .table-action:focus-visible { outline-offset: 1px; }
.sheet .table-action .ui-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.sheet .table-action-danger { color: #b42318; }
.sheet .table-action-danger:hover:not(:disabled) { color: #a11e17; border-color: #ebc6c1; background: #fff1ef; }
.sheet .table-action-warning { color: #96640d; }
.sheet .table-action-warning:hover:not(:disabled) { color: #825500; border-color: #e5d3ac; background: #fff7e8; }
.sheet .table-action:disabled { color: #7c8c97; opacity: .55; cursor: not-allowed; }
.section-bar { padding: 8px 14px; background: #f3f6f8; color: #405b6a; }
.form-grid { padding: 14px; gap: 13px 16px; }
.field label { font-size: 11px; font-weight: 500; margin-bottom: 5px; color: #405768; }
.field input:not([type=checkbox]), .field select, .field textarea { height: 35px; border: 1px solid #bfccd6; border-radius: 4px; padding: 7px 9px; font-size: 12px; }
.field textarea { height: 78px; }
.field input[readonly] { background: #f3f6f8; }
.field input[type=file] { height: auto; min-height: 35px; font-size: 11px; padding: 6px; }
.field input::file-selector-button { border: 1px solid #c7d3dc; border-radius: 3px; background: #f3f6f8; color: #405768; padding: 3px 8px; margin-right: 9px; font: inherit; }
.field small { color: var(--muted); font-size: 10px; margin-top: 5px; }
.field .required, .field [aria-invalid=true] + small { color: #b32f40; }
.form-grid [aria-invalid=true] { border-color: #b32f40; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 2px solid #dfefe8; }
.logo-upload { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px dashed #b6c7cf; border-radius: 5px; background: #fafcfd; }
.logo-preview { width: 82px; height: 75px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: #fff; flex-shrink: 0; }
.logo-upload > div { min-width: 0; flex: 1; }
.logo-upload .logo-upload-caption { color: var(--ink); font-size: 11px; margin-bottom: 7px; display: block; }
.entry-footer { padding: 12px 14px; gap: 16px; }
.totals td { padding: 7px 9px; }
.totals .grand td { background: #edf7f3; color: #1b6453; }
.form-action-bar { padding: 12px 14px; gap: 10px; background: #f9fbfc; flex-wrap: wrap; }
.form-action-bar > div { gap: 6px; align-items: center; flex-wrap: wrap; }
.form-action-bar input[type=date], .panel-body input[type=date] { border: 1px solid var(--line); border-radius: 4px; height: 32px; padding: 4px 7px; font-size: 12px; }
.alert, .form-errors { padding: 10px 12px; border-radius: 4px; font-size: 12px; margin-bottom: 14px; }
.alert { background: #f0f8f4; border-color: #b8d8c9; color: #28604b; }
.form-errors { background: #fff5f6; color: #a62d40; border-color: #e4bcc4; }
.tabs { background: #f8fafb; }
.tab { padding: 10px 14px; font-size: 12px; }
.detail-grid > div { padding: 12px 14px; }
.detail-grid dt { font-size: 10px; }
.detail-grid dd { margin-top: 4px; font-size: 12px; }
.detail-summary { padding: 12px 14px; }
.detail-summary strong { font-size: 15px; }
.document-list { min-height: 40px; }
.document-item, .activity-item { padding: 10px 0; }
.report-summary { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); background: #f0f7f3; }
.report-summary > div { padding: 10px 14px; border-right: 1px solid var(--line); font-size: 11px; }
.report-summary strong { display: block; font-size: 16px; color: #1d6453; }
.empty-state { padding: 30px 14px; text-align: center; font-size: 12px; color: var(--muted); }
.catalog-row .catalog-links { gap: 8px; }
.error-code { font-size: 32px; font-weight: 600; color: var(--brand); }
.line-grid output { padding: 5px 7px; display: block; min-width: 75px; }
.no-wrap { white-space: nowrap; }
.permission-checkbox { width: 14px; height: 14px; }
.footer { display: block; margin-top: auto; padding: 16px 24px; border-top: 1px solid var(--line); background: #fff; width: 100%; }
.developer-credit { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 5px 20px; width: 100%; color: #6b7d8c; font-size: 11px; line-height: 1.7; }
.developer-credit a { color: var(--brand); }
.developer-credit a:hover { text-decoration: underline; }
.developer-credit strong { font-weight: 500; }

/* Split account screen, using the same flat navy/green treatment as the reference. */
.auth-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; margin: 0; padding: 0; background: #f3f5f7; }
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; flex: 1; width: 100%; min-height: calc(100vh - 55px); min-height: calc(100dvh - 55px); }
.auth-brand-panel { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px,5vw,76px); background: #142e3b; color: #fff; }
.auth-wordmark { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 600; letter-spacing: -.4px; color: #fff; }
.auth-wordmark .ui-icon { width: 32px; height: 32px; flex-basis: 32px; color: #9bd3ba; }
.auth-brand-story { margin: 45px 0; }
.auth-company-logo { width: 104px; height: 86px; object-fit: contain; border: 1px solid #3b5361; border-radius: 5px; margin-bottom: 28px; }
.auth-brand-panel h2 { font-size: clamp(27px,2.8vw,42px); font-weight: 500; line-height: 1.25; letter-spacing: -.7px; color: #fff; margin-bottom: 22px; }
.auth-brand-panel h2 span { color: #9bd3ba; }
.auth-brand-panel p { max-width: 360px; font-size: 13px; line-height: 1.8; color: #b6cad4; }
.auth-caption { padding-top: 20px; border-top: 1px solid #3b5361; color: #b6cad4; font-size: 10px; letter-spacing: 1.1px; }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; width: auto; max-width: none; border: 0; padding: 45px 28px; background: #f3f5f7; }
.auth-content { width: 100%; max-width: 370px; padding: 0; }
.auth-mobile-brand { display: none; color: #185746; font-weight: 600; letter-spacing: .3px; margin-bottom: 30px; align-items: center; gap: 9px; font-size: 20px; }
.auth-kicker { font-size: 10px; letter-spacing: 1.4px; color: #627787; font-weight: 500; text-transform: uppercase; margin-bottom: 9px; }
.auth-content h1 { font-size: 28px; font-weight: 600; line-height: 1.3; letter-spacing: -.6px; margin-bottom: 8px; color: #1c3545; }
.auth-content > p { color: #647b8b; font-size: 12px; margin: 0 0 28px; line-height: 1.7; }
.auth-content .field { margin-bottom: 18px; }
.auth-content .field label { color: #3c5364; font-size: 12px; font-weight: 500; margin-bottom: 7px; }
.auth-content .field input:not([type=checkbox]) { height: 44px; padding: 11px 12px; font-size: 13px; background: #fff; }
.auth-content .field input::placeholder { color: #81919e; }
.auth-content .field input[aria-invalid=true] { border-color: #b63848; }
.password-wrapper { position: relative; }
.auth-content .password-wrapper input { padding-right: 50px !important; }
.password-toggle { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: transparent; border-radius: 3px; color: #657e8e; }
.password-toggle:hover, .password-toggle[aria-pressed=true] { color: var(--brand); background: #edf5f1; }
.password-toggle .ui-icon { width: 19px; height: 19px; }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0; font-size: 11px; }
.auth-remember { display: flex; align-items: center; gap: 7px; color: #526b7d; cursor: pointer; }
.auth-remember input { accent-color: var(--brand); width: 14px; height: 14px; }
.auth-options a, .auth-links a { color: var(--brand); font-weight: 500; }
.auth-options a:hover, .auth-links a:hover { text-decoration: underline; }
.auth-content .btn { width: 100%; min-height: 44px; font-size: 13px; font-weight: 500; margin: 5px 0 0; gap: 10px; }
.auth-content .btn .ui-icon { width: 17px; height: 17px; }
.auth-links { padding: 18px 0 0; text-align: center; font-size: 12px; }
.auth-footer { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; max-width: 370px; margin-top: 27px; padding: 0; border: 0; color: #758a9a; font-size: 10px; }
.auth-footer .ui-icon { width: 13px; height: 13px; flex-basis: 13px; }
.auth-page > .footer { margin: 0; padding: 15px 20px; background: #fff; }

/* Company branding is shared by register prints, reports and payslips. */
.company-print-logo { width: 88px; height: 76px; flex-shrink: 0; object-fit: contain; }
.letterhead { gap: 18px; padding: 12px 0; border-bottom: 2px solid var(--brand); margin-bottom: 14px; }
.letterhead-company { flex: 1; min-width: 0; }
.letterhead-company strong { font-size: 21px; overflow-wrap: anywhere; }
.letterhead p { margin: 3px 0 0; font-size: 11px; color: #526b7b; }
.letterhead-tax { text-align: right; flex-shrink: 0; }
.print-sheet { padding: 22px; border-radius: 5px; }
.print-heading { padding: 10px 0; margin-bottom: 8px; }
.print-heading h2 { font-size: 16px; }
.print-sheet .sheet { min-width: 0; }

@media (min-width:1024px) {
    .sidebar-hidden .sidebar { transform: translateX(-100%); visibility: hidden; }
    .sidebar-hidden .main-wrap { margin-left: 0; }
}
@media (max-width:1250px) and (min-width:1024px) {
    .page-heading { align-items: flex-start; flex-wrap: wrap; }
}
@media (max-width:1300px) {
    .header-date, .header-profile > span:last-child { display: none; }
}
@media (max-width:1100px) {
    .header-directory { display: none; }
}
@media (max-width:1023px) {
    .sidebar { width: var(--sidebar); transform: translateX(-100%); visibility: hidden; z-index: 60; }
    .nav-open .sidebar { transform: translateX(0); visibility: visible; }
    .nav-open { overflow: hidden; }
    .nav-open .sidebar-shade { display: block; position: fixed; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgb(13 30 43 / .45); z-index: 50; cursor: default; }
    .sidebar-close { display: inline-grid; width: 27px; min-width: 27px; height: 27px; margin-right: 10px; padding: 4px; border-color: #4b6173; background: transparent; color: #fff; }
    .sidebar .brand { padding-right: 4px; }
    .sidebar .brand strong { font-size: 18px; }
    .sidebar .brand small { font-size: 8px; }
    .main-wrap { margin-left: 0; }
    .auth-brand-panel { padding: 36px; }
    .auth-brand-panel h2 { font-size: 31px; }
}
@media (max-width:767px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand-panel { display: none; }
    .auth-panel { padding: 40px 24px; }
    .auth-mobile-brand { display: flex; }
    .auth-content { max-width: 390px; }
    .auth-footer { max-width: 390px; }
    .auth-page > .footer { padding: 13px 15px; }
    .page-heading { align-items: flex-start; flex-wrap: wrap; }
    .header-profile > span:last-child { display: none; }
    .currency-label { display: none; }
}
@media (max-width:680px) {
    .topbar { padding: 6px 8px; min-height: 42px; gap: 6px; }
    .topbar-left { flex: 0 0 auto; gap: 0; }
    .header-workspace { display: none; }
    .header-date, .header-directory { display: none; }
    .topbar-right { flex: 1; gap: 6px; }
    .header-selectors { flex: 1; gap: 6px; }
    .header-selectors form { flex: 1 1 0; width: 0; }
    .header-selectors .project-switch { width: 100%; max-width: 100%; height: 28px; font-size: 11px; }
    .company-workspace-name { flex: 1 1 0; }
    .company-workspace-name strong { max-width: 100%; }
    .content { padding: 8px 9px 6px; }
    .breadcrumb { font-size: 10px; margin-bottom: 5px; }
    h1 { font-size: 21px; }
    .page-heading { margin-bottom: 7px; gap: 7px; }
    .page-heading p { font-size: 11px; max-width: none; }
    .page-actions { gap: 5px; }
    .page-actions .btn { min-height: 29px; height: auto; font-size: 11px; padding: 4px 8px; }
    .panel { margin-bottom: 9px; }
    .panel-header, .panel-body { padding: 8px 10px; }
    .two-col, .dashboard-row, .split { gap: 9px; }
    .metric { padding: 10px; }
    .metrics .metric-value { font-size: 22px; }
    .metric-label { font-size: 10px; }
    .metric-note { font-size: 9px; }
    .form-grid { padding: 12px; gap: 12px; }
    .field input:not([type=checkbox]), .field select, .field textarea { height: 39px; font-size: 14px; }
    .field textarea { height: 80px; }
    .filter input, .filter select { height: 35px; font-size: 13px; }
    .sheet th, .sheet td { font-size: 11px; }
    .sheet-status { padding: 7px 10px; }
    .logo-upload { flex-direction: column; align-items: flex-start; }
    .logo-upload > div { width: 100%; }
    .form-action-bar { padding: 10px 12px; gap: 8px; }
    .form-action-bar .btn { font-size: 11px; min-height: 32px; padding: 6px 9px; }
    .form-action-bar small { display: none; }
    .entry-footer { padding: 12px; flex-wrap: wrap; }
    .entry-footer > small { flex-basis: 100%; }
    .footer { padding: 13px 12px; }
    .developer-credit { font-size: 10px; gap: 3px 12px; }
    .developer-credit > span:first-child { flex-basis: 100%; text-align: center; }
    .company-print-logo { width: 60px; height: 58px; }
    .letterhead { gap: 10px; }
    .letterhead-company strong { font-size: 17px; }
    .letterhead p { font-size: 9px; }
    .print-sheet { padding: 12px; }
}
@media (max-width:380px) {
    .form-grid { grid-template-columns: 1fr; }
    .field.wide { grid-column: auto; }
    .topbar-right .user-mark { width: 28px; height: 28px; flex-basis: 28px; }
    .auth-panel { padding: 30px 20px; }
}
@media print {
    html { font-size: 10px; }
    body { background: #fff; color: #000; }
    .sidebar, .sidebar-shade, .topbar, .breadcrumb, .no-print, .alert, .form-errors, .logo-upload { display: none !important; }
    .main-wrap, .sidebar-hidden .main-wrap { display: block; margin: 0; min-height: 0; }
    .content { display: block; padding: 0; margin: 0; min-height: 0; max-width: none; }
    .footer { display: block !important; padding: 7px 0; margin-top: 16px; background: #fff; border-top: 1px solid #ccc; break-inside: avoid; }
    .developer-credit { font-size: 8px; gap: 4px 12px; color: #444; }
    .developer-credit > span:first-child { flex-basis: auto; }
    .developer-credit a { color: #333; }
    .letterhead { break-inside: avoid; border-color: #415e55; gap: 14px; margin-bottom: 10px; padding-top: 0; }
    .company-print-logo { width: 24mm; height: 20mm; }
    .letterhead-company strong { font-size: 19px; }
    .letterhead p { font-size: 9px; color: #333; }
    .print-heading { padding: 5px 0; }
    .print-sheet { padding: 0; border: 0; border-radius: 0; max-width: none; }
    .panel { overflow: visible; border: 0; border-radius: 0; margin-bottom: 8px; }
    .panel-header, .panel-body { padding: 5px 0; }
    .print-sheet .panel-header { padding: 4px 0; }
    .sheet-scroll { overflow: visible; max-height: none; }
    .sheet, .sheet.line-grid, .sheet.report-grid { min-width: 0; }
    .sheet th { background: #eee; }
    .sheet th, .sheet td { padding: 3px !important; font-size: 8px !important; height: auto; }
    .sheet thead { position: static; display: table-header-group; }
    .sheet .sl input[type=hidden] { display: none; }
    .metrics { border-radius: 0; }
    .metric { padding: 6px; }
    .metrics .metric-value { font-size: 15px; }
    .detail-grid > div { padding: 6px 8px; }
    .detail-grid dt { font-size: 9px; }
    .detail-grid dd { font-size: 10px; margin-top: 2px; }
    .report-summary { break-inside: avoid; }
    .report-summary > div { padding: 6px 9px; }
    .report-summary strong { font-size: 13px; color: #222; }
    .main-wrap .content .page-heading.no-print { display: none !important; }
}

/* Register controls and searchable relations. */
.field fieldset{border:0;padding:0;display:grid;gap:6px}.field fieldset label{display:flex;align-items:center;gap:6px}.field fieldset input{width:auto}.activity-item details{width:100%;overflow:auto}.activity-item pre{white-space:pre-wrap}.sheet-status form{margin:0}.detail-summary{flex-wrap:wrap;gap:8px}.document-item{flex-wrap:wrap}.document-item small{color:#667085}.sheet pre{max-width:65vw;white-space:pre-wrap;overflow-wrap:anywhere}.selection-actions{display:flex;gap:6px;align-items:center}
