:root {
    --lp-bg: #f3f6fb;
    --lp-surface: #ffffff;
    --lp-surface-alt: #eef4ff;
    --lp-text: #102038;
    --lp-muted: #5e6c84;
    --lp-border: #d9e4f2;
    --lp-accent: #2563eb;
    --lp-accent-dark: #1d4ed8;
    --lp-success: #0f9d76;
    --lp-warning: #d97706;
    --lp-danger: #dc2626;
    --lp-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    --lp-radius: 20px;
}

* {
    box-sizing: border-box;
}

.lp-shell {
    color: var(--lp-text);
    font-family: "Inter", "Segoe UI", sans-serif;
}

.lp-shell h1,
.lp-shell h2,
.lp-shell h3,
.lp-shell strong {
    letter-spacing: -0.02em;
}

.lp-public-shell,
.lp-auth-shell,
.lp-portal-shell {
    padding: 0;
}

.lp-public-grid,
.lp-layout {
    display: grid;
    gap: 24px;
}

.lp-public-grid {
    max-width: 100%;
    margin: 0 auto;
    grid-template-columns: minmax(280px, 0.95fr) minmax(420px, 1.05fr);
    padding: 0 24px;
}

.lp-auth-wrap,
.lp-portal-shell {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.lp-public-shell .lp-auth-wrap {
    max-width: 100%;
}

.lp-portal-frame {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    min-width: 0;
}

.lp-portal-sidebar {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 20px;
    padding: 22px 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(217, 228, 242, 0.8);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow);
    backdrop-filter: blur(12px);
}

.lp-portal-sidebar-top h2,
.lp-portal-sidebar-top p {
    margin: 0;
}

.lp-portal-sidebar-top p {
    margin-top: 6px;
    color: var(--lp-muted);
}

.lp-portal-nav,
.lp-portal-main,
.lp-portal-sidebar-foot {
    display: grid;
    gap: 10px;
}

.lp-portal-main,
.lp-layout,
.lp-stack,
.lp-panel,
.lp-card-list,
.lp-file-list,
.lp-messenger {
    min-width: 0;
}

.lp-portal-nav a,
.lp-portal-utility-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--lp-text);
    background: rgba(248, 251, 255, 0.7);
    border: 1px solid rgba(217, 228, 242, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.lp-portal-nav a:hover,
.lp-portal-utility-link:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.lp-portal-nav a.is-active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(29, 78, 216, 0.06));
    border-color: rgba(37, 99, 235, 0.32);
    color: var(--lp-accent-dark);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--lp-accent);
}

.lp-portal-utility-link {
    color: var(--lp-muted);
}

.lp-public-panel,
.lp-panel,
.lp-stat-card,
.lp-card,
.lp-task-card,
.lp-board-column,
.lp-file-row {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(217, 228, 242, 0.8);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow);
    backdrop-filter: blur(12px);
}

.lp-public-panel,
.lp-panel {
    padding: 24px;
}

.lp-public-hero {
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.98), rgba(15, 118, 110, 0.92)),
        #1d4ed8;
    color: #fff;
}

.lp-badge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.lp-hero-metrics,
.lp-stat-row,
.lp-meta-row,
.lp-money-grid,
.lp-card-actions,
.lp-message-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.lp-hero-metrics {
    margin-top: 24px;
}

.lp-hero-metrics div,
.lp-stat-card {
    min-width: 110px;
}

.lp-hero-metrics strong,
.lp-stat-card strong {
    display: block;
    font-size: 30px;
}

.lp-hero-metrics span,
.lp-stat-card span {
    color: inherit;
    opacity: 0.86;
}

.lp-stepper,
.lp-tab-head {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.lp-stepper > div,
.lp-tab-trigger {
    border-radius: 999px;
    padding: 10px 14px;
    border: 1px solid var(--lp-border);
    background: #fff;
    color: var(--lp-muted);
    font-weight: 600;
}

.lp-stepper .is-active,
.lp-tab-trigger.is-active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--lp-accent);
    border-color: rgba(37, 99, 235, 0.2);
}

.lp-tab-trigger {
    appearance: none;
    cursor: pointer;
}

.lp-tab-panel {
    display: none;
}

.lp-tab-panel.is-active {
    display: block;
}

.lp-form,
.lp-stack {
    display: grid;
    gap: 16px;
}

.lp-form-stage-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

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

.lp-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lp-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lp-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lp-form label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.lp-form label span {
    font-size: 13px;
    color: var(--lp-muted);
}

.lp-inline-check {
    display: flex !important;
    align-items: start;
    gap: 10px;
    font-weight: 600;
}

.lp-inline-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.lp-form-message {
    min-height: 18px;
    margin: 0;
    font-size: 13px;
    color: var(--lp-muted);
}

.lp-form input,
.lp-form select,
.lp-form textarea {
    max-width: 100%;
    border-radius: 14px;
    border: 1px solid var(--lp-border);
    background: #fff;
    color: var(--lp-text);
    padding: 14px 16px;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.lp-form input:focus,
.lp-form select:focus,
.lp-form textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.lp-honeypot {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.lp-captcha-field {
    display: grid;
    gap: 10px;
}

.lp-captcha-field > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--lp-muted);
}

.lp-captcha-widget {
    min-height: 65px;
}

.lp-captcha-note {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(239, 246, 255, 0.92);
    color: var(--lp-accent-dark);
    font-size: 13px;
    line-height: 1.45;
}

.lp-captcha-error {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.22);
    background: rgba(254, 242, 242, 0.9);
    color: #991b1b;
    font-size: 13px;
    line-height: 1.45;
}

.lp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    text-decoration: none;
}

.lp-button:hover {
    transform: translateY(-1px);
}

.lp-button.primary {
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-dark));
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.lp-button.muted {
    background: #eef4ff;
    color: var(--lp-text);
}

.lp-button.small {
    padding: 10px 12px;
    font-size: 13px;
}

.lp-form-message {
    min-height: 18px;
    margin: 0;
    font-size: 13px;
    color: var(--lp-muted);
}

.lp-form-message.is-error {
    color: var(--lp-danger);
}

.lp-form-message.is-success {
    color: var(--lp-success);
}

.is-hidden {
    display: none !important;
}

.lp-recovery-panel {
    border-radius: 18px;
    padding: 20px;
    background: #f8fbff;
    border: 1px dashed rgba(37, 99, 235, 0.28);
}

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

.lp-recovery-list code {
    display: block;
    border-radius: 12px;
    padding: 10px 12px;
    background: #0f172a;
    color: #fff;
}

.lp-topbar {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 24px;
    margin-bottom: 22px;
}

.lp-stat-row {
    margin-bottom: 22px;
}

.lp-stat-card {
    padding: 18px;
}

.lp-layout.two-thirds {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
}

.lp-layout.split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lp-table-wrap {
    overflow-x: auto;
}

.lp-data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
}

.lp-data-table th,
.lp-data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(217, 228, 242, 0.9);
    text-align: left;
    vertical-align: top;
}

.lp-data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(248, 251, 255, 0.96);
    color: var(--lp-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.lp-data-table tbody tr:last-child td {
    border-bottom: 0;
}

.lp-data-table tbody tr.is-selected {
    background: rgba(37, 99, 235, 0.05);
}

.lp-data-table.compact {
    min-width: 0;
}

.lp-data-table.compact th,
.lp-data-table.compact td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.lp-table-note {
    display: block;
    margin-top: 6px;
    color: var(--lp-muted);
    font-size: 13px;
    font-weight: 500;
}

.lp-table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lp-project-workspace {
    gap: 20px;
}

.lp-project-workspace-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.lp-subnav {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 18px;
}

.lp-subnav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(217, 228, 242, 0.9);
    background: rgba(248, 251, 255, 0.9);
    color: var(--lp-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.lp-subnav a:hover {
    border-color: rgba(37, 99, 235, 0.24);
    color: var(--lp-text);
}

.lp-subnav a.is-active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(29, 78, 216, 0.06));
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--lp-accent-dark);
}

.lp-chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lp-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(217, 228, 242, 0.9);
    background: rgba(248, 251, 255, 0.9);
    color: var(--lp-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.lp-chip:hover {
    border-color: rgba(37, 99, 235, 0.24);
    color: var(--lp-text);
}

.lp-chip.is-active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(29, 78, 216, 0.06));
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--lp-accent-dark);
}

.lp-project-hero {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(238, 244, 255, 0.82));
    border: 1px solid rgba(217, 228, 242, 0.92);
    margin-bottom: 18px;
}

.lp-project-hero-grid,
.lp-kv-grid {
    display: grid;
    gap: 12px;
}

.lp-project-hero-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lp-metric-tile {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(217, 228, 242, 0.92);
}

.lp-metric-tile span,
.lp-kv-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--lp-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.lp-metric-tile strong {
    font-size: 20px;
}

.lp-kv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lp-kv-grid > div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(217, 228, 242, 0.92);
}

.lp-kv-grid strong {
    display: block;
    line-height: 1.45;
}

.lp-line-item-list {
    display: grid;
    gap: 14px;
}

.lp-line-item-row {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(217, 228, 242, 0.92);
}

.lp-line-item-row .lp-table-actions {
    margin-top: 12px;
}

.lp-panel-head {
    margin-bottom: 16px;
}

.lp-panel-head-row,
.lp-action-group,
.lp-modal-actions,
.lp-message-pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.lp-panel-head h2 {
    margin: 0 0 6px;
}

.lp-panel-head p,
.lp-card p,
.lp-empty,
.lp-file-row span,
.lp-thread-item span,
.lp-message-bubble small {
    color: var(--lp-muted);
}

.lp-card-list,
.lp-file-list {
    display: grid;
    gap: 14px;
}

.lp-card,
.lp-file-row {
    padding: 16px;
}

.lp-card.compact,
.lp-sub-panel .lp-card {
    padding: 14px;
}

.lp-quote-package {
    display: grid;
    gap: 16px;
}

.lp-quote-document {
    margin-bottom: 18px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.lp-document-actions {
    align-items: flex-start;
}

.lp-document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 0 24px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 0.92rem;
}

.lp-document-meta span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

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

.lp-quote-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: var(--lp-text);
}

.lp-quote-text-block {
    color: var(--lp-text);
    line-height: 1.65;
}

.lp-quote-details {
    margin-top: 12px;
}

.lp-quote-details summary {
    cursor: pointer;
    color: var(--lp-accent-dark);
    font-weight: 700;
}

.lp-quote-details[open] summary {
    margin-bottom: 12px;
}

.lp-record-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.lp-record-link:hover,
.lp-record-link.is-active {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
}

.lp-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
}

.lp-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #eff6ff;
    color: var(--lp-accent);
}

.status-paid,
.status-done,
.status-accepted {
    background: rgba(15, 157, 118, 0.14);
    color: var(--lp-success);
}

.status-overdue,
.status-rejected,
.status-refunded {
    background: rgba(220, 38, 38, 0.14);
    color: var(--lp-danger);
}

.status-under_review,
.status-review,
.status-awaiting_info {
    background: rgba(217, 119, 6, 0.14);
    color: var(--lp-warning);
}

.lp-money-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.lp-money-grid span {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 14px;
    background: #f8fbff;
}

.lp-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 16px;
    min-width: 100%;
    width: max-content;
}

.lp-panel-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
}

.lp-board-column {
    min-height: 280px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(238, 244, 255, 0.8));
}

.lp-board-head {
    margin-bottom: 12px;
    font-weight: 700;
}

.lp-board-dropzone {
    display: grid;
    gap: 12px;
    min-height: 180px;
}

.lp-task-card {
    padding: 14px;
    cursor: grab;
}

.lp-task-card:active {
    cursor: grabbing;
}

.lp-task-card.is-dragging {
    opacity: 0.45;
}

.lp-board-column.is-drop-target {
    outline: 2px dashed rgba(37, 99, 235, 0.4);
    outline-offset: 4px;
}

.lp-empty {
    border-radius: 16px;
    padding: 18px;
    border: 1px dashed var(--lp-border);
    background: rgba(248, 251, 255, 0.8);
}

.lp-empty.compact {
    padding: 10px 12px;
}

.lp-inline-banner {
    margin-top: 14px;
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--lp-accent-dark);
    font-weight: 600;
}

.lp-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.lp-sub-panel {
    padding: 18px;
    border-radius: 18px;
    background: rgba(248, 251, 255, 0.9);
    border: 1px solid rgba(217, 228, 242, 0.92);
    margin: 15px 0;
}

.lp-sub-panel h3 {
    margin: 0 0 12px;
}

.lp-card-list.compact {
    gap: 10px;
}

@media print {
    .lp-portal-frame > aside,
    .lp-topbar,
    .lp-stat-row,
    .lp-card-list,
    .lp-table-wrap,
    .lp-panel > .lp-panel-head:not(.lp-document-actions),
    .lp-document-actions .lp-table-actions,
    .lp-modal {
        display: none !important;
    }

    .lp-portal-main,
    .lp-panel,
    .lp-quote-document {
        box-shadow: none !important;
        border: 0 !important;
        background: #fff !important;
    }

    .lp-quote-document {
        margin: 0;
        padding: 0;
    }
}

.lp-activity-list .lp-card-top {
    align-items: flex-start;
}

.lp-activity-list p {
    margin: 0 0 10px;
}

.lp-checklist-list {
    display: grid;
    gap: 10px;
}

.lp-checklist-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.lp-checklist-card {
    display: flex !important;
    align-items: start;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid var(--lp-border);
}

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

.lp-modal[aria-hidden="true"] {
    display: none !important;
}

.lp-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.56);
}

.lp-modal-card {
    position: relative;
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(217, 228, 242, 0.96);
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.24);
}

.lp-modal-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.lp-modal-head h2,
.lp-modal-head p {
    margin: 0;
}

.lp-modal-head p {
    margin-top: 6px;
    color: var(--lp-muted);
}

.lp-modal-close {
    border: 0;
    background: transparent;
    color: var(--lp-muted);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

body.lp-modal-open {
    overflow: hidden;
}

.lp-tab-nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px;
    border-radius: 16px;
    background: #eef4fb;
}

.lp-tab-btn {
    appearance: none;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--lp-muted);
    cursor: pointer;
    font-weight: 700;
    padding: 10px 14px;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.lp-tab-btn.is-active {
    background: #fff;
    color: var(--lp-accent-dark);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.lp-tab-content[hidden] {
    display: none !important;
}

.lp-messenger {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    min-height: 520px;
}

.lp-thread-list,
.lp-message-pane {
    display: grid;
    gap: 12px;
}

.lp-thread-list {
    align-content: start;
    max-height: 620px;
    overflow: auto;
    padding-right: 4px;
}

.lp-thread-item {
    appearance: none;
    border: 1px solid var(--lp-border);
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    display: grid;
    gap: 6px;
}

.lp-thread-item.is-active {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.06);
}

.lp-message-stream {
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: 320px;
    max-height: 620px;
    overflow: auto;
    padding-right: 6px;
}

.lp-message-bubble {
    border-radius: 16px;
    padding: 14px;
    background: #f8fbff;
    border: 1px solid var(--lp-border);
    max-width: min(100%, 560px);
}

.lp-message-bubble.is-own {
    margin-left: auto;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.18);
}

.lp-message-form textarea {
    min-height: 110px;
}

.lp-participant-picker {
    display: grid;
    gap: 12px;
    border: 1px solid var(--lp-border);
    border-radius: 18px;
    padding: 18px;
    margin: 0;
}

.lp-participant-picker legend {
    padding: 0 8px;
    font-weight: 700;
}

.lp-helper-text {
    margin: 0;
    color: var(--lp-muted);
    font-size: 13px;
}

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

.lp-contact-option {
    display: flex !important;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--lp-border);
    background: #f8fbff;
}

.lp-contact-option span {
    display: grid;
    gap: 4px;
}

.lp-contact-option small {
    color: var(--lp-muted);
}

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

.lp-inline-field {
    display: grid;
    gap: 10px;
    align-content: start;
}

.lp-file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 100px;
    gap: 12px;
    align-items: center;
}

.lp-bank-details {
    margin-top: 10px;
}

@media (max-width: 1100px) {
    .lp-public-grid,
    .lp-portal-frame,
    .lp-layout.two-thirds,
    .lp-layout.split,
    .lp-messenger {
        grid-template-columns: 1fr;
    }

    .lp-grid.two,
    .lp-grid.three,
    .lp-grid.four,
    .lp-money-grid,
    .lp-detail-grid,
    .lp-project-hero-grid,
    .lp-quote-section-grid,
    .lp-kv-grid,
    .lp-checklist-row,
    .lp-contact-grid,
    .lp-field-grid.two {
        grid-template-columns: 1fr;
    }

    .lp-portal-sidebar {
        position: static;
    }
}
