/* Customer directory and deal workspace refinements */
.deal-panel-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg-surface);
    color: var(--color-text-secondary);
    padding: 7px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.deal-panel-toggle:hover {
    border-color: var(--deal-accent-color, var(--color-border-strong));
    color: var(--color-text-primary);
}

.deal-detail-panel-body {
    display: grid;
    gap: 20px;
}

.deal-detail-panel.is-collapsed {
    min-height: 180px;
    padding: 12px;
}

.deal-detail-panel.is-collapsed .deal-detail-panel-head {
    justify-content: center;
    border-bottom: 0;
    padding-bottom: 0;
}

.deal-detail-panel.is-collapsed .deal-detail-panel-head > div,
.deal-detail-panel.is-collapsed .deal-detail-panel-body,
.deal-detail-panel.is-collapsed .deal-panel-toggle [data-panel-toggle-label] {
    display: none;
}

.deal-detail-panel.is-collapsed .deal-panel-toggle {
    width: 36px;
    padding: 7px;
    font-size: 1.2rem;
}

.deal-crm-blocks {
    display: grid;
    gap: 10px;
}

.deal-crm-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg-subtle);
    padding: 12px;
}

.deal-crm-card__label {
    display: block;
    color: var(--color-text-tertiary);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.deal-crm-card__title {
    display: block;
    overflow: hidden;
    color: var(--color-text-primary);
    font-size: 0.875rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.deal-crm-card__title:hover {
    color: var(--deal-accent-color, #ef6f2a);
}

.deal-inline-contact {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-bg-subtle);
    padding: 14px;
}

.deal-inline-contact__toggle {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    margin: 0 !important;
    cursor: pointer;
}

.deal-inline-contact__toggle small {
    display: block;
    margin-top: 3px;
    color: var(--color-text-tertiary);
    font-size: 0.75rem;
    font-weight: 400;
}

.deal-inline-contact__fields {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--color-border);
    margin-top: 14px;
    padding-top: 14px;
}

.crm-directory-page {
    gap: 24px;
}

.crm-directory-shell,
.crm-profile-shell {
    display: grid;
    align-items: start;
    gap: 24px;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
}

.crm-directory-list,
.crm-directory-form,
.crm-profile-content {
    display: grid;
    gap: 20px;
}

.crm-directory-form {
    position: sticky;
    top: 80px;
}

.crm-record-list,
.crm-related-list {
    display: grid;
    gap: 10px;
}

.crm-record-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-bg-surface);
    padding: 14px;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.crm-record-card:hover {
    border-color: #ef6f2a;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.crm-record-arrow {
    color: var(--color-text-tertiary);
    font-size: 1.15rem;
}

.crm-directory-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    border: 1px dashed var(--color-border-strong);
    border-radius: 16px;
    background: var(--color-bg-subtle);
    padding: 42px 20px;
    text-align: center;
}

.crm-form-grid {
    display: grid;
    gap: 16px;
}

.crm-form-grid label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.crm-profile-heading,
.crm-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.crm-profile-heading {
    justify-content: flex-start;
}

.crm-related-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
    padding: 12px 14px;
}

.crm-related-card span:first-child {
    display: grid;
    gap: 2px;
}

.crm-related-card small {
    color: var(--color-text-tertiary);
}

@media (min-width: 1280px) {
    .deal-detail-shell {
        transition: grid-template-columns 220ms ease;
    }

    .deal-detail-shell.properties-collapsed {
        grid-template-columns: 60px minmax(0, 1fr) minmax(240px, 0.8fr);
    }

    .deal-detail-shell.integrations-collapsed {
        grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr) 60px;
    }

    .deal-detail-shell.properties-collapsed.integrations-collapsed {
        grid-template-columns: 60px minmax(0, 1fr) 60px;
    }
}

@media (max-width: 1023px) {
    .crm-directory-shell,
    .crm-profile-shell {
        grid-template-columns: 1fr;
    }

    .crm-directory-form {
        position: static;
    }
}

@media (max-width: 639px) {
    .deal-inline-contact__fields {
        grid-template-columns: 1fr;
    }
}

.engineering-page-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

.engineering-hub {
    --engineering-blue: #2b5fbd;
    --engineering-success: #1a7f45;
    display: grid;
    gap: 20px;
    padding-bottom: 24px;
}

.engineering-hub__command,
.engineering-hub__section-card,
.engineering-workspace-card {
    border: 1px solid var(--color-border);
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
}

.engineering-hub__command {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    min-height: 84px;
    padding: 20px 24px;
    border-radius: 16px;
}

.engineering-workspace-card__badge,
.engineering-hub__section-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.engineering-hub__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin: 0;
    color: var(--color-accent);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.15;
    text-transform: uppercase;
}

.engineering-hub__eyebrow-icon,
.engineering-workspace-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.engineering-hub__eyebrow-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--color-accent-muted);
}

.engineering-hub__section-head h3 {
    margin: 0;
    color: var(--color-text-primary);
}

.engineering-hub__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--engineering-success) 24%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--engineering-success) 10%, var(--color-bg-surface));
    color: var(--engineering-success);
    font-size: 0.8125rem;
    font-weight: 650;
    white-space: nowrap;
}

.engineering-hub__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.engineering-hub__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.engineering-hub__primary {
    min-width: 0;
}

.engineering-hub__section-card {
    border-radius: 16px;
    padding: 20px;
}

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

.engineering-hub__section-head h3 {
    font-size: 1rem;
    font-weight: 650;
}

.engineering-hub__section-chip {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--color-accent-muted);
    color: var(--color-accent);
    white-space: nowrap;
}

.engineering-hub__workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.engineering-workspace-card {
    --workspace-accent: var(--engineering-blue);
    position: relative;
    display: flex;
    min-height: 232px;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
    padding: 20px;
    border-left: 4px solid var(--workspace-accent);
    border-radius: 16px;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.15s;
}

.engineering-workspace-card--primary {
    --workspace-accent: var(--color-accent);
}

.engineering-workspace-card--installation {
    --workspace-accent: var(--engineering-blue);
}

.engineering-workspace-card:hover,
.engineering-workspace-card:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--workspace-accent) 44%, var(--color-border));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    outline: none;
}

.engineering-workspace-card:focus-visible {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--workspace-accent) 18%, transparent), 0 4px 16px rgba(0, 0, 0, 0.08);
}

.engineering-workspace-card__topline,
.engineering-workspace-card__meta,
.engineering-workspace-card__cta {
    display: flex;
    align-items: center;
}

.engineering-workspace-card__topline {
    justify-content: space-between;
    gap: 12px;
}

.engineering-workspace-card__icon {
    width: 48px;
    height: 48px;
    border: 1px solid color-mix(in srgb, var(--workspace-accent) 22%, var(--color-border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--workspace-accent) 12%, var(--color-bg-surface));
    color: var(--workspace-accent);
}

.engineering-workspace-card__badge {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid color-mix(in srgb, var(--workspace-accent) 20%, var(--color-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--workspace-accent) 9%, var(--color-bg-surface));
    color: var(--workspace-accent);
}

.engineering-workspace-card__body {
    display: grid;
    gap: 8px;
}

.engineering-workspace-card__title {
    color: var(--color-text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.15;
}

.engineering-workspace-card__copy {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    line-height: 1.55;
}

.engineering-workspace-card__meta {
    flex-wrap: wrap;
    gap: 8px;
}

.engineering-workspace-card__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
}

.engineering-workspace-card__cta {
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    margin-top: auto;
    padding: 0 12px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--workspace-accent) 12%, var(--color-bg-surface));
    color: var(--workspace-accent);
    font-size: 0.875rem;
    font-weight: 650;
    transition: background 0.15s, color 0.15s;
}

.engineering-workspace-card:hover .engineering-workspace-card__cta,
.engineering-workspace-card:focus-visible .engineering-workspace-card__cta {
    background: var(--workspace-accent);
    color: #fff;
}

.engineering-workspace-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.engineering-workspace-card__arrow svg {
    width: 18px;
    height: 18px;
    transition: transform 0.15s;
}

.engineering-workspace-card:hover .engineering-workspace-card__arrow svg,
.engineering-workspace-card:focus-visible .engineering-workspace-card__arrow svg {
    transform: translateX(2px);
}

.engineering-hub__empty {
    display: grid;
    grid-column: 1 / -1;
    justify-items: center;
    gap: 12px;
    padding: 32px 24px;
    color: var(--color-text-secondary);
    text-align: center;
}

.engineering-hub__empty strong {
    color: var(--color-text-primary);
}

html.dark .engineering-hub,
html[data-theme="dark"] .engineering-hub {
    --engineering-blue: #93c5fd;
    --engineering-success: #86efac;
}

html.dark .engineering-hub__command,
html[data-theme="dark"] .engineering-hub__command,
html.dark .engineering-hub__section-card,
html[data-theme="dark"] .engineering-hub__section-card,
html.dark .engineering-workspace-card,
html[data-theme="dark"] .engineering-workspace-card {
    box-shadow: none;
}

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

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

    .engineering-hub__status {
        width: fit-content;
    }

    .engineering-hub__workspace-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .engineering-page-action {
        display: none;
    }

    .engineering-hub__command,
    .engineering-hub__section-card {
        padding: 16px;
    }

    .engineering-hub__section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .engineering-workspace-card {
        min-height: 0;
        padding: 16px;
    }
}

.installation-project-library-toolbar {
    display: grid;
    gap: 16px;
}

.installation-project-toolbar-inline-form {
    display: inline-flex;
    min-width: 0;
    align-items: stretch;
}

.installation-project-search-form {
    display: grid;
    min-width: min(100%, 30rem);
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
}

.installation-project-search-field {
    min-width: 0;
}

.installation-project-search {
    font-size: 0.9rem;
    font-weight: 600;
}

.installation-project-search::placeholder {
    font-size: 0.82rem;
    font-weight: 650;
    text-overflow: ellipsis;
}

.installation-project-search-button {
    min-height: 46px;
    padding-inline: 14px;
    white-space: nowrap;
}

.installation-project-create-button {
    position: relative;
    isolation: isolate;
    min-height: 46px;
    border: 2px solid transparent;
    border-radius: 14px;
    color: #fff;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--color-bg-surface) 24%, #251813 76%),
            color-mix(in srgb, var(--color-bg-surface) 14%, #130d0a 86%)
        ) padding-box,
        linear-gradient(
            120deg,
            #ff7a2f 0%,
            #ffd166 22%,
            #fff3bf 36%,
            #ff8a3d 54%,
            #f04f1f 74%,
            #ff7a2f 100%
        ) border-box;
    background-size: 100% 100%, 240% 100%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35),
        0 1px 2px rgba(0, 0, 0, 0.18);
    padding-inline: 18px;
    font-weight: 760;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    animation: installation-create-edge-drift 12s linear infinite;
}

.installation-project-create-button::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: 11px;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.10), transparent 40%);
    pointer-events: none;
}

.installation-project-create-button:hover {
    transform: translateY(-1px);
    color: #fff;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--color-bg-surface) 18%, #2d1a12 82%),
            color-mix(in srgb, var(--color-bg-surface) 10%, #15100d 90%)
        ) padding-box,
        linear-gradient(
            120deg,
            #ff7a2f 0%,
            #ffd166 22%,
            #fff3bf 36%,
            #ff8a3d 54%,
            #f04f1f 74%,
            #ff7a2f 100%
        ) border-box;
    background-size: 100% 100%, 200% 100%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35),
        0 1px 2px rgba(0, 0, 0, 0.18);
}

@keyframes installation-create-edge-drift {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 0 0, 240% 0;
    }
}

.installation-project-card-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
    align-items: stretch;
    transition: opacity 0.15s ease;
}

.installation-project-library.is-search-loading .installation-project-card-grid,
.installation-project-library.is-search-loading .installation-project-pagination {
    opacity: 0.55;
    pointer-events: none;
}

.installation-project-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
    box-shadow: none;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.15s;
}

.installation-project-card:hover,
.installation-project-card:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--color-accent) 42%, var(--color-border));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    outline: none;
}

.installation-project-card-wrap {
    position: relative;
    display: grid;
    min-width: 0;
    gap: 8px;
}

.installation-project-card--layout {
    display: block;
    height: 24rem;
    padding: 16px;
    text-decoration: none;
}

.installation-project-card-select {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--color-accent) 18%, var(--color-border));
    background: color-mix(in srgb, var(--color-bg-surface) 92%, transparent);
    color: var(--color-text-secondary);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    opacity: 0;
    padding: 5px 8px;
    font-size: 0.75rem;
    font-weight: 750;
    line-height: 1;
    transform: translateY(-4px);
    pointer-events: none;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s, color 0.15s, background-color 0.15s;
    backdrop-filter: blur(10px);
}

.installation-project-library.is-select-mode .installation-project-card-select,
.installation-project-card-select:has(input:checked) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.installation-project-card-select span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.installation-project-card-select span::before {
    content: "";
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 4px;
    border: 1px solid color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
    background: var(--color-bg-surface);
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 65%, transparent);
}

.installation-project-card-wrap:has(.installation-project-card-select input:checked) .installation-project-card {
    border-color: color-mix(in srgb, var(--color-accent) 54%, var(--color-border));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.installation-project-card-select:hover,
.installation-project-card-select:has(input:checked) {
    border-color: color-mix(in srgb, var(--color-accent) 42%, var(--color-border));
    background: var(--color-accent-muted);
    color: var(--color-accent);
}

.installation-project-card-select:has(input:focus-visible) {
    outline: 2px solid color-mix(in srgb, var(--color-accent) 32%, transparent);
    outline-offset: 3px;
}

.installation-project-card-select:has(input:checked) span::before {
    border-color: color-mix(in srgb, var(--color-accent) 68%, var(--color-border));
    background: var(--color-accent);
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, white 42%, transparent),
        inset 0 0 0 3px var(--color-accent-muted);
}

.installation-project-card-select input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.installation-project-bulk-actions {
    display: none;
    grid-template-columns: minmax(11rem, 1fr) minmax(7rem, 8rem) max-content;
    align-items: center;
    gap: 8px;
    width: min(100%, 34rem);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
    padding: 8px;
}

.installation-project-library.is-select-mode .installation-project-bulk-actions {
    display: grid;
}

.installation-project-bulk-actions__summary {
    display: grid;
    gap: 2px;
    padding-inline: 4px;
}

.installation-project-bulk-actions__summary strong {
    color: var(--color-text-primary);
    font-size: 0.8rem;
    line-height: 1.1;
}

.installation-project-bulk-actions__summary span {
    color: var(--color-text-secondary);
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.25;
}

.installation-project-bulk-actions__confirm .app-form-control {
    min-height: 40px;
    width: 100%;
    border-radius: 10px;
    padding-inline: 10px;
    text-align: center;
}

.installation-project-bulk-actions__delete {
    display: inline-flex;
    min-height: 40px;
    min-width: 8.8rem;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--color-danger) 24%, var(--color-border));
    border-radius: 10px;
    background: var(--color-danger-muted);
    color: var(--color-danger);
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    transition: opacity 0.15s, background-color 0.15s, border-color 0.15s;
}

.installation-project-bulk-actions__delete:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--color-danger) 42%, var(--color-border));
    background: color-mix(in srgb, var(--color-danger) 18%, var(--color-bg-surface));
}

.installation-project-bulk-actions__delete:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.installation-project-card__layout {
    display: grid;
    grid-template-columns: repeat(var(--project-card-columns, 6), minmax(0, 1fr));
    grid-template-rows: repeat(var(--project-card-rows, 8), minmax(0, 1fr));
    gap: 8px;
    height: 100%;
    min-height: 0;
    align-content: stretch;
}

.installation-project-card-block {
    --project-card-block-accent: var(--color-accent);
    --project-card-block-accent-muted: var(--color-accent-muted);
    --project-card-block-fill: color-mix(in srgb, var(--project-card-block-accent) 8%, var(--color-bg-surface));
    --project-card-block-edge: color-mix(in srgb, var(--project-card-block-accent) 18%, var(--color-border));
    --project-card-block-strong-edge: color-mix(in srgb, var(--project-card-block-accent) 26%, var(--color-border));
    --project-card-block-edge-highlight: color-mix(in srgb, var(--project-card-block-fill) 72%, white 28%);
    --project-card-block-edge-shade: color-mix(in srgb, var(--project-card-block-fill) 78%, black 22%);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.installation-project-card-block-accent--neutral {
    --project-card-block-accent: var(--color-text-secondary);
    --project-card-block-accent-muted: var(--color-bg-subtle);
}

.installation-project-card-block-accent--info {
    --project-card-block-accent: var(--color-info);
    --project-card-block-accent-muted: var(--color-info-muted);
}

.installation-project-card-block-accent--success {
    --project-card-block-accent: var(--color-success);
    --project-card-block-accent-muted: var(--color-success-muted);
}

.installation-project-card-block-accent--warning {
    --project-card-block-accent: var(--color-warning);
    --project-card-block-accent-muted: var(--color-warning-muted);
}

.installation-project-card-block--badge,
.installation-project-card-block--title,
.installation-project-card-block--timestamp {
    display: flex;
    align-items: center;
}

.installation-project-card-block--title {
    align-items: stretch;
}

.installation-project-card-block--icon {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.installation-project-card-block--client,
.installation-project-card-block--phone,
.installation-project-card-block--email,
.installation-project-card-block--engineering_input,
.installation-project-card-block--engineering_result {
    display: flex;
}

.installation-project-card-block--client .installation-project-card__section,
.installation-project-card-block--phone .installation-project-card__section,
.installation-project-card-block--email .installation-project-card__section,
.installation-project-card-block--engineering_input .installation-project-card__section,
.installation-project-card-block--engineering_result .installation-project-card__section {
    width: 100%;
    height: 100%;
    display: grid;
    align-content: stretch;
    overflow: hidden;
    box-sizing: border-box;
}

.installation-project-card__eyebrow {
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--project-card-block-edge);
    background: var(--project-card-block-fill);
    color: var(--project-card-block-accent);
    box-shadow:
        inset 0 1px 0 var(--project-card-block-edge-highlight),
        inset 0 -1px 0 var(--project-card-block-edge-shade);
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.installation-project-card__title,
.installation-project-card__value {
    color: var(--color-text-primary);
}

.installation-project-card__title {
    --project-card-title-font-size: 24px;
    display: -webkit-box;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: var(--color-text-primary);
    font-size: var(--project-card-title-font-size);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.installation-project-card__title-wrap {
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: flex;
}

.installation-project-card__title-wrap--x-left {
    justify-content: flex-start;
}

.installation-project-card__title-wrap--x-center {
    justify-content: center;
}

.installation-project-card__title-wrap--x-right {
    justify-content: flex-end;
}

.installation-project-card__title-wrap--y-top {
    align-items: flex-start;
}

.installation-project-card__title-wrap--y-middle {
    align-items: center;
}

.installation-project-card__title-wrap--y-bottom {
    align-items: flex-end;
}

.installation-project-card__title-wrap--x-left .installation-project-card__title {
    text-align: left;
}

.installation-project-card__title-wrap--x-center .installation-project-card__title {
    text-align: center;
}

.installation-project-card__title-wrap--x-right .installation-project-card__title {
    text-align: right;
}

.installation-project-card__timestamp {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--color-text-secondary);
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
}

.installation-project-card__section {
    --project-card-label-font-size: 11px;
    --project-card-value-font-size: 14px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--project-card-block-edge);
    border-radius: 10px;
    background: var(--project-card-block-fill);
    box-shadow:
        inset 0 1px 0 var(--project-card-block-edge-highlight),
        inset 0 -1px 0 var(--project-card-block-edge-shade);
    padding: 5px 8px;
}

.installation-project-card__section--label-hidden {
    grid-template-rows: minmax(0, 1fr);
    padding-block: 0;
}

.installation-project-card__section-label {
    max-width: 100%;
    overflow: hidden;
    color: var(--project-card-block-accent);
    font-size: var(--project-card-label-font-size);
    letter-spacing: 0.08em;
    line-height: 1;
    overflow-wrap: anywhere;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.installation-project-card__section-label-wrap,
.installation-project-card__section-value-wrap {
    min-width: 0;
    min-height: 0;
    display: flex;
}

.installation-project-card__section-label-wrap,
.installation-project-card__section-value-wrap {
    align-items: flex-start;
    justify-content: flex-start;
}

.installation-project-card__section--label-hidden .installation-project-card__section-value-wrap {
    min-height: 100%;
}

.installation-project-card__value {
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    font-size: var(--project-card-value-font-size);
    line-height: 1.05;
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
}

.installation-project-card__section--label-x-left .installation-project-card__section-label-wrap {
    justify-content: flex-start;
}

.installation-project-card__section--label-x-center .installation-project-card__section-label-wrap {
    justify-content: center;
}

.installation-project-card__section--label-x-right .installation-project-card__section-label-wrap {
    justify-content: flex-end;
}

.installation-project-card__section--label-x-left .installation-project-card__section-label {
    text-align: left;
}

.installation-project-card__section--label-x-center .installation-project-card__section-label {
    text-align: center;
}

.installation-project-card__section--label-x-right .installation-project-card__section-label {
    text-align: right;
}

.installation-project-card__section--label-y-top .installation-project-card__section-label-wrap {
    align-items: flex-start;
}

.installation-project-card__section--label-y-middle .installation-project-card__section-label-wrap {
    align-items: center;
}

.installation-project-card__section--label-y-bottom .installation-project-card__section-label-wrap {
    align-items: flex-end;
}

.installation-project-card__section--value-x-left .installation-project-card__section-value-wrap {
    justify-content: flex-start;
}

.installation-project-card__section--value-x-center .installation-project-card__section-value-wrap {
    justify-content: center;
}

.installation-project-card__section--value-x-right .installation-project-card__section-value-wrap {
    justify-content: flex-end;
}

.installation-project-card__section--value-x-left .installation-project-card__value {
    text-align: left;
}

.installation-project-card__section--value-x-center .installation-project-card__value {
    text-align: center;
}

.installation-project-card__section--value-x-right .installation-project-card__value {
    text-align: right;
}

.installation-project-card__section--value-y-top .installation-project-card__section-value-wrap {
    align-items: flex-start;
}

.installation-project-card__section--value-y-middle .installation-project-card__section-value-wrap {
    align-items: center;
}

.installation-project-card__section--value-y-bottom .installation-project-card__section-value-wrap {
    align-items: flex-end;
}

.installation-project-card__icon {
    border-color: var(--project-card-block-edge);
    border-radius: 12px;
    background: var(--project-card-block-fill);
    color: var(--project-card-block-accent);
    box-shadow:
        inset 0 1px 0 var(--project-card-block-edge-highlight),
        inset 0 -1px 0 var(--project-card-block-edge-shade);
}

.installation-project-card__icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.installation-project-card__action {
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    border-color: var(--project-card-block-strong-edge);
    border-radius: 10px;
    background: var(--project-card-block-fill);
    color: var(--project-card-block-accent);
    box-shadow:
        inset 0 1px 0 var(--project-card-block-edge-highlight),
        inset 0 -1px 0 var(--project-card-block-edge-shade);
    line-height: 1.15;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
}

.installation-project-card-block--timestamp {
    align-items: flex-end;
}

.installation-project-card-block--action {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.installation-project-card-block--action .installation-project-card__action {
    width: 100%;
}

.installation-project-empty-state {
    min-height: 24rem;
    align-content: center;
}

.installation-project-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-bg-surface);
    padding: 12px;
}

.installation-project-pagination__summary {
    color: var(--color-text-secondary);
    font-size: 0.82rem;
    font-weight: 650;
}

.installation-project-pagination__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.installation-project-pagination__link {
    display: inline-flex;
    min-width: 2.4rem;
    min-height: 2.4rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
    padding: 0 10px;
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.installation-project-pagination__link:hover {
    border-color: color-mix(in srgb, var(--color-accent) 36%, var(--color-border));
    background: var(--color-accent-muted);
    color: var(--color-accent);
}

.installation-project-pagination__link.is-active {
    border-color: color-mix(in srgb, var(--color-accent) 46%, var(--color-border));
    background: var(--color-accent);
    color: white;
}

.installation-project-pagination__link.is-disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.installation-project-pagination__link.is-disabled:hover {
    border-color: var(--color-border);
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
}

@media (max-width: 700px) {
    .installation-project-search-form {
        min-width: 100%;
    }

    .installation-project-search::placeholder {
        font-size: 0.76rem;
    }

    .installation-project-search-button {
        min-width: 46px;
        padding-inline: 12px;
    }

    .installation-project-search-button span {
        display: none;
    }

    .installation-project-create-button {
        width: 100%;
    }

    .installation-project-bulk-actions {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .installation-project-card--layout,
    .installation-project-empty-state {
        min-height: 21rem;
    }
}

.installation-project-card-editor {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.installation-project-card-editor.hidden {
    display: none;
}

.installation-project-card-editor__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(10px);
}

.installation-project-card-editor__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 100rem);
    max-height: min(92vh, 64rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.installation-project-card-editor__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 1.75rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.installation-project-card-editor__body {
    display: grid;
    grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

.installation-project-card-editor__sidebar {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border-right: 1px solid rgba(148, 163, 184, 0.18);
    overflow: auto;
}

.installation-project-card-editor__panel {
    border-radius: 16px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-surface);
    padding: 1rem;
}

html.dark .installation-project-card-editor__panel,
html[data-theme="dark"] .installation-project-card-editor__panel {
    background: var(--color-bg-surface);
}

.installation-project-card-editor__preview-wrap {
    padding: 1rem;
    overflow: auto;
}

.installation-project-card-editor__preview-shell {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.installation-project-card--editor-preview {
    width: min(100%, 23rem);
    padding: 1rem;
    height: 24rem;
    flex: 0 0 auto;
}

.installation-project-card-editor__preview-grid {
    display: grid;
    grid-template-columns: repeat(var(--project-card-columns, 6), minmax(0, 1fr));
    grid-template-rows: repeat(var(--project-card-rows, 8), minmax(0, 1fr));
    gap: 8px;
    height: 100%;
    min-height: 0;
    align-content: stretch;
}

.installation-project-card-editor__preview-block {
    position: relative;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.installation-project-card-editor__preview-block.is-selected {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 12px;
}

.installation-project-card-editor__preview-block.is-dragging {
    cursor: grabbing;
    opacity: 0.92;
}

.installation-project-card-editor__preview-block-content {
    height: 100%;
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: block;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.installation-project-card-editor__resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
    background: var(--color-accent);
    box-shadow: 0 10px 20px color-mix(in srgb, var(--color-accent) 22%, transparent);
    cursor: nwse-resize;
    opacity: 0;
    transform: translate(35%, 35%);
    transition: opacity 0.15s ease, transform 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.installation-project-card-editor__preview-block:hover .installation-project-card-editor__resize-handle,
.installation-project-card-editor__preview-block.is-selected .installation-project-card-editor__resize-handle {
    opacity: 1;
}

.installation-project-card-editor__library-button,
.installation-project-card-editor__delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-surface);
    color: var(--color-text-secondary);
    padding: 0.8rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.installation-project-card-editor__template-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
    padding: 0.9rem 1rem;
    text-align: left;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.installation-project-card-editor__template-button.is-selected {
    border-color: color-mix(in srgb, var(--color-accent) 55%, var(--color-border));
    background: var(--color-accent-muted);
}

.installation-project-card-editor__template-button.is-active {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 28%, transparent);
}

.installation-project-card-editor__template-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.installation-project-card-editor__template-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.installation-project-card-editor__template-badge--active {
    background: var(--color-accent-muted);
    color: var(--color-accent);
}

.installation-project-card-editor__template-badge--draft {
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
}

.installation-project-card-editor__library-button:hover,
.installation-project-card-editor__delete-button:hover,
.installation-project-card-editor__template-button:hover {
    border-color: color-mix(in srgb, var(--color-accent) 42%, var(--color-border));
    color: var(--color-accent);
}

.installation-project-card-editor__library-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

html.dark .installation-project-card-editor__library-button,
html[data-theme="dark"] .installation-project-card-editor__library-button,
html.dark .installation-project-card-editor__delete-button,
html[data-theme="dark"] .installation-project-card-editor__delete-button,
html.dark .installation-project-card-editor__template-button,
html[data-theme="dark"] .installation-project-card-editor__template-button {
    background: var(--color-bg-surface);
}

html.dark .installation-project-card-editor__template-button.is-selected,
html[data-theme="dark"] .installation-project-card-editor__template-button.is-selected {
    background: var(--color-accent-muted);
}

html.dark .installation-project-card-editor__template-badge--active,
html[data-theme="dark"] .installation-project-card-editor__template-badge--active {
    color: #fdba74;
}

html.dark .installation-project-card-editor__template-badge--draft,
html[data-theme="dark"] .installation-project-card-editor__template-badge--draft {
    color: #cbd5e1;
}

.installation-project-card-editor__field {
    display: grid;
    gap: 0.45rem;
}

.installation-project-card-editor__toggle {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.58);
    padding: 0.8rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 700;
}

.installation-project-card-editor__toggle input {
    width: 1rem;
    height: 1rem;
    accent-color: #ef6f2a;
}

html.dark .installation-project-card-editor__toggle,
html[data-theme="dark"] .installation-project-card-editor__toggle {
    background: rgba(15, 23, 42, 0.72);
}

.installation-project-card-editor__field label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.installation-project-card-editor__field-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.installation-project-card-editor__empty {
    border-radius: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.32);
    padding: 1rem;
    color: var(--app-page-muted);
    text-align: center;
}

@media (max-width: 1100px) {
    .installation-project-card-editor__body {
        grid-template-columns: 1fr;
    }

    .installation-project-card-editor__sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    }
}

@media (max-width: 640px) {
    .installation-project-card__layout,
    .installation-project-card-editor__preview-grid {
        min-height: 0;
    }

    .installation-project-card-editor {
        padding: 0.75rem;
    }

    .installation-project-card--layout,
    .installation-project-card--editor-preview {
        width: min(100%, 100%);
        height: 29rem;
    }

    .installation-project-card-editor__header,
    .installation-project-card-editor__sidebar,
    .installation-project-card-editor__preview-wrap {
        padding: 1rem;
    }
}

.shell-rail {
    width: var(--app-shell-rail-collapsed);
    transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1), border-radius 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1);
    align-self: flex-start;
    max-height: 100vh;
    overflow-x: hidden;
    overflow-y: hidden !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: var(--color-bg-surface) !important;
    border-color: var(--color-border) !important;
}

.shell-rail:hover {
    width: var(--app-shell-rail-expanded);
    overflow-y: auto !important;
}

.shell-rail:not(:hover)::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.shell-rail-inner {
    display: flex;
    min-height: calc(100vh - 48px);
    flex-direction: column;
    width: calc(var(--app-shell-rail-expanded) - 2rem);
}

.shell-rail-brand {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding-right: 0;
}

.shell-rail:not(:hover) .shell-rail-brand {
    width: calc(var(--app-shell-rail-collapsed) - 2rem);
    grid-template-columns: 1fr;
    justify-items: center;
}

.shell-rail:not(:hover) .shell-rail-brand .app-shell-brand-badge {
    margin-inline: auto;
}

.shell-rail:not(:hover) .shell-rail-brand .app-shell-brand-logo {
    margin-inline: auto;
}

.shell-rail:not(:hover) .shell-rail-brand .shell-rail-copy {
    display: none;
}

.shell-rail:not(:hover) .shell-rail-item {
    width: calc(var(--app-shell-rail-collapsed) - 2rem);
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    padding-inline: 0;
}

.shell-rail:not(:hover) .shell-rail-item .shell-rail-copy {
    display: none;
}

.shell-rail-brand-toggle {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
}

.shell-rail-item {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    min-height: 48px;
    padding: 4px 8px;
    white-space: nowrap;
    color: var(--color-text-secondary);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.shell-rail-icon {
    display: inline-flex;
    height: 40px;
    width: 40px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: currentColor;
}

.shell-rail-copy {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.shell-rail:hover .shell-rail-copy {
    opacity: 1;
    transform: translateX(0);
}

.shell-rail-item-active {
    background: var(--color-accent-muted);
    color: var(--color-accent);
    box-shadow: none;
}

.shell-rail-item-active .shell-rail-copy {
    color: var(--color-accent);
}

.shell-rail-item-active .shell-rail-icon {
    background: var(--color-accent-muted);
}

.shell-rail:not(:hover) .shell-rail-item-active {
    background: var(--color-accent-muted);
    box-shadow: none;
    justify-items: center;
}

.shell-rail:not(:hover) .shell-rail-item-active .shell-rail-icon {
    background: var(--color-accent);
    color: #fff;
    box-shadow: none;
}

.shell-rail:not(:hover) .shell-rail-item-active .shell-rail-copy {
    color: inherit;
}

.shell-rail-item-idle {
    color: var(--color-text-secondary);
}

.shell-rail-item-idle .shell-rail-icon {
    background: transparent;
    color: currentColor;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.shell-rail-item-idle:hover {
    background: var(--color-bg-subtle);
    border-color: var(--color-border);
    color: var(--color-text-primary);
    box-shadow: none;
    transform: none;
}

.shell-rail-item-idle:hover .shell-rail-icon {
    background: var(--color-bg-surface);
    border-color: var(--color-border);
    color: var(--color-accent);
    box-shadow: none;
}

.shell-rail-item-disabled {
    cursor: default;
    color: var(--color-text-muted);
}

.shell-rail-item-disabled .shell-rail-icon {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid transparent;
}

.app-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.45rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-status-pill-complete {
    background: #dcfce7;
    border-color: #86efac;
    color: #14532d;
}

.app-status-pill-progress {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #92400e;
}

.app-status-pill-upcoming,
.app-status-pill-neutral {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
}

.app-status-pill-brand {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(147, 197, 253, 0.55);
    color: #2563eb;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
}

html.dark .app-status-pill-complete,
html[data-theme="dark"] .app-status-pill-complete {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(52, 211, 153, 0.34);
    color: #d1fae5;
}

html.dark .app-status-pill-progress,
html[data-theme="dark"] .app-status-pill-progress {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(251, 191, 36, 0.34);
    color: #fef3c7;
}

html.dark .app-status-pill-upcoming,
html[data-theme="dark"] .app-status-pill-upcoming,
html.dark .app-status-pill-neutral,
html[data-theme="dark"] .app-status-pill-neutral {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
}

html.dark .app-status-pill-brand,
html[data-theme="dark"] .app-status-pill-brand {
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(96, 165, 250, 0.35);
    color: #bfdbfe;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.16);
}

.shell-mobile-nav {
    scrollbar-width: none;
}

.shell-mobile-nav::-webkit-scrollbar {
    display: none;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.6);
    border-radius: 999px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

p label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

p:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgb(253 186 116 / 0.6);
    background: rgb(255 247 237);
    border-radius: 1rem;
    padding: 0.875rem 1rem;
}

p:has(input[type="checkbox"]) label {
    margin-bottom: 0;
}

html.dark p:has(input[type="checkbox"]),
html[data-theme="dark"] p:has(input[type="checkbox"]) {
    border-color: rgb(251 146 60 / 0.28);
    background: rgb(15 23 42 / 0.62);
}

p.helptext {
    margin-top: 0.5rem;
    display: block;
    color: rgb(100 116 139);
    font-size: 0.75rem;
    line-height: 1.4;
}

ul.errorlist {
    margin-bottom: 0.75rem;
    list-style: none;
    border-radius: 1rem;
    border: 1px solid rgb(254 205 211);
    background: rgb(255 241 242);
    padding: 0.75rem 1rem;
    color: rgb(190 24 93);
    font-size: 0.875rem;
}

.dark p.helptext {
    color: rgb(148 163 184);
}

.dark ul.errorlist {
    border-color: rgb(251 113 133 / 0.32);
    background: rgb(136 19 55 / 0.18);
    color: rgb(254 205 211);
}

@media (max-width: 640px) {
    .shell-rail {
        width: 100%;
    }

    .shell-rail:hover {
        width: 100%;
    }

    .shell-rail-inner {
        width: 100%;
    }
}

@media (min-width: 1280px) {
    .app-shell-rail {
        position: fixed !important;
        top: 0;
        left: 0;
        z-index: 40;
        width: var(--app-shell-rail-collapsed);
        border-right: none !important;
        border-top-right-radius: 0;
        overflow-x: hidden;
        box-shadow: inset -1px 0 0 var(--app-rail-border);
    }

    .app-shell-main {
        flex: 0 0 calc(100vw - var(--app-shell-rail-collapsed));
        width: calc(100vw - var(--app-shell-rail-collapsed));
        max-width: calc(100vw - var(--app-shell-rail-collapsed));
        margin-left: var(--app-shell-rail-collapsed);
        overflow-x: hidden;
    }

    .app-shell-header {
        border-bottom-left-radius: 0 !important;
        overflow: clip;
    }

    .app-shell-rail:hover ~ .app-shell-main {
        flex: 0 0 calc(100vw - var(--app-shell-rail-expanded));
        width: calc(100vw - var(--app-shell-rail-expanded));
        max-width: calc(100vw - var(--app-shell-rail-expanded));
        margin-left: var(--app-shell-rail-expanded);
    }

}

.deal-board-workspace {
    background: var(--app-deal-board-workspace-bg) !important;
    border-color: var(--app-deal-board-workspace-border) !important;
    box-shadow: var(--app-deal-board-workspace-shadow) !important;
    backdrop-filter: none !important;
}

.deal-stage-header {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 32%),
        linear-gradient(180deg, color-mix(in srgb, var(--deal-accent-surface-light) 34%, white 66%), rgba(248, 250, 252, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 10px 22px rgba(15, 23, 42, 0.05);
}

.deal-stage-dot {
    background: var(--deal-accent-color);
    box-shadow: 0 0 0 5px var(--deal-accent-surface-light);
}

.deal-board-scroll {
    scrollbar-width: none;
}

.deal-board-scroll::-webkit-scrollbar {
    display: none;
}

.deal-board-shell {
    position: relative;
    border: 1px solid var(--app-deal-board-shell-border);
    border-radius: 2rem;
    background: var(--app-deal-board-shell-bg);
    box-shadow: var(--app-deal-board-shell-shadow);
    padding: 0;
}

.deal-board-arrow,
.deal-board-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    transition: opacity 0.18s ease;
}

.deal-board-arrow {
    top: 50%;
    bottom: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
    color: rgb(51 65 85);
    font-size: 1.1rem;
    transform: translateY(-50%);
    opacity: 0.52;
}

.deal-board-arrow:hover {
    opacity: 0.96;
    border-color: rgba(239, 111, 42, 0.32);
    color: #b45309;
}

.deal-board-arrow.is-hidden,
.deal-board-fade.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.deal-board-arrow--left,
.deal-board-fade--left {
    left: 0;
}

.deal-board-arrow--right,
.deal-board-fade--right {
    right: 0;
}

.deal-board-arrow--left {
    left: 0.9rem;
}

.deal-board-arrow--right {
    right: 0.9rem;
}

.deal-board-fade {
    width: 4.5rem;
    pointer-events: none;
}

.deal-board-fade--left {
    background: linear-gradient(90deg, var(--app-page-bg), rgba(241, 245, 249, 0));
}

.deal-board-fade--right {
    background: linear-gradient(270deg, var(--app-page-bg), rgba(241, 245, 249, 0));
}

.deal-stage-column {
    width: clamp(18rem, 24vw, 20rem);
    min-width: clamp(18rem, 24vw, 20rem);
    max-width: clamp(18rem, 24vw, 20rem);
    background: var(--app-deal-board-column-bg) !important;
    border-color: var(--app-deal-board-column-border) !important;
    box-shadow: var(--app-deal-board-column-shadow) !important;
}

.deal-stage-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--app-deal-pill-bg);
    border: 1px solid var(--app-deal-pill-border);
    color: var(--app-deal-pill-text);
    min-width: 2.1rem;
}

.deal-stage-status-dot {
    display: inline-flex;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4);
}

.deal-stage-status-dot--active {
    background: #22c55e;
}

.deal-stage-status-dot--closed {
    background: #ef4444;
}

.deal-stage-description-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    border: 1px solid rgba(191, 148, 118, 0.26);
    background: rgba(255, 255, 255, 0.84);
    color: rgba(120, 53, 15, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
    cursor: help;
    flex: 0 0 auto;
}

.deal-stage-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--app-deal-stat-bg);
    border: 1px solid var(--app-deal-stat-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
    min-height: 2.8rem;
}

.deal-stage-column__list {
    max-height: 42rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.deal-card {
    min-height: 8.5rem;
    height: auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98)) !important;
    border-color: rgba(203, 213, 225, 0.92) !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.deal-card:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: var(--deal-accent-border-light) !important;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.deal-empty-state {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.94)) !important;
    border-color: rgba(203, 213, 225, 0.94) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.deal-stage-empty-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: 0.35rem;
    color: rgba(210, 125, 68, 0.48);
}

.deal-stage-empty-cloud {
    fill: rgba(241, 245, 249, 0.82);
    stroke: rgba(191, 148, 118, 0.34);
    stroke-width: 1.6;
}

.deal-stage-empty-screen {
    fill: rgba(255, 239, 229, 0.9);
    stroke: rgba(186, 112, 63, 0.52);
    stroke-width: 1.7;
}

.deal-stage-empty-stand,
.deal-stage-empty-spark,
.deal-stage-empty-plus {
    stroke: rgba(175, 118, 78, 0.66);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.1;
}

.deal-stage-empty-plus-ring {
    fill: rgba(255, 255, 255, 0.88);
    stroke: rgba(186, 112, 63, 0.34);
    stroke-width: 1.6;
}

.deal-card__meta-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.deal-card__meta-label {
    flex: 0 0 auto;
    white-space: nowrap;
}

.deal-card__meta-value {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deal-card__value-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 9999px;
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(249, 115, 22, 0.24);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(251, 191, 36, 0.24));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    color: #9a3412;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.deal-detail-heading-card {
    background: linear-gradient(180deg, rgba(255, 252, 235, 0.96), rgba(255, 255, 255, 0.94));
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.deal-detail-property-card,
.deal-detail-activity-card,
.deal-detail-meta-card,
.deal-detail-activity-body,
.deal-detail-equation-card,
.deal-detail-empty-rail {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.94));
    border-color: rgba(226, 232, 240, 0.95);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.deal-detail-property-card,
.deal-detail-equation-card {
    backdrop-filter: blur(14px);
}

.deal-detail-activity-body,
.deal-detail-empty-rail {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.92));
    border-style: dashed;
}

.stage-editor-row[open] {
    border-color: rgba(239, 111, 42, 0.3);
    box-shadow: 0 18px 38px rgba(239, 111, 42, 0.12);
}

.stage-editor-row__summary::-webkit-details-marker {
    display: none;
}

.stage-editor-row__summary {
    user-select: none;
}

.stage-editor-row__drag {
    cursor: grab;
    letter-spacing: 0.08em;
}

.stage-editor-row__move {
    flex: 0 0 auto;
}

.stage-editor-row--dragging {
    opacity: 0.82;
    transform: scale(0.995);
}

.stage-editor-row--drop-target {
    border-color: rgba(239, 111, 42, 0.42);
    box-shadow: 0 0 0 3px rgba(239, 111, 42, 0.12);
}

.deal-layout-tool {
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.06);
}

.deal-layout-preview {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.7fr) minmax(180px, 0.9fr);
    align-items: start;
}

.deal-layout-preview__panel,
.deal-detail-placeholder,
.deal-layout-preview-block {
    border-radius: 1.5rem;
}

.deal-layout-preview__panel {
    min-width: 0;
    border: 1px solid rgba(226, 232, 240, 0.88);
    background: rgba(248, 250, 252, 0.88);
    padding: 1rem;
}

.deal-layout-preview__panel--properties {
    min-height: 100%;
}

.deal-layout-quickdock {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deal-layout-quickdock__button {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    border: 1px solid rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.88);
    border-radius: 1.5rem;
    padding: 1rem 1.05rem;
    text-align: left;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.deal-layout-quickdock__button:hover {
    border-color: rgba(239, 111, 42, 0.34);
    box-shadow: 0 18px 32px rgba(239, 111, 42, 0.12);
    transform: translateY(-1px);
}

.deal-layout-quickdock__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 1rem;
    background: rgba(239, 111, 42, 0.12);
    color: #c2410c;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    flex-shrink: 0;
}

.deal-layout-quickdock__copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.deal-layout-quickdock__copy strong {
    font-size: 0.97rem;
}

.deal-layout-quickdock__copy small {
    margin-top: 0.18rem;
    color: rgb(100 116 139);
    font-size: 0.78rem;
    line-height: 1.35;
}

.deal-layout-preview-stack {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.deal-detail-property-layout,
.deal-detail-property-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.deal-detail-property-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.85rem;
    margin-bottom: 0.95rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

.deal-layout-preview-block {
    border: 1px solid rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.86);
    padding: 0.95rem 1rem;
}

.deal-layout-preview-block--heading {
    border-style: dashed;
}

.deal-layout-preview-block--equation {
    box-shadow: inset 0 0 0 1px rgba(239, 111, 42, 0.08);
}

.deal-layout-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    row-gap: 0.5rem;
    column-gap: 0.55rem;
    flex-shrink: 0;
}

.deal-layout-section-header,
.deal-layout-block-header {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.deal-layout-builder-identity {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: 0;
}

.deal-layout-builder-badge {
    flex: 0 0 auto;
}

.deal-layout-builder-copy {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    min-width: 0;
}

.deal-layout-builder-eyebrow {
    color: #ef6f2a;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.deal-layout-builder-title {
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.deal-layout-builder-meta {
    color: rgb(100 116 139);
    font-size: 0.84rem;
    line-height: 1.45;
    letter-spacing: 0.01em;
    text-transform: none;
    overflow-wrap: anywhere;
}

.deal-layout-header-actions [data-layout-toggle],
.deal-layout-header-actions [data-layout-section-toggle],
.deal-layout-header-actions [data-layout-move],
.deal-layout-header-actions [data-layout-section-move],
.deal-layout-header-actions [data-layout-remove],
.deal-layout-header-actions [data-layout-section-remove] {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 1rem;
}

.deal-layout-header-actions [data-layout-remove],
.deal-layout-header-actions [data-layout-section-remove] {
    font-size: 0.95rem;
    line-height: 1;
}

.deal-layout-header-actions [data-layout-move-out] {
    min-height: 2.75rem;
    border-radius: 1rem;
    padding-inline: 0.9rem;
}

.deal-layout-section,
.deal-layout-child-row {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.deal-layout-section--open,
.deal-layout-child-row--open {
    border-color: rgba(239, 111, 42, 0.3);
    box-shadow: 0 20px 36px rgba(239, 111, 42, 0.12);
}

.deal-layout-section [data-layout-section-panel],
.deal-layout-child-row [data-layout-panel] {
    background: rgba(248, 250, 252, 0.78);
    border-radius: 0 0 1.5rem 1.5rem;
}

.deal-layout-builder-dropzone {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    min-height: 5rem;
    border-radius: 1.5rem;
    transition: box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.deal-layout-summary-list {
    display: grid;
    gap: 1rem;
    min-height: 5rem;
    border-radius: 1.5rem;
    transition: box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.deal-layout-builder-dropzone > [data-layout-list-empty] {
    grid-column: 1 / -1;
}

.deal-layout-summary-list > [data-layout-list-empty] {
    grid-column: 1 / -1;
}

.deal-layout-builder-dropzone--active {
    background: rgba(239, 111, 42, 0.06);
    box-shadow: inset 0 0 0 1px rgba(239, 111, 42, 0.18);
}

.deal-layout-summary-row {
    min-width: 0;
}

.deal-layout-builder-card--span-1 {
    grid-column: span 1;
}

.deal-layout-builder-card--span-2 {
    grid-column: span 2;
}

.deal-layout-section-preview,
.deal-layout-preview-card,
.deal-detail-property-section,
.deal-detail-property-block {
    min-width: 0;
}

.deal-layout-section-preview--span-1,
.deal-layout-preview-card--span-1,
.deal-detail-property-section--span-1,
.deal-detail-property-block--span-1 {
    grid-column: span 1;
}

.deal-layout-section-preview--span-2,
.deal-layout-preview-card--span-2,
.deal-detail-property-section--span-2,
.deal-detail-property-block--span-2 {
    grid-column: span 2;
}

.deal-detail-property-section--span-1,
.deal-detail-property-block--span-1,
.deal-detail-property-section--span-2,
.deal-detail-property-block--span-2 {
    grid-column: span 1;
}

.deal-layout-section-preview__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.deal-layout-preview-card,
.deal-detail-property-block {
    border: 1px solid rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.86);
    border-radius: 1.5rem;
    padding: 1rem;
}

.deal-detail-property-section {
    border: 1px dashed rgba(148, 163, 184, 0.52);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 1.5rem;
    padding: 1rem;
}

.deal-detail-property-block--empty {
    border-style: dashed;
    text-align: center;
}

.deal-layout-preview-placeholder {
    border: 1px dashed rgba(148, 163, 184, 0.52);
    background: rgba(255, 255, 255, 0.72);
    padding: 1.15rem;
}

.deal-layout-row__type {
    background: rgba(239, 111, 42, 0.1);
    color: #c2410c;
}

.deal-detail-shell {
    display: grid;
    gap: 1.5rem;
    align-items: start;
    grid-template-columns: minmax(280px, 25fr) minmax(0, 55fr) minmax(220px, 20fr);
}

.deal-detail-panel {
    min-width: 0;
}

.deal-detail-panel--properties,
.deal-detail-panel--integrations {
    position: sticky;
    top: 1rem;
}

html.dark .deal-stage-header,
html[data-theme="dark"] .deal-stage-header {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(73, 39, 18, 0.94), rgba(46, 26, 17, 0.88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 26px rgba(2, 6, 23, 0.22);
}

html.dark .deal-board-arrow,
html[data-theme="dark"] .deal-board-arrow {
    border-color: rgba(51, 65, 85, 0.82);
    background: rgba(15, 23, 42, 0.72);
    color: rgb(226 232 240);
}

html.dark .deal-board-fade--left,
html[data-theme="dark"] .deal-board-fade--left {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0));
}

html.dark .deal-board-fade--right,
html[data-theme="dark"] .deal-board-fade--right {
    background: linear-gradient(270deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0));
}

html.dark .deal-stage-dot,
html[data-theme="dark"] .deal-stage-dot {
    box-shadow: 0 0 0 5px var(--deal-accent-surface-dark);
}

html.dark .deal-card__value-badge,
html[data-theme="dark"] .deal-card__value-badge {
    border-color: rgba(251, 146, 60, 0.28);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(234, 179, 8, 0.18));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    color: #fdba74;
}

html.dark .deal-card:hover,
html[data-theme="dark"] .deal-card:hover {
    border-color: var(--deal-accent-border-dark);
}

html.dark .deal-stage-status-dot,
html[data-theme="dark"] .deal-stage-status-dot {
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.5);
}

html.dark .deal-stage-description-trigger,
html[data-theme="dark"] .deal-stage-description-trigger {
    border-color: rgba(251, 146, 60, 0.24);
    background: rgba(15, 23, 42, 0.68);
    color: rgba(253, 186, 116, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html.dark .deal-stage-empty-illustration,
html[data-theme="dark"] .deal-stage-empty-illustration {
    color: rgba(251, 146, 60, 0.4);
}

html.dark .deal-stage-empty-cloud,
html[data-theme="dark"] .deal-stage-empty-cloud {
    fill: rgba(30, 41, 59, 0.82);
    stroke: rgba(148, 163, 184, 0.24);
}

html.dark .deal-stage-empty-screen,
html[data-theme="dark"] .deal-stage-empty-screen {
    fill: rgba(69, 39, 28, 0.84);
    stroke: rgba(251, 146, 60, 0.36);
}

html.dark .deal-stage-empty-stand,
html.dark .deal-stage-empty-spark,
html.dark .deal-stage-empty-plus,
html[data-theme="dark"] .deal-stage-empty-stand,
html[data-theme="dark"] .deal-stage-empty-spark,
html[data-theme="dark"] .deal-stage-empty-plus {
    stroke: rgba(251, 146, 60, 0.58);
}

html.dark .deal-stage-empty-plus-ring,
html[data-theme="dark"] .deal-stage-empty-plus-ring {
    fill: rgba(15, 23, 42, 0.9);
    stroke: rgba(148, 163, 184, 0.24);
}

html.dark .deal-detail-heading-card,
html[data-theme="dark"] .deal-detail-heading-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    border-color: rgba(245, 158, 11, 0.28);
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.34);
}

html.dark .deal-detail-property-card,
html.dark .deal-detail-activity-card,
html.dark .deal-detail-meta-card,
html.dark .deal-detail-activity-body,
html.dark .deal-detail-equation-card,
html.dark .deal-detail-empty-rail,
html[data-theme="dark"] .deal-detail-property-card,
html[data-theme="dark"] .deal-detail-activity-card,
html[data-theme="dark"] .deal-detail-meta-card,
html[data-theme="dark"] .deal-detail-activity-body,
html[data-theme="dark"] .deal-detail-equation-card,
html[data-theme="dark"] .deal-detail-empty-rail {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.92));
    border-color: rgba(51, 65, 85, 0.92);
    box-shadow: 0 22px 44px rgba(2, 6, 23, 0.4);
}

html.dark .deal-detail-activity-body,
html.dark .deal-detail-empty-rail,
html[data-theme="dark"] .deal-detail-activity-body,
html[data-theme="dark"] .deal-detail-empty-rail {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.84));
}

html.dark .stage-editor-row[open],
html[data-theme="dark"] .stage-editor-row[open] {
    border-color: rgba(251, 146, 60, 0.28);
    box-shadow: 0 18px 38px rgba(251, 146, 60, 0.16);
}

html.dark .stage-editor-row--drop-target,
html[data-theme="dark"] .stage-editor-row--drop-target {
    border-color: rgba(251, 146, 60, 0.42);
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.14);
}

html.dark .deal-layout-preview__panel,
html[data-theme="dark"] .deal-layout-preview__panel {
    border-color: rgba(51, 65, 85, 0.82);
    background: rgba(15, 23, 42, 0.72);
}

html.dark .deal-layout-builder-title,
html[data-theme="dark"] .deal-layout-builder-title {
    color: #f8fafc;
}

html.dark .deal-layout-builder-meta,
html[data-theme="dark"] .deal-layout-builder-meta {
    color: rgb(148 163 184);
}

html.dark .deal-layout-quickdock__button,
html[data-theme="dark"] .deal-layout-quickdock__button {
    border-color: rgba(51, 65, 85, 0.82);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 18px 30px rgba(2, 6, 23, 0.22);
}

html.dark .deal-layout-quickdock__copy small,
html[data-theme="dark"] .deal-layout-quickdock__copy small {
    color: rgb(148 163 184);
}

html.dark .deal-layout-quickdock__icon,
html[data-theme="dark"] .deal-layout-quickdock__icon {
    background: rgba(239, 111, 42, 0.18);
    color: #fdba74;
}

html.dark .deal-layout-preview-card,
html.dark .deal-detail-property-block,
html[data-theme="dark"] .deal-layout-preview-card,
html[data-theme="dark"] .deal-detail-property-block {
    border-color: rgba(51, 65, 85, 0.82);
    background: rgba(15, 23, 42, 0.82);
}

html.dark .deal-layout-preview-block,
html[data-theme="dark"] .deal-layout-preview-block {
    border-color: rgba(51, 65, 85, 0.82);
    background: rgba(15, 23, 42, 0.82);
}

html.dark .deal-detail-property-section,
html[data-theme="dark"] .deal-detail-property-section {
    border-color: rgba(71, 85, 105, 0.62);
    background: rgba(2, 6, 23, 0.68);
}

html.dark .deal-detail-property-section__header,
html[data-theme="dark"] .deal-detail-property-section__header {
    border-bottom-color: rgba(51, 65, 85, 0.82);
}

html.dark .deal-layout-section [data-layout-section-panel],
html.dark .deal-layout-child-row [data-layout-panel],
html[data-theme="dark"] .deal-layout-section [data-layout-section-panel],
html[data-theme="dark"] .deal-layout-child-row [data-layout-panel] {
    background: rgba(2, 6, 23, 0.46);
}

html.dark .deal-layout-builder-dropzone--active,
html[data-theme="dark"] .deal-layout-builder-dropzone--active {
    background: rgba(239, 111, 42, 0.08);
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.24);
}

html.dark .deal-layout-preview-placeholder,
html[data-theme="dark"] .deal-layout-preview-placeholder {
    border-color: rgba(71, 85, 105, 0.62);
    background: rgba(2, 6, 23, 0.68);
}

html.dark .deal-layout-row__type,
html[data-theme="dark"] .deal-layout-row__type {
    background: rgba(239, 111, 42, 0.18);
    color: #fdba74;
}

@media (max-width: 767px) {
    .deal-stage-column {
        width: 17.25rem;
        min-width: 17.25rem;
        max-width: 17.25rem;
    }

    .deal-board-arrow {
        width: 2.65rem;
        height: 2.65rem;
    }

    .deal-board-fade {
        width: 3.5rem;
    }

    .deal-card {
        min-height: 8rem;
    }
}

@media (min-width: 640px) {
    .app-shell-header {
        margin-inline: -1.5rem;
        margin-top: -1rem;
        padding-inline: 1.5rem;
    }
}

@media (max-width: 1023px) {
    .deal-layout-preview,
    .deal-detail-shell {
        grid-template-columns: 1fr;
    }

    .deal-layout-section-header,
    .deal-layout-block-header {
        grid-template-columns: 1fr;
    }

    .deal-layout-header-actions {
        justify-content: flex-start;
    }

    .deal-layout-quickdock {
        grid-template-columns: 1fr;
    }

    .deal-layout-preview-stack,
    .deal-layout-section-preview__grid,
    .deal-layout-builder-dropzone,
    .deal-detail-property-layout,
    .deal-detail-property-grid {
        grid-template-columns: 1fr;
    }

    .deal-layout-builder-card--span-1,
    .deal-layout-builder-card--span-2,
    .deal-layout-section-preview--span-1,
    .deal-layout-preview-card--span-1,
    .deal-detail-property-section--span-1,
    .deal-detail-property-block--span-1,
    .deal-layout-section-preview--span-2,
    .deal-layout-preview-card--span-2,
    .deal-detail-property-section--span-2,
    .deal-detail-property-block--span-2 {
        grid-column: span 1;
    }

    .deal-detail-panel--properties,
    .deal-detail-panel--integrations {
        position: static;
    }
}

@media (min-width: 1024px) {
    .app-shell-header {
        margin-inline: -2rem;
        padding-inline: 2rem;
    }
}

@media (min-width: 1600px) {
    .deal-detail-property-layout,
    .deal-detail-property-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .deal-detail-property-section--span-1,
    .deal-detail-property-block--span-1 {
        grid-column: span 1;
    }

    .deal-detail-property-section--span-2,
    .deal-detail-property-block--span-2 {
        grid-column: span 2;
    }
}

