h1:focus {
    outline: none;
}

.sales-deal-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.sales-deal-preview-card {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--pm-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
}

.sales-deal-preview-card.wide {
    grid-column: 1 / -1;
}

.sales-deal-preview-card strong,
.sales-deal-preview-card span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sales-preview-label {
    color: var(--pm-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sales-preview-card-header,
.sales-preview-pill-row,
.deal-share-pill-row,
.deal-share-add-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

.sales-preview-card-header {
    justify-content: space-between;
}

@media (max-width: 900px) {
    html:not([data-view-mode="desktop"]) .nav-brand-lockup {
        display: none;
    }
}

/* Field Console shell: match the approved dashboard concept */
:where(html[data-color-theme="pm-brand"], .theme-pm-brand),
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) body,
.theme-pm-brand.page,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) main,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content {
    background: #f8f7f3;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sidebar {
    background: #252321;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content {
    padding-top: 1rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
    border: 0;
    border-radius: 0;
    background: #252321;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-more-summary:hover {
    background: transparent;
    color: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active {
    background: transparent;
    box-shadow: inset 0 -4px 0 var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active .nav-icon,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active .nav-label {
    color: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active .nav-icon {
    color: var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .app-modal-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .identity-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-entry-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-action-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-action-add-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-entry-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-entry-group,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-entry-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .settings-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table-wrapper,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .add-record-panel {
    border-color: #dccdb9;
    background: #ffffff;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-item,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-summary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-summary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-detail-tile,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-note-card {
    border-color: #dfd1bf;
    background: #fffefa;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-header {
    border-bottom: 0;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-section-title::before {
    background: var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-primary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-success,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-info,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-start {
    border-color: #275332;
    background: #275c35;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-primary:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-success:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-info:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-start:hover {
    border-color: #1d4127;
    background: #214b2c;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-secondary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-dark,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-link {
    border-color: #d0bfa8;
    background: #ffffff;
    color: #3a342f;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-control,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-select {
    border-color: #d5c5b0;
    background: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-queue-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-work-orders-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .accounting-queue-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-entry-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-used-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table {
    background: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-queue-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-work-orders-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .accounting-queue-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-entry-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-used-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table th {
    background: #f3eee6;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .bottom-preference-actions {
    border-color: #d7c7b2;
    background: #ffffff;
    box-shadow: none;
}

@media (min-width: 901px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sidebar {
        position: sticky;
        top: 0;
        z-index: 100;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
        min-height: 78px;
        margin: 0;
        padding: 0.62rem 1.25rem !important;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-brand-lockup {
        width: 230px;
        height: 48px;
        margin-right: 1.25rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-brand-lockup img {
        width: 230px;
        height: 48px;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link {
        min-height: 52px;
        padding: 0.45rem 0.85rem;
        border-radius: 0;
    }
}

@media (max-width: 900px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sidebar {
        background: #f8f7f3;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
        border-radius: 8px;
    }
}

/* Field Console fidelity pass: typography, density, and hierarchy */
:where(html[data-color-theme="pm-brand"], .theme-pm-brand),
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) button,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) input,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) select,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) textarea {
    font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) body,
.theme-pm-brand.page {
    background: #f1eee7;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h1,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h2,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h3,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h4,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h5,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h6,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) strong {
    font-family: inherit;
    letter-spacing: 0;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content {
    padding-inline: 1.2rem !important;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
    gap: 0.28rem;
    min-height: 64px;
    margin-bottom: 0.85rem;
    padding: 0.48rem 0.7rem !important;
    border-radius: 7px;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-brand-lockup {
    width: 212px;
    height: 40px;
    margin-right: 0.3rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-brand-lockup img {
    width: 212px;
    height: 40px;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link {
    min-height: 40px;
    padding: 0.38rem 0.68rem;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 650;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-icon {
    width: 19px;
    height: 19px;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .app-modal-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .identity-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .settings-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table-wrapper,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-section {
    border-color: #d9cbb8;
    background: #fffdfa;
    box-shadow: 0 2px 6px rgba(58, 52, 47, 0.055);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-card ~ .card {
    padding: 0.82rem 0.95rem !important;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-card {
    min-height: 58px;
    padding: 0.62rem 0.9rem !important;
    border-left-width: 3px;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-button,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-active .btn {
    min-height: 34px;
    height: 34px;
    padding: 0.3rem 0.68rem;
    font-size: 0.8rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-header {
    min-height: 30px;
    margin-bottom: 0.58rem;
    padding-bottom: 0.32rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-section-title {
    font-size: 0.98rem;
    font-weight: 800;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .add-job-bar {
    min-height: 36px;
    padding-block: 0.25rem;
    font-size: 0.84rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-list {
    gap: 0.3rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-summary {
    min-height: 38px;
    padding: 0.28rem 0.42rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-summary-main {
    min-height: 26px;
    gap: 0.42rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-primary {
    font-size: 0.86rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-description,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-status,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-tech {
    font-size: 0.76rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-start,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-archive {
    min-height: 28px;
    border-radius: 4px;
    font-size: 0.74rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-archive {
    width: 32px;
    min-width: 32px;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-status-count {
    padding: 0.08rem 0.38rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-control,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-select {
    min-height: 36px;
    border-color: #cfbea7;
    background: #fffefa;
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) label,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-detail-label,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-field-title {
    color: #62584f;
    font-weight: 750;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table {
    border-collapse: separate;
    border-spacing: 0;
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table th {
    padding-block: 0.48rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table td,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table td,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table td {
    padding-block: 0.46rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content > h1:first-child {
    padding: 0.3rem 0.8rem 0.34rem 0.65rem;
    border-left-width: 4px;
    border-radius: 0 5px 5px 0;
    background: #fffdfa;
    font-size: clamp(1.45rem, 2vw, 2rem);
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content > h1:first-child::after {
    height: 3px;
}

@media (max-width: 900px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content {
        padding-inline: 0.65rem !important;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
        min-height: 58px;
        padding: 0.34rem !important;
        border-radius: 8px;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-utility-link {
        min-height: 50px;
        padding: 0.3rem 0.16rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-card ~ .card {
        padding: 0.72rem !important;
    }
}

.sales-deal-dashboard-details {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.55rem;
    border-top: 1px solid rgba(183, 150, 94, 0.22);
    background: rgba(255, 252, 246, 0.58);
}

.sales-deal-dashboard-card {
    display: grid;
    gap: 0.38rem;
    min-width: 0;
    padding: 0.5rem 0.58rem;
    border: 1px solid rgba(183, 150, 94, 0.34);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 246, 0.78));
    box-shadow: inset 3px 0 0 rgba(217, 119, 31, 0.22);
}

.sales-deal-dashboard-card.action-card,
.sales-deal-dashboard-card.note-card {
    grid-column: span 2;
}

.sales-deal-dashboard-card.note-card > span {
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: normal;
    color: #374151;
    font-weight: 700;
}

.sales-dashboard-edit-control {
    min-height: 30px;
    padding: 0.24rem 0.42rem;
    border-color: rgba(183, 150, 94, 0.54);
    border-radius: 7px;
    background-color: rgba(255, 255, 255, 0.94);
    color: #111827;
    font-size: 0.84rem;
    font-weight: 800;
}

.sales-action-toggle {
    width: 100%;
    border-color: rgba(183, 150, 94, 0.34);
    background: rgba(255, 255, 255, 0.9);
    text-align: left;
    cursor: pointer;
}

.sales-action-toggle.selected {
    border-color: rgba(31, 122, 61, 0.38);
    background: rgba(31, 122, 61, 0.08);
}

.sales-deal-dashboard-actions {
    justify-content: flex-end;
    padding: 0.5rem 0.55rem 0.6rem;
    border-top: 1px solid rgba(183, 150, 94, 0.18);
}

.sales-preview-pill,
.deal-share-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    padding: 0.22rem 0.5rem;
    border: 1px solid rgba(45, 45, 45, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--pm-ink);
    font-size: 0.82rem;
    font-weight: 700;
}

button.sales-preview-pill {
    cursor: pointer;
    text-align: left;
}

.sales-preview-pill.done {
    border-color: rgba(31, 131, 69, 0.28);
    background: rgba(31, 131, 69, 0.08);
    color: var(--pm-green);
}

.deal-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.deal-info-grid-compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
}

.deal-info-card {
    position: relative;
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(183, 150, 94, 0.34);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 252, 246, 0.76));
    box-shadow: 0 5px 14px rgba(42, 32, 18, 0.06);
}

.deal-info-card.compact {
    padding: 0.42rem 0.55rem;
}

.deal-info-card.wide {
    grid-column: span 2;
}

.deal-info-card strong {
    color: var(--pm-muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.deal-info-card span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.secondary-sales-card {
    align-content: start;
}

.secondary-sales-title {
    margin: 0;
    font-size: 0.86rem;
}

.secondary-sales-card .deal-share-inline-row {
    margin-top: 0.1rem;
}

.deal-share-panel {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.55rem;
    padding: 0.55rem;
    border: 1px solid var(--pm-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.66);
}

.deal-share-panel .section-header {
    margin-bottom: 0;
}

.deal-share-panel .sales-panel-title {
    font-size: 0.98rem;
}

.deal-share-inline-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.deal-share-pill button {
    display: inline-grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    border: 0;
    border-radius: 999px;
    background: rgba(172, 44, 44, 0.1);
    color: var(--pm-red);
    font-weight: 900;
    line-height: 1;
}

.deal-share-add-row {
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.compact-share-select {
    width: min(15rem, 36vw);
}

.notification-list {
    display: grid;
    gap: 0.55rem;
}

.notification-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.7rem;
    border: 1px solid var(--pm-border);
    border-left: 4px solid var(--pm-muted);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.notification-card.unread {
    border-left-color: var(--pm-orange);
    background: rgba(255, 250, 240, 0.94);
}

.notification-main {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.notification-main span,
.notification-main strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-category {
    width: fit-content;
    padding: 0.14rem 0.45rem;
    border-radius: 999px;
    background: rgba(31, 131, 69, 0.1);
    color: var(--pm-green);
    font-size: 0.72rem;
    font-weight: 800;
}

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.notification-toolbar {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-left: auto;
}

.notification-toolbar .form-select {
    width: auto;
    min-width: 8rem;
}

@media (max-width: 700px) {
    .sales-deal-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-deal-preview-card {
        padding: 0.34rem 0.42rem;
    }

    .deal-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .deal-info-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .deal-info-card.wide {
        grid-column: 1 / -1;
    }

    .deal-share-inline-row {
        grid-template-columns: 1fr;
    }

    .deal-share-add-row {
        justify-content: stretch;
    }

    .compact-share-select {
        width: 100%;
    }

    .notification-card {
        grid-template-columns: 1fr;
    }

    .notification-actions {
        justify-content: stretch;
    }

    .notification-actions .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .notification-toolbar {
        width: 100%;
        justify-content: stretch;
    }

    .notification-toolbar .form-select,
    .notification-toolbar .btn {
        flex: 1 1 0;
    }
}

.d-none {
    display: none !important;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.card {
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
    padding: 1rem;
    margin-bottom: 1rem;
}

.content > h1:first-child {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    max-width: 100%;
    margin: 0.1rem 0 1rem;
    padding: 0.32rem 0.9rem 0.38rem 0.72rem;
    border-left: 5px solid #198754;
    border-bottom: 1px solid #d0d7de;
    border-radius: 0 10px 10px 0;
    background: #fbfcfe;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.05);
    color: #111827;
    font-size: clamp(1.55rem, 2.1vw, 2.25rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.05;
}

.content > h1:first-child::after {
    content: "";
    display: block;
    width: clamp(32px, 5vw, 76px);
    height: 4px;
    border-radius: 999px;
    background: #d9771f;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #d0d7de;
    border-radius: 16px;
    background: #f8fafc;
}

.nav-link {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0.45rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #1f2937;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    border-color: #c9d7ee;
    background: #eef6ff;
    color: #084298;
}

.nav-link.active {
    border-color: #8bb7f0;
    background: #e7f1ff;
    color: #084298;
    font-weight: 700;
}

.nav-icon-defs {
    display: none;
}

.nav-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-label {
    line-height: 1;
}

.nav-icon-wrap {
    position: relative;
    display: inline-grid;
    place-items: center;
}

.nav-notification-badge {
    position: absolute;
    top: -0.55rem;
    right: -0.72rem;
    display: inline-grid;
    place-items: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.22rem;
    border: 2px solid #f8fafc;
    border-radius: 999px;
    background: #d9771f;
    color: #ffffff;
    font-size: 0.64rem;
    font-weight: 900;
    line-height: 1;
}

.nav-mode-mobile-bar {
    display: none;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 40px;
    margin: -0.55rem auto 1rem;
    padding: 0.32rem 0.65rem;
    border: 1px solid #d9771f;
    border-radius: 14px;
    background: #d9771f;
    color: #ffffff;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(217, 119, 31, 0.18);
}

.nav-mode-mobile-bar:hover,
.nav-mode-mobile-bar.active {
    border-color: #b85f12;
    background: #b85f12;
    color: #ffffff;
}

.nav-mode-switch-desktop {
    margin-left: auto;
}

.nav-more {
    position: relative;
    margin-left: auto;
}

.nav-mode-switch-desktop + .nav-more {
    margin-left: 0;
}

.nav-more > summary {
    list-style: none;
}

.nav-more > summary::-webkit-details-marker {
    display: none;
}

.nav-more-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 20;
    overflow: hidden;
    min-width: 220px;
    padding: 0.45rem;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}

.nav-more:not([open]) .nav-more-menu {
    display: none;
}

.nav-utility-cluster {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-utility-link {
    position: relative;
    width: 44px;
    min-width: 44px;
    padding-right: 0;
    padding-left: 0;
}

.nav-utility-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.nav-menu-link {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 40px;
    padding: 0.5rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #1f2937;
    text-align: left;
    text-decoration: none;
}

.nav-more-menu form {
    box-sizing: border-box;
    width: 100%;
}

.nav-menu-link:hover,
.nav-menu-link.active {
    border-color: #c9d7ee;
    background: #eef6ff;
    color: #084298;
}

.nav-menu-button {
    font: inherit;
    cursor: pointer;
}

.nav-more-menu form {
    margin: 0;
}

.nav-logout {
    width: 100%;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.nav-account form {
    margin: 0;
}

.feature-chat-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
    gap: 1rem;
    align-items: start;
}

.feature-chat-compose,
.feature-chat-log {
    display: grid;
    gap: 0.75rem;
}

.feature-chat-input {
    resize: vertical;
}

.feature-chat-compose-actions,
.feature-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.feature-chat-compose-actions span,
.feature-chat-header span {
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 750;
}

.feature-chat-list {
    display: grid;
    gap: 0.55rem;
    max-height: min(68vh, 760px);
    overflow-y: auto;
    padding-right: 0.2rem;
}

.feature-chat-message {
    display: grid;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    background: #fbfcfe;
}

.feature-chat-message.done {
    border-color: #c7d7c9;
    background: #f4fbf5;
    opacity: 0.88;
}

.feature-chat-message.in-progress {
    border-color: #e6b26c;
    background: #fff8ed;
}

.feature-chat-message.not-finished {
    border-color: #d0d7de;
    background: #fbfcfe;
}

.feature-chat-message-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.65rem;
}

.feature-chat-message-meta > div {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}

.feature-chat-message-meta strong {
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-size: 0.9rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feature-chat-message-meta > div > span,
.feature-chat-edited {
    flex: 0 0 auto;
    color: #6b7280;
    font-size: 0.76rem;
    font-weight: 750;
}

.feature-chat-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.14rem 0.48rem;
    border: 1px solid #d8c8ad;
    border-radius: 999px;
    background: #f3ead8;
    color: #4f4638;
    font-size: 0.72rem;
    font-weight: 900;
}

.feature-chat-status.done {
    border-color: #87c99b;
    background: #eaf6ee;
    color: #14532d;
}

.feature-chat-status.in-progress {
    border-color: #e6b26c;
    background: #fff4df;
    color: #8a4b0f;
}

.feature-chat-status.not-finished {
    border-color: #cbd5e1;
    background: #f3f4f6;
    color: #374151;
}

.feature-chat-message p {
    margin: 0;
    color: #1f2937;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.feature-chat-message.done p {
    color: #4b5563;
}

.feature-chat-notes {
    position: relative;
    display: grid;
    gap: 0.18rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.feature-chat-notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.feature-chat-notes strong,
.feature-chat-notes-edit-panel label {
    color: #4b5563;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.feature-chat-notes p {
    margin: 0;
    color: #1f2937;
    font-size: 0.86rem;
    white-space: pre-wrap;
}

.feature-chat-notes-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 24px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-weight: 900;
    line-height: 1;
}

.feature-chat-notes-menu-button:hover {
    border-color: #94a3b8;
    background: #eef2f7;
}

.feature-chat-notes-menu {
    position: absolute;
    top: 2rem;
    right: 0.55rem;
    z-index: 5;
    display: grid;
    min-width: 104px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.feature-chat-notes-menu button {
    border: 0;
    background: transparent;
    padding: 0.45rem 0.65rem;
    color: #1f2937;
    font-size: 0.86rem;
    font-weight: 800;
    text-align: left;
}

.feature-chat-notes-menu button:hover {
    background: #f1f5f9;
}

.feature-chat-notes-edit-panel label {
    display: grid;
    gap: 0.32rem;
    margin: 0;
}

.feature-chat-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.feature-chat-filter,
.feature-chat-status-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.feature-chat-filter {
    align-items: center;
    padding: 0.45rem;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #f8fafc;
}

.feature-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.28rem 0.68rem;
    border: 1px solid #d0d7de;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.feature-status-chip:hover,
.feature-status-chip:focus-visible {
    transform: translateY(-1px);
}

.feature-status-chip.all.selected {
    border-color: #1f2937;
    background: #1f2937;
    color: #ffffff;
}

.feature-status-chip.not-finished.selected {
    border-color: #64748b;
    background: #64748b;
    color: #ffffff;
}

.feature-status-chip.in-progress.selected {
    border-color: #cf7c21;
    background: #cf7c21;
    color: #ffffff;
}

.feature-status-chip.done.selected {
    border-color: #17803d;
    background: #17803d;
    color: #ffffff;
}

.feature-status-chip.in-progress:not(.selected) {
    border-color: #f0c894;
    background: #fff8ed;
    color: #8a4b0f;
}

.feature-status-chip.done:not(.selected) {
    border-color: #aad7b8;
    background: #f0fbf3;
    color: #14532d;
}

.feature-chat-edit-panel {
    display: grid;
    gap: 0.45rem;
    padding: 0.5rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.top-row-controls-only {
    justify-content: flex-end;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}

.app-brand img {
    display: block;
    width: min(280px, 46vw);
    height: auto;
    max-height: 58px;
    object-fit: contain;
}

.top-row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.top-row-actions form {
    margin: 0;
}

.bottom-preference-bar {
    display: flex;
    justify-content: center;
    padding: 1rem 0.75rem 1.25rem;
}

.bottom-preference-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    max-width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid #d0d7de;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}

.view-mode-control {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
}

.identity-page {
    display: grid;
    place-items: start center;
    min-height: calc(100vh - 210px);
    padding: 1.25rem 0.75rem 2rem;
}

.identity-card {
    width: min(100%, 420px);
    padding: 1.25rem;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.identity-brand {
    position: relative;
    width: min(100%, 320px);
    height: 62px;
    margin: 0 auto 0.45rem;
    overflow: hidden;
}

.identity-brand img {
    position: absolute;
    top: 50%;
    left: 0;
    display: block;
    width: 100%;
    height: auto;
    mix-blend-mode: multiply;
    transform: translateY(-50%);
}

.identity-header {
    margin-bottom: 1rem;
    text-align: center;
}

.identity-header h1 {
    margin: 0;
    font-size: clamp(2rem, 8vw, 2.7rem);
    line-height: 1;
}

.identity-header p {
    margin: 0.35rem 0 0;
    color: #5b6776;
    font-weight: 700;
}

.identity-field {
    display: grid;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.identity-field label {
    color: #374151;
    font-size: 0.82rem;
    font-weight: 800;
}

.identity-field .form-control {
    max-width: none;
    min-height: 42px;
    margin-bottom: 0;
}

.identity-validation {
    margin-bottom: 0.75rem;
}

.identity-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.15rem 0 0.85rem;
    color: #374151;
    font-weight: 700;
}

.identity-submit {
    width: 100%;
    min-height: 42px;
    font-weight: 800;
}

.identity-divider {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.9rem 0 0.35rem;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.identity-divider::before,
.identity-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.identity-passkey {
    display: block;
    width: fit-content;
    margin: 0 auto 0.75rem;
}

.identity-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 0.8rem;
    padding-top: 0.65rem;
    border-top: 1px solid #eef1f4;
    font-size: 0.9rem;
    font-weight: 700;
}

.identity-external {
    margin-top: 0.75rem;
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
}

/* Public product landing and sign-in experience */
.login-marketing-shell .sidebar {
    display: none;
}

.login-marketing-shell > main,
.login-marketing-shell .content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 !important;
    background: #f7f4ed !important;
}

.login-marketing-page {
    --login-ink: #242321;
    --login-muted: #68645e;
    --login-green: #275c35;
    --login-green-dark: #183f24;
    --login-green-soft: #eaf2e8;
    --login-orange: #d9771f;
    --login-line: #ded5c7;
    overflow: hidden;
    background: #f7f4ed;
    color: var(--login-ink);
}

.login-marketing-page *,
.login-marketing-page *::before,
.login-marketing-page *::after {
    box-sizing: border-box;
}

.login-marketing-nav {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    align-items: center;
    gap: 1.5rem;
    min-height: 74px;
    padding: 0.7rem clamp(1.2rem, 5vw, 5.5rem);
    background: #292724;
    color: #ffffff;
}

.login-marketing-brand {
    position: relative;
    display: block;
    width: 220px;
    height: 48px;
    overflow: hidden;
}

.login-marketing-brand img {
    position: absolute;
    top: 50%;
    left: 0;
    display: block;
    width: 220px;
    height: auto;
    transform: translateY(-50%);
}

.login-marketing-nav nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 2vw, 2rem);
}

.login-marketing-nav nav a {
    color: #e9e5dd;
    font-size: 0.86rem;
    font-weight: 750;
    text-decoration: none;
}

.login-marketing-nav nav a:hover {
    color: #ffffff;
}

.login-marketing-nav-cta {
    justify-self: end;
    padding: 0.58rem 0.92rem;
    border: 1px solid #e58a37;
    border-radius: 6px;
    background: var(--login-orange);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 850;
    text-decoration: none;
}

.login-marketing-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    grid-template-areas:
        "copy signin"
        "preview signin";
    align-items: start;
    gap: clamp(2rem, 5vw, 5.5rem);
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1.2rem, 5vw, 5.5rem) 4rem;
}

.login-marketing-hero::before {
    content: "";
    position: absolute;
    top: -220px;
    left: -300px;
    width: 760px;
    height: 760px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(39, 92, 53, 0.15), rgba(39, 92, 53, 0) 67%);
    pointer-events: none;
}

.login-hero-copy {
    position: relative;
    z-index: 1;
    grid-area: copy;
    min-width: 0;
}

.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--login-orange);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.login-eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: currentColor;
}

.login-hero-copy > h1 {
    max-width: 930px;
    margin: 0.8rem 0 1rem;
    color: var(--login-ink);
    font-size: clamp(2.75rem, 5.6vw, 5.6rem);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 0.96;
}

.login-hero-lead {
    max-width: 780px;
    margin: 0;
    color: var(--login-muted);
    font-size: clamp(1rem, 1.45vw, 1.22rem);
    line-height: 1.65;
}

.login-hero-actions,
.login-final-cta > div:last-child {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.login-primary-cta,
.login-secondary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 46px;
    padding: 0.65rem 1.05rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 850;
    text-decoration: none;
}

.login-primary-cta {
    border: 1px solid var(--login-green-dark);
    background: var(--login-green);
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(24, 63, 36, 0.18);
}

.login-primary-cta:hover {
    background: var(--login-green-dark);
    color: #ffffff;
}

.login-primary-cta span {
    font-size: 1.15rem;
    transition: transform 140ms ease;
}

.login-primary-cta:hover span {
    transform: translateX(3px);
}

.login-secondary-cta {
    border: 1px solid #c9beae;
    background: rgba(255, 255, 255, 0.62);
    color: var(--login-ink);
}

.login-secondary-cta:hover {
    border-color: #9f917e;
    color: var(--login-green-dark);
}

.login-value-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin: 1.45rem 0 1.8rem;
    color: #4f4b45;
    font-size: 0.8rem;
    font-weight: 750;
}

.login-value-points span {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

.login-value-points i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--login-orange);
    box-shadow: 0 0 0 3px rgba(217, 119, 31, 0.12);
}

.login-dashboard-preview {
    grid-area: preview;
    overflow: hidden;
    border: 1px solid #cbc1b4;
    border-radius: 12px;
    background: #fdfcf9;
    box-shadow: 0 28px 65px rgba(55, 48, 38, 0.16);
    transform: perspective(1400px) rotateX(1deg) rotateY(1.2deg);
    transform-origin: center bottom;
}

.login-preview-topbar {
    display: grid;
    grid-template-columns: max-content 1fr max-content;
    align-items: center;
    gap: 1rem;
    min-height: 48px;
    padding: 0.45rem 0.7rem;
    background: #292724;
    color: #ffffff;
}

.login-preview-brand-mark,
.login-preview-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 0.66rem;
    font-weight: 950;
}

.login-preview-brand-mark {
    background: linear-gradient(135deg, var(--login-green), #438354);
    box-shadow: inset 0 -2px 0 var(--login-orange);
}

.login-preview-avatar {
    border-radius: 50%;
    background: #efe7d9;
    color: #443d34;
}

.login-preview-nav-tabs {
    display: flex;
    align-items: stretch;
    gap: 0.2rem;
    min-width: 0;
}

.login-preview-nav-tabs span {
    padding: 0.5rem 0.55rem;
    color: #bfbab1;
    font-size: 0.58rem;
    font-weight: 750;
}

.login-preview-nav-tabs span.active {
    border-bottom: 2px solid var(--login-orange);
    color: #ffffff;
}

.login-preview-body {
    padding: 0.85rem;
}

.login-preview-heading,
.login-preview-panel-title,
.login-mock-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.login-preview-heading > div {
    display: grid;
    gap: 0.08rem;
}

.login-preview-heading small,
.login-preview-heading strong {
    display: block;
}

.login-preview-heading small {
    color: #8a8175;
    font-size: 0.57rem;
}

.login-preview-heading strong {
    font-size: 0.86rem;
}

.login-preview-heading > span {
    padding: 0.38rem 0.55rem;
    border-radius: 4px;
    background: var(--login-green);
    color: #ffffff;
    font-size: 0.55rem;
    font-weight: 800;
}

.login-preview-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0.75rem 0;
}

.login-preview-metrics > div {
    display: grid;
    gap: 0.08rem;
    padding: 0.55rem;
    border: 1px solid #e1d9cd;
    border-radius: 6px;
    background: #ffffff;
}

.login-preview-metrics small,
.login-preview-metrics span {
    color: #82796e;
    font-size: 0.5rem;
}

.login-preview-metrics strong {
    color: var(--login-green-dark);
    font-size: 1.12rem;
}

.login-preview-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(160px, 0.7fr);
    gap: 0.55rem;
}

.login-preview-panel {
    overflow: hidden;
    border: 1px solid #e1d9cd;
    border-radius: 6px;
    background: #ffffff;
}

.login-preview-panel-title {
    min-height: 34px;
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid #ebe5db;
}

.login-preview-panel-title strong {
    font-size: 0.61rem;
}

.login-preview-panel-title span {
    color: var(--login-green);
    font-size: 0.5rem;
    font-weight: 800;
}

.login-preview-row {
    display: grid;
    grid-template-columns: 7px minmax(0, 1fr) max-content;
    align-items: center;
    gap: 0.45rem;
    padding: 0.48rem 0.55rem;
    border-bottom: 1px solid #f0ece6;
}

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

.login-preview-row > i {
    width: 6px;
    height: 25px;
    border-radius: 99px;
}

.login-preview-row > i.priority-high {
    background: var(--login-orange);
}

.login-preview-row > i.priority-normal {
    background: #659370;
}

.login-preview-row > div {
    display: grid;
    min-width: 0;
    gap: 0.06rem;
}

.login-preview-row strong,
.login-preview-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-preview-row strong {
    font-size: 0.56rem;
}

.login-preview-row small,
.login-preview-row > span {
    color: #857c70;
    font-size: 0.48rem;
}

.login-preview-activity > div:not(.login-preview-panel-title) {
    display: grid;
    grid-template-columns: 7px minmax(0, 1fr) max-content;
    align-items: start;
    gap: 0.4rem;
    padding: 0.47rem 0.5rem;
}

.login-preview-activity > div > i {
    width: 7px;
    height: 7px;
    margin-top: 0.18rem;
    border-radius: 50%;
    background: var(--login-orange);
}

.login-preview-activity p {
    display: grid;
    gap: 0.06rem;
    min-width: 0;
    margin: 0;
}

.login-preview-activity strong,
.login-preview-activity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-preview-activity strong {
    font-size: 0.52rem;
}

.login-preview-activity small,
.login-preview-activity time {
    color: #857c70;
    font-size: 0.45rem;
}

.login-signin-card {
    position: sticky;
    grid-area: signin;
    top: 1.5rem;
    width: 100%;
    max-width: 430px;
    margin-top: 1.3rem;
    padding: clamp(1.3rem, 2.6vw, 2rem);
    border: 1px solid #d7ccbd;
    border-top: 4px solid var(--login-orange);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 24px 55px rgba(55, 48, 38, 0.13);
    backdrop-filter: blur(10px);
}

.login-signin-kicker {
    margin-bottom: 0.35rem;
    color: var(--login-green);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.login-signin-card .identity-header h2 {
    margin: 0;
    color: var(--login-ink);
    font-size: clamp(1.65rem, 2.4vw, 2.2rem);
    font-weight: 900;
}

.login-signin-card .identity-header p {
    font-weight: 600;
}

.login-signin-card .identity-field .form-control {
    min-height: 46px;
    border-color: #cbc0b0;
    border-radius: 6px;
    background: #fffefa;
}

.login-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.2rem 0 0.85rem;
    font-size: 0.82rem;
}

.login-form-options .identity-check {
    margin: 0;
    font-size: 0.82rem;
}

.login-form-options a,
.login-access-prompt a,
.login-resend-link {
    color: var(--login-green);
    font-weight: 800;
    text-decoration: none;
}

.login-signin-card .identity-submit {
    min-height: 46px;
    margin: 0;
    border-color: var(--login-green-dark);
    border-radius: 6px;
    background: var(--login-green);
}

.login-passkey-button {
    width: 100%;
    min-height: 42px;
    margin: 0 0 0.8rem;
    border: 1px solid #bfb4a5;
    border-radius: 6px;
    background: #ffffff;
    color: #3e3933;
    font-weight: 800;
}

.login-access-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-top: 0.8rem;
    border-top: 1px solid #ebe5dc;
    color: #69635b;
    font-size: 0.85rem;
}

.login-resend-link {
    display: block;
    width: fit-content;
    margin: 0.65rem auto 0;
    color: #797167;
    font-size: 0.75rem;
}

.login-trust-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 5vw, 5.5rem) 3.75rem;
}

.login-trust-strip span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.6rem;
    border-top: 1px solid var(--login-line);
    border-bottom: 1px solid var(--login-line);
    border-right: 1px solid var(--login-line);
    color: #5f5a52;
    font-size: 0.74rem;
    font-weight: 800;
    text-align: center;
}

.login-trust-strip span:first-child {
    border-left: 1px solid var(--login-line);
    border-radius: 7px 0 0 7px;
}

.login-trust-strip span:last-child {
    border-radius: 0 7px 7px 0;
}

.login-marketing-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(3.5rem, 7vw, 6rem) clamp(1.2rem, 5vw, 5.5rem);
}

.login-section-heading {
    max-width: 850px;
    margin-bottom: 2.2rem;
}

.login-section-heading h2,
.login-final-cta h2 {
    margin: 0.7rem 0 0.8rem;
    color: var(--login-ink);
    font-size: clamp(2rem, 4.2vw, 4.1rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.03;
}

.login-section-heading > p {
    max-width: 720px;
    margin: 0;
    color: var(--login-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--login-line);
    border-left: 1px solid var(--login-line);
}

.login-feature-grid article {
    min-height: 250px;
    padding: clamp(1.3rem, 2.5vw, 2.1rem);
    border-right: 1px solid var(--login-line);
    border-bottom: 1px solid var(--login-line);
    background: rgba(255, 255, 255, 0.43);
}

.login-feature-grid article:hover {
    background: #ffffff;
}

.login-feature-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--login-green-soft);
    color: var(--login-green);
    font-size: 0.7rem;
    font-weight: 900;
}

.login-feature-grid h3 {
    max-width: 300px;
    margin: 1.3rem 0 0.65rem;
    color: var(--login-ink);
    font-size: 1.2rem;
    font-weight: 850;
    line-height: 1.2;
}

.login-feature-grid p {
    margin: 0;
    color: var(--login-muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

.login-workflow-section {
    padding: clamp(4rem, 7vw, 6.5rem) max(clamp(1.2rem, 5vw, 5.5rem), calc((100vw - 1440px) / 2 + 5.5rem));
    background: #292724;
    color: #ffffff;
}

.login-section-heading-light h2 {
    color: #ffffff;
}

.login-workflow-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 1220px;
}

.login-workflow-steps article {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    padding: 1.25rem 1rem 1.25rem 0;
    border-top: 1px solid #5c5750;
}

.login-workflow-steps article > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #857e73;
    border-radius: 50%;
    color: #e58a37;
    font-size: 0.75rem;
    font-weight: 900;
}

.login-workflow-steps h3 {
    margin: 0 0 0.45rem;
    color: #ffffff;
    font-size: 1.15rem;
}

.login-workflow-steps p {
    margin: 0;
    color: #c7c1b8;
    font-size: 0.86rem;
    line-height: 1.65;
}

.login-product-snapshots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.login-snapshot-card {
    overflow: hidden;
    border: 1px solid var(--login-line);
    border-radius: 10px;
    background: #ffffff;
}

.login-snapshot-copy {
    padding: clamp(1.3rem, 2.5vw, 2rem);
}

.login-snapshot-copy > span {
    color: var(--login-orange);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-snapshot-copy h3 {
    margin: 0.45rem 0 0.55rem;
    color: var(--login-ink);
    font-size: clamp(1.4rem, 2.4vw, 2.1rem);
    letter-spacing: -0.02em;
}

.login-snapshot-copy p {
    margin: 0;
    color: var(--login-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.login-customer-mock,
.login-calendar-mock {
    margin: 0 clamp(0.75rem, 2vw, 1.5rem) clamp(0.75rem, 2vw, 1.5rem);
    overflow: hidden;
    border: 1px solid #d9d0c4;
    border-radius: 7px;
    background: #faf8f3;
    box-shadow: 0 14px 28px rgba(48, 43, 36, 0.08);
}

.login-mock-toolbar {
    min-height: 42px;
    padding: 0.55rem 0.7rem;
    background: #302e2b;
    color: #ffffff;
}

.login-mock-toolbar strong {
    font-size: 0.7rem;
}

.login-mock-toolbar span {
    color: #b9d3bf;
    font-size: 0.56rem;
    font-weight: 800;
}

.login-mock-contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.65rem;
}

.login-mock-contact > div {
    display: grid;
    gap: 0.08rem;
    padding: 0.5rem;
    border: 1px solid #e2dbd1;
    border-radius: 5px;
    background: #ffffff;
}

.login-mock-contact small {
    color: #867d72;
    font-size: 0.5rem;
}

.login-mock-contact strong {
    font-size: 0.64rem;
}

.login-mock-equipment {
    display: grid;
    gap: 0.35rem;
    padding: 0 0.65rem 0.65rem;
}

.login-mock-equipment > div {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem;
    border: 1px solid #e2dbd1;
    border-radius: 5px;
    background: #ffffff;
}

.login-machine-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 5px;
    background: var(--login-green-soft);
    color: var(--login-green);
    font-size: 0.55rem;
    font-weight: 900;
}

.login-mock-equipment p {
    display: grid;
    min-width: 0;
    gap: 0.08rem;
    margin: 0;
}

.login-mock-equipment strong,
.login-mock-equipment small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-mock-equipment strong {
    font-size: 0.62rem;
}

.login-mock-equipment small,
.login-mock-equipment em {
    color: #81796f;
    font-size: 0.5rem;
    font-style: normal;
}

.login-calendar-days {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-bottom: 1px solid #ddd5ca;
}

.login-calendar-days span {
    display: grid;
    place-items: center;
    gap: 0.12rem;
    padding: 0.45rem 0.2rem;
    color: #877f73;
    font-size: 0.46rem;
    font-weight: 800;
}

.login-calendar-days em {
    color: #3e3933;
    font-size: 0.7rem;
    font-style: normal;
}

.login-calendar-days span.today em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--login-orange);
    color: #ffffff;
}

.login-calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(4, 32px);
    gap: 0.3rem;
    padding: 0.6rem;
    background-image: linear-gradient(to right, transparent calc(100% - 1px), #e7e0d6 1px);
    background-size: 20% 100%;
}

.login-calendar-grid i {
    grid-column: var(--start) / span var(--span);
    align-self: center;
    overflow: hidden;
    padding: 0.35rem 0.42rem;
    border-left: 3px solid;
    border-radius: 4px;
    font-size: 0.5rem;
    font-style: normal;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-calendar-grid i.service {
    border-color: #3c7b4b;
    background: #e7f2e8;
    color: #275c35;
}

.login-calendar-grid i.sales {
    border-color: #d9771f;
    background: #fff0df;
    color: #995015;
}

.login-calendar-grid i.prep {
    border-color: #6c737b;
    background: #eceff1;
    color: #4f565d;
}

.login-calendar-grid i.second {
    grid-row: 3;
}

.login-final-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(3rem, 6vw, 5rem) max(clamp(1.2rem, 5vw, 5.5rem), calc((100vw - 1440px) / 2 + 5.5rem));
    background: var(--login-green);
    color: #ffffff;
}

.login-final-cta > div:first-child > span {
    color: #d1e1d4;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.login-final-cta h2 {
    max-width: 760px;
    margin-bottom: 0;
    color: #ffffff;
}

.login-final-cta > div:last-child {
    flex: 0 0 auto;
    margin: 0;
}

.login-final-cta .login-primary-cta {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--login-green-dark);
    box-shadow: none;
}

.login-secondary-cta-light {
    border-color: rgba(255, 255, 255, 0.5);
    background: transparent;
    color: #ffffff;
}

.login-marketing-footer {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    gap: 1rem;
    min-height: 88px;
    padding: 0.8rem clamp(1.2rem, 5vw, 5.5rem);
    background: #211f1d;
    color: #bfb8ae;
}

.login-marketing-footer img {
    width: 190px;
    height: 46px;
    object-fit: cover;
}

.login-marketing-footer p,
.login-marketing-footer span {
    margin: 0;
    font-size: 0.76rem;
}

.login-marketing-footer p {
    text-align: center;
}

.login-marketing-footer > span {
    justify-self: end;
}

@media (max-width: 1050px) {
    .login-marketing-nav {
        grid-template-columns: 1fr auto;
    }

    .login-marketing-nav nav {
        display: none;
    }

    .login-marketing-hero {
        grid-template-columns: minmax(0, 1fr) minmax(310px, 0.62fr);
        gap: 2rem;
    }

    .login-preview-columns {
        grid-template-columns: 1fr;
    }

    .login-preview-activity {
        display: none;
    }

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

    .login-feature-grid article {
        min-height: 225px;
    }
}

@media (max-width: 800px) {
    .login-marketing-hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "copy"
            "signin"
            "preview";
        padding-top: 3.25rem;
    }

    .login-signin-card {
        position: static;
        max-width: 560px;
        margin: 0 auto;
    }

    .login-trust-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-trust-strip span,
    .login-trust-strip span:first-child,
    .login-trust-strip span:last-child {
        border: 1px solid var(--login-line);
        border-radius: 0;
    }

    .login-trust-strip span:last-child {
        grid-column: 1 / -1;
    }

    .login-workflow-steps,
    .login-product-snapshots {
        grid-template-columns: 1fr;
    }

    .login-final-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-marketing-footer {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .login-marketing-footer > span {
        justify-self: center;
    }
}

@media (max-width: 560px) {
    .login-marketing-nav {
        min-height: 64px;
        padding-inline: 0.8rem;
    }

    .login-marketing-brand {
        width: 165px;
        height: 40px;
    }

    .login-marketing-brand img {
        width: 165px;
    }

    .login-marketing-nav-cta {
        padding: 0.5rem 0.65rem;
        font-size: 0.72rem;
    }

    .login-hero-copy > h1 {
        font-size: clamp(2.45rem, 13vw, 3.6rem);
    }

    .login-dashboard-preview {
        transform: none;
    }

    .login-preview-nav-tabs span:nth-child(n+3),
    .login-preview-heading > span {
        display: none;
    }

    .login-preview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-preview-metrics > div:last-child {
        grid-column: 1 / -1;
    }

    .login-value-points {
        display: grid;
    }

    .login-feature-grid {
        grid-template-columns: 1fr;
    }

    .login-feature-grid article {
        min-height: 0;
    }

    .login-workflow-steps article {
        grid-template-columns: 1fr;
    }

    .login-form-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-marketing-footer img {
        width: 165px;
    }
}

.view-mode-control .form-select {
    width: auto;
    min-width: 104px;
    margin: 0;
}

.user-email-confirmation-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-permission-cell {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.user-permission-cell strong {
    color: #111827;
    font-size: 0.9rem;
}

.user-permission-cell small {
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.15;
}

.user-permission-cell .btn {
    justify-self: start;
    margin-top: 0.18rem;
}

.user-permission-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
}

.user-permission-actions .btn {
    margin: 0;
}

.admin-user-list {
    display: grid;
    gap: 0.65rem;
}

.admin-user-card {
    overflow: hidden;
    border: 1px solid #d8d0c1;
    border-radius: 10px;
    background: #fffdf9;
    box-shadow: 0 4px 12px rgba(66, 54, 35, 0.06);
}

.admin-user-summary {
    display: grid;
    grid-template-columns: minmax(15rem, 1.7fr) minmax(7rem, 0.7fr) minmax(14rem, 1.25fr) minmax(8rem, 0.8fr) max-content;
    align-items: center;
    gap: 1rem;
    min-height: 70px;
    padding: 0.75rem 0.9rem;
    cursor: pointer;
    list-style: none;
}

.admin-user-summary::-webkit-details-marker {
    display: none;
}

.admin-user-summary:hover {
    background: #fbf7ef;
}

.admin-user-card[open] .admin-user-summary {
    border-bottom: 1px solid #e4dccd;
    background: #f8f3e9;
}

.admin-user-identity,
.admin-user-summary-field {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.admin-user-identity strong {
    overflow: hidden;
    color: #1f2937;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-identity small {
    overflow: hidden;
    color: #64748b;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-summary-field > span {
    color: #7c6f5a;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-user-summary-field > strong {
    color: #1f2937;
    font-size: 0.9rem;
}

.admin-user-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.admin-user-status {
    padding: 0.18rem 0.48rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-user-status.is-active {
    border-color: #86c89a;
    background: #ecf8ef;
    color: #166534;
}

.admin-user-status.is-pending,
.admin-user-status.is-warning {
    border-color: #e5b978;
    background: #fff7e8;
    color: #92400e;
}

.admin-user-expand-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #1f7a3d;
    font-size: 0.82rem;
    font-weight: 850;
}

.admin-user-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid #a9cdb3;
    border-radius: 999px;
    transition: transform 160ms ease;
}

.admin-user-card[open] .admin-user-chevron {
    transform: rotate(180deg);
}

.admin-user-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.85rem;
}

.admin-user-setting-card {
    display: grid;
    align-content: start;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid #e3ddd2;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.admin-user-setting-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
}

.admin-user-setting-card > .btn {
    justify-self: start;
}

.admin-user-setting-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #eee7dc;
}

.admin-user-setting-heading h3 {
    margin: 0;
    color: #1f2937;
    font-size: 0.95rem;
}

.admin-user-setting-heading strong,
.admin-user-setting-heading small {
    color: #64748b;
    font-size: 0.76rem;
    text-align: right;
}

.admin-user-inline-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid #eee7dc;
}

.admin-user-inline-setting > div {
    display: grid;
    gap: 0.12rem;
}

.admin-user-inline-setting small {
    color: #64748b;
    font-size: 0.76rem;
}

.admin-user-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-user-list .btn,
.admin-user-list .btn-sm {
    max-width: 100%;
    margin: 0;
    padding: 0.3rem 0.58rem;
    font-size: 0.78rem;
    line-height: 1.15;
}

@media (max-width: 900px) {
    .admin-user-summary {
        grid-template-columns: minmax(0, 1.6fr) minmax(6rem, 0.7fr) max-content;
        gap: 0.55rem;
    }

    .admin-user-summary-field:nth-of-type(2),
    .admin-user-summary-field:nth-of-type(4) {
        display: none;
    }

    .admin-user-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .admin-user-summary {
        grid-template-columns: minmax(0, 1fr) max-content;
    }

    .admin-user-summary-field {
        display: none;
    }

    .admin-user-expand-label > span:first-child {
        display: none;
    }

    .admin-user-inline-setting,
    .admin-user-setting-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-user-setting-heading strong,
    .admin-user-setting-heading small {
        text-align: left;
    }
}

.btn {
    border: 1px solid #888;
    border-radius: 5px;
    padding: 0.35rem 0.7rem;
    background: #f8f9fa;
    cursor: pointer;
    margin: 0.1rem;
}

    .btn:hover {
        background: #e9ecef;
    }

.btn-primary,
.btn-success,
.btn-warning,
.btn-info,
.btn-dark,
.btn-secondary,
.btn-danger {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.btn-outline-primary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-dark,
.btn-outline-secondary,
.btn-outline-danger {
    background: white;
    color: #333;
}

.form-control,
.form-select {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 420px;
    padding: 0.45rem;
    margin-bottom: 0.5rem;
    border: 1px solid #bbb;
    border-radius: 5px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.col-md-4,
.col-md-3,
.col-md-6,
.col-lg-4 {
    flex: 1 1 250px;
}

.alert {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: #eef6ff;
    border: 1px solid #9cc9f5;
}

.alert-info {
    background: #ecfdf3;
    border-color: #86d39b;
    color: #14532d;
}

.app-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 4000;
    width: min(520px, calc(100vw - 2rem));
    margin: 0 auto;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
    animation: app-toast-pop 2s ease forwards;
}

@keyframes app-toast-pop {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }

    12%,
    78% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

.text-muted {
    color: #666;
}

.fw-bold {
    font-weight: 700;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.ms-2 {
    margin-left: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .table th,
    .table td {
        padding: 0.45rem 0.6rem;
        text-align: left;
        vertical-align: middle;
        border-bottom: 1px solid #ddd;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .table th {
        background: #f3f4f6;
        font-weight: 700;
    }

    .table .btn,
    .table .btn-sm {
        white-space: nowrap;
        padding: 0.25rem 0.5rem;
        font-size: 0.85rem;
    }

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.archive-filter-panel {
    padding: 1rem;
    border: 1px solid #d9ded8;
    border-radius: 0.65rem;
    background: #f8faf7;
}

.archive-filter-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.archive-filter-heading strong,
.archive-filter-heading span {
    display: block;
}

.archive-filter-heading > div > span {
    margin-top: 0.15rem;
    color: #66706a;
    font-size: 0.88rem;
}

.archive-filter-count {
    flex: 0 0 auto;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #e5eee4;
    color: #285c35;
    font-size: 0.82rem;
    font-weight: 700;
}

.archive-filter-panel .form-label {
    margin-bottom: 0.3rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.archive-filter-clear {
    margin-top: 0.55rem;
    padding-left: 0;
    color: #285c35;
}

.table .archive-empty-state {
    padding: 2rem 1rem;
    color: #66706a;
    text-align: center;
    white-space: normal;
}

@media (max-width: 575.98px) {
    .archive-filter-panel {
        padding: 0.8rem;
    }

    .archive-filter-heading {
        align-items: center;
    }

    .archive-filter-heading > div > span {
        display: none;
    }
}

.customer-import-preview .customer-import-row-col {
    width: 4rem;
}

.customer-import-preview .customer-import-id-col,
.customer-import-preview .customer-import-name-col {
    width: 16%;
}

.customer-import-preview .customer-import-contact-col {
    width: 12%;
}

.customer-import-preview .customer-import-address-col {
    width: 22%;
}

.customer-import-preview .customer-import-action-col {
    width: 8rem;
}

.customer-import-preview .customer-import-message-col {
    width: auto;
}

.customer-import-preview .table td:nth-child(7),
.customer-import-preview .table th:nth-child(7) {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
}

.customer-import-preview .table td:nth-child(1),
.customer-import-preview .table td:nth-child(6) {
    white-space: nowrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.dashboard-count {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dashboard-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    min-width: 86px;
    min-height: 42px;
    padding: 0.45rem 0.6rem;
    border: 1px solid #c9d7ee;
    border-radius: 6px;
    background: #f8fbff;
    color: #0d6efd;
    text-decoration: none;
}

.dashboard-icon-link span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.dashboard-icon-link strong {
    font-size: 1.15rem;
    line-height: 1;
}

.dashboard-icon-link:hover,
.dashboard-small-link:hover {
    border-color: #8bb7f0;
    background: #eef6ff;
    color: #084298;
}

.dashboard-link {
    border: 1px solid #c9d7ee;
    background: #f8fbff;
    color: #0d6efd;
    font-weight: 700;
    text-decoration: none;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.dashboard-link:hover {
    border-color: #8bb7f0;
    background: #eef6ff;
    color: #084298;
    transform: translateY(-1px);
}

.dashboard-admin-quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
}

.dashboard-small-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.45rem 0.75rem;
    border: 1px solid #c9d7ee;
    border-radius: 6px;
    background: #ffffff;
    color: #0d6efd;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.settings-action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.settings-nav-builder {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 1rem;
    align-items: start;
}

.settings-nav-builder h5 {
    margin-bottom: 0.2rem;
}

.settings-nav-list {
    display: grid;
    gap: 0.45rem;
}

.settings-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    min-height: 42px;
    padding: 0.42rem 0.55rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fbfcfe;
}

.settings-nav-row > span {
    min-width: 0;
    color: #111827;
    font-weight: 850;
}

.settings-nav-row > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
    justify-content: flex-end;
}

.technician-display-input,
.technician-user-select {
    min-width: 12rem;
}

.form-panel,
.customer-picker {
    box-sizing: border-box;
    height: 100%;
    min-width: 0;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fbfcfd;
}

.customer-picker .form-control,
.customer-picker .form-select,
.form-panel .form-control,
.form-panel .form-select {
    max-width: none;
}

.work-order-complaint {
    width: 100%;
    max-width: none;
    min-height: 110px;
    resize: vertical;
}

.customer-picker-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #bdd7f0;
    border-radius: 6px;
    background: #eef6ff;
}

.customer-picker-selected-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sales-deal-dashboard-details .deal-info-card:has(.deal-dashboard-edit-button) {
    padding-right: 2.15rem;
}

.deal-dashboard-edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(183, 150, 94, 0.48);
    border-radius: 7px;
    background: #fffdf8;
    color: #a85516;
}

.deal-info-card > .deal-dashboard-edit-button {
    position: absolute;
    top: 50%;
    right: 0.42rem;
    transform: translateY(-50%);
}

.deal-dashboard-edit-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.deal-dashboard-edit-button:hover {
    border-color: #d9771f;
    background: #fff4e8;
}

.deal-dashboard-heading-actions,
.dashboard-deal-action-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.dashboard-deal-action-row .sales-action-toggle {
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-deal-action-row .deal-dashboard-edit-button,
.dashboard-deal-action-row .icon-danger-button {
    flex: 0 0 auto;
}

.dashboard-deal-editor-modal {
    width: min(460px, 100%);
}

.dashboard-deal-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-action-editor-body {
    display: grid;
    gap: 0.75rem;
}

.dashboard-action-editor-body label {
    display: grid;
    gap: 0.3rem;
    font-weight: 850;
}

.global-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(37, 35, 33, 0.7);
    backdrop-filter: blur(4px);
}

.global-loading-overlay[hidden] {
    display: none !important;
}

.global-loading-preload {
    position: fixed;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.global-loading-preload img {
    width: 1px;
    height: 1px;
}

.global-loading-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(10rem, 15rem) minmax(14rem, 20rem);
    align-items: center;
    width: min(92vw, 36rem);
    min-height: 17rem;
    overflow: hidden;
    padding: 0.8rem 1.2rem 0.8rem 0.5rem;
    border: 1px solid rgba(217, 122, 32, 0.7);
    border-radius: 10px;
    background: #fbf7ef;
    color: #26352b;
    box-shadow: 0 22px 60px rgba(18, 21, 18, 0.34), inset 0 4px 0 #d97a20;
}

.global-loading-art {
    position: relative;
    align-self: end;
    min-width: 0;
    height: 16rem;
    margin-bottom: -0.8rem;
}

.global-loading-frame {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    object-fit: contain;
    object-position: center bottom;
    animation: global-loading-frame-cycle 2s steps(1, end) infinite;
}

.global-loading-frame.frame-1 {
    animation-delay: 0s;
}

.global-loading-frame.frame-2 {
    animation-delay: 0.5s;
}

.global-loading-frame.frame-3 {
    animation-delay: 1s;
}

.global-loading-frame.frame-4 {
    animation-delay: 1.5s;
}

.global-loading-sticker {
    position: absolute;
    right: 0.1rem;
    bottom: 0.55rem;
    z-index: 2;
    padding: 0.24rem 0.42rem;
    border: 2px solid #d97a20;
    border-radius: 5px;
    background: #fff8ed;
    color: #2e5a36;
    font-size: 0.58rem;
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
    transform: rotate(-4deg);
    box-shadow: 0 3px 8px rgba(58, 52, 47, 0.16);
}

.global-loading-mascot {
    position: absolute;
    top: 0.15rem;
    right: 0.15rem;
    z-index: 3;
    width: 3.3rem;
    height: 3.3rem;
    object-fit: contain;
    filter: drop-shadow(0 3px 5px rgba(58, 52, 47, 0.22));
    animation: global-loading-mascot-wobble 1s ease-in-out infinite alternate;
}

.global-loading-copy {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: start;
    gap: 0.35rem;
    min-width: 0;
    padding: 1rem 0;
}

.global-loading-kicker {
    color: #d36d13;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.global-loading-copy strong {
    color: #2e5a36;
    font-size: clamp(1.25rem, 4vw, 2rem);
    line-height: 1.05;
}

.global-loading-joke {
    color: #665f56;
    font-size: 0.86rem;
    font-style: italic;
}

.global-loading-progress {
    display: inline-flex;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.global-loading-progress i {
    width: 0.52rem;
    height: 0.52rem;
    border-radius: 50%;
    background: #2e5a36;
    animation: global-loading-dot 0.9s ease-in-out infinite;
}

.global-loading-progress i:nth-child(2) {
    animation-delay: 0.15s;
}

.global-loading-progress i:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes global-loading-frame-cycle {
    0%, 24.99% { opacity: 1; }
    25%, 100% { opacity: 0; }
}

@keyframes global-loading-dot {
    0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

@keyframes global-loading-mascot-wobble {
    from { transform: rotate(-5deg) scale(0.96); }
    to { transform: rotate(5deg) scale(1); }
}

@media (max-width: 560px) {
    .global-loading-card {
        grid-template-columns: minmax(8.5rem, 0.9fr) minmax(10rem, 1.1fr);
        min-height: 13rem;
        padding: 0.65rem 0.75rem 0.65rem 0.2rem;
    }

    .global-loading-art {
        height: 12.5rem;
        margin-bottom: -0.65rem;
    }

    .global-loading-copy {
        padding-right: 0.3rem;
    }

    .global-loading-kicker {
        font-size: 0.62rem;
    }

    .global-loading-copy strong {
        font-size: 1.2rem;
    }

    .global-loading-joke {
        font-size: 0.72rem;
    }

    .global-loading-mascot {
        width: 2.65rem;
        height: 2.65rem;
    }
}

.customer-equipment-add-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.customer-picker-clear {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0d7de;
    border-radius: 999px;
    background: #ffffff;
    color: #7f1d1d;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.customer-picker-clear:hover {
    border-color: #fca5a5;
    background: #fee2e2;
}

.customer-picker-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #ffffff;
}

.customer-picker-option {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-bottom: 1px solid #eef1f4;
    background: #ffffff;
    color: #111827;
    text-align: left;
    cursor: pointer;
}

.customer-picker-option:hover,
.customer-picker-option.selected {
    background: #eef6ff;
}

.customer-picker-option small {
    color: #666;
}

.customer-picker-empty {
    padding: 0.65rem;
    color: #666;
}

.equipment-number-picker {
    max-height: 13rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(3.25rem, 1fr));
    gap: 0.4rem;
    padding: 0.6rem;
    margin: 0.15rem 0 0.75rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
}

.equipment-number-option {
    min-height: 2.25rem;
    border: 1px solid #d0d7de;
    border-radius: 999px;
    background: #fbfcfd;
    color: #111827;
    font-weight: 700;
    cursor: pointer;
}

.equipment-number-option:hover,
.equipment-number-option.selected {
    border-color: #198754;
    background: #dcfce7;
    color: #14532d;
}

.equipment-editor-v2 {
    display: grid;
    gap: 0.65rem;
}

.equipment-editor-section {
    display: grid;
    gap: 0.65rem;
    padding: 0.7rem;
    border: 1px solid #d8c99e;
    border-radius: 10px;
    background: #fffdf8;
}

.equipment-editor-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(201, 178, 122, 0.55);
}

.equipment-editor-heading strong {
    color: #14532d;
    font-size: 0.95rem;
    font-weight: 950;
}

.equipment-editor-heading span {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 750;
}

.equipment-editor-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 0.45rem;
}

.equipment-editor-tile,
.equipment-editor-model-card {
    display: grid;
    gap: 0.08rem;
    min-height: 52px;
    padding: 0.5rem 0.6rem;
    border: 1px solid #d8c99e;
    border-radius: 9px;
    background: #ffffff;
    color: #1f2937;
    text-align: left;
}

.equipment-editor-tile.selected,
.equipment-editor-model-card.selected {
    border-color: #1f7a3d;
    background: linear-gradient(180deg, #effaf1 0%, #ffffff 100%);
    box-shadow: inset 4px 0 0 #1f7a3d;
}

.equipment-editor-tile strong,
.equipment-editor-model-card strong {
    min-width: 0;
    overflow: hidden;
    color: #14532d;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.equipment-editor-tile span,
.equipment-editor-model-card span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
}

.equipment-editor-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.42fr);
    gap: 0.55rem;
    align-items: start;
}

.equipment-editor-field-group {
    display: grid;
    gap: 0.35rem;
}

.equipment-editor-label {
    color: #334155;
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
}

.equipment-editor-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.equipment-editor-bubble {
    min-height: 31px;
    border: 1px solid #bfd0ea;
    border-radius: 999px;
    background: #ffffff;
    color: #1f4f91;
    padding: 0.28rem 0.56rem;
    font-size: 0.82rem;
    font-weight: 900;
}

.equipment-editor-bubble.selected {
    border-color: #1f7a3d;
    background: #e8f7ec;
    color: #14532d;
}

.equipment-editor-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.4rem;
}

.equipment-year-rolodex {
    min-height: 36px;
    font-weight: 800;
}

.equipment-editor-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e7dcc0;
    border-radius: 9px;
    background: #ffffff;
}

.equipment-editor-toggle-row > div {
    display: grid;
    gap: 0.05rem;
}

.equipment-editor-toggle-row strong {
    color: #14532d;
    font-weight: 950;
}

.equipment-editor-toggle-row span {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
}

.equipment-editor-toggle {
    min-width: 64px;
    min-height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-weight: 900;
}

.equipment-editor-toggle.selected {
    border-color: #1f7a3d;
    background: #1f7a3d;
    color: #ffffff;
}

.equipment-editor-tractor-panel {
    display: grid;
    gap: 0.55rem;
    padding: 0.6rem;
    border: 1px solid #d8c99e;
    border-radius: 10px;
    background: #fffaf0;
}

.app-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
    background: rgba(17, 24, 39, 0.55);
}

.app-modal-card {
    width: min(960px, 100%);
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
}

.app-modal-header,
.app-modal-footer {
    flex: 0 0 auto;
    padding: 1rem;
    border-bottom: 1px solid #d0d7de;
}

.app-modal-header h4 {
    margin: 0;
}

.app-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
}

.app-modal-body .form-control,
.app-modal-body .form-select {
    max-width: none;
}

.app-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    border-top: 1px solid #d0d7de;
    border-bottom: 0;
}

@media (max-width: 640px) {
    .app-modal-overlay {
        padding: 0.75rem;
    }

    .app-modal-card {
        max-height: calc(100vh - 1.5rem);
    }

    .app-modal-footer {
        flex-direction: column;
    }

    .app-modal-footer .btn {
        width: 100%;
    }
}
.time-table {
    min-width: 950px;
    table-layout: fixed;
}

    .time-table th:nth-child(1),
    .time-table td:nth-child(1) {
        width: 80px;
    }

    .time-table th:nth-child(2),
    .time-table td:nth-child(2),
    .time-table th:nth-child(3),
    .time-table td:nth-child(3) {
        width: 135px;
    }

    .time-table th:nth-child(4),
    .time-table td:nth-child(4),
    .time-table th:nth-child(6),
    .time-table td:nth-child(6) {
        width: 80px;
    }

    .time-table th:nth-child(5),
    .time-table td:nth-child(5) {
        width: 125px;
    }

    .time-table th:nth-child(7),
    .time-table td:nth-child(7) {
        width: 240px;
    }

    .time-table th:nth-child(8),
    .time-table td:nth-child(8) {
        width: 145px;
    }

.time-hours-input {
    width: 70px;
    padding: 0.3rem;
}

.service-call-charge-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.45rem 0.65rem;
    border: 1px solid #c9d7ee;
    border-radius: 8px;
    background: #f8fbff;
}

.service-call-charge-toggle span {
    display: grid;
    gap: 0.15rem;
}

.service-call-charge-toggle small {
    color: #4b5563;
}

.time-notes-input {
    width: 100%;
    min-width: 180px;
    padding: 0.3rem;
}

.time-checkbox {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.time-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.time-date-input {
    width: 150px;
    padding: 0.3rem;
}

.time-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.time-summary-grid > div {
    display: grid;
    gap: 0.12rem;
    min-height: 48px;
    padding: 0.52rem 0.65rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fbfcfe;
    box-shadow: inset 3px 0 0 #d7e7ff;
}

.time-summary-grid span,
.parts-entry-total span,
.parts-used-quantity span,
.parts-used-price span {
    color: #5b6776;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.time-summary-grid strong,
.parts-entry-total strong,
.parts-used-price strong {
    color: #111827;
    font-size: 0.96rem;
    font-weight: 850;
}

.time-start-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.time-entry-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: start;
}

.time-entry-group {
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.time-entry-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.48rem 0.65rem;
    border-bottom: 1px solid #eef1f4;
    background: #f8fafc;
}

.time-entry-group-header > div {
    display: grid;
    gap: 0.05rem;
}

.time-entry-group-header strong {
    font-weight: 900;
}

.time-entry-group-header span,
.time-entry-empty {
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 750;
}

.time-entry-start-button {
    width: calc(100% - 1rem);
    margin: 0.5rem 0.5rem 0;
    min-height: 38px;
    font-weight: 900;
}

.time-entry-active-end-bar {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) minmax(72px, auto);
    align-items: center;
    gap: 0.5rem;
    width: calc(100% - 1rem);
    min-height: 38px;
    margin: 0.5rem 0.5rem 0;
    padding: 0.25rem 0.28rem 0.25rem 0.45rem;
    border: 1px solid #d97706;
    border-radius: 999px;
    background: #fff7ed;
    color: #7c2d12;
    text-align: left;
    box-shadow: inset 4px 0 0 #ea580c;
}

.time-entry-active-end-bar:hover {
    background: #ffedd5;
}

.time-entry-active-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 950;
}

.time-entry-active-text {
    display: grid;
    min-width: 0;
    line-height: 1.05;
}

.time-entry-active-text strong,
.time-entry-active-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-entry-active-text strong {
    font-size: 0.88rem;
    font-weight: 950;
}

.time-entry-active-text small {
    color: #166534;
    font-size: 0.8rem;
    font-weight: 900;
}

.time-entry-active-end {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 29px;
    padding: 0.18rem 0.85rem;
    border-radius: 999px;
    background: #d97706;
    color: #ffffff;
    font-weight: 950;
    text-align: center;
}

.time-entry-list {
    display: grid;
    gap: 0.35rem;
    padding: 0.5rem;
}

.time-entry-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.time-entry-card.active {
    border-color: #f59e0b;
    background: #fff7ed;
    box-shadow: inset 4px 0 0 #f59e0b;
}

.time-entry-card.active .time-entry-summary {
    background: #fff7ed;
}

.time-entry-card.manual {
    border-color: #86efac;
}

.time-entry-summary {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    gap: 0.38rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-height: 36px;
    padding: 0.3rem 0.42rem;
    background: #ffffff;
    overflow: hidden;
}

.time-entry-summary-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    gap: 0.45rem;
    align-items: center;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111827;
    text-align: left;
}

.time-entry-summary:hover {
    background: #eef6ff;
}

.time-entry-summary-trigger > span:first-child {
    display: grid;
    min-width: 0;
}

.time-entry-summary-trigger strong,
.time-entry-summary-trigger small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-entry-summary-trigger small {
    color: #6b7280;
    font-size: 0.74rem;
}

.time-entry-quick-actions {
    box-sizing: border-box;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    justify-content: flex-end;
    gap: 0.28rem;
    overflow: hidden;
}

.time-entry-done-button {
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    min-height: 29px;
    padding: 0.18rem 0.48rem;
}

.time-manual-fixed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 29px;
    padding: 0.18rem 0.5rem;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #f0fdf4;
    color: #14532d;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.time-entry-hours,
.time-entry-status {
    border-radius: 999px;
    background: #eef2f7;
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
}

.time-entry-hours {
    padding: 0.18rem 0.45rem;
}

.time-entry-status {
    padding: 0.18rem 0.42rem;
    color: #374151;
}

.time-entry-card.active .time-entry-status {
    background: #fed7aa;
    color: #9a3412;
}

.time-manual-toggle,
.time-manual-detail-toggle {
    border: 1px solid #c9d7ee;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 0.76rem;
    font-weight: 850;
}

.time-manual-toggle {
    min-height: 29px;
    padding: 0.18rem 0.42rem;
}

.time-manual-inline-input {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    height: 29px;
    padding: 0.16rem 0.24rem;
    border: 0;
    border-radius: 0;
    background: #f0fdf4;
    color: #14532d;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    box-shadow: none;
}

.time-manual-inline-input:focus {
    box-shadow: inset 0 0 0 1px #15803d;
    outline: none;
}

.time-manual-stepper {
    box-sizing: border-box;
    display: inline-grid;
    grid-template-columns: 24px 54px 24px;
    align-items: center;
    overflow: hidden;
    border: 1px solid #16a34a;
    border-radius: 999px;
    background: #f0fdf4;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.time-manual-stepper-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 29px;
    padding: 0;
    border: 0;
    background: #dcfce7;
    color: #14532d;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1;
}

.time-manual-stepper-button:hover {
    background: #bbf7d0;
}

.time-manual-detail-toggle {
    width: fit-content;
    padding: 0.28rem 0.65rem;
}

.time-manual-toggle.active,
.time-manual-detail-toggle.active {
    border-color: #16a34a;
    background: #dcfce7;
    color: #166534;
}

.time-entry-details {
    display: grid;
    gap: 0.55rem;
    padding: 0.6rem;
    border-top: 1px solid #eef1f4;
    background: #fbfcfe;
}

.time-entry-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 0.5rem;
}

.time-entry-details label,
.parts-entry-grid label {
    display: grid;
    gap: 0.22rem;
    margin: 0;
}

.time-entry-details label span {
    min-height: 35px;
    padding: 0.45rem 0.55rem;
    border: 1px solid #dbe3ec;
    border-radius: 7px;
    background: #ffffff;
}

.time-entry-empty {
    margin: 0;
    padding: 0.65rem;
}

.parts-entry-table {
    min-width: 860px;
    table-layout: fixed;
}

    .parts-entry-table th,
    .parts-entry-table td,
    .parts-used-table th,
    .parts-used-table td {
        white-space: normal;
    }

    .parts-entry-table th:nth-child(2),
    .parts-entry-table td:nth-child(2) {
        width: 300px;
    }

    .parts-entry-table th:nth-child(3),
    .parts-entry-table td:nth-child(3) {
        width: 240px;
    }

    .parts-entry-table th:nth-child(1),
    .parts-entry-table td:nth-child(1),
    .parts-entry-table th:nth-child(5),
    .parts-entry-table td:nth-child(5),
    .parts-entry-table th:nth-child(6),
    .parts-entry-table td:nth-child(6) {
        width: 110px;
    }

    .parts-entry-table th:nth-child(4),
    .parts-entry-table td:nth-child(4) {
        width: 90px;
    }

.parts-entry-actions {
    vertical-align: top;
}

.parts-entry-total {
    font-weight: 700;
}

.parts-entry-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.7rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fbfcfe;
}

.work-order-info-grid,
.work-order-notes-grid {
    display: grid;
    gap: 0.65rem;
}

.work-order-info-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    align-items: end;
}

.work-order-notes-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    margin-bottom: 1rem;
}

.work-order-info-grid label,
.work-order-info-grid .work-order-field-card,
.work-order-notes-grid label {
    display: grid;
    gap: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
    color: #4f4638;
    font-weight: 850;
    box-shadow: inset 3px 0 0 #b89356;
}

.work-order-field-header {
    display: flex;
    align-items: center;
    min-height: 24px;
    padding: 0.18rem 0.5rem;
    border-bottom: 1px solid #d8c8ad;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    color: #242628;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.work-order-info-grid .form-select,
.work-order-info-grid .form-control,
.work-order-notes-grid .form-control,
.work-order-tech-picker-button,
.work-order-value-picker-button {
    border: 0;
    border-radius: 0;
    background-color: #fffdf8;
}

.work-order-notes-grid textarea.form-control {
    min-height: 82px;
    resize: vertical;
}

.work-order-notes-stack {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.work-order-note-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 #b89356;
}

.work-order-note-summary {
    display: grid;
    grid-template-columns: minmax(120px, 0.18fr) minmax(0, 1fr) 16px;
    gap: 0.55rem;
    align-items: center;
    min-height: 38px;
    padding-right: 0.6rem;
    cursor: pointer;
    list-style: none;
}

.work-order-note-summary::-webkit-details-marker {
    display: none;
}

.work-order-note-summary .work-order-field-header {
    align-self: stretch;
    border-right: 1px solid #d8c8ad;
    border-bottom: 0;
}

.work-order-note-summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #1f7a3d;
    border-bottom: 2px solid #1f7a3d;
    transform: rotate(45deg);
    transition: transform 0.16s ease;
}

.work-order-note-panel[open] .work-order-note-summary::after {
    transform: rotate(225deg);
}

.work-order-note-preview {
    min-width: 0;
    overflow: hidden;
    color: #665944;
    font-size: 0.84rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-order-note-panel[open] .work-order-note-preview {
    color: #1f7a3d;
}

.work-order-note-editor {
    width: 100%;
    padding: 0.5rem;
    border-top: 1px solid #e4d7c0;
    background: #fffefa;
}

.work-order-note-editor textarea.form-control {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 82px;
    margin: 0;
    resize: vertical;
}

.work-order-value-picker-panel {
    max-width: 680px;
    padding: 0.45rem;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
}

.parts-entry-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.parts-entry-card-header strong {
    font-size: 1rem;
    font-weight: 900;
}

.parts-entry-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.55fr) minmax(180px, 1fr) 142px 100px 100px 92px;
    gap: 0.65rem;
    align-items: start;
}

.parts-entry-grid.pricing-hidden {
    grid-template-columns: minmax(260px, 1.65fr) minmax(180px, 1fr) 142px 92px;
}

.parts-entry-picker {
    position: relative;
    align-self: start;
}

.parts-entry-grid > label,
.parts-entry-total {
    display: grid;
    align-content: start;
    gap: 0;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 #b89356;
}

.parts-entry-picker {
    display: grid;
    gap: 0;
    min-width: 0;
    overflow: visible;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 #b89356;
}

.parts-entry-field-label {
    display: flex;
    align-items: center;
    min-height: 24px;
    padding: 0.18rem 0.48rem;
    border-bottom: 1px solid #d8c8ad;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    color: #242628;
    font-size: 0.71rem;
    font-weight: 900;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.parts-entry-grid > label > .form-control,
.parts-entry-picker > .form-control {
    min-height: 38px;
    border: 0;
    border-radius: 0;
    background: #fffdf8;
    box-shadow: none;
}

.parts-entry-total strong {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0.35rem 0.55rem;
    white-space: nowrap;
}

.parts-entry-add-cell {
    align-self: start;
    height: 67px;
}

.parts-entry-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    font-weight: 900;
}

.parts-entry-picker .part-picker-list,
.parts-entry-picker .part-picker-empty {
    margin-top: 0.35rem;
}

.quantity-stepper {
    display: grid;
    grid-template-columns: 32px minmax(58px, 1fr) 32px;
    gap: 0.24rem;
    align-items: center;
    min-height: 38px;
    padding: 0.16rem 0.24rem;
}

.quantity-stepper-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #c9d7ee;
    border-radius: 999px;
    background: #ffffff;
    color: #0d6efd;
    font-size: 0;
    line-height: 0;
}

.quantity-stepper-button::before,
.quantity-stepper-button.increment::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.quantity-stepper-button.increment::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.parts-entry-quantity-field .parts-qty-input {
    min-width: 0;
    height: 32px;
    padding: 0.2rem 0.25rem;
    text-align: center;
}

.quantity-stepper-button:hover {
    border-color: #0d6efd;
    background: #eef6ff;
}

.service-call-quantity-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 46px;
    padding: 0.35rem 0.55rem;
    border: 1px solid #d5dfec;
    border-radius: 8px;
    background: #fbfcfe;
}

.service-call-quantity-row > span {
    font-weight: 850;
}

.service-call-quantity-row .quantity-stepper {
    width: 126px;
}

.service-call-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: stretch;
}

.parts-used-list {
    display: grid;
    gap: 0.45rem;
}

.part-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.part-list-add-panel {
    display: grid;
    grid-template-columns: minmax(160px, 240px) auto auto;
    gap: 0.35rem;
    align-items: center;
    width: 100%;
    max-width: 520px;
}

.work-order-part-list-bars {
    display: grid;
    gap: 0.45rem;
}

.work-order-part-list-card {
    overflow: hidden;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
}

.work-order-part-list-card.active {
    border-color: #86c99a;
    box-shadow: inset 4px 0 0 #16a34a;
}

.work-order-part-list-summary {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 0.4rem;
    align-items: center;
    min-height: 38px;
    padding: 0.32rem 0.5rem;
    background: #f8fafc;
}

.part-list-active-button,
.work-order-part-list-title {
    border: 0;
    background: transparent;
}

.part-list-active-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
}

.part-list-active-button span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #dc2626;
    box-shadow: 0 0 0 4px #fee2e2;
}

.part-list-active-button.active span {
    background: #16a34a;
    box-shadow: 0 0 0 4px #dcfce7;
}

.work-order-part-list-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    padding: 0;
    color: #111827;
    text-align: left;
}

.work-order-part-list-title strong,
.work-order-part-list-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-order-part-list-title strong {
    font-weight: 900;
}

.work-order-part-list-title span {
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 800;
}

.part-list-lines {
    padding: 0.45rem;
    border-top: 1px solid #eef1f4;
}

.part-list-move-select {
    width: 118px;
    min-width: 100px;
    height: 30px;
    padding: 0.18rem 1.6rem 0.18rem 0.45rem;
    font-size: 0.78rem;
    font-weight: 750;
}

.parts-used-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(78px, auto)) minmax(280px, auto);
    gap: 0.42rem;
    align-items: center;
    min-height: 42px;
    padding: 0.34rem 0.45rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
}

.parts-used-main,
.parts-used-line {
    min-width: 0;
}

.parts-used-line {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
}

.parts-used-main strong,
.parts-used-line > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.parts-used-main strong {
    flex: 0 0 auto;
    color: #111827;
    font-weight: 900;
}

.parts-used-line > span {
    color: #4b5563;
    font-size: 0.86rem;
}

.parts-used-quantity,
.parts-used-price {
    display: grid;
    gap: 0.08rem;
}

.parts-used-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.quantity-stepper.compact {
    grid-template-columns: 28px 54px 28px;
    gap: 0.22rem;
}

.quantity-stepper.compact .quantity-stepper-button {
    width: 28px;
    height: 28px;
}

.quantity-stepper.compact .parts-qty-input {
    min-width: 54px;
    height: 30px;
    padding: 0.2rem 0.3rem;
    text-align: center;
}

.part-picker {
    min-width: 0;
    white-space: normal;
}

.part-picker .form-control {
    max-width: none;
}

.part-picker-selected {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem;
    margin-bottom: 0.5rem;
    border: 1px solid #bdd7f0;
    border-radius: 6px;
    background: #eef6ff;
}

.part-picker-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #ffffff;
}

.part-picker-option {
    width: 100%;
    display: grid;
    grid-template-columns: 0.85fr 1.35fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border: 0;
    border-bottom: 1px solid #eef1f4;
    background: #ffffff;
    color: #111827;
    text-align: left;
    cursor: pointer;
}

.part-picker-option:hover,
.part-picker-option.selected {
    background: #eef6ff;
}

.part-picker-option span,
.part-picker-option small,
.part-picker-selected small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.part-picker-option small,
.part-picker-selected small,
.part-picker-empty {
    color: #666;
}

.part-picker-empty {
    padding: 0.65rem;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #ffffff;
}

.parts-qty-input,
.parts-price-input {
    min-width: 80px;
}

.settings-section {
    padding-top: 1rem;
    border-top: 1px solid #d0d7de;
}

.settings-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    max-width: 720px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fbfcfd;
}

.settings-toggle input {
    margin-top: 0.2rem;
}

.settings-toggle span {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.settings-toggle small {
    color: #666;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-header h4 {
    margin: 0;
}

.section-title-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
    min-width: 0;
}

.add-job-bar {
    width: 100%;
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12rem;
    min-height: 40px;
    padding: 0.32rem 0.65rem;
    border-radius: 14px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.add-job-bar-panel {
    display: grid;
    gap: 0.55rem;
}

.job-section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    color: #111827;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.job-section-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 1.15em;
    border-radius: 999px;
    background: #0d6efd;
}

.icon-filter-button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 30px;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-weight: 800;
}

.icon-filter-button.active {
    border-color: #0d6efd;
    background: #e7f1ff;
    color: #084298;
}

.filter-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.filter-label {
    font-size: 0.78rem;
}

.assigned-job-filter-panel {
    display: grid;
    gap: 0.65rem;
    margin: -0.25rem 0 0.75rem;
    padding: 0.65rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fbfcfe;
}

.assigned-job-filter-panel strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #5b6776;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.job-entry-panel {
    padding: 0.75rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fbfcfd;
}

.job-entry-panel .form-control,
.job-entry-panel .form-select {
    max-width: none;
}

.job-customer-picker {
    padding: 0;
    border: 0;
    background: transparent;
    max-width: 260px;
}

.job-customer-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 260px;
}

.for-us-customer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.2rem 0.5rem;
    border: 1px solid #d97706;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.for-us-customer-toggle input {
    margin: 0;
    accent-color: #d97706;
}

.for-us-style-preview {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d97706;
    border-radius: 8px;
    background: #fed7aa;
    color: #7c2d12;
    font-weight: 900;
    box-shadow: inset 4px 0 0 #f97316;
}

.job-queue-table,
.dashboard-work-orders-table {
    min-width: 840px;
}

.job-queue-table th,
.job-queue-table td,
.dashboard-work-orders-table th,
.dashboard-work-orders-table td {
    white-space: normal;
}

.accounting-choice-card {
    width: min(520px, 100%);
}

.accounting-queue-table {
    min-width: 980px;
}

.accounting-queue-table th,
.accounting-queue-table td {
    white-space: normal;
}

.accounting-queue-table th:last-child,
.accounting-queue-table td:last-child {
    width: 300px;
}

.accounting-actions-cell {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

.accounting-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.accounting-actions .btn {
    flex: 0 0 auto;
}

.accounting-mark-billed {
    font-weight: 700;
}

.editable-field {
    display: inline-flex;
    max-width: 100%;
    padding: 0.15rem 0.25rem;
    border: 0;
    border-bottom: 1px dashed #7aa7d9;
    border-radius: 4px;
    background: transparent;
    color: #111827;
    text-align: left;
    cursor: pointer;
}

.editable-field:hover {
    background: #eef6ff;
    color: #084298;
}

.editable-field::after {
    content: "Edit";
    margin-left: 0.4rem;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.editable-field-iconless::after {
    content: "";
    margin-left: 0;
}

.table-one-line {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

button.table-one-line {
    width: 100%;
}

.job-inline-editor {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.job-inline-editor .form-control,
.job-inline-editor .form-select {
    max-width: none;
    margin-bottom: 0;
}

.job-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.job-entry-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
    gap: 0.85rem;
    align-items: start;
}

.job-entry-details {
    display: grid;
    gap: 0.75rem;
}

.job-entry-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.65rem;
}

.job-action-builder {
    padding: 0.7rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #f8fafc;
}

.job-action-type-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.3rem 0 0.55rem;
}

.job-action-type {
    min-height: 34px;
    padding: 0.3rem 0.65rem;
    border: 1px solid #c9d7ee;
    border-radius: 6px;
    background: #ffffff;
    color: #0d6efd;
    font-weight: 700;
}

.job-action-type.selected {
    border-color: #0d6efd;
    background: #e7f1ff;
    color: #084298;
}

.job-action-card-list {
    display: grid;
    gap: 0.5rem;
}

.job-action-card-list.compact {
    gap: 0.28rem;
}

.job-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem;
    align-items: center;
}

.job-action-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.42rem;
    align-items: center;
    width: 100%;
    min-height: 34px;
    padding: 0.36rem 0.48rem;
    border: 1px solid #d0d7de;
    border-radius: 7px;
    background: #ffffff;
    color: #1f2937;
    text-align: left;
}

.expandable-list {
    display: grid;
    gap: 0.38rem;
}

.expandable-item {
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.expandable-item.for-us-job,
.for-us-style-preview.for-us-job-orange {
    border-color: #d97706;
    background: #fed7aa;
    box-shadow: inset 4px 0 0 #f97316;
}

.expandable-item.for-us-job .expandable-summary {
    background: #fed7aa;
}

.expandable-item.for-us-job .expandable-summary:hover {
    background: #fdba74;
}

.expandable-item.for-us-job-gold,
.for-us-style-preview.for-us-job-gold {
    border-color: #b45309;
    background: #fde68a;
    box-shadow: inset 4px 0 0 #d97706;
}

.expandable-item.for-us-job-gold .expandable-summary {
    background: #fde68a;
}

.expandable-item.for-us-job-gold .expandable-summary:hover {
    background: #fcd34d;
}

.expandable-item.for-us-job-green,
.for-us-style-preview.for-us-job-green {
    border-color: #15803d;
    background: #bbf7d0;
    box-shadow: inset 4px 0 0 #16a34a;
}

.expandable-item.for-us-job-green .expandable-summary {
    background: #bbf7d0;
}

.expandable-item.for-us-job-green .expandable-summary:hover {
    background: #86efac;
}

.expandable-item.for-us-job-blue,
.for-us-style-preview.for-us-job-blue {
    border-color: #2563eb;
    background: #bfdbfe;
    box-shadow: inset 4px 0 0 #3b82f6;
}

.expandable-item.for-us-job-blue .expandable-summary {
    background: #bfdbfe;
}

.expandable-item.for-us-job-blue .expandable-summary:hover {
    background: #93c5fd;
}

.expandable-item.calendar-job {
    border-color: #2563eb;
    background: #dbeafe;
    box-shadow: inset 4px 0 0 #2563eb;
}

.expandable-item.calendar-job .expandable-summary {
    background: #dbeafe;
}

.expandable-item.calendar-job .expandable-summary:hover {
    background: #bfdbfe;
}

.expandable-item.asap-job {
    border-color: #dc2626;
    background: #fff1f1;
    box-shadow: inset 4px 0 0 #dc2626;
}

.expandable-item.asap-job .expandable-summary {
    background: #fff1f1;
}

.expandable-item.asap-job .expandable-summary:hover {
    background: #fee2e2;
}

.expandable-item.asap-job .expandable-status,
.expandable-item.asap-job .job-status-count {
    color: #b91c1c;
}

.expandable-summary {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, max-content);
    gap: 0.5rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-height: 32px;
    padding: 0.32rem 0.5rem;
    background: #f8fafc;
    overflow: hidden;
}

.expandable-summary-main {
    display: grid;
    grid-template-columns: minmax(120px, 0.85fr) minmax(180px, 1.5fr) auto auto auto;
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    min-height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    text-align: left;
}

.expandable-summary:hover {
    background: #eef6ff;
}

.expandable-summary-trigger,
.expandable-inline-trigger {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.job-mobile-expand-trigger {
    display: none;
}

.expandable-summary-trigger:hover,
.expandable-inline-trigger:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 3px;
}

.expandable-primary {
    font-size: 0.92rem;
    font-weight: 800;
}

.expandable-summary-trigger.expandable-primary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expandable-description {
    min-width: 0;
    overflow: hidden;
    color: #4b5563;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expandable-status {
    color: #374151;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.expandable-tech {
    color: #0d6efd;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.expandable-start {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin: 0;
    max-width: 100%;
    min-height: 30px;
    padding: 0.24rem 0.5rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

.expandable-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    min-width: 0;
}

.expandable-archive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-width: 34px;
    min-height: 30px;
    padding: 0.2rem;
    border-radius: 8px;
}

.work-order-action-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.expandable-details {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.work-order-bar-list {
    margin-top: 0.75rem;
}

.work-order-summary {
    grid-template-columns: minmax(0, 1fr) max-content 34px max-content max-content;
}

.work-order-running-item {
    border-color: #86c99a;
    box-shadow: inset 4px 0 0 #16a34a;
}

.work-order-summary-running {
    grid-template-columns: minmax(0, 1fr) max-content;
    background: #eefdf3;
}

.work-order-summary-running:hover {
    background: #dcfce7;
}

.work-order-summary-main {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(170px, 1.35fr) max-content;
    gap: 0.45rem;
    align-items: center;
    min-width: 0;
}

.work-order-summary-running .work-order-summary-main {
    grid-template-columns: minmax(130px, 0.65fr) minmax(0, 1fr) max-content;
}

.work-order-running-strip {
    display: flex;
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.work-order-running-chip {
    display: inline-grid;
    grid-template-columns: 28px minmax(92px, auto) auto;
    gap: 0.35rem;
    align-items: center;
    min-height: 32px;
    padding: 0.18rem 0.28rem;
    border: 1px solid #86c99a;
    border-radius: 999px;
    background: #ffffff;
    color: #14532d;
}

.work-order-running-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
}

.work-order-running-text {
    display: grid;
    gap: 0.02rem;
    min-width: 0;
}

.work-order-running-text strong,
.work-order-running-text small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-order-running-text strong {
    font-size: 0.78rem;
    font-weight: 900;
}

.work-order-running-text small {
    color: #166534;
    font-size: 0.72rem;
    font-weight: 800;
}

.work-order-running-tech {
    align-self: center;
    justify-self: start;
    padding-inline: 0.15rem;
}

.work-order-running-end,
.work-order-running-end-all {
    border-color: #f59e0b;
    border-radius: 999px;
    font-weight: 850;
}

.work-order-running-end {
    min-height: 26px;
    padding: 0.12rem 0.45rem;
}

.work-order-running-end-all {
    min-height: 30px;
    padding: 0.18rem 0.55rem;
}

.work-order-progress {
    margin-left: 0;
    white-space: nowrap;
}

.work-order-summary-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.work-order-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.work-order-row-icon-action {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
}

.work-order-time-action {
    background: #16a34a;
    border-color: #16a34a;
}

.work-order-time-action:hover {
    background: #15803d;
    border-color: #15803d;
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.priority-urgent {
    background: #dc2626;
}

.priority-high {
    background: #f97316;
}

.priority-normal {
    background: #6b7280;
    color: #ffffff;
}

.priority-low {
    background: #16a34a;
}

.priority-inline-edit,
.priority-choice {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.priority-inline-edit {
    width: fit-content;
    min-height: 34px;
    padding: 0.2rem 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-weight: 800;
    cursor: pointer;
}

.work-order-details-panel {
    background: #ffffff;
}

.work-order-detail-grid,
.work-order-edit-grid {
    align-items: stretch;
}

.work-order-details-panel .work-order-detail-tile {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(34px, 1fr);
    align-content: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-color: #d8c8ad;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 #b89356;
}

.work-order-details-panel .work-order-detail-label {
    display: flex;
    align-items: center;
    min-height: 24px;
    padding: 0.18rem 0.5rem;
    border-bottom: 1px solid #d8c8ad;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    color: #242628;
    font-size: 0.7rem;
    font-weight: 900;
}

.work-order-details-panel .work-order-detail-value {
    align-self: center;
    padding: 0.3rem 0.5rem;
}

.work-order-details-panel .work-order-detail-tile > .work-order-value-picker-button,
.work-order-details-panel .work-order-detail-tile > .work-order-detail-button,
.work-order-details-panel .work-order-detail-tile > .priority-inline-edit {
    min-height: 34px;
    padding: 0.3rem 0.5rem;
    border-radius: 0;
}

.work-order-top-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.55rem;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.work-order-detail-tile {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(74px, max-content) minmax(0, 1fr);
    gap: 0.28rem 0.5rem;
    align-items: center;
    min-width: 0;
    min-height: 38px;
    padding: 0.34rem 0.55rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fbfcfe;
    box-shadow: inset 3px 0 0 #d7e7ff;
}

.work-order-top-info-grid .work-order-detail-tile {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(34px, 1fr);
    align-content: stretch;
    gap: 0;
    min-width: 0;
    min-height: 58px;
    padding: 0;
    overflow: hidden;
    border-color: #d8c8ad;
    background: #fffdf8;
}

.work-order-top-info-grid .work-order-detail-label {
    display: flex;
    align-items: center;
    min-height: 24px;
    padding: 0.18rem 0.5rem;
    border-bottom: 1px solid #d8c8ad;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    color: #242628;
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1;
}

.work-order-top-info-grid .work-order-detail-value {
    align-self: center;
    padding: 0.3rem 0.5rem;
    font-size: 0.82rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-order-top-picker-button,
.work-order-value-picker-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0.3rem 0.52rem;
    border: 0;
    background: #fffdf8;
    color: #0f5f31;
    font-weight: 850;
    text-align: left;
}

.work-order-top-picker-button span,
.work-order-value-picker-button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-order-top-picker-button svg,
.work-order-value-picker-button svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: #b45309;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.work-order-top-picker-button:hover,
.work-order-value-picker-button:hover {
    background: #fff4e8;
}

.work-order-top-info-grid .work-order-detail-tile.primary {
    box-shadow: inset 3px 0 0 #1f7a3d;
}

.work-order-top-info-grid .work-order-detail-tile.customer {
    box-shadow: inset 3px 0 0 #d97706;
}

.work-order-top-info-grid .work-order-detail-tile.equipment {
    box-shadow: inset 3px 0 0 #64748b;
}

.work-order-top-info-grid .work-order-detail-tile.customer.editing {
    grid-column: 1 / -1;
    overflow: visible;
}

.work-order-detail-label {
    color: #5b6776;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.work-order-detail-value {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 0.9rem;
    font-weight: 750;
}

.work-order-inline-button {
    width: fit-content;
    margin-top: 0.15rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0d6efd;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.work-order-customer-picker {
    margin-top: 0.2rem;
}

.work-order-detail-button {
    width: fit-content;
    min-height: 0;
    padding: 0;
    color: #0d6efd;
    font-size: 0.94rem;
    font-weight: 800;
}

.work-order-detail-tile .job-inline-editor {
    grid-column: 1 / -1;
}

.work-order-detail-tile:has(.job-inline-editor) {
    grid-column: 1 / -1;
    align-items: stretch;
}

.work-order-detail-tile .job-inline-editor {
    width: 100%;
    min-width: 0;
    padding: 0.45rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
}

.work-order-detail-tile .job-option-bubbles {
    width: 100%;
}

.work-order-detail-tile .job-inline-actions {
    justify-content: flex-start;
}

.work-order-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5ebf2;
}

.work-order-detail-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 36px;
    border-radius: 8px;
    font-weight: 800;
}

.work-order-detail-action-icon {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.work-order-detail-tile > .work-order-value-picker-button {
    align-self: stretch;
    width: 100%;
    min-height: 32px;
    border-radius: 6px;
}

.work-order-value-picker-button.compact {
    padding: 0.24rem 0.42rem;
    font-size: 0.84rem;
}

.priority-picker-value {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.priority-picker-value .priority-badge {
    flex: 0 0 auto;
}

.work-order-list-picker-editor {
    display: grid;
    gap: 0.45rem;
    padding: 0.5rem;
    border-color: #d8c8ad;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 #b89356;
}

.work-order-list-picker-editor .job-option-bubbles {
    gap: 0.35rem;
}

.work-order-list-picker-editor .job-inline-actions {
    margin-top: 0;
    padding-top: 0.4rem;
    border-top: 1px solid #eadfc9;
}

.schedule-picker-editor .schedule-edit-grid label,
.schedule-picker-editor .schedule-edit-single {
    gap: 0;
    overflow: hidden;
    border: 1px solid #d8c8ad;
    border-radius: 7px;
    background: #fffdf8;
}

.schedule-picker-editor .schedule-edit-grid label > span,
.schedule-picker-editor .schedule-edit-single > span {
    min-height: 23px;
    padding: 0.18rem 0.45rem;
    border-bottom: 1px solid #d8c8ad;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.schedule-picker-editor .form-control {
    min-height: 36px;
    border: 0;
    border-radius: 0;
    background: #fffdf8;
}

.equipment-edit-modal {
    max-width: 620px;
}

.equipment-edit-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid #eadfc9;
    border-radius: 8px;
    background: #fffdf8;
}

.equipment-edit-summary strong {
    color: #14532d;
}

.equipment-edit-summary span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
}

.work-order-folder-tabs {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    padding: 0 0.25rem;
    border-bottom: 2px solid #c9b27a;
}

.work-order-folder-tab,
.work-order-add-tab {
    border: 1px solid #c9b27a;
    border-bottom: 0;
    background: #f9f4e8;
    color: #1f2937;
    font-weight: 900;
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.8) inset;
}

.work-order-folder-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.55rem 1rem;
    border-radius: 10px 10px 0 0;
}

.work-order-folder-tab-close {
    display: inline-grid;
    place-items: center;
    width: 1.2rem;
    height: 1.2rem;
    border: 1px solid rgba(172, 44, 44, 0.18);
    border-radius: 999px;
    background: rgba(172, 44, 44, 0.08);
    color: #991b1b;
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1;
}

.work-order-folder-tab-close:hover {
    border-color: rgba(172, 44, 44, 0.38);
    background: rgba(172, 44, 44, 0.14);
}

.work-order-folder-tab.active {
    min-height: 48px;
    background: #ffffff;
    color: #14532d;
    box-shadow: inset 0 4px 0 #1f7a3d;
}

.work-order-folder-tab.sales.active {
    box-shadow: inset 0 4px 0 #d97706;
}

.work-order-folder-tab.inspection.active {
    box-shadow: inset 0 4px 0 #475569;
}

.deal-folder-tabs {
    margin: 0.55rem 0;
}

.deal-tab-panel {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.55rem;
    padding: 0.7rem;
    border: 1px solid #eadfc9;
    border-radius: 10px;
    background: rgba(255, 253, 248, 0.78);
}

.deal-tab-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr);
    gap: 0.55rem;
    align-items: end;
}

.deal-tab-form-grid .wide {
    grid-column: 1 / -1;
}

.deal-build-add-row {
    display: grid;
    grid-template-columns: minmax(8rem, 0.45fr) minmax(0, 1fr) minmax(0, 0.8fr) max-content;
    gap: 0.45rem;
    align-items: center;
}

.work-order-add-tab-wrapper {
    position: relative;
}

.work-order-add-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 42px;
    border-radius: 999px 999px 0 0;
    color: #14532d;
    font-size: 1.3rem;
    line-height: 1;
}

.work-order-add-tab-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 20;
    display: grid;
    min-width: 170px;
    padding: 0.35rem;
    border: 1px solid #d8c99e;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.work-order-add-tab-menu button {
    border: 0;
    border-radius: 7px;
    background: transparent;
    padding: 0.55rem 0.7rem;
    color: #1f2937;
    font-weight: 800;
    text-align: left;
}

.work-order-add-tab-menu button:hover {
    background: #f8efe0;
    color: #9a4f05;
}

.work-order-tab-panel {
    border-top-left-radius: 0;
}

.work-order-sales-tab-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.work-order-tab-empty {
    display: grid;
    gap: 0.25rem;
    min-height: 120px;
    align-content: center;
    padding: 1rem;
    border: 1px dashed #c9b27a;
    border-radius: 10px;
    background: #fffaf0;
    color: #334155;
}

.work-order-tab-empty.compact {
    min-height: auto;
    padding: 0.75rem;
}

.inspection-builder {
    display: grid;
    gap: 0.7rem;
}

.inspection-builder-section {
    display: grid;
    gap: 0.6rem;
    padding: 0.75rem;
    border: 1px solid #d8c99e;
    border-radius: 10px;
    background: #fffaf0;
}

.inspection-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(201, 178, 122, 0.55);
}

.inspection-section-header strong {
    color: #14532d;
    font-size: 1rem;
}

.inspection-section-header span {
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 700;
}

.inspection-action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.45rem;
    border: 1px solid #eadfc9;
    border-radius: 8px;
    background: #fffdf8;
}

.inspection-grower-card {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 0.8fr;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #d8c99e;
    border-radius: 8px;
    background: #ffffff;
}

.inspection-grower-card > div {
    display: grid;
    min-width: 0;
    gap: 0.08rem;
}

.inspection-grower-card span {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.inspection-grower-card strong {
    min-width: 0;
    overflow: hidden;
    color: #14532d;
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inspection-equipment-panel {
    display: grid;
    gap: 0.45rem;
    padding: 0.55rem;
    border: 1px solid #e7dcc0;
    border-radius: 10px;
    background: #ffffff;
}

.inspection-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.inspection-panel-heading.span-all {
    grid-column: 1 / -1;
}

.inspection-panel-heading strong {
    color: #14532d;
    font-size: 0.9rem;
    font-weight: 950;
}

.inspection-panel-heading span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 750;
}

.inspection-equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 0.45rem;
}

.inspection-equipment-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.12rem;
    min-height: 54px;
    padding: 0.48rem 0.6rem;
    border: 1px solid #d8c99e;
    border-radius: 9px;
    background: #ffffff;
    color: #1f2937;
    text-align: left;
}

.inspection-equipment-select {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    text-align: left;
}

.inspection-equipment-card.selected {
    border-color: #1f7a3d;
    background: #effaf1;
    box-shadow: inset 4px 0 0 #1f7a3d;
}

.inspection-equipment-card strong,
.inspection-equipment-select strong {
    min-width: 0;
    overflow: hidden;
    color: #14532d;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inspection-equipment-card span,
.inspection-equipment-select span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
}

.inspection-equipment-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.inspection-equipment-actions .btn {
    min-height: 30px;
    padding: 0.22rem 0.45rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.inspection-add-equipment-button {
    min-height: 30px;
    padding: 0.24rem 0.6rem;
    font-size: 0.82rem;
}

.inspection-equipment-add-panel {
    display: grid;
    gap: 0.55rem;
    padding: 0.65rem;
    border: 1px dashed #c9b27a;
    border-radius: 10px;
    background: #ffffff;
}

.inspection-equipment-add-panel > .btn {
    justify-self: start;
}

.inspection-planter-setup {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(220px, 0.7fr);
    gap: 0.55rem;
    align-items: start;
    padding: 0.6rem;
    border: 1px solid #e7dcc0;
    border-radius: 10px;
    background: #ffffff;
}

.inspection-choice-group {
    display: grid;
    gap: 0.35rem;
}

.inspection-choice-label {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
}

.inspection-choice-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.inspection-choice-bubble {
    border: 1px solid #bfd0ea;
    border-radius: 999px;
    background: #ffffff;
    color: #1f4f91;
    min-height: 32px;
    padding: 0.32rem 0.62rem;
    font-size: 0.84rem;
    font-weight: 900;
}

.inspection-choice-bubble.selected {
    border-color: #1f7a3d;
    background: #e8f7ec;
    color: #14532d;
}

.inspection-number-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 180px));
    gap: 0.65rem;
}

.inspection-number-grid label {
    display: grid;
    gap: 0.25rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 900;
}

.inspection-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 0.5rem;
}

.inspection-category-stack {
    display: grid;
    gap: 0.4rem;
    align-content: start;
}

.inspection-category-card {
    display: grid;
    position: relative;
    gap: 0.2rem;
    min-height: 58px;
    align-content: center;
    padding: 0.48rem 2.45rem 0.48rem 0.62rem;
    border: 1px solid #d8c99e;
    border-radius: 9px;
    background: #ffffff;
    color: #1f2937;
    text-align: left;
}

.inspection-category-card.selected {
    border-color: #15803d;
    background: linear-gradient(180deg, #dcfce7 0%, #f3fff6 100%);
    box-shadow: inset 4px 0 0 #15803d, 0 8px 16px rgba(21, 128, 61, 0.14);
}

.inspection-category-card.selected::after,
.inspection-subcategory-card.selected::after {
    content: "";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 0.86rem;
    height: 0.86rem;
    border: 2px solid #15803d;
    border-radius: 999px;
    transform: translateY(-58%);
}

.inspection-category-card.selected::before,
.inspection-subcategory-card.selected::before {
    content: "";
    position: absolute;
    right: 0.61rem;
    top: 50%;
    width: 0.38rem;
    height: 2px;
    border-radius: 999px;
    background: #15803d;
    transform: translateY(0.34rem) rotate(45deg);
}

.inspection-category-card span {
    color: #9a4f05;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.inspection-category-card strong {
    color: #14532d;
    font-size: 1rem;
}

.inspection-subcategory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: -0.08rem;
    padding: 0.38rem;
    border: 1px solid #d8c99e;
    border-top: 0;
    border-radius: 0 0 9px 9px;
    background: #fffdf8;
}

.inspection-subcategory-card {
    position: relative;
    border: 1px solid #bfd0ea;
    border-radius: 999px;
    background: #ffffff;
    color: #1f4f91;
    min-height: 31px;
    padding: 0.3rem 1.55rem 0.3rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 900;
}

.inspection-subcategory-card.selected {
    border-color: #15803d;
    background: #dcfce7;
    color: #14532d;
}

.inspection-subcategory-card.selected::after {
    right: 0.48rem;
    width: 0.68rem;
    height: 0.68rem;
    border-width: 1.5px;
}

.inspection-subcategory-card.selected::before {
    right: 0.38rem;
    width: 0.28rem;
    height: 1.5px;
    transform: translateY(0.27rem) rotate(45deg);
}

.inspection-outline-list {
    display: grid;
    gap: 0.35rem;
}

.inspection-outline-group {
    display: grid;
    overflow: hidden;
    border: 1px solid #d7c49c;
    border-radius: 8px;
    background: #ffffff;
}

.inspection-outline-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) max-content;
    gap: 0.5rem;
    align-items: start;
    min-height: 32px;
    padding: 0.5rem 0.6rem;
    background: linear-gradient(180deg, #fffdf7 0%, #ffffff 100%);
}

.inspection-outline-header-button {
    width: 100%;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.inspection-outline-header-button:hover {
    background: #fff4e8;
}

.inspection-outline-header-button.collapsed {
    background: #fffaf0;
}

.inspection-outline-row > div {
    display: grid;
    min-width: 0;
    gap: 0.08rem;
}

.inspection-outline-row span {
    color: #9a4f05;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.inspection-outline-row strong {
    color: #1f2937;
}

.inspection-outline-row small {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
}

.inspection-outline-row em {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: center;
    padding: 0.16rem 0.45rem;
    border-radius: 999px;
    background: #f5efe3;
    color: #5f3f12;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 950;
    white-space: nowrap;
}

.inspection-outline-row em b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: #ffffff;
    color: #9a4f05;
    font-size: 0.8rem;
    line-height: 1;
}

.inspection-note-count {
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.35rem;
    border-radius: 999px;
    background: #e8f7ec;
    color: #14532d;
    font-size: 0.68rem;
    font-weight: 950;
}

.inspection-outline-items {
    display: grid;
    gap: 0.42rem;
    padding: 0.4rem 0.55rem 0.55rem;
    border-top: 1px solid #efe3cf;
}

.inspection-outline-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 0.45rem;
    align-items: start;
    padding: 0.38rem 0.45rem;
    border: 1px solid #e4dfd4;
    border-radius: 9px;
    background: #f8fafc;
}

.inspection-outline-item > span {
    width: 9px;
    height: 9px;
    margin-top: 0.25rem;
    border-radius: 999px;
    background: #1f7a3d;
    box-shadow: 0 0 0 3px #e8f7ec;
}

.inspection-outline-item > div {
    display: grid;
    min-width: 0;
    gap: 0.06rem;
}

.inspection-outline-item-content {
    display: grid;
    min-width: 0;
    gap: 0.35rem;
}

.inspection-outline-item strong {
    color: #1f2937;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.25;
}

.inspection-outline-item small {
    color: #9a4f05;
    font-size: 0.72rem;
    font-weight: 800;
}

.inspection-outline-item.inspection-check {
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: center;
    border-color: #d7c6a5;
    background: linear-gradient(180deg, #fffefa 0%, #ffffff 100%);
    box-shadow: 0 4px 10px rgba(66, 54, 35, 0.06);
    cursor: pointer;
}

.inspection-outline-item.inspection-check:hover,
.inspection-outline-item.inspection-check.expanded {
    border-color: #b89356;
    background: #fffaf0;
}

.inspection-outline-item.inspection-check.expanded {
    box-shadow: inset 3px 0 0 #d9771f, 0 6px 14px rgba(66, 54, 35, 0.08);
}

.inspection-outline-item.inspection-check > span {
    background: #b42318;
    box-shadow: 0 0 0 3px #fff0ee;
}

.inspection-outline-item.inspection-check.rated > span {
    background: #15803d;
    box-shadow: 0 0 0 3px #dcfce7;
}

.inspection-outline-item.inspection-check .inspection-outline-item-content {
    grid-template-columns: minmax(10rem, 1fr) max-content;
    align-items: center;
    gap: 0.55rem;
}

.inspection-frame-control-row {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 0.55rem;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.inspection-condition-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.36rem;
}

.inspection-condition-bubble {
    min-height: 30px;
    padding: 0.22rem 0.58rem;
    border: 1px solid #d7c6a5;
    border-radius: 999px;
    background: #ffffff;
    color: #5f4421;
    font-size: 0.76rem;
    font-weight: 900;
}

.inspection-condition-bubble.selected {
    border-color: #1f7a3d;
    background: #e8f7ec;
    color: #14532d;
}

.inspection-condition-bubble.bad.selected {
    border-color: #b42318;
    background: #fff0ee;
    color: #9f1d17;
}

.inspection-condition-bubble.poor.selected {
    border-color: #b42318;
    background: #fff0ee;
    color: #9f1d17;
}

.inspection-condition-bubble.decent.selected {
    border-color: #d9771f;
    background: #fff4e8;
    color: #9a4f05;
}

.inspection-condition-bubble.good.selected {
    border-color: #1f7a3d;
    background: #e8f7ec;
    color: #14532d;
}

.inspection-condition-bubble.healthy.selected {
    border-color: #1f7a3d;
    background: #e8f7ec;
    color: #14532d;
}

.inspection-condition-bubble.unhealthy.selected {
    border-color: #b42318;
    background: #fff0ee;
    color: #9f1d17;
}

.inspection-condition-bubble.none.selected {
    border-color: #1f7a3d;
    background: #e8f7ec;
    color: #14532d;
}

.inspection-condition-bubble.no.selected {
    border-color: #1f7a3d;
    background: #e8f7ec;
    color: #14532d;
}

.inspection-condition-bubble.yes.selected {
    border-color: #b42318;
    background: #fff0ee;
    color: #9f1d17;
}

.inspection-mobile-condition-legend {
    display: none;
}

.inspection-mobile-condition-legend span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0.16rem 0.58rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 950;
}

.inspection-mobile-condition-legend .bad {
    border: 1px solid #b42318;
    background: #fff0ee;
    color: #9f1d17;
}

.inspection-mobile-condition-legend .decent {
    border: 1px solid #d9771f;
    background: #fff4e8;
    color: #9a4f05;
}

.inspection-mobile-condition-legend .good {
    border: 1px solid #1f7a3d;
    background: #e8f7ec;
    color: #14532d;
}

.inspection-note-button {
    display: inline-flex;
    position: relative;
    z-index: 1;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid #d7c6a5;
    border-radius: 999px;
    background: #f5efe3;
    color: #5f4421;
    font-size: 1.05rem;
    font-weight: 950;
    line-height: 1;
}

.inspection-note-button.active {
    border-color: #15803d;
    background: #dcfce7;
    color: #14532d;
}

.inspection-note-input {
    min-height: 34px;
    border-color: #d7c6a5;
    background: #ffffff;
    font-size: 0.84rem;
}

.inspection-note-panel {
    display: grid;
    gap: 0.4rem;
    padding: 0.45rem;
    border: 1px solid #eadfc9;
    border-radius: 8px;
    background: #ffffff;
}

.inspection-note-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.4rem;
    align-items: stretch;
}

.inspection-note-add-row .btn {
    min-height: 34px;
    padding: 0.22rem 0.7rem;
}

.inspection-note-list {
    display: grid;
    gap: 0.3rem;
}

.inspection-note-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.45rem;
    align-items: center;
    padding: 0.35rem 0.45rem;
    border: 1px solid #efe3cf;
    border-radius: 7px;
    background: #fffaf0;
}

.inspection-note-entry span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 750;
}

.inspection-note-entry-actions {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.inspection-note-entry-actions .btn {
    min-height: 28px;
    padding: 0.16rem 0.45rem;
    font-size: 0.74rem;
}

.inspection-follow-up-panel {
    display: grid;
    grid-column: 1 / -1;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.45rem;
    border: 1px solid #eadfc9;
    border-radius: 8px;
    background: #fffaf0;
}

.inspection-follow-up-panel > strong {
    color: #9a4f05;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.inspection-row-position-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.25rem, 1fr));
    gap: 0.28rem;
    width: 100%;
    min-width: 0;
    max-height: 10rem;
    overflow-y: auto;
}

.inspection-row-position-button {
    min-height: 32px;
    border: 1px solid #d7c6a5;
    border-radius: 8px;
    background: #ffffff;
    color: #5f4421;
    font-size: 0.78rem;
    font-weight: 950;
}

.inspection-row-position-button.selected {
    border-color: #1f7a3d;
    background: #e8f7ec;
    color: #14532d;
}

.inspection-row-position-button.all {
    grid-column: 1 / -1;
    border-color: #d9771f;
    background: #fff4e8;
    color: #9a4f05;
}

.inspection-row-position-button.all.selected {
    border-color: #1f7a3d;
    background: #e8f7ec;
    color: #14532d;
}

.inspection-item-detail-dropdown {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
    gap: 0.45rem;
    padding: 0.5rem;
    border: 1px solid #eadfc9;
    border-radius: 8px;
    background: #ffffff;
    cursor: default;
}

.inspection-item-detail-info,
.inspection-item-detail-notes {
    display: grid;
    align-content: start;
    gap: 0.22rem;
    min-width: 0;
}

.inspection-item-detail-info {
    padding-right: 0.45rem;
    border-right: 1px solid #eadfc9;
}

.inspection-item-detail-info strong,
.inspection-item-detail-notes strong {
    color: #9a4f05;
    font-size: 0.68rem;
    font-weight: 950;
    text-transform: uppercase;
}

.inspection-item-detail-info span,
.inspection-item-detail-notes span {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
}

.inspection-next-step-note,
.inspection-muted {
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
}

.work-order-lead-create-panel {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.work-order-lead-create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: end;
}

.work-order-lead-create-grid .wide {
    grid-column: 1 / -1;
}

.work-order-lead-create-grid .btn {
    justify-self: start;
}

.service-mode-launch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0.5rem 0 1.5rem;
    border: 0;
    border-radius: 10px;
    background: #2f3437;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.service-mode-page {
    min-height: 100vh;
}

.service-mode-layout-main {
    min-height: 100vh;
    padding: 0.75rem;
}

.service-mode-shell {
    display: grid;
    gap: 1rem;
    max-width: 920px;
    margin: 0 auto;
}

.service-mode-header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    min-height: 48px;
    padding: 0.35rem 0.5rem;
    border-radius: 12px;
    background: #2f3437;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.14);
}

.service-mode-header strong {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-mode-back,
.service-wizard-close {
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-weight: 900;
}

.service-mode-back {
    width: 34px;
    height: 34px;
}

.service-mode-create-grid,
.service-time-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.service-mode-create-card,
.service-option-card,
.service-expand-grid button,
.service-picker-option,
.service-qty-grid button {
    border: 1px solid #d2dbe7;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.service-mode-create-card {
    min-height: 72px;
    font-size: 1.15rem;
}

.service-mode-section {
    padding: 0.8rem;
    border: 1px solid #d9e1ea;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
}

.service-wizard-overlay {
    align-items: flex-start;
    padding: 0.75rem;
}

.service-wizard-panel {
    width: min(620px, 100%);
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
    padding: 0.8rem;
    border: 1px solid #d9e1ea;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.24);
}

.service-mode-section h2 {
    margin: 0 0 0.65rem;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 900;
}

.service-list,
.service-wizard-body,
.service-picker-list,
.service-qty-panel {
    display: grid;
    gap: 0.55rem;
}

.service-bar {
    overflow: hidden;
    border: 1px solid #d8e0ea;
    border-radius: 14px;
    background: #f8fafc;
}

.service-bar.idle-time {
    background: #ffffff;
}

.service-bar.active-time {
    border-color: #f59e0b;
    background: #fff4e5;
    box-shadow: inset 4px 0 0 #f59e0b;
}

.service-active-summary {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) max-content;
    gap: 0.45rem;
    align-items: center;
    min-height: 44px;
    padding: 0.32rem 0.5rem 0.32rem 0.65rem;
}

.service-active-customer,
.service-active-count {
    min-width: 0;
    border: 0;
    background: transparent;
    color: #111827;
    font-weight: 950;
    text-align: left;
    cursor: pointer;
}

.service-active-customer strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-active-count {
    padding: 0.12rem 0.48rem;
    border-radius: 999px;
    background: #f8fafc;
    color: #0f172a;
    text-align: center;
}

.service-running-strip {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    width: 100%;
    padding: 0.18rem;
    border: 1px solid rgba(217, 119, 6, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    overflow: hidden;
}

.service-running-chip {
    display: grid;
    grid-template-columns: 26px minmax(82px, 1fr) minmax(76px, 0.9fr);
    gap: 0.4rem;
    align-items: center;
    min-width: 0;
    width: 100%;
    max-width: 290px;
    padding: 0.18rem 0.22rem 0.18rem 0.3rem;
    border: 1px solid #1f9d55;
    border-radius: 999px;
    background: #f0fff4;
    color: #111827;
    cursor: pointer;
}

.service-running-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 950;
}

.service-running-text {
    display: grid;
    min-width: 0;
    line-height: 1.05;
}

.service-running-text strong,
.service-running-text small {
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.service-running-text strong {
    font-size: 1rem;
    font-weight: 950;
}

.service-running-text small {
    color: #166534;
    font-size: 0.72rem;
    font-weight: 850;
}

.service-running-end {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    width: 100%;
    padding: 0.16rem 0.62rem;
    border: 0;
    border-radius: 999px;
    background: #d97706;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 950;
}

.service-bar.asap-job {
    border-color: #dc2626;
    background: #fff1f1;
    box-shadow: inset 4px 0 0 #dc2626;
}

.service-bar.asap-job .service-bar-summary span {
    color: #b91c1c;
}

.service-bar-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 0.4rem;
    align-items: center;
    min-height: 40px;
    padding: 0.32rem 0.45rem 0.32rem 0.6rem;
}

.service-bar.active-time .service-bar-main {
    grid-template-columns: minmax(0, 1fr);
    min-height: 46px;
}

.service-bar-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
    min-height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    text-align: left;
    cursor: pointer;
}

.service-active-label {
    grid-column: 1 / -1;
    color: #9a3412 !important;
}

.service-time-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #1f2937;
}

.service-time-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-bar-main strong,
.service-bar-summary strong,
.service-bar-summary span,
.service-picker-option span,
.service-qty-panel span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-bar-main span {
    color: #2563eb;
    font-size: 0.84rem;
    font-weight: 900;
}

.service-bar-summary span {
    color: #2563eb;
    font-size: 0.84rem;
    font-weight: 900;
}

.service-time-actions {
    gap: 0.35rem;
    padding: 0 0.6rem 0.5rem;
}

.service-start-button,
.service-end-button {
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    font-weight: 900;
}

.service-end-button {
    border-color: #f59e0b;
    background: #fff7ed;
    color: #9a3412;
}

.service-expand-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0 0.6rem 0.6rem;
}

.service-expand-grid button {
    min-height: 54px;
}

.service-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #edf1f5;
}

.service-wizard-close {
    min-width: 72px;
    min-height: 36px;
    border-color: #d2dbe7;
    background: #f8fafc;
    color: #1f2937;
}

.service-wizard-body label {
    margin: 0;
    color: #4b5563;
    font-size: 1.02rem;
    font-weight: 900;
}

.service-big-input,
.service-big-textarea,
.service-qty-input {
    min-height: 54px;
    font-size: 1.08rem;
    font-weight: 800;
}

.service-picker-list {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.1rem;
}

.service-picker-option {
    display: grid;
    gap: 0.15rem;
    min-height: 64px;
    padding: 0.65rem 0.75rem;
    font-size: 1.02rem;
    text-align: left;
}

.service-part-option {
    min-height: 108px;
    align-content: center;
    padding: 0.85rem 0.95rem;
}

.service-part-option strong {
    font-size: 1.12rem;
}

.service-part-option span {
    font-size: 0.95rem;
    white-space: normal;
}

.service-auto-part-button {
    min-height: 58px;
    border: 1px solid #1f7a3d;
    border-radius: 14px;
    background: #1f7a3d;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 950;
    box-shadow: 0 10px 20px rgba(31, 122, 61, 0.2);
}

.service-keypad-card {
    width: min(420px, calc(100vw - 1.5rem));
}

.service-keypad-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0.7rem;
    border: 1px solid #d2dbe7;
    border-radius: 12px;
    background: #f8fafc;
    color: #111827;
    font-size: 1.15rem;
    font-weight: 950;
    text-align: center;
}

.service-keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.service-keypad-grid button {
    min-height: 62px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
    font-size: 1.2rem;
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.service-picker-option.selected,
.service-option-card.selected {
    border-color: #1f7a3d;
    background: #eefaf1;
    color: #14532d;
}

.service-picker-option span,
.service-qty-panel span {
    color: #64748b;
    font-size: 0.84rem;
}

.service-option-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

.service-option-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-option-card {
    min-height: 78px;
    padding: 0.78rem;
    font-size: 1.1rem;
}

.service-large-option {
    min-height: 94px;
    font-size: 1.15rem;
}

.service-step-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.35rem 0.6rem;
    border: 1px solid #d2dbe7;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 1rem;
    font-weight: 950;
}

.service-qty-panel {
    padding: 0.65rem;
    border: 1px solid #d9e1ea;
    border-radius: 14px;
    background: #f8fafc;
}

.service-qty-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.4rem;
}

.service-qty-grid button,
.service-qty-input {
    min-height: 50px;
    text-align: center;
}

.service-qty-input {
    grid-column: span 2;
}

.service-big-action {
    min-height: 50px;
    border-radius: 12px;
    font-weight: 900;
}

.schedule-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.schedule-edit-grid label,
.schedule-edit-single {
    display: grid;
    gap: 0.2rem;
    margin: 0;
    color: #4b5563;
    font-size: 0.72rem;
    font-weight: 800;
}

.job-details-panel {
    background: #ffffff;
}

.job-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(145px, 190px);
    align-items: start;
}

.job-detail-main-card {
    align-content: start;
    min-height: 100%;
}

.job-detail-actions-card {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.job-detail-notes-card {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.job-detail-status-card {
    grid-column: 3;
    grid-row: 1;
}

.job-detail-tech-card {
    grid-column: 3;
    grid-row: 2;
}

.job-detail-grid > div:not(.job-inline-editor) {
    display: grid;
    grid-template-columns: minmax(74px, max-content) minmax(0, 1fr);
    gap: 0.28rem 0.5rem;
    align-items: center;
    min-height: 38px;
    padding: 0.34rem 0.55rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fbfcfe;
    box-shadow: inset 3px 0 0 #d7e7ff;
}

.job-detail-grid > div:not(.job-inline-editor) > strong {
    color: #5b6776;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.job-detail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    min-width: 0;
}

.job-detail-heading strong {
    color: #5b6776;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.job-detail-icon-button {
    width: 24px;
    height: 24px;
    border-color: #b7c4d4;
    background: #f8fafc;
    color: #374151;
    font-size: 0.95rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.job-detail-icon-button:hover {
    border-color: #6b7280;
    background: #eef1f4;
    color: #111827;
}

.icon-danger-button {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    border: 1px solid #e5c2c2;
    border-radius: 8px;
    background: #fffafa;
    color: #b42318;
    cursor: pointer;
}

.icon-danger-button:hover {
    border-color: #d92d20;
    background: #fee4e2;
    color: #7a271a;
}

.icon-danger-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-edit-button {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
}

.icon-edit-button:hover {
    border-color: #64748b;
    background: #e2e8f0;
    color: #0f172a;
}

.icon-edit-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.job-detail-grid > div:not(.job-inline-editor) > div {
    min-width: 0;
}

.job-detail-grid .mt-2 {
    margin-top: 0 !important;
}

.job-detail-grid .editable-field {
    width: fit-content;
    min-height: 0;
    padding: 0;
    color: #0d6efd;
    font-size: 0.94rem;
    font-weight: 800;
}

.job-detail-grid .job-action-card-list {
    grid-column: 1 / -1;
}

.job-detail-grid > .job-inline-editor {
    grid-column: 1 / -1;
}

.job-note-list {
    display: grid;
    gap: 0.32rem;
}

.job-note-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem;
    align-items: center;
    padding: 0.34rem 0.48rem;
    border: 1px solid #d0d7de;
    border-radius: 7px;
    background: #ffffff;
}

.job-note-card > div {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.job-note-card span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.job-note-card small,
.job-note-empty {
    color: #6b7280;
    font-size: 0.76rem;
    font-weight: 700;
}

.work-order-complaint-editor {
    display: grid;
    gap: 0.35rem;
    max-width: 720px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.add-expand-button {
    min-height: 38px;
    font-weight: 800;
}

.add-record-panel {
    max-width: 780px;
}

.mobile-entity-list {
    display: none;
}

.desktop-entity-table {
    display: block;
}

.entity-bar-card {
    border: 1px solid #d0d7de;
    border-radius: 9px;
    background: #ffffff;
    overflow: hidden;
}

.entity-bar-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.45rem;
    align-items: center;
    min-height: 46px;
    padding: 0.32rem 0.45rem;
    background: #f8fafc;
}

.entity-bar-main {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    text-align: left;
}

.entity-bar-title,
.entity-bar-subtitle {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-bar-title {
    color: #0d6efd;
    font-size: 1rem;
    font-weight: 900;
}

.entity-bar-subtitle {
    color: #4b5563;
    font-size: 0.82rem;
}

.entity-phone-link,
.entity-phone-missing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 132px;
    min-height: 32px;
    padding: 0.2rem 0.45rem;
    border: 1px solid #c9d7ee;
    border-radius: 999px;
    background: #ffffff;
    color: #0d6efd;
    font-size: 0.78rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.entity-phone-missing {
    color: #6b7280;
}

.entity-bar-details {
    display: grid;
    gap: 0.65rem;
    padding: 0.65rem;
    border-top: 1px solid #e5e7eb;
}

.entity-detail-grid {
    display: grid;
    gap: 0.45rem;
}

.entity-detail-grid > div {
    display: grid;
    grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
    gap: 0.4rem;
    align-items: center;
    min-height: 32px;
    padding: 0.3rem 0.45rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fbfcfe;
}

.entity-detail-grid strong {
    color: #5b6776;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.entity-detail-grid span,
.entity-detail-grid a {
    min-width: 0;
    overflow-wrap: anywhere;
}

.entity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.expandable-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.inventory-tabs,
.inventory-count-actions,
.inventory-report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.time-clock-dashboard-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    grid-template-areas: "info action link";
    gap: 0.65rem;
    align-items: center;
}

.time-clock-dashboard-info {
    grid-area: info;
    display: grid;
    gap: 0.1rem;
}

.time-clock-dashboard-active {
    grid-area: action;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.time-clock-dashboard-active strong {
    color: #14532d;
    white-space: nowrap;
}

.time-clock-dashboard-button,
.time-clock-dashboard-link,
.time-clock-dashboard-active .btn {
    box-sizing: border-box;
    min-height: 38px;
    height: 38px;
    padding: 0.375rem 0.75rem;
    font-weight: 900;
    line-height: 1.2;
}

.time-clock-dashboard-button {
    grid-area: action;
}

.time-clock-dashboard-link {
    grid-area: link;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: var(--pm-brand-green, #198754);
    background: #ffffff;
    color: var(--pm-brand-green, #198754);
    line-height: 1;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px rgba(31, 122, 61, 0.16);
}

.time-clock-dashboard-link:hover {
    border-color: var(--pm-brand-green-dark, #14532d);
    background: rgba(31, 122, 61, 0.08);
    color: var(--pm-brand-green-dark, #14532d);
    text-decoration: none;
}

.time-tracking-clock-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.5rem;
    align-items: center;
    padding: 0.65rem 0.85rem !important;
    border-color: #d7c6a5;
    border-left: 4px solid var(--pm-brand-green, #1f7a3d);
    background: linear-gradient(90deg, rgba(31, 122, 61, 0.06), rgba(255, 255, 255, 0.78) 42%);
    box-shadow: 0 8px 18px rgba(59, 47, 30, 0.07);
}

.time-tracking-page-title {
    margin: 0 0 0.8rem;
    padding: 0.48rem 0.7rem;
    border: 1px solid #dcc9a6;
    border-radius: 9px;
    background: #fffdf8;
}

.time-tracking-page-title .job-section-title {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.time-tracking-clock-card > div:first-child {
    display: grid;
    gap: 0;
}

.time-tracking-clock-card h4 {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.15;
}

.time-tracking-clock-card .text-muted {
    line-height: 1.15;
}

.time-tracking-active-clock {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: flex-end;
}

.time-tracking-active-counter {
    color: #14532d;
    font-size: 1rem;
}

.time-tracking-clockout-button {
    border-color: #d9771f;
    background: #d9771f;
    color: #ffffff;
    font-weight: 900;
}

.time-tracking-clockout-button:hover {
    border-color: #a94f12;
    background: #a94f12;
    color: #ffffff;
}

.time-tracking-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.3rem;
    border: 1px solid #d9c7a4;
    border-radius: 10px;
    background: rgba(255, 253, 248, 0.78);
}

.time-tracking-tabs .btn {
    min-height: 34px;
    padding: 0.28rem 0.7rem;
    border-radius: 7px;
    font-weight: 900;
}

.time-tracking-period-card {
    border-color: #d7c6a5;
    background: rgba(255, 253, 248, 0.92);
    box-shadow: 0 10px 22px rgba(59, 47, 30, 0.08);
}

.time-tracking-period-header {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    min-height: 44px;
    padding: 0.35rem 0.45rem;
    border-bottom: 1px solid #e4d5b9;
    background: linear-gradient(90deg, rgba(217, 119, 31, 0.08), transparent 55%);
}

.time-tracking-period-header > div {
    text-align: center;
}

.time-tracking-period-header h4 {
    margin: 0;
    color: #25211b;
    font-size: 1rem;
}

.time-tracking-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.time-tracking-total-card {
    display: grid;
    gap: 0.15rem;
    padding: 0.65rem;
    border: 1px solid #d8c7a6;
    border-radius: 8px;
    background: #fffefa;
    box-shadow: inset 4px 0 0 var(--pm-brand-orange, #d9771f);
}

.time-tracking-total-card span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.time-tracking-total-card strong {
    color: #111827;
    font-size: 1rem;
}

.time-tracking-manual-card {
    margin-bottom: 1rem;
    padding: 0.72rem;
    border: 1px solid #d8c7a6;
    border-radius: 8px;
    background: #fffefa;
}

.time-tracking-manual-card h5 {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    line-height: 1.1;
}

.time-tracking-manual-card h5.job-section-title {
    margin-bottom: 0.55rem;
    padding-bottom: 0.38rem;
    border-bottom: 1px solid #eadcc3;
}

.time-tracking-manual-grid {
    display: grid;
    grid-template-columns: minmax(110px, 0.9fr) minmax(135px, 1fr) minmax(120px, 0.8fr) minmax(110px, 0.68fr) minmax(110px, 0.68fr) minmax(170px, 1.25fr) minmax(92px, 0.45fr);
    gap: 0.42rem;
    align-items: end;
    justify-content: stretch;
}

.time-tracking-manual-grid label {
    display: grid;
    gap: 0.16rem;
    margin: 0;
    font-weight: 850;
    min-width: 0;
}

.time-tracking-manual-grid .form-control,
.time-tracking-manual-grid .form-select {
    min-height: 34px;
    height: 34px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.time-tracking-manual-grid .btn {
    width: 100%;
    min-width: 86px;
    min-height: 34px;
    height: 34px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.time-week-summary-list {
    display: grid;
    gap: 0.55rem;
}

.time-week-summary-card {
    overflow: hidden;
    border: 1px solid #d8c7a6;
    border-radius: 8px;
    background: #fffefa;
}

.time-week-summary-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 42px;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    font-weight: 900;
}

.time-week-summary-card summary strong {
    color: #14532d;
    white-space: nowrap;
}

.time-week-summary-card[open] summary {
    border-bottom: 1px solid #dbe3ec;
    background: #f8fafc;
}

.time-company-user-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.time-tracking-table td,
.time-tracking-table th {
    vertical-align: middle;
}

.time-tracking-table {
    margin-bottom: 0;
    border: 1px solid #dfcfb2;
    border-radius: 8px;
    overflow: hidden;
}

.time-tracking-table thead th {
    border-bottom-color: #d7c49f;
    background: #f5efe3;
    color: #4a3c2a;
    font-size: 0.76rem;
    font-weight: 950;
    text-transform: uppercase;
}

.time-tracking-table tbody tr:hover td {
    background: rgba(31, 122, 61, 0.05);
}

.time-tracking-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.time-tracking-edit-row td {
    background: #fff8ed;
}

.inspection-detail-notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
}

.inspection-detail-note-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border: 1px solid #d7c49c;
    border-radius: 999px;
    background: #f5efe3;
    color: #9a4f05;
    font-size: 1rem;
    font-weight: 950;
    line-height: 1;
}

.inspection-detail-note-add-button:hover,
.inspection-detail-note-add-button:focus {
    border-color: #15803d;
    background: #dcfce7;
    color: #14532d;
}

.time-tracking-time-date-control {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 0.28rem;
    align-items: center;
}

.time-tracking-calendar-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    border: 1px solid #d7c6a5;
    border-radius: 8px;
    background: #fffefa;
    color: #1f7a3d;
    cursor: pointer;
    padding: 0;
}

.time-tracking-calendar-button:hover {
    border-color: #d9771f;
    background: #fff4e8;
    color: #9a4f05;
}

.time-tracking-calendar-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.time-tracking-calendar-button[aria-expanded="true"] {
    border-color: #1f7a3d;
    background: #eaf7ed;
    box-shadow: 0 0 0 2px rgba(31, 122, 61, 0.12);
}

.time-tracking-date-picker {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: max-content minmax(135px, 1fr);
    gap: 0.4rem;
    align-items: center;
    padding: 0.35rem;
    border: 1px solid #d8c7a6;
    border-radius: 8px;
    background: #fffefa;
}

.time-tracking-date-picker span {
    color: #6b5436;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.time-tracking-date-picker .form-control {
    min-height: 32px;
    height: 32px;
    padding: 0.2rem 0.38rem;
}

.time-edited-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 0.35rem;
    border: 1px solid #e6b26c;
    border-radius: 999px;
    background: #fff4df;
    color: #8a4b0f;
    font-size: 0.72rem;
    font-weight: 950;
    vertical-align: middle;
}

.inventory-count-name-input {
    width: min(320px, 100%);
}

.inventory-count-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.inventory-count-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.inventory-count-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 28px;
    padding: 0.16rem 0.55rem;
    border: 1px solid #dbe3ec;
    border-radius: 999px;
    background: #ffffff;
    color: #4b5563;
    font-size: 0.82rem;
    font-weight: 800;
}

.inventory-count-stats strong {
    color: #14532d;
    font-size: 0.95rem;
}

.inventory-count-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 1rem;
    align-items: start;
}

.inventory-count-panel {
    min-width: 0;
}

.inventory-manual-add {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #fbfcfe;
}

.inventory-manual-add h5 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.inventory-manual-grid {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1.2fr) 90px max-content;
    gap: 0.5rem;
    align-items: center;
}

.inventory-qty-input {
    width: 78px;
    min-width: 78px;
    padding: 0.28rem 0.35rem;
    text-align: center;
}

.inventory-qty-control {
    display: grid;
    grid-template-columns: minmax(36px, max-content) 78px repeat(3, minmax(36px, max-content));
    gap: 0.25rem;
    align-items: center;
    position: relative;
}

.inventory-qty-control button {
    min-height: 31px;
    padding: 0.18rem 0.38rem;
    border: 1px solid #c9d7ee;
    border-radius: 7px;
    background: #ffffff;
    color: #0d6efd;
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
}

.inventory-parts-table th:nth-child(4),
.inventory-parts-table td:nth-child(4) {
    width: 150px;
    min-width: 150px;
    overflow: visible;
}

.inventory-parts-table th:nth-child(5),
.inventory-parts-table td:nth-child(5) {
    width: 275px;
    min-width: 275px;
    overflow: visible;
}

.inventory-parts-table tr.inventory-counted-row > td {
    background: #ecfdf3;
}

.inventory-parts-table tr.inventory-counted-row:hover > td {
    background: #dcfce7;
}

.inventory-parts-table tr.inventory-counted-row .inventory-counted-chip {
    border-color: #86efac;
    background: #f0fdf4;
    color: #14532d;
}

.inventory-counted-chip {
    display: inline-grid;
    grid-template-columns: repeat(4, max-content);
    gap: 0.25rem;
    align-items: center;
    padding: 0.18rem 0.45rem;
    border: 1px solid #dbe3ec;
    border-radius: 999px;
    background: #ffffff;
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 800;
}

.inventory-counted-chip strong {
    color: #14532d;
}

.inventory-qty-picker {
    display: none;
}

.inventory-mobile-count-list {
    display: none;
}

.inventory-mobile-keypad-card {
    width: min(420px, 100%);
}

.inventory-mobile-keypad-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.inventory-mobile-keypad-header > div {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.inventory-mobile-keypad-header strong {
    overflow: hidden;
    color: #111827;
    font-size: 1.05rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-mobile-keypad-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    margin: 0.85rem;
    border: 1px solid #d2dbe7;
    border-radius: 14px;
    background: #f8fafc;
    color: #111827;
    font-size: 1.65rem;
    font-weight: 950;
}

.inventory-mobile-keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0 0.85rem 0.85rem;
}

.inventory-mobile-keypad-grid button {
    min-height: 64px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
    font-size: 1.35rem;
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.inventory-mobile-keypad-grid button:nth-child(10) {
    grid-column: 2;
}

.inventory-mobile-keypad-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0 0.85rem 0.85rem;
}

.inventory-mobile-keypad-actions .btn {
    min-height: 46px;
    font-weight: 900;
}

.inventory-entry-card,
.inventory-history-card {
    margin-bottom: 0.55rem;
    border: 1px solid #d0d7de;
    border-radius: 9px;
    background: #ffffff;
    overflow: hidden;
}

.inventory-history-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem;
    background: #f8fafc;
}

.inventory-entry-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content max-content;
    gap: 0.5rem;
    align-items: center;
    padding: 0.38rem 0.45rem;
    background: #f8fafc;
}

.inventory-entry-main,
.inventory-history-main {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

.inventory-history-main {
    width: 100%;
    cursor: pointer;
}

.inventory-history-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.inventory-history-name-input {
    max-width: 280px;
}

.inventory-entry-part {
    color: #0d6efd;
    font-weight: 900;
}

.inventory-entry-description {
    color: #4b5563;
    font-size: 0.82rem;
}

.inventory-entry-part,
.inventory-entry-description {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-entry-count,
.inventory-entry-total,
.inventory-report-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0.15rem 0.55rem;
    border: 1px solid #dbe3ec;
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 850;
    white-space: nowrap;
}

.inventory-entry-total {
    min-width: 58px;
    color: #14532d;
    background: #effaf1;
}

.inventory-enter-button {
    min-height: 32px;
    padding: 0.2rem 0.55rem;
    border: 1px solid #c9d7ee;
    border-radius: 8px;
    background: #ffffff;
    color: #0d6efd;
    font-weight: 850;
}

.inventory-entry-details,
.inventory-history-details {
    display: grid;
    gap: 0.35rem;
    padding: 0.55rem;
    border-top: 1px solid #e5e7eb;
}

.inventory-entry-detail-row,
.inventory-history-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content max-content;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0.45rem;
    border: 1px solid #eef2f6;
    border-radius: 7px;
    background: #ffffff;
}

.inventory-entry-back-button,
.inventory-entry-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 30px;
    padding: 0.15rem 0.35rem;
    border: 1px solid #f0b7b2;
    border-radius: 7px;
    background: #fff5f4;
    color: #9f1d17;
    font-size: 0.72rem;
    font-weight: 900;
}

.inventory-entry-back-button {
    border-color: #c9d7ee;
    background: #ffffff;
    color: #0d6efd;
}

.inventory-history-main {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
}

.inventory-history-row {
    grid-template-columns: minmax(100px, 0.5fr) minmax(0, 1fr) max-content;
}

.inventory-report-pill.active {
    border-color: #0d6efd;
    color: #0d6efd;
}

@media (max-width: 900px) {
    .settings-nav-builder {
        grid-template-columns: 1fr;
    }

    .inventory-count-layout {
        grid-template-columns: 1fr;
    }

    .inventory-manual-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .time-tracking-page-title {
        margin-bottom: 0.6rem;
        padding: 0.4rem 0.52rem;
    }

    .time-tracking-period-card {
        padding: 0.65rem !important;
    }

    .time-tracking-tabs {
        flex-wrap: nowrap;
        gap: 0.25rem;
        width: 100%;
        margin-bottom: 0.65rem;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .time-tracking-tabs .btn {
        flex: 0 0 auto;
        min-height: 32px;
        padding: 0.22rem 0.58rem;
        font-size: 0.76rem;
    }

    .time-tracking-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
        margin-bottom: 0.65rem;
    }

    .time-tracking-total-card {
        min-width: 0;
        padding: 0.48rem 0.55rem;
    }

    .time-tracking-manual-card {
        overflow: hidden;
        padding: 0.65rem !important;
    }

    .time-tracking-manual-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .time-tracking-manual-grid label {
        width: 100%;
        min-width: 0;
    }

    .time-tracking-manual-grid .form-control,
    .time-tracking-manual-grid .form-select,
    .time-tracking-manual-grid .btn {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .time-tracking-clock-card {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
        gap: 0.45rem;
        align-items: center;
        padding: 0.55rem 0.65rem !important;
    }

    .time-tracking-clock-card h4 {
        font-size: 0.9rem;
    }

    .time-tracking-clock-card .text-muted {
        display: block;
        overflow: hidden;
        font-size: 0.72rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .time-tracking-active-clock {
        display: grid;
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 0.3rem 0.38rem;
        align-items: center;
        justify-content: stretch;
    }

    .time-tracking-active-start {
        overflow: hidden;
        font-size: 0.72rem;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .time-tracking-active-counter {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 26px;
        padding: 0.12rem 0.45rem;
        border: 1px solid #d9771f;
        border-radius: 999px;
        background: #fff4e8;
        color: #a94f12;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .time-tracking-edit-button,
    .time-tracking-clockout-button {
        width: auto !important;
        min-height: 28px;
        padding: 0.14rem 0.48rem;
        font-size: 0.72rem;
    }

    .time-tracking-clockout-button {
        box-shadow: 0 0 0 2px rgba(217, 119, 31, 0.14);
    }

    .time-tracking-period-header {
        grid-template-columns: max-content minmax(0, 1fr) max-content;
        gap: 0.45rem;
        align-items: center;
        margin-bottom: 0.65rem;
        min-height: 40px;
        padding: 0.28rem 0.32rem;
    }

    .time-tracking-period-header .btn {
        width: auto;
        min-height: 32px;
        padding: 0.22rem 0.55rem;
        font-size: 0.76rem;
    }

    .time-tracking-period-header h4 {
        margin: 0;
        font-size: 0.95rem;
        line-height: 1.05;
    }

    .time-tracking-period-header span {
        display: block;
        overflow: hidden;
        font-size: 0.8rem;
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .time-clock-dashboard-card {
        grid-template-columns: minmax(0, 1fr) max-content max-content;
        grid-template-areas: "info link action";
        gap: 0.45rem;
        align-items: center;
        padding: 0.65rem 0.7rem !important;
    }

    .time-tracking-manual-grid .btn {
        width: 100%;
    }

    .time-clock-dashboard-card .btn {
        width: auto;
    }

    .time-clock-dashboard-link {
        justify-self: end;
        min-height: 32px;
        height: 32px;
        padding: 0.25rem 0.48rem;
        font-size: 0.74rem;
        white-space: nowrap;
    }

    .time-clock-dashboard-info {
        gap: 0;
        min-width: 0;
    }

    .time-clock-dashboard-info strong,
    .time-clock-dashboard-info span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .time-clock-dashboard-info strong {
        font-size: 0.98rem;
    }

    .time-clock-dashboard-info span {
        font-size: 0.82rem;
    }

    .time-clock-dashboard-button,
    .time-clock-dashboard-active {
        justify-self: end;
    }

    .time-clock-dashboard-active {
        justify-content: flex-end;
    }

    .time-clock-dashboard-active {
        gap: 0.35rem;
    }

    .time-clock-dashboard-active strong {
        font-size: 0.82rem;
    }

    .time-clock-dashboard-active .btn {
        box-sizing: border-box;
        height: 32px;
        min-height: 32px;
        padding: 0.25rem 0.48rem;
        font-size: 0.74rem;
    }

    .inventory-entry-summary {
        grid-template-columns: minmax(0, 1fr) max-content max-content;
    }

    .inventory-enter-button {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .inventory-manual-grid,
    .inventory-history-main,
    .inventory-history-row {
        grid-template-columns: 1fr;
    }

}

button.job-action-card {
    cursor: pointer;
}

.job-action-card.selected {
    border-color: #87c99b;
    background: #eefaf1;
}

.job-action-card.selected::after {
    content: "Done";
    color: #146c2e;
    font-size: 0.78rem;
    font-weight: 800;
}

.job-action-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 0.2rem 0.4rem;
    border-radius: 999px;
    background: #eef6ff;
    color: #084298;
    font-size: 0.76rem;
    font-weight: 800;
}

.job-status-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.4rem;
    padding: 0.08rem 0.34rem;
    border: 0;
    border-radius: 999px;
    background: #eef1f4;
    color: #374151;
    font-size: 0.72rem;
    font-weight: 800;
}

.job-option-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: 520px;
}

.job-option-bubble {
    min-height: 32px;
    padding: 0.28rem 0.65rem;
    border: 1px solid #c9d7ee;
    border-radius: 999px;
    background: #ffffff;
    color: #0d6efd;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.job-option-bubble:hover,
.job-option-bubble.selected {
    border-color: #0d6efd;
    background: #e7f1ff;
    color: #084298;
}

.work-order-action-section {
    max-width: none;
    padding: 0.55rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fbfcfd;
}

.work-order-section-heading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 38px;
    margin: -0.15rem -0.15rem 0.8rem;
    padding: 0.38rem 0.7rem;
    overflow: hidden;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    box-shadow: inset 4px 0 0 #d9771f;
}

.work-order-collapsible-section {
    overflow: hidden;
}

.work-order-collapsible-section > .work-order-section-heading {
    margin-bottom: 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.work-order-collapsible-section > .work-order-section-heading::-webkit-details-marker {
    display: none;
}

.work-order-collapsible-section[open] > .work-order-section-heading {
    margin-bottom: 0.8rem;
}

.work-order-section-chevron {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-left: auto;
    margin-right: 0.2rem;
    border-right: 2px solid #1f7a3d;
    border-bottom: 2px solid #1f7a3d;
    transform: rotate(45deg);
    transition: transform 0.16s ease;
}

.work-order-collapsible-section[open] > .work-order-section-heading .work-order-section-chevron {
    transform: rotate(225deg);
}

.work-order-section-body {
    min-width: 0;
}

.work-order-section-heading svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #1f7a3d;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.work-order-section-heading h4 {
    min-width: 0;
    margin: 0;
    color: #242628;
    font-size: 1.02rem;
    font-weight: 950;
    letter-spacing: 0.01em;
}

.work-order-action-item-row .job-action-card {
    width: 100%;
    min-width: 0;
}

.work-order-action-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.work-order-action-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.work-order-action-header span {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #eef1f4;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 800;
}

.action-add-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #b7c4d4;
    border-radius: 999px;
    background: #f8fafc;
    color: #374151;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.action-add-bubble:hover {
    border-color: #6b7280;
    background: #eef1f4;
    color: #111827;
}

.work-order-action-add-panel {
    max-width: 520px;
    padding: 0.5rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
}

.work-order-action-add-panel .form-control {
    max-width: none;
}

.work-order-tech-picker-button {
    justify-content: space-between;
    gap: 0.45rem;
    width: 100%;
    min-height: 34px;
    padding: 0.3rem 0.55rem;
    border: 0;
    border-radius: 0;
    background: #f8fbff;
    color: #0f4c81;
    font-weight: 850;
    text-align: left;
}

.work-order-tech-picker-button:hover {
    border-color: #0d6efd;
    background: #eef6ff;
}

.work-order-technician-picker {
    max-width: 680px;
}

.work-order-action-preview {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.work-order-action-preview .table-one-line {
    min-width: 0;
}

.job-calendar-section {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.job-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.job-calendar-header h5 {
    margin: 0;
}

.job-calendar-header span {
    color: #666;
    font-size: 0.86rem;
    font-weight: 700;
}

.job-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 0.5rem;
}

.job-calendar-day {
    min-height: 126px;
    padding: 0.55rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
}

.job-calendar-day.today {
    border-color: #8bb7f0;
    background: #f8fbff;
}

.job-calendar-date {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #eef1f4;
}

.job-calendar-date span {
    color: #555;
    font-size: 0.78rem;
    font-weight: 800;
}

.job-calendar-items {
    display: grid;
    gap: 0.35rem;
}

.job-calendar-item {
    display: grid;
    gap: 0.1rem;
    width: 100%;
    padding: 0.35rem 0.4rem;
    border: 1px solid #c9d7ee;
    border-radius: 6px;
    background: #eef6ff;
    color: #1f2937;
    text-align: left;
    cursor: pointer;
}

.job-calendar-item strong,
.job-calendar-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-calendar-item span {
    color: #0d6efd;
    font-size: 0.76rem;
    font-weight: 800;
}

.work-order-calendar-item {
    background: #f6f1ff;
    border-color: #d7c8ff;
    box-shadow: inset 3px 0 0 #7c3aed;
}

.job-calendar-empty {
    color: #777;
    font-size: 0.78rem;
}

.work-orders-table {
    min-width: 980px;
}

.work-orders-table th,
.work-orders-table td {
    white-space: normal;
}

.work-orders-table th:nth-child(4),
.work-orders-table td:nth-child(4) {
    width: 190px;
}

.work-orders-table th:nth-child(3),
.work-orders-table td:nth-child(3) {
    width: 175px;
}

.work-orders-table th:nth-child(6),
.work-orders-table td:nth-child(6),
.work-orders-table th:nth-child(8),
.work-orders-table td:nth-child(8) {
    width: 120px;
}

.work-orders-table th:nth-child(9),
.work-orders-table td:nth-child(9) {
    width: 155px;
}

@media (max-width: 720px) {
    .service-mode-shell {
        gap: 0.7rem;
    }

    .service-mode-create-card {
        min-height: 60px;
    }

    .service-mode-section {
        padding: 0.65rem;
    }

    .service-bar-main {
        grid-template-columns: minmax(0, 1fr) 36px;
        min-height: 38px;
        padding: 0.28rem 0.38rem 0.28rem 0.52rem;
    }

    .service-bar-summary {
        min-height: 32px;
        gap: 0.45rem;
    }

    .service-bar.active-time .service-bar-main {
        min-height: 42px;
    }

    .service-active-summary {
        grid-template-columns: minmax(0, 1fr) max-content;
        grid-template-areas:
            "customer count"
            "timer timer";
        gap: 0.32rem;
        min-height: 40px;
        padding: 0.25rem 0.38rem 0.25rem 0.52rem;
    }

    .service-active-customer {
        grid-area: customer;
    }

    .service-running-strip {
        grid-area: timer;
        justify-content: stretch;
        border-radius: 12px;
    }

    .service-active-count {
        grid-area: count;
    }

    .service-running-chip {
        grid-template-columns: 22px minmax(72px, 1fr) minmax(68px, 0.9fr);
        width: 100%;
        max-width: none;
        padding: 0.14rem 0.18rem 0.14rem 0.22rem;
    }

    .service-running-icon {
        width: 20px;
        height: 20px;
    }

    .service-running-text strong {
        font-size: 0.92rem;
    }

    .service-running-end {
        min-height: 26px;
        padding: 0.12rem 0.48rem;
        font-size: 0.74rem;
    }

    .service-active-label {
        font-size: 0.78rem;
    }

    .service-time-icon {
        width: 32px;
        height: 32px;
    }

    .service-expand-grid,
    .service-option-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-expand-grid button,
    .service-option-card {
        min-height: 74px;
    }

    .service-large-option {
        min-height: 84px;
    }

    .service-qty-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .service-qty-input {
        grid-column: 1 / -1;
    }

    .work-order-top-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {

    .work-order-top-info-grid {
        grid-template-columns: 1fr;
        gap: 0.42rem;
    }

    .work-order-top-info-grid .work-order-detail-tile {
        min-height: 48px;
    }

    .work-order-top-actions {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .work-order-detail-action {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 0.42rem;
        border-radius: 10px;
    }

    .work-order-detail-action span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .work-order-detail-action-icon {
        width: 1.25rem;
        height: 1.25rem;
    }

    html[data-view-mode="auto"] .job-desktop-edit-trigger {
        display: none;
    }

    html[data-view-mode="auto"] .job-mobile-expand-trigger {
        display: inline-block;
    }

    .mobile-entity-list {
        display: grid;
        gap: 0.42rem;
    }

    .feature-chat-shell {
        grid-template-columns: 1fr;
    }

    .feature-chat-list {
        max-height: none;
    }

    .desktop-entity-table {
        display: none;
    }

    .add-record-panel {
        max-width: none;
    }

    .entity-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .entity-actions .btn {
        width: 100%;
    }

    .nav {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.25rem;
        padding: 0.4rem;
        border-radius: 18px;
    }

    .nav-link {
        flex-direction: column;
        gap: 0.25rem;
        min-height: 58px;
        padding: 0.35rem 0.25rem;
        border-radius: 14px;
        font-size: 0.68rem;
    }

    .nav-mode-mobile-bar {
        display: flex;
        min-height: 40px;
        margin: -0.55rem 0 1rem;
        padding: 0.32rem 0.65rem;
        width: 100%;
    }

    .nav-mode-switch-desktop {
        display: none;
    }

    .nav-icon {
        width: 24px;
        height: 24px;
    }

    .nav-label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-more {
        margin-left: 0;
    }

    .nav-utility-cluster {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.2rem;
        min-width: 0;
    }

    .nav-utility-link {
        width: auto;
        min-width: 0;
        min-height: 58px;
        padding: 0.35rem 0.12rem;
    }

    .nav-more-menu {
        right: 0;
        left: auto;
        min-width: min(260px, 88vw);
    }

    @media (max-width: 520px) {
        .nav-link {
            min-height: 52px;
        }

        .nav-label {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            border: 0;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
        }
    }

    .parts-entry-table,
    .parts-entry-table thead,
    .parts-entry-table tbody,
    .parts-entry-table tr,
    .parts-entry-table th,
    .parts-entry-table td,
    .parts-used-table,
    .parts-used-table thead,
    .parts-used-table tbody,
    .parts-used-table tr,
    .parts-used-table th,
    .parts-used-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .parts-entry-table,
    .parts-used-table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .parts-entry-table thead,
    .parts-used-table thead {
        display: none;
    }

    .parts-entry-table tr,
    .parts-used-table tr {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border: 1px solid #d0d7de;
        border-radius: 8px;
        background: #ffffff;
    }

    .parts-entry-table td,
    .parts-used-table td {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 0.65rem;
        align-items: center;
        padding: 0.45rem 0;
        border-bottom: 1px solid #eef1f4;
        white-space: normal;
    }

    .parts-entry-table td::before,
    .parts-used-table td::before {
        content: attr(data-label);
        color: #555;
        font-size: 0.85rem;
        font-weight: 700;
    }

    .parts-entry-table td:last-child,
    .parts-used-table td:last-child {
        border-bottom: 0;
    }

    .parts-entry-table .form-control,
    .parts-used-table .form-control {
        max-width: none;
        margin-bottom: 0;
    }

    .parts-entry-actions {
        grid-template-columns: 1fr;
    }

    .parts-entry-actions::before {
        display: none;
    }

    .parts-entry-actions .btn {
        width: 100%;
        min-height: 42px;
    }

    .part-picker-option {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .section-header .btn {
        width: 100%;
    }

    .section-title-actions .icon-filter-button {
        width: auto;
    }

    .app-brand img {
        width: min(240px, 100%);
        max-height: 48px;
    }

    .job-queue-table,
    .job-queue-table thead,
    .job-queue-table tbody,
    .job-queue-table tr,
    .job-queue-table th,
    .job-queue-table td,
    .dashboard-work-orders-table,
    .dashboard-work-orders-table thead,
    .dashboard-work-orders-table tbody,
    .dashboard-work-orders-table tr,
    .dashboard-work-orders-table th,
    .dashboard-work-orders-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .job-queue-table thead,
    .dashboard-work-orders-table thead {
        display: none;
    }

    .job-queue-table tr,
    .dashboard-work-orders-table tr {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border: 1px solid #d0d7de;
        border-radius: 8px;
        background: #ffffff;
    }

    .job-queue-table td,
    .dashboard-work-orders-table td {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
        gap: 0.65rem;
        align-items: center;
        padding: 0.45rem 0;
        border-bottom: 1px solid #eef1f4;
        white-space: normal;
    }

    .job-queue-table td::before,
    .dashboard-work-orders-table td::before {
        content: attr(data-label);
        color: #555;
        font-size: 0.85rem;
        font-weight: 700;
    }

    .job-queue-table td:last-child,
    .dashboard-work-orders-table td:last-child {
        border-bottom: 0;
    }

    .job-queue-table .btn,
    .dashboard-work-orders-table .btn {
        width: 100%;
    }

    .job-customer-picker {
        max-width: none;
    }

    .work-order-info-grid,
    .work-order-notes-grid {
        grid-template-columns: 1fr;
    }

    .work-order-note-summary {
        grid-template-columns: minmax(92px, 0.34fr) minmax(0, 1fr) 14px;
        gap: 0.35rem;
        min-height: 36px;
        padding-right: 0.45rem;
    }

    .work-order-note-summary .work-order-field-header {
        min-height: 36px;
        padding: 0.16rem 0.4rem;
        font-size: 0.68rem;
    }

    .work-order-note-preview {
        font-size: 0.76rem;
    }

    .work-order-note-editor {
        padding: 0.4rem;
    }

    .work-order-note-editor textarea.form-control {
        min-height: 74px;
    }

    .work-order-collapsible-section {
        padding: 0.6rem !important;
    }

    .work-order-collapsible-section > .work-order-section-heading {
        min-height: 34px;
        padding: 0.3rem 0.5rem;
    }

    .job-entry-grid {
        grid-template-columns: 1fr;
    }

    .job-entry-controls {
        grid-template-columns: 1fr;
    }

    .work-order-action-section,
    .work-order-action-add-panel {
        max-width: none;
    }

    .work-order-action-header {
        align-items: center;
    }

    .expandable-summary {
        grid-template-columns: minmax(0, 1fr) 74px;
        gap: 0.35rem;
        align-items: center;
        min-height: 46px;
        padding: 0.28rem 0.4rem;
    }

    .expandable-summary-main {
        grid-template-columns: minmax(96px, 1fr) minmax(74px, 0.75fr) max-content;
        grid-template-rows: auto auto;
        gap: 0.12rem 0.35rem;
        min-height: 0;
    }

    .expandable-start {
        align-self: center;
        width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        border-radius: 10px;
    }

    .expandable-row-actions {
        gap: 0.25rem;
    }

    .expandable-archive {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
    }

    .work-order-action-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        border: 0;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .work-order-action-icon {
        width: 20px;
        height: 20px;
    }

    .expandable-primary {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .expandable-summary-main .expandable-description {
        grid-column: 2 / 4;
        grid-row: 1;
    }

    .expandable-description {
        grid-column: 1 / -1;
    }

    .expandable-status {
        grid-column: 1;
        grid-row: 2;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .expandable-tech {
        grid-column: 2;
        grid-row: 2;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .job-status-count {
        grid-column: 3;
        grid-row: 2;
        margin-left: 0;
        width: fit-content;
    }

    .job-calendar-grid {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.35rem;
    }

    .job-calendar-day {
        flex: 0 0 170px;
    }

    .expandable-actions {
        flex-direction: column;
    }

    .expandable-actions .btn {
        width: 100%;
    }

    .work-order-summary {
        grid-template-columns: minmax(0, 1fr) minmax(58px, max-content) 108px;
        grid-template-areas:
            "main priority actions"
            "status tech actions";
        gap: 0.08rem 0.32rem;
        min-height: 44px;
        padding: 0.2rem 0.3rem;
    }

    .work-order-summary-main {
        grid-area: main;
        grid-template-columns: minmax(0, 1fr) max-content;
        grid-template-rows: auto auto;
        gap: 0.2rem;
        min-width: 0;
    }

    .work-order-summary-main .expandable-primary {
        grid-column: 1;
        grid-row: 1;
    }

    .work-order-summary-main .expandable-description {
        grid-column: 1;
        grid-row: 2;
    }

    .work-order-summary-main .work-order-progress {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: center;
    }

    .work-order-summary > .expandable-status {
        grid-area: status;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .work-order-summary > .expandable-tech {
        grid-area: tech;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        justify-self: start;
    }

    .work-order-summary > .priority-badge {
        grid-area: priority;
        align-self: center;
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    .work-order-summary-actions {
        grid-area: actions;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 0.18rem;
    }

    .work-order-summary-actions .btn {
        width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 0;
        line-height: 1.15;
    }

    .work-order-summary-running {
        grid-template-columns: minmax(0, 1fr) 108px;
        grid-template-areas: "main actions";
        gap: 0.28rem;
        min-height: 48px;
    }

    .work-order-summary-running .work-order-summary-main {
        grid-area: main;
        grid-template-columns: minmax(92px, 0.45fr) minmax(0, 1fr) max-content;
        grid-template-rows: auto;
        gap: 0.28rem;
        align-items: center;
    }

    .work-order-summary-running .expandable-primary {
        grid-column: 1;
        grid-row: 1;
    }

    .work-order-running-strip {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.22rem;
    }

    .work-order-running-tech {
        min-width: 0;
        max-width: 64px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .work-order-running-chip {
        grid-template-columns: 24px minmax(0, 1fr) auto;
        min-height: 30px;
        padding: 0.14rem 0.22rem;
    }

    .work-order-running-icon {
        width: 22px;
        height: 22px;
    }

    .work-order-running-text strong {
        font-size: 0.74rem;
    }

    .work-order-running-text small {
        font-size: 0.68rem;
    }

    .work-order-running-end {
        min-height: 25px;
        padding: 0.08rem 0.36rem;
        font-size: 0.72rem;
    }

    .work-order-running-end-all {
        width: 100%;
        min-height: 28px;
        font-size: 0.72rem;
    }

    .work-order-details-panel {
        padding: 0.55rem;
    }

    .work-order-detail-grid,
    .work-order-edit-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .accounting-queue-table,
    .accounting-queue-table thead,
    .accounting-queue-table tbody,
    .accounting-queue-table tr,
    .accounting-queue-table th,
    .accounting-queue-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .accounting-queue-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .accounting-queue-table thead {
        display: none;
    }

    .accounting-queue-table tr {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border: 1px solid #d0d7de;
        border-radius: 8px;
        background: #ffffff;
    }

    .accounting-queue-table td {
        display: grid;
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 0.65rem;
        align-items: center;
        padding: 0.45rem 0;
        border-bottom: 1px solid #eef1f4;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .accounting-queue-table td::before {
        content: attr(data-label);
        color: #555;
        font-size: 0.85rem;
        font-weight: 700;
    }

    .accounting-queue-table td:last-child {
        border-bottom: 0;
    }

    .accounting-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .accounting-actions .btn {
        width: 100%;
    }

    .work-orders-table,
    .work-orders-table thead,
    .work-orders-table tbody,
    .work-orders-table tr,
    .work-orders-table th,
    .work-orders-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .work-orders-table thead {
        display: none;
    }

    .work-orders-table tr {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border: 1px solid #d0d7de;
        border-radius: 8px;
        background: #ffffff;
    }

    .work-orders-table td {
        display: grid;
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 0.65rem;
        align-items: center;
        padding: 0.45rem 0;
        border-bottom: 1px solid #eef1f4;
        white-space: normal;
    }

    .work-orders-table td::before {
        content: attr(data-label);
        color: #555;
        font-size: 0.85rem;
        font-weight: 700;
    }

    .work-orders-table td:last-child {
        border-bottom: 0;
    }

    .work-orders-table .btn {
        width: 100%;
    }

    .work-orders-table .editable-field {
        width: 100%;
    }

    .work-orders-table .table-one-line {
        white-space: nowrap;
    }
}

html[data-view-mode="mobile"] .content {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
}

html[data-view-mode="mobile"] .top-row {
    align-items: stretch;
    flex-direction: column;
    padding: 0.75rem 0.85rem !important;
}

html[data-view-mode="mobile"] .top-row-actions {
    align-items: stretch;
    flex-direction: column;
}

html[data-view-mode="mobile"] .top-row-actions .btn,
html[data-view-mode="mobile"] .top-row-actions form,
html[data-view-mode="mobile"] .top-row-actions form .btn,
html[data-view-mode="mobile"] .view-mode-control,
html[data-view-mode="mobile"] .view-mode-control .form-select {
    width: 100%;
}

html[data-view-mode="mobile"] .bottom-preference-actions .view-mode-control,
html[data-view-mode="mobile"] .bottom-preference-actions .view-mode-control .form-select {
    width: auto;
}

html[data-view-mode="mobile"] .bottom-preference-actions {
    gap: 0.45rem;
    padding: 0.4rem 0.5rem;
}

html[data-view-mode="mobile"] .mobile-entity-list {
    display: grid;
    gap: 0.42rem;
}

html[data-view-mode="mobile"] .feature-chat-shell {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .feature-chat-list {
    max-height: none;
}

html[data-view-mode="mobile"] .desktop-entity-table {
    display: none;
}

html[data-view-mode="mobile"] .add-record-panel {
    max-width: none;
}

html[data-view-mode="mobile"] .entity-actions {
    align-items: stretch;
    flex-direction: column;
}

html[data-view-mode="mobile"] .entity-actions .btn {
    width: 100%;
}

html[data-view-mode="mobile"] .app-brand img {
    width: min(240px, 100%);
    max-height: 48px;
}

html[data-view-mode="mobile"] .nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.4rem;
    border-radius: 18px;
}

html[data-view-mode="mobile"] .nav-brand-lockup {
    display: none;
}

html[data-view-mode="mobile"] .nav-link {
    flex-direction: column;
    gap: 0.25rem;
    min-height: 52px;
    padding: 0.35rem 0.25rem;
    border-radius: 14px;
    font-size: 0.68rem;
}

html[data-view-mode="mobile"] .nav-mode-mobile-bar {
    display: flex;
    min-height: 40px;
    margin: -0.55rem 0 1rem;
    padding: 0.32rem 0.65rem;
    width: 100%;
}

html[data-view-mode="mobile"] .nav-mode-switch-desktop {
    display: none;
}

html[data-view-mode="mobile"] .nav-icon {
    width: 24px;
    height: 24px;
}

html[data-view-mode="mobile"] .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

html[data-view-mode="mobile"] .nav-more {
    margin-left: 0;
}

html[data-view-mode="mobile"] .nav-utility-cluster {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem;
    min-width: 0;
}

html[data-view-mode="mobile"] .nav-utility-link {
    width: auto;
    min-width: 0;
    min-height: 52px;
    padding: 0.35rem 0.12rem;
}

html[data-view-mode="mobile"] .nav-more-menu {
    right: 0;
    left: auto;
    min-width: min(260px, 88vw);
}

html[data-view-mode="mobile"] .dashboard-grid {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .dashboard-admin-actions,
html[data-view-mode="mobile"] .dashboard-admin-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-view-mode="mobile"] .dashboard-icon-link,
html[data-view-mode="mobile"] .dashboard-small-link {
    width: 100%;
}

html[data-view-mode="mobile"] .section-header {
    align-items: stretch;
    flex-direction: column;
}

html[data-view-mode="mobile"] .section-header .btn {
    width: 100%;
}

html[data-view-mode="mobile"] .section-title-actions .icon-filter-button {
    width: auto;
}

html[data-view-mode="mobile"] .app-modal-overlay {
    padding: 0.75rem;
}

html[data-view-mode="mobile"] .app-modal-card {
    max-height: calc(100vh - 1.5rem);
}

html[data-view-mode="mobile"] .app-modal-footer {
    flex-direction: column;
}

html[data-view-mode="mobile"] .app-modal-footer .btn {
    width: 100%;
}

html[data-view-mode="mobile"] .job-queue-table,
html[data-view-mode="mobile"] .job-queue-table thead,
html[data-view-mode="mobile"] .job-queue-table tbody,
html[data-view-mode="mobile"] .job-queue-table tr,
html[data-view-mode="mobile"] .job-queue-table th,
html[data-view-mode="mobile"] .job-queue-table td,
html[data-view-mode="mobile"] .dashboard-work-orders-table,
html[data-view-mode="mobile"] .dashboard-work-orders-table thead,
html[data-view-mode="mobile"] .dashboard-work-orders-table tbody,
html[data-view-mode="mobile"] .dashboard-work-orders-table tr,
html[data-view-mode="mobile"] .dashboard-work-orders-table th,
html[data-view-mode="mobile"] .dashboard-work-orders-table td,
html[data-view-mode="mobile"] .work-orders-table,
html[data-view-mode="mobile"] .work-orders-table thead,
html[data-view-mode="mobile"] .work-orders-table tbody,
html[data-view-mode="mobile"] .work-orders-table tr,
html[data-view-mode="mobile"] .work-orders-table th,
html[data-view-mode="mobile"] .work-orders-table td,
html[data-view-mode="mobile"] .accounting-queue-table,
html[data-view-mode="mobile"] .accounting-queue-table thead,
html[data-view-mode="mobile"] .accounting-queue-table tbody,
html[data-view-mode="mobile"] .accounting-queue-table tr,
html[data-view-mode="mobile"] .accounting-queue-table th,
html[data-view-mode="mobile"] .accounting-queue-table td,
html[data-view-mode="mobile"] .parts-entry-table,
html[data-view-mode="mobile"] .parts-entry-table thead,
html[data-view-mode="mobile"] .parts-entry-table tbody,
html[data-view-mode="mobile"] .parts-entry-table tr,
html[data-view-mode="mobile"] .parts-entry-table th,
html[data-view-mode="mobile"] .parts-entry-table td,
html[data-view-mode="mobile"] .inventory-parts-table table,
html[data-view-mode="mobile"] .inventory-parts-table thead,
html[data-view-mode="mobile"] .inventory-parts-table tbody,
html[data-view-mode="mobile"] .inventory-parts-table tr,
html[data-view-mode="mobile"] .inventory-parts-table th,
html[data-view-mode="mobile"] .inventory-parts-table td,
html[data-view-mode="mobile"] .parts-used-table,
html[data-view-mode="mobile"] .parts-used-table thead,
html[data-view-mode="mobile"] .parts-used-table tbody,
html[data-view-mode="mobile"] .parts-used-table tr,
html[data-view-mode="mobile"] .parts-used-table th,
html[data-view-mode="mobile"] .parts-used-table td {
    display: block;
    width: 100%;
    min-width: 0;
}

html[data-view-mode="mobile"] .job-queue-table,
html[data-view-mode="mobile"] .dashboard-work-orders-table,
html[data-view-mode="mobile"] .work-orders-table,
html[data-view-mode="mobile"] .accounting-queue-table,
html[data-view-mode="mobile"] .parts-entry-table,
html[data-view-mode="mobile"] .inventory-parts-table table,
html[data-view-mode="mobile"] .parts-used-table {
    border-collapse: separate;
    border-spacing: 0;
}

html[data-view-mode="mobile"] .job-queue-table thead,
html[data-view-mode="mobile"] .dashboard-work-orders-table thead,
html[data-view-mode="mobile"] .work-orders-table thead,
html[data-view-mode="mobile"] .accounting-queue-table thead,
html[data-view-mode="mobile"] .parts-entry-table thead,
html[data-view-mode="mobile"] .inventory-parts-table thead,
html[data-view-mode="mobile"] .parts-used-table thead {
    display: none;
}

html[data-view-mode="mobile"] .job-queue-table tr,
html[data-view-mode="mobile"] .dashboard-work-orders-table tr,
html[data-view-mode="mobile"] .work-orders-table tr,
html[data-view-mode="mobile"] .accounting-queue-table tr,
html[data-view-mode="mobile"] .parts-entry-table tr,
html[data-view-mode="mobile"] .inventory-parts-table tr,
html[data-view-mode="mobile"] .parts-used-table tr {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
}

html[data-view-mode="mobile"] .job-queue-table td,
html[data-view-mode="mobile"] .dashboard-work-orders-table td,
html[data-view-mode="mobile"] .work-orders-table td,
html[data-view-mode="mobile"] .accounting-queue-table td,
html[data-view-mode="mobile"] .parts-entry-table td,
html[data-view-mode="mobile"] .inventory-parts-table td,
html[data-view-mode="mobile"] .parts-used-table td {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid #eef1f4;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

html[data-view-mode="mobile"] .job-queue-table td::before,
html[data-view-mode="mobile"] .dashboard-work-orders-table td::before,
html[data-view-mode="mobile"] .work-orders-table td::before,
html[data-view-mode="mobile"] .accounting-queue-table td::before,
html[data-view-mode="mobile"] .parts-entry-table td::before,
html[data-view-mode="mobile"] .inventory-parts-table td::before,
html[data-view-mode="mobile"] .parts-used-table td::before {
    content: attr(data-label);
    color: #555;
    font-size: 0.85rem;
    font-weight: 700;
}

html[data-view-mode="mobile"] .job-queue-table td:last-child,
html[data-view-mode="mobile"] .dashboard-work-orders-table td:last-child,
html[data-view-mode="mobile"] .work-orders-table td:last-child,
html[data-view-mode="mobile"] .accounting-queue-table td:last-child,
html[data-view-mode="mobile"] .parts-entry-table td:last-child,
html[data-view-mode="mobile"] .inventory-parts-table td:last-child,
html[data-view-mode="mobile"] .parts-used-table td:last-child {
    border-bottom: 0;
}

html[data-view-mode="mobile"] .job-queue-table .btn,
html[data-view-mode="mobile"] .dashboard-work-orders-table .btn,
html[data-view-mode="mobile"] .work-orders-table .btn,
html[data-view-mode="mobile"] .accounting-queue-table .btn,
html[data-view-mode="mobile"] .parts-entry-table .btn,
html[data-view-mode="mobile"] .inventory-parts-table .btn,
html[data-view-mode="mobile"] .parts-used-table .btn,
html[data-view-mode="mobile"] .work-orders-table .editable-field,
html[data-view-mode="mobile"] .parts-entry-table .form-control,
html[data-view-mode="mobile"] .inventory-parts-table .form-control,
html[data-view-mode="mobile"] .parts-used-table .form-control {
    width: 100%;
    max-width: none;
}

html[data-view-mode="mobile"] .inventory-history-summary {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .inventory-history-actions {
    justify-content: stretch;
}

html[data-view-mode="mobile"] .inventory-history-actions .btn {
    flex: 1 1 0;
}

html[data-view-mode="mobile"] .accounting-actions,
html[data-view-mode="mobile"] .job-inline-actions {
    align-items: stretch;
    flex-direction: column;
}

html[data-view-mode="mobile"] .inventory-parts-table tr {
    padding: 0.6rem;
}

html[data-view-mode="mobile"] .inventory-parts-table {
    display: none;
}

html[data-view-mode="mobile"] .inventory-mobile-count-list {
    display: grid;
    gap: 0.48rem;
}

html[data-view-mode="mobile"] .inventory-mobile-count-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(82px, 0.52fr) minmax(82px, 0.44fr);
    gap: 0.42rem;
    align-items: center;
    min-height: 48px;
    padding: 0.42rem 0.5rem;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.05);
}

html[data-view-mode="mobile"] .inventory-mobile-count-card.counted {
    border-color: #86efac;
    background: #ecfdf3;
    box-shadow: inset 4px 0 0 #198754;
}

html[data-view-mode="mobile"] .inventory-mobile-count-part {
    min-width: 0;
}

html[data-view-mode="mobile"] .inventory-mobile-count-part strong {
    display: block;
    overflow: hidden;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .inventory-mobile-counted-box {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    gap: 0.04rem 0.22rem;
    min-width: 0;
    padding: 0.22rem 0.35rem;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.64rem;
    font-weight: 850;
    line-height: 1.05;
    text-transform: uppercase;
}

html[data-view-mode="mobile"] .inventory-mobile-counted-box strong {
    color: #14532d;
    font-size: 0.8rem;
    text-transform: none;
}

html[data-view-mode="mobile"] .inventory-mobile-count-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.2rem 0.45rem;
    border: 1px solid #1f7a3d;
    border-radius: 10px;
    background: #1f7a3d;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 950;
}

html[data-view-mode="mobile"] .inventory-mobile-keypad-overlay {
    align-items: center;
    padding: 0.75rem;
}

html[data-view-mode="mobile"] .inventory-mobile-keypad-card {
    width: min(390px, 100%);
    max-height: calc(100vh - 1.5rem);
}

@media (max-width: 760px) {
    html:not([data-view-mode="desktop"]) .inventory-parts-table {
        display: none;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-list {
        display: grid;
        gap: 0.48rem;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(82px, 0.52fr) minmax(82px, 0.44fr);
        gap: 0.42rem;
        align-items: center;
        min-height: 48px;
        padding: 0.42rem 0.5rem;
        border: 1px solid #d0d7de;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 6px 14px rgba(17, 24, 39, 0.05);
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-card.counted {
        border-color: #86efac;
        background: #ecfdf3;
        box-shadow: inset 4px 0 0 #198754;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-part {
        min-width: 0;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-part strong {
        display: block;
        overflow: hidden;
        color: #0f172a;
        font-size: 0.95rem;
        font-weight: 950;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-counted-box {
        display: grid;
        grid-template-columns: repeat(2, max-content);
        justify-content: center;
        gap: 0.04rem 0.22rem;
        min-width: 0;
        padding: 0.22rem 0.35rem;
        border: 1px solid #dbe3ec;
        border-radius: 10px;
        background: #f8fafc;
        color: #475569;
        font-size: 0.64rem;
        font-weight: 850;
        line-height: 1.05;
        text-transform: uppercase;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-counted-box strong {
        color: #14532d;
        font-size: 0.8rem;
        text-transform: none;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 0.2rem 0.45rem;
        border: 1px solid #1f7a3d;
        border-radius: 10px;
        background: #1f7a3d;
        color: #ffffff;
        font-size: 0.84rem;
        font-weight: 950;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-keypad-overlay {
        align-items: center;
        padding: 0.75rem;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-keypad-card {
        width: min(390px, 100%);
        max-height: calc(100vh - 1.5rem);
    }
}

html[data-view-mode="mobile"] .inventory-parts-table tr.inventory-counted-row {
    border-color: #86efac;
    background: #ecfdf3;
    box-shadow: inset 4px 0 0 #198754;
}

html[data-view-mode="mobile"] .inventory-parts-table td {
    padding: 0.32rem 0;
}

html[data-view-mode="mobile"] .inventory-parts-table td:nth-child(1),
html[data-view-mode="mobile"] .inventory-parts-table td:nth-child(2),
html[data-view-mode="mobile"] .inventory-parts-table td:nth-child(3),
html[data-view-mode="mobile"] .inventory-parts-table td:nth-child(4) {
    grid-template-columns: 82px minmax(0, 1fr);
}

html[data-view-mode="mobile"] .inventory-parts-table td:nth-child(5) {
    display: block;
    min-width: 0;
    width: 100%;
}

html[data-view-mode="mobile"] .inventory-parts-table td:nth-child(5)::before {
    display: block;
    margin-bottom: 0.35rem;
}

html[data-view-mode="mobile"] .inventory-qty-control {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
    width: 100%;
}

html[data-view-mode="mobile"] .inventory-qty-input {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
}

html[data-view-mode="mobile"] .inventory-qty-control button {
    min-height: 36px;
}

html[data-view-mode="mobile"] .inventory-qty-picker {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.35rem);
    left: 50%;
    display: block;
    width: min(220px, 92vw);
    max-height: 230px;
    overflow: hidden;
    border: 1px solid #c9d7ee;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
    transform: translateX(-50%);
}

html[data-view-mode="mobile"] .inventory-qty-picker-header {
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
}

html[data-view-mode="mobile"] .inventory-qty-picker-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-height: 184px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.35rem;
    gap: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

html[data-view-mode="mobile"] .inventory-qty-picker-list button {
    min-height: 38px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #fbfcfe;
    color: #1f2937;
    font-weight: 850;
}

html[data-view-mode="mobile"] .inventory-qty-picker-list button.selected {
    border-color: #1f7a3d;
    background: #effaf1;
    color: #14532d;
}

html[data-view-mode="mobile"] .job-action-type-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

html[data-view-mode="mobile"] .job-entry-grid {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .job-entry-controls {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .work-order-action-section,
html[data-view-mode="mobile"] .work-order-action-add-panel {
    max-width: none;
}

html[data-view-mode="mobile"] .work-order-action-header {
    align-items: center;
}

html[data-view-mode="mobile"] .work-order-top-info-grid {
    grid-template-columns: 1fr;
    gap: 0.42rem;
}

html[data-view-mode="mobile"] .work-order-top-info-grid .work-order-detail-tile {
    min-height: 48px;
}

html[data-view-mode="mobile"] .work-order-top-info-grid .work-order-detail-tile.customer.editing {
    grid-column: 1 / -1;
}

html[data-view-mode="mobile"] .work-order-top-actions {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.35rem;
}

html[data-view-mode="mobile"] .work-order-detail-action {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0.42rem;
    border-radius: 10px;
}

html[data-view-mode="mobile"] .work-order-detail-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

html[data-view-mode="mobile"] .work-order-detail-action-icon {
    width: 1.25rem;
    height: 1.25rem;
}

html[data-view-mode="mobile"] .inspection-builder-section {
    padding: 0.7rem;
}

html[data-view-mode="mobile"] .inspection-section-header {
    display: grid;
    gap: 0.15rem;
    justify-content: stretch;
}

html[data-view-mode="mobile"] .inspection-grower-card {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.55rem;
}

html[data-view-mode="mobile"] .inspection-grower-card > div {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
}

html[data-view-mode="mobile"] .inspection-panel-heading {
    align-items: center;
}

html[data-view-mode="mobile"] .inspection-equipment-grid,
html[data-view-mode="mobile"] .inspection-category-grid,
html[data-view-mode="mobile"] .inspection-planter-setup,
html[data-view-mode="mobile"] .inspection-number-grid {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .inspection-equipment-card,
html[data-view-mode="mobile"] .inspection-category-card {
    min-height: auto;
}

html[data-view-mode="mobile"] .inspection-equipment-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
}

html[data-view-mode="mobile"] .inspection-equipment-actions {
    justify-content: flex-end;
}

html[data-view-mode="mobile"] .inspection-category-stack {
    gap: 0;
}

html[data-view-mode="mobile"] .inspection-category-card {
    min-height: 46px;
    border-radius: 9px;
}

html[data-view-mode="mobile"] .inspection-subcategory-grid {
    border-radius: 0 0 9px 9px;
}

html[data-view-mode="mobile"] .inspection-choice-bubble {
    min-height: 36px;
    padding: 0.38rem 0.65rem;
}

html[data-view-mode="mobile"] .inspection-outline-row {
    grid-template-columns: 1fr max-content;
    gap: 0.35rem;
}

html[data-view-mode="mobile"] .inspection-outline-row > span {
    grid-column: 1 / -1;
}

html[data-view-mode="mobile"] .inspection-outline-row em {
    align-self: start;
}

html[data-view-mode="mobile"] .inspection-outline-items {
    padding: 0.35rem;
}

html[data-view-mode="mobile"] .inspection-mobile-condition-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.55rem;
}

html[data-view-mode="mobile"] .inspection-outline-item {
    padding: 0.38rem;
}

html[data-view-mode="mobile"] .inspection-frame-control-row {
    align-items: stretch;
    justify-content: stretch;
    border-radius: 10px;
    max-width: 100%;
    overflow: hidden;
    flex-wrap: wrap;
}

html[data-view-mode="mobile"] .inspection-outline-item.inspection-check .inspection-outline-item-content {
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

html[data-view-mode="mobile"] .inspection-condition-bubbles {
    display: flex;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.28rem;
}

html[data-view-mode="mobile"] .inspection-condition-bubble {
    flex: 1 1 5.85rem;
    min-width: 0;
    min-height: 36px;
    padding: 0.28rem 0.35rem;
    line-height: 1.05;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.bad,
html[data-view-mode="mobile"] .inspection-condition-bubble.decent,
html[data-view-mode="mobile"] .inspection-condition-bubble.good {
    position: relative;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
    border-radius: 999px;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.bad {
    border-color: #b42318;
    background: #fff0ee;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.decent {
    border-color: #d9771f;
    background: #fff4e8;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.good {
    border-color: #1f7a3d;
    background: #e8f7ec;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.bad::after,
html[data-view-mode="mobile"] .inspection-condition-bubble.decent::after,
html[data-view-mode="mobile"] .inspection-condition-bubble.good::after {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 950;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.bad::after {
    content: "B";
    color: #9f1d17;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.decent::after {
    content: "D";
    color: #9a4f05;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.good::after {
    content: "G";
    color: #14532d;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.bad.selected,
html[data-view-mode="mobile"] .inspection-condition-bubble.decent.selected,
html[data-view-mode="mobile"] .inspection-condition-bubble.good.selected {
    box-shadow: 0 0 0 2px rgba(31, 41, 55, 0.18), 0 3px 8px rgba(31, 41, 55, 0.12);
    transform: translateY(-1px);
}

html[data-view-mode="mobile"] .inspection-condition-bubble.bad.selected {
    border-color: #9f1d17;
    background: #b42318;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.decent.selected {
    border-color: #9a4f05;
    background: #d9771f;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.good.selected {
    border-color: #14532d;
    background: #1f7a3d;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.bad.selected::after,
html[data-view-mode="mobile"] .inspection-condition-bubble.decent.selected::after,
html[data-view-mode="mobile"] .inspection-condition-bubble.good.selected::after {
    color: #ffffff;
}

html[data-view-mode="mobile"] .inspection-note-button {
    width: 38px;
    height: 38px;
}

html[data-view-mode="mobile"] .inspection-note-add-row,
html[data-view-mode="mobile"] .inspection-note-entry {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .inspection-note-entry-actions {
    justify-content: flex-end;
}

html[data-view-mode="mobile"] .inspection-item-detail-dropdown {
    grid-template-columns: 1fr;
    padding: 0.45rem;
}

html[data-view-mode="mobile"] .inspection-item-detail-info {
    padding-right: 0;
    padding-bottom: 0.35rem;
    border-right: 0;
    border-bottom: 1px solid #eadfc9;
}

@media (max-width: 800px) {
    .service-call-controls {
        display: grid;
        grid-template-columns: 1fr;
    }

    .service-call-charge-toggle,
    .service-call-quantity-row {
        width: 100%;
    }

    html:not([data-view-mode="desktop"]) .inspection-mobile-condition-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
        margin: 0 0 0.55rem;
    }

    html:not([data-view-mode="desktop"]) .inspection-frame-control-row {
        align-items: stretch;
        justify-content: stretch;
        max-width: 100%;
        overflow: hidden;
        border-radius: 10px;
        flex-wrap: wrap;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubbles {
        display: flex;
        flex-wrap: wrap;
        flex: 1 1 auto;
        min-width: 0;
        gap: 0.28rem;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble {
        flex: 1 1 5.85rem;
        min-width: 0;
        line-height: 1.05;
        overflow-wrap: anywhere;
        text-align: center;
        white-space: normal;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.bad,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.decent,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.good {
        position: relative;
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        overflow: hidden;
        color: transparent;
        font-size: 0;
        border-radius: 999px;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.bad {
        border-color: #b42318;
        background: #fff0ee;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.decent {
        border-color: #d9771f;
        background: #fff4e8;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.good {
        border-color: #1f7a3d;
        background: #e8f7ec;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.bad::after,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.decent::after,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.good::after {
        position: absolute;
        inset: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.82rem;
        font-weight: 950;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.bad::after {
        content: "B";
        color: #9f1d17;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.decent::after {
        content: "D";
        color: #9a4f05;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.good::after {
        content: "G";
        color: #14532d;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.bad.selected,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.decent.selected,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.good.selected {
        box-shadow: 0 0 0 2px rgba(31, 41, 55, 0.18), 0 3px 8px rgba(31, 41, 55, 0.12);
        transform: translateY(-1px);
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.bad.selected {
        border-color: #9f1d17;
        background: #b42318;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.decent.selected {
        border-color: #9a4f05;
        background: #d9771f;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.good.selected {
        border-color: #14532d;
        background: #1f7a3d;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.bad.selected::after,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.decent.selected::after,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.good.selected::after {
        color: #ffffff;
    }
}

/* Desktop job controls: Status and Technician share one compact row. */
@media (min-width: 801px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .work-order-detail-grid.job-detail-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.3fr) minmax(0, 0.3fr);
        grid-template-rows: auto;
        align-items: start;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-actions-card {
        grid-column: 1;
        grid-row: 1;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-notes-card {
        grid-column: 2;
        grid-row: 1;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card {
        grid-column: 3;
        grid-row: 1;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card {
        grid-column: 4;
        grid-row: 1;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card {
        grid-template-rows: 22px 32px;
        min-height: 54px;
        height: auto;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > strong,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > strong {
        min-height: 22px;
        padding-block: 0.12rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > div,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > div {
        min-height: 32px;
        padding-block: 0.12rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field {
        min-height: 27px;
        padding-block: 0.12rem;
        font-size: 0.82rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field::after,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field::after {
        padding: 0.08rem 0.25rem;
        font-size: 0.56rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .sales-handoff-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-inline-editor {
        grid-column: 1 / -1;
    }
}

/* Restore the preferred stacked field cards; align their headers with working cards. */
@media (min-width: 801px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: 34px 38px !important;
        min-height: 72px;
        height: 72px;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > strong,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > strong {
        box-sizing: border-box;
        justify-content: flex-start;
        width: 100%;
        height: 34px;
        min-height: 34px;
        padding: 0.22rem 0.48rem;
        border-right: 0;
        border-bottom: 1px solid var(--pm-brand-border);
        background: var(--pm-brand-muted);
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > div,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > div {
        min-height: 38px;
        padding: 0.18rem 0.38rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field {
        min-height: 30px;
        padding: 0.12rem 0.3rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field::after,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field::after {
        content: "Change";
        display: inline-flex;
        width: auto;
        height: auto;
        margin: 0;
        padding: 0.08rem 0.28rem;
        border: 0;
        border-radius: 999px;
        background: #fff0df;
        color: var(--pm-brand-orange-dark);
        font-size: 0.56rem;
        font-weight: 850;
        line-height: 1.2;
        text-transform: uppercase;
        transform: none;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-heading {
        min-height: 34px;
        padding-block: 0.22rem;
    }

}

@media (min-width: 801px) and (max-width: 1180px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .work-order-detail-grid.job-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-actions-card {
        grid-column: 1;
        grid-row: 1;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-notes-card {
        grid-column: 2;
        grid-row: 1;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card {
        grid-column: 1;
        grid-row: 2;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card {
        grid-column: 2;
        grid-row: 2;
    }
}

/* Job status and technician cards: compact, intentional field controls. */
@media (min-width: 801px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto minmax(36px, 1fr);
        align-content: stretch;
    }
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > strong,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > strong {
    width: 100%;
    min-width: 0;
    min-height: 24px;
    padding: 0.18rem 0.52rem;
    border-right: 0;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-muted);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > div,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > div {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 0.2rem 0.42rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
    min-height: 30px;
    padding: 0.2rem 0.42rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--pm-brand-green-dark);
    font-size: 0.88rem;
    font-weight: 850;
    text-decoration: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field::after,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field::after {
    content: "Change";
    flex: 0 0 auto;
    margin: 0;
    padding: 0.12rem 0.32rem;
    border-radius: 999px;
    background: #fff0df;
    color: var(--pm-brand-orange-dark);
    font-size: 0.62rem;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field:hover {
    border-color: #b8c8b8;
    background: #eef4ee;
}

@media (max-width: 800px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card {
        grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr) !important;
        grid-template-rows: auto;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > strong,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > strong {
        border-right: 1px solid var(--pm-brand-border);
        border-bottom: 0;
    }
}

html[data-view-mode="mobile"] .inspection-mobile-condition-legend {
    display: none !important;
}

html[data-view-mode="mobile"] .inspection-frame-control-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 0.32rem;
    align-items: center;
    justify-content: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

html[data-view-mode="mobile"] .inspection-condition-bubbles {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 0.24rem;
    overflow: hidden;
}

html[data-view-mode="mobile"] .inspection-condition-bubble,
html[data-view-mode="mobile"] .inspection-condition-bubble.bad,
html[data-view-mode="mobile"] .inspection-condition-bubble.decent,
html[data-view-mode="mobile"] .inspection-condition-bubble.good {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: auto;
    min-height: 34px;
    max-width: 100%;
    padding: 0.28rem 0.34rem;
    overflow: hidden;
    color: #5f4421;
    font-size: 0.76rem;
    line-height: 1.08;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.bad::after,
html[data-view-mode="mobile"] .inspection-condition-bubble.decent::after,
html[data-view-mode="mobile"] .inspection-condition-bubble.good::after {
    content: none;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.bad.selected,
html[data-view-mode="mobile"] .inspection-condition-bubble.poor.selected {
    border-color: #9f1d17;
    background: #b42318;
    color: #ffffff;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.decent.selected {
    border-color: #9a4f05;
    background: #d9771f;
    color: #ffffff;
}

html[data-view-mode="mobile"] .inspection-condition-bubble.good.selected {
    border-color: #14532d;
    background: #1f7a3d;
    color: #ffffff;
}

html[data-view-mode="mobile"] .inspection-note-button {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    width: 34px;
    height: 34px;
}

html[data-view-mode="mobile"] .inspection-follow-up-panel,
html[data-view-mode="mobile"] .inspection-outline-item-content {
    max-width: 100%;
    overflow: hidden;
}

html[data-view-mode="mobile"] .inspection-outline-item.inspection-check .inspection-outline-item-content > div:first-child {
    display: block;
    min-width: 0;
    padding: 0.28rem 0.42rem;
    border: 1px solid #eadfc9;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.72);
}

html[data-view-mode="mobile"] .inspection-outline-item.inspection-check .inspection-outline-item-content > div:first-child strong,
html[data-view-mode="mobile"] .inspection-outline-item.inspection-check .inspection-outline-item-content > div:first-child small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .inspection-row-position-grid {
    grid-template-columns: repeat(auto-fill, minmax(2.55rem, 1fr));
    max-height: 12rem;
}

html[data-view-mode="mobile"] .inspection-row-position-button {
    min-height: 34px;
}

@media (max-width: 800px) {
    html:not([data-view-mode="desktop"]) .inspection-mobile-condition-legend {
        display: none !important;
    }

    html:not([data-view-mode="desktop"]) .inspection-frame-control-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 34px;
        gap: 0.32rem;
        align-items: center;
        justify-content: stretch;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubbles {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        gap: 0.24rem;
        overflow: hidden;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.bad,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.decent,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.good {
        position: static;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 1 1 0;
        width: 0;
        min-width: 0;
        height: auto;
        min-height: 34px;
        max-width: 100%;
        padding: 0.28rem 0.34rem;
        overflow: hidden;
        color: #5f4421;
        font-size: 0.76rem;
        line-height: 1.08;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.bad::after,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.decent::after,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.good::after {
        content: none;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.bad.selected,
    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.poor.selected {
        border-color: #9f1d17;
        background: #b42318;
        color: #ffffff;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.decent.selected {
        border-color: #9a4f05;
        background: #d9771f;
        color: #ffffff;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble.good.selected {
        border-color: #14532d;
        background: #1f7a3d;
        color: #ffffff;
    }

    html:not([data-view-mode="desktop"]) .inspection-note-button {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        justify-self: center;
        width: 34px;
        height: 34px;
    }

    html:not([data-view-mode="desktop"]) .inspection-follow-up-panel,
    html:not([data-view-mode="desktop"]) .inspection-outline-item-content {
        max-width: 100%;
        overflow: hidden;
    }

    html:not([data-view-mode="desktop"]) .inspection-outline-item.inspection-check .inspection-outline-item-content > div:first-child {
        display: block;
        min-width: 0;
        padding: 0.28rem 0.42rem;
        border: 1px solid #eadfc9;
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.72);
    }

    html:not([data-view-mode="desktop"]) .inspection-outline-item.inspection-check .inspection-outline-item-content > div:first-child strong,
    html:not([data-view-mode="desktop"]) .inspection-outline-item.inspection-check .inspection-outline-item-content > div:first-child small {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html:not([data-view-mode="desktop"]) .inspection-row-position-grid {
        grid-template-columns: repeat(auto-fill, minmax(2.55rem, 1fr));
        max-height: 12rem;
    }

    html:not([data-view-mode="desktop"]) .inspection-row-position-button {
        min-height: 34px;
    }
}

html[data-view-mode="mobile"] .inspection-outline-item.inspection-check {
    align-items: start;
    padding: 0.42rem;
    border-radius: 10px;
}

html[data-view-mode="mobile"] .inspection-outline-item.inspection-check .inspection-outline-item-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row;
    gap: 0.36rem;
    width: 100%;
    min-width: 0;
}

html[data-view-mode="mobile"] .inspection-outline-item.inspection-check .inspection-outline-item-content > div:first-child {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    max-width: 100%;
}

html[data-view-mode="mobile"] .inspection-outline-item.inspection-check .inspection-outline-item-content > .inspection-frame-control-row {
    grid-column: 1 / -1;
    grid-row: 2;
}

html[data-view-mode="mobile"] .inspection-outline-item.inspection-check .inspection-outline-item-content > .inspection-note-panel,
html[data-view-mode="mobile"] .inspection-outline-item.inspection-check .inspection-outline-item-content > .inspection-follow-up-panel,
html[data-view-mode="mobile"] .inspection-outline-item.inspection-check .inspection-outline-item-content > .inspection-item-detail-dropdown {
    grid-column: 1 / -1;
}

html[data-view-mode="mobile"] .inspection-frame-control-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 0.32rem;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 0.24rem;
}

html[data-view-mode="mobile"] .inspection-condition-bubbles {
    display: flex !important;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
}

html[data-view-mode="mobile"] .inspection-condition-bubble {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .inspection-note-button {
    flex: none;
    width: 34px;
    height: 34px;
}

@media (max-width: 800px) {
    html:not([data-view-mode="desktop"]) .inspection-outline-item.inspection-check {
        align-items: start;
        padding: 0.42rem;
        border-radius: 10px;
    }

    html:not([data-view-mode="desktop"]) .inspection-outline-item.inspection-check .inspection-outline-item-content {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-auto-flow: row;
        gap: 0.36rem;
        width: 100%;
        min-width: 0;
    }

    html:not([data-view-mode="desktop"]) .inspection-outline-item.inspection-check .inspection-outline-item-content > div:first-child {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        max-width: 100%;
    }

    html:not([data-view-mode="desktop"]) .inspection-outline-item.inspection-check .inspection-outline-item-content > .inspection-frame-control-row {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    html:not([data-view-mode="desktop"]) .inspection-outline-item.inspection-check .inspection-outline-item-content > .inspection-note-panel,
    html:not([data-view-mode="desktop"]) .inspection-outline-item.inspection-check .inspection-outline-item-content > .inspection-follow-up-panel,
    html:not([data-view-mode="desktop"]) .inspection-outline-item.inspection-check .inspection-outline-item-content > .inspection-item-detail-dropdown {
        grid-column: 1 / -1;
    }

    html:not([data-view-mode="desktop"]) .inspection-frame-control-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 34px;
        gap: 0.32rem;
        align-items: center;
        width: 100%;
        min-width: 0;
        padding: 0.24rem;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubbles {
        display: flex !important;
        flex-wrap: nowrap;
        min-width: 0;
        overflow: hidden;
    }

    html:not([data-view-mode="desktop"]) .inspection-condition-bubble {
        flex: 1 1 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html:not([data-view-mode="desktop"]) .inspection-note-button {
        flex: none;
        width: 34px;
        height: 34px;
    }
}

html[data-view-mode="mobile"] .equipment-editor-section {
    padding: 0.6rem;
}

html[data-view-mode="mobile"] .equipment-editor-heading,
html[data-view-mode="mobile"] .equipment-editor-toggle-row {
    display: grid;
    gap: 0.25rem;
}

html[data-view-mode="mobile"] .equipment-editor-two-column,
html[data-view-mode="mobile"] .equipment-editor-tile-grid,
html[data-view-mode="mobile"] .equipment-editor-model-grid {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .equipment-editor-toggle {
    justify-self: start;
}

html[data-view-mode="mobile"] .equipment-editor-bubble {
    min-height: 36px;
}

html[data-view-mode="mobile"] .expandable-summary {
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 0.35rem;
    align-items: center;
    min-height: 46px;
    padding: 0.28rem 0.4rem;
}

html[data-view-mode="mobile"] .expandable-summary-main {
    grid-template-columns: minmax(96px, 1fr) minmax(74px, 0.75fr) max-content;
    grid-template-rows: auto auto;
    gap: 0.12rem 0.35rem;
    min-height: 0;
}

html[data-view-mode="mobile"] .expandable-start {
    align-self: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
}

html[data-view-mode="mobile"] .expandable-row-actions {
    gap: 0.25rem;
}

html[data-view-mode="mobile"] .expandable-archive {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
}

html[data-view-mode="mobile"] .work-order-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

html[data-view-mode="mobile"] .work-order-action-icon {
    width: 20px;
    height: 20px;
}

html[data-view-mode="mobile"] .job-desktop-edit-trigger {
    display: none;
}

html[data-view-mode="mobile"] .job-mobile-expand-trigger {
    display: inline-block;
}

html[data-view-mode="mobile"] .expandable-primary {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .expandable-summary-main .expandable-description {
    grid-column: 2 / 4;
    grid-row: 1;
}

html[data-view-mode="mobile"] .expandable-description {
    grid-column: 1 / -1;
}

html[data-view-mode="mobile"] .expandable-status {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .expandable-tech {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .job-status-count {
    grid-column: 3;
    grid-row: 2;
    margin-left: 0;
    width: fit-content;
}

html[data-view-mode="mobile"] .work-order-summary {
    grid-template-columns: minmax(0, 1fr) minmax(58px, max-content) 108px;
    grid-template-areas:
        "main priority actions"
        "status tech actions";
    gap: 0.08rem 0.32rem;
    min-height: 44px;
    padding: 0.2rem 0.3rem;
}

html[data-view-mode="mobile"] .work-order-summary-main {
    grid-area: main;
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: auto auto;
    gap: 0.2rem;
    min-width: 0;
}

html[data-view-mode="mobile"] .work-order-summary-main .expandable-primary {
    grid-column: 1;
    grid-row: 1;
}

html[data-view-mode="mobile"] .work-order-summary-main .expandable-description {
    grid-column: 1;
    grid-row: 2;
}

html[data-view-mode="mobile"] .work-order-summary-main .work-order-progress {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
}

html[data-view-mode="mobile"] .work-order-summary > .expandable-status {
    grid-area: status;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[data-view-mode="mobile"] .work-order-summary > .expandable-tech {
    grid-area: tech;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-self: start;
}

html[data-view-mode="mobile"] .work-order-summary > .priority-badge {
    grid-area: priority;
    align-self: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
}

html[data-view-mode="mobile"] .work-order-summary-actions {
    grid-area: actions;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.18rem;
}

html[data-view-mode="mobile"] .work-order-summary-actions .btn {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    line-height: 1.15;
}

html[data-view-mode="mobile"] .work-order-summary-running {
    grid-template-columns: minmax(0, 1fr) 108px;
    grid-template-areas: "main actions";
    gap: 0.28rem;
    min-height: 48px;
}

html[data-view-mode="mobile"] .work-order-summary-running .work-order-summary-main {
    grid-area: main;
    grid-template-columns: minmax(92px, 0.45fr) minmax(0, 1fr) max-content;
    grid-template-rows: auto;
    gap: 0.28rem;
    align-items: center;
}

html[data-view-mode="mobile"] .work-order-summary-running .expandable-primary {
    grid-column: 1;
    grid-row: 1;
}

html[data-view-mode="mobile"] .work-order-running-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.22rem;
}

html[data-view-mode="mobile"] .work-order-running-tech {
    min-width: 0;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .work-order-running-chip {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    min-height: 30px;
    padding: 0.14rem 0.22rem;
}

html[data-view-mode="mobile"] .work-order-running-icon {
    width: 22px;
    height: 22px;
}

html[data-view-mode="mobile"] .work-order-running-text strong {
    font-size: 0.74rem;
}

html[data-view-mode="mobile"] .work-order-running-text small {
    font-size: 0.68rem;
}

html[data-view-mode="mobile"] .work-order-running-end {
    min-height: 25px;
    padding: 0.08rem 0.36rem;
    font-size: 0.72rem;
}

html[data-view-mode="mobile"] .work-order-running-end-all {
    width: 100%;
    min-height: 28px;
    font-size: 0.72rem;
}

html[data-view-mode="mobile"] .work-order-details-panel {
    padding: 0.55rem;
}

html[data-view-mode="mobile"] .work-order-detail-grid,
html[data-view-mode="mobile"] .work-order-edit-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

html[data-view-mode="mobile"] .job-detail-actions-card,
html[data-view-mode="mobile"] .job-detail-notes-card,
html[data-view-mode="mobile"] .job-detail-status-card,
html[data-view-mode="mobile"] .job-detail-tech-card {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
}

html[data-view-mode="mobile"] .job-details-panel {
    overflow: hidden;
}

html[data-view-mode="mobile"] .job-details-panel .job-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.5rem;
}

html[data-view-mode="mobile"] .job-details-panel .job-detail-grid > div:not(.job-inline-editor) {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    width: 100%;
    min-width: 0;
}

html[data-view-mode="mobile"] .job-detail-actions-card,
html[data-view-mode="mobile"] .job-detail-notes-card {
    grid-template-columns: minmax(0, 1fr) auto !important;
}

html[data-view-mode="mobile"] .job-detail-status-card,
html[data-view-mode="mobile"] .job-detail-tech-card {
    grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr) !important;
}

html[data-view-mode="mobile"] .job-detail-grid .editable-field {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[data-view-mode="mobile"] .job-detail-grid .job-action-card-list,
html[data-view-mode="mobile"] .job-note-list,
html[data-view-mode="mobile"] .job-inline-editor {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

html[data-view-mode="mobile"] .job-details-panel .job-action-row {
    grid-template-columns: minmax(0, 1fr) 32px;
}

html[data-view-mode="mobile"] .job-details-panel .job-action-card {
    grid-template-columns: max-content minmax(0, 1fr);
    min-width: 0;
}

html[data-view-mode="mobile"] .job-details-panel .job-action-card span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .job-details-panel .job-note-card {
    grid-template-columns: minmax(0, 1fr) 32px;
}

html[data-view-mode="mobile"] .job-details-panel .expandable-actions {
    margin-top: 0.55rem;
}

html[data-view-mode="mobile"] .job-calendar-grid {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

html[data-view-mode="mobile"] .job-calendar-day {
    flex: 0 0 170px;
}

html[data-view-mode="mobile"] .expandable-actions {
    flex-direction: column;
}

html[data-view-mode="mobile"] .expandable-actions .btn {
    width: 100%;
}

html[data-view-mode="mobile"] .sales-dashboard-panel .section-header.compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    min-height: 34px;
    margin-bottom: 0.45rem;
}

html[data-view-mode="mobile"] .sales-dashboard-panel .section-header.compact .btn {
    width: min(10rem, 48%);
    min-width: 0;
    min-height: 32px;
    padding: 0.28rem 0.58rem;
    font-size: 0.78rem;
}

html[data-view-mode="mobile"] .deal-bar-list .deal-summary {
    grid-template-columns: minmax(0, 1fr) auto auto max-content;
    gap: 0.18rem 0.32rem;
    min-height: 46px;
    padding: 0.28rem 0.36rem;
}

html[data-view-mode="mobile"] .deal-bar-list .deal-summary .expandable-primary {
    min-width: 0;
    overflow: hidden;
    color: #15803d;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-view-mode="mobile"] .deal-bar-list .deal-summary .job-status-count:nth-of-type(2) {
    display: none;
}

html[data-view-mode="mobile"] .deal-bar-list .deal-summary .expandable-description {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    line-height: 1.05;
}

html[data-view-mode="mobile"] .sales-deal-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-view-mode="mobile"] .sales-deal-preview-card {
    padding: 0.34rem 0.42rem;
}

html[data-view-mode="mobile"] .sales-deal-dashboard-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.42rem;
}

html[data-view-mode="mobile"] .sales-deal-dashboard-details .deal-info-card {
    padding: 0.42rem 0.48rem;
}

html[data-view-mode="mobile"] .sales-deal-dashboard-details .deal-info-card.wide,
html[data-view-mode="mobile"] .sales-deal-dashboard-card.action-card,
html[data-view-mode="mobile"] .sales-deal-dashboard-card.note-card {
    grid-column: 1 / -1;
}

html[data-view-mode="mobile"] .sales-deal-dashboard-card {
    padding: 0.45rem 0.5rem;
}

html[data-view-mode="mobile"] .sales-deal-dashboard-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.45rem;
}

html[data-view-mode="mobile"] .sales-deal-dashboard-actions .btn {
    width: 100%;
    min-width: 0;
}

html[data-view-mode="mobile"] .sales-dashboard-panel .expandable-actions {
    flex-direction: row;
    gap: 0.35rem;
}

html[data-view-mode="mobile"] .sales-dashboard-panel .expandable-actions .btn {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    padding: 0.34rem 0.45rem;
    font-size: 0.78rem;
}

html[data-view-mode="mobile"] .job-action-type {
    width: 100%;
}

html[data-view-mode="mobile"] .job-action-card {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .job-action-row {
    grid-template-columns: minmax(0, 1fr) 32px;
}

html[data-view-mode="mobile"] .job-action-card .btn {
    width: 100%;
}

html[data-view-mode="mobile"] .work-orders-table .table-one-line {
    white-space: nowrap;
}

html[data-view-mode="desktop"] .table-wrapper {
    overflow-x: auto;
}

html[data-view-mode="desktop"] .mobile-entity-list {
    display: none;
}

html[data-view-mode="desktop"] .desktop-entity-table {
    display: block;
}

html[data-view-mode="desktop"] .job-queue-table,
html[data-view-mode="desktop"] .dashboard-work-orders-table,
html[data-view-mode="desktop"] .work-orders-table,
html[data-view-mode="desktop"] .accounting-queue-table,
html[data-view-mode="desktop"] .parts-entry-table,
html[data-view-mode="desktop"] .parts-used-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

html[data-view-mode="desktop"] .job-queue-table thead,
html[data-view-mode="desktop"] .dashboard-work-orders-table thead,
html[data-view-mode="desktop"] .work-orders-table thead,
html[data-view-mode="desktop"] .accounting-queue-table thead,
html[data-view-mode="desktop"] .parts-entry-table thead,
html[data-view-mode="desktop"] .parts-used-table thead {
    display: table-header-group;
}

html[data-view-mode="desktop"] .job-queue-table tbody,
html[data-view-mode="desktop"] .dashboard-work-orders-table tbody,
html[data-view-mode="desktop"] .work-orders-table tbody,
html[data-view-mode="desktop"] .accounting-queue-table tbody,
html[data-view-mode="desktop"] .parts-entry-table tbody,
html[data-view-mode="desktop"] .parts-used-table tbody {
    display: table-row-group;
}

html[data-view-mode="desktop"] .job-queue-table tr,
html[data-view-mode="desktop"] .dashboard-work-orders-table tr,
html[data-view-mode="desktop"] .work-orders-table tr,
html[data-view-mode="desktop"] .accounting-queue-table tr,
html[data-view-mode="desktop"] .parts-entry-table tr,
html[data-view-mode="desktop"] .parts-used-table tr {
    display: table-row;
    padding: 0;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
}

html[data-view-mode="desktop"] .job-queue-table th,
html[data-view-mode="desktop"] .job-queue-table td,
html[data-view-mode="desktop"] .dashboard-work-orders-table th,
html[data-view-mode="desktop"] .dashboard-work-orders-table td,
html[data-view-mode="desktop"] .work-orders-table th,
html[data-view-mode="desktop"] .work-orders-table td,
html[data-view-mode="desktop"] .accounting-queue-table th,
html[data-view-mode="desktop"] .accounting-queue-table td,
html[data-view-mode="desktop"] .parts-entry-table th,
html[data-view-mode="desktop"] .parts-entry-table td,
html[data-view-mode="desktop"] .parts-used-table th,
html[data-view-mode="desktop"] .parts-used-table td {
    display: table-cell;
    width: auto;
    min-width: 0;
    padding: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    white-space: normal;
}

html[data-view-mode="desktop"] .job-queue-table td::before,
html[data-view-mode="desktop"] .dashboard-work-orders-table td::before,
html[data-view-mode="desktop"] .work-orders-table td::before,
html[data-view-mode="desktop"] .accounting-queue-table td::before,
html[data-view-mode="desktop"] .parts-entry-table td::before,
html[data-view-mode="desktop"] .parts-used-table td::before {
    content: none;
}

html[data-view-mode="desktop"] .job-queue-table .btn,
html[data-view-mode="desktop"] .dashboard-work-orders-table .btn,
html[data-view-mode="desktop"] .work-orders-table .btn,
html[data-view-mode="desktop"] .accounting-queue-table .btn,
html[data-view-mode="desktop"] .parts-entry-table .btn,
html[data-view-mode="desktop"] .parts-used-table .btn {
    width: auto;
}

/* PM Precision Ag brand color experiment */
@media (max-width: 760px) {
    .time-summary-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .time-start-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .time-start-actions .btn {
        width: 100%;
    }

    .time-entry-groups {
        grid-template-columns: 1fr;
    }

    .service-call-quantity-row {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: stretch;
        width: 100%;
    }

    .service-call-quantity-row .quantity-stepper {
        width: 100%;
    }

    .time-entry-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.28rem;
        min-height: 40px;
    }

    .time-entry-summary-trigger {
        grid-template-columns: minmax(0, 1fr) max-content;
        grid-template-rows: auto auto;
        gap: 0.08rem 0.35rem;
    }

    .time-entry-summary-trigger > span:first-child {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .time-entry-hours {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .time-entry-status {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }

    .time-entry-quick-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, max-content));
        gap: 0.22rem;
        justify-content: end;
    }

    .time-entry-quick-actions .btn,
    .time-manual-toggle {
        min-width: 0;
        min-height: 27px;
        padding: 0.12rem 0.34rem;
        font-size: 0.72rem;
    }

    .time-manual-inline-input {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        height: 27px;
        font-size: 0.78rem;
        padding: 0.1rem 0.2rem;
    }

    .time-manual-stepper {
        grid-template-columns: 22px 48px 22px;
    }

    .time-manual-stepper-button {
        width: 22px;
        height: 27px;
        font-size: 0.86rem;
    }

    .time-entry-detail-grid {
        grid-template-columns: 1fr;
    }

    .time-actions {
        display: grid;
        grid-template-columns: 1fr 1fr 34px;
    }

    .time-actions .btn {
        width: 100%;
    }

    .parts-entry-card {
        padding: 0.55rem;
    }

    .parts-entry-grid,
    .parts-entry-grid.pricing-hidden {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .parts-entry-add-cell {
        height: 44px;
    }

    .parts-entry-card-header .btn {
        min-width: 84px;
    }

    .parts-used-row {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "main"
            "controls"
            "unit"
            "total";
        gap: 0.35rem 0.45rem;
        padding: 0.36rem 0.42rem;
    }

    .parts-used-main {
        grid-area: main;
    }

    .parts-used-controls {
        grid-area: controls;
        justify-content: start;
        align-self: center;
    }

    .part-list-add-panel {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .part-list-move-select {
        width: 120px;
    }

    .parts-used-unit {
        grid-area: unit;
    }

    .parts-used-total {
        grid-area: total;
    }

    .parts-used-line {
        display: grid;
        gap: 0.04rem;
    }
}

html[data-view-mode="mobile"] .time-summary-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

html[data-view-mode="mobile"] .time-start-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

html[data-view-mode="mobile"] .time-start-actions .btn {
    width: 100%;
}

html[data-view-mode="mobile"] .time-entry-groups {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .service-call-quantity-row {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
    width: 100%;
}

html[data-view-mode="mobile"] .service-call-quantity-row .quantity-stepper {
    width: 100%;
}

html[data-view-mode="mobile"] .time-entry-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.28rem;
    min-height: 40px;
}

html[data-view-mode="mobile"] .time-entry-summary-trigger {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: auto auto;
    gap: 0.08rem 0.35rem;
}

html[data-view-mode="mobile"] .time-entry-summary-trigger > span:first-child {
    grid-column: 1;
    grid-row: 1 / 3;
}

html[data-view-mode="mobile"] .time-entry-hours {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

html[data-view-mode="mobile"] .time-entry-status {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
}

html[data-view-mode="mobile"] .time-entry-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 0.22rem;
    justify-content: end;
}

html[data-view-mode="mobile"] .time-entry-quick-actions .btn,
html[data-view-mode="mobile"] .time-manual-toggle {
    min-width: 0;
    min-height: 27px;
    padding: 0.12rem 0.34rem;
    font-size: 0.72rem;
}

html[data-view-mode="mobile"] .time-manual-inline-input {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 27px;
    font-size: 0.78rem;
    padding: 0.1rem 0.2rem;
}

html[data-view-mode="mobile"] .time-manual-stepper {
    grid-template-columns: 22px 48px 22px;
}

html[data-view-mode="mobile"] .time-manual-stepper-button {
    width: 22px;
    height: 27px;
    font-size: 0.86rem;
}

html[data-view-mode="mobile"] .time-entry-detail-grid {
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .time-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 34px;
}

html[data-view-mode="mobile"] .time-actions .btn {
    width: 100%;
}

html[data-view-mode="mobile"] .parts-entry-card {
    padding: 0.55rem;
}

html[data-view-mode="mobile"] .parts-entry-grid,
html[data-view-mode="mobile"] .parts-entry-grid.pricing-hidden {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

html[data-view-mode="mobile"] .service-call-controls {
    display: grid;
    grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .service-call-charge-toggle {
    width: 100%;
}

html[data-view-mode="mobile"] .parts-entry-add-cell {
    height: 44px;
}

html[data-view-mode="mobile"] .parts-used-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "main"
        "controls"
        "unit"
        "total";
    gap: 0.35rem 0.45rem;
    padding: 0.36rem 0.42rem;
}

html[data-view-mode="mobile"] .parts-used-main {
    grid-area: main;
}

html[data-view-mode="mobile"] .parts-used-controls {
    grid-area: controls;
    justify-content: start;
    align-self: center;
}

html[data-view-mode="mobile"] .part-list-add-panel {
    grid-template-columns: 1fr;
    max-width: none;
}

html[data-view-mode="mobile"] .part-list-move-select {
    width: 120px;
}

html[data-view-mode="mobile"] .parts-used-unit {
    grid-area: unit;
}

html[data-view-mode="mobile"] .parts-used-total {
    grid-area: total;
}

html[data-view-mode="mobile"] .parts-used-line {
    display: grid;
    gap: 0.04rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) {
    --pm-brand-charcoal: #3a342f;
    --pm-brand-graphite: #5c554f;
    --pm-brand-gold: #cdb79a;
    --pm-brand-gold-soft: #f2eadf;
    --pm-brand-orange: #d97a20;
    --pm-brand-orange-dark: #a85312;
    --pm-brand-green: #2e5a36;
    --pm-brand-green-dark: #214329;
    --pm-brand-green-soft: #e7efe8;
    --pm-brand-surface: #fbf7ef;
    --pm-brand-muted: #f2ede4;
    --pm-brand-page: #e7e1d6;
    --pm-brand-page-deep: #d9d0c2;
    --pm-brand-border: #cdb79a;
    --pm-brand-shadow: rgba(58, 52, 47, 0.14);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) body {
    background:
        radial-gradient(circle at top left, rgba(217, 119, 31, 0.1), transparent 30rem),
        linear-gradient(180deg, var(--pm-brand-page) 0%, var(--pm-brand-page-deep) 100%);
    color: var(--pm-brand-charcoal);
}

.theme-pm-brand.page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(217, 119, 31, 0.1), transparent 30rem),
        linear-gradient(180deg, var(--pm-brand-page) 0%, var(--pm-brand-page-deep) 100%);
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .page,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) main,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content {
    background: transparent;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) a {
    color: var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) a:hover {
    color: var(--pm-brand-orange-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .app-modal-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .identity-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-item,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .customer-picker,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .part-picker,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-entry-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-action-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-action-add-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-source-notes,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-entry-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-summary-grid > div,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-entry-group,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-entry-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-used-row,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-part-list-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .settings-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .accounting-choice-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table-wrapper,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-count,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-icon-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-small-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .add-record-panel {
    border-color: var(--pm-brand-border);
    background: var(--pm-brand-surface);
    box-shadow: 0 12px 24px var(--pm-brand-shadow);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
    border-color: var(--pm-brand-border);
    background: linear-gradient(180deg, #fffdf8 0%, var(--pm-brand-muted) 100%);
    box-shadow: 0 10px 24px var(--pm-brand-shadow);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .bottom-preference-actions {
    border-color: var(--pm-brand-border);
    background: rgba(255, 253, 248, 0.94);
    backdrop-filter: blur(6px);
    box-shadow: 0 14px 32px var(--pm-brand-shadow);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-menu-link {
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-link:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-menu-link:hover {
    border-color: var(--pm-brand-gold);
    background: var(--pm-brand-gold-soft);
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-link.active,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-menu-link.active {
    border-color: var(--pm-brand-orange);
    background: #fff4e8;
    color: var(--pm-brand-orange-dark);
    box-shadow: inset 0 -3px 0 rgba(217, 119, 31, 0.28);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-primary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-success,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-info,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-start {
    border-color: var(--pm-brand-green);
    background: var(--pm-brand-green);
    color: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-primary:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-success:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-info:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-start:hover {
    border-color: var(--pm-brand-green-dark);
    background: var(--pm-brand-green-dark);
    color: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-secondary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-dark {
    border-color: var(--pm-brand-graphite);
    background: var(--pm-brand-graphite);
    color: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-warning {
    border-color: var(--pm-brand-orange);
    background: var(--pm-brand-orange);
    color: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-primary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-success,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-info {
    border-color: var(--pm-brand-green);
    background: #ffffff;
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-primary:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-success:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-info:hover {
    border-color: var(--pm-brand-green);
    background: var(--pm-brand-green-soft);
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-secondary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-dark {
    border-color: var(--pm-brand-gold);
    background: #ffffff;
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-secondary:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-dark:hover {
    background: var(--pm-brand-gold-soft);
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-control,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-select {
    border-color: #c9b895;
    background-color: #fffefa;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-control:focus,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-select:focus {
    border-color: var(--pm-brand-green);
    box-shadow: 0 0 0 0.18rem rgba(31, 122, 61, 0.16);
    outline: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-header,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-header {
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h1,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h2,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h3,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h4,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) h5 {
    color: #1f211f;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content > h1:first-child {
    border-left-color: var(--pm-brand-green);
    border-bottom-color: var(--pm-brand-border);
    background: #fffaf1;
    color: var(--pm-brand-charcoal);
    box-shadow: 0 8px 18px rgba(57, 44, 25, 0.08);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content > h1:first-child::after {
    background: var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-section-title::before {
    background: var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .icon-filter-button.active,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-option-bubble:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-option-bubble.selected,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .part-picker-option.selected,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .customer-picker-option.selected {
    border-color: var(--pm-brand-orange);
    background: #fff4e8;
    color: var(--pm-brand-orange-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .filter-icon,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .editable-field,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-detail-button,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .priority-inline-edit,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-grid .editable-field,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-tech {
    color: var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-summary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-day,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .customer-picker-selected,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .part-picker-selected,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-summary {
    background: #fbf8f1;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-summary:hover {
    background: #fff4e8;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-primary {
    color: var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-title,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-phone-link {
    color: var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-subtitle,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-phone-missing {
    color: #665944;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-phone-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-phone-missing {
    border-color: var(--pm-brand-border);
    background: var(--pm-brand-surface);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-status-count {
    background: var(--pm-brand-gold-soft);
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-type-badge {
    background: var(--pm-brand-gold-soft);
    color: #5f4421;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-card.selected {
    border-color: #87c99b;
    background: var(--pm-brand-green-soft);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-card.selected::after {
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .action-add-bubble {
    border-color: var(--pm-brand-border);
    background: var(--pm-brand-gold-soft);
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .action-add-bubble:hover {
    border-color: var(--pm-brand-green);
    background: var(--pm-brand-green-soft);
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .icon-danger-button {
    border-color: #e4c2a3;
    background: #fff8f1;
    color: #b45309;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .icon-danger-button:hover {
    border-color: var(--pm-brand-orange);
    background: #fff4e8;
    color: var(--pm-brand-orange-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-detail-tile,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-grid > div:not(.job-inline-editor),
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .assigned-job-filter-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-note-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-part-list-summary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .part-picker-option,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .customer-picker-option,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-detail-grid > div {
    border-color: var(--pm-brand-border);
    background: #fffdf8;
    box-shadow: inset 3px 0 0 var(--pm-brand-gold);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-detail-label,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-grid > div:not(.job-inline-editor) > strong,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-heading strong,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .assigned-job-filter-panel strong,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-detail-grid strong,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-subtitle {
    color: #665944;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .alert-info,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .app-toast {
    background: var(--pm-brand-green-soft);
    border-color: #89c99a;
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .priority-high {
    background: var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .priority-low {
    background: var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-queue-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-work-orders-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .accounting-queue-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-entry-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-used-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table {
    background: var(--pm-brand-surface);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-queue-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-work-orders-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .accounting-queue-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-entry-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-used-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table th {
    border-color: var(--pm-brand-border);
    background: var(--pm-brand-muted);
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table td,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-queue-table td,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-work-orders-table td,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .accounting-queue-table td,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-entry-table td,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-used-table td,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table td,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table td {
    border-color: #eadfc9;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-icon-link:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-small-link:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-link:hover {
    border-color: var(--pm-brand-orange);
    background: #fff4e8;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-section {
    border-top-color: var(--pm-brand-border);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-header span,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-date span,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-empty {
    color: #665944;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-day.today {
    border-color: var(--pm-brand-orange);
    background: #fff4e8;
    box-shadow: inset 0 3px 0 rgba(217, 119, 31, 0.36);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-date {
    border-bottom-color: var(--pm-brand-border);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-item {
    border-color: var(--pm-brand-border);
    background: var(--pm-brand-gold-soft);
    color: var(--pm-brand-charcoal);
    box-shadow: inset 3px 0 0 var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-item:hover {
    border-color: var(--pm-brand-orange);
    background: #fff4e8;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-item span {
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-calendar-item {
    background: #fff4e8;
    box-shadow: inset 3px 0 0 var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .card-body {
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .card-title {
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .border,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .border-primary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .list-group-item,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dropdown-menu,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .input-group-text {
    border-color: var(--pm-brand-border) !important;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .border-primary {
    box-shadow: inset 3px 0 0 var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .list-group-item,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dropdown-menu,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .input-group-text {
    background: var(--pm-brand-surface);
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table-striped > tbody > tr:nth-of-type(odd) > *,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(184, 147, 86, 0.08);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table-hover > tbody > tr:hover > *,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) table tbody tr:hover {
    background-color: #fff4e8;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) hr {
    border-color: var(--pm-brand-border);
    opacity: 1;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .alert {
    border-color: var(--pm-brand-border);
    background: var(--pm-brand-surface);
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .alert-light {
    background: #fbf8f1;
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .alert-success {
    border-color: #89c99a;
    background: var(--pm-brand-green-soft);
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .alert-warning,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .text-info {
    border-color: var(--pm-brand-gold);
    background: var(--pm-brand-gold-soft);
    color: #5f4421 !important;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .alert-danger,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .text-danger,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .validation-message,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .validation-summary-errors {
    color: #9f1d17 !important;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .alert-danger {
    border-color: #f1a39b;
    background: #fff0ee;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .text-muted,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .text-secondary {
    color: #665944 !important;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-link {
    color: var(--pm-brand-green);
    font-weight: 700;
    text-decoration-color: rgba(31, 122, 61, 0.3);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-link:hover {
    color: var(--pm-brand-orange-dark);
    text-decoration-color: rgba(217, 119, 31, 0.45);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-danger,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-danger:hover {
    border-color: #9f1d17;
    background: #b42318;
    color: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-danger {
    border-color: #b42318;
    background: #ffffff;
    color: #9f1d17;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-floating > label,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) label {
    color: #665944;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-floating > .form-control,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-floating > .form-select {
    border-color: #c9b895;
    background-color: #fffefa;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-check-input {
    border-color: #b8a279;
    background-color: #fffefa;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-check-input:checked {
    border-color: var(--pm-brand-green);
    background-color: var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-pills {
    border: 1px solid var(--pm-brand-border);
    border-radius: 12px;
    background: rgba(255, 253, 248, 0.78);
    padding: 0.4rem;
    box-shadow: 0 10px 20px var(--pm-brand-shadow);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-pills .nav-link {
    border: 1px solid transparent;
    border-radius: 10px;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-pills .nav-link.active {
    border-color: var(--pm-brand-orange);
    background: #fff4e8;
    color: var(--pm-brand-orange-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content > .row > [class*="col-"] > form,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content > .row > [class*="col-"] > section {
    border: 1px solid var(--pm-brand-border);
    border-radius: 14px;
    background: var(--pm-brand-surface);
    box-shadow: 0 12px 24px var(--pm-brand-shadow);
    padding: 1.25rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content > .row > [class*="col-"] > form .btn,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content > .row > [class*="col-"] > section .btn {
    margin-top: 0.15rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .accounting-actions .btn,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .settings-action-grid .btn,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-title-actions .btn,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table-wrapper .btn {
    box-shadow: 0 6px 14px rgba(66, 54, 35, 0.08);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .customer-picker-list,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .part-picker-list {
    border-color: var(--pm-brand-border);
    background: var(--pm-brand-surface);
    box-shadow: 0 14px 28px var(--pm-brand-shadow);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .settings-toggle {
    border-color: var(--pm-brand-border);
    background: #fbf8f1;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .settings-toggle:hover {
    background: #fff4e8;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) code,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) pre {
    color: var(--pm-brand-charcoal);
    background: var(--pm-brand-gold-soft);
    border-color: var(--pm-brand-border);
}

@media (max-width: 900px) {
    html:not([data-view-mode="desktop"]) .time-tracking-table thead {
        display: none;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-table,
    html:not([data-view-mode="desktop"]) .time-tracking-table tbody {
        display: block;
        width: 100%;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-table tr {
        display: grid;
        grid-template-columns: minmax(72px, 0.75fr) minmax(56px, 0.55fr) minmax(74px, 0.7fr) minmax(74px, 0.7fr) minmax(52px, 0.48fr);
        gap: 0.18rem 0.42rem;
        align-items: center;
        padding: 0.42rem 0.5rem;
        margin-bottom: 0.45rem;
        border: 1px solid #d0d7de;
        border-radius: 10px;
        background: #ffffff;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-table td {
        display: block;
        min-width: 0;
        padding: 0;
        border-bottom: 0;
        color: #111827;
        font-size: 0.78rem;
        line-height: 1.15;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.08rem;
        color: #64748b;
        font-size: 0.58rem;
        font-weight: 900;
        line-height: 1;
        text-transform: uppercase;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-table td[data-label="Date"] {
        color: #14532d;
        font-weight: 950;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-table td[data-label="Type"] {
        font-weight: 850;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-table td[data-label="Notes"] {
        grid-column: 1 / span 3;
        overflow: hidden;
        color: #475569;
        font-size: 0.72rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-table td[data-label="Notes"]::before {
        display: none;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-table td[data-label="Actions"] {
        grid-column: 4 / span 2;
        justify-self: end;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-row-actions {
        gap: 0.25rem;
        justify-content: flex-end;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-row-actions .btn {
        min-height: 28px;
        padding: 0.12rem 0.42rem;
        font-size: 0.72rem;
    }

    html:not([data-view-mode="desktop"]) .time-edited-indicator {
        width: 17px;
        height: 17px;
        margin-left: 0.18rem;
        font-size: 0.62rem;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-edit-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    html:not([data-view-mode="desktop"]) .time-tracking-edit-row td {
        display: grid;
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 0.45rem;
        align-items: center;
        font-size: 0.82rem;
    }

    html:not([data-view-mode="desktop"]) .inventory-parts-table {
        display: none !important;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-list {
        display: grid !important;
        gap: 0.48rem;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(82px, 0.52fr) minmax(82px, 0.44fr);
        gap: 0.42rem;
        align-items: center;
        min-height: 48px;
        padding: 0.42rem 0.5rem;
        border: 1px solid #d0d7de;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 6px 14px rgba(17, 24, 39, 0.05);
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-card.counted {
        border-color: #86efac;
        background: #ecfdf3;
        box-shadow: inset 4px 0 0 #198754;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-part {
        min-width: 0;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-part strong {
        display: block;
        overflow: hidden;
        color: #0f172a;
        font-size: 0.95rem;
        font-weight: 950;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-counted-box {
        display: grid;
        grid-template-columns: repeat(2, max-content);
        justify-content: center;
        gap: 0.04rem 0.22rem;
        min-width: 0;
        padding: 0.22rem 0.35rem;
        border: 1px solid #dbe3ec;
        border-radius: 10px;
        background: #f8fafc;
        color: #475569;
        font-size: 0.64rem;
        font-weight: 850;
        line-height: 1.05;
        text-transform: uppercase;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-counted-box strong {
        color: #14532d;
        font-size: 0.8rem;
        text-transform: none;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-count-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 0.2rem 0.45rem;
        border: 1px solid #1f7a3d;
        border-radius: 10px;
        background: #1f7a3d;
        color: #ffffff;
        font-size: 0.84rem;
        font-weight: 950;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-keypad-overlay {
        align-items: center;
        padding: 0.75rem;
    }

    html:not([data-view-mode="desktop"]) .inventory-mobile-keypad-card {
        width: min(390px, 100%);
        max-height: calc(100vh - 1.5rem);
    }
}
/* Sales foundation */
.sales-dashboard-shell {
    border-left: 4px solid var(--pm-accent, #c56f1a);
}

.sales-calendar-card {
    border-left: 4px solid #1f7a3d;
    overflow: hidden;
}

.sales-calendar-item {
    box-sizing: border-box;
    display: block;
    min-width: 0;
    max-width: 100%;
    padding: 0.3rem 0.4rem;
    border-left: 3px solid #d9771f;
    text-decoration: none;
    overflow: hidden;
}

.sales-calendar-card .job-calendar-grid {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
}

.sales-calendar-card .job-calendar-day {
    min-width: 0;
    overflow: hidden;
}

.sales-calendar-item strong {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sales-dashboard-shell,
.sales-mode-panel {
    border-color: rgba(31, 122, 61, 0.28);
    background:
        linear-gradient(135deg, rgba(31, 122, 61, 0.08), rgba(217, 119, 31, 0.07)),
        #fbfcf8;
    box-shadow: 0 10px 26px rgba(50, 39, 20, 0.08);
}

.sales-mode-create-panel {
    border-left: 4px solid #1f7a3d;
}

.sales-dashboard-shell .job-section-title::before,
.sales-mode-panel .section-header h4::before {
    background: #d9771f;
}

.sales-dashboard-grid,
.deal-entry-grid,
.lead-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.sales-dashboard-panel {
    min-width: 0;
}

.sales-dashboard-panel .section-header.compact {
    display: flex;
    justify-content: space-between;
    gap: 0.65rem;
    align-items: center;
    min-height: 42px;
}

.sales-dashboard-panel .section-header.compact .btn {
    width: min(12rem, 46%);
    max-width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.7rem;
    white-space: nowrap;
}

.sales-panel-action {
    border-color: #1f7a3d;
    background: #1f7a3d;
    color: #ffffff;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(31, 122, 61, 0.16);
}

.sales-panel-action:hover {
    border-color: #17642f;
    background: #17642f;
    color: #ffffff;
}

.sales-dashboard-panel .section-header.compact h5 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.1;
}

.sales-panel-title {
    position: relative;
    padding-left: 0.72rem;
    color: #1f2937;
    font-weight: 900;
}

.sales-panel-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.08rem;
    bottom: 0.08rem;
    width: 4px;
    border-radius: 999px;
    background: #d9771f;
}

.sales-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.sales-home-deal-panel .sales-mode-create-panel {
    margin-top: 0.65rem;
}

.deal-create-layout {
    display: grid;
    gap: 0.75rem;
}

.deal-create-top-grid {
    display: grid;
    grid-template-columns: minmax(12rem, 0.8fr) minmax(22rem, 1.35fr) minmax(16rem, 1.05fr) minmax(14rem, 0.9fr);
    gap: 0.75rem;
    align-items: stretch;
}

.sales-mode-create-panel .deal-entry-grid {
    grid-template-columns: minmax(14rem, 0.68fr) minmax(24rem, 1.4fr);
    align-items: start;
    gap: 0.75rem;
}

.sales-mode-create-panel {
    font-size: 1.12rem;
}

.sales-mode-create-panel .section-header h4 {
    font-size: 1.28rem;
}

.sales-mode-create-panel label {
    font-size: 1.03rem;
    font-weight: 700;
}

.sales-mode-create-panel .form-control,
.sales-mode-create-panel .form-select,
.sales-mode-create-panel .btn,
.sales-mode-create-panel .customer-picker-option,
.sales-mode-create-panel .job-action-type {
    font-size: 1.07rem;
}

.sales-mode-create-panel .customer-picker-option strong {
    font-size: 1.1rem;
}

.sales-add-bar {
    border-color: #d9771f;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fffdf7;
    font-size: 1.12rem;
    font-weight: 950;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 22px rgba(217, 119, 31, 0.24);
}

.sales-add-bar:hover,
.sales-add-bar:focus-visible {
    border-color: #b45309;
    background: linear-gradient(135deg, #ea8d12, #c96a06);
    color: #fffdf7;
}

.sales-lead-action {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.sales-lead-action:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #ffffff;
}

.sales-mode-create-panel .customer-picker {
    align-self: start;
}

.sales-mode-create-panel .customer-picker-list {
    max-height: 8.75rem;
}

.deal-create-customer-card {
    display: grid;
    align-content: start;
    gap: 0.5rem;
    min-height: 100%;
}

.deal-mini-header-card {
    border-color: #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 #b89356;
}

.deal-create-customer-card.deal-mini-header-card,
.deal-date-card.deal-mini-header-card,
.deal-equipment-quote-card.deal-mini-header-card {
    overflow: hidden;
    padding: 0;
}

.deal-create-customer-card.deal-mini-header-card > .deal-field-title,
.deal-equipment-quote-card.deal-mini-header-card > .deal-field-title,
.deal-mini-field-card > .deal-field-title {
    display: flex;
    align-items: center;
    min-height: 25px;
    margin: 0;
    padding: 0.2rem 0.52rem;
    border-bottom: 1px solid #d8c8ad;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    color: #242628;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.deal-create-customer-card.deal-mini-header-card > :not(.deal-field-title) {
    width: calc(100% - 1rem);
    margin-right: 0.5rem;
    margin-left: 0.5rem;
}

.deal-create-customer-card.deal-mini-header-card > :last-child {
    margin-bottom: 0.5rem;
}

.deal-create-customer-card .customer-picker-list {
    max-height: 4.9rem;
}

.deal-create-customer-card .customer-picker-option {
    padding: 0.45rem 0.6rem;
}

.deal-create-customer-card .customer-picker-option strong {
    font-size: 0.98rem;
}

.deal-date-card {
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: stretch;
    padding: 0;
    overflow: hidden;
    border-color: #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 #b89356;
}

.deal-date-card > .deal-field-title {
    min-height: 25px;
    margin: 0;
    padding: 0.2rem 0.52rem;
    border-bottom: 1px solid #d8c8ad;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    color: #242628;
    font-size: 0.72rem;
}

.deal-status-priority-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    align-content: start;
    padding: 0.5rem;
}

.deal-compact-toggle-section {
    min-width: 0;
}

.deal-mini-field-card {
    display: grid;
    align-content: start;
    overflow: hidden;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
}

.deal-mini-field-card > .deal-toggle-group {
    padding: 0.42rem 0.5rem;
}

.deal-toggle-group-compact {
    gap: 0.3rem;
}

.deal-toggle-button-compact {
    min-height: 2.15rem;
    padding: 0.34rem 0.58rem;
    font-size: 0.94rem;
}

.deal-equipment-quote-card {
    display: grid;
    align-content: start;
}

.deal-equipment-quote-card.deal-mini-header-card > .deal-toggle-group {
    padding: 0.5rem 0.52rem;
}

.deal-build-sheet-heading {
    min-height: 1.9rem;
    margin: 0;
    padding: 0.18rem 0.58rem;
    border: 0;
    border-bottom: 1px solid #d8c8ad;
    border-radius: 0;
    background: #ead9bb;
}

.deal-build-sheet-heading .job-section-title {
    color: #2f332f;
    font-size: 1rem;
}

.deal-build-sheet-heading .job-section-title::before {
    background: #d9771f;
}

.deal-build-options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.7rem;
    align-items: start;
    padding: 0.5rem;
}

.deal-build-options-grid > label {
    min-width: 0;
}

.deal-create-top-grid > .customer-picker,
.deal-create-top-grid > .deal-toggle-card {
    min-height: 7.45rem;
}

.deal-create-equipment-band {
    margin-top: 0;
}

.deal-entry-wizard-fields {
    gap: 0.85rem;
}

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

.deal-toggle-card,
.deal-quote-wizard,
.deal-checklist-preview {
    padding: 0.7rem;
    border: 1px solid rgba(31, 122, 61, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.deal-field-title {
    display: inline-flex;
    align-items: center;
    min-height: 1.2rem;
    margin-bottom: 0.45rem;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.deal-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.deal-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(217, 119, 31, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #92400e;
    font-size: 0.98rem;
    font-weight: 850;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.deal-toggle-button:hover {
    border-color: rgba(31, 122, 61, 0.35);
    color: #14532d;
}

.deal-toggle-button.selected {
    border-color: #1f7a3d;
    background: linear-gradient(135deg, rgba(31, 122, 61, 0.16), rgba(217, 119, 31, 0.16));
    color: #14532d;
    box-shadow: 0 7px 16px rgba(31, 122, 61, 0.12);
}

.deal-target-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(10rem, 0.85fr);
    gap: 0.5rem;
    align-items: stretch;
    align-self: center;
    width: 100%;
    padding: 0.5rem;
}

.deal-target-field {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(183, 150, 94, 0.42);
    border-radius: 8px;
    background: #fffdf8;
}

.deal-target-field > span {
    display: flex;
    align-items: center;
    min-height: 23px;
    padding: 0.16rem 0.45rem;
    border-bottom: 1px solid #eadfc9;
    background: #f8f1e5;
    color: #374151;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.deal-date-input-shell,
.deal-time-trigger {
    min-height: 2.6rem;
    border: 0;
    border-radius: 0;
    background: #fffdf8;
    box-shadow: none;
}

.deal-date-input-shell {
    display: flex;
    align-items: center;
    padding: 0 0.1rem;
}

.deal-date-input {
    min-height: 2.5rem;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.deal-date-input:focus {
    box-shadow: none;
}

.deal-time-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    width: 100%;
    padding: 0.35rem 0.5rem;
    color: #111827;
    text-align: left;
}

.work-order-tech-picker-button::after {
    content: none;
}

.work-order-tech-picker-button svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    color: #b45309;
}

.deal-time-trigger strong {
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 850;
    white-space: nowrap;
}

.deal-time-trigger-icon {
    flex: 0 0 auto;
    padding: 0.26rem 0.55rem;
    white-space: nowrap;
}

.deal-time-trigger.is-empty strong {
    color: #64748b;
    font-weight: 750;
}

.deal-time-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    min-height: 1.85rem;
    padding: 0 0.55rem;
    border: 1px solid rgba(217, 119, 31, 0.32);
    border-radius: 999px;
    background: rgba(255, 247, 237, 0.94);
    color: #b45309;
    font-size: 0.76rem;
    font-weight: 900;
}

.deal-quote-wizard {
    display: grid;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 #b89356;
}

.deal-build-mode-row {
    display: grid;
    grid-template-columns: minmax(0, max-content);
}

.deal-build-mode-section {
    padding-top: 0;
}

.deal-toggle-inline-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.7rem;
    align-items: center;
}

.deal-wizard-top-row {
    grid-template-columns: minmax(13rem, max-content) minmax(0, 1fr);
    align-items: end;
}

.deal-wizard-section {
    display: grid;
    gap: 0;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 #b89356;
}

.deal-wizard-section > .deal-field-title,
.deal-build-options-grid > label > .deal-field-title,
.deal-wizard-section > label > .deal-field-title {
    display: flex;
    align-items: center;
    min-height: 25px;
    margin: 0;
    padding: 0.2rem 0.52rem;
    border-bottom: 1px solid #d8c8ad;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    color: #242628;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.deal-wizard-section > .deal-toggle-group {
    padding: 0.42rem 0.52rem;
}

.deal-quote-wizard .deal-toggle-button {
    min-height: 2.1rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
}

.deal-build-options-grid > label,
.deal-wizard-section > label {
    display: grid;
    gap: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 #b89356;
}

.deal-build-options-grid > label .form-control,
.deal-wizard-section > label .form-control {
    min-height: 2.65rem;
    border: 0;
    border-radius: 0;
    background: #fffdf8;
}

.deal-wizard-preview {
    display: grid;
    gap: 0.7rem;
}

.deal-time-modal {
    width: min(420px, 100%);
}

.deal-time-picker-display {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    padding: 0.4rem 0 0.9rem;
}

.deal-time-picker-display strong {
    font-size: 1.7rem;
    font-weight: 950;
    color: #14532d;
}

.deal-time-meridiem-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
}

.deal-time-keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.deal-time-key {
    min-height: 3.5rem;
    border: 1px solid rgba(183, 150, 94, 0.34);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: #92400e;
    font-size: 1.15rem;
    font-weight: 900;
}

.deal-time-key.utility {
    font-size: 0.92rem;
}

.deal-checklist-preview .section-header.compact {
    margin-bottom: 0.55rem;
}

.deal-side-stack {
    display: grid;
    gap: 0.55rem;
    align-self: start;
}

.deal-side-stack textarea {
    min-height: 3.2rem;
    resize: vertical;
}

.deal-side-stack label,
.deal-action-entry label {
    margin-bottom: 0;
}

.compact-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    align-items: end;
}

.deal-action-entry {
    display: grid;
    gap: 0.45rem;
    grid-column: 1 / -1;
}

.compact-inline-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.5rem;
    align-items: center;
}

.action-item-mini-list {
    display: grid;
    gap: 0.35rem;
}

.action-item-mini-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.5rem;
    align-items: center;
    padding: 0.38rem 0.5rem;
    border: 1px solid rgba(31, 122, 61, 0.18);
    border-radius: 8px;
    background: rgba(31, 122, 61, 0.05);
}

.action-item-mini-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-item-mini-row strong {
    color: #92400e;
    font-size: 0.79rem;
    font-weight: 900;
    text-transform: uppercase;
}

.deal-wizard-preview .action-item-mini-row span {
    white-space: normal;
}

.sales-metric-card {
    display: grid;
    gap: 0.08rem;
    min-height: 54px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #fbfcfe;
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.04);
}

.sales-metric-card span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
}

.sales-metric-card strong {
    color: #14532d;
    font-size: 1.22rem;
    font-weight: 950;
    line-height: 1;
}

.section-header.compact {
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
}

.lead-entry-fields,
.deal-entry-fields {
    display: grid;
    gap: .75rem;
}

.sales-filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.sales-filter-panel .form-control {
    flex: 1 1 260px;
    max-width: 520px;
}

.sales-handoff-preview {
    display: grid;
    gap: 0.08rem;
    min-width: min(360px, 100%);
    padding: 0.38rem 0.55rem;
    border: 1px solid rgba(217, 119, 31, 0.35);
    border-radius: 8px;
    background: rgba(217, 119, 31, 0.08);
}

.sales-handoff-preview strong {
    color: #92400e;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.sales-handoff-preview span,
.sales-handoff-preview small {
    color: #4b5563;
}

.deals-page-info-grid {
    gap: 0.5rem;
    padding: 0.55rem;
    border-top: 1px solid rgba(183, 150, 94, 0.24);
    border-bottom: 1px solid rgba(183, 150, 94, 0.24);
    background: rgba(255, 252, 246, 0.58);
}

.deals-page-info-grid > .deal-info-card {
    gap: 0;
    overflow: hidden;
    padding: 0;
    border-color: #d8c8ad;
    background: #fffdf8;
    box-shadow: inset 3px 0 0 rgba(217, 119, 31, 0.22);
}

.deals-page-info-grid > .deal-info-card > strong,
.deals-page-info-grid > .deal-info-card > .secondary-sales-title {
    display: flex;
    align-items: center;
    min-height: 25px;
    margin: 0;
    padding: 0.2rem 0.52rem;
    border-bottom: 1px solid #d8c8ad;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    color: #242628;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.deals-page-info-grid > .deal-info-card > span {
    display: flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 0.4rem 0.52rem;
}

.deals-page-info-grid > .deal-info-card:has(.deal-dashboard-edit-button) > span {
    padding-right: 2.65rem;
}

.deals-page-info-grid > .secondary-sales-card .deal-share-inline-row {
    min-height: 2.2rem;
    margin: 0;
    padding: 0.35rem 0.52rem;
}

.deals-page-edit-panel {
    gap: 0.55rem;
    padding: 0.6rem;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.9);
}

.deals-page-edit-panel .deal-edit-field {
    display: grid;
    gap: 0;
    min-width: 0;
    overflow: hidden;
    margin: 0;
    border: 1px solid #d8c8ad;
    border-radius: 8px;
    background: #fffdf8;
}

.deals-page-edit-panel .deal-edit-field > span {
    display: flex;
    align-items: center;
    min-height: 25px;
    padding: 0.2rem 0.52rem;
    border-bottom: 1px solid #d8c8ad;
    background: linear-gradient(180deg, #f3ead8 0%, #fff4e8 100%);
    color: #242628;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.deals-page-edit-panel .deal-edit-field > .form-control,
.deals-page-edit-panel .deal-edit-field > .form-select {
    border: 0;
    border-radius: 0;
    background: #fffdf8;
    box-shadow: none;
}

.deals-page-editor-modal {
    width: min(46rem, calc(100vw - 2rem));
    max-height: min(86vh, 48rem);
}

.deals-page-editor-modal .deals-page-edit-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.deals-page-editor-modal .deal-edit-field:only-child {
    grid-column: 1 / -1;
}

.deals-page-editor-options {
    padding: 0.5rem;
}

.deals-page-edit-panel .deal-edit-actions {
    grid-column: 1 / -1;
}

.deals-page-actions {
    display: grid;
    grid-template-columns: max-content minmax(22rem, 1fr) max-content max-content;
    align-items: stretch;
    gap: 0.55rem;
    width: 100%;
    margin-top: 0.65rem;
    padding: 0.6rem;
    border-top: 1px solid rgba(183, 150, 94, 0.28);
    background: rgba(255, 252, 246, 0.66);
}

.deals-page-actions > .btn {
    min-height: 100%;
    padding-right: 0.85rem;
    padding-left: 0.85rem;
}

.deals-page-handoff-preview {
    min-width: 0;
    width: 100%;
}

@media (max-width: 900px) {
    .deals-page-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .deals-page-info-grid > .deal-info-card.wide,
    .deals-page-info-grid > .secondary-sales-card {
        grid-column: 1 / -1;
    }

    .deals-page-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .deals-page-handoff-preview {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .deals-page-actions > .btn {
        min-height: 2.55rem;
    }
}

@media (max-width: 560px) {
    .deals-page-info-grid,
    .deals-page-actions {
        grid-template-columns: 1fr;
    }

    .deals-page-info-grid > .deal-info-card,
    .deals-page-info-grid > .deal-info-card.wide,
    .deals-page-info-grid > .secondary-sales-card,
    .deals-page-actions > * {
        grid-column: 1;
    }

    .deals-page-editor-modal .deals-page-edit-panel {
        grid-template-columns: 1fr;
    }
}

.customer-activity-list {
    display: grid;
    gap: 0.35rem;
}

.customer-activity-pill {
    display: grid;
    grid-template-columns: max-content max-content minmax(0, 1fr);
    gap: 0.45rem;
    align-items: center;
    min-height: 34px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fbfcfe;
    color: #1f2937;
    text-decoration: none;
}

.customer-activity-pill:hover {
    border-color: #b7c4d4;
    background: #f8fafc;
    color: #111827;
    text-decoration: none;
}

.customer-activity-pill span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 850;
}

.customer-activity-pill strong {
    color: #14532d;
    font-size: 0.82rem;
}

.customer-activity-pill small {
    min-width: 0;
    overflow: hidden;
    color: #334155;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-list-expand-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    text-align: left;
}

.customer-list-expand-button span {
    display: inline-grid;
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #14532d;
    font-size: 0.8rem;
    font-weight: 900;
}

.customer-list-activity-row td {
    padding: 0.75rem 1rem;
    background: #f8fafc;
}

.nav-brand-lockup {
    position: relative;
    display: block;
    flex: 0 0 230px;
    width: 230px;
    height: 44px;
    overflow: hidden;
    border-radius: 8px;
}

.nav-brand-lockup img {
    position: absolute;
    top: 50%;
    left: 0;
    display: block;
    width: 230px;
    height: auto;
    mix-blend-mode: multiply;
    transform: translateY(-50%);
}

.customer-list-activity {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.customer-list-activity-group {
    display: grid;
    align-content: start;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.55rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #ffffff;
}

.customer-list-activity-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: #111827;
    font-size: 0.86rem;
}

.customer-list-activity-heading span {
    display: inline-grid;
    min-width: 1.45rem;
    height: 1.35rem;
    place-items: center;
    border-radius: 999px;
    background: #f3f4f6;
    color: #14532d;
    font-size: 0.78rem;
    font-weight: 900;
}

.customer-list-activity-muted,
.customer-list-activity-empty {
    color: #64748b;
    font-size: 0.86rem;
}

.customer-list-activity-empty {
    padding: 0.55rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
}

.lead-summary {
    grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 2fr) auto auto;
}

.deal-bar-list .deal-summary {
    grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 2fr) auto auto auto max-content;
}

.compact-bar-action {
    width: 32px;
    height: 32px;
    min-width: 32px;
}

.sales-add-bar {
    width: 100%;
}

.deal-compact-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.deal-equipment-picker {
    padding: 0.55rem;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.72);
}

.deal-equipment-list {
    display: grid;
    gap: 0.35rem;
}

.deal-equipment-card {
    display: grid;
    gap: 0.08rem;
    width: 100%;
    min-height: 40px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    text-align: left;
    position: relative;
}

.deal-equipment-card:hover,
.deal-equipment-card.selected {
    border-color: #1f7a3d;
    background: #ecfdf3;
}

.deal-equipment-card strong,
.deal-equipment-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deal-equipment-selected-badge {
    position: absolute;
    right: 0.45rem;
    top: 0.35rem;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: #1f7a3d;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.deal-quoted-builder {
    padding: 0.55rem;
}

.deal-quoted-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.45rem;
}

.deal-edit-panel,
.customer-activity-grid,
.sales-handoff-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.deal-activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.deal-activity-card {
    align-content: start;
}

.deal-activity-card .section-header.compact {
    margin-bottom: 0.35rem;
}

.deal-activity-card h5 {
    margin: 0;
    font-size: 0.98rem;
}

.deal-edit-actions {
    display: flex;
    align-items: end;
    gap: 0.5rem;
}

.sales-handoff-tag {
    border-color: rgba(217, 119, 6, 0.35);
    background: rgba(217, 119, 6, 0.12);
    color: #92400e;
    font-weight: 800;
}

.sales-handoff-card {
    border-left: 4px solid #d9771f;
}

.calendar-toolbar {
    display: grid;
    gap: 0.85rem;
}

.calendar-month-controls {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: 0.75rem;
    align-items: center;
}

.calendar-month-controls > div {
    display: grid;
    gap: 0.12rem;
    text-align: center;
}

.calendar-filter-row,
.calendar-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: end;
}

.calendar-create-top-row {
    display: grid;
    grid-template-columns: minmax(13rem, 1fr) minmax(8.5rem, 0.65fr) minmax(8.5rem, 0.65fr) minmax(18rem, 1.35fr) max-content;
    gap: 0.55rem;
    align-items: end;
}

.calendar-create-top-row .calendar-description-field {
    grid-column: auto;
}

.calendar-create-trigger-toggle {
    justify-content: center;
    min-height: 2.38rem;
    white-space: nowrap;
}

.calendar-create-choice-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(12rem, 0.75fr);
    gap: 0.55rem;
    align-items: stretch;
}

.calendar-choice-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid #eadfc9;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.68);
}

.calendar-choice-card > span {
    color: #665944;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-choice-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.calendar-choice-bubble {
    min-height: 2rem;
    padding: 0.25rem 0.58rem;
    border: 1px solid #d7c6a5;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #1f2937;
    font-size: 0.8rem;
    font-weight: 850;
}

.calendar-choice-bubble.selected {
    border-color: #d9771f;
    background: #fff3df;
    color: #9a4b12;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 31, 0.28);
}

.calendar-person-field {
    align-self: stretch;
    display: grid;
    align-content: end;
}

.calendar-form-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calendar-description-field {
    grid-column: span 2;
}

.calendar-feed-box {
    display: grid;
    gap: 0.12rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(37, 99, 235, 0.28);
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.08);
}

.calendar-feed-box span {
    overflow-wrap: anywhere;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 750;
}

.calendar-create-panel,
.calendar-job-trigger-panel {
    display: grid;
    gap: 0.85rem;
}

.calendar-service-trigger-row {
    display: grid;
    grid-template-columns: max-content minmax(16rem, 1fr) minmax(9rem, 0.7fr) minmax(7rem, 0.42fr);
    gap: 0.55rem;
    align-items: stretch;
}

.calendar-service-trigger-row .compact-toggle {
    align-self: stretch;
    display: inline-flex;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.35rem 0.55rem;
}

.calendar-grower-trigger-field {
    min-width: 0;
}

.calendar-company-customer-chip {
    display: grid;
    gap: 0.05rem;
    align-content: center;
    min-height: 2.35rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid #d7c6a5;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.calendar-company-customer-chip span {
    color: #665944;
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
}

.calendar-company-customer-chip strong {
    min-width: 0;
    overflow: hidden;
    color: #1f2937;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-service-trigger-note {
    color: #665944;
    font-size: 0.78rem;
    font-weight: 750;
}

.calendar-trigger-builder {
    display: grid;
    gap: 0.55rem;
    padding: 0.65rem;
    border: 1px solid #eadfc9;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.66);
}

.calendar-trigger-add-row {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) minmax(9rem, 0.7fr) minmax(7rem, 0.5fr) max-content;
    gap: 0.5rem;
    align-items: stretch;
}

.calendar-trigger-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.calendar-trigger-chip {
    display: inline-grid;
    grid-template-columns: minmax(0, auto) auto max-content;
    gap: 0.45rem;
    align-items: center;
    max-width: 100%;
    padding: 0.35rem 0.45rem 0.35rem 0.6rem;
    border: 1px solid #d7c6a5;
    border-radius: 999px;
    background: #fffaf0;
}

.calendar-trigger-chip strong {
    min-width: 0;
    overflow: hidden;
    color: #1f7a3a;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-trigger-chip span {
    color: #665944;
    font-size: 0.76rem;
    font-weight: 750;
}

.calendar-customer-picker {
    min-width: 0;
}

.calendar-customer-picker .customer-picker-list {
    max-height: 15rem;
    overflow-y: auto;
}

.calendar-action-builder {
    padding: 0.65rem;
    border: 1px solid #eadfc9;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.66);
}

.calendar-new-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 11rem max-content;
    gap: 0.5rem;
    align-items: stretch;
}

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.75fr);
    gap: 1rem;
    align-items: start;
}

.calendar-event-list-card {
    min-width: 0;
    overflow: hidden;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 1px solid #d7c6a5;
    border-radius: 10px;
    overflow: hidden;
}

.calendar-day-header {
    padding: 0.45rem 0.55rem;
    border-right: 1px solid #d7c6a5;
    border-bottom: 1px solid #d7c6a5;
    background: rgba(184, 147, 86, 0.14);
    color: #5f4421;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-day {
    display: grid;
    align-content: start;
    gap: 0.28rem;
    min-height: 112px;
    padding: 0.4rem;
    border-right: 1px solid #eadfc9;
    border-bottom: 1px solid #eadfc9;
    background: rgba(255, 255, 255, 0.7);
}

.calendar-day.muted {
    background: rgba(255, 255, 255, 0.35);
    color: #94a3b8;
}

.calendar-day.today {
    box-shadow: inset 0 3px 0 #d9771f;
}

.calendar-day-date {
    color: #665944;
    font-size: 0.78rem;
    font-weight: 900;
}

.calendar-item {
    display: grid;
    gap: 0.05rem;
    width: 100%;
    min-height: 30px;
    padding: 0.25rem 0.35rem;
    border: 1px solid #b7c4d4;
    border-radius: 7px;
    background: #f8fafc;
    color: #1f2937;
    text-align: left;
}

.calendar-item strong,
.calendar-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-item strong {
    font-size: 0.72rem;
}

.calendar-item span {
    color: #64748b;
    font-size: 0.66rem;
}

.calendar-item.job-source {
    border-color: #2563eb;
    background: #dbeafe;
    box-shadow: inset 3px 0 0 #2563eb;
}

.calendar-item.ready-job {
    border-color: #2563eb;
    background: #dbeafe;
    box-shadow: inset 3px 0 0 #2563eb;
}

.calendar-item.work-order-item {
    border-color: #15803d;
    background: #dcfce7;
    box-shadow: inset 3px 0 0 #16a34a;
}

.calendar-item.subset {
    border-color: #d9771f;
    background: #ffedd5;
    box-shadow: inset 3px 0 0 #f97316;
}

.calendar-item.subset.complete {
    border-color: #16a34a;
    background: #dcfce7;
    text-decoration: line-through;
}

.calendar-event-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: end;
}

.calendar-event-summary-meta span {
    padding: 0.14rem 0.45rem;
    border: 1px solid #d7c6a5;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    color: #4b5563;
    font-size: 0.72rem;
    font-weight: 850;
}

.calendar-event-card.calendar-job-source {
    border-color: #2563eb;
}

.calendar-event-details {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
    overflow: hidden;
}

.calendar-event-edit-panel {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid #eadfc9;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.56);
}

.calendar-event-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.55rem;
    align-items: end;
}

.calendar-event-edit-grid > label {
    min-width: 0;
}

.calendar-event-edit-grid .form-control,
.calendar-event-edit-grid .form-select,
.calendar-trigger-add-row .form-control,
.calendar-trigger-add-row .form-select,
.calendar-prep-add-row .form-control,
.calendar-prep-edit-row .form-control {
    min-width: 0;
    width: 100%;
}

.calendar-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.calendar-detail-grid > div {
    display: grid;
    gap: 0.1rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #eadfc9;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.calendar-detail-grid strong {
    color: #665944;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.calendar-prep-section {
    display: grid;
    gap: 0.5rem;
}

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

.calendar-prep-edit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 11rem max-content max-content;
    gap: 0.45rem;
    align-items: center;
    padding: 0.45rem;
    border: 1px solid #d7c6a5;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.calendar-prep-edit-actions {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
}

.calendar-prep-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 11rem max-content max-content;
    gap: 0.45rem;
    align-items: center;
}

.calendar-prep-reset-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.35rem 0.55rem;
    border: 1px solid #d7c6a5;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    font-weight: 850;
    white-space: nowrap;
}

.calendar-event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.customer-activity-grid .job-detail-card {
    gap: 0.32rem;
}

@media (max-width: 800px) {
    .job-details-panel {
        overflow: hidden;
    }

    .job-details-panel .job-detail-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.5rem;
    }

    .job-details-panel .job-detail-grid > div:not(.job-inline-editor) {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        width: 100%;
        min-width: 0;
    }

    .job-detail-actions-card,
    .job-detail-notes-card {
        grid-template-columns: minmax(0, 1fr) auto !important;
    }

    .job-detail-status-card,
    .job-detail-tech-card {
        grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr) !important;
    }

    .job-detail-grid .editable-field {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .job-detail-grid .job-action-card-list,
    .job-note-list,
    .job-inline-editor {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
    }

    .job-details-panel .job-action-row {
        grid-template-columns: minmax(0, 1fr) 32px;
    }

    .job-details-panel .job-action-card {
        grid-template-columns: max-content minmax(0, 1fr);
        min-width: 0;
    }

    .job-details-panel .job-action-card span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .job-details-panel .job-note-card {
        grid-template-columns: minmax(0, 1fr) 32px;
    }

    .job-details-panel .expandable-actions {
        margin-top: 0.55rem;
    }

    .sales-dashboard-grid,
    .deal-entry-grid,
    .lead-entry-grid,
    .deal-edit-panel,
    .deal-activity-grid,
    .customer-activity-grid,
    .sales-handoff-detail-grid {
        grid-template-columns: 1fr;
    }

    .deal-bar-list .deal-summary {
        grid-template-columns: minmax(0, 1fr) auto auto max-content;
        gap: 0.18rem 0.32rem;
        min-height: 46px;
        padding: 0.28rem 0.36rem;
    }

    .deal-bar-list .deal-summary .expandable-primary {
        min-width: 0;
        overflow: hidden;
        color: #15803d;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .deal-bar-list .deal-summary .job-status-count:nth-of-type(2) {
        display: none;
    }

    .deal-create-top-grid,
    .deal-build-options-grid,
    .deal-compact-fields,
    .deal-quoted-add-row,
    .deal-tab-form-grid,
    .deal-build-add-row,
    .compact-form-grid,
    .deal-toggle-grid,
    .sales-mode-create-panel .deal-entry-grid,
    .deal-target-row,
    .deal-toggle-inline-row,
    .compact-inline-entry,
    .action-item-mini-row,
    .calendar-layout,
    .calendar-create-top-row,
    .calendar-create-choice-row,
    .calendar-service-trigger-row,
    .calendar-trigger-add-row,
    .calendar-filter-row,
    .calendar-form-grid,
    .calendar-form-grid.compact,
    .calendar-event-edit-grid,
    .calendar-new-action-row,
    .calendar-detail-grid,
    .calendar-prep-edit-row,
    .calendar-prep-add-row {
        grid-template-columns: 1fr;
    }

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

    .calendar-prep-edit-actions {
        justify-content: stretch;
    }

    .calendar-prep-edit-actions .btn {
        flex: 1 1 0;
    }

    .calendar-trigger-chip {
        grid-template-columns: minmax(0, 1fr) auto;
        border-radius: 8px;
    }

    .calendar-trigger-chip .btn {
        grid-column: 1 / -1;
    }

    .calendar-month-controls {
        grid-template-columns: max-content minmax(0, 1fr) max-content;
    }

    .calendar-grid {
        display: flex;
        gap: 0.55rem;
        overflow-x: auto;
        border: 0;
        border-radius: 0;
        padding-bottom: 0.35rem;
        scroll-snap-type: x mandatory;
    }

    .calendar-day-header {
        display: none;
    }

    .calendar-day {
        flex: 0 0 74%;
        min-height: 150px;
        border: 1px solid #eadfc9;
        border-radius: 10px;
        scroll-snap-align: start;
    }

    .calendar-day.muted {
        display: none;
    }

    .calendar-description-field {
        grid-column: auto;
    }

    .lead-summary {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .lead-summary .expandable-description {
        grid-column: 1 / -1;
    }

    .deal-bar-list .deal-summary .expandable-description {
        grid-column: 1 / -1;
        font-size: 0.78rem;
        line-height: 1.05;
    }

    .sales-dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-dashboard-panel .section-header.compact {
        display: flex;
        grid-template-columns: none;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        min-height: 34px;
        margin-bottom: 0.45rem;
    }

    .sales-dashboard-panel .section-header.compact .btn {
        width: min(10rem, 48%);
        min-width: 0;
        min-height: 32px;
        padding: 0.28rem 0.58rem;
        font-size: 0.78rem;
    }

    .sales-dashboard-panel .section-header.compact h5 {
        min-width: 0;
        font-size: 0.92rem;
    }

    .sales-dashboard-panel .expandable-actions {
        flex-direction: row;
        gap: 0.35rem;
    }

    .sales-dashboard-panel .expandable-actions .btn {
        width: auto;
        flex: 1 1 0;
        min-width: 0;
        padding: 0.34rem 0.45rem;
        font-size: 0.78rem;
    }

    .sales-filter-panel {
        display: grid;
        grid-template-columns: 1fr;
    }

    .sales-filter-panel .form-control {
        max-width: none;
    }

    .customer-activity-pill {
        grid-template-columns: max-content minmax(0, 1fr);
    }

    .customer-activity-pill small {
        grid-column: 1 / -1;
    }
}

/* PM Brand: Field Console presentation */
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) body,
.theme-pm-brand.page {
    background: var(--pm-brand-page);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
    border-color: #292522;
    background: var(--pm-brand-charcoal);
    box-shadow: 0 5px 14px rgba(32, 28, 25, 0.2);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-brand-lockup {
    background: transparent;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-brand-lockup img {
    width: 230px;
    height: 44px;
    object-fit: cover;
    object-position: center;
    content: url("/images/serviceops-horizontal-dark-v1.png");
    mix-blend-mode: normal;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-label,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-more-summary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-utility-label {
    color: var(--pm-brand-surface);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-icon {
    color: var(--pm-brand-surface);
    stroke: currentColor;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-more-summary:hover {
    border-color: transparent;
    background: rgba(251, 247, 239, 0.08);
    color: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active {
    border-color: transparent;
    background: rgba(217, 122, 32, 0.11);
    color: #ffffff;
    box-shadow: inset 0 -3px 0 var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active .nav-icon,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active .nav-label {
    color: var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-more-menu {
    border-color: var(--pm-brand-border);
    background: var(--pm-brand-surface);
    box-shadow: 0 12px 28px rgba(32, 28, 25, 0.22);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-more-menu .nav-menu-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-more-menu .nav-icon {
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-more-menu .nav-menu-link:hover {
    border-color: transparent;
    background: var(--pm-brand-green-soft);
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .app-modal-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .identity-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-entry-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .settings-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table-wrapper,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .add-record-panel {
    border-color: rgba(205, 183, 154, 0.82);
    border-radius: 6px;
    background: var(--pm-brand-surface);
    box-shadow: 0 3px 10px rgba(58, 52, 47, 0.08);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-header {
    margin-bottom: 0.7rem;
    padding-bottom: 0.38rem;
    border-bottom: 1px solid rgba(205, 183, 154, 0.52);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-section-title {
    gap: 0.55rem;
    color: var(--pm-brand-charcoal);
    font-size: 1.02rem;
    letter-spacing: 0;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-section-title::before {
    width: 4px;
    height: 1.28em;
    border-radius: 2px;
    background: var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-card {
    min-height: 62px;
    padding: 0.75rem 1rem !important;
    border-left: 4px solid var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-info strong {
    color: var(--pm-brand-charcoal);
    font-size: 0.96rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-info span {
    color: #6c6259 !important;
    font-size: 0.82rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-active strong {
    color: var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .add-job-bar {
    min-height: 38px;
    border-radius: 5px;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-item {
    border-color: rgba(205, 183, 154, 0.8);
    border-radius: 5px;
    background: #fffdf8;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-summary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-summary {
    background: #fffdf8;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-summary:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-summary:hover {
    background: #f7f1e8;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-primary {
    color: var(--pm-brand-green);
    font-weight: 900;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-description {
    color: #555d66;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-status-count {
    border: 1px solid rgba(205, 183, 154, 0.45);
    background: var(--pm-brand-muted);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-control,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-select {
    border-radius: 5px;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-primary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-success,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-start {
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-queue-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-work-orders-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table th {
    background: #eee7dc;
    color: var(--pm-brand-charcoal);
}

@media (max-width: 900px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
        box-shadow: 0 4px 12px rgba(32, 28, 25, 0.2);
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active {
        background: rgba(217, 122, 32, 0.13);
        box-shadow: inset 0 -3px 0 var(--pm-brand-orange);
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-card {
        min-height: 54px;
        padding: 0.55rem 0.65rem !important;
    }
}

/* Field Console definitive theme layer. Keep this last so legacy theme rules cannot win. */
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) {
    --pm-brand-charcoal: #292622;
    --pm-brand-charcoal-deep: #201e1b;
    --pm-brand-green: #2e5a36;
    --pm-brand-green-dark: #214329;
    --pm-brand-orange: #d97a20;
    --pm-brand-orange-dark: #a85312;
    --pm-brand-sand: #cdb79a;
    --pm-brand-border: #dfd2c0;
    --pm-brand-page: #f7f6f2;
    --pm-brand-surface: #ffffff;
    --pm-brand-row: #fffefa;
    --pm-brand-muted: #f3eee6;
    color: #302d29;
    font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand),
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) body,
.theme-pm-brand.page,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) main,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content {
    background: var(--pm-brand-page);
    color: #302d29;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
    width: 100%;
    min-height: 78px;
    margin: 0;
    padding: 0.62rem 1.25rem !important;
    gap: 0.55rem;
    border: 0;
    border-radius: 0;
    background: linear-gradient(90deg, var(--pm-brand-charcoal-deep), var(--pm-brand-charcoal));
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-brand-lockup {
    width: 230px;
    height: 48px;
    margin-right: 1.3rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-brand-lockup img {
    width: 230px;
    height: 48px;
    object-fit: cover;
    object-position: center;
    content: url("/images/serviceops-horizontal-dark-v1.png");
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-more-summary {
    min-height: 52px;
    padding: 0.42rem 0.82rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #f8f5ef;
    box-shadow: none;
    font-weight: 700;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-icon,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-label,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-utility-label {
    color: #f8f5ef;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-more-summary:hover {
    border: 0;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active {
    border: 0;
    background: transparent;
    color: #ffffff;
    box-shadow: inset 0 -4px 0 var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active .nav-icon {
    color: var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active .nav-label {
    color: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-more-menu {
    border: 1px solid var(--pm-brand-border);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(32, 30, 27, 0.2);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-more-menu .nav-menu-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-more-menu .nav-icon {
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-more-menu .nav-menu-link:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav-more-menu .nav-menu-link.active {
    border-color: transparent;
    background: #edf3ed;
    color: var(--pm-brand-green-dark);
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content {
    padding-top: 1rem;
    padding-bottom: 1.25rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content > h1:first-child {
    margin: 0 0 0.9rem;
    padding: 0.32rem 0.75rem 0.38rem;
    border: 0;
    border-left: 4px solid var(--pm-brand-orange);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--pm-brand-charcoal);
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 800;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content > h1:first-child::after {
    display: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .app-modal-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .identity-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-entry-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-action-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-action-add-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-source-notes,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-entry-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-entry-group,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-entry-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-part-list-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .settings-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .accounting-choice-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table-wrapper,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-calendar-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .add-record-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .customer-picker,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .part-picker,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-count,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-icon-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-small-link,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-link {
    border: 1px solid var(--pm-brand-border);
    border-radius: 6px;
    background: var(--pm-brand-surface);
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-header {
    margin-bottom: 0.55rem;
    padding-bottom: 0.34rem;
    border-bottom: 1px solid #e8ded0;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-section-title,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-header h2,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-header h3,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-header h4,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .section-header h5 {
    color: var(--pm-brand-charcoal);
    font-family: inherit;
    font-weight: 800;
    letter-spacing: 0;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-section-title::before {
    width: 4px;
    height: 1.28em;
    border-radius: 2px;
    background: var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-item,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-summary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-summary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-detail-tile,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-note-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-used-row {
    border-color: var(--pm-brand-border);
    border-radius: 5px;
    background: var(--pm-brand-row);
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-summary:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .entity-bar-summary:hover {
    background: #f7f2ea;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-primary {
    color: var(--pm-brand-green);
    font-weight: 800;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-card {
    min-height: 62px;
    padding: 0.7rem 1rem !important;
    border: 1px solid var(--pm-brand-border);
    border-left: 4px solid var(--pm-brand-green);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .add-job-bar {
    min-height: 38px;
    border-radius: 5px;
    background: var(--pm-brand-green);
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-control,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-select {
    border-radius: 5px;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-primary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-success,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-info,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-start {
    border-color: var(--pm-brand-green);
    background: var(--pm-brand-green);
    color: #ffffff;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-primary:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-success:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-info:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-start:hover {
    border-color: var(--pm-brand-green-dark);
    background: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-secondary,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .btn-outline-dark,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-link {
    border-color: #cdbda7;
    background: #ffffff;
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-control,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-select,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) textarea {
    border-color: #d5c5b0;
    background: #ffffff;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-control:focus,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .form-select:focus,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) textarea:focus {
    border-color: var(--pm-brand-green);
    box-shadow: 0 0 0 2px rgba(46, 90, 54, 0.12);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-queue-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-work-orders-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .accounting-queue-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-entry-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-used-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table {
    border-color: var(--pm-brand-border);
    background: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-queue-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .dashboard-work-orders-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .accounting-queue-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-entry-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .parts-used-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-orders-table th,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-table th {
    background: var(--pm-brand-muted);
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .bottom-preference-actions {
    border: 1px solid var(--pm-brand-border);
    border-radius: 5px;
    background: #ffffff;
    box-shadow: none;
    backdrop-filter: none;
}

@media (max-width: 900px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sidebar {
        position: static;
        background: var(--pm-brand-page);
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
        min-height: auto;
        margin: 0.6rem;
        width: calc(100% - 1.2rem);
        padding: 0.45rem !important;
        border: 1px solid #d7c9b6;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: none;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-more-summary {
        min-height: 48px;
        padding: 0.35rem;
        border-radius: 6px;
        color: var(--pm-brand-charcoal);
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-icon,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-label,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-utility-label {
        color: var(--pm-brand-charcoal);
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav .nav-link.active {
        background: #fff4e8;
        box-shadow: inset 0 -3px 0 var(--pm-brand-orange);
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content {
        padding-top: 0.55rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .time-clock-dashboard-card {
        min-height: 54px;
        padding: 0.5rem 0.65rem !important;
    }
}

/* Match the desktop command bar to the baked charcoal edge of the reversed logo. */
@media (min-width: 901px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sidebar,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
        background: #34302c;
    }
}

/* Calendar date ranges: show long programs as continuous weekly bands. */
.calendar-grid-desktop {
    display: block;
}

.calendar-grid-mobile {
    display: none;
}

.calendar-day-headers,
.calendar-week-days,
.calendar-range-layer {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-week {
    position: relative;
    --calendar-range-lanes: 0;
}

.calendar-week-days .calendar-day {
    position: relative;
    min-width: 0;
    min-height: 112px;
    padding-top: calc(1.9rem + (var(--calendar-range-lanes) * 29px));
}

.calendar-week-days .calendar-day-date {
    position: absolute;
    top: 0.4rem;
    left: 0.45rem;
}

.calendar-range-layer {
    position: absolute;
    z-index: 3;
    top: 1.75rem;
    right: 0;
    left: 0;
    grid-auto-rows: 25px;
    row-gap: 4px;
    pointer-events: none;
}

.calendar-range-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    margin: 0 0.22rem;
    padding: 0.16rem 0.55rem;
    overflow: hidden;
    border: 1px solid #3d7048;
    border-radius: 5px;
    background: #e8f0e8;
    color: #23452a;
    text-align: left;
    pointer-events: auto;
}

.calendar-range-item strong,
.calendar-range-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-range-item strong {
    flex: 0 1 auto;
    font-size: 0.72rem;
    font-weight: 850;
}

.calendar-range-item span {
    flex: 0 1 auto;
    color: #5e6c60;
    font-size: 0.64rem;
}

.calendar-range-item:hover {
    border-color: #275332;
    background: #dce9dc;
}

.calendar-range-item.sales-program {
    border-color: #d97a20;
    background: #fff0df;
    color: #694018;
    box-shadow: inset 4px 0 0 #d97a20;
}

.calendar-range-item.job-source {
    border-color: #2563eb;
    background: #dbeafe;
    color: #1e3a8a;
    box-shadow: inset 4px 0 0 #2563eb;
}

.calendar-range-item.continues-before {
    margin-left: 0;
    border-left-width: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.calendar-range-item.continues-after {
    margin-right: 0;
    border-right-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.calendar-item.range-summary {
    border-color: #d97a20;
    background: #fff0df;
    box-shadow: inset 3px 0 0 #d97a20;
}

@media (max-width: 900px) {
    .calendar-grid-desktop {
        display: none;
    }

    .calendar-grid-mobile {
        display: flex;
    }
}

html[data-view-mode="mobile"] .calendar-grid-desktop {
    display: none;
}

html[data-view-mode="mobile"] .calendar-grid-mobile {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
}

html[data-view-mode="mobile"] .calendar-grid-mobile .calendar-day {
    flex: 0 0 74%;
    min-height: 150px;
    border: 1px solid #eadfc9;
    border-radius: 8px;
    scroll-snap-align: start;
}

html[data-view-mode="mobile"] .calendar-grid-mobile .calendar-day.muted {
    display: none;
}

html[data-view-mode="desktop"] .calendar-grid-desktop {
    display: block;
}

html[data-view-mode="desktop"] .calendar-grid-mobile {
    display: none;
}

html[data-view-mode="desktop"] .calendar-day-headers,
html[data-view-mode="desktop"] .calendar-week-days,
html[data-view-mode="desktop"] .calendar-range-layer {
    display: grid;
}

html[data-view-mode="desktop"] .calendar-day-header {
    display: block;
}

html[data-view-mode="desktop"] .calendar-week-days .calendar-day {
    display: grid;
    flex: initial;
    min-height: 112px;
    border-radius: 0;
    scroll-snap-align: none;
}

/* Field Console expanded panels: jobs, deals, and work orders. */
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-details,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-details-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-deal-dashboard-details {
    padding: 0.62rem;
    border-top: 1px solid var(--pm-brand-border);
    background: #f7f6f2;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-grid > div:not(.job-inline-editor),
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-deal-dashboard-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-info-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-share-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-details-panel .work-order-detail-tile {
    border: 1px solid var(--pm-brand-border);
    border-radius: 6px;
    background: var(--pm-brand-surface);
    box-shadow: inset 3px 0 0 var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-grid > div:not(.job-inline-editor),
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-deal-dashboard-card {
    padding: 0.42rem 0.52rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-grid > div:not(.job-inline-editor) > strong,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-heading strong,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-info-card strong {
    color: #62584f;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-heading {
    min-height: 25px;
    margin: -0.42rem -0.52rem 0.35rem;
    padding: 0.22rem 0.48rem;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-muted);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-grid .editable-field,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-detail-button,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-inline-button {
    color: var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-icon-button,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .icon-edit-button,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-dashboard-edit-button {
    border-color: var(--pm-brand-border);
    border-radius: 5px;
    background: #fffefa;
    color: var(--pm-brand-green);
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-icon-button:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .icon-edit-button:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-dashboard-edit-button:hover {
    border-color: var(--pm-brand-green);
    background: #e8f0e8;
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-note-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-action-toggle {
    border-color: var(--pm-brand-border);
    border-radius: 5px;
    background: #fffefa;
    color: var(--pm-brand-charcoal);
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-card:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-action-toggle:hover {
    border-color: #a9b9a9;
    background: #f0f5f0;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-card.selected,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-action-toggle.selected,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-preview-pill.done {
    border-color: var(--pm-brand-green);
    background: #e4eee5;
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-type,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-preview-pill,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-share-pill {
    border-color: var(--pm-brand-border);
    background: #fffefa;
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-action-type.selected {
    border-color: var(--pm-brand-green);
    background: #e4eee5;
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-details-panel .work-order-detail-tile {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(32px, 1fr);
    gap: 0;
    padding: 0;
    overflow: hidden;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-details-panel .work-order-detail-label {
    min-height: 23px;
    padding: 0.17rem 0.48rem;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-muted);
    color: var(--pm-brand-charcoal);
    font-size: 0.68rem;
    font-weight: 850;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-details-panel .work-order-detail-value,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-details-panel .work-order-detail-button,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-details-panel .work-order-value-picker-button,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-details-panel .priority-inline-edit {
    min-height: 32px;
    padding: 0.28rem 0.48rem;
    background: var(--pm-brand-surface);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-inline-editor,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-detail-tile .job-inline-editor,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-edit-panel {
    border-color: var(--pm-brand-border);
    border-radius: 5px;
    background: #fbfaf7;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-inline-editor .form-control,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-inline-editor .form-select,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-dashboard-edit-control {
    border-color: #cdbb9f;
    background: #ffffff;
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-info-card {
    padding: 0;
    gap: 0;
    overflow: hidden;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-info-card strong {
    display: flex;
    align-items: center;
    min-height: 23px;
    padding: 0.17rem 0.48rem;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-muted);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-info-card > span {
    min-height: 32px;
    padding: 0.32rem 0.5rem;
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-deal-dashboard-card.action-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-deal-dashboard-card.note-card {
    align-content: start;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-deal-dashboard-actions {
    padding: 0.45rem 0.58rem 0.55rem;
    border-top-color: var(--pm-brand-border);
    background: #f7f6f2;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .icon-danger-button {
    border-radius: 5px;
    background: #fffafa;
}

@media (max-width: 700px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .expandable-details,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .work-order-details-panel,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-deal-dashboard-details {
        padding: 0.48rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-grid > div:not(.job-inline-editor),
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-deal-dashboard-card {
        padding: 0.38rem 0.46rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-detail-heading {
        margin: -0.38rem -0.46rem 0.32rem;
    }
}

/* Work order record page: current PM ServiceOps workspace treatment. */
.work-order-page {
    display: grid;
    gap: 0;
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
}

.work-order-page-loading {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-height: 150px;
    padding: 1.2rem;
    border: 1px solid var(--pm-brand-border, #cdb79a);
    border-radius: 10px;
    background: var(--pm-brand-surface, #fbf7ef);
}

.work-order-page-loading > div {
    display: grid;
    gap: 0.15rem;
}

.work-order-page-loading strong {
    color: var(--pm-brand-charcoal, #3a342f);
    font-size: 1rem;
}

.work-order-page-loading span:last-child {
    color: #6f675f;
    font-size: 0.86rem;
}

.work-order-loading-mark {
    width: 34px;
    height: 34px;
    border: 3px solid #d9cdbd;
    border-top-color: var(--pm-brand-orange, #d97a20);
    border-radius: 999px;
    animation: work-order-loading-spin 0.8s linear infinite;
}

@keyframes work-order-loading-spin {
    to { transform: rotate(360deg); }
}

.work-order-page-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 128px;
    margin-bottom: 0.8rem;
    padding: 1.35rem 1.5rem;
    overflow: hidden;
    border-radius: 12px;
    background:
        radial-gradient(circle at 78% 0%, rgba(217, 122, 32, 0.18), transparent 34%),
        linear-gradient(135deg, #25231f 0%, #34302b 100%);
    color: #ffffff;
    box-shadow: inset 0 4px 0 var(--pm-brand-orange, #d97a20), 0 10px 28px rgba(42, 37, 31, 0.12);
}

.work-order-page-hero::after {
    content: "";
    position: absolute;
    right: -45px;
    bottom: -80px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.025), 0 0 0 68px rgba(255, 255, 255, 0.018);
    pointer-events: none;
}

.work-order-page-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.work-order-page-kicker {
    display: block;
    margin-bottom: 0.35rem;
    color: #e9a35f;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.work-order-page-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.work-order-page-title-row h1 {
    margin: 0 0.35rem 0 0;
    color: #ffffff;
    font-size: clamp(1.65rem, 2.4vw, 2.45rem);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.work-order-record-status {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0.25rem 0.62rem;
    border: 1px solid rgba(169, 210, 177, 0.35);
    border-radius: 999px;
    background: rgba(70, 127, 81, 0.22);
    color: #d9f0dd;
    font-size: 0.74rem;
    font-weight: 850;
}

.work-order-page-title-row .priority-badge {
    min-width: auto;
    min-height: 25px;
    padding: 0.25rem 0.62rem;
    font-size: 0.74rem;
}

.work-order-page-hero-copy p {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.6rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    font-weight: 650;
}

.work-order-page-hero-copy p span:first-child {
    color: #ffffff;
    font-weight: 800;
}

.work-order-page-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 0 0 auto;
}

.work-order-page-hero-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-height: 42px;
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 850;
}

.work-order-hero-back {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.work-order-hero-back:hover {
    border-color: rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.work-order-hero-save {
    border: 1px solid #e48a37;
    background: var(--pm-brand-orange, #d97a20);
    color: #ffffff;
    box-shadow: 0 7px 18px rgba(155, 77, 15, 0.28);
}

.work-order-hero-save:hover {
    border-color: #ef9c4d;
    background: #e3832b;
    color: #ffffff;
}

.work-order-overview-card {
    padding: 0.9rem;
    border: 1px solid var(--pm-brand-border, #cdb79a);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(65, 55, 42, 0.055);
}

.work-order-overview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.72rem;
}

.work-order-overview-heading > div {
    display: grid;
    gap: 0.05rem;
}

.work-order-overview-heading > div > span {
    color: var(--pm-brand-orange-dark, #a85312);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.work-order-overview-heading strong {
    color: var(--pm-brand-charcoal, #3a342f);
    font-size: 1rem;
    font-weight: 850;
}

.work-order-overview-updated {
    color: #756b61;
    font-size: 0.76rem;
    font-weight: 700;
}

.work-order-page .work-order-top-info-grid {
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 0.55rem;
}

.work-order-page .work-order-top-info-grid .work-order-detail-tile {
    grid-column: span 2;
    min-height: 64px;
    border-color: #ded2c1;
    border-radius: 6px;
    background: #fffefa;
    box-shadow: inset 3px 0 0 #b8aa97;
}

.work-order-page .work-order-top-info-grid .work-order-detail-tile.equipment {
    grid-column: span 3;
}

.work-order-page .work-order-top-info-grid .work-order-detail-tile:nth-child(5) {
    grid-column: span 3;
}

.work-order-page .work-order-top-info-grid .work-order-detail-label,
.work-order-page .work-order-field-header {
    border-bottom-color: #ded2c1;
    background: var(--pm-brand-muted, #f2ede4);
    color: #5e554d;
    letter-spacing: 0.045em;
}

.work-order-page .work-order-top-info-grid .work-order-detail-value {
    padding: 0.42rem 0.55rem;
    color: var(--pm-brand-charcoal, #3a342f);
    font-size: 0.84rem;
}

.work-order-page .work-order-top-actions {
    gap: 0.5rem;
    margin-top: 0.8rem !important;
    padding-top: 0.8rem;
    border-top-color: #e5ddd2;
}

.work-order-page .work-order-top-actions .work-order-detail-action {
    min-height: 38px;
    border-radius: 6px;
    box-shadow: none;
}

.work-order-page .work-order-folder-tabs {
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem !important;
    padding: 0.38rem;
    border: 1px solid var(--pm-brand-border, #cdb79a);
    border-radius: 8px;
    background: var(--pm-brand-muted, #f2ede4);
}

.work-order-page .work-order-folder-tab,
.work-order-page .work-order-add-tab {
    min-height: 36px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    box-shadow: none;
}

.work-order-page .work-order-folder-tab {
    padding: 0.42rem 0.82rem;
    color: #62584f;
}

.work-order-page .work-order-folder-tab:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--pm-brand-green-dark, #214329);
}

.work-order-page .work-order-folder-tab.active,
.work-order-page .work-order-folder-tab.sales.active,
.work-order-page .work-order-folder-tab.inspection.active {
    min-height: 36px;
    border-color: #b9c9ba;
    background: #ffffff;
    color: var(--pm-brand-green-dark, #214329);
    box-shadow: inset 0 -3px 0 var(--pm-brand-green, #2e5a36), 0 2px 6px rgba(44, 58, 45, 0.08);
}

.work-order-page .work-order-add-tab {
    width: 36px;
    color: var(--pm-brand-orange-dark, #a85312);
    font-size: 1.1rem;
}

.work-order-page .work-order-add-tab:hover {
    border-color: #dfc3a1;
    background: #fff7ed;
}

.work-order-page .work-order-collapsible-section,
.work-order-page .work-order-tab-panel {
    padding: 0.75rem !important;
    border: 1px solid var(--pm-brand-border, #cdb79a);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(65, 55, 42, 0.045);
}

.work-order-page .work-order-collapsible-section > .work-order-section-heading {
    min-height: 44px;
    margin: -0.75rem -0.75rem 0;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--pm-brand-border, #cdb79a);
    border-radius: 8px 8px 0 0;
    background: linear-gradient(90deg, #f3eee5 0%, #faf8f3 72%, #ffffff 100%);
    box-shadow: inset 4px 0 0 var(--pm-brand-orange, #d97a20);
}

.work-order-page .work-order-collapsible-section[open] > .work-order-section-heading {
    margin-bottom: 0.75rem;
}

.work-order-page .work-order-section-heading h4 {
    color: var(--pm-brand-charcoal, #3a342f);
    font-size: 0.95rem;
    letter-spacing: 0;
}

.work-order-page .work-order-info-grid {
    gap: 0.6rem;
}

.work-order-page .work-order-field-card,
.work-order-page .work-order-note-panel,
.work-order-page .work-order-action-section {
    border-color: #ded2c1;
    border-radius: 6px;
    background: #fffefa;
    box-shadow: none;
}

.work-order-page .work-order-note-summary {
    min-height: 42px;
}

.work-order-page .work-order-bottom-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--pm-brand-border, #cdb79a);
    border-radius: 8px;
    background: var(--pm-brand-muted, #f2ede4);
    box-shadow: none;
}

.work-order-page .work-order-bottom-actions .btn {
    margin: 0 !important;
}

@media (max-width: 1200px) {
    .work-order-page .work-order-top-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }

    .work-order-page .work-order-top-info-grid .work-order-detail-tile,
    .work-order-page .work-order-top-info-grid .work-order-detail-tile.equipment,
    .work-order-page .work-order-top-info-grid .work-order-detail-tile:nth-child(5) {
        grid-column: auto;
    }
}

@media (max-width: 700px) {
    .work-order-page-hero {
        display: grid;
        min-height: 0;
        padding: 1.1rem;
        border-radius: 9px;
    }

    .work-order-page-title-row h1 {
        flex-basis: 100%;
        font-size: 1.55rem;
    }

    .work-order-page-hero-copy p span[aria-hidden="true"] {
        display: none;
    }

    .work-order-page-hero-copy p {
        display: grid;
        gap: 0.15rem;
    }

    .work-order-page-hero-actions {
        width: 100%;
    }

    .work-order-page-hero-actions .btn {
        flex: 1 1 0;
    }

    .work-order-overview-card {
        padding: 0.7rem;
    }

    .work-order-overview-heading {
        align-items: flex-end;
    }

    .work-order-overview-updated {
        max-width: 110px;
        text-align: right;
    }

    .work-order-page .work-order-top-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .work-order-page .work-order-top-info-grid .work-order-detail-tile.equipment,
    .work-order-page .work-order-top-info-grid .work-order-detail-tile.customer.editing {
        grid-column: 1 / -1;
    }

    .work-order-page .work-order-folder-tabs {
        overflow-x: auto;
    }

    .work-order-page .work-order-folder-tab {
        flex: 0 0 auto;
    }

    .work-order-page .work-order-collapsible-section,
    .work-order-page .work-order-tab-panel {
        padding: 0.6rem !important;
    }

    .work-order-page .work-order-collapsible-section > .work-order-section-heading {
        margin: -0.6rem -0.6rem 0;
    }

    .work-order-page .work-order-collapsible-section[open] > .work-order-section-heading {
        margin-bottom: 0.6rem;
    }

    .work-order-page .work-order-top-actions .work-order-detail-action {
        flex: 1 1 calc(50% - 0.5rem);
    }

    .work-order-page .work-order-bottom-actions .btn,
    .work-order-page .work-order-bottom-actions a {
        flex: 1 1 calc(50% - 0.5rem);
    }
}

/* Job dropdown composition: two working columns and a compact control rail. */
@media (min-width: 801px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .work-order-detail-grid.job-detail-grid {
        grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 1fr) minmax(190px, 0.48fr);
        gap: 0.55rem;
    }
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-main-card {
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-heading {
    grid-column: 1 / -1;
    width: auto;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-actions-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-notes-card {
    min-height: 100%;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card > strong,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card > strong {
    display: flex;
    align-items: center;
    min-height: 24px;
    padding: 0.18rem 0.48rem;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-muted);
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card > div,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card > div {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0.25rem 0.48rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-action-card-list,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-note-list {
    margin-top: 0 !important;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .expandable-actions {
    justify-content: flex-end;
    margin-top: 0.05rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--pm-brand-border);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .expandable-actions .btn {
    min-width: 88px;
    border-radius: 5px;
}

@media (max-width: 800px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card {
        grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr) !important;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card > strong,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card > strong {
        border-right: 1px solid var(--pm-brand-border);
        border-bottom: 0;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .expandable-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .expandable-actions .btn {
        width: 100%;
    }
}

/* Definitive job dropdown sizing. This must remain last to prevent page overflow. */
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > * {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}

@media (min-width: 1181px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .work-order-detail-grid.job-detail-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.32fr) minmax(0, 0.32fr) !important;
        grid-template-rows: auto;
        width: 100%;
        overflow: hidden;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-actions-card {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-notes-card {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card {
        grid-column: 4 !important;
        grid-row: 1 !important;
    }
}

@media (min-width: 801px) and (max-width: 1180px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .work-order-detail-grid.job-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100%;
        overflow: hidden;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-actions-card {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-notes-card {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }
}

@media (min-width: 801px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: 22px 32px;
        min-height: 54px;
        height: auto;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field {
        width: 100%;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .sales-handoff-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-inline-editor {
        grid-column: 1 / -1 !important;
    }
}

/* Definitive viewport containment for the application shell and command bar. */
:where(html[data-color-theme="pm-brand"], .theme-pm-brand),
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) body {
    max-width: 100%;
    overflow-x: clip;
}

.theme-pm-brand.page,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sidebar,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) main,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.theme-pm-brand.page,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) main,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .content {
    overflow-x: clip;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .nav > * {
    min-width: 0;
}

/* Status and Technician use short horizontal controls on non-mobile layouts. */
@media (min-width: 801px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card {
        grid-template-columns: max-content minmax(0, 1fr) !important;
        grid-template-rows: 42px !important;
        min-height: 42px;
        height: 42px;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > strong,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > strong {
        justify-content: center;
        width: auto;
        min-height: 42px;
        padding: 0.2rem 0.42rem;
        border-right: 1px solid var(--pm-brand-border);
        border-bottom: 0;
        white-space: nowrap;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > div,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > div {
        min-height: 42px;
        padding: 0.18rem 0.3rem;
        overflow: hidden;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field {
        min-height: 32px;
        padding: 0.12rem 0.28rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field::after,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field::after {
        content: "";
        display: block;
        width: 0.42rem;
        height: 0.42rem;
        padding: 0;
        border: 2px solid var(--pm-brand-orange);
        border-top: 0;
        border-left: 0;
        border-radius: 0;
        background: transparent;
        transform: rotate(45deg) translateY(-2px);
    }
}

/* Keep calendar headings aligned inside their framed sections. */
.job-calendar-section > .job-calendar-header {
    box-sizing: border-box;
    width: 100%;
    padding-inline: 0.75rem;
}

.job-calendar-section > .job-calendar-header > span {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .job-calendar-section > .job-calendar-header {
        padding-inline: 0.55rem;
    }
}

/* Match Status and Technician accents to the other job detail cards. */
@media (min-width: 801px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card {
        box-shadow: none;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > div,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > div {
        box-sizing: border-box;
        height: 38px;
        min-height: 38px;
        margin-top: 0 !important;
        box-shadow: inset 3px 0 0 var(--pm-brand-orange);
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field {
        display: flex;
        align-items: center;
        justify-content: space-between;
        align-self: stretch;
        width: 100%;
    }
}

/* Give empty notes enough body height to read as a deliberate field. */
@media (min-width: 801px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-notes-card > .job-note-empty {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.3rem 0.08rem;
    }
}

/* Notes stays compact until its content needs additional height. */
@media (min-width: 801px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-notes-card {
        align-self: start;
        min-height: 0;
        height: auto;
    }
}

/* Status and Technician use the same header/body construction as Notes. */
@media (min-width: 801px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        align-content: start;
        min-height: 0;
        height: auto;
        padding: 0.42rem 0.52rem;
        overflow: hidden;
        box-shadow: inset 3px 0 0 var(--pm-brand-orange);
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > strong,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > strong {
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: auto;
        min-height: 34px;
        margin: -0.42rem -0.52rem 0.35rem;
        padding: 0.22rem 0.48rem;
        border-right: 0;
        border-bottom: 1px solid var(--pm-brand-border);
        background: var(--pm-brand-muted);
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-status-card > div,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-grid > .job-detail-tech-card > div {
        box-sizing: border-box;
        display: flex;
        align-items: center;
        min-height: 44px;
        height: auto;
        margin: 0 !important;
        padding: 0.28rem 0.08rem;
        box-shadow: none;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field {
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 34px;
        height: auto;
        padding: 0.2rem 0.3rem;
        line-height: 1.2;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-status-card .editable-field::after,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-tech-card .editable-field::after {
        content: "Change";
        display: inline-flex;
        width: auto;
        height: auto;
        margin: 0;
        padding: 0.08rem 0.28rem;
        border: 0;
        border-radius: 999px;
        background: #fff0df;
        color: var(--pm-brand-orange-dark);
        font-size: 0.56rem;
        font-weight: 850;
        line-height: 1.2;
        text-transform: uppercase;
        transform: none;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .job-details-panel .job-detail-heading {
        min-height: 34px;
        padding-block: 0.22rem;
    }
}

/* Final deals-page containment pass. Keep after shared responsive rules. */
.deal-folder-tabs {
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.deal-folder-tabs .work-order-folder-tab {
    flex: 0 0 auto;
}

.deal-folder-tabs .work-order-folder-tab-close {
    flex: 0 0 1.45rem;
    width: 1.45rem;
    height: 1.45rem;
    border-color: rgba(185, 71, 24, 0.24);
    background: #fff7ed;
    color: #b94718;
}

.deal-folder-tabs .work-order-folder-tab-close svg {
    width: 0.82rem;
    height: 0.82rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.deal-activity-grid,
.deal-activity-grid > *,
.deals-page-actions,
.deals-page-actions > * {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

.deal-activity-card {
    overflow: hidden;
}

.deal-activity-card .section-header.compact.deal-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.55rem;
    margin: 0 0 0.35rem;
    padding: 0.35rem 0.5rem;
}

.deal-activity-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.deal-activity-heading .job-status-count,
.deal-activity-header .action-add-bubble {
    flex: 0 0 auto;
}

.deals-page-actions {
    grid-template-columns: max-content minmax(0, 1fr) max-content max-content;
    overflow: hidden;
}

.deals-page-actions > .btn {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .deals-page-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }
}

/* Settings page: compact, grouped disclosure panels. */
.settings-page-title {
    margin-bottom: 0.75rem;
}

.settings-page-shell {
    display: grid;
    gap: 0.65rem;
    width: min(100%, 1180px);
    margin-inline: auto;
}

.settings-page-shell > .alert {
    margin: 0;
}

.settings-collapsible {
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--pm-brand-border, #d8c7a6);
    border-radius: 7px;
    background: var(--pm-brand-surface, #fffdf8);
    box-shadow: 0 6px 18px rgba(58, 52, 47, 0.05);
}

.settings-collapsible > summary {
    position: relative;
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) 0.8rem;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.65rem;
    padding: 0.55rem 0.8rem;
    cursor: pointer;
    list-style: none;
    background: #f5f1e8;
    color: var(--pm-brand-charcoal, #3a342f);
}

.settings-collapsible > summary::-webkit-details-marker {
    display: none;
}

.settings-collapsible > summary::after {
    content: "";
    width: 0.48rem;
    height: 0.48rem;
    justify-self: center;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 150ms ease;
}

.settings-collapsible[open] > summary {
    border-bottom: 1px solid var(--pm-brand-border, #d8c7a6);
    background: #fff8ed;
    box-shadow: inset 4px 0 0 var(--pm-brand-orange, #d97a20);
}

.settings-collapsible[open] > summary::after {
    transform: rotate(225deg);
}

.settings-summary-icon {
    display: inline-grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid rgba(46, 90, 54, 0.22);
    border-radius: 6px;
    background: #ffffff;
    color: var(--pm-brand-green, #2e5a36);
}

.settings-summary-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-summary-copy {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.settings-summary-copy strong {
    font-size: 0.98rem;
    line-height: 1.15;
}

.settings-summary-copy small {
    overflow: hidden;
    color: #6b665f;
    font-size: 0.76rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-collapsible-body {
    box-sizing: border-box;
    min-width: 0;
    padding: 0.85rem;
}

.settings-compact-grid,
.settings-operations-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.settings-compact-grid > label {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
    font-weight: 750;
}

.settings-form-stack > .form-control,
.settings-form-stack > .form-select {
    width: min(100%, 52rem);
    margin-bottom: 0.65rem;
}

.settings-form-stack > label:not(.settings-toggle) {
    display: block;
    width: min(100%, 52rem);
    margin: 0.35rem 0 0.22rem;
    font-weight: 750;
}

.settings-subsection {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid #e4d9c7;
    border-radius: 6px;
    background: #fffdf9;
}

.settings-subsection > h5,
.settings-collapsible-body > h5 {
    margin: 0 0 0.35rem;
    color: var(--pm-brand-charcoal, #3a342f);
}

.settings-notifications-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.settings-notifications-grid > h5,
.settings-notifications-grid > p {
    grid-column: 1 / -1;
}

.settings-notifications-grid .settings-toggle {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
}

.settings-save-row {
    display: block;
    width: 100%;
    padding: 0.15rem 0 0.35rem;
}

.settings-save-row .btn {
    width: 100%;
    min-height: 2.65rem;
}

.settings-collapsible .settings-section {
    border-color: #e4d9c7;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 760px) {
    .settings-page-shell {
        gap: 0.5rem;
    }

    .settings-collapsible > summary {
        min-height: 3.35rem;
        padding: 0.45rem 0.6rem;
    }

    .settings-summary-copy small {
        font-size: 0.7rem;
    }

    .settings-collapsible-body {
        padding: 0.65rem;
    }

    .settings-compact-grid,
    .settings-operations-grid,
    .settings-notifications-grid {
        grid-template-columns: 1fr;
    }

    .settings-notifications-grid > h5,
    .settings-notifications-grid > p {
        grid-column: 1;
    }

    .settings-save-row .btn {
        width: 100%;
    }
}

/* Current ServiceOps treatment for the shared Add Deal workspace. */
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-mode-create-panel {
    padding: 0.7rem;
    overflow: hidden;
    border: 1px solid var(--pm-brand-border);
    border-radius: 8px;
    background: var(--pm-brand-page);
    box-shadow: 0 8px 22px rgba(41, 38, 34, 0.08);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-mode-create-panel > .section-header {
    min-height: 38px;
    margin: -0.7rem -0.7rem 0.65rem;
    padding: 0.45rem 0.7rem;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-mode-create-panel > .section-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 0.96rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-layout {
    gap: 0.6rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-top-grid {
    gap: 0.55rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-top-grid > .customer-picker,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-top-grid > .deal-toggle-card {
    min-height: 6.7rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-mini-header-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-date-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-mini-field-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-wizard-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-build-options-grid > label,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-wizard-section > label,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-long-field {
    border: 1px solid var(--pm-brand-border);
    border-radius: 6px;
    background: var(--pm-brand-surface);
    box-shadow: inset 3px 0 0 var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-status-priority-card {
    gap: 0.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-customer-card.deal-mini-header-card > .deal-field-title,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-equipment-quote-card.deal-mini-header-card > .deal-field-title,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-date-card > .deal-field-title,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-mini-field-card > .deal-field-title,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-wizard-section > .deal-field-title,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-build-options-grid > label > .deal-field-title,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-wizard-section > label > .deal-field-title,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-long-field > .deal-field-title {
    min-height: 24px;
    margin: 0;
    padding: 0.2rem 0.5rem;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-muted);
    color: var(--pm-brand-charcoal);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-customer-card.deal-mini-header-card > :not(.deal-field-title) {
    width: calc(100% - 0.9rem);
    margin-right: 0.45rem;
    margin-left: 0.45rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-customer-card.deal-mini-header-card > :last-child {
    margin-bottom: 0.42rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-customer-card .customer-picker-list {
    max-height: 5.15rem;
    border-color: var(--pm-brand-border);
    border-radius: 5px;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-customer-card .customer-picker-option {
    min-height: 38px;
    padding: 0.35rem 0.48rem;
    border-bottom-color: #ece5da;
    background: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-customer-card .customer-picker-option:hover,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-customer-card .customer-picker-option.selected {
    background: var(--pm-brand-green-soft);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-mini-field-card > .deal-toggle-group,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-equipment-quote-card.deal-mini-header-card > .deal-toggle-group,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-wizard-section > .deal-toggle-group {
    padding: 0.42rem 0.48rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-toggle-group {
    gap: 0.35rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-toggle-button {
    min-height: 2.05rem;
    padding: 0.34rem 0.62rem;
    border-color: #d8c7ae;
    border-radius: 6px;
    background: #ffffff;
    color: var(--pm-brand-charcoal);
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-toggle-button:hover {
    border-color: var(--pm-brand-green);
    background: #f4f8f4;
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-toggle-button.selected {
    border-color: var(--pm-brand-green);
    background: var(--pm-brand-green-soft);
    color: var(--pm-brand-green-dark);
    box-shadow: inset 3px 0 0 var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-target-row {
    gap: 0.42rem;
    align-self: stretch;
    padding: 0.42rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-target-field {
    border-color: var(--pm-brand-border);
    border-radius: 5px;
    background: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-target-field > span {
    min-height: 22px;
    padding: 0.15rem 0.4rem;
    border-bottom-color: var(--pm-brand-border);
    background: var(--pm-brand-muted);
    color: #62584f;
    font-size: 0.65rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-date-input-shell,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-time-trigger,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-date-input {
    min-height: 2.35rem;
    background: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-time-trigger-icon {
    border: 1px solid #ddb889;
    border-radius: 5px;
    background: #fff7ed;
    color: var(--pm-brand-orange-dark);
    font-size: 0.68rem;
    font-weight: 900;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-quote-wizard {
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--pm-brand-border);
    border-radius: 7px;
    background: var(--pm-brand-surface);
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-build-sheet-heading {
    min-height: 35px;
    padding: 0.38rem 0.62rem;
    border-bottom: 1px solid var(--pm-brand-border);
    background: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-build-sheet-heading .job-section-title {
    color: var(--pm-brand-charcoal);
    font-size: 0.92rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-build-options-grid {
    gap: 0.5rem;
    padding: 0.55rem;
    background: #f7f6f2;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-wizard-section,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-build-options-grid > label,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-wizard-section > label {
    overflow: hidden;
    background: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-long-field {
    display: grid;
    gap: 0;
    margin: 0;
    overflow: hidden;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-long-field > textarea.form-control {
    min-height: 3.25rem;
    padding: 0.5rem;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    resize: vertical;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--pm-brand-border);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-mode-create-panel .form-control,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-mode-create-panel .form-select {
    border-color: #d8c7ae;
    border-radius: 5px;
    background-color: #ffffff;
    font-size: 0.88rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-mode-create-panel .form-control:focus,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-mode-create-panel .form-select:focus {
    border-color: var(--pm-brand-green);
    box-shadow: 0 0 0 0.15rem rgba(46, 90, 54, 0.12);
}

@media (max-width: 1180px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-top-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-mode-create-panel {
        padding: 0.48rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .sales-mode-create-panel > .section-header {
        margin: -0.48rem -0.48rem 0.5rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-top-grid,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-build-options-grid,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-status-priority-card {
        grid-template-columns: 1fr;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-top-grid > .customer-picker,
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-create-top-grid > .deal-toggle-card {
        min-height: 0;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deal-target-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Account management: shared Identity workspace. */
.account-manage-page {
    display: grid;
    gap: 0.75rem;
    width: min(100%, 1180px);
    margin-inline: auto;
}

.account-manage-hero {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 4.25rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--pm-brand-border, #d8c7a6);
    border-radius: 8px;
    background: #f5f1e8;
    box-shadow: inset 5px 0 0 var(--pm-brand-orange, #d97a20), 0 6px 18px rgba(58, 52, 47, 0.05);
}

.account-manage-hero-icon {
    display: inline-grid;
    flex: 0 0 2.7rem;
    width: 2.7rem;
    height: 2.7rem;
    place-items: center;
    border: 1px solid rgba(46, 90, 54, 0.25);
    border-radius: 7px;
    background: #ffffff;
    color: var(--pm-brand-green, #2e5a36);
}

.account-manage-hero-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-manage-hero-copy {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.account-manage-hero-copy strong {
    color: var(--pm-brand-charcoal, #3a342f);
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.1;
}

.account-manage-hero-copy small {
    color: #6b665f;
    font-size: 0.82rem;
}

.account-manage-workspace {
    display: grid;
    grid-template-columns: minmax(13.5rem, 15rem) minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
}

.account-manage-navigation,
.account-manage-content {
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--pm-brand-border, #d8c7a6);
    border-radius: 8px;
    background: var(--pm-brand-surface, #fffdf8);
    box-shadow: 0 6px 18px rgba(58, 52, 47, 0.05);
}

.account-manage-navigation {
    padding: 0.55rem;
}

.account-manage-nav-heading {
    display: grid;
    gap: 0.05rem;
    padding: 0.35rem 0.4rem 0.55rem;
    border-bottom: 1px solid #e4d9c7;
}

.account-manage-nav-heading strong {
    font-size: 0.86rem;
}

.account-manage-nav-heading small {
    color: #766f66;
    font-size: 0.68rem;
}

.account-manage-nav {
    display: grid;
    gap: 0.28rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.account-manage-nav .nav-link {
    display: grid;
    grid-template-columns: 1.85rem minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    min-height: 2.45rem;
    padding: 0.35rem 0.45rem;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--pm-brand-charcoal, #3a342f);
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
}

.account-manage-nav .nav-link:hover {
    border-color: #e4d9c7;
    background: #f8f4ec;
}

.account-manage-nav .nav-link.active {
    border-color: rgba(46, 90, 54, 0.28);
    background: #edf4ed;
    color: var(--pm-brand-green, #2e5a36);
    box-shadow: inset 3px 0 0 var(--pm-brand-orange, #d97a20);
}

.account-nav-icon {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid #ddd2c1;
    border-radius: 5px;
    background: #ffffff;
    color: var(--pm-brand-green, #2e5a36);
    font-size: 0.58rem;
    font-weight: 900;
}

.account-manage-content {
    min-height: 28rem;
    padding: 0.85rem;
}

.account-manage-content > h3,
.account-manage-content > h4 {
    margin: -0.85rem -0.85rem 0.8rem;
    padding: 0.62rem 0.8rem;
    border-bottom: 1px solid var(--pm-brand-border, #d8c7a6);
    background: #f5f1e8;
    color: var(--pm-brand-charcoal, #3a342f);
    font-size: 1rem;
    line-height: 1.2;
    box-shadow: inset 4px 0 0 var(--pm-brand-orange, #d97a20);
}

.account-manage-content > .row {
    margin: 0;
}

.account-manage-content > .row > [class*="col-"] {
    width: min(100%, 44rem);
    padding: 0;
}

.account-manage-content form {
    max-width: 44rem;
}

.account-manage-content .form-floating,
.account-manage-content .form-group {
    margin-bottom: 0.65rem !important;
}

.account-manage-content .form-control,
.account-manage-content .form-select {
    min-height: 2.75rem;
    border-color: #d9c9ad;
    border-radius: 6px;
    background-color: #fffefa;
}

.account-manage-content .form-control:focus,
.account-manage-content .form-select:focus {
    border-color: var(--pm-brand-green, #2e5a36);
    box-shadow: 0 0 0 0.16rem rgba(46, 90, 54, 0.12);
}

.account-manage-content .btn-lg {
    min-height: 2.65rem;
    padding-block: 0.45rem;
    font-size: 0.9rem;
}

.account-manage-content .alert {
    margin-bottom: 0.75rem;
    border-radius: 6px;
}

.account-manage-content .table {
    overflow: hidden;
    border: 1px solid #e4d9c7;
    border-radius: 6px;
    background: #fffdf9;
}

.account-manage-content p {
    max-width: 48rem;
}

@media (max-width: 760px) {
    .account-manage-page {
        gap: 0.55rem;
    }

    .account-manage-hero {
        min-height: 3.65rem;
        padding: 0.55rem 0.65rem;
    }

    .account-manage-hero-icon {
        flex-basis: 2.25rem;
        width: 2.25rem;
        height: 2.25rem;
    }

    .account-manage-hero-copy small,
    .account-manage-nav-heading {
        display: none;
    }

    .account-manage-workspace {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .account-manage-navigation {
        overflow-x: auto;
        padding: 0.4rem;
    }

    .account-manage-nav {
        display: flex;
        gap: 0.35rem;
        width: max-content;
        margin: 0;
    }

    .account-manage-nav .nav-link {
        display: flex;
        min-height: 2.35rem;
        padding: 0.3rem 0.55rem 0.3rem 0.35rem;
        white-space: nowrap;
    }

    .account-manage-content {
        min-height: 0;
        padding: 0.7rem;
    }

    .account-manage-content > h3,
    .account-manage-content > h4 {
        margin: -0.7rem -0.7rem 0.7rem;
        padding: 0.58rem 0.65rem;
    }

    .account-manage-content .btn {
        min-height: 2.55rem;
    }
}

/* Current ServiceOps treatment for the My Deals workspace. */
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel {
    padding: 0.75rem !important;
    overflow: hidden;
    border: 1px solid var(--pm-brand-border);
    border-radius: 8px;
    background: var(--pm-brand-surface);
    box-shadow: 0 8px 22px rgba(41, 38, 34, 0.08);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel > .section-header {
    min-height: 38px;
    margin: -0.75rem -0.75rem 0.55rem;
    padding: 0.45rem 0.72rem;
    border-bottom: 1px solid var(--pm-brand-border);
    background: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .job-section-title {
    color: var(--pm-brand-charcoal);
    font-size: 0.98rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .sales-filter-panel {
    gap: 0.4rem;
    margin: 0 0 0.65rem !important;
    padding: 0.48rem;
    border: 1px solid var(--pm-brand-border);
    border-radius: 6px;
    background: var(--pm-brand-page);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .sales-filter-panel .form-control {
    min-height: 2.2rem;
    border-color: #d8c7ae;
    border-radius: 5px;
    background: #ffffff;
    font-size: 0.82rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .job-option-bubbles {
    gap: 0.3rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .job-option-bubble {
    min-height: 2.05rem;
    padding: 0.3rem 0.62rem;
    border-color: #d8c7ae;
    border-radius: 5px;
    background: #ffffff;
    color: var(--pm-brand-charcoal);
    font-size: 0.76rem;
    font-weight: 800;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .job-option-bubble:hover {
    border-color: var(--pm-brand-green);
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .job-option-bubble.selected {
    border-color: var(--pm-brand-green);
    background: var(--pm-brand-green-soft);
    color: var(--pm-brand-green-dark);
    box-shadow: inset 3px 0 0 var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-bar-list {
    gap: 0.45rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-bar-item {
    overflow: hidden;
    border: 1px solid var(--pm-brand-border);
    border-radius: 7px;
    background: #ffffff;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-bar-item[open] {
    border-color: #b9c8b9;
    box-shadow: inset 4px 0 0 var(--pm-brand-green), 0 7px 18px rgba(41, 38, 34, 0.07);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-summary {
    min-height: 44px;
    padding: 0.38rem 0.5rem;
    border: 0;
    background: #fffefa;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-bar-item[open] > .deal-summary {
    border-bottom: 1px solid var(--pm-brand-border);
    background: #f5f8f5;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-summary .expandable-primary {
    color: var(--pm-brand-green-dark);
    font-weight: 850;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-summary .expandable-description {
    color: #625d56;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-summary .job-status-count,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-summary .priority-badge {
    border: 1px solid #ddd4c7;
    border-radius: 999px;
    background: var(--pm-brand-muted);
    color: var(--pm-brand-charcoal);
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-folder-tabs {
    gap: 0.28rem;
    min-height: 44px;
    padding: 0.42rem 0.48rem 0;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-page);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .work-order-folder-tab,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .work-order-add-tab {
    min-height: 34px;
    border-color: var(--pm-brand-border);
    border-radius: 6px 6px 0 0;
    background: #ffffff;
    color: var(--pm-brand-charcoal);
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .work-order-folder-tab.active {
    border-color: var(--pm-brand-green);
    border-bottom-color: #ffffff;
    background: #ffffff;
    color: var(--pm-brand-green-dark);
    box-shadow: inset 0 3px 0 var(--pm-brand-green);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .work-order-add-tab {
    color: var(--pm-brand-orange-dark);
    font-size: 1rem;
}

/* Let the deal-tab picker escape the horizontal containment only while open. */
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-bar-item.add-tab-menu-open,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-folder-tabs.add-tab-menu-open {
    position: relative;
    z-index: 45;
    overflow: visible;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-add-tab-menu {
    z-index: 60;
    min-width: 180px;
    border-color: var(--pm-brand-border);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(41, 38, 34, 0.2);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-add-tab-menu button {
    color: var(--pm-brand-charcoal);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-add-tab-menu button:hover {
    background: var(--pm-brand-muted);
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deals-page-info-grid {
    gap: 0.45rem;
    padding: 0.55rem;
    border-top: 0;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-page);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deals-page-info-grid > .deal-info-card {
    overflow: hidden;
    border: 1px solid var(--pm-brand-border);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: inset 3px 0 0 var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deals-page-info-grid > .deal-info-card > strong,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deals-page-info-grid > .deal-info-card > .secondary-sales-title {
    min-height: 23px;
    padding: 0.18rem 0.48rem;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-muted);
    color: var(--pm-brand-charcoal);
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deals-page-info-grid > .deal-info-card > span {
    min-height: 2.1rem;
    padding: 0.35rem 0.5rem;
    color: var(--pm-brand-charcoal);
    font-size: 0.84rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .secondary-sales-card .deal-share-inline-row {
    min-height: 2.1rem;
    padding: 0.3rem 0.48rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-dashboard-edit-button {
    top: 50%;
    right: 0.42rem;
    width: 27px;
    height: 27px;
    border-color: var(--pm-brand-border);
    border-radius: 5px;
    background: #ffffff;
    color: var(--pm-brand-green);
    transform: translateY(-50%);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-activity-grid {
    gap: 0.55rem;
    margin: 0 !important;
    padding: 0.55rem;
    background: #ffffff;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-activity-card {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--pm-brand-border);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: inset 3px 0 0 var(--pm-brand-orange);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-activity-card .section-header.compact.deal-activity-header {
    min-height: 34px;
    margin: 0;
    padding: 0.3rem 0.48rem;
    border-bottom: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-muted);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-activity-card h5 {
    color: var(--pm-brand-charcoal);
    font-size: 0.84rem;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-activity-card .action-add-bubble {
    width: 27px;
    height: 27px;
    border-color: #d7b98e;
    border-radius: 5px;
    background: #fff7ed;
    color: var(--pm-brand-orange-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-activity-card .job-action-card-list,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-activity-card .job-note-list,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-activity-card > .job-note-empty,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-activity-card > .job-inline-editor {
    margin: 0.42rem !important;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .job-action-card,
:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .job-note-card {
    border-color: var(--pm-brand-border);
    border-radius: 5px;
    background: #ffffff;
    box-shadow: none;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .job-action-card.selected {
    border-color: #9db49f;
    background: var(--pm-brand-green-soft);
    color: var(--pm-brand-green-dark);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deals-page-actions {
    gap: 0.45rem;
    margin: 0;
    padding: 0.55rem;
    border-top: 1px solid var(--pm-brand-border);
    background: var(--pm-brand-page);
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deals-page-handoff-preview {
    border-color: #d7b98e;
    border-radius: 5px;
    background: #fff7ed;
}

:where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deals-page-actions > .btn {
    min-height: 2.5rem;
    border-radius: 5px;
}

@media (max-width: 700px) {
    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel {
        padding: 0.48rem !important;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel > .section-header {
        margin: -0.48rem -0.48rem 0.45rem;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .sales-filter-panel .form-control {
        flex-basis: 100%;
        max-width: none;
    }

    :where(html[data-color-theme="pm-brand"], .theme-pm-brand) .deals-workspace-panel .deal-activity-grid {
        grid-template-columns: 1fr;
        padding: 0.45rem;
    }
}

/* Time tracking workspace: current PM ServiceOps record-page treatment. */
.time-tracking-workspace {
    display: grid;
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
}

.time-tracking-page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 120px;
    margin-bottom: 0.8rem;
    padding: 1.25rem 1.45rem;
    overflow: hidden;
    border-radius: 12px;
    background:
        radial-gradient(circle at 82% 0%, rgba(217, 122, 32, 0.2), transparent 34%),
        linear-gradient(135deg, #25231f 0%, #34302b 100%);
    color: #ffffff;
    box-shadow: inset 0 4px 0 var(--pm-brand-orange, #d97a20), 0 10px 28px rgba(42, 37, 31, 0.12);
}

.time-tracking-page-header::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -92px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.025), 0 0 0 68px rgba(255, 255, 255, 0.018);
    pointer-events: none;
}

.time-tracking-page-header > div {
    position: relative;
    z-index: 1;
}

.time-tracking-page-kicker {
    display: block;
    margin-bottom: 0.25rem;
    color: #e9a35f;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.time-tracking-page-header h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.7rem, 2.4vw, 2.4rem);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.time-tracking-page-header p {
    margin: 0.48rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    font-weight: 600;
}

.time-tracking-user-chip {
    display: grid;
    min-width: 180px;
    padding: 0.62rem 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(4px);
}

.time-tracking-user-chip span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.63rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.time-tracking-user-chip strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-tracking-workspace .time-tracking-clock-card {
    min-height: 68px;
    margin-bottom: 0.75rem !important;
    padding: 0.72rem 0.9rem !important;
    border: 1px solid var(--pm-brand-border, #cdb79a);
    border-left: 4px solid var(--pm-brand-green, #2e5a36);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(65, 55, 42, 0.055);
}

.time-tracking-workspace .time-tracking-clock-card h4 {
    color: var(--pm-brand-charcoal, #3a342f);
    font-size: 0.96rem;
    font-weight: 850;
}

.time-tracking-workspace .time-tracking-clock-button {
    min-width: 112px;
    min-height: 40px;
    border-radius: 6px;
}

.time-tracking-workspace > .time-tracking-tabs,
.time-tracking-workspace .time-tracking-period-card > .time-tracking-tabs {
    gap: 0.3rem;
    width: fit-content;
    margin-bottom: 0.75rem;
    padding: 0.35rem;
    border: 1px solid var(--pm-brand-border, #cdb79a);
    border-radius: 8px;
    background: var(--pm-brand-muted, #f2ede4);
    box-shadow: none;
}

.time-tracking-workspace .time-tracking-tabs .btn {
    min-height: 36px;
    padding: 0.4rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: #62584f;
    box-shadow: none;
    font-size: 0.8rem;
}

.time-tracking-workspace .time-tracking-tabs .btn:hover {
    background: rgba(255, 255, 255, 0.72);
    color: var(--pm-brand-green-dark, #214329);
}

.time-tracking-workspace .time-tracking-tabs .btn-primary {
    border-color: #b7c8b8;
    background: #ffffff;
    color: var(--pm-brand-green-dark, #214329);
    box-shadow: inset 0 -3px 0 var(--pm-brand-green, #2e5a36), 0 2px 5px rgba(44, 58, 45, 0.07);
}

.time-tracking-workspace .time-tracking-period-card {
    padding: 0.9rem !important;
    border: 1px solid var(--pm-brand-border, #cdb79a);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(65, 55, 42, 0.055);
}

.time-tracking-workspace .time-tracking-period-header {
    min-height: 52px;
    margin: -0.9rem -0.9rem 0.85rem;
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid var(--pm-brand-border, #cdb79a);
    border-radius: 10px 10px 0 0;
    background: linear-gradient(90deg, #f3eee5 0%, #faf8f3 72%, #ffffff 100%);
    box-shadow: inset 4px 0 0 var(--pm-brand-orange, #d97a20);
}

.time-tracking-workspace .time-tracking-period-header h4 {
    color: var(--pm-brand-charcoal, #3a342f);
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.time-tracking-workspace .time-tracking-period-header span {
    color: #655e57;
    font-size: 0.84rem;
    font-weight: 700;
}

.time-tracking-workspace .time-tracking-period-header .btn {
    min-height: 34px;
    border-color: #cdbfae;
    border-radius: 5px;
    background: #ffffff;
    color: var(--pm-brand-green-dark, #214329);
    font-weight: 800;
}

.time-tracking-workspace .time-tracking-period-header .btn:hover {
    border-color: var(--pm-brand-green, #2e5a36);
    background: var(--pm-brand-green-soft, #e7efe8);
}

.time-tracking-workspace .time-tracking-summary-grid {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.time-tracking-workspace .time-tracking-total-card {
    position: relative;
    min-height: 72px;
    align-content: center;
    gap: 0.16rem;
    padding: 0.62rem 0.72rem;
    overflow: hidden;
    border: 1px solid #ded2c1;
    border-radius: 6px;
    background: #fffefa;
    box-shadow: inset 3px 0 0 var(--pm-brand-orange, #d97a20);
}

.time-tracking-workspace .time-tracking-total-card span {
    color: #6c6259;
    font-size: 0.66rem;
    letter-spacing: 0.07em;
}

.time-tracking-workspace .time-tracking-total-card strong {
    color: var(--pm-brand-charcoal, #3a342f);
    font-size: 1.12rem;
    font-weight: 900;
}

.time-tracking-workspace .time-tracking-summary-grid .time-tracking-total-card:last-child {
    border-color: var(--pm-brand-green, #2e5a36);
    background: linear-gradient(135deg, var(--pm-brand-green-dark, #214329), var(--pm-brand-green, #2e5a36));
    box-shadow: inset 3px 0 0 #e5a15f, 0 6px 14px rgba(33, 67, 41, 0.14);
}

.time-tracking-workspace .time-tracking-summary-grid .time-tracking-total-card:last-child span,
.time-tracking-workspace .time-tracking-summary-grid .time-tracking-total-card:last-child strong {
    color: #ffffff;
}

.time-tracking-workspace .time-tracking-summary-grid .time-tracking-total-card:last-child span {
    color: rgba(255, 255, 255, 0.7);
}

.time-tracking-workspace .time-tracking-manual-card {
    margin-bottom: 0.85rem;
    padding: 0.75rem;
    border: 1px solid #ded2c1;
    border-radius: 7px;
    background: #fbfaf7;
    box-shadow: none;
}

.time-tracking-workspace .time-tracking-manual-card h5.job-section-title {
    margin: -0.75rem -0.75rem 0.65rem;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid #ded2c1;
    border-left: 3px solid var(--pm-brand-orange, #d97a20);
    background: var(--pm-brand-muted, #f2ede4);
    color: var(--pm-brand-charcoal, #3a342f);
}

.time-tracking-workspace .time-tracking-manual-grid label {
    color: #544c45;
    font-size: 0.76rem;
    letter-spacing: 0.025em;
}

.time-tracking-workspace .time-tracking-manual-grid .form-control,
.time-tracking-workspace .time-tracking-manual-grid .form-select {
    border-color: #cdbfae;
    border-radius: 5px;
    background: #ffffff;
}

.time-tracking-workspace .time-tracking-manual-grid .btn {
    border-radius: 5px;
}

.time-tracking-workspace .time-tracking-table {
    border-color: #ded2c1;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: none;
}

.time-tracking-workspace .time-tracking-table thead th {
    padding-top: 0.58rem;
    padding-bottom: 0.58rem;
    border-bottom-color: var(--pm-brand-border, #cdb79a);
    background: var(--pm-brand-muted, #f2ede4);
    color: #504841;
    font-size: 0.68rem;
    letter-spacing: 0.045em;
}

.time-tracking-workspace .time-tracking-table tbody td {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    border-bottom-color: #e5ddd2;
}

.time-tracking-workspace .time-week-summary-card {
    border-color: #ded2c1;
    border-radius: 6px;
    background: #ffffff;
}

.time-tracking-workspace .time-week-summary-card summary {
    background: #fbfaf7;
    color: var(--pm-brand-charcoal, #3a342f);
}

@media (max-width: 900px) {
    .time-tracking-workspace .time-tracking-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .time-tracking-page-header {
        display: grid;
        min-height: 0;
        padding: 1rem;
        border-radius: 9px;
    }

    .time-tracking-page-header p {
        max-width: 30rem;
    }

    .time-tracking-user-chip {
        min-width: 0;
        width: 100%;
    }

    .time-tracking-workspace .time-tracking-clock-card {
        margin-bottom: 0.65rem !important;
    }

    .time-tracking-workspace > .time-tracking-tabs,
    .time-tracking-workspace .time-tracking-period-card > .time-tracking-tabs {
        width: 100%;
    }

    .time-tracking-workspace .time-tracking-period-card {
        padding: 0.65rem !important;
    }

    .time-tracking-workspace .time-tracking-period-header {
        margin: -0.65rem -0.65rem 0.65rem;
        padding: 0.42rem 0.5rem;
    }

    .time-tracking-workspace .time-tracking-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.42rem;
    }

    .time-tracking-workspace .time-tracking-total-card {
        min-height: 64px;
        padding: 0.5rem 0.58rem;
    }

    .time-tracking-workspace .time-tracking-manual-card {
        padding: 0.62rem;
    }

    .time-tracking-workspace .time-tracking-manual-card h5.job-section-title {
        margin: -0.62rem -0.62rem 0.6rem;
    }
}
