body.lpw-front-page {
    background: #f8fafc;
}

.lpw-frontend-page {
    width: min(1440px, calc(100% - 32px));
    margin: 24px auto 40px;
}

.lpw-admin-wrap {
    margin-top: 18px;
}

.lpw-guest-guard {
    padding: 18px 20px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

#lpw-app {
    min-height: 760px;
}

.lpw-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.lpw-shell.is-compact .lpw-panel {
    padding: 18px;
}

.lpw-shell.is-contrast .lpw-left {
    background: #0b1420;
}

.lpw-left,
.lpw-right {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lpw-left {
    background: linear-gradient(180deg, #132033 0%, #0f172a 100%);
    color: #ffffff;
    padding: 22px 18px;
    border-radius: 24px;
    box-shadow: 0 14px 44px rgba(15, 23, 42, 0.16);
}

.lpw-brand-block {
    margin-bottom: 8px;
}

.lpw-brand {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.lpw-brand-sub {
    color: #b6c2d0;
    font-size: 13px;
    line-height: 1.5;
}

.lpw-nav {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.lpw-nav button,
.lpw-side-link {
    appearance: none;
    border: 0;
    width: 100%;
    cursor: pointer;
    text-align: left;
    border-radius: 14px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 600;
    transition: transform .12s ease, background .12s ease;
}

.lpw-nav button:hover,
.lpw-side-link:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.lpw-nav button.is-active,
.lpw-side-link.is-active {
    background: #2563eb;
}

.lpw-side-block {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.lpw-side-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aebbc8;
    margin-bottom: 8px;
}

.lpw-compact-meta {
    color: #dbe4ee;
    font-size: 12px;
    line-height: 1.6;
}

.lpw-center {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lpw-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.lpw-topbar-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
}

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

.lpw-toast {
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
}

.lpw-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.lpw-panel.slim {
    padding: 18px;
}

.lpw-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.lpw-panel h2,
.lpw-panel h3,
.lpw-panel h4 {
    margin: 0;
    color: #0f172a;
}

.lpw-panel h2 {
    font-size: 22px;
}

.lpw-muted {
    color: #64748b;
}

.lpw-badge,
.lpw-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.lpw-tag.alt {
    background: #ecfdf5;
    color: #047857;
}

.lpw-inline-note {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #eff6ff;
    color: #1e3a8a;
}

.lpw-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.lpw-kpi-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.lpw-kpi-value {
    font-size: 32px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 4px;
}

.lpw-kpi-label {
    color: #475569;
    font-weight: 600;
}

.lpw-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lpw-list-item {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 14px;
    background: #f8fbff;
}

.lpw-list-item.has-error {
    border-color: #fecaca;
    background: #fff1f2;
}

.lpw-list-item.has-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.lpw-project-grid,
.lpw-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lpw-project-card,
.lpw-report-card {
    appearance: none;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
    background: #fbfdff;
    text-align: left;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.lpw-project-card:hover,
.lpw-report-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.lpw-project-card.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.lpw-project-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.lpw-project-meta,
.lpw-project-note,
.lpw-small {
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
}

.lpw-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.lpw-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lpw-form-grid.compact {
    gap: 12px;
}

.lpw-form-grid.card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lpw-form-grid.card-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lpw-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lpw-field-span-2 {
    grid-column: span 2;
}

.lpw-field label {
    font-weight: 700;
    color: #334155;
}

.lpw-field input,
.lpw-field textarea,
.lpw-field select,
.lpw-mini-input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
    color: #0f172a;
}

.lpw-field textarea {
    min-height: 90px;
    resize: vertical;
}

.lpw-mini-input {
    min-height: 36px;
    border-radius: 10px;
    padding: 8px 10px;
}

.lpw-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.lpw-toolbar select,
.lpw-toolbar input {
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 220px;
    background: #ffffff;
}

.lpw-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lpw-actions.stacked {
    flex-direction: column;
}

.lpw-button {
    appearance: none;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    background: #0f62fe;
    color: #ffffff;
    padding: 11px 15px;
    font-weight: 700;
    transition: transform .12s ease, filter .12s ease;
}

.lpw-button:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.lpw-button.secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.lpw-button.ghost {
    background: #f1f5f9;
    color: #0f172a;
    padding: 8px 12px;
}

.lpw-table-wrap {
    overflow: auto;
    max-height: 640px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
}

.lpw-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.lpw-table th,
.lpw-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
    background: #ffffff;
}

.lpw-table th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 2;
}

.lpw-table tr.is-active td {
    background: #eff6ff;
}

.lpw-table tr.is-selected td {
    background: #f8fbff;
}

.lpw-card-section + .lpw-card-section {
    margin-top: 20px;
}

.lpw-card-section h3 {
    margin-bottom: 6px;
}

.lpw-repeater-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lpw-repeater-card {
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    padding: 14px;
}

.lpw-checklist {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
}

.lpw-checklist-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lpw-checkline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #334155;
}

.lpw-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.lpw-right .lpw-panel {
    background: #ffffff;
}

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

.lpw-status {
    border-radius: 18px;
    padding: 14px 12px;
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lpw-status span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.lpw-status.error {
    background: #fff1f2;
    color: #be123c;
}

.lpw-status.warning {
    background: #fffbeb;
    color: #b45309;
}

.lpw-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 14px 0;
}

.lpw-link,
.lpw-source-link {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.lpw-link:hover,
.lpw-source-link:hover {
    text-decoration: underline;
}

.lpw-surface {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 14px;
}

.lpw-surface-side,
.lpw-surface-main {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px;
    background: #fbfdff;
}

.lpw-map-stage {
    min-height: 280px;
    border: 1px dashed #94a3b8;
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lpw-map-note {
    color: #334155;
    line-height: 1.55;
}

.lpw-map-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lpw-map-chip {
    padding: 8px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.lpw-context-menu {
    position: fixed;
    z-index: 9999;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    padding: 8px;
    display: grid;
    gap: 4px;
}

.lpw-context-menu button {
    appearance: none;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 600;
    color: #0f172a;
}

.lpw-context-menu button:hover {
    background: #eff6ff;
}

@media (max-width: 1440px) {
    .lpw-shell {
        grid-template-columns: 250px minmax(0, 1fr) 290px;
    }

    .lpw-form-grid.card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .lpw-shell {
        grid-template-columns: 1fr;
    }

    .lpw-left,
    .lpw-right {
        position: static;
    }

    .lpw-kpi-grid,
    .lpw-project-grid,
    .lpw-report-grid,
    .lpw-admin-grid,
    .lpw-form-grid,
    .lpw-form-grid.card-grid,
    .lpw-repeater-grid,
    .lpw-surface {
        grid-template-columns: 1fr;
    }

    .lpw-field-span-2 {
        grid-column: span 1;
    }

    .lpw-checklist-compact {
        grid-template-columns: 1fr;
    }
}

/* --- v3.2.2 standalone front + sigma-like overrides --- */
body.lpw-front-page-standalone {
    margin: 0;
    min-height: 100vh;
    background: #202a33;
    color: #d7dee7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

body.admin-bar.lpw-front-page-standalone {
    min-height: calc(100vh - 32px);
}

.lpw-front-page-standalone .lpw-standalone-shell {
    min-height: 100vh;
    padding: 10px 14px 14px;
    box-sizing: border-box;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0.06) 100%),
        linear-gradient(135deg, #25313c 0%, #202a33 100%);
}

body.admin-bar.lpw-front-page-standalone .lpw-standalone-shell {
    padding-top: 42px;
}

.lpw-standalone-brandline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto 10px;
    width: min(1880px, 100%);
    padding: 0 6px;
    box-sizing: border-box;
}

.lpw-standalone-brand {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cbd5df;
}

.lpw-standalone-brandmeta {
    font-size: 12px;
    color: #90a0b1;
}

.lpw-standalone-app {
    width: min(1880px, 100%);
    margin: 0 auto;
}

.lpw-standalone-guard {
    width: min(620px, calc(100% - 24px));
    margin: 72px auto 0;
    padding: 28px 30px;
    border-radius: 16px;
    border: 1px solid #4b5968;
    background: linear-gradient(180deg, #34414e 0%, #2a3540 100%);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.lpw-standalone-guard h1 {
    margin: 0 0 10px;
    color: #eef3f8;
    font-size: 24px;
}

.lpw-standalone-guard p {
    margin: 0 0 16px;
    color: #c1ccd8;
    line-height: 1.6;
}

.lpw-desktop {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lpw-desktop-bar {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 180px;
    align-items: center;
    gap: 14px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #4d5967;
    border-radius: 12px;
    background: linear-gradient(180deg, #4a5867 0%, #3f4c5b 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 20px rgba(0, 0, 0, 0.14);
}

.lpw-desktop-brand,
.lpw-desktop-path,
.lpw-desktop-mode {
    display: flex;
    align-items: center;
    min-width: 0;
    font-size: 12px;
}

.lpw-desktop-brand {
    gap: 10px;
    color: #f5f7fa;
    font-weight: 700;
}

.lpw-desktop-path {
    color: #d6dee8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lpw-desktop-mode {
    justify-content: flex-end;
    color: #c7d3e0;
    font-weight: 600;
}

.lpw-desktop-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4dd17b;
    box-shadow: 0 0 0 3px rgba(77, 209, 123, 0.16);
}

body.lpw-front-page,
body.lpw-front-page-standalone {
    background: #202a33;
}

.lpw-front-page .lpw-frontend-page,
.lpw-front-page-standalone .lpw-frontend-page {
    width: 100%;
    margin: 0;
}

#lpw-app {
    min-height: 820px;
}

.lpw-shell.is-sigma,
.lpw-front-page-standalone .lpw-shell {
    display: grid;
    grid-template-columns: 294px minmax(0, 1fr) 332px;
    gap: 10px;
    align-items: start;
}

.lpw-front-page-standalone .lpw-left,
.lpw-front-page-standalone .lpw-right,
.lpw-shell.is-sigma .lpw-left,
.lpw-shell.is-sigma .lpw-right {
    top: 0;
}

.lpw-front-page-standalone .lpw-left,
.lpw-shell.is-sigma .lpw-left {
    padding: 18px 14px;
    border-radius: 14px;
    border: 1px solid #4a5665;
    background: linear-gradient(180deg, #313d49 0%, #27323c 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 20px rgba(0, 0, 0, 0.15);
}

.lpw-front-page-standalone .lpw-brand,
.lpw-shell.is-sigma .lpw-brand {
    margin-bottom: 6px;
    font-size: 24px;
    font-weight: 800;
    color: #eef3f7;
}

.lpw-front-page-standalone .lpw-brand-sub,
.lpw-shell.is-sigma .lpw-brand-sub {
    color: #aebdcb;
}

.lpw-front-page-standalone .lpw-nav,
.lpw-shell.is-sigma .lpw-nav {
    gap: 6px;
}

.lpw-front-page-standalone .lpw-nav button,
.lpw-front-page-standalone .lpw-side-link,
.lpw-shell.is-sigma .lpw-nav button,
.lpw-shell.is-sigma .lpw-side-link {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 9px 11px;
    background: rgba(255, 255, 255, 0.04);
    color: #dce5ee;
    font-size: 13px;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.lpw-front-page-standalone .lpw-nav button:hover,
.lpw-front-page-standalone .lpw-side-link:hover,
.lpw-shell.is-sigma .lpw-nav button:hover,
.lpw-shell.is-sigma .lpw-side-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
}

.lpw-front-page-standalone .lpw-nav button.is-active,
.lpw-front-page-standalone .lpw-side-link.is-active,
.lpw-shell.is-sigma .lpw-nav button.is-active,
.lpw-shell.is-sigma .lpw-side-link.is-active {
    border-color: #6ea3d7;
    background: linear-gradient(180deg, #4d6f93 0%, #415f80 100%);
    color: #ffffff;
}

.lpw-front-page-standalone .lpw-side-block,
.lpw-shell.is-sigma .lpw-side-block {
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.07);
}

.lpw-front-page-standalone .lpw-side-title,
.lpw-shell.is-sigma .lpw-side-title {
    color: #8fa0b0;
    font-size: 11px;
}

.lpw-front-page-standalone .lpw-center,
.lpw-shell.is-sigma .lpw-center {
    gap: 10px;
}

.lpw-front-page-standalone .lpw-topbar,
.lpw-shell.is-sigma .lpw-topbar {
    min-height: 52px;
    padding: 0 2px;
    align-items: center;
}

.lpw-front-page-standalone .lpw-topbar-title,
.lpw-shell.is-sigma .lpw-topbar-title {
    font-size: 24px;
    color: #eff4f9;
}

.lpw-topbar-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: #93a4b5;
}

.lpw-front-page-standalone .lpw-toast,
.lpw-shell.is-sigma .lpw-toast {
    background: #364453;
    color: #e2ebf4;
    border: 1px solid #4d5a6a;
    border-radius: 10px;
    padding: 7px 11px;
}

.lpw-front-page-standalone .lpw-panel,
.lpw-shell.is-sigma .lpw-panel,
.lpw-front-page-standalone .lpw-kpi-card,
.lpw-shell.is-sigma .lpw-kpi-card {
    border-radius: 14px;
    border: 1px solid #485767;
    background: linear-gradient(180deg, #313c47 0%, #2a3540 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 8px 18px rgba(0,0,0,.14);
}

.lpw-front-page-standalone .lpw-panel h2,
.lpw-front-page-standalone .lpw-panel h3,
.lpw-front-page-standalone .lpw-panel h4,
.lpw-shell.is-sigma .lpw-panel h2,
.lpw-shell.is-sigma .lpw-panel h3,
.lpw-shell.is-sigma .lpw-panel h4 {
    color: #eff4f9;
}

.lpw-front-page-standalone .lpw-muted,
.lpw-front-page-standalone .lpw-small,
.lpw-front-page-standalone .lpw-project-meta,
.lpw-front-page-standalone .lpw-project-note,
.lpw-shell.is-sigma .lpw-muted,
.lpw-shell.is-sigma .lpw-small,
.lpw-shell.is-sigma .lpw-project-meta,
.lpw-shell.is-sigma .lpw-project-note {
    color: #aebcca;
}

.lpw-front-page-standalone .lpw-badge,
.lpw-front-page-standalone .lpw-tag,
.lpw-shell.is-sigma .lpw-badge,
.lpw-shell.is-sigma .lpw-tag {
    border: 1px solid #546576;
    background: #3d4d5e;
    color: #d9e4ef;
}

.lpw-front-page-standalone .lpw-tag.alt,
.lpw-shell.is-sigma .lpw-tag.alt {
    background: #34514d;
    border-color: #4f7a74;
    color: #cce7dd;
}

.lpw-front-page-standalone .lpw-inline-note,
.lpw-shell.is-sigma .lpw-inline-note {
    border: 1px solid #4c5f73;
    background: #334354;
    color: #d9e4ef;
}

.lpw-front-page-standalone .lpw-kpi-value,
.lpw-shell.is-sigma .lpw-kpi-value {
    color: #eff4fa;
}

.lpw-front-page-standalone .lpw-kpi-label,
.lpw-shell.is-sigma .lpw-kpi-label {
    color: #aebcca;
}

.lpw-front-page-standalone .lpw-project-card,
.lpw-front-page-standalone .lpw-report-card,
.lpw-shell.is-sigma .lpw-project-card,
.lpw-shell.is-sigma .lpw-report-card,
.lpw-front-page-standalone .lpw-list-item,
.lpw-shell.is-sigma .lpw-list-item,
.lpw-front-page-standalone .lpw-repeater-card,
.lpw-shell.is-sigma .lpw-repeater-card {
    border-color: #4a5867;
    background: #2d3843;
    box-shadow: none;
}

.lpw-front-page-standalone .lpw-project-card.is-active,
.lpw-shell.is-sigma .lpw-project-card.is-active {
    border-color: #7aa3cf;
    box-shadow: inset 0 0 0 1px rgba(122,163,207,.28);
}

.lpw-front-page-standalone .lpw-project-title,
.lpw-shell.is-sigma .lpw-project-title {
    color: #f2f6fb;
}

.lpw-front-page-standalone .lpw-field label,
.lpw-shell.is-sigma .lpw-field label {
    color: #c9d4df;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.lpw-front-page-standalone .lpw-field input,
.lpw-front-page-standalone .lpw-field textarea,
.lpw-front-page-standalone .lpw-field select,
.lpw-front-page-standalone .lpw-mini-input,
.lpw-front-page-standalone .lpw-toolbar select,
.lpw-front-page-standalone .lpw-toolbar input,
.lpw-shell.is-sigma .lpw-field input,
.lpw-shell.is-sigma .lpw-field textarea,
.lpw-shell.is-sigma .lpw-field select,
.lpw-shell.is-sigma .lpw-mini-input,
.lpw-shell.is-sigma .lpw-toolbar select,
.lpw-shell.is-sigma .lpw-toolbar input {
    border: 1px solid #556574;
    background: #24303a;
    color: #edf3f9;
    border-radius: 10px;
}

.lpw-front-page-standalone .lpw-field input:focus,
.lpw-front-page-standalone .lpw-field textarea:focus,
.lpw-front-page-standalone .lpw-field select:focus,
.lpw-front-page-standalone .lpw-mini-input:focus,
.lpw-front-page-standalone .lpw-toolbar input:focus,
.lpw-front-page-standalone .lpw-toolbar select:focus,
.lpw-shell.is-sigma .lpw-field input:focus,
.lpw-shell.is-sigma .lpw-field textarea:focus,
.lpw-shell.is-sigma .lpw-field select:focus,
.lpw-shell.is-sigma .lpw-mini-input:focus,
.lpw-shell.is-sigma .lpw-toolbar input:focus,
.lpw-shell.is-sigma .lpw-toolbar select:focus {
    outline: none;
    border-color: #8fb9e0;
    box-shadow: 0 0 0 2px rgba(143,185,224,.16);
}

.lpw-front-page-standalone input[type="checkbox"],
.lpw-shell.is-sigma input[type="checkbox"] {
    accent-color: #7aa3cf;
}

.lpw-front-page-standalone .lpw-button,
.lpw-shell.is-sigma .lpw-button {
    border: 1px solid #587194;
    border-radius: 10px;
    background: linear-gradient(180deg, #55779c 0%, #486888 100%);
    color: #f6f9fc;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.lpw-front-page-standalone .lpw-button:hover,
.lpw-shell.is-sigma .lpw-button:hover {
    transform: none;
    filter: brightness(1.05);
}

.lpw-front-page-standalone .lpw-button.secondary,
.lpw-shell.is-sigma .lpw-button.secondary {
    border-color: #5a6674;
    background: linear-gradient(180deg, #4a5765 0%, #414d59 100%);
    color: #e7eef6;
}

.lpw-front-page-standalone .lpw-button.ghost,
.lpw-shell.is-sigma .lpw-button.ghost {
    border: 1px solid #53606d;
    background: #32404c;
    color: #e3ebf3;
}

.lpw-front-page-standalone .lpw-table-wrap,
.lpw-shell.is-sigma .lpw-table-wrap {
    border-color: #495969;
    border-radius: 12px;
    background: #24303a;
}

.lpw-front-page-standalone .lpw-table,
.lpw-shell.is-sigma .lpw-table {
    min-width: 980px;
}

.lpw-front-page-standalone .lpw-table th,
.lpw-front-page-standalone .lpw-table td,
.lpw-shell.is-sigma .lpw-table th,
.lpw-shell.is-sigma .lpw-table td {
    border-bottom-color: #43515f;
    background: #2d3843;
    color: #e5edf5;
    padding: 9px 10px;
    font-size: 12px;
}

.lpw-front-page-standalone .lpw-table th,
.lpw-shell.is-sigma .lpw-table th {
    background: #3b4957;
    color: #eef4f9;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lpw-front-page-standalone .lpw-table tr.is-selected td,
.lpw-shell.is-sigma .lpw-table tr.is-selected td {
    background: #364759;
}

.lpw-front-page-standalone .lpw-table tr.is-active td,
.lpw-shell.is-sigma .lpw-table tr.is-active td {
    box-shadow: inset 0 0 0 1px rgba(122,163,207,.38);
}

.lpw-front-page-standalone .lpw-status.error,
.lpw-shell.is-sigma .lpw-status.error {
    background: #583841;
    color: #ffd7de;
}

.lpw-front-page-standalone .lpw-status.warning,
.lpw-shell.is-sigma .lpw-status.warning {
    background: #5a4a2d;
    color: #ffeab7;
}

.lpw-front-page-standalone .lpw-divider,
.lpw-shell.is-sigma .lpw-divider {
    background: #465564;
}

.lpw-front-page-standalone .lpw-context-menu,
.lpw-shell.is-sigma .lpw-context-menu {
    border: 1px solid #566473;
    border-radius: 10px;
    background: #2c3742;
    box-shadow: 0 12px 24px rgba(0,0,0,.25);
}

.lpw-front-page-standalone .lpw-context-menu button,
.lpw-shell.is-sigma .lpw-context-menu button {
    color: #e6eef5;
}

.lpw-front-page-standalone .lpw-context-menu button:hover,
.lpw-shell.is-sigma .lpw-context-menu button:hover {
    background: #394653;
}

@media (max-width: 1280px) {
    .lpw-desktop-bar {
        grid-template-columns: 1fr;
        height: auto;
        padding: 10px 12px;
    }

    .lpw-desktop-mode {
        justify-content: flex-start;
    }
}


.lpw-permission-matrix {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(6, minmax(74px, 1fr));
    gap: 8px;
    align-items: center;
}

.lpw-permission-head {
    font-size: 12px;
    font-weight: 800;
    color: #475569;
    padding: 8px 10px;
    background: #eef2ff;
    border-radius: 12px;
    text-align: center;
}

.lpw-permission-group {
    font-weight: 700;
    color: #0f172a;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 12px;
}

.lpw-permission-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.lpw-permission-cell input {
    width: 18px;
    height: 18px;
}

.lpw-permission-group.is-dim,
.lpw-permission-cell.is-dim {
    opacity: 0.45;
}

.lpw-permission-group.is-active {
    box-shadow: inset 0 0 0 2px #bfdbfe;
}

.lpw-rights-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lpw-right-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #e2e8f0;
    color: #475569;
}

.lpw-right-tag.is-on {
    background: #dcfce7;
    color: #166534;
}

.lpw-right-tag.is-off {
    background: #f1f5f9;
    color: #64748b;
}

.lpw-button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 960px) {
    .lpw-permission-matrix {
        grid-template-columns: 1fr 1fr;
    }
}

.lpw-frontend-page,
.lpw-standalone-root,
.lpw-desktop.is-standalone {
    min-height: calc(100vh - 32px);
}

.lpw-desktop.is-standalone {
    padding: 0;
}

.lpw-cabinet-hero {
    display: grid;
    grid-template-columns: 1.3fr .9fr;
    gap: 18px;
}

.lpw-cabinet-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 18px;
}

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

.lpw-hero-stat {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
}

.lpw-hero-stat strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    margin-bottom: 6px;
    color: #0f172a;
}

.lpw-hero-stat span {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.lpw-cabinet-links {
    display: grid;
    gap: 10px;
}

.lpw-project-focus {
    display: grid;
    gap: 10px;
}

.lpw-project-focus-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.lpw-project-health {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 12px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 12px;
    width: fit-content;
}

.lpw-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.lpw-mode-switch button,
.lpw-filter-chip {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255,255,255,.06);
    color: inherit;
    border-radius: 12px;
    padding: 9px 12px;
    cursor: pointer;
    font-weight: 700;
}

.lpw-mode-switch button.is-active,
.lpw-filter-chip.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.lpw-filterbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.lpw-button.small {
    padding: 8px 10px;
    font-size: 12px;
}


.lpw-shell.is-sigma .lpw-panel,
.lpw-shell.is-sigma .lpw-kpi-card {
    border: 1px solid rgba(22, 36, 55, 0.08);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.09);
}

.lpw-shell.is-sigma .lpw-desktop-bar {
    background: linear-gradient(180deg, #112235 0%, #0e1929 100%);
    border-radius: 22px;
    color: #e2e8f0;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lpw-shell.is-sigma .lpw-desktop-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2563eb;
    display: inline-block;
    margin-right: 8px;
}

.lpw-shell.is-sigma .lpw-desktop-brand {
    font-weight: 800;
}

.lpw-shell.is-sigma .lpw-desktop-path,
.lpw-shell.is-sigma .lpw-desktop-mode {
    color: #b6c2d0;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 1280px) {
    .lpw-shell {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .lpw-right {
        position: static;
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lpw-cabinet-hero,
    .lpw-cabinet-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .lpw-shell {
        grid-template-columns: 1fr;
    }

    .lpw-left,
    .lpw-right {
        position: static;
    }

    .lpw-cabinet-stats,
    .lpw-kpi-grid,
    .lpw-right {
        grid-template-columns: 1fr;
    }

    .lpw-topbar {
        flex-direction: column;
    }
}


/* --- v3.5.0 card workspace --- */
.lpw-card-shell {
    display: grid;
    gap: 14px;
}

.lpw-card-top {
    align-items: flex-start;
}

.lpw-card-top-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lpw-card-overview {
    display: grid;
    gap: 12px;
}

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

.lpw-card-statusline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lpw-card-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 4px;
}

.lpw-card-tab {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255,255,255,.06);
    color: inherit;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
}

.lpw-card-tab.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.lpw-card-issues {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lpw-card-issue {
    appearance: none;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255,255,255,.06);
    color: inherit;
}

.lpw-card-issue.is-error {
    border-color: rgba(220, 38, 38, 0.45);
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.lpw-card-issue.is-warning {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.lpw-card-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.lpw-card-field.has-error input,
.lpw-card-field.has-error textarea,
.lpw-card-field.has-error select {
    border-color: rgba(220, 38, 38, 0.6);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.lpw-card-field.has-warning input,
.lpw-card-field.has-warning textarea,
.lpw-card-field.has-warning select {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08);
}

.lpw-field-hint {
    min-height: 18px;
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
}

.lpw-field-hint.is-error {
    color: #b91c1c;
}

.lpw-field-hint.is-warning {
    color: #b45309;
}

.lpw-shell.is-sigma .lpw-card-tab,
.lpw-shell.is-sigma .lpw-card-issue {
    background: rgba(15, 23, 42, 0.04);
}

.lpw-shell.is-sigma .lpw-card-tab.is-active {
    background: linear-gradient(180deg, #2563eb 0%, #246bd8 100%);
}

.lpw-shell.is-sigma .lpw-tag.is-bad {
    background: rgba(220, 38, 38, 0.14);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.24);
}

@media (max-width: 1100px) {
    .lpw-card-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .lpw-card-kpis {
        grid-template-columns: 1fr;
    }
}


/* --- v3.5.1 instruction card + RF dictionary --- */
.lpw-field-note {
    min-height: 18px;
    margin-top: 6px;
    font-size: 11px;
    color: #64748b;
}

.lpw-reference-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.lpw-reference-filters input {
    width: 100%;
}

.lpw-card-shell--kt {
    gap: 18px;
}

.lpw-kt-paper {
    background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.96) 100%);
    color: #0f172a;
    border: 1px solid rgba(148,163,184,.28);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 16px 40px rgba(15,23,42,.08);
    padding: 18px;
}

.lpw-shell.is-sigma .lpw-kt-paper {
    background: linear-gradient(180deg, rgba(248,250,252,.98) 0%, rgba(241,245,249,.96) 100%);
}

.lpw-kt-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 2px solid rgba(15,23,42,.08);
    margin-bottom: 16px;
}

.lpw-kt-caption {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #475569;
    margin-bottom: 6px;
}

.lpw-kt-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
    color: #0f172a;
}

.lpw-kt-subcaption {
    margin-top: 6px;
    color: #475569;
    font-size: 13px;
}

.lpw-kt-codebox {
    min-width: 210px;
    border: 1px solid rgba(148,163,184,.28);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,.72);
}

.lpw-kt-code-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.lpw-kt-code-value {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

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

.lpw-kt-summary-item {
    border: 1px solid rgba(148,163,184,.24);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,.76);
}

.lpw-kt-summary-item span {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.lpw-kt-summary-item strong {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    color: #0f172a;
}

.lpw-kt-summary-item em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    color: #475569;
    font-size: 12px;
}

.lpw-kt-grid.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.lpw-kt-block + .lpw-kt-block {
    margin-top: 16px;
}

.lpw-kt-block {
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 16px;
    background: rgba(255,255,255,.74);
    padding: 14px;
}

.lpw-kt-block-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.lpw-kt-block-head h3 {
    margin: 0;
    font-size: 16px;
    color: #0f172a;
}

.lpw-kt-block-head p {
    margin: 6px 0 0;
    font-size: 12px;
    color: #475569;
}

.lpw-kt-actions-grid {
    display: grid;
    gap: 12px;
}

.lpw-kt-action-row {
    display: grid;
    grid-template-columns: 160px repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.lpw-kt-action-title {
    padding: 12px 0;
    font-weight: 700;
    color: #0f172a;
}

.lpw-kt-table-wrap {
    overflow-x: auto;
}

.lpw-kt-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.lpw-kt-table th,
.lpw-kt-table td {
    border: 1px solid rgba(148,163,184,.24);
    padding: 6px;
    vertical-align: top;
}

.lpw-kt-table th {
    background: #e2e8f0;
    color: #0f172a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.lpw-kt-mini-input {
    width: 100%;
    min-width: 74px;
    border: 1px solid rgba(148,163,184,.28);
    border-radius: 8px;
    padding: 7px 8px;
    background: #fff;
    color: #0f172a;
    font-size: 12px;
}

.lpw-kt-mini-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}

.lpw-kt-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lpw-kt-mini-card {
    border: 1px solid rgba(148,163,184,.24);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255,255,255,.7);
}

.lpw-kt-mini-card-title {
    font-weight: 800;
    font-size: 13px;
    color: #0f172a;
    margin-bottom: 10px;
}

.lpw-card-shell--kt .lpw-card-tab {
    border-radius: 10px;
    padding: 9px 12px;
}

.lpw-card-shell--kt .lpw-card-tab.is-active {
    box-shadow: 0 8px 22px rgba(37,99,235,.24);
}

@media (max-width: 1100px) {
    .lpw-reference-filters,
    .lpw-kt-summary-grid,
    .lpw-kt-grid.two-col,
    .lpw-kt-mini-grid {
        grid-template-columns: 1fr 1fr;
    }

    .lpw-kt-action-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .lpw-reference-filters,
    .lpw-kt-summary-grid,
    .lpw-kt-grid.two-col,
    .lpw-kt-mini-grid {
        grid-template-columns: 1fr;
    }

    .lpw-kt-header {
        flex-direction: column;
    }

    .lpw-kt-codebox {
        width: 100%;
    }
}


/* --- v3.5.2 compact full-screen card --- */
.lpw-shell.is-card-focus {
    grid-template-columns: 220px minmax(0, 1fr);
}

.lpw-shell.is-card-focus .lpw-right {
    display: none;
}

.lpw-shell.is-card-focus .lpw-left {
    padding: 16px 12px;
}

.lpw-card-shell--compact {
    gap: 12px;
    overflow: hidden;
}

.lpw-card-toolbar-grid {
    display: grid;
    grid-template-columns: 220px 180px 180px minmax(0, 1fr);
    gap: 10px;
    align-items: end;
}

.lpw-card-toolbar-grid .lpw-field {
    margin: 0;
}

.lpw-card-toolbar-summary {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    align-self: center;
}

.lpw-actions-between {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lpw-compact-card-viewport {
    overflow: hidden;
    border-radius: 18px;
    background: #d9dde4;
    border: 1px solid rgba(148,163,184,.28);
}

.lpw-compact-card-sheet {
    transform-origin: top left;
    padding: 10px;
    box-sizing: border-box;
    background: #d9dde4;
    min-height: 980px;
}

.lpw-cc-top-grid {
    display: grid;
    grid-template-columns: 320px 320px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 12px;
}

.lpw-cc-block,
.lpw-cc-main-head,
.lpw-cc-lower-grid,
.lpw-cc-slope-row,
.lpw-cc-extra-table,
.lpw-cc-stand-table {
    font-size: 11px;
}

.lpw-cc-block {
    background: transparent;
}

.lpw-cc-header-row {
    display: grid;
    gap: 0;
}

.lpw-cc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lpw-cc-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lpw-cc-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.lpw-cc-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.lpw-cc-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.lpw-cc-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.lpw-cc-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.lpw-cc-cell {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 48px;
    border: 1px solid #2b313b;
    background: #bdd7ee;
}

.lpw-cc-cell span {
    display: block;
    padding: 3px 5px 2px;
    background: #22b7ee;
    border-bottom: 1px solid #2b313b;
    font-size: 10px;
    font-weight: 700;
    text-transform: lowercase;
}

.lpw-cc-cell input,
.lpw-cc-cell select {
    border: 0;
    background: #dbe7f3;
    border-radius: 0;
    padding: 4px 5px;
    font-size: 11px;
    min-height: 22px;
    box-shadow: none;
}

.lpw-cc-cell input:focus,
.lpw-cc-cell select:focus {
    outline: 1px solid #2563eb;
    box-shadow: inset 0 0 0 1px #2563eb;
}

.lpw-cc-main-head {
    margin-bottom: 8px;
}

.lpw-cc-stand-table,
.lpw-cc-extra-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #dbe7f3;
}

.lpw-cc-stand-table th,
.lpw-cc-stand-table td,
.lpw-cc-extra-table th,
.lpw-cc-extra-table td {
    border: 1px solid #2b313b;
    padding: 0;
}

.lpw-cc-stand-table th,
.lpw-cc-extra-table th {
    background: #22b7ee;
    font-size: 10px;
    font-weight: 700;
    text-transform: lowercase;
    padding: 3px 4px;
}

.lpw-kt-mini-input {
    min-width: 0;
    border: 0;
    border-radius: 0;
    padding: 4px 4px;
    font-size: 11px;
    min-height: 24px;
    background: #dbe7f3;
}

.lpw-cc-placeholder {
    display: block;
    min-height: 24px;
    background: #dbe7f3;
}

.lpw-cc-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 12px;
    margin: 10px 0;
}

.lpw-cc-slope-row {
    margin: 6px 0 10px;
}

.lpw-cc-maket-title {
    background: #c6e0b4;
    font-weight: 700;
    padding: 3px 5px !important;
}

.lpw-cc-extra-table td:first-child {
    width: 160px;
}

@media (max-width: 1600px) {
    .lpw-shell.is-card-focus {
        grid-template-columns: 180px minmax(0, 1fr);
    }
}

@media (max-width: 1200px) {
    .lpw-card-toolbar-grid {
        grid-template-columns: 1fr 1fr;
    }
    .lpw-card-toolbar-summary {
        justify-content: flex-start;
        grid-column: 1 / -1;
    }
}

/* v3.5.3 GIS interface refresh */
.lpw-gis-root {
    --lpw-bg: #eef3f8;
    --lpw-panel: #ffffff;
    --lpw-panel-soft: #f6f9fc;
    --lpw-border: #d7e0ea;
    --lpw-text: #142133;
    --lpw-text-soft: #5c6f84;
    --lpw-accent: #2563eb;
    --lpw-accent-soft: #e8f1ff;
    --lpw-danger: #d74f45;
    --lpw-warning: #d28a22;
    --lpw-success: #2c8b57;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: 900px;
    background: transparent;
    color: var(--lpw-text);
    overflow: visible;
    border: 0;
    box-shadow: none;
}

.lpw-gis-root.lpw-theme-dark {
    --lpw-bg: #111722;
    --lpw-panel: #161f2b;
    --lpw-panel-soft: #1b2633;
    --lpw-border: #2a3748;
    --lpw-text: #e8eef7;
    --lpw-text-soft: #9caabc;
    --lpw-accent: #5aa2ff;
    --lpw-accent-soft: rgba(90, 162, 255, 0.12);
    --lpw-danger: #e97b73;
    --lpw-warning: #f0b34d;
    --lpw-success: #63c48d;
}

.lpw-gis-root .lpw-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
}

.lpw-gis-root .lpw-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.lpw-gis-sidebar {
    background: linear-gradient(180deg, #142131 0%, #0f1724 100%);
    color: #f8fbff;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lpw-gis-root.lpw-theme-dark .lpw-gis-sidebar {
    background: linear-gradient(180deg, #0b1119 0%, #0a1018 100%);
}

.lpw-gis-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.lpw-gis-brand strong {
    display: block;
    font-size: 18px;
}

.lpw-gis-brand span {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.lpw-gis-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255,255,255,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
}




.lpw-gis-tree {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    padding-right: 3px;
}

.lpw-tree-group {
    display: grid;
    gap: 6px;
}


.lpw-tree-children {
    display: grid;
    gap: 4px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.13);
    margin-left: 6px;
}

.lpw-tree-node {
    appearance: none;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    border-radius: 8px;
    padding: 7px 10px;
    min-height: 34px;
    background: rgba(255,255,255,0.055);
    color: inherit;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background .15s ease, border-color .15s ease;
}

.lpw-tree-node:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.12);
}

.lpw-tree-node.is-active {
    background: linear-gradient(135deg, rgba(47,128,237,0.88) 0%, rgba(94,154,255,0.88) 100%);
    color: #fff;
    box-shadow: inset 2px 0 0 rgba(255,255,255,0.38);
    border-color: rgba(255,255,255,0.16);
}

.lpw-tree-label-main,
.lpw-tree-node span:last-child {
    flex: 1;
}



.lpw-gis-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lpw-gis-topbar {
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--lpw-border);
    background: #ffffff;
    background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, #ffffff 6%);
}

.lpw-gis-topbar-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.lpw-gis-title-block h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    color: var(--lpw-text);
}

.lpw-gis-title-block p {
    margin: 6px 0 0;
    color: var(--lpw-text-soft);
}

.lpw-gis-topbar-actions {
    display: flex;
    gap: 8px;
}

.lpw-theme-toggle {
    appearance: none;
    border: 1px solid var(--lpw-border);
    background: var(--lpw-panel-soft);
    color: var(--lpw-text);
    border-radius: 12px;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
}

.lpw-theme-toggle.is-active {
    background: var(--lpw-accent-soft);
    border-color: rgba(47,128,237,.35);
    color: var(--lpw-accent);
}

.lpw-gis-tabs {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.lpw-gis-tab {
    appearance: none;
    border: 1px solid var(--lpw-border);
    background: var(--lpw-panel-soft);
    color: var(--lpw-text-soft);
    border-radius: 14px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
}

.lpw-gis-tab.is-active {
    color: var(--lpw-accent);
    background: var(--lpw-accent-soft);
    border-color: rgba(47,128,237,.35);
}

.lpw-gis-content {
    padding: 18px;
    background: var(--lpw-bg);
    min-width: 0;
}

.lpw-gis-stack {
    display: grid;
    gap: 14px;
}

.lpw-gis-card,
.lpw-gis-kpi,
.lpw-gis-kpis {
    background: #ffffff;
    background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, #ffffff 6%);
    border: 1px solid var(--lpw-border);
    border-radius: 20px;
}

.lpw-gis-card {
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.lpw-gis-meta-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.lpw-gis-meta-cell {
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--lpw-panel-soft);
    border: 1px solid var(--lpw-border);
}

.lpw-gis-meta-cell span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--lpw-text-soft);
    margin-bottom: 4px;
}

.lpw-gis-meta-cell strong {
    font-size: 14px;
    color: var(--lpw-text);
}

.lpw-gis-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.lpw-gis-toolbar select,
.lpw-gis-toolbar input,
.lpw-gis-card input,
.lpw-gis-card select,
.lpw-gis-card textarea,
.lpw-gis-root .lpw-card-shell--compact input,
.lpw-gis-root .lpw-card-shell--compact select,
.lpw-gis-root .lpw-card-shell--compact textarea {
    background: var(--lpw-panel-soft);
    color: var(--lpw-text);
    border: 1px solid var(--lpw-border);
}

.lpw-gis-toolbar > select,
.lpw-gis-toolbar > input {
    min-width: 210px;
    border-radius: 12px;
    padding: 10px 12px;
}

.lpw-gis-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}

.lpw-gis-table-wrap {
    overflow: auto;
    max-height: 650px;
    border-radius: 18px;
    border: 1px solid var(--lpw-border);
}

.lpw-table--gis {
    min-width: 100%;
    background: #ffffff;
    background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, #ffffff 6%);
}

.lpw-table--gis th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #cfefff;
    color: #12334d;
    font-size: 12px;
}

.lpw-gis-root.lpw-theme-dark .lpw-table--gis th {
    background: #1f3649;
    color: #e8eef7;
}

.lpw-table--gis td {
    background: #ffffff;
    background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, #ffffff 6%);
    color: var(--lpw-text);
    border-color: var(--lpw-border);
    font-size: 12px;
}

.lpw-table--gis tr.is-active td {
    background: var(--lpw-accent-soft);
}

.lpw-table--gis tr.has-error td {
    box-shadow: inset 0 1px 0 rgba(215,79,69,0.08), inset 0 -1px 0 rgba(215,79,69,0.08);
}

.lpw-gis-footer-note,
.lpw-empty-state {
    color: var(--lpw-text-soft);
    font-size: 13px;
}

.lpw-gis-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
    background: transparent;
    border: 0;
}

.lpw-gis-kpi {
    padding: 16px;
}

.lpw-gis-kpi span {
    display: block;
    color: var(--lpw-text-soft);
    margin-bottom: 6px;
    font-size: 12px;
}

.lpw-gis-kpi strong {
    font-size: 28px;
    line-height: 1;
    color: var(--lpw-text);
}

.lpw-gis-kpi.is-error strong { color: var(--lpw-danger); }
.lpw-gis-kpi.is-warning strong { color: var(--lpw-warning); }

.lpw-gis-issues-table {
    display: grid;
    gap: 8px;
}

.lpw-issue-row {
    appearance: none;
    border: 1px solid var(--lpw-border);
    background: var(--lpw-panel-soft);
    border-radius: 14px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    color: var(--lpw-text);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.lpw-issue-row em {
    color: var(--lpw-text-soft);
    font-style: normal;
    font-size: 12px;
}

.lpw-gis-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--lpw-accent-soft);
    color: var(--lpw-accent);
    border: 1px solid rgba(47,128,237,.25);
    font-weight: 700;
}

.lpw-gis-root .lpw-button.secondary {
    background: var(--lpw-panel-soft);
    color: var(--lpw-text);
    border-color: var(--lpw-border);
}

.lpw-gis-root .lpw-button {
    box-shadow: none;
}

.lpw-gis-root .lpw-button.ghost {
    background: transparent;
    border: 1px solid var(--lpw-border);
    color: var(--lpw-text);
}

.lpw-gis-root .lpw-card-shell--compact,
.lpw-gis-root .lpw-card-shell--kt {
    background: transparent;
    box-shadow: none;
}

.lpw-gis-root .lpw-card-topbar,
.lpw-gis-root .lpw-card-header,
.lpw-gis-root .lpw-card-tools {
    background: #ffffff;
    background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, #ffffff 6%);
    border: 1px solid var(--lpw-border);
    border-radius: 18px;
}

.lpw-gis-root .lpw-card-shell--compact .lpw-panel,
.lpw-gis-root .lpw-card-shell--kt .lpw-panel {
    background: #ffffff;
    background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, #ffffff 6%);
    border-color: var(--lpw-border);
}

.lpw-gis-root .lpw-list-item,
.lpw-gis-root .lpw-inline-note {
    background: var(--lpw-panel-soft);
    border-color: var(--lpw-border);
    color: var(--lpw-text);
}

@media (max-width: 1360px) {
    .lpw-gis-root {
        grid-template-columns: 280px minmax(0, 1fr);
    }
    .lpw-gis-meta-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .lpw-gis-root {
        grid-template-columns: 1fr;
    }
    .lpw-gis-sidebar {
        position: relative;
    }
    .lpw-gis-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lpw-gis-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


.lpw-gis-brand-mark {
    background: linear-gradient(180deg, #3bb273 0%, #228b5b 100%);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}

.lpw-gis-menuline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.lpw-gis-menuline-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.lpw-file-menu-wrap {
    position: relative;
    flex: 0 0 auto;
}

.lpw-file-button {
    appearance: none;
    border: 1px solid var(--lpw-border);
    background: var(--lpw-panel-soft);
    color: var(--lpw-text);
    border-radius: 12px;
    padding: 9px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
}

.lpw-file-button.is-open {
    background: var(--lpw-accent-soft);
    color: var(--lpw-accent);
    border-color: rgba(47,128,237,.35);
}

.lpw-file-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    background: #ffffff;
    background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, #ffffff 6%);
    border: 1px solid var(--lpw-border);
    box-shadow: 0 18px 38px rgba(15,23,42,.14);
    border-radius: 16px;
    padding: 8px;
    display: grid;
    gap: 4px;
    z-index: 40;
}

.lpw-file-menu-item {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--lpw-text);
    text-align: left;
    border-radius: 12px;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

.lpw-file-menu-item:hover {
    background: var(--lpw-panel-soft);
}

.lpw-tree-branch {
    display: grid;
    gap: 4px;
}

.lpw-tree-branch-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: stretch;
    gap: 4px;
}

.lpw-tree-toggle {
    appearance: none;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.76);
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-height: 34px;
}

.lpw-tree-toggle:hover {
    background: rgba(255,255,255,0.10);
}

.lpw-tree-branch > .lpw-tree-children {
    margin-left: 8px;
}

.lpw-tree-node {
    min-width: 0;
}

.lpw-tree-node span:last-child,
.lpw-tree-label-main {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lpw-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 14, 23, 0.62);
    backdrop-filter: blur(3px);
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.lpw-modal {
    width: min(760px, 100%);
    max-height: min(84vh, 960px);
    overflow: auto;
    background: #ffffff;
    background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, #ffffff 6%);
    color: var(--lpw-text);
    border: 1px solid var(--lpw-border);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(15,23,42,.28);
}

.lpw-modal--wide {
    width: min(980px, 100%);
}

.lpw-modal--medium {
    width: min(820px, 100%);
}

.lpw-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--lpw-border);
}

.lpw-modal-head h3 {
    margin: 0;
    font-size: 22px;
}

.lpw-modal-close {
    appearance: none;
    border: 1px solid var(--lpw-border);
    background: var(--lpw-panel-soft);
    color: var(--lpw-text-soft);
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lpw-modal-body {
    padding: 20px 22px 22px;
}

.lpw-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.lpw-modal-project-list {
    display: grid;
    gap: 12px;
}

.lpw-modal-project-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--lpw-border);
    background: var(--lpw-panel-soft);
    border-radius: 16px;
    padding: 14px;
}

.lpw-modal-project-main {
    display: grid;
    gap: 8px;
}

.lpw-modal-project-input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--lpw-border);
    border-radius: 12px;
    padding: 8px 10px;
    background: #ffffff;
    background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, #ffffff 6%);
    color: var(--lpw-text);
}

.lpw-modal-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.lpw-modal-object-list {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--lpw-border);
}

.lpw-modal-object-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    background: #ffffff;
    background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, #ffffff 6%);
    border: 1px solid var(--lpw-border);
    border-radius: 12px;
    padding: 10px 12px;
}

.lpw-tree-empty {
    padding: 10px 12px;
    color: var(--lpw-muted);
    font-size: 12px;
}

@media (max-width: 960px) {
    .lpw-modal-project-row {
        grid-template-columns: 1fr;
    }
    .lpw-modal-inline-actions {
        justify-content: flex-start;
    }
}


/* v3.6.0 UX and accessibility refresh */
#lpw-app :where(.lpw-button,
.lpw-file-button,
.lpw-file-menu-item,
.lpw-gis-tab,
.lpw-theme-toggle,
.lpw-tree-toggle,
.lpw-tree-node,
.lpw-modal-close,
.lpw-context-menu button,
.lpw-notice-close,
.lpw-row-actions-button,
input,
select,
textarea,
button):focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.26);
  outline-offset: 2px;
}

.lpw-gis-root {
  --lpw-bg: #f4f7fb;
  --lpw-surface: #ffffff;
  --lpw-surface-strong: #eef3fb;
  --lpw-border: #d7e0ec;
  --lpw-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --lpw-radius: 16px;
}

.lpw-gis-sidebar {
  box-shadow: inset -1px 0 0 rgba(148, 163, 184, 0.18);
}

.lpw-gis-card,
.lpw-panel,
.lpw-modal,
.lpw-project-card {
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.lpw-modal-backdrop {
  background: rgba(15, 23, 42, 0.44);
}

.lpw-modal {
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.lpw-notice-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.lpw-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.lpw-theme-dark .lpw-notice {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(96, 165, 250, 0.24);
}

.lpw-notice-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.lpw-row-actions-button {
  min-width: 112px;
  justify-content: center;
  gap: 8px;
}

.lpw-row-actions-button svg {
  width: 14px;
  height: 14px;
}

.lpw-context-menu {
  min-width: 220px;
}

.lpw-project-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.lpw-project-toolbar p {
  margin: 6px 0 0;
  max-width: 720px;
}

.lpw-project-grid--gis {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.lpw-project-editor-card .lpw-panel-head {
  margin-bottom: 18px;
}

.lpw-gis-section-note {
  margin: 6px 0 0;
  color: rgba(71, 85, 105, 0.9);
}

.lpw-form-grid--sections {
  display: grid;
  gap: 18px;
}

.lpw-form-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
}

.lpw-theme-dark .lpw-form-section {
  background: rgba(15, 23, 42, 0.46);
  border-color: rgba(148, 163, 184, 0.2);
}

.lpw-form-section-head h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.lpw-form-section-head p {
  margin: 0;
  color: rgba(71, 85, 105, 0.9);
}

.lpw-form-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

@media (max-width: 900px) {
  .lpw-project-toolbar {
    flex-direction: column;
  }

  .lpw-form-section-grid {
    grid-template-columns: 1fr;
  }
}

.lpw-tree-project-tail {
  display: grid;
  gap: 6px;
  padding-top: 4px;
}

.lpw-gis-card-sub {
  margin: 4px 0 0;
  color: rgba(71, 85, 105, 0.86);
  font-size: 13px;
}

.lpw-gis-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.9fr);
  gap: 18px;
}

.lpw-control-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.lpw-control-headline h3 {
  margin: 0;
}

.lpw-table-filter-row th {
  background: rgba(248, 250, 252, 0.9);
  padding-top: 8px;
  padding-bottom: 8px;
}

.lpw-theme-dark .lpw-table-filter-row th {
  background: rgba(15, 23, 42, 0.9);
}

.lpw-column-filter {
  width: 100%;
  min-width: 110px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
  font: inherit;
}

.lpw-theme-dark .lpw-column-filter {
  background: rgba(2, 6, 23, 0.84);
  border-color: rgba(148, 163, 184, 0.28);
}

.lpw-table--conditions th,
.lpw-table--conditions td {
  vertical-align: top;
}

@media (max-width: 1100px) {
  .lpw-gis-two-column {
    grid-template-columns: 1fr;
  }
}

.lpw-tree-children[hidden] {
    display: none !important;
}

.lpw-col-action {
    width: 54px;
    text-align: center;
}

.lpw-icon-button {
    appearance: none;
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    color: inherit;
    cursor: pointer;
}

.lpw-icon-button:hover {
    background: rgba(255,255,255,0.14);
}

.lpw-icon-button.danger {
    color: #ffd4d4;
    background: rgba(214, 72, 72, 0.18);
}

.lpw-icon-button.danger:hover {
    background: rgba(214, 72, 72, 0.28);
}


/* v4.1.5 stability and table layout fixes */
.lpw-gis-stack,
.lpw-gis-card,
.lpw-gis-content,
.lpw-gis-main {
  min-width: 0;
}

.lpw-gis-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
}

.lpw-table--gis {
  width: max-content;
  min-width: 100%;
}

.lpw-gis-toolbar-actions {
  max-width: 100%;
}

.lpw-gis-toolbar-actions .lpw-button {
  white-space: nowrap;
}

/* v4.1.6 lightweight dataset pagination */
.lpw-gis-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}


/* v4.2.1 server filters and sorting */
.lpw-table-sort {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.lpw-table-sort:hover {
  opacity: 0.86;
}

.lpw-table-sort-indicator {
  min-width: 12px;
  text-align: center;
  font-size: 11px;
  opacity: 0.8;
}

.lpw-gis-toolbar > #lpw-search {
  flex: 1 1 320px;
  max-width: 420px;
}

.lpw-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lpw-doc-block h4 {
  margin: 14px 0 8px;
}

.lpw-code-block {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow: auto;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.lpw-theme-dark .lpw-code-block {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.22);
}

/* v4.3.0 — Набивка 2.0: читаемая карточка, справочники в ячейках, навигация по ошибкам */
.lpw-card-shell--dense .lpw-card-toolbar-grid,
.lpw-card-shell--standard .lpw-card-toolbar-grid {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 10px;
    margin: -4px -4px 8px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--lpw-panel, #fff) 92%, var(--lpw-accent-soft, #dbeafe) 8%);
    border: 1px solid var(--lpw-border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.lpw-card-shell--standard .lpw-compact-card-viewport {
    height: auto !important;
    overflow: auto;
    max-height: none;
}

.lpw-card-shell--standard .lpw-compact-card-sheet {
    min-height: 1180px;
}

.lpw-card-shell--standard .lpw-cc-cell,
.lpw-card-shell--standard .lpw-cc-stand-table th,
.lpw-card-shell--standard .lpw-cc-stand-table td,
.lpw-card-shell--standard .lpw-cc-extra-table th,
.lpw-card-shell--standard .lpw-cc-extra-table td {
    font-size: 12px;
}

.lpw-card-shell--standard .lpw-cc-cell input,
.lpw-card-shell--standard .lpw-cc-cell select,
.lpw-card-shell--standard .lpw-kt-mini-input {
    min-height: 30px;
    font-size: 13px;
}

.lpw-card-issue-nav {
    border: 1px solid var(--lpw-border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--lpw-panel-soft, #f8fafc) 92%, #fff 8%);
    padding: 10px;
    display: grid;
    gap: 8px;
}

.lpw-card-issue-nav.is-empty {
    color: var(--lpw-text-soft);
    font-size: 13px;
}

.lpw-card-issue-nav-title {
    font-weight: 800;
    color: var(--lpw-text);
    font-size: 13px;
}

.lpw-card-issue-nav-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lpw-card-issue-chip {
    border: 1px solid var(--lpw-border);
    background: var(--lpw-panel);
    border-radius: 999px;
    padding: 7px 10px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    cursor: pointer;
    color: var(--lpw-text);
    max-width: 360px;
}

.lpw-card-issue-chip span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lpw-card-issue-chip.is-error {
    border-color: rgba(215, 79, 69, .38);
    background: rgba(215, 79, 69, .08);
}

.lpw-card-issue-chip.is-warning {
    border-color: rgba(210, 140, 43, .38);
    background: rgba(210, 140, 43, .1);
}

.lpw-ref-input {
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 20px !important;
}

.lpw-ref-input.is-ref-invalid {
    border-color: #d74f45 !important;
    box-shadow: inset 0 0 0 1px #d74f45, 0 0 0 3px rgba(215,79,69,.12) !important;
}

.lpw-table--gis .lpw-sticky-col {
    position: sticky;
    z-index: 3;
    background: color-mix(in srgb, var(--lpw-panel, #fff) 95%, #fff 5%);
}

.lpw-table--gis th.lpw-sticky-col {
    z-index: 5;
}

.lpw-table--gis .lpw-sticky-select {
    left: 0;
    width: 46px;
    min-width: 46px;
}


.lpw-button.is-active,
.lpw-gis-toolbar-actions .lpw-button.is-active {
    border-color: var(--lpw-accent);
    background: var(--lpw-accent-soft);
    color: var(--lpw-accent-strong);
}

.lpw-table--gis td {
    line-height: 1.35;
    vertical-align: middle;
}

/* --- v4.3.1 Reference dictionaries 2.0 --- */
.lpw-reference-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.lpw-reference-summary-grid > div {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 12px;
    background: #f8fafc;
}

.lpw-reference-summary-grid strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 12px;
}

.lpw-reference-summary-grid span {
    display: block;
    color: #334155;
    font-size: 13px;
}

.lpw-reference-summary-grid small {
    display: block;
    color: #94a3b8;
    font-size: 11px;
}

.lpw-reference-impact {
    margin: 12px 0;
    padding: 11px 13px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.45;
}

.lpw-reference-impact.warn {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.lpw-reference-impact.neutral {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.lpw-reference-deps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 14px;
}

.lpw-reference-deps > div {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 12px;
    background: #ffffff;
}

.lpw-reference-deps strong {
    display: block;
    margin-bottom: 7px;
    color: #0f172a;
    font-size: 12px;
}

.lpw-reference-deps span {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #64748b;
}

.lpw-reference-deps em {
    display: inline-flex;
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 8px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 11px;
    font-style: normal;
    white-space: nowrap;
}

.lpw-reference-toolbar {
    align-items: center;
}

.lpw-reference-search {
    min-width: 220px;
}

.lpw-reference-tech-toggle {
    min-height: 38px;
    padding: 0 8px;
    border-radius: 12px;
    background: #f8fafc;
}

.lpw-reference-table th small {
    display: block;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
}

.lpw-reference-log {
    display: grid;
    gap: 8px;
}

.lpw-reference-log-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.lpw-reference-log-item strong {
    color: #0f172a;
}

.lpw-reference-log-item span {
    color: #64748b;
    font-size: 12px;
}

@media (max-width: 1180px) {
    .lpw-reference-summary-grid,
    .lpw-reference-deps {
        grid-template-columns: 1fr;
    }
}

/* v4.3.2 Interface and themes */
.lpw-gis-root,
.lpw-modal-backdrop {
    --lpw-sidebar: linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
    --lpw-sidebar-text: #172133;
    --lpw-sidebar-muted: #66778d;
    --lpw-sidebar-card: rgba(255,255,255,0.72);
    --lpw-sidebar-border: rgba(97,117,139,0.18);
    --lpw-tree-node: rgba(255,255,255,0.64);
    --lpw-tree-node-hover: rgba(255,255,255,0.90);
    --lpw-table-head: #e7f2ff;
    --lpw-table-head-text: #16324f;
    --lpw-shadow-soft: rgba(15, 23, 42, 0.08);
}

.lpw-gis-root.lpw-theme-win11-light,
.lpw-modal-backdrop.lpw-theme-win11-light {
    --lpw-bg: #f3f7fb;
    --lpw-panel: #ffffff;
    --lpw-panel-soft: #f7fafd;
    --lpw-border: #d7e0ea;
    --lpw-text: #142133;
    --lpw-text-soft: #5c6f84;
    --lpw-accent: #2563eb;
    --lpw-accent-soft: #eaf2ff;
    --lpw-danger: #dc4c44;
    --lpw-warning: #c77c1a;
    --lpw-success: #247b4f;
    --lpw-sidebar: linear-gradient(180deg, #fbfdff 0%, #eef5fb 100%);
    --lpw-sidebar-text: #142133;
    --lpw-sidebar-muted: #65758b;
    --lpw-sidebar-card: rgba(255,255,255,0.74);
    --lpw-table-head: #e7f2ff;
    --lpw-table-head-text: #16324f;
}

.lpw-gis-root.lpw-theme-win11-dark,
.lpw-modal-backdrop.lpw-theme-win11-dark {
    --lpw-bg: #101721;
    --lpw-panel: #161f2b;
    --lpw-panel-soft: #1b2633;
    --lpw-border: #2a3748;
    --lpw-text: #e8eef7;
    --lpw-text-soft: #9caabc;
    --lpw-accent: #66a8ff;
    --lpw-accent-soft: rgba(102, 168, 255, 0.14);
    --lpw-danger: #ee7e76;
    --lpw-warning: #f0b34d;
    --lpw-success: #63c48d;
    --lpw-sidebar: linear-gradient(180deg, #121b27 0%, #0c131d 100%);
    --lpw-sidebar-text: #f3f7fb;
    --lpw-sidebar-muted: #a4b2c4;
    --lpw-sidebar-card: rgba(255,255,255,0.055);
    --lpw-sidebar-border: rgba(255,255,255,0.10);
    --lpw-tree-node: rgba(255,255,255,0.055);
    --lpw-tree-node-hover: rgba(255,255,255,0.11);
    --lpw-table-head: #1f3649;
    --lpw-table-head-text: #e8eef7;
}

.lpw-gis-root.lpw-theme-neutral-slate,
.lpw-modal-backdrop.lpw-theme-neutral-slate {
    --lpw-bg: #eef1f4;
    --lpw-panel: #fbfcfd;
    --lpw-panel-soft: #f2f4f6;
    --lpw-border: #cfd7df;
    --lpw-text: #1f2937;
    --lpw-text-soft: #647080;
    --lpw-accent: #475569;
    --lpw-accent-soft: #e4e8ee;
    --lpw-danger: #b94b45;
    --lpw-warning: #a06a19;
    --lpw-success: #39735a;
    --lpw-sidebar: linear-gradient(180deg, #f8fafc 0%, #e8edf3 100%);
    --lpw-sidebar-text: #1f2937;
    --lpw-sidebar-muted: #667085;
    --lpw-sidebar-card: rgba(255,255,255,0.66);
    --lpw-table-head: #e6ebf1;
    --lpw-table-head-text: #263445;
}

.lpw-gis-root.lpw-theme-forest-night,
.lpw-modal-backdrop.lpw-theme-forest-night {
    --lpw-bg: #0d1713;
    --lpw-panel: #14221c;
    --lpw-panel-soft: #1a2c24;
    --lpw-border: #284238;
    --lpw-text: #e6f2eb;
    --lpw-text-soft: #a8c0b4;
    --lpw-accent: #7dd3a8;
    --lpw-accent-soft: rgba(125, 211, 168, 0.14);
    --lpw-danger: #f18a7f;
    --lpw-warning: #edc45b;
    --lpw-success: #8ce0b2;
    --lpw-sidebar: linear-gradient(180deg, #102018 0%, #09130f 100%);
    --lpw-sidebar-text: #edf8f0;
    --lpw-sidebar-muted: #a8c8b5;
    --lpw-sidebar-card: rgba(255,255,255,0.055);
    --lpw-sidebar-border: rgba(160,220,180,0.12);
    --lpw-tree-node: rgba(255,255,255,0.055);
    --lpw-tree-node-hover: rgba(125,211,168,0.12);
    --lpw-table-head: #18382c;
    --lpw-table-head-text: #e6f2eb;
}

.lpw-gis-root {
    grid-template-columns: 292px minmax(0, 1fr);
}

.lpw-gis-sidebar {
    background: var(--lpw-sidebar);
    color: var(--lpw-sidebar-text);
    padding: 14px 12px;
    gap: 12px;
    border-right: 1px solid var(--lpw-sidebar-border);
}

.lpw-gis-root.lpw-theme-dark .lpw-gis-sidebar,
.lpw-gis-root.lpw-theme-win11-dark .lpw-gis-sidebar,
.lpw-gis-root.lpw-theme-forest-night .lpw-gis-sidebar,
.lpw-gis-root.lpw-theme-neutral-slate .lpw-gis-sidebar {
    background: var(--lpw-sidebar);
}

.lpw-gis-brand {
    padding: 4px 4px 10px;
    border-bottom-color: var(--lpw-sidebar-border);
}

.lpw-gis-brand strong,
.lpw-tree-node {
    color: var(--lpw-sidebar-text);
}

.lpw-gis-brand span {
    color: var(--lpw-sidebar-muted);
}

.lpw-gis-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}


.lpw-gis-tree {
    gap: 9px;
    padding-right: 2px;
}

.lpw-tree-children {
    gap: 4px;
    padding-left: 8px;
    margin-left: 5px;
    border-left-color: var(--lpw-sidebar-border);
}

.lpw-tree-node {
    padding: 7px 9px;
    border-radius: 8px;
    background: var(--lpw-tree-node);
    border: 1px solid transparent;
    min-height: 34px;
}

.lpw-tree-node:hover {
    background: var(--lpw-tree-node-hover);
    border-color: var(--lpw-sidebar-border);
}

.lpw-tree-node.is-active {
    background: var(--lpw-accent-soft);
    color: var(--lpw-accent);
    box-shadow: inset 2px 0 0 var(--lpw-accent);
    border-color: color-mix(in srgb, var(--lpw-accent) 28%, transparent);
}

.lpw-tree-node.is-active .lpw-tree-label-main,
.lpw-tree-node.is-active span:last-child {
    color: var(--lpw-accent);
}

.lpw-table--gis th,
.lpw-gis-root.lpw-theme-dark .lpw-table--gis th,
.lpw-gis-root.lpw-theme-win11-dark .lpw-table--gis th,
.lpw-gis-root.lpw-theme-forest-night .lpw-table--gis th,
.lpw-gis-root.lpw-theme-neutral-slate .lpw-table--gis th {
    background: var(--lpw-table-head);
    color: var(--lpw-table-head-text);
}

.lpw-settings-button {
    appearance: none;
    border: 1px solid var(--lpw-border);
    background: var(--lpw-panel-soft);
    color: var(--lpw-text);
    border-radius: 12px;
    padding: 9px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
}

.lpw-settings-button:hover,
.lpw-settings-button:focus-visible {
    background: var(--lpw-accent-soft);
    color: var(--lpw-accent);
    border-color: color-mix(in srgb, var(--lpw-accent) 32%, var(--lpw-border));
}


.lpw-settings-modal {
    display: grid;
    gap: 18px;
}

.lpw-settings-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    background: var(--lpw-panel-soft);
    border: 1px solid var(--lpw-border);
    border-radius: 16px;
    width: fit-content;
}

.lpw-settings-tabs button {
    border: 0;
    background: transparent;
    color: var(--lpw-text-soft);
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 800;
    cursor: default;
}

.lpw-settings-tabs button.is-active {
    background: var(--lpw-panel);
    color: var(--lpw-accent);
    box-shadow: 0 4px 14px var(--lpw-shadow-soft);
}

.lpw-settings-section {
    border: 1px solid var(--lpw-border);
    border-radius: 20px;
    padding: 16px;
    background: var(--lpw-panel-soft);
}

.lpw-settings-section-head h4 {
    margin: 0;
    font-size: 18px;
    color: var(--lpw-text);
}

.lpw-settings-section-head p {
    margin: 6px 0 14px;
    color: var(--lpw-text-soft);
}

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

.lpw-theme-card {
    border: 1px solid var(--lpw-border);
    background: var(--lpw-panel);
    color: var(--lpw-text);
    border-radius: 18px;
    padding: 12px;
    min-height: 178px;
    text-align: left;
    cursor: pointer;
    display: grid;
    gap: 7px;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.lpw-theme-card:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--lpw-accent) 34%, var(--lpw-border));
}

.lpw-theme-card.is-active {
    border-color: var(--lpw-accent);
    box-shadow: 0 0 0 3px var(--lpw-accent-soft);
}

.lpw-theme-card strong {
    font-size: 15px;
}

.lpw-theme-card em {
    color: var(--lpw-accent);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.lpw-theme-card span:not(.lpw-theme-preview) {
    color: var(--lpw-text-soft);
    font-size: 12px;
    line-height: 1.35;
}

.lpw-theme-preview {
    height: 62px;
    border-radius: 14px;
    display: grid;
    grid-template-columns: 34% 1fr;
    gap: 6px;
    padding: 7px;
    border: 1px solid rgba(0,0,0,.08);
}

.lpw-theme-preview i {
    display: block;
    border-radius: 8px;
}

.lpw-theme-preview i:first-child {
    grid-row: span 2;
}

.lpw-theme-preview--win11-light { background: #f3f7fb; }
.lpw-theme-preview--win11-light i:first-child { background: #eef5fb; }
.lpw-theme-preview--win11-light i:nth-child(2) { background: #ffffff; }
.lpw-theme-preview--win11-light i:nth-child(3) { background: #eaf2ff; }

.lpw-theme-preview--win11-dark { background: #101721; }
.lpw-theme-preview--win11-dark i:first-child { background: #121b27; }
.lpw-theme-preview--win11-dark i:nth-child(2) { background: #1b2633; }
.lpw-theme-preview--win11-dark i:nth-child(3) { background: rgba(102,168,255,.24); }

.lpw-theme-preview--neutral-slate { background: #eef1f4; }
.lpw-theme-preview--neutral-slate i:first-child { background: #e8edf3; }
.lpw-theme-preview--neutral-slate i:nth-child(2) { background: #fbfcfd; }
.lpw-theme-preview--neutral-slate i:nth-child(3) { background: #e4e8ee; }

.lpw-theme-preview--forest-night { background: #0d1713; }
.lpw-theme-preview--forest-night i:first-child { background: #102018; }
.lpw-theme-preview--forest-night i:nth-child(2) { background: #1a2c24; }
.lpw-theme-preview--forest-night i:nth-child(3) { background: rgba(125,211,168,.22); }

.lpw-settings-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.lpw-settings-summary div {
    border: 1px solid var(--lpw-border);
    background: var(--lpw-panel);
    border-radius: 16px;
    padding: 12px;
}

.lpw-settings-summary span {
    display: block;
    color: var(--lpw-text-soft);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 4px;
}

.lpw-settings-summary strong {
    color: var(--lpw-text);
}

@media (max-width: 1200px) {
    .lpw-theme-grid,
    .lpw-settings-summary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 780px) {
    .lpw-theme-grid,
    .lpw-settings-summary {
        grid-template-columns: 1fr;
    }
}

.lpw-tree-toggle {
    color: var(--lpw-sidebar-muted);
    background: var(--lpw-tree-node);
    border: 1px solid transparent;
    border-radius: 8px;
    min-height: 34px;
}

.lpw-tree-toggle:hover {
    background: var(--lpw-tree-node-hover);
    border-color: var(--lpw-sidebar-border);
}

.lpw-empty-right-pane {
  min-height: min(520px, calc(100vh - 210px));
  display: grid;
  place-items: center;
  padding: 32px;
}

.lpw-empty-right-pane-card {
  width: min(440px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  border: 1px solid var(--lpw-border);
  border-radius: 14px;
  background: var(--lpw-panel);
  color: var(--lpw-text-soft);
  text-align: center;
}

.lpw-empty-right-pane-card .lpw-icon {
  color: var(--lpw-accent);
}

.lpw-empty-right-pane-card strong {
  color: var(--lpw-text);
  font-size: 16px;
}

.lpw-empty-right-pane-card span {
  max-width: 360px;
  line-height: 1.45;
}

/* 4.4.0 — отчеты по реальным данным проекта */
.lpw-report-card.is-active {
  outline: 2px solid var(--lpw-accent, #2563eb);
  outline-offset: 2px;
}
.lpw-report-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.lpw-report-card-top > span {
  font-size: 12px;
  color: var(--lpw-muted, #64748b);
}
.lpw-report-preview {
  display: grid;
  gap: 12px;
}
.lpw-report-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}
.lpw-report-status-grid > div {
  border: 1px solid var(--lpw-border, #d8dee9);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--lpw-panel-soft, rgba(148, 163, 184, 0.08));
}
.lpw-report-status-grid span {
  display: block;
  font-size: 12px;
  color: var(--lpw-muted, #64748b);
}
.lpw-report-status-grid strong {
  font-size: 22px;
}
.lpw-report-status-grid .has-error strong,
.lpw-inline-note.is-error {
  color: var(--lpw-danger, #b91c1c);
}
.lpw-report-status-grid .has-warning strong,
.lpw-inline-note.is-warning {
  color: var(--lpw-warning, #b45309);
}
.lpw-inline-note.is-success {
  color: var(--lpw-success, #047857);
}
.lpw-report-table-wrap {
  max-height: 520px;
}
.lpw-report-table tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--lpw-border, #d8dee9);
  background: var(--lpw-panel-soft, rgba(148, 163, 184, 0.08));
}
@media (max-width: 900px) {
  .lpw-report-status-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

/* 4.5.0 — админ-панель полного цикла */
.lpw-admin-wide {
    grid-column: 1 / -1;
}

.lpw-admin-registry {
    margin-top: 14px;
    overflow: auto;
    border: 1px solid var(--lpw-border, #d8dee9);
    border-radius: 16px;
}

.lpw-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.lpw-admin-table th,
.lpw-admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--lpw-border, #d8dee9);
    text-align: left;
    vertical-align: top;
}

.lpw-admin-table th {
    background: var(--lpw-panel-soft, #f8fafc);
    color: var(--lpw-muted, #64748b);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.lpw-admin-table tr.is-active td {
    background: color-mix(in srgb, var(--lpw-accent-soft, #dbeafe) 48%, transparent);
}

.lpw-admin-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--lpw-border, #d8dee9);
    background: var(--lpw-panel-soft, #f8fafc);
}

.lpw-admin-status.active {
    color: var(--lpw-success, #047857);
    background: color-mix(in srgb, var(--lpw-success, #047857) 10%, transparent);
    border-color: color-mix(in srgb, var(--lpw-success, #047857) 30%, transparent);
}

.lpw-admin-status.warning {
    color: var(--lpw-warning, #b45309);
    background: color-mix(in srgb, var(--lpw-warning, #b45309) 12%, transparent);
    border-color: color-mix(in srgb, var(--lpw-warning, #b45309) 28%, transparent);
}

.lpw-admin-status.error {
    color: var(--lpw-danger, #b91c1c);
    background: color-mix(in srgb, var(--lpw-danger, #b91c1c) 10%, transparent);
    border-color: color-mix(in srgb, var(--lpw-danger, #b91c1c) 28%, transparent);
}

.lpw-admin-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.lpw-admin-metric-grid > div {
    border: 1px solid var(--lpw-border, #d8dee9);
    border-radius: 14px;
    padding: 10px 12px;
    background: var(--lpw-panel-soft, #f8fafc);
}

.lpw-admin-metric-grid strong,
.lpw-admin-metric-grid span {
    display: block;
}

.lpw-admin-metric-grid strong {
    font-size: 20px;
}

.lpw-admin-metric-grid span {
    color: var(--lpw-muted, #64748b);
    font-size: 12px;
}

.lpw-admin-audit {
    display: grid;
    gap: 8px;
    max-height: 380px;
    overflow: auto;
}

.lpw-admin-audit-item {
    border: 1px solid var(--lpw-border, #d8dee9);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--lpw-panel-soft, #f8fafc);
}

@media (max-width: 1100px) {
    .lpw-admin-grid {
        grid-template-columns: 1fr;
    }
    .lpw-admin-metric-grid {
        grid-template-columns: 1fr;
    }
}

.lpw-panel-subtitle {
  margin: 16px 0 8px;
  font-weight: 700;
  color: var(--lpw-text);
}

.lpw-list-compact .lpw-list-item {
  padding: 10px 12px;
}

.lpw-admin-grid-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 8px 0 12px;
}

.lpw-small-list {
    margin: 8px 0 0 18px;
    padding: 0;
    color: var(--lpw-muted, #64748b);
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .lpw-admin-grid-inner {
        grid-template-columns: 1fr;
    }
}


/* v5.1.0 UX hardening: safer actions, clearer modes, scoped accessibility */
#lpw-app {
  --lpw-accent: #2563eb;
  --lpw-accent-hover: #1d4ed8;
  --lpw-danger: #dc2626;
  --lpw-danger-soft: #fee2e2;
  --lpw-focus-ring: rgba(37, 99, 235, 0.26);
}

#lpw-app .lpw-button:not(.secondary):not(.ghost):not(.danger) {
  background: var(--lpw-accent, #2563eb);
}

#lpw-app .lpw-button:not(.secondary):not(.ghost):not(.danger):hover {
  background: var(--lpw-accent-hover, #1d4ed8);
}

#lpw-app .lpw-button.danger {
  background: var(--lpw-danger, #dc2626);
  border-color: var(--lpw-danger, #dc2626);
  color: #fff;
}

#lpw-app .lpw-button.danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

#lpw-app .lpw-confirm {
  display: grid;
  gap: 16px;
}

#lpw-app .lpw-confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lpw-danger-soft, #fee2e2);
  color: var(--lpw-danger, #dc2626);
}

#lpw-app .lpw-confirm-message {
  color: var(--lpw-text, #142133);
  line-height: 1.55;
}

#lpw-app .lpw-context-menu-separator {
  height: 1px;
  margin: 5px 4px;
  background: var(--lpw-border, #d7e0ea);
}


#lpw-app .lpw-table--gis td[data-column-context] {
  cursor: context-menu;
}

#lpw-app .lpw-tree-node {
  cursor: pointer;
}

/* v5.3.0 professional workbench layer: clearer status, calmer table views, less technical noise */
#lpw-app .lpw-view-switcher,
#lpw-app .lpw-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#lpw-app .lpw-view-chip,
#lpw-app .lpw-active-filter {
  min-height: 32px;
  border: 1px solid var(--lpw-border, #d7e0ea);
  border-radius: 999px;
  background: var(--lpw-panel, #fff);
  color: var(--lpw-text-soft, #5c6f84);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

#lpw-app .lpw-view-chip:hover,
#lpw-app .lpw-active-filter:hover {
  border-color: color-mix(in srgb, var(--lpw-accent, #2563eb) 32%, var(--lpw-border, #d7e0ea));
  color: var(--lpw-accent, #2563eb);
}

#lpw-app .lpw-view-chip.is-active {
  background: var(--lpw-accent-soft, #e8f1ff);
  border-color: color-mix(in srgb, var(--lpw-accent, #2563eb) 42%, var(--lpw-border, #d7e0ea));
  color: var(--lpw-accent, #2563eb);
}

#lpw-app .lpw-active-filter {
  background: color-mix(in srgb, var(--lpw-warning, #d28a22) 8%, var(--lpw-panel, #fff));
}

#lpw-app .lpw-table--gis th,
#lpw-app .lpw-table--gis td {
  font-size: 12px;
}

#lpw-app .lpw-table--gis .lpw-table-sort span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 5.3.1: compact controls, modern checkboxes and exchange tools */
#lpw-app input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid rgba(91, 107, 129, .38);
  border-radius: 6px;
  background: var(--lpw-card, #fff);
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
#lpw-app input[type="checkbox"]:checked {
  border-color: var(--lpw-accent, #2563eb);
  background: var(--lpw-accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
#lpw-app input[type="checkbox"]:checked::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
#lpw-app input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
#lpw-app .lpw-checkline {
  align-items: center;
  gap: 8px;
  border-radius: 10px;
}
#lpw-app .lpw-modal-actions .lpw-button,
#lpw-app .lpw-modal-inline-actions .lpw-button,
#lpw-app .lpw-project-card .lpw-button {
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.15;
}
#lpw-app .lpw-recode-form .lpw-recode-table {
  border: 1px solid var(--lpw-border, rgba(148, 163, 184, .35));
  border-radius: 14px;
  overflow: hidden;
  max-height: 52vh;
  overflow-y: auto;
  background: var(--lpw-card, #fff);
}
#lpw-app .lpw-recode-head,
#lpw-app .lpw-recode-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
}
#lpw-app .lpw-recode-head {
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 700;
  background: var(--lpw-soft, rgba(148, 163, 184, .12));
}
#lpw-app .lpw-recode-row { border-top: 1px solid var(--lpw-border, rgba(148, 163, 184, .25)); }
#lpw-app .lpw-recode-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lpw-text, #111827);
}
#lpw-app .lpw-reference-toolbar .lpw-button.secondary { white-space: nowrap; }

/* v5.3.3: topbar, searchable project selectors, strict expert-only UI */
#lpw-app .lpw-gis-menuline-left > .lpw-settings-button {
  flex: 0 0 auto;
  min-height: 38px;
}

#lpw-app .lpw-modal-backdrop .lpw-icon,
#lpw-app .lpw-modal-backdrop .lpw-icon svg,
.lpw-modal-backdrop .lpw-icon,
.lpw-modal-backdrop .lpw-icon svg {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
}

#lpw-app .lpw-modal-close,
.lpw-modal-close {
  color: var(--lpw-text, #142133);
  background: var(--lpw-panel, #fff);
  opacity: 1;
}

#lpw-app .lpw-modal-close:hover,
.lpw-modal-close:hover {
  background: var(--lpw-accent-soft, #eaf2ff);
  color: var(--lpw-accent, #2563eb);
}

#lpw-app .lpw-tree-node.is-active,
.lpw-gis-root .lpw-tree-node.is-active {
  background: var(--lpw-accent, #2563eb);
  color: #fff;
  border-color: var(--lpw-accent, #2563eb);
  box-shadow: inset 2px 0 0 rgba(255,255,255,0.42);
}

#lpw-app .lpw-tree-node.is-active .lpw-tree-label-main,
#lpw-app .lpw-tree-node.is-active span:last-child,
.lpw-gis-root .lpw-tree-node.is-active .lpw-tree-label-main,
.lpw-gis-root .lpw-tree-node.is-active span:last-child {
  color: #fff;
}

#lpw-app .lpw-settings-empty {
  border: 1px dashed var(--lpw-border, #d7e0ea);
  border-radius: 16px;
  padding: 16px;
  background: var(--lpw-panel-soft, #f7fafd);
}

/* v5.3.4: topbar layout, native searchable selects, dark notices and field hygiene */
#lpw-app .lpw-gis-menuline {
  flex-wrap: wrap;
}

#lpw-app .lpw-gis-menuline-left {
  gap: 10px;
}

#lpw-app .lpw-gis-title-block {
  display: block;
  width: 100%;
  margin-top: 10px;
}

#lpw-app .lpw-gis-title-block h1 {
  font-size: 22px;
  line-height: 1.2;
}

#lpw-app select[data-native-search="1"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--lpw-border, #d7e0ea);
  border-radius: 10px;
  padding: 7px 10px;
  background: var(--lpw-panel, #fff);
  color: var(--lpw-text, #142133);
  font-size: 14px;
}

#lpw-app .lpw-notice {
  color: var(--lpw-text, #142133);
  background: color-mix(in srgb, var(--lpw-panel, #ffffff) 94%, var(--lpw-accent-soft, #eaf2ff) 6%);
  border-color: color-mix(in srgb, var(--lpw-accent, #2563eb) 28%, var(--lpw-border, #d7e0ea) 72%);
}

#lpw-app .lpw-theme-win11-dark .lpw-notice,
#lpw-app .lpw-theme-forest-night .lpw-notice,
#lpw-app .lpw-theme-dark .lpw-notice {
  color: var(--lpw-text, #e8eef7);
  background: color-mix(in srgb, var(--lpw-panel, #161f2b) 88%, var(--lpw-accent-soft, rgba(102,168,255,.14)) 12%);
  border-color: color-mix(in srgb, var(--lpw-accent, #66a8ff) 34%, var(--lpw-border, #2a3748) 66%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

#lpw-app .lpw-theme-win11-dark .lpw-notice-close,
#lpw-app .lpw-theme-forest-night .lpw-notice-close,
#lpw-app .lpw-theme-dark .lpw-notice-close {
  color: var(--lpw-text, #e8eef7);
  background: var(--lpw-panel-soft, #1b2633);
}

#lpw-app .lpw-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* v5.3.5: topbar hover readability and stricter theme contrast */
#lpw-app .lpw-file-menu-item:hover,
#lpw-app .lpw-file-menu-item:focus-visible {
  color: var(--lpw-text, #142133);
  background: color-mix(in srgb, var(--lpw-panel-soft, #f7fafd) 84%, var(--lpw-accent-soft, #eaf2ff) 16%);
}

#lpw-app .lpw-theme-win11-light .lpw-file-menu-item:hover,
#lpw-app .lpw-theme-win11-light .lpw-file-menu-item:focus-visible,
#lpw-app .lpw-theme-neutral-slate .lpw-file-menu-item:hover,
#lpw-app .lpw-theme-neutral-slate .lpw-file-menu-item:focus-visible {
  color: var(--lpw-text, #142133);
  background: color-mix(in srgb, var(--lpw-panel-soft, #f7fafd) 78%, var(--lpw-accent-soft, #eaf2ff) 22%);
}

#lpw-app .lpw-theme-win11-dark .lpw-file-menu-item:hover,
#lpw-app .lpw-theme-win11-dark .lpw-file-menu-item:focus-visible,
#lpw-app .lpw-theme-forest-night .lpw-file-menu-item:hover,
#lpw-app .lpw-theme-forest-night .lpw-file-menu-item:focus-visible,
#lpw-app .lpw-theme-dark .lpw-file-menu-item:hover,
#lpw-app .lpw-theme-dark .lpw-file-menu-item:focus-visible {
  color: var(--lpw-text, #e8eef7);
  background: color-mix(in srgb, var(--lpw-panel-soft, #1b2633) 76%, var(--lpw-accent-soft, rgba(102,168,255,.14)) 24%);
}


/* v5.3.6: database action strip, compact project manager and light-tree hover readability */
#lpw-app .lpw-tree-node:hover,
.lpw-gis-root .lpw-tree-node:hover {
  color: var(--lpw-sidebar-text, var(--lpw-text, #142133));
}

#lpw-app .lpw-tree-node:hover .lpw-tree-label-main,
#lpw-app .lpw-tree-node:hover span:last-child,
.lpw-gis-root .lpw-tree-node:hover .lpw-tree-label-main,
.lpw-gis-root .lpw-tree-node:hover span:last-child {
  color: var(--lpw-sidebar-text, var(--lpw-text, #142133));
}

#lpw-app .lpw-theme-win11-light .lpw-tree-node:hover,
#lpw-app .lpw-theme-neutral-slate .lpw-tree-node:hover {
  background: color-mix(in srgb, var(--lpw-accent-soft, #eaf2ff) 58%, var(--lpw-panel, #fff) 42%);
  color: var(--lpw-text, #142133);
  border-color: color-mix(in srgb, var(--lpw-accent, #2563eb) 24%, var(--lpw-border, #d7e0ea));
}

#lpw-app .lpw-theme-win11-light .lpw-tree-node:hover .lpw-tree-label-main,
#lpw-app .lpw-theme-win11-light .lpw-tree-node:hover span:last-child,
#lpw-app .lpw-theme-neutral-slate .lpw-tree-node:hover .lpw-tree-label-main,
#lpw-app .lpw-theme-neutral-slate .lpw-tree-node:hover span:last-child {
  color: var(--lpw-text, #142133);
}

#lpw-app .lpw-db-actions-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--lpw-border, #d7e0ea);
  border-radius: 12px;
  background: var(--lpw-panel, #fff);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

#lpw-app .lpw-db-actions-panel > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#lpw-app .lpw-eyebrow {
  color: var(--lpw-text-soft, #5c6f84);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

#lpw-app .lpw-db-actions-panel strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lpw-text, #142133);
  font-size: 15px;
}

#lpw-app .lpw-db-actions-panel em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lpw-text-soft, #5c6f84);
  font-size: 12px;
  font-style: normal;
}

#lpw-app .lpw-export-structure-note {
  border: 1px dashed var(--lpw-border, #d7e0ea);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--lpw-panel-soft, #f7fafd);
  color: var(--lpw-text-soft, #5c6f84);
  font-size: 12px;
  line-height: 1.45;
}

#lpw-app .lpw-modal-projects-compact {
  display: grid;
  gap: 10px;
}

#lpw-app .lpw-modal-projects-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 6px;
  background: var(--lpw-panel, #fff);
}

#lpw-app .lpw-modal-projects-tools input {
  min-height: 34px;
  border: 1px solid var(--lpw-border, #d7e0ea);
  border-radius: 10px;
  padding: 7px 10px;
  background: var(--lpw-panel-soft, #f7fafd);
  color: var(--lpw-text, #142133);
}

#lpw-app .lpw-modal-projects-tools span {
  color: var(--lpw-text-soft, #5c6f84);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#lpw-app .lpw-modal-project-list--compact {
  gap: 6px;
  max-height: min(62vh, 620px);
  overflow: auto;
  padding-right: 2px;
}

#lpw-app .lpw-modal-project-row--compact {
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--lpw-panel, #fff);
}

#lpw-app .lpw-modal-project-titleline {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

#lpw-app .lpw-modal-project-titleline strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

#lpw-app .lpw-modal-project-titleline span {
  flex: 0 0 auto;
  color: var(--lpw-text-soft, #5c6f84);
  font-size: 11px;
  font-weight: 800;
}

#lpw-app .lpw-modal-project-row--compact .lpw-modal-project-input {
  min-height: 32px;
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 12px;
}

#lpw-app .lpw-modal-inline-actions--compact {
  gap: 5px;
}

#lpw-app .lpw-modal-inline-actions--compact .lpw-button.small {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
}

#lpw-app .lpw-modal-object-list--compact {
  gap: 5px;
  margin-top: 4px;
  padding-top: 6px;
}

#lpw-app .lpw-modal-object-row--compact {
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 9px;
}

#lpw-app .lpw-modal-object-row--compact strong {
  font-size: 13px;
}

@media (max-width: 760px) {
  #lpw-app .lpw-db-actions-panel,
  #lpw-app .lpw-modal-project-row--compact,
  #lpw-app .lpw-modal-object-row--compact,
  #lpw-app .lpw-modal-projects-tools {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  #lpw-app .lpw-db-actions-panel {
    display: grid;
  }
  #lpw-app .lpw-modal-inline-actions--compact {
    justify-content: flex-start;
  }
}


/* v5.3.7: strict root frame, theme-aware context menus, collapsed tree and database icon tools */
#lpw-app .lpw-gis-root {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

#lpw-app .lpw-context-menu,
.lpw-context-menu {
  min-width: 210px;
  max-width: min(340px, calc(100vw - 24px));
  padding: 6px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--lpw-border, #d7e0ea) 84%, transparent);
  background: color-mix(in srgb, var(--lpw-panel, #fff) 94%, transparent);
  color: var(--lpw-text, #142133);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
}

#lpw-app .lpw-theme-win11-dark.lpw-context-menu,
#lpw-app .lpw-theme-forest-night.lpw-context-menu,
#lpw-app .lpw-theme-dark.lpw-context-menu,
.lpw-theme-win11-dark.lpw-context-menu,
.lpw-theme-forest-night.lpw-context-menu,
.lpw-theme-dark.lpw-context-menu {
  background: color-mix(in srgb, var(--lpw-panel, #161f2b) 92%, #020617 8%);
  border-color: color-mix(in srgb, var(--lpw-border, #2a3748) 82%, white 8%);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.38);
}

#lpw-app .lpw-context-menu button,
.lpw-context-menu button {
  width: 100%;
  min-height: 34px;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--lpw-text, #142133);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 650;
}

#lpw-app .lpw-context-menu button:hover,
.lpw-context-menu button:hover,
#lpw-app .lpw-context-menu button.is-primary:hover,
.lpw-context-menu button.is-primary:hover {
  background: var(--lpw-accent-soft, #eaf2ff);
  color: var(--lpw-text, #142133);
}

#lpw-app .lpw-theme-win11-dark.lpw-context-menu button:hover,
#lpw-app .lpw-theme-forest-night.lpw-context-menu button:hover,
#lpw-app .lpw-theme-dark.lpw-context-menu button:hover,
.lpw-theme-win11-dark.lpw-context-menu button:hover,
.lpw-theme-forest-night.lpw-context-menu button:hover,
.lpw-theme-dark.lpw-context-menu button:hover {
  color: var(--lpw-text, #e8eef7);
}

#lpw-app .lpw-context-menu button.is-danger,
.lpw-context-menu button.is-danger {
  color: var(--lpw-danger, #dc4c44);
}

#lpw-app .lpw-context-menu button:disabled,
.lpw-context-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}


#lpw-app .lpw-tree-toggle:hover,
.lpw-gis-root .lpw-tree-toggle:hover {
  background: var(--lpw-tree-node-hover, rgba(37, 99, 235, 0.10));
  color: var(--lpw-sidebar-text, #142133);
  border-color: color-mix(in srgb, var(--lpw-accent, #2563eb) 24%, var(--lpw-sidebar-border, #d7e0ea));
}

#lpw-app .lpw-theme-win11-dark .lpw-tree-toggle:hover,
#lpw-app .lpw-theme-forest-night .lpw-tree-toggle:hover,
#lpw-app .lpw-theme-dark .lpw-tree-toggle:hover {
  color: var(--lpw-sidebar-text, #f3f7fb);
}

#lpw-app .lpw-db-actions-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

#lpw-app .lpw-db-actions-info {
  min-width: 0;
}

#lpw-app .lpw-db-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#lpw-app .lpw-db-tool {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--lpw-border, #d7e0ea);
  background: var(--lpw-panel-soft, #f7fafd);
  color: var(--lpw-text, #142133);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}

#lpw-app .lpw-db-tool:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--lpw-accent, #2563eb) 34%, var(--lpw-border, #d7e0ea));
  background: var(--lpw-accent-soft, #eaf2ff);
}

#lpw-app .lpw-db-tool.is-primary {
  background: var(--lpw-accent, #2563eb);
  border-color: var(--lpw-accent, #2563eb);
  color: #fff;
}

#lpw-app .lpw-db-tool.is-primary:hover:not(:disabled) {
  color: #fff;
  background: color-mix(in srgb, var(--lpw-accent, #2563eb) 88%, #000 12%);
}

#lpw-app .lpw-db-tool:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#lpw-app .lpw-db-tool .lpw-icon,
#lpw-app .lpw-db-tool svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 760px) {
  #lpw-app .lpw-db-actions-panel {
    grid-template-columns: 1fr;
  }
  #lpw-app .lpw-db-action-buttons {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* v5.3.8: database export, compact fields and theme polish */
#lpw-app .lpw-theme-win11-dark.lpw-context-menu,
#lpw-app .lpw-theme-forest-night.lpw-context-menu,
#lpw-app .lpw-theme-neutral-slate.lpw-context-menu,
#lpw-app .lpw-theme-dark.lpw-context-menu,
.lpw-theme-win11-dark.lpw-context-menu,
.lpw-theme-forest-night.lpw-context-menu,
.lpw-theme-neutral-slate.lpw-context-menu,
.lpw-theme-dark.lpw-context-menu {
  color: var(--lpw-text, #e8eef7);
}
#lpw-app .lpw-theme-win11-dark.lpw-context-menu button,
#lpw-app .lpw-theme-forest-night.lpw-context-menu button,
#lpw-app .lpw-theme-dark.lpw-context-menu button,
.lpw-theme-win11-dark.lpw-context-menu button,
.lpw-theme-forest-night.lpw-context-menu button,
.lpw-theme-dark.lpw-context-menu button {
  color: var(--lpw-text, #e8eef7) !important;
}
#lpw-app .lpw-theme-win11-dark.lpw-context-menu button:hover,
#lpw-app .lpw-theme-forest-night.lpw-context-menu button:hover,
#lpw-app .lpw-theme-dark.lpw-context-menu button:hover,
.lpw-theme-win11-dark.lpw-context-menu button:hover,
.lpw-theme-forest-night.lpw-context-menu button:hover,
.lpw-theme-dark.lpw-context-menu button:hover {
  background: color-mix(in srgb, var(--lpw-accent, #5aa2ff) 22%, var(--lpw-panel-soft, #1b2633));
  color: #fff !important;
}
#lpw-app .lpw-theme-win11-dark.lpw-context-menu kbd,
#lpw-app .lpw-theme-forest-night.lpw-context-menu kbd,
#lpw-app .lpw-theme-dark.lpw-context-menu kbd,
.lpw-theme-win11-dark.lpw-context-menu kbd,
.lpw-theme-forest-night.lpw-context-menu kbd,
.lpw-theme-dark.lpw-context-menu kbd {
  color: var(--lpw-text-soft, #9caabc);
}

#lpw-app .lpw-db-actions-panel > .lpw-db-action-buttons,
#lpw-app .lpw-db-action-buttons {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}
#lpw-app .lpw-db-tool {
  flex: 0 0 auto;
}
#lpw-app .lpw-db-tool[title="Экспорт базы данных"] .lpw-icon--export svg {
  transform: rotate(180deg);
}

#lpw-app .lpw-gis-meta--view {
  padding: 12px;
}
#lpw-app .lpw-gis-meta--view .lpw-gis-toolbar {
  margin: 0;
}
#lpw-app .lpw-gis-meta--view .lpw-view-switcher {
  margin-top: 10px;
}

#lpw-app .lpw-field-picker-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 10px;
  color: var(--lpw-text-soft, #5c6f84);
  font-size: 12px;
}
#lpw-app .lpw-field-picker-tools span {
  margin-right: auto;
  font-weight: 750;
}
#lpw-app .lpw-field-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--lpw-border, #d7e0ea);
  border-radius: 14px;
  background: var(--lpw-panel-soft, #f7fafd);
  color: var(--lpw-text, #142133);
}
#lpw-app .lpw-field-picker-group {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}
#lpw-app .lpw-field-picker-group > strong {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 5px 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--lpw-panel, #fff) 92%, var(--lpw-accent-soft, #eaf2ff) 8%);
  color: var(--lpw-text, #142133);
  font-size: 11px;
  line-height: 1.2;
}
#lpw-app .lpw-checklist.lpw-checklist-compact,
#lpw-app .lpw-checklist {
  background: var(--lpw-panel-soft, #f7fafd);
  color: var(--lpw-text, #142133);
  border-color: var(--lpw-border, #d7e0ea);
}
#lpw-app .lpw-checkline {
  color: var(--lpw-text, #142133);
}
#lpw-app .lpw-field-picker .lpw-checkline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-height: 34px;
  padding: 6px 7px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--lpw-panel, #fff) 88%, transparent);
}
#lpw-app .lpw-field-picker .lpw-checkline:hover {
  background: var(--lpw-accent-soft, #eaf2ff);
}
#lpw-app .lpw-field-picker .lpw-checkline span {
  display: grid;
  gap: 1px;
  min-width: 0;
}
#lpw-app .lpw-field-picker .lpw-checkline b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lpw-text, #142133);
  font-size: 12px;
}
#lpw-app .lpw-field-picker .lpw-checkline small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lpw-text-soft, #5c6f84);
  font-size: 11px;
  line-height: 1.2;
}
#lpw-app .lpw-modal .lpw-field > label,
#lpw-app .lpw-modal label,
#lpw-app .lpw-modal-backdrop .lpw-field > label,
.lpw-modal .lpw-field > label,
.lpw-modal label {
  color: var(--lpw-text, #142133);
}
#lpw-app .lpw-theme-win11-dark .lpw-modal .lpw-field > label,
#lpw-app .lpw-theme-forest-night .lpw-modal .lpw-field > label,
#lpw-app .lpw-theme-dark .lpw-modal .lpw-field > label,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-field > label,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-field > label,
.lpw-modal-backdrop.lpw-theme-dark .lpw-field > label {
  color: var(--lpw-text, #e8eef7) !important;
}
#lpw-app .lpw-recode-form .lpw-recode-table {
  background: var(--lpw-panel, #fff);
  color: var(--lpw-text, #142133);
  border-color: var(--lpw-border, #d7e0ea);
}
#lpw-app .lpw-recode-head {
  background: color-mix(in srgb, var(--lpw-panel-soft, #f7fafd) 88%, var(--lpw-accent-soft, #eaf2ff) 12%);
  color: var(--lpw-text, #142133);
}
#lpw-app .lpw-recode-row {
  background: var(--lpw-panel, #fff);
  color: var(--lpw-text, #142133);
  border-top-color: var(--lpw-border, #d7e0ea);
}
#lpw-app .lpw-recode-row:hover {
  background: var(--lpw-panel-soft, #f7fafd);
}
#lpw-app .lpw-recode-row span {
  color: var(--lpw-text, #142133) !important;
}
#lpw-app .lpw-recode-row input {
  color: var(--lpw-text, #142133);
  background: var(--lpw-panel-soft, #f7fafd);
  border-color: var(--lpw-border, #d7e0ea);
}

#lpw-app .lpw-table--gis {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
#lpw-app .lpw-gis-table-wrap {
  overflow: auto;
}
#lpw-app .lpw-table--gis th,
#lpw-app .lpw-table--gis td {
  width: 1%;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#lpw-app .lpw-table--gis th[data-column-context],
#lpw-app .lpw-table--gis td[data-column-context] {
  min-width: 72px;
}
#lpw-app .lpw-table--gis .lpw-sticky-select {
  left: 0;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
}
#lpw-app .lpw-table--gis .lpw-sticky-actions {
  position: sticky;
  left: 40px;
  z-index: 4;
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  background: color-mix(in srgb, var(--lpw-panel, #fff) 95%, #fff 5%);
  box-shadow: 8px 0 12px rgba(15,23,42,.06);
}
#lpw-app .lpw-table--gis th.lpw-sticky-actions {
  z-index: 6;
}
#lpw-app .lpw-row-actions-button {
  width: 32px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 10px;
  justify-content: center;
  background: var(--lpw-panel-soft, #f7fafd);
  border: 1px solid var(--lpw-border, #d7e0ea);
  color: var(--lpw-text, #142133);
}
#lpw-app .lpw-row-actions-button:hover {
  background: var(--lpw-accent-soft, #eaf2ff);
  color: var(--lpw-accent, #2563eb);
  border-color: color-mix(in srgb, var(--lpw-accent, #2563eb) 34%, var(--lpw-border, #d7e0ea));
}
#lpw-app .lpw-row-actions-button svg {
  width: 17px;
  height: 17px;
}
@media (max-width: 760px) {
  #lpw-app .lpw-db-actions-panel > .lpw-db-action-buttons,
  #lpw-app .lpw-db-action-buttons {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  #lpw-app .lpw-field-picker {
    grid-template-columns: 1fr;
  }
}

/* v5.3.9: database table polish, no GIS toolbar in DB, stable themed selection */
#lpw-app .lpw-fill-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
#lpw-app .lpw-fill-toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}
#lpw-app .lpw-db-view-panel {
  padding: 10px 12px;
}
#lpw-app .lpw-db-view-panel .lpw-view-switcher,
#lpw-app .lpw-db-view-panel .lpw-active-filters {
  margin-top: 0;
}
#lpw-app .lpw-db-view-panel .lpw-active-filters {
  margin-top: 8px;
}
#lpw-app .lpw-db-actions-panel > .lpw-db-action-buttons,
#lpw-app .lpw-db-action-buttons {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
}
#lpw-app .lpw-db-action-buttons .lpw-db-tool {
  flex: 0 0 auto;
}
#lpw-app .lpw-db-action-buttons .lpw-db-tool[title="Вид полей"] {
  order: 1;
}
#lpw-app .lpw-db-action-buttons .lpw-db-tool[title="Перекодировка"] {
  order: 2;
}
#lpw-app .lpw-db-action-buttons .lpw-db-tool[title="Импорт базы"] {
  order: 3;
}
#lpw-app .lpw-db-action-buttons .lpw-db-tool[title="Экспорт базы данных"] {
  order: 4;
}
#lpw-app .lpw-gis-table-wrap {
  background: var(--lpw-panel, #fff);
}
#lpw-app .lpw-table--gis thead th,
#lpw-app .lpw-table--gis thead th.lpw-sticky-col,
#lpw-app .lpw-table--gis thead th.lpw-sticky-select,
#lpw-app .lpw-table--gis thead th.lpw-sticky-actions {
  background: var(--lpw-table-head, #e7f2ff) !important;
  color: var(--lpw-table-head-text, #16324f) !important;
  border-color: color-mix(in srgb, var(--lpw-table-head, #e7f2ff) 76%, var(--lpw-border, #d7e0ea) 24%) !important;
}
#lpw-app .lpw-table--gis thead th.lpw-sticky-select,
#lpw-app .lpw-table--gis thead th.lpw-sticky-actions {
  box-shadow: none;
}
#lpw-app .lpw-table--gis .lpw-table-filter-row th,
#lpw-app .lpw-table--gis .lpw-table-filter-row th.lpw-sticky-col,
#lpw-app .lpw-table--gis .lpw-table-filter-row th.lpw-sticky-select,
#lpw-app .lpw-table--gis .lpw-table-filter-row th.lpw-sticky-actions {
  background: color-mix(in srgb, var(--lpw-table-head, #e7f2ff) 68%, var(--lpw-panel, #fff) 32%) !important;
  color: var(--lpw-table-head-text, #16324f) !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-table--gis .lpw-table-filter-row th,
#lpw-app .lpw-theme-forest-night .lpw-table--gis .lpw-table-filter-row th,
#lpw-app .lpw-theme-dark .lpw-table--gis .lpw-table-filter-row th {
  background: color-mix(in srgb, var(--lpw-table-head, #1f3649) 82%, var(--lpw-panel, #161f2b) 18%) !important;
}
#lpw-app .lpw-table--gis tbody tr:hover > td {
  background: color-mix(in srgb, var(--lpw-accent-soft, #eaf2ff) 36%, var(--lpw-panel, #fff) 64%) !important;
  color: var(--lpw-text, #142133) !important;
}
#lpw-app .lpw-table--gis tbody tr.is-selected > td {
  background: color-mix(in srgb, var(--lpw-accent-soft, #eaf2ff) 48%, var(--lpw-panel, #fff) 52%) !important;
  color: var(--lpw-text, #142133) !important;
}
#lpw-app .lpw-table--gis tbody tr.is-active > td {
  background: color-mix(in srgb, var(--lpw-accent, #2563eb) 16%, var(--lpw-panel, #fff) 84%) !important;
  color: var(--lpw-text, #142133) !important;
  box-shadow: inset 3px 0 0 var(--lpw-accent, #2563eb);
}
#lpw-app .lpw-theme-win11-dark .lpw-table--gis tbody tr:hover > td,
#lpw-app .lpw-theme-forest-night .lpw-table--gis tbody tr:hover > td,
#lpw-app .lpw-theme-dark .lpw-table--gis tbody tr:hover > td {
  background: color-mix(in srgb, var(--lpw-accent-soft, rgba(102,168,255,.14)) 72%, var(--lpw-panel, #161f2b) 28%) !important;
  color: var(--lpw-text, #e8eef7) !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-table--gis tbody tr.is-selected > td,
#lpw-app .lpw-theme-forest-night .lpw-table--gis tbody tr.is-selected > td,
#lpw-app .lpw-theme-dark .lpw-table--gis tbody tr.is-selected > td {
  background: color-mix(in srgb, var(--lpw-accent-soft, rgba(102,168,255,.14)) 78%, var(--lpw-panel, #161f2b) 22%) !important;
  color: var(--lpw-text, #e8eef7) !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-table--gis tbody tr.is-active > td,
#lpw-app .lpw-theme-forest-night .lpw-table--gis tbody tr.is-active > td,
#lpw-app .lpw-theme-dark .lpw-table--gis tbody tr.is-active > td {
  background: color-mix(in srgb, var(--lpw-accent, #66a8ff) 20%, var(--lpw-panel, #161f2b) 80%) !important;
  color: var(--lpw-text, #e8eef7) !important;
  box-shadow: inset 3px 0 0 var(--lpw-accent, #66a8ff);
}
#lpw-app .lpw-table--gis tbody tr.has-error:not(.is-selected):not(.is-active) > td {
  background: color-mix(in srgb, var(--lpw-danger, #dc4c44) 7%, var(--lpw-panel, #fff) 93%);
}
#lpw-app .lpw-table--gis .lpw-sticky-select {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
}
#lpw-app .lpw-table--gis .lpw-sticky-actions {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
}
#lpw-app .lpw-row-actions-button {
  min-width: 50px !important;
  width: 50px !important;
  max-width: 50px !important;
  height: 30px;
  min-height: 30px;
  padding: 0;
}
#lpw-app .lpw-table--gis tbody tr.is-selected .lpw-row-actions-button,
#lpw-app .lpw-table--gis tbody tr.is-active .lpw-row-actions-button,
#lpw-app .lpw-table--gis tbody tr:hover .lpw-row-actions-button {
  background: color-mix(in srgb, var(--lpw-panel, #fff) 72%, var(--lpw-accent-soft, #eaf2ff) 28%);
  color: var(--lpw-accent, #2563eb);
  border-color: color-mix(in srgb, var(--lpw-accent, #2563eb) 38%, var(--lpw-border, #d7e0ea));
}
#lpw-app .lpw-theme-win11-dark .lpw-table--gis tbody tr.is-selected .lpw-row-actions-button,
#lpw-app .lpw-theme-win11-dark .lpw-table--gis tbody tr.is-active .lpw-row-actions-button,
#lpw-app .lpw-theme-win11-dark .lpw-table--gis tbody tr:hover .lpw-row-actions-button,
#lpw-app .lpw-theme-forest-night .lpw-table--gis tbody tr.is-selected .lpw-row-actions-button,
#lpw-app .lpw-theme-forest-night .lpw-table--gis tbody tr.is-active .lpw-row-actions-button,
#lpw-app .lpw-theme-forest-night .lpw-table--gis tbody tr:hover .lpw-row-actions-button,
#lpw-app .lpw-theme-dark .lpw-table--gis tbody tr.is-selected .lpw-row-actions-button,
#lpw-app .lpw-theme-dark .lpw-table--gis tbody tr.is-active .lpw-row-actions-button,
#lpw-app .lpw-theme-dark .lpw-table--gis tbody tr:hover .lpw-row-actions-button {
  background: color-mix(in srgb, var(--lpw-panel-soft, #1b2633) 76%, var(--lpw-accent-soft, rgba(102,168,255,.14)) 24%);
  color: var(--lpw-text, #e8eef7);
}
@media (max-width: 760px) {
  #lpw-app .lpw-db-actions-panel > .lpw-db-action-buttons,
  #lpw-app .lpw-db-action-buttons {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  #lpw-app .lpw-fill-toolbar-actions {
    margin-left: 0;
  }
}

/* v5.4.0: набивка перенесена в базу данных, модальное создание БД */
#lpw-app .lpw-db-actions-panel {
  border: 1px solid color-mix(in srgb, var(--lpw-accent, #2563eb) 22%, var(--lpw-border, #d7e0ea) 78%);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--lpw-panel, #fff) 84%, var(--lpw-accent-soft, #eaf2ff) 16%) 0%,
    var(--lpw-panel, #fff) 100%);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
#lpw-app .lpw-theme-win11-dark .lpw-db-actions-panel,
#lpw-app .lpw-theme-forest-night .lpw-db-actions-panel,
#lpw-app .lpw-theme-dark .lpw-db-actions-panel {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--lpw-panel, #161f2b) 82%, var(--lpw-accent-soft, rgba(102,168,255,.16)) 18%) 0%,
    var(--lpw-panel, #161f2b) 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}
#lpw-app .lpw-db-action-buttons {
  padding: 5px;
  border: 1px solid var(--lpw-border, #d7e0ea);
  border-radius: 14px;
  background: color-mix(in srgb, var(--lpw-panel-soft, #f7fafd) 88%, var(--lpw-panel, #fff) 12%);
}
#lpw-app .lpw-theme-win11-dark .lpw-db-action-buttons,
#lpw-app .lpw-theme-forest-night .lpw-db-action-buttons,
#lpw-app .lpw-theme-dark .lpw-db-action-buttons {
  background: color-mix(in srgb, var(--lpw-panel-soft, #1b2633) 88%, #000 12%);
}
#lpw-app .lpw-db-action-buttons .lpw-db-tool[title="Вид полей"] { order: 1; }
#lpw-app .lpw-db-action-buttons .lpw-db-tool[title="Набивка базы"],
#lpw-app .lpw-db-action-buttons .lpw-db-tool[title="Создать базу набивкой"] { order: 2; }
#lpw-app .lpw-db-action-buttons .lpw-db-tool[title="Перекодировка"] { order: 3; }
#lpw-app .lpw-db-action-buttons .lpw-db-tool[title="Импорт базы"] { order: 4; }
#lpw-app .lpw-db-action-buttons .lpw-db-tool[title="Экспорт базы данных"] { order: 5; }

#lpw-app .lpw-modal--fill {
  width: min(98vw, 1780px);
  max-height: 94vh;
}
#lpw-app .lpw-modal--fill .lpw-modal-body {
  padding: 12px;
  overflow: hidden;
}
#lpw-app .lpw-fill-modal-shell {
  display: grid;
  gap: 10px;
  min-width: 0;
}
#lpw-app .lpw-fill-modal-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(360px, 540px) auto;
  align-items: end;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--lpw-border, #d7e0ea);
  border-radius: 16px;
  background: var(--lpw-panel-soft, #f7fafd);
  color: var(--lpw-text, #142133);
}
#lpw-app .lpw-fill-modal-address {
  display: grid;
  gap: 2px;
  min-width: 0;
}
#lpw-app .lpw-fill-modal-address span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lpw-text-soft, #5c6f84);
  font-size: 12px;
}
#lpw-app .lpw-fill-modal-address strong {
  color: var(--lpw-text, #142133);
  font-size: 14px;
}
#lpw-app .lpw-fill-modal-locators {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
#lpw-app .lpw-fill-modal-locators .lpw-field,
#lpw-app .lpw-fill-modal-locators label {
  margin: 0;
}
#lpw-app .lpw-fill-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}
#lpw-app .lpw-fill-modal-card .lpw-compact-card-viewport {
  border-radius: 14px;
  margin: 0;
}
#lpw-app .lpw-ref-value-label {
  display: block;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lpw-text-soft, #5c6f84);
  font-size: 9px;
  line-height: 1.1;
  font-weight: 700;
}
#lpw-app .lpw-cc-cell .lpw-ref-value-label,
#lpw-app .lpw-cc-stand-table .lpw-ref-value-label,
#lpw-app .lpw-cc-extra-table .lpw-ref-value-label {
  color: #334155;
}
#lpw-app .lpw-theme-win11-dark .lpw-ref-value-label,
#lpw-app .lpw-theme-forest-night .lpw-ref-value-label,
#lpw-app .lpw-theme-dark .lpw-ref-value-label {
  color: var(--lpw-text-soft, #9caabc);
}
#lpw-app .lpw-modal--fill .lpw-cc-cell input,
#lpw-app .lpw-modal--fill .lpw-kt-mini-input {
  min-height: 22px;
}
@media (max-width: 980px) {
  #lpw-app .lpw-fill-modal-toolbar {
    grid-template-columns: 1fr;
  }
  #lpw-app .lpw-fill-modal-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* v5.4.1: модалка набивки без масштабирования, лишних адресных блоков и с более плотной карточкой */
#lpw-app .lpw-modal--fill {
  width: min(96vw, 1500px);
  max-height: 94vh;
}
#lpw-app .lpw-modal--fill .lpw-modal-body {
  padding: 10px;
}
#lpw-app .lpw-fill-modal-toolbar {
  grid-template-columns: minmax(320px, 520px) auto;
  align-items: end;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}
#lpw-app .lpw-fill-modal-locators select,
#lpw-app .lpw-fill-modal-locators input {
  min-height: 34px;
}
#lpw-app .lpw-fill-modal-locators select {
  appearance: auto;
  cursor: pointer;
}
#lpw-app .lpw-compact-card-viewport.is-fill-modal {
  height: auto;
  overflow: visible;
  border-radius: 10px;
  background: #d9dde4;
}
#lpw-app .lpw-compact-card-viewport.is-fill-modal .lpw-compact-card-sheet {
  width: 100%;
  min-height: 0;
  transform: none;
  padding: 8px;
}
#lpw-app .lpw-cc-top-grid--no-address {
  grid-template-columns: minmax(210px, .7fr) minmax(0, 1.8fr);
  gap: 8px;
  margin-bottom: 8px;
}
#lpw-app .lpw-modal--fill .lpw-cc-cell {
  min-height: 36px;
}
#lpw-app .lpw-modal--fill .lpw-cc-cell span {
  padding: 2px 4px;
  font-size: 9px;
  line-height: 1.05;
}
#lpw-app .lpw-modal--fill .lpw-cc-cell input,
#lpw-app .lpw-modal--fill .lpw-cc-cell select,
#lpw-app .lpw-modal--fill .lpw-kt-mini-input {
  min-height: 24px;
  padding: 2px 4px;
  font-size: 11px;
}
#lpw-app .lpw-modal--fill .lpw-cc-block,
#lpw-app .lpw-modal--fill .lpw-cc-main-head,
#lpw-app .lpw-modal--fill .lpw-cc-lower-grid,
#lpw-app .lpw-modal--fill .lpw-cc-slope-row,
#lpw-app .lpw-modal--fill .lpw-cc-extra-table,
#lpw-app .lpw-modal--fill .lpw-cc-stand-table {
  font-size: 10px;
}
#lpw-app .lpw-modal--fill .lpw-cc-stand-table th,
#lpw-app .lpw-modal--fill .lpw-cc-stand-table td,
#lpw-app .lpw-modal--fill .lpw-cc-extra-table th,
#lpw-app .lpw-modal--fill .lpw-cc-extra-table td {
  padding: 1px 2px;
}
#lpw-app .lpw-modal--fill .lpw-ref-value-label {
  margin-top: 1px;
  font-size: 8px;
}
#lpw-app .lpw-icon--fill-form svg,
#lpw-app .lpw-icon--recode svg {
  width: 20px;
  height: 20px;
}
@media (max-width: 1280px) {
  #lpw-app .lpw-modal--fill { width: 98vw; }
  #lpw-app .lpw-cc-top-grid--no-address { grid-template-columns: 1fr; }
  #lpw-app .lpw-fill-modal-toolbar { grid-template-columns: 1fr; }
  #lpw-app .lpw-fill-modal-actions { justify-content: flex-start; }
}

/* v5.4.2: набивка — справочники внутри выпадающих списков, горизонтальный подрост и защита UX */
#lpw-app .lpw-modal--fill .lpw-ref-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
  cursor: pointer;
  padding-right: 18px !important;
}
#lpw-app .lpw-modal--fill .lpw-ref-select:hover,
#lpw-app .lpw-modal--fill .lpw-ref-select:focus {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
#lpw-app .lpw-modal--fill .lpw-ref-value-label {
  display: none !important;
}
#lpw-app .lpw-cc-cols-10 {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}
#lpw-app .lpw-modal--fill .lpw-cc-lower-grid--horizontal {
  grid-template-columns: minmax(0, 1.9fr) minmax(220px, .7fr);
  align-items: stretch;
  gap: 8px;
}
#lpw-app .lpw-modal--fill .lpw-cc-lower-grid--horizontal .lpw-cc-block {
  min-width: 0;
}
#lpw-app .lpw-modal--fill .lpw-cc-lower-grid--horizontal .lpw-cc-cell {
  min-width: 0;
}
#lpw-app .lpw-modal--fill .lpw-cc-lower-grid--horizontal .lpw-cc-cell span {
  white-space: nowrap;
}
#lpw-app .lpw-modal--fill input[type="number"][data-card-field^="Kf"] {
  text-align: center;
}

/* v5.4.3: набивка — контраст темных тем, отмена изменений и спокойный dirty-state */
#lpw-app .lpw-fill-modal-actions {
  flex-wrap: wrap;
}
#lpw-app .lpw-fill-modal-actions .lpw-button,
#lpw-app .lpw-card-top-actions .lpw-button {
  white-space: nowrap;
}

#lpw-app .lpw-theme-win11-dark .lpw-modal--fill,
#lpw-app .lpw-theme-dark .lpw-modal--fill,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill {
  background: #111a27;
  color: #eef5ff;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal {
  background: #0b1220;
  border-color: #4f6f92;
  box-shadow: inset 0 0 0 1px rgba(102,168,255,.18), 0 16px 38px rgba(0,0,0,.34);
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-compact-card-sheet,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-compact-card-sheet,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-compact-card-sheet,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-compact-card-sheet {
  background: #0f1726;
  color: #eef5ff;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-cell,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-cell {
  background: #213247;
  border-color: #6280a3;
  color: #f8fbff;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell span,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table th,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table th,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-cell span,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table th,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table th,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell span,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table th,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table th,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-cell span,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table th,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table th {
  background: #2e83b9;
  border-color: #6280a3;
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0,0,0,.24);
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell input,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell select,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-kt-mini-input,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-cell input,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-cell select,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-kt-mini-input,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell input,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell select,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-kt-mini-input,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-cell input,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-cell select,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-kt-mini-input {
  background: #f4f9ff;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(98,128,163,.38);
  color-scheme: light;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell input:focus,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell select:focus,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-kt-mini-input:focus,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-cell input:focus,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-cell select:focus,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-kt-mini-input:focus,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell input:focus,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell select:focus,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-kt-mini-input:focus,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-cell input:focus,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-cell select:focus,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-kt-mini-input:focus {
  outline: 2px solid #8cc3ff;
  box-shadow: inset 0 0 0 1px #2f7fbd, 0 0 0 2px rgba(140,195,255,.25);
}

#lpw-app .lpw-theme-forest-night .lpw-modal--fill,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill {
  background: #0d1b15;
  color: #ecfff3;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal {
  background: #07120e;
  border-color: #5b9878;
  box-shadow: inset 0 0 0 1px rgba(125,211,168,.18), 0 16px 38px rgba(0,0,0,.34);
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-compact-card-sheet,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-compact-card-sheet {
  background: #0b1812;
  color: #ecfff3;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell {
  background: #1b3328;
  border-color: #67a583;
  color: #f2fff7;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell span,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table th,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table th,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell span,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table th,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table th {
  background: #22845d;
  border-color: #67a583;
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0,0,0,.22);
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell input,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell select,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-kt-mini-input,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell input,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell select,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-kt-mini-input {
  background: #f2fff7;
  color: #092016;
  box-shadow: inset 0 0 0 1px rgba(91,152,120,.42);
  color-scheme: light;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell input:focus,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell select:focus,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-kt-mini-input:focus,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell input:focus,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell select:focus,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-kt-mini-input:focus {
  outline: 2px solid #9cf0c2;
  box-shadow: inset 0 0 0 1px #22845d, 0 0 0 2px rgba(156,240,194,.22);
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table {
  background: #1b2b3e;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table td,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table td,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table td,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table td,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table td,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table td,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table td,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table td {
  border-color: #6280a3;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table {
  background: #162a20;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table td,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table td,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table td,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table td {
  border-color: #67a583;
}

.lpw-fill-validation-panel {
    margin: 10px 0 12px;
    border: 1px solid color-mix(in srgb, var(--lpw-border, #dbe3ef) 80%, transparent);
    border-radius: 16px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--lpw-panel, #fff) 92%, var(--lpw-accent, #2563eb) 8%);
    color: var(--lpw-text, #102033);
    font-size: 13px;
}

.lpw-fill-validation-panel.is-idle {
    color: var(--lpw-muted, #667085);
}

.lpw-fill-validation-panel.is-ok {
    border-color: rgba(22, 163, 74, .35);
    background: rgba(22, 163, 74, .08);
}

.lpw-fill-validation-panel.has-error {
    border-color: rgba(220, 38, 38, .45);
    background: rgba(220, 38, 38, .08);
}

.lpw-fill-validation-panel.has-warning {
    border-color: rgba(245, 158, 11, .45);
    background: rgba(245, 158, 11, .1);
}

.lpw-fill-validation-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.lpw-fill-validation-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 6px;
}

.lpw-fill-validation-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    border: 1px solid color-mix(in srgb, var(--lpw-border, #dbe3ef) 80%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--lpw-panel, #fff) 94%, transparent);
    color: inherit;
    padding: 7px 9px;
    text-align: left;
    cursor: pointer;
}

.lpw-fill-validation-item strong {
    font-size: 12px;
}

.lpw-fill-validation-item span {
    font-size: 12px;
    line-height: 1.25;
}

.lpw-fill-validation-item.is-error {
    border-color: rgba(220, 38, 38, .45);
}

.lpw-fill-validation-item.is-warning {
    border-color: rgba(245, 158, 11, .45);
}

input.is-fill-error,
select.is-fill-error,
textarea.is-fill-error,
.lpw-cc-cell.is-fill-error input,
.lpw-card-field.is-fill-error input,
.lpw-card-field.is-fill-error select,
.lpw-card-field.is-fill-error textarea {
    border-color: rgba(220, 38, 38, .75) !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, .14) !important;
}

input.is-fill-warning,
select.is-fill-warning,
textarea.is-fill-warning,
.lpw-cc-cell.is-fill-warning input,
.lpw-card-field.is-fill-warning input,
.lpw-card-field.is-fill-warning select,
.lpw-card-field.is-fill-warning textarea {
    border-color: rgba(245, 158, 11, .75) !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, .14) !important;
}


/* v5.4.7: dynamic MDS rows in the tax card */
.lpw-cc-mds-table .lpw-cc-maket-title { min-width: 150px; }
.lpw-cc-mds-table .lpw-cc-maket-title > span { display: block; margin-top: 3px; font-size: 10px; line-height: 1.2; opacity: .72; }
.lpw-mds-field-caption { display: block; margin-bottom: 2px; font-size: 9px; line-height: 1.15; opacity: .74; max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpw-cc-mds-hint { display: block; margin-top: 2px; font-size: 9px; line-height: 1.15; opacity: .6; font-style: normal; }
.lpw-cc-mds-table tr.is-empty-next td { background: rgba(126, 145, 177, .08); }
.lpw-cc-mds-table select.lpw-kt-mini-input,
.lpw-cc-mds-table select.lpw-ref-select { min-width: 64px; }

.lpw-fill-validation-panel.is-silent{display:none;}


/* v5.4.9: карточка таксации — динамические расчетные поля, модальные сообщения и контраст темных тем */
#lpw-app .lpw-cc-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
#lpw-app .lpw-message-modal-backdrop { z-index: 10050; }
#lpw-app .lpw-message-modal { max-width: 520px; }
#lpw-app .lpw-message-modal-text { font-size: 14px; line-height: 1.45; color: var(--lpw-text, #102033); }
#lpw-app .lpw-message-modal.is-success .lpw-modal-head { border-bottom-color: rgba(22,163,74,.28); }
#lpw-app .lpw-message-modal.is-warning .lpw-modal-head { border-bottom-color: rgba(245,158,11,.35); }
#lpw-app .lpw-modal--fill input[readonly],
#lpw-app .lpw-modal--fill select[readonly] { cursor: default; background-image: none !important; }

#lpw-app .lpw-modal--fill input.is-fill-error,
#lpw-app .lpw-modal--fill select.is-fill-error,
#lpw-app .lpw-modal--fill textarea.is-fill-error,
#lpw-app .lpw-modal--fill .lpw-cc-cell.is-fill-error input,
#lpw-app .lpw-modal--fill .lpw-card-field.is-fill-error input,
#lpw-app .lpw-modal--fill .lpw-card-field.is-fill-error select,
#lpw-app .lpw-modal--fill .lpw-card-field.is-fill-error textarea {
  background: #fee2e2 !important;
  color: #7f1d1d !important;
  border-color: transparent !important;
  box-shadow: inset 0 0 0 2px rgba(220,38,38,.46) !important;
}
#lpw-app .lpw-modal--fill input.is-fill-warning,
#lpw-app .lpw-modal--fill select.is-fill-warning,
#lpw-app .lpw-modal--fill textarea.is-fill-warning,
#lpw-app .lpw-modal--fill .lpw-cc-cell.is-fill-warning input,
#lpw-app .lpw-modal--fill .lpw-card-field.is-fill-warning input,
#lpw-app .lpw-modal--fill .lpw-card-field.is-fill-warning select,
#lpw-app .lpw-modal--fill .lpw-card-field.is-fill-warning textarea {
  background: #fef3c7 !important;
  color: #78350f !important;
  border-color: transparent !important;
  box-shadow: inset 0 0 0 2px rgba(245,158,11,.48) !important;
}

#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-compact-card-sheet,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-compact-card-sheet,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-compact-card-sheet,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-compact-card-sheet {
  background: #d9dde4 !important;
  color: #0f172a !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell {
  background: #bdd7ee !important;
  border-color: #2b313b !important;
  color: #0f172a !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell span,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table th,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table th,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell span,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table th,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table th,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell span,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table th,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table th,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell span,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table th,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table th {
  background: #22b7ee !important;
  border-color: #2b313b !important;
  color: #06111f !important;
  text-shadow: none !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell input,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell select,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-kt-mini-input,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell input,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell select,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-kt-mini-input,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell input,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell select,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-kt-mini-input,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell input,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell select,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-kt-mini-input {
  background: #f8fbff !important;
  color: #0f172a !important;
  box-shadow: inset 0 0 0 1px rgba(43,49,59,.22) !important;
  color-scheme: light !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table {
  background: #dbe7f3 !important;
  color: #0f172a !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table td,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table td,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table td,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table td,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table td,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table td,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table td,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table td {
  border-color: #2b313b !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-maket-title,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-maket-title,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-maket-title,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-maket-title {
  background: #c6e0b4 !important;
  color: #102033 !important;
}



/* v5.4.10: карточка таксации — темные темы снова в палитре темы, без белой таблицы */
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal {
  background: #0b1220 !important;
  border-color: rgba(102,168,255,.30) !important;
  box-shadow: inset 0 0 0 1px rgba(102,168,255,.12), 0 16px 38px rgba(0,0,0,.34) !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-compact-card-sheet,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-compact-card-sheet,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-compact-card-sheet,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-compact-card-sheet {
  background: #101927 !important;
  color: #eef5ff !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-cell,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-cell {
  background: #182437 !important;
  border-color: rgba(120,154,190,.58) !important;
  color: #eef5ff !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell span,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table th,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table th,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-cell span,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table th,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table th,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell span,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table th,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table th,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-cell span,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table th,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table th {
  background: #1f5f8f !important;
  border-color: rgba(120,154,190,.58) !important;
  color: #f7fbff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.25) !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell input,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell select,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-kt-mini-input,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-cell input,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-cell select,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-kt-mini-input,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell input,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-cell select,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-kt-mini-input,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-cell input,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-cell select,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-kt-mini-input {
  background: #142033 !important;
  color: #f5f9ff !important;
  box-shadow: inset 0 0 0 1px rgba(120,154,190,.35) !important;
  color-scheme: dark !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table {
  background: #132033 !important;
  color: #eef5ff !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table td,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table td,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table td,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table td,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-stand-table td,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-extra-table td,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-stand-table td,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-extra-table td {
  border-color: rgba(120,154,190,.58) !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-maket-title,
#lpw-app .lpw-theme-dark .lpw-modal--fill .lpw-cc-maket-title,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill .lpw-cc-maket-title,
.lpw-modal-backdrop.lpw-theme-dark .lpw-modal--fill .lpw-cc-maket-title {
  background: #173d31 !important;
  color: #dff7ec !important;
}

/* Forest Night — тот же табличный каркас, но в зелёной гамме */
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-compact-card-viewport.is-fill-modal {
  background: #07120e !important;
  border-color: rgba(125,211,168,.28) !important;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-compact-card-sheet,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-compact-card-sheet {
  background: #0c1913 !important;
  color: #ecfff3 !important;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell {
  background: #13271e !important;
  border-color: rgba(125,211,168,.50) !important;
  color: #ecfff3 !important;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell span,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table th,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table th,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell span,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table th,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table th {
  background: #1d6b4d !important;
  border-color: rgba(125,211,168,.50) !important;
  color: #f5fff8 !important;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell input,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell select,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-kt-mini-input,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell input,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-cell select,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-kt-mini-input {
  background: #0f2018 !important;
  color: #f0fff6 !important;
  box-shadow: inset 0 0 0 1px rgba(125,211,168,.30) !important;
  color-scheme: dark !important;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-stand-table,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-extra-table {
  background: #0f2018 !important;
  color: #ecfff3 !important;
}
#lpw-app .lpw-theme-forest-night .lpw-modal--fill .lpw-cc-maket-title,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill .lpw-cc-maket-title {
  background: #173d31 !important;
  color: #dff7ec !important;
}

/* Ошибки внутри ячеек остаются заметными в темных темах, но не выбиваются белыми блоками */
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill input.is-fill-error,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill select.is-fill-error,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill input.is-fill-error,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill select.is-fill-error,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill input.is-fill-error,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill select.is-fill-error,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill input.is-fill-error,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill select.is-fill-error {
  background: #4a1f25 !important;
  color: #ffe4e6 !important;
  box-shadow: inset 0 0 0 2px rgba(248,113,113,.62) !important;
}
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill input.is-fill-warning,
#lpw-app .lpw-theme-win11-dark .lpw-modal--fill select.is-fill-warning,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill input.is-fill-warning,
#lpw-app .lpw-theme-forest-night .lpw-modal--fill select.is-fill-warning,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill input.is-fill-warning,
.lpw-modal-backdrop.lpw-theme-win11-dark .lpw-modal--fill select.is-fill-warning,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill input.is-fill-warning,
.lpw-modal-backdrop.lpw-theme-forest-night .lpw-modal--fill select.is-fill-warning {
  background: #4a3615 !important;
  color: #ffefc0 !important;
  box-shadow: inset 0 0 0 2px rgba(251,191,36,.58) !important;
}
