/* Targeted CCHAP corrections — Admin Dashboard intentionally excluded. */

/* Admin Orders: compact heading and one aligned filter row. */
body.cchap-ui .cchap-orders-page .order-filter-panel{padding:.65rem .75rem!important;}
body.cchap-ui .cchap-orders-page .cchap-filter-heading{margin:0 0 .4rem!important;min-height:0;}
body.cchap-ui .cchap-orders-page .order-filter-kicker{display:block;line-height:1.1;}
body.cchap-ui .cchap-orders-page .cchap-order-filter-grid{align-items:end;gap:.5rem;}
body.cchap-ui .cchap-orders-page .cchap-order-filter-grid .form-label{margin-bottom:.25rem;}

/* Production Schedule: slightly larger, matching the Orders compact summaries. */
body.cchap-ui .cchap-production-page .queue-status-strip{grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem;margin-bottom:.7rem;}
body.cchap-ui .cchap-production-page .queue-status-pill{min-height:54px!important;padding:.55rem .7rem!important;border-radius:.72rem;display:flex;align-items:center;justify-content:space-between;gap:.6rem;}
body.cchap-ui .cchap-production-page .queue-status-pill span{font-size:.72rem;font-weight:700;}
body.cchap-ui .cchap-production-page .queue-status-pill strong{font-size:1rem;line-height:1;}

/* Admin + Client Chat: stream scrolls independently; composer never overlays messages. */
body.cchap-ui .cchap-chat-page .customer-chat-card{display:flex;flex-direction:column;overflow:hidden!important;min-height:0!important;}
body.cchap-ui .cchap-chat-page .customer-chat-header{flex:0 0 auto;}
body.cchap-ui .cchap-chat-page .customer-chat-stream{display:flex!important;flex-direction:column!important;align-content:initial!important;flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable;padding:.75rem!important;gap:.6rem!important;}
body.cchap-ui .cchap-chat-page .customer-message-row{position:relative;display:flex!important;flex:0 0 auto;min-width:0;width:100%;margin:0!important;clear:both;}
body.cchap-ui .cchap-chat-page .customer-message-bubble{position:relative;min-width:0;max-width:min(76%,680px);height:auto!important;overflow:visible;}
body.cchap-ui .cchap-chat-page .customer-service-card{position:relative!important;float:none!important;width:min(100%,440px)!important;max-width:min(92%,440px)!important;height:auto!important;}
body.cchap-ui .cchap-chat-page .customer-chat-composer.cchap-chat-composer{position:relative;z-index:2;flex:0 0 auto;background:#fff;box-shadow:0 -1px 0 #edf1ee;}

/* Admin + Client Notifications: compact notification rows. */
body.cchap-ui .cchap-notifications-page .notifications-card{padding:.35rem!important;}
body.cchap-ui .cchap-notifications-page .notification-list{gap:.3rem!important;}
body.cchap-ui .cchap-notifications-page .notification-item{grid-template-columns:1.85rem minmax(0,1fr);gap:.5rem;padding:.48rem .58rem!important;border-radius:.65rem;}
body.cchap-ui .cchap-notifications-page .notification-icon{width:1.85rem;height:1.85rem;font-size:.78rem;border-radius:.55rem;}
body.cchap-ui .cchap-notifications-page .notification-title-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:.5rem;margin:0;}
body.cchap-ui .cchap-notifications-page .notification-title-row h2{line-height:1.25;}
body.cchap-ui .cchap-notifications-page .notification-title-row time{text-align:right;white-space:nowrap;}
body.cchap-ui .cchap-notifications-page .notification-content p{margin:.08rem 0 .28rem!important;line-height:1.28;}
body.cchap-ui .cchap-notifications-page .notification-actions{gap:.3rem;min-height:0;}
body.cchap-ui .cchap-notifications-page .notification-actions .btn{padding:.22rem .48rem;font-size:.7rem;line-height:1.2;}

/* Client Details: email gets more room; filters are one concise row. */
body.cchap-ui .cchap-client-details-page .client-profile-grid{grid-template-columns:minmax(260px,2fr) minmax(145px,1fr) minmax(155px,1fr) minmax(110px,.7fr)!important;align-items:stretch;}
body.cchap-ui .cchap-client-details-page .client-profile-grid>div{display:flex;flex-direction:column;justify-content:center;}
body.cchap-ui .cchap-client-details-page .client-history-filter-card{padding:.6rem .7rem!important;}
body.cchap-ui .cchap-client-details-page .client-history-filter-heading{margin-bottom:.38rem;line-height:1;}
body.cchap-ui .cchap-client-details-page .client-history-filter-grid{grid-template-columns:minmax(115px,.72fr) minmax(120px,.78fr) minmax(95px,.58fr) minmax(210px,1.45fr) auto!important;gap:.48rem;align-items:end;}
body.cchap-ui .cchap-client-details-page .client-history-filter-reset{display:flex;align-items:end;}
body.cchap-ui .cchap-client-details-page .client-history-filter-reset .btn{white-space:nowrap;min-height:2.35rem;}

/* Settings: General left; Contact + Upload stack on the right; Queue below. */
body.cchap-ui .admin-settings-page .cchap-settings-upper-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.8fr);gap:.75rem;align-items:start;}
body.cchap-ui .admin-settings-page .cchap-settings-left-column,
body.cchap-ui .admin-settings-page .cchap-settings-right-column{display:grid;gap:.75rem;align-content:start;min-width:0;}
body.cchap-ui .admin-settings-page .cchap-settings-queue-row{margin-top:.75rem;}
body.cchap-ui .admin-settings-page .settings-group-card{height:auto!important;min-height:0!important;padding:.8rem!important;margin:0!important;}
body.cchap-ui .admin-settings-page .settings-group-contact,
body.cchap-ui .admin-settings-page .settings-group-upload{align-self:start;}
body.cchap-ui .admin-settings-page .settings-group-card textarea{resize:vertical;}
body.cchap-ui .admin-settings-page .settings-group-card textarea[rows="4"]{min-height:4.4rem!important;}
body.cchap-ui .admin-settings-page .settings-group-card textarea[rows="6"]{min-height:5.8rem!important;}

/* Admin Order Review: schedule occupies the left-side space below Request Details. */
body.cchap-ui .admin-order-review-page .admin-order-main{display:flex!important;flex-direction:column;gap:.7rem;align-self:start;}
body.cchap-ui .admin-order-review-page .admin-order-side{display:flex!important;flex-direction:column;gap:.7rem;align-self:start;}
body.cchap-ui .admin-order-review-page .admin-order-production-card{height:auto!important;min-height:0!important;}
body.cchap-ui .admin-order-review-page .admin-order-production-heading{display:flex;align-items:center;justify-content:space-between;gap:.7rem;flex-wrap:wrap;}
body.cchap-ui .admin-order-review-page .admin-order-production-card .admin-queue-inline{padding:.45rem 0 0;}

/* Service specification: content-based service header; Quantity + Pick-Up stay aligned. */
body.cchap-ui .cchap-order-create-page .service-picker-product{grid-template-columns:145px minmax(0,1fr)!important;gap:.75rem!important;padding:.7rem!important;align-items:center;}
body.cchap-ui .cchap-order-create-page .service-picker-product__image,
body.cchap-ui .cchap-order-create-page .service-gallery{height:110px!important;min-height:110px!important;}
body.cchap-ui .cchap-order-create-page .service-picker-product__info h2{font-size:1.15rem!important;margin:.25rem 0!important;}
body.cchap-ui .cchap-order-create-page .service-picker-product__info p{font-size:.76rem;line-height:1.35;margin:0!important;}
body.cchap-ui .cchap-order-create-page .service-combined-order-row{align-items:end;}
body.cchap-ui .cchap-order-create-page .service-combined-field{height:auto!important;min-height:0!important;}

/* My Orders: same clean hierarchy as quotation cards, without decorative icon/mini boxes. */
body.cchap-ui .cchap-customer-orders-page .customer-order-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
body.cchap-ui .cchap-customer-orders-page .cchap-my-order-card{display:flex;flex-direction:column;height:auto!important;min-height:0!important;}
body.cchap-ui .cchap-customer-orders-page .customer-order-card__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:.65rem;}
body.cchap-ui .cchap-customer-orders-page .customer-order-card__heading h2{margin:0!important;line-height:1.25;}
body.cchap-ui .cchap-customer-orders-page .customer-order-card__heading .badge{flex:0 0 auto;}
body.cchap-ui .cchap-customer-orders-page .customer-order-facts{display:grid;gap:0;margin:.35rem 0 .55rem;}
body.cchap-ui .cchap-customer-orders-page .customer-order-facts>div{display:grid;grid-template-columns:minmax(105px,.8fr) minmax(0,1.2fr);gap:.6rem;align-items:baseline;padding:.38rem 0;border-bottom:1px solid #edf2ef;}
body.cchap-ui .cchap-customer-orders-page .customer-order-facts dt{color:#6d8078;font-size:.72rem;font-weight:600;}
body.cchap-ui .cchap-customer-orders-page .customer-order-facts dd{margin:0;text-align:right;font-size:.8rem;font-weight:800;color:#173d31;}
body.cchap-ui .cchap-customer-orders-page .cchap-my-order-card .order-card-link{margin-top:auto;padding-top:.2rem;}

/* Specific My Order / Quotation / Schedule record: timeline owns pickup + priority. */
body.cchap-ui .cchap-order-detail-page .order-progress-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.7rem;align-items:start;}
body.cchap-ui .cchap-order-detail-page .order-completion-summary{display:flex;justify-content:flex-end;gap:.45rem;max-width:none!important;}
body.cchap-ui .cchap-order-detail-page .order-completion-summary>div{min-width:155px;}
body.cchap-ui .cchap-order-detail-page .order-timeline-priority{border:1px solid #d9e7e0;border-radius:.6rem;background:#f8fbf9;padding:.4rem .55rem!important;}
body.cchap-ui .cchap-order-detail-page .order-overview-grid{grid-template-columns:minmax(0,1.6fr) minmax(260px,.7fr);}

/* Login: true vertical centering on the visual panel, not manual offsets. */
body.cchap-ui.portal-ui-v3 .auth-visual{display:flex;align-items:center!important;justify-content:flex-start;}
body.cchap-ui.portal-ui-v3 .auth-visual-content{margin:0!important;transform:none!important;}
body.cchap-ui.portal-ui-v3 .auth-system-name{margin:.45rem 0 .35rem;color:#fff;font-size:clamp(1.1rem,1.8vw,1.55rem);font-weight:700;}
body.cchap-ui.portal-ui-v3 .auth-visual h1{margin:.35rem 0 1.1rem!important;}

@media (max-width:1199.98px){
 body.cchap-ui .cchap-client-details-page .client-profile-grid{grid-template-columns:minmax(240px,1.6fr) repeat(3,minmax(125px,1fr))!important;}
 body.cchap-ui .admin-settings-page .cchap-settings-upper-grid{grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);}
}
@media (max-width:991.98px){
 body.cchap-ui .cchap-production-page .queue-status-strip{grid-template-columns:repeat(2,minmax(0,1fr));}
 body.cchap-ui .cchap-client-details-page .client-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 body.cchap-ui .cchap-client-details-page .client-history-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 body.cchap-ui .cchap-client-details-page .client-history-filter-reset{align-items:stretch;}
 body.cchap-ui .admin-settings-page .cchap-settings-upper-grid{grid-template-columns:1fr;}
 body.cchap-ui .cchap-order-detail-page .order-progress-heading{grid-template-columns:1fr;}
 body.cchap-ui .cchap-order-detail-page .order-completion-summary{justify-content:flex-start;flex-wrap:wrap;}
}
@media (max-width:767.98px){
 body.cchap-ui .cchap-customer-orders-page .customer-order-grid{grid-template-columns:1fr!important;}
 body.cchap-ui .cchap-order-create-page .service-picker-product{grid-template-columns:1fr!important;}
 body.cchap-ui .cchap-order-create-page .service-picker-product__image,
 body.cchap-ui .cchap-order-create-page .service-gallery{height:150px!important;}
}
@media (max-width:575.98px){
 body.cchap-ui .cchap-production-page .queue-status-strip,
 body.cchap-ui .cchap-client-details-page .client-profile-grid,
 body.cchap-ui .cchap-client-details-page .client-history-filter-grid{grid-template-columns:1fr!important;}
 body.cchap-ui .cchap-notifications-page .notification-title-row{grid-template-columns:1fr;}
 body.cchap-ui .cchap-notifications-page .notification-title-row time{text-align:left;white-space:normal;}
 body.cchap-ui .cchap-order-detail-page .order-completion-summary{display:grid;grid-template-columns:1fr 1fr;width:100%;}
 body.cchap-ui .cchap-order-detail-page .order-completion-summary>div{min-width:0;}
}

/* Forecast History + Forecast Details: dashboard stays in-place; details focus on four services. */
body.cchap-ui .dashboard-forecast-history-status{
    min-height:.9rem;
    color:#71837d;
    font-size:.67rem;
    line-height:1.2;
}
body.cchap-ui .dashboard-forecast-details-link{
    align-self:flex-start;
    margin-top:.55rem;
    color:#0b7a58;
    font-size:.76rem;
    font-weight:800;
    text-decoration:underline;
    text-underline-offset:3px;
}
body.cchap-ui .dashboard-forecast-details-link:hover{color:#075a41;}

body.cchap-ui .forecast-details-page .forecast-back-link{
    display:inline-flex;
    align-items:center;
    gap:.35rem;
    margin-bottom:.65rem;
    color:#0b7a58;
    font-size:.8rem;
    font-weight:800;
    text-decoration:none;
}
body.cchap-ui .forecast-details-page .forecast-back-link:hover{text-decoration:underline;}
body.cchap-ui .forecast-details-page .forecast-details-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    margin-bottom:.85rem;
    padding:.85rem 1rem;
    border:1px solid #dfe9e5;
    border-radius:14px;
    background:#fff;
}
body.cchap-ui .forecast-details-page .forecast-details-header h1{
    margin:0;
    color:#173d31;
    font-size:clamp(1.25rem,1.8vw,1.65rem);
    line-height:1.15;
}
body.cchap-ui .forecast-details-page .forecast-details-header p{
    margin:.2rem 0 0;
    color:#6d8078;
    font-size:.78rem;
}
body.cchap-ui .forecast-details-page .forecast-generate-form{flex:0 0 auto;}
body.cchap-ui .forecast-details-page .forecast-generate-form .btn{white-space:nowrap;}
body.cchap-ui .forecast-details-page .forecast-service-list{
    border:1px solid #dfe9e5;
    border-radius:16px;
    background:#fff;
    overflow:hidden;
}
body.cchap-ui .forecast-details-page .forecast-detail-section{
    padding:1rem 1.05rem;
    min-width:0;
}
body.cchap-ui .forecast-details-page .forecast-detail-section.has-separator{
    border-top:1px solid #dfe9e5;
}
body.cchap-ui .forecast-details-page .forecast-detail-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:.75rem;
    margin-bottom:.55rem;
}
body.cchap-ui .forecast-details-page .forecast-detail-heading h2{
    margin:0;
    color:#173d31;
    font-size:1rem;
    line-height:1.2;
}
body.cchap-ui .forecast-details-page .forecast-detail-heading span:not(.forecast-model-chip){
    display:block;
    margin-top:.15rem;
    color:#72847d;
    font-size:.7rem;
}
body.cchap-ui .forecast-details-page .forecast-model-chip{
    flex:0 0 auto;
    padding:.28rem .55rem;
    border:1px solid #cfe3da;
    border-radius:999px;
    background:#f2faf6;
    color:#0b7a58;
    font-size:.7rem;
    font-weight:800;
    white-space:nowrap;
}
body.cchap-ui .forecast-details-page .forecast-detail-chart-wrap{
    width:100%;
    height:270px;
    min-height:0!important;
    padding:.25rem 0 .15rem;
}
body.cchap-ui .forecast-details-page .forecast-detail-chart-wrap canvas{
    width:100%!important;
    height:100%!important;
}
body.cchap-ui .forecast-details-page .forecast-chart-empty{
    padding:1rem;
    border:1px dashed #d7e4de;
    border-radius:10px;
    background:#fafcfb;
    color:#71837d;
    font-size:.76rem;
}
body.cchap-ui .forecast-details-page .forecast-detail-metrics{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:0;
    margin-top:.65rem;
    border:1px solid #dfe9e5;
    border-radius:11px;
    overflow:hidden;
    background:#fbfdfc;
}
body.cchap-ui .forecast-details-page .forecast-detail-metrics>div{
    min-width:0;
    padding:.55rem .65rem;
    text-align:center;
}
body.cchap-ui .forecast-details-page .forecast-detail-metrics>div+div{border-left:1px solid #e3ece7;}
body.cchap-ui .forecast-details-page .forecast-detail-metrics span{
    display:block;
    color:#71837d;
    font-size:.66rem;
    font-weight:750;
    line-height:1.15;
}
body.cchap-ui .forecast-details-page .forecast-detail-metrics strong{
    display:block;
    margin-top:.15rem;
    color:#173d31;
    font-size:1rem;
    font-variant-numeric:tabular-nums;
}
body.cchap-ui .forecast-details-page .forecast-empty-state{
    display:flex;
    align-items:center;
    gap:.8rem;
    padding:1rem!important;
    margin-bottom:.8rem;
}
body.cchap-ui .forecast-details-page .forecast-empty-state>i{color:#0b7a58;font-size:1.35rem;}
body.cchap-ui .forecast-details-page .forecast-empty-state h2{margin:0 0 .15rem;font-size:1rem;}
body.cchap-ui .forecast-details-page .forecast-settings-compact{
    margin-top:.85rem;
    padding:.8rem .9rem!important;
}
body.cchap-ui .forecast-details-page .forecast-settings-heading h2{margin:0;font-size:.95rem;color:#173d31;}
body.cchap-ui .forecast-details-page .forecast-settings-heading p{margin:.15rem 0 .55rem;color:#71837d;font-size:.7rem;}
body.cchap-ui .forecast-details-page .forecast-settings-grid{
    display:grid;
    grid-template-columns:minmax(250px,1.5fr) minmax(180px,.75fr) auto;
    gap:.6rem;
    align-items:end;
}
body.cchap-ui .forecast-details-page .forecast-settings-grid .form-label{margin-bottom:.25rem;font-size:.72rem;font-weight:700;}
body.cchap-ui .forecast-details-page .forecast-settings-action{display:flex;align-items:end;}
body.cchap-ui .forecast-details-page .forecast-settings-action .btn{white-space:nowrap;}

@media (max-width:991.98px){
 body.cchap-ui .forecast-details-page .forecast-details-header{align-items:flex-start;}
 body.cchap-ui .forecast-details-page .forecast-detail-chart-wrap{height:245px;}
 body.cchap-ui .forecast-details-page .forecast-settings-grid{grid-template-columns:1fr 1fr;}
 body.cchap-ui .forecast-details-page .forecast-settings-action{grid-column:1/-1;}
}
@media (max-width:767.98px){
 body.cchap-ui .forecast-details-page .forecast-details-header{flex-direction:column;}
 body.cchap-ui .forecast-details-page .forecast-generate-form{width:100%;}
 body.cchap-ui .forecast-details-page .forecast-generate-form .btn{width:100%;}
 body.cchap-ui .forecast-details-page .forecast-detail-heading{align-items:center;}
 body.cchap-ui .forecast-details-page .forecast-detail-chart-wrap{height:230px;}
 body.cchap-ui .forecast-details-page .forecast-detail-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
 body.cchap-ui .forecast-details-page .forecast-detail-metrics>div+div{border-left:0;}
 body.cchap-ui .forecast-details-page .forecast-detail-metrics>div:nth-child(even){border-left:1px solid #e3ece7;}
 body.cchap-ui .forecast-details-page .forecast-detail-metrics>div:nth-child(n+3){border-top:1px solid #e3ece7;}
 body.cchap-ui .forecast-details-page .forecast-settings-grid{grid-template-columns:1fr;}
 body.cchap-ui .forecast-details-page .forecast-settings-action{grid-column:auto;}
}


/* Client service forms: align related specifications and remove unused grid cells. */
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid { align-items: start; align-content: start; gap: 0; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group { order: 10; height: auto; min-height: 0; align-self: start; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--tarpaulin-size { order: 1; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--tarpaulin-customer { order: 2; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--sticker-size { order: 1; grid-column: 1 / -1; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--width { order: 3; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--height { order: 4; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--laser-material { order: 1; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--laser-category { order: 2; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--combined-order { order: 20; grid-column: 1 / -1; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group { border-right: 0; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--tarpaulin-size,
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--laser-material,
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--width { border-right: 1px solid #edf2ef; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--width .service-picker-input-wrap,
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--height .service-picker-input-wrap { min-width: 0; }
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--width .service-picker-text,
body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--height .service-picker-text { flex: 1 1 auto; min-width: 0; }
@media (max-width: 991.98px) {
    body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group { border-right: 0 !important; }
    body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--sticker-size,
    body.cchap-ui .cchap-order-create-page .service-picker-fields-grid > .service-picker-group--combined-order { grid-column: auto; }
}


/* Rejected Order actions only: separate the date control from both independent
   POST forms while retaining native HTML form association and validation.
   Desktop = date + two buttons in a row; narrow screens = date + button row. */
body.cchap-ui .cchap-order-detail-page .order-rejected-actions {
    display: grid;
    grid-template-columns: minmax(0, 232px) minmax(0, 1fr);
    align-items: end;
    column-gap: .85rem;
    row-gap: .65rem;
    width: 100%;
    min-width: 0;
}
body.cchap-ui .cchap-order-detail-page .order-rejected-date-field {
    width: 100%;
    min-width: 0;
}
body.cchap-ui .cchap-order-detail-page .order-rejected-date-field .form-label {
    display: block;
    margin-bottom: .35rem;
}
body.cchap-ui .cchap-order-detail-page .order-rejected-date-field .form-control {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
}
body.cchap-ui .cchap-order-detail-page .order-rejected-button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: flex-start;
    gap: .65rem;
    min-width: 0;
    width: 100%;
}
body.cchap-ui .cchap-order-detail-page .order-rejected-button-row > form {
    display: block;
    flex: 0 0 auto;
    width: auto;
    height: auto !important;
    min-height: 0 !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
body.cchap-ui .cchap-order-detail-page .order-rejected-button-row .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 44px;
    max-width: 100%;
    white-space: nowrap;
    vertical-align: bottom;
}
@media (max-width: 767.98px) {
    body.cchap-ui .cchap-order-detail-page .order-rejected-actions {
        grid-template-columns: minmax(0, 1fr);
        row-gap: .65rem;
    }
    body.cchap-ui .cchap-order-detail-page .order-rejected-button-row {
        align-items: stretch;
        gap: .55rem;
    }
    body.cchap-ui .cchap-order-detail-page .order-rejected-button-row .btn {
        padding-inline: .7rem;
    }
}

/* Targeted: final Laser Price, keep fields readable without tall blank cards. */
body.cchap-ui .laser-final-quotation-page .dashboard-heading{margin-bottom:.6rem;}
body.cchap-ui .laser-final-quotation-page .laser-final-quotation-form{padding:.9rem 1rem!important;}
body.cchap-ui .laser-final-quotation-page .laser-final-quotation-form .form-label{margin-bottom:.25rem;font-size:.85rem;}
body.cchap-ui .laser-final-quotation-page .laser-final-quotation-form .laser-duration-fields{min-width:0;}
body.cchap-ui .laser-final-quotation-page .laser-final-quotation-form .laser-duration-row{display:grid;grid-template-columns:repeat(2,minmax(0,150px));gap:.65rem;}
body.cchap-ui .laser-final-quotation-page .laser-material-price-panel{height:auto!important;}
body.cchap-ui .laser-final-quotation-page .laser-material-fields>div{min-width:0;}
body.cchap-ui .laser-final-quotation-page .laser-material-fields .input-group-text{padding:.35rem .48rem;font-size:.8rem;}
body.cchap-ui .laser-final-quotation-page .laser-charge-fields .input-group{min-width:0;}
body.cchap-ui .laser-final-quotation-page .laser-charge-fields .input-group-lg>.form-control{padding:.4rem .65rem;font-size:1rem;}
body.cchap-ui .laser-final-quotation-page .laser-charge-fields .input-group-lg>.input-group-text{padding:.4rem .65rem;font-size:.85rem;}
body.cchap-ui .laser-final-quotation-page .laser-total-bar{min-height:0;}
body.cchap-ui .laser-final-quotation-page .laser-total-bar strong{font-size:1.3rem!important;white-space:nowrap;}
body.cchap-ui .laser-final-quotation-page .laser-reference-card{height:auto!important;align-self:start;padding:.9rem!important;}
body.cchap-ui .laser-final-quotation-page .laser-reference-card .estimate-breakdown>div{padding:.4rem 0;}
body.cchap-ui .laser-final-quotation-page .laser-final-quotation-form textarea{min-height:64px;max-height:200px;resize:vertical;}
/* Place Payment & Release under Production Schedule in the wider main area. */
body.cchap-ui .admin-order-review-page .admin-order-payment-release-card{width:100%;min-width:0;}
body.cchap-ui .admin-order-review-page .admin-order-payment-release-card .order-detail-list{grid-template-columns:repeat(2,minmax(0,1fr));}
body.cchap-ui .admin-order-review-page .admin-order-payment-release-card .order-detail-list>div{grid-template-columns:minmax(120px,.85fr) minmax(0,1.15fr);align-items:baseline;}
body.cchap-ui .admin-order-review-page .admin-order-payment-release-card dt,
body.cchap-ui .admin-order-review-page .admin-order-payment-release-card dd{overflow-wrap:break-word;word-break:normal;min-width:0;}
@media(max-width:767.98px){
 body.cchap-ui .admin-order-review-page .admin-order-payment-release-card .order-detail-list{grid-template-columns:1fr;}
 body.cchap-ui .laser-final-quotation-page .laser-final-quotation-form{padding:.75rem!important;}
 body.cchap-ui .laser-final-quotation-page .laser-final-quotation-form .laser-duration-row{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:380px){body.cchap-ui .admin-order-review-page .admin-order-payment-release-card .order-detail-list>div{grid-template-columns:1fr;gap:.15rem;}}

/* Order Details: the mobile column rule must win over the desktop CCHAP
   override above. Scope to this page to protect other dashboards. */
@media (max-width:991.98px){
  body.cchap-ui .cchap-order-detail-page .order-overview-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:.85rem;
    align-items:start;
  }
  body.cchap-ui .cchap-order-detail-page .order-overview-grid > .content-card{
    width:100%;
    min-width:0;
    max-width:100%;
    height:auto;
    min-height:0;
    grid-column:auto;
  }
  body.cchap-ui .cchap-order-detail-page .order-overview-grid .order-pricing-card{
    position:static;
  }
  body.cchap-ui .cchap-order-detail-page .order-overview-grid .order-specifications-grid,
  body.cchap-ui .cchap-order-detail-page .order-overview-grid .estimate-breakdown{
    min-width:0;
  }
  body.cchap-ui .cchap-order-detail-page .order-specifications-grid > div{
    min-width:0;
  }
}
@media (max-width:767.98px){
  body.cchap-ui .cchap-order-detail-page .cchap-order-detail-header{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:.6rem;
    align-items:start;
  }
  body.cchap-ui .cchap-order-detail-page .cchap-order-detail-header > div{
    min-width:0;
  }
  body.cchap-ui .cchap-order-detail-page .cchap-order-detail-header .btn{
    max-width:100%;
    white-space:normal;
    overflow-wrap:normal;
  }
  body.cchap-ui .cchap-order-detail-page .order-progress-heading{
    grid-template-columns:minmax(0,1fr);
  }
  body.cchap-ui .cchap-order-detail-page .order-completion-summary{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-start;
    width:100%;
  }
  body.cchap-ui .cchap-order-detail-page .order-completion-summary > div{
    width:auto;
    min-width:0;
    max-width:100%;
  }
  body.cchap-ui .cchap-order-detail-page .order-timeline{
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:minmax(96px,1fr);
    width:100%;
    min-width:0;
    max-width:100%;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    padding-bottom:.65rem;
  }
  body.cchap-ui .cchap-order-detail-page .timeline-step{
    min-width:96px;
  }
  body.cchap-ui .cchap-order-detail-page .timeline-step small{
    white-space:normal;
    overflow-wrap:normal;
    word-break:normal;
    line-height:1.35;
  }
  body.cchap-ui .cchap-order-detail-page .order-specifications-grid{
    grid-template-columns:minmax(0,1fr);
    gap:.15rem;
  }
  body.cchap-ui .cchap-order-detail-page .order-specification-wide{
    grid-column:auto;
  }
  body.cchap-ui .cchap-order-detail-page .order-specifications-grid dt,
  body.cchap-ui .cchap-order-detail-page .order-specifications-grid dd{
    word-break:normal;
    overflow-wrap:break-word;
  }
  body.cchap-ui .cchap-order-detail-page .order-pricing-card .estimate-breakdown > div{
    display:flex;
    flex-wrap:wrap;
    align-items:baseline;
    gap:.25rem .65rem;
  }
  body.cchap-ui .cchap-order-detail-page .order-pricing-card .estimate-breakdown dt{
    flex:1 1 6.5rem;
    min-width:0;
    word-break:normal;
  }
  body.cchap-ui .cchap-order-detail-page .order-pricing-card .estimate-breakdown dd{
    flex:0 1 auto;
    max-width:100%;
    margin-left:auto;
    text-align:right;
    white-space:normal;
    overflow-wrap:normal;
    word-break:normal;
  }
  body.cchap-ui .cchap-order-detail-page .order-estimate-disclosure summary{
    flex-wrap:wrap;
    justify-content:space-between;
    gap:.3rem .65rem;
    min-width:0;
  }
  body.cchap-ui .cchap-order-detail-page .order-estimate-disclosure summary strong{
    max-width:100%;
    margin-left:auto;
    text-align:right;
    white-space:normal;
    word-break:normal;
  }
}
