/* Work screens use the available monitor width; the public and sign-in pages keep their own layout. */
.workspace-page .page-shell {
    max-width: none;
}

@media (min-width: 1200px) {
    .workspace-page :is(.inventory-workspace, .services-workspace, .schedule-workspace, .customers-workspace) {
        grid-template-columns: clamp(340px, 25vw, 480px) minmax(0, 1fr);
    }
}

.staff-schedule-page .staff-schedule-shell {
    width: calc(100% - 36px);
    max-width: none;
}

.work-order-page .workflow-form {
    max-width: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-department-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 12px 0 2px;
}
.service-department-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #d7e1dc;
    border-radius: 9px;
    background: #f6f8f7;
    color: #273b33;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.service-department-nav a.is-selected {
    border-color: #16866b;
    background: #e3f4ed;
}
.service-department-nav small {
    color: #61746b;
    font-size: 11px;
}

/* Intake is a full-width work screen rather than a narrow side panel. */
.orders-page.is-create .page-shell {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 6px 12px !important;
}
.orders-page.is-create .operations-layout {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    grid-template-columns: minmax(0, 1fr);
}
.orders-page.is-create .operation-form-panel {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: hidden;
}
.orders-page.is-create .operation-board {
    display: none;
}
.orders-page.is-create .operation-form-panel > div:first-child {
    display: flex;
    flex: none;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}
.orders-page.is-create .operation-form-panel h1 {
    font-size: clamp(23px, 1.7vw, 30px);
}
.orders-page.is-create .operation-form {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
}
.orders-page.is-create .intake-columns {
    display: grid;
    grid-template-columns: minmax(520px, 36fr) minmax(0, 64fr);
    gap: 12px;
    height: 100%;
    min-height: 0;
}
.intake-identity-pane,
.intake-work-pane {
    min-width: 0;
    min-height: 0;
    padding: 14px;
    border: 1px solid #dce5e0;
    border-radius: 12px;
    background: #fff;
}
.intake-identity-pane {
    display: grid;
    grid-auto-rows: min-content;
    align-content: start;
    gap: 10px;
    overflow: auto;
}
.intake-identity-pane > h2 {
    margin: 0 0 2px;
    font-size: 18px;
}
.intake-direction-picker {
    min-width: 0;
    margin: 8px 0 0;
    padding: 12px;
    border: 1px solid #cddbd4;
    border-radius: 10px;
}
.intake-direction-picker legend {
    padding: 0 5px;
    font-size: 14px;
    font-weight: 800;
}
.intake-work-pane {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.intake-work-pane-heading {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(280px, auto);
    align-items: center;
    gap: 10px;
    flex: none;
    margin-bottom: 7px;
}
.intake-work-pane-heading > div > span {
    color: #16866b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.intake-work-pane-heading h2 {
    margin: 2px 0 0;
    font-size: 20px;
}
.intake-price-summary {
    display: block;
    min-width: 0;
    padding: 7px 12px;
    border: 1px solid #a8d2c1;
    border-radius: 10px;
    background: #e4f5ec;
    color: #0d503a;
    text-align: right;
}
.intake-price-summary strong { display: block; font-size: 23px; line-height: 1.05; }
.intake-price-summary small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.2; }
.orders-page.is-create label.needs-price-class > select {
    border-color: #16866b;
    box-shadow: 0 0 0 2px #c5ead9;
}
.intake-work-details {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}
.intake-work-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 8px 10px;
    flex: none;
    padding-top: 10px;
    border-top: 1px solid #dce5e0;
}
.orders-page.is-create .intake-work-footer { gap: 5px 8px; padding-top: 6px; }
.orders-page.is-create .intake-work-footer textarea { height: 38px; min-height: 38px; resize: vertical; }
.intake-work-footer:not(:has(.intake-discount-field)) .intake-worker-field,
.intake-work-footer > :is(.intake-total, .work-check, .primary-button),
.intake-work-footer > label:has(textarea) {
    grid-column: 1 / -1;
}
.intake-work-footer .intake-worker-field{display:grid;gap:2px;padding:8px 10px;border:1px solid #c8ddd4;border-radius:8px;background:#eef8f3}
.intake-work-footer .intake-worker-field span,.intake-work-footer .intake-worker-field small{color:#526b62;font-size:11px}.intake-work-footer .intake-worker-field b{color:#155e43;font-size:13px}
.intake-work-footer .work-check {
    display: flex;
    align-items: center;
    gap: 8px;
}
.intake-work-footer .work-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: none;
}
.orders-page .service-picker {
    display: block;
    min-width: 0;
    padding: 12px;
}
.orders-page .service-picker legend {
    padding: 0 5px;
    font-size: 14px;
}
.intake-directions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.intake-direction-choice {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #cbd5d0;
    border-radius: 10px;
    background: #f7faf8;
    color: #253530;
    text-align: left;
    cursor: pointer;
}
.intake-direction-choice:hover,
.intake-direction-choice:focus-visible {
    border-color: #16866b;
    outline: 2px solid #b8dfd2;
    outline-offset: 1px;
}
.intake-direction-choice[aria-pressed="true"] {
    border-color: #16866b;
    background: #e3f4ed;
    box-shadow: inset 4px 0 #16866b;
}
.intake-direction-choice b,
.intake-direction-choice small {
    display: block;
}
.intake-direction-choice b { font-size: 14px; }
.intake-direction-choice small { margin-top: 3px; font-size: 11px; color: #61746b; }
.intake-service-hint {
    margin: 12px 2px 2px;
    color: #61746b;
    font-size: 13px;
}
.intake-service-group[hidden],
.intake-service-hint[hidden] { display: none !important; }
.intake-service-group h2 {
    margin: 14px 2px 9px;
    font-size: 16px;
}
.intake-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 7px;
}
.orders-page .intake-service-grid label {
    min-width: 0;
    min-height: 58px;
    padding: 9px 11px;
    border: 1px solid #e3e9e6;
    background: #f6f8f7;
    cursor: pointer;
}
.orders-page .intake-service-grid label:has(input:checked) {
    border-color: #16866b;
    background: #e9f7f0;
}
.orders-page .intake-service-grid label span { min-width: 0; }
.orders-page .intake-service-grid label b { font-size: 13px; line-height: 1.2; }
.orders-page .intake-service-grid label small { margin-top: 3px; font-size: 11px; line-height: 1.25; }
.wash-card-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; margin-top: 5px; }
.wash-card-meta strong { color: #086849; font-size: 16px; font-weight: 900; line-height: 1.1; }
.orders-page .intake-service-grid .wash-card-meta small { margin: 0; font-size: 11px; }
.wash-group-explainer {
    margin: 2px 2px 6px;
    color: #5f7169;
    font-size: 12px;
    line-height: 1.35;
}
.intake-wash-base-grid .intake-service-option.is-base {
    min-height: 70px;
    border-color: #cbded4;
    background: #f1f8f4;
}
.intake-wash-base-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wash-base-includes {
    display: block;
    margin-top: 5px;
    color: #506b5d;
    font-size: 11px;
    font-style: normal;
    line-height: 1.25;
}
.wash-service-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    position: sticky;
    top: 0;
    z-index: var(--layer-content-raised);
    padding: 4px 0 8px;
    background: #fff;
}
.wash-service-tabs:has([data-wash-tab="special"]) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wash-service-tabs button {
    min-height: 38px;
    padding: 6px 8px;
    border: 1px solid #cbdad2;
    border-radius: 8px;
    background: #f4f8f6;
    color: #284638;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}
.wash-service-tabs button[aria-selected="true"] {
    border-color: #16866b;
    background: #dff3e9;
    box-shadow: inset 0 -3px #16866b;
}
.wash-service-tabs button:focus-visible { outline: 2px solid #16866b; outline-offset: 2px; }
.wash-service-panel[hidden] { display: none !important; }
.wash-service-panel > h2 { margin-top: 5px; }
.wash-choice-group { margin: 9px 0 14px; }
.wash-choice-heading { margin: 0 0 7px; color: #244c3c; font-size: 13px; font-weight: 800; }
.wash-choice-none { display: inline-flex; align-items: center; gap: 7px; margin-top: 7px; padding: 5px 8px; border: 1px solid #dce5e0; border-radius: 7px; background: #f4f8f6; font-size: 12px; cursor: pointer; }
.wash-choice-none:has(input:checked) { border-color: #16866b; background: #e5f5ec; }
.wash-choice-none input { width: 17px !important; height: 17px !important; }
.orders-page .intake-service-grid input[type="radio"],
.orders-page .intake-service-grid input[type="checkbox"] {
    flex: none;
    width: 18px;
    height: 18px;
}
.wash-standalone-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0 6px;
    padding: 7px 10px;
    color: #456055;
    font-size: 12px;
    cursor: pointer;
}
.wash-standalone-choice input[type="radio"] {
    flex: none;
    width: 18px;
    height: 18px;
}
.intake-service-group .wash-addon-heading {
    margin-top: 18px;
    padding-top: 13px;
    border-top: 1px solid #dce5e0;
}
.wash-addon-subtitle {
    margin: 11px 2px 7px;
    font-size: 13px;
    color: #50655a;
}
.orders-page .intake-service-grid label.is-included {
    border-color: #dce5e0;
    background: #f0f3f1;
    color: #67766f;
    cursor: default;
}
.wash-included-note {
    display: block;
    margin-top: 3px;
    color: #197452;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}
.wash-included-note[hidden] { display: none; }

@media (min-width: 1101px) and (max-width: 1350px) {
    .intake-wash-base-grid .wash-base-includes { display: none; }
}

@media (max-width: 1100px) {
    .intake-work-pane-heading { grid-template-columns: 1fr; }
    .intake-price-summary { text-align: left; }
    .orders-page.is-create .operation-form-panel { overflow: auto; }
    .orders-page.is-create .operation-form { flex: none; }
    .orders-page.is-create .intake-columns { display: block; height: auto; }
    .intake-identity-pane,
    .intake-work-pane { overflow: visible; margin-bottom: 10px; }
    .intake-work-details { overflow: visible; }
}

@media (max-width: 700px) {
    .orders-page.is-create .page-shell { padding: 6px !important; }
    .staff-schedule-page .staff-schedule-shell { width: 100%; margin: 0; padding: 12px; }
    .orders-page.is-create .operation-form-panel > div:first-child { display: block; }
    .intake-directions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .intake-service-grid { grid-template-columns: 1fr; }
    .intake-work-footer { grid-template-columns: 1fr; }
    .intake-work-footer > * { grid-column: 1 / -1; }
    .work-order-page .workflow-form { grid-template-columns: 1fr; }
}
