:root {
    --xdnavy: #0a1220;
    --dnavy: #0f1a2e;
    --navy: #1a2744;
    --rule: #2e3d5e;
    --cyan: #28c3eb;
    --white: #f5f4f0;
    --mgrey: #8a9099;
    --cyan-hover: rgba(40,195,235,.06);
    --bg: #eef2f6;
    --surface: #fbfaf6;
    --surface-2: #f5f4f0;
    --ink: var(--xdnavy);
    --muted: var(--mgrey);
    --line: #cdd5df;
    --line-soft: #dfe5ec;
    --nav: #fbfaf6;
    --nav-ink: var(--navy);
    --nav-muted: #5d6875;
    --blue: var(--cyan);
    --teal: var(--cyan);
    --green: #1a5c38;
    --amber: #8b6f1f;
    --red: #8b1a1a;
    --chart-cyan: #28c3eb;
    --chart-blue: #4f7cff;
    --chart-green: #2c9f6b;
    --chart-violet: #8b5cf6;
    --chart-amber: #d3912c;
    --chart-red: #d14f4f;
    --chart-grey: #8a9099;
    --shadow: 0 14px 32px rgba(10, 18, 32, .08);
    --radius: 8px;
    --font: "Avenir Next", Avenir, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --display: var(--font);
}

html[data-theme="dark"] {
    --bg: var(--xdnavy);
    --surface: #101c31;
    --surface-2: var(--dnavy);
    --ink: var(--white);
    --muted: var(--mgrey);
    --line: var(--rule);
    --line-soft: rgba(46,61,94,.68);
    --nav: var(--xdnavy);
    --nav-ink: var(--white);
    --nav-muted: var(--mgrey);
    --shadow: 0 18px 45px rgba(0, 0, 0, .22);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    letter-spacing: 0;
    overflow-x: hidden;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: var(--cyan);
    font-weight: 650;
    text-decoration: none;
}

.lh-login {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(340px, .92fr) minmax(0, 1.08fr);
    background: var(--white);
}

.lh-login__panel {
    min-height: 100vh;
    min-height: 100svh;
    background: var(--xdnavy);
    color: var(--white);
    padding: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lh-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(40,195,235,.10);
    color: var(--navy);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.lh-login__logo {
    width: min(56%, 360px);
    height: auto;
    display: block;
}

.lh-login__form {
    display: grid;
    place-items: center;
    padding: 32px;
    min-width: 0;
}

.lh-signin {
    width: min(460px, 100%);
    padding: 24px;
    background: var(--white);
    color: #101827;
}

.lh-signin h2 {
    margin: 0 0 8px;
    font-size: 26px;
    color: #101827;
}

.lh-signin p {
    color: var(--muted);
    line-height: 1.45;
}

.lh-signin label,
.lh-modal label {
    display: grid;
    gap: 7px;
    margin: 14px 0;
}

.lh-signin label span,
.lh-modal label span {
    font-size: 12px;
    color: var(--mgrey);
    font-weight: 650;
}

.lh-signin input,
.lh-modal input,
.lh-modal select,
.lh-modal textarea,
.lh-topbar input {
    min-height: 40px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 10px;
    outline: none;
    background: var(--white);
    color: #101827;
}

.lh-signin input:focus,
.lh-modal input:focus,
.lh-modal select:focus,
.lh-modal textarea:focus,
.lh-topbar input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(40,195,235,.16);
}

.lh-modal textarea {
    min-height: 92px;
    resize: vertical;
}

.lh-signin button,
.lh-modal button,
.lh-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--cyan);
    border-radius: 7px;
    background: var(--cyan);
    color: var(--xdnavy);
    font-weight: 700;
    margin: 8px 0;
}

.lh-check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px !important;
}

.lh-check input {
    width: auto;
    min-height: 0;
}

.lh-auth-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0;
}

.lh-document-vault {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(260px, .9fr);
    gap: 14px;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.lh-document-vault--compact {
    grid-template-columns: 1fr;
    margin-top: 0;
    box-shadow: none;
}

.lh-document-vault__drop {
    position: relative;
    min-height: 154px;
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 22px;
    border: 1px dashed color-mix(in srgb, var(--cyan) 55%, var(--line));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--cyan) 7%, var(--surface));
}

.lh-document-vault__drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.lh-document-vault__drop span {
    width: fit-content;
    border-radius: 999px;
    padding: 5px 9px;
    background: var(--cyan);
    color: var(--xdnavy);
    font-size: 12px;
    font-weight: 750;
}

.lh-document-vault__drop strong {
    font-size: 20px;
    line-height: 1.18;
}

.lh-document-vault__drop em {
    max-width: 56ch;
    color: var(--muted);
    font-style: normal;
    line-height: 1.42;
}

.lh-document-vault.is-drop-target .lh-document-vault__drop {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(40,195,235,.16);
}

.lh-document-vault__fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
}

.lh-document-vault--compact .lh-document-vault__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lh-document-vault__fields label {
    display: grid;
    gap: 6px;
    margin: 0;
}

.lh-document-vault__fields span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.lh-document-vault__fields select {
    min-height: 40px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 10px;
    background: var(--white);
    color: #101827;
}

.lh-upload-queue {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
}

.lh-upload-queue:empty {
    display: none;
}

.lh-upload-queue__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background: var(--surface-2);
}

.lh-upload-queue__item div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.lh-upload-queue__item strong,
.lh-upload-queue__item span {
    overflow-wrap: anywhere;
}

.lh-upload-queue__item span,
.lh-upload-queue__item em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.lh-upload-queue__item.is-complete em {
    color: var(--green);
    font-weight: 750;
}

.lh-upload-queue__item.is-error {
    border-color: color-mix(in srgb, var(--red) 42%, var(--line));
}

.lh-upload-queue__item.is-error em {
    color: var(--red);
    font-weight: 750;
}

.lh-upload-queue__item a,
.lh-record-list__item a,
td a {
    display: inline-flex;
    width: fit-content;
    margin-top: 4px;
    font-size: 12px;
}

.lh-auth-options button {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--white);
    color: var(--xdnavy);
    font-weight: 700;
}

.lh-brand {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.lh-brand span {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(40,195,235,.10);
    color: var(--cyan);
    font-size: 12px;
    font-weight: 700;
}

.lh-brand strong {
    display: block;
    color: var(--nav-ink);
    font-size: 14px;
    letter-spacing: .08em;
}

.lh-brand em {
    display: block;
    color: var(--mgrey);
    font-size: 12px;
    font-style: normal;
}

.lh-eyebrow {
    margin: 0 0 8px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 11px;
    font-weight: 700;
}

.lh-brand--light strong {
    color: #fff;
}

.lh-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(16,24,40,.03);
    min-width: 0;
    color: var(--ink);
}

.lh-alert {
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: rgba(139,26,26,.12);
    color: #ffb4b4;
    font-weight: 650;
    font-size: 13px;
}

.lh-alert--wide {
    margin-bottom: 16px;
}

.lh-app {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
}

.lh-sidebar {
    background: var(--nav);
    color: var(--nav-ink);
    min-height: 100vh;
    min-height: 100svh;
    padding: 18px 16px;
    position: sticky;
    top: 0;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lh-nav {
    display: grid;
    gap: 13px;
    min-width: 0;
}

.lh-nav__group {
    display: grid;
    gap: 5px;
}

.lh-nav__group-toggle {
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--nav-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    text-align: left;
}

.lh-nav__group-toggle span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.lh-nav__group-toggle i {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .16s ease;
}

.lh-nav__group-toggle:hover {
    background: var(--cyan-hover);
    color: var(--nav-ink);
}

.lh-nav__group.is-open .lh-nav__group-toggle i {
    transform: rotate(45deg);
}

.lh-nav__group.is-active .lh-nav__group-toggle {
    color: var(--nav-ink);
}

.lh-nav__group-body {
    display: none;
    gap: 2px;
}

.lh-nav__group.is-open .lh-nav__group-body {
    display: grid;
}

.lh-nav__submenu {
    display: none;
}

.lh-nav__item {
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--nav-muted);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    padding: 0 10px 0 18px;
    text-align: left;
}

.lh-nav__item:hover {
    background: var(--cyan-hover);
    color: var(--nav-ink);
}

.lh-nav__item.is-active {
    background: var(--cyan-hover);
    color: var(--nav-ink);
    box-shadow: inset 3px 0 0 var(--cyan);
}

.lh-nav__item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    color: inherit;
}

.lh-sidebar__note {
    margin-top: auto;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.lh-sidebar__note strong {
    color: var(--nav-ink);
}

.lh-sidebar__note p {
    margin: 6px 0 0;
    color: var(--mgrey);
    font-size: 12px;
    line-height: 1.45;
}

.lh-main {
    min-width: 0;
}

.lh-topbar {
    min-height: 66px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 4;
}

.lh-topbar > div:not(.lh-global-search) {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    min-width: 0;
}

.lh-global-search {
    position: relative;
    min-width: 0;
}

.lh-global-search input {
    width: 100%;
}

.lh-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(680px, calc(100vw - 40px));
    max-height: min(520px, calc(100vh - 120px));
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 12;
}

.lh-search-results[hidden] {
    display: none;
}

.lh-search-results section + section {
    margin-top: 8px;
    border-top: 1px solid var(--line-soft);
    padding-top: 8px;
}

.lh-search-results h2 {
    margin: 0 0 4px;
    padding: 0 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.lh-search-results button {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink);
    display: grid;
    gap: 3px;
    padding: 8px;
    text-align: left;
}

.lh-search-results button:hover,
.lh-search-results button:focus {
    background: var(--cyan-hover);
    outline: 0;
}

.lh-search-results strong,
.lh-search-results span,
.lh-search-results p {
    display: block;
}

.lh-search-results strong {
    color: var(--ink);
    font-size: 13px;
}

.lh-search-results span,
.lh-search-results p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.lh-secondary {
    min-height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 650;
    white-space: nowrap;
}

.lh-create-control {
    position: relative;
}

.lh-create-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, calc(100vw - 32px));
    max-height: min(540px, calc(100vh - 120px));
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 14;
}

.lh-create-menu[hidden] {
    display: none;
}

.lh-create-menu p {
    margin: 2px 6px 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.lh-create-menu button {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink);
    display: grid;
    gap: 3px;
    padding: 9px;
    text-align: left;
}

.lh-create-menu button:hover,
.lh-create-menu button:focus {
    background: var(--cyan-hover);
    outline: 0;
}

.lh-create-menu strong,
.lh-create-menu span {
    display: block;
}

.lh-create-menu strong {
    color: var(--ink);
    font-size: 13px;
}

.lh-create-menu span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.lh-create-menu__more {
    margin-top: 6px;
    border-top: 1px solid var(--line-soft) !important;
    color: var(--cyan) !important;
    font-weight: 700;
}

.lh-content {
    padding: 24px;
    min-width: 0;
}

.lh-view {
    display: none;
}

.lh-view.is-active {
    display: block;
}

.lh-page-head {
    margin-bottom: 18px;
}

.lh-page-head h1 {
    max-width: 920px;
    margin: 0;
    font-size: 25px;
    line-height: 1.25;
    font-family: var(--font);
    font-weight: 600;
}

.lh-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.lh-metric {
    padding: 16px;
    border-left: 4px solid var(--cyan);
}

.lh-metric span {
    display: block;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 11px;
    font-weight: 650;
}

.lh-metric strong {
    display: block;
    margin: 10px 0;
    font-size: 28px;
    color: var(--ink);
}

.lh-command {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.lh-command__hero {
    min-height: 168px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(40,195,235,.10), transparent 34%),
        var(--surface);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 18px;
    align-items: end;
    box-shadow: var(--shadow);
}

.lh-command__hero h2 {
    max-width: 760px;
    margin: 0 0 10px;
    font-family: var(--font);
    font-size: 26px;
    line-height: 1.18;
    font-weight: 600;
}

.lh-command__hero p:not(.lh-eyebrow) {
    max-width: 680px;
    margin: 0;
    color: var(--mgrey);
    line-height: 1.5;
}

.lh-command__signal {
    min-height: 112px;
    border: 1px solid rgba(40,195,235,.34);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 16px;
    display: grid;
    align-content: space-between;
}

.lh-command__signal span {
    color: var(--cyan);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.lh-command__signal strong {
    font-size: 28px;
    font-weight: 650;
}

.lh-command__rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.lh-command__rail article {
    min-height: 122px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    border-top: 2px solid var(--cyan);
}

.lh-command__rail span,
.lh-command__rail em {
    display: block;
    color: var(--mgrey);
    font-size: 12px;
    font-style: normal;
}

.lh-command__rail span {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 10px;
    font-weight: 650;
}

.lh-command__rail strong {
    display: block;
    margin: 12px 0 7px;
    font-size: 24px;
    font-weight: 650;
}

.lh-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
    gap: 16px;
}

.lh-dashboard-grid > * {
    min-width: 0;
}

.lh-operating-map {
    grid-column: span 2;
}

.lh-flowline {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 10px;
    padding: 16px;
    overflow-x: auto;
}

.lh-flowline article {
    min-height: 112px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 14px;
    cursor: pointer;
}

.lh-flowline span {
    display: block;
    color: var(--cyan);
    font-size: 26px;
    font-weight: 650;
    line-height: 1;
    margin-bottom: 14px;
}

.lh-flowline strong {
    color: var(--ink);
    font-size: 13px;
}

.lh-chart-card {
    min-height: 100%;
}

.lh-chart-combo {
    display: grid;
    grid-template-columns: 156px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
}

.lh-chart-combo--small {
    grid-template-columns: 112px minmax(0, 1fr);
}

.lh-donut {
    width: 156px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(var(--chart-fill));
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(10,18,32,.08);
}

.lh-donut::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line-soft);
}

.lh-donut span {
    position: relative;
    z-index: 1;
    max-width: 84px;
    text-align: center;
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
}

.lh-donut--small {
    width: 112px;
}

.lh-donut--small::after {
    inset: 22px;
}

.lh-chart-legend {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.lh-chart-legend p {
    margin: 0;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

.lh-chart-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--legend-color);
}

.lh-chart-legend strong {
    color: var(--ink);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lh-mini-bars,
.lh-bars {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.lh-mini-bars p,
.lh-bars p {
    margin: 0 0 8px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--mgrey);
    font-size: 12px;
}

.lh-mini-bars p strong,
.lh-bars p strong {
    color: var(--ink);
    font-weight: 600;
}

.lh-mini-bars i,
.lh-bars i {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: var(--line-soft);
    overflow: hidden;
}

.lh-mini-bars i::before,
.lh-bars i::before {
    content: "";
    display: block;
    width: var(--bar-width);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--chart-cyan), var(--chart-blue));
}

.lh-metric em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.lh-grid {
    display: grid;
    gap: 16px;
}

.lh-grid--two {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
}

.lh-grid > * {
    min-width: 0;
}

.lh-span-2 {
    grid-column: 1 / -1;
}

.lh-card__head {
    min-height: 54px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.lh-card__head h2 {
    margin: 0;
    font-size: 15px;
    color: var(--ink);
    font-weight: 600;
}

.lh-card__head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.lh-inline-action {
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    font-size: 12px;
    font-weight: 650;
}

.lh-inline-action:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.lh-workflow {
    display: grid;
    grid-template-columns: repeat(7, minmax(112px, 1fr));
    gap: 10px;
    padding: 16px;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.lh-workflow div,
.lh-statements article,
.lh-stage article {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 12px;
    background: var(--surface-2);
}

.lh-workflow span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(40,195,235,.14);
    color: var(--cyan);
    font-weight: 650;
    font-size: 12px;
    margin-bottom: 10px;
}

.lh-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-soft);
}

.lh-clickable-row {
    cursor: pointer;
}

.lh-clickable-row:hover,
.lh-flowline article:hover {
    background: var(--cyan-hover);
}

.lh-row:last-child {
    border-bottom: 0;
}

.lh-row i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #98a2b3;
}

.lh-row i.red,
.lh-pill.red {
    background: #fee4e2;
    color: #b42318;
}

.lh-row i.red {
    background: var(--red);
}

.lh-row i.amber {
    background: var(--amber);
}

.lh-row i.green {
    background: var(--green);
}

.lh-row i.blue {
    background: var(--cyan);
}

.lh-row strong,
.lh-row span {
    display: block;
}

.lh-row strong {
    font-size: 13px;
    color: var(--ink);
    font-weight: 600;
}

.lh-row span,
.lh-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.lh-table-card {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.lh-table-card td span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.lh-crm-table th,
.lh-crm-table td {
    white-space: nowrap;
}

.lh-crm-table td:first-child,
.lh-crm-table td:last-child {
    white-space: normal;
}

.lh-edit-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.lh-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.lh-kpi-strip article {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 14px;
}

.lh-kpi-strip span,
.lh-kpi-strip em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.lh-kpi-strip strong {
    display: block;
    margin: 6px 0;
    color: var(--ink);
    font-size: 24px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.lh-flowline--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.lh-flowline--compact article {
    padding: 10px;
}

.lh-workflow-toolbar {
    margin: 0 0 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.lh-segmented {
    min-height: 38px;
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.lh-segmented button {
    min-height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    padding: 0 10px;
    font-size: 13px;
    font-weight: 650;
}

.lh-segmented button:hover,
.lh-segmented button.is-active {
    background: var(--cyan-hover);
    color: var(--ink);
}

.lh-workflow-stats {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.lh-workflow-stats span {
    min-height: 32px;
    display: inline-flex;
    gap: 5px;
    align-items: center;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    padding: 0 10px;
    font-size: 12px;
}

.lh-workflow-stats strong {
    color: var(--ink);
}

.lh-object-search {
    min-width: min(280px, 100%);
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 0 12px;
}

.lh-object-panel {
    display: none;
}

.lh-object-panel.is-active {
    display: block;
}

.lh-object-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.lh-object-card {
    min-height: 152px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    display: grid;
    gap: 18px;
    padding: 16px;
}

.lh-object-card p {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.lh-object-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.2;
}

.lh-object-card span {
    color: var(--muted);
    font-size: 13px;
}

.lh-object-card footer {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    border-top: 1px solid var(--line-soft);
    padding-top: 12px;
}

.lh-object-card footer strong {
    color: var(--ink);
    font-size: 13px;
}

table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    font-size: 13px;
    vertical-align: top;
    color: var(--ink);
}

th {
    color: var(--muted);
    background: var(--surface-2);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 11px;
    font-weight: 650;
}

.lh-pill.blue {
    background: rgba(40,195,235,.14);
    color: var(--cyan);
}

.lh-pill.green {
    background: #dcfce7;
    color: #166534;
}

.lh-pill.amber {
    background: #fef3c7;
    color: #92400e;
}

.lh-map {
    min-height: 440px;
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 14px;
    padding: 18px;
    background:
        linear-gradient(90deg, rgba(46,61,94,.16) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(rgba(46,61,94,.16) 1px, transparent 1px) 0 0 / 48px 48px,
        var(--surface-2);
}

.lh-map__node {
    min-height: 116px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--cyan);
    border-radius: 8px;
    background: var(--surface);
    padding: 12px;
    box-shadow: var(--shadow);
}

.lh-map__node--fund {
    border-left-color: var(--green);
}

.lh-map__node--holding {
    border-left-color: var(--amber);
}

.lh-map__node span,
.lh-map__node em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.lh-map__node span {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 10px;
    font-weight: 650;
    margin-bottom: 8px;
}

.lh-map__node strong {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
}

.lh-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(210px, 1fr));
    gap: 12px;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.lh-stage {
    min-height: 360px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 10px;
    transition: border-color .16s ease, background .16s ease;
}

.lh-stage h2 {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--ink);
    font-weight: 600;
}

.lh-stage--rejected {
    border-style: dashed;
}

.lh-stage--resolved {
    background: color-mix(in srgb, var(--surface) 92%, var(--cyan) 8%);
}

.lh-stage.is-drop-target {
    border-color: var(--cyan);
    background: var(--cyan-hover);
}

.lh-stage article {
    margin-bottom: 10px;
    cursor: grab;
    transition: opacity .16s ease, transform .16s ease, border-color .16s ease;
}

.lh-stage article:active {
    cursor: grabbing;
}

.lh-stage article.is-dragging,
.lh-stage article.is-saving {
    opacity: .58;
}

.lh-stage article:hover {
    border-color: var(--cyan);
}

.lh-stage article strong,
.lh-stage article span,
.lh-stage article em,
.lh-statements article strong,
.lh-statements article span {
    display: block;
    color: var(--ink);
}

.lh-stage article span,
.lh-stage article em,
.lh-stage article small,
.lh-statements article span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.lh-stage article small {
    display: block;
    color: var(--ink-soft);
}

.lh-stage__actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.lh-stage__actions button {
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 650;
}

.lh-stage__actions button:hover {
    border-color: var(--cyan);
    background: var(--cyan-hover);
}

.lh-link-button {
    border: 0;
    background: transparent;
    color: var(--cyan);
    padding: 0;
    font: inherit;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lh-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.lh-row-actions button,
.lh-row-actions a {
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.lh-row-actions button:hover,
.lh-row-actions a:hover {
    border-color: var(--cyan);
    background: var(--cyan-hover);
}

.lh-document-preview {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(10, 18, 32, .72);
    padding: 28px;
    display: grid;
    place-items: center;
}

.lh-document-preview[hidden] {
    display: none;
}

.lh-document-preview__panel {
    width: min(1120px, 100%);
    height: min(820px, calc(100vh - 56px));
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}

.lh-document-preview__panel header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.lh-document-preview__panel h2 {
    margin: 3px 0 0;
    font-size: 20px;
    font-weight: 650;
}

.lh-document-preview__panel iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--surface-2);
}

.lh-document-preview__panel p[data-document-preview-fallback] {
    margin: 0;
    padding: 12px 18px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.lh-statements {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.lh-register-card {
    margin-top: 14px;
}

.lh-register-list {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.lh-register {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
}

.lh-register summary {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(180px, auto);
    gap: 10px;
    align-items: center;
    cursor: pointer;
    padding: 12px 14px;
    color: var(--ink);
}

.lh-register summary span,
.lh-register summary em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.lh-register summary strong {
    color: var(--ink);
    font-size: 14px;
}

.lh-register-grid {
    display: grid;
    gap: 14px;
    padding: 0 14px 14px;
}

.lh-register-grid section {
    border-top: 1px solid var(--line-soft);
    padding-top: 14px;
}

.lh-register-grid h3 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 14px;
}

.lh-register-table {
    overflow-x: auto;
    max-width: 100%;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

.lh-register-table table {
    min-width: 880px;
}

.lh-register-table td span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.lh-register-docs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.lh-register-docs p {
    margin: 0;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 12px;
}

.lh-register-docs strong,
.lh-register-docs span {
    display: block;
}

.lh-register-docs strong {
    color: var(--ink);
    font-size: 13px;
}

.lh-register-docs span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.lh-program-stack {
    display: grid;
    gap: 14px;
}

.lh-program-workspace {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16,24,40,.03);
}

.lh-program-workspace summary {
    min-height: 66px;
    display: grid;
    grid-template-columns: minmax(90px, .25fr) minmax(220px, 1fr) minmax(190px, auto) auto;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    padding: 14px 16px;
    color: var(--ink);
    border-bottom: 1px solid var(--line-soft);
}

.lh-program-workspace summary span,
.lh-program-workspace summary em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.lh-program-workspace summary strong {
    color: var(--ink);
    font-size: 16px;
}

.lh-fund-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.lh-fund-actions button {
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 750;
}

.lh-fund-actions button[data-record-open-edit] {
    border-color: var(--cyan);
    background: color-mix(in srgb, var(--cyan) 12%, var(--surface));
}

.lh-fund-actions button:hover {
    border-color: var(--cyan);
    color: var(--teal);
}

.lh-program-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
}

.lh-program-tabs section {
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 12px;
}

.lh-program-tabs h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 14px;
}

.lh-program-tabs p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.lh-program-item {
    display: grid;
    gap: 4px;
    padding: 9px 0;
    border-top: 1px solid var(--line-soft);
}

.lh-program-item:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.lh-program-item strong,
.lh-program-item span,
.lh-program-item em {
    display: block;
}

.lh-program-item strong {
    color: var(--ink);
    font-size: 13px;
}

.lh-program-item span,
.lh-program-item em,
.lh-muted {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.lh-fund-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.lh-fund-detail-section {
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 12px;
}

.lh-fund-detail-section--wide {
    margin: 0;
}

.lh-fund-detail-section h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--ink);
    font-weight: 600;
}

.lh-record-catchup .lh-fund-detail-section .lh-program-item {
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    padding-right: 0;
    padding-left: 0;
}

.lh-record-summary--fund {
    padding: 0;
}

.lh-mini-table {
    overflow-x: auto;
}

.lh-mini-table table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 12px;
}

.lh-mini-table th,
.lh-mini-table td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    white-space: nowrap;
}

.lh-mini-table th {
    color: var(--muted);
    font-weight: 750;
}

.lh-mini-table td {
    color: var(--ink);
}

.lh-modal {
    position: fixed;
    inset: 0;
    background: rgba(12,18,26,.48);
    display: grid;
    place-items: center;
    padding: 18px;
    z-index: 20;
    overflow-y: auto;
}

.lh-modal[hidden] {
    display: none;
}

.lh-back {
    min-height: 34px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 650;
}

.lh-record-layout {
    display: grid;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr) minmax(250px, 320px);
    gap: 16px;
    align-items: start;
}

.lh-record-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 18px;
}

.lh-record-hero h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.12;
}

.lh-record-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.lh-record-meta span {
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--nav-muted);
    font-size: 12px;
    font-weight: 650;
    padding: 5px 9px;
}

.lh-record-left,
.lh-record-center,
.lh-record-right {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.lh-record-left h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.lh-record-profile {
    overflow: hidden;
}

.lh-record-profile header {
    display: grid;
    gap: 7px;
    padding: 18px 16px 12px;
}

.lh-record-profile header > span,
.lh-record-profile header > strong {
    display: block;
    overflow-wrap: anywhere;
}

.lh-record-profile header > span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.lh-record-profile header > strong {
    color: var(--teal);
    font-size: 13px;
}

.lh-record-header-edit {
    width: fit-content;
    min-height: 34px;
    border: 1px solid var(--cyan);
    border-radius: 7px;
    background: color-mix(in srgb, var(--cyan) 12%, var(--surface));
    color: var(--ink);
    padding: 7px 12px;
    font-weight: 750;
}

.lh-record-header-edit:hover {
    background: var(--cyan);
    color: #04151a;
}

.lh-record-avatar {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--teal);
    border: 1px solid var(--line-soft);
    font-size: 16px;
    font-weight: 800;
}

.lh-record-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    background: var(--surface-2);
}

.lh-record-actions button,
.lh-tabs button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 650;
    padding: 7px 11px;
}

.lh-record-actions button {
    min-height: 54px;
    display: grid;
    place-items: center;
    gap: 3px;
    padding: 7px 5px;
    font-size: 12px;
}

.lh-record-actions button span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--teal);
    background: var(--surface);
    font-size: 11px;
    font-weight: 800;
}

.lh-record-actions button strong {
    font-size: 11px;
    font-weight: 650;
}

.lh-record-properties {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 14px 16px;
    margin: 0;
}

.lh-record-properties dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
}

.lh-record-properties dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.lh-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lh-tabs button.is-active {
    border-color: var(--cyan);
    background: var(--cyan-hover);
}

.lh-record-tab {
    display: none;
}

.lh-record-tab.is-active {
    display: block;
}

.lh-record-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
}

.lh-record-catchup {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--line-soft);
}

.lh-record-catchup article {
    margin: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 12px;
}

.lh-record-catchup span,
.lh-record-catchup strong {
    display: block;
}

.lh-record-catchup span {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.lh-record-catchup strong {
    color: var(--ink);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.lh-record-summary article,
.lh-associations p,
.lh-association-card,
.lh-timeline__item,
.lh-record-list__item,
.lh-empty-row {
    margin: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 12px;
}

.lh-record-summary span,
.lh-associations span,
.lh-association-card span,
.lh-record-list__item span,
.lh-timeline__item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.lh-record-summary strong,
.lh-associations strong,
.lh-association-card strong,
.lh-record-list__item strong,
.lh-timeline__item strong {
    display: block;
    color: var(--ink);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.lh-timeline,
.lh-associations,
.lh-record-list {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.lh-association-card {
    padding: 0;
    overflow: hidden;
}

.lh-association-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--line-soft);
}

.lh-association-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 14px;
}

.lh-association-card button {
    min-height: 28px;
    border: 0;
    background: transparent;
    color: var(--teal);
    font-size: 12px;
    font-weight: 750;
}

.lh-association-card > div {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.lh-association-item {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background: var(--surface);
    padding: 10px;
}

.lh-association-item button {
    justify-self: start;
    min-height: 26px;
    margin-top: 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    padding: 0;
}

.lh-association-item button:hover {
    color: var(--red);
}

.lh-association-empty {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.lh-record-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.lh-record-list__item em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
}

.lh-empty-row {
    color: var(--muted);
    font-size: 13px;
}

.lh-inline-form {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--line-soft);
}

.lh-inline-form--row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.lh-inline-form textarea,
.lh-inline-form select {
    min-height: 42px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--white);
    color: #101827;
    padding: 9px 10px;
    font: inherit;
}

.lh-inline-form textarea {
    min-height: 90px;
    resize: vertical;
}

.lh-inline-form button {
    min-height: 40px;
    border: 1px solid var(--cyan);
    border-radius: 7px;
    background: var(--cyan);
    color: var(--xdnavy);
    font-weight: 700;
    padding: 0 14px;
}

.lh-inline-form p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.lh-inline-form p.is-error {
    color: var(--red);
}

.lh-record-summary--side {
    grid-template-columns: 1fr;
}

.lh-modal form {
    width: min(520px, 100%);
    max-height: calc(100svh - 36px);
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.lh-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px !important;
    min-height: 34px !important;
    border: 0 !important;
    background: #eef2f7 !important;
    color: var(--ink) !important;
    padding: 0 !important;
}

.lh-form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.lh-form-actions button {
    width: auto !important;
    margin: 0 !important;
    padding: 0 13px;
    white-space: nowrap;
}

.lh-form-actions button[type="button"] {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
}

.lh-create-context {
    margin: 12px 0;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 10px;
}

.lh-create-context span,
.lh-create-context strong {
    display: block;
}

.lh-create-context span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.lh-create-context strong {
    margin-top: 3px;
    color: var(--ink);
    font-size: 13px;
}

.lh-create-context button {
    width: auto !important;
    min-height: 30px !important;
    border: 1px solid var(--line) !important;
    border-radius: 7px !important;
    background: var(--surface) !important;
    color: var(--ink) !important;
    padding: 0 10px !important;
    font-size: 12px !important;
}

[data-record-type-field] {
    display: none !important;
}

.lh-dynamic-fields[hidden] {
    display: none;
}

.lh-checkbox {
    display: flex !important;
    grid-column: 1 / -1;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 10px 12px;
}

.lh-checkbox input {
    width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0;
}

.lh-checkbox span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
}

.lh-form-status {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 7px;
    background: rgba(40,195,235,.10);
    color: var(--cyan);
    font-size: 13px;
    font-weight: 650;
}

.lh-form-status.is-error {
    background: #fff1f2;
    color: #b42318;
}

.lh-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lh-inline-actions button {
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    font-size: 12px;
    font-weight: 650;
}

.lh-inline-actions button.is-done {
    border-color: #bbf7d0;
    background: #dcfce7;
    color: #166534;
}

.lh-portal {
    min-height: 100vh;
    min-height: 100svh;
    padding: 24px;
    color: #101827;
}

.lh-portal__head {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.lh-portal .lh-brand strong {
    color: var(--ink);
}

.lh-portal__hero {
    margin-bottom: 18px;
}

.lh-portal__hero h1,
.lh-portal__empty h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

.lh-portal__hero p,
.lh-portal__empty p {
    color: var(--muted);
    line-height: 1.45;
}

.lh-portal__empty {
    padding: 24px;
}

.lh-portal__grid {
    margin-top: 16px;
}

@media (max-width: 1100px) {
    .lh-metrics,
    .lh-command__rail,
    .lh-dashboard-grid,
    .lh-grid--two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lh-operating-map {
        grid-column: span 2;
    }

    .lh-map {
        grid-template-columns: repeat(2, minmax(190px, 1fr));
    }

    .lh-chart-combo {
        grid-template-columns: 132px minmax(0, 1fr);
    }

    .lh-donut {
        width: 132px;
    }

    .lh-record-layout {
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    }

    .lh-record-right {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lh-object-grid {
        grid-template-columns: 1fr;
    }

    .lh-program-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lh-fund-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .lh-login,
    .lh-app,
    .lh-metrics,
    .lh-command__hero,
    .lh-command__rail,
    .lh-dashboard-grid,
    .lh-grid--two {
        grid-template-columns: 1fr;
    }

    .lh-record-layout,
    .lh-record-right,
    .lh-record-summary,
    .lh-record-hero,
    .lh-inline-form--row,
    .lh-form-actions,
    .lh-kpi-strip {
        grid-template-columns: 1fr;
    }

    .lh-record-actions {
        justify-content: stretch;
    }

    .lh-record-actions button,
    .lh-form-actions button {
        width: 100% !important;
    }

    .lh-record-properties {
        grid-template-columns: 1fr;
    }

    .lh-operating-map {
        grid-column: auto;
    }

    .lh-command__hero {
        min-height: 0;
        align-items: stretch;
    }

    .lh-command__hero h2 {
        font-size: 32px;
    }

    .lh-command__signal {
        min-height: 108px;
    }

    .lh-flowline {
        grid-template-columns: repeat(5, minmax(136px, 1fr));
    }

    .lh-chart-combo,
    .lh-chart-combo--small {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .lh-donut,
    .lh-donut--small {
        width: 118px;
    }

    .lh-sidebar {
        position: static;
        min-height: auto;
        padding: 12px;
        gap: 12px;
    }

    .lh-sidebar .lh-brand {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .lh-sidebar .lh-brand span {
        width: 30px;
        height: 30px;
    }

    .lh-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .lh-nav__group {
        display: flex;
        gap: 8px;
        flex: 0 0 auto;
    }

    .lh-nav__group h2 {
        display: none;
    }

    .lh-nav__item {
        width: auto;
        min-width: max-content;
        min-height: 36px;
        grid-template-columns: 20px auto;
        padding: 0 10px;
    }

    .lh-nav__item span {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .lh-nav__item strong {
        font-size: 13px;
    }

    .lh-sidebar__note {
        display: none;
    }

    .lh-topbar {
        grid-template-columns: 1fr;
        padding: 12px;
        position: static;
    }

    .lh-topbar > div:not(.lh-global-search) {
        justify-content: stretch;
    }

    .lh-workflow-toolbar,
    .lh-segmented,
    .lh-workflow-stats,
    .lh-object-search {
        width: 100%;
    }

    .lh-document-vault,
    .lh-document-vault__fields,
    .lh-edit-fields {
        grid-template-columns: 1fr;
    }

    .lh-document-vault__drop {
        min-height: 132px;
        padding: 18px;
    }

    .lh-segmented {
        overflow-x: auto;
    }

    .lh-register summary,
    .lh-register-docs,
    .lh-program-workspace summary,
    .lh-program-tabs {
        grid-template-columns: 1fr;
    }

    .lh-topbar .lh-secondary {
        flex: 1 1 0;
    }

    .lh-content {
        padding: 14px;
    }

    .lh-login__panel,
    .lh-login__form {
        min-height: auto;
        padding: 24px;
    }

    .lh-login__panel {
        min-height: 34svh;
    }

    .lh-login__logo {
        width: min(62%, 260px);
    }

    .lh-page-head h1 {
        font-size: 25px;
    }

    .lh-card__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .lh-map {
        min-height: 0;
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .lh-stage {
        min-height: 260px;
    }

    .lh-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .lh-row em {
        grid-column: 2;
    }

    .lh-portal {
        padding: 14px;
    }

    .lh-portal__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .lh-portal__head .lh-secondary {
        width: 100%;
    }

    .lh-portal__hero h1,
    .lh-portal__empty h1 {
        font-size: 25px;
    }
}

@media (max-width: 480px) {
    .lh-login__panel {
        min-height: 30svh;
        padding: 20px;
    }

    .lh-login__form {
        padding: 18px;
        align-items: start;
    }

    .lh-signin {
        padding: 18px;
    }

    .lh-signin h2 {
        font-size: 23px;
    }

    .lh-page-head h1 {
        font-size: 22px;
    }

    .lh-command__hero {
        padding: 18px;
    }

    .lh-command__hero h2 {
        font-size: 22px;
    }

    .lh-metric strong {
        font-size: 24px;
    }

    table {
        min-width: 680px;
    }
}
