/* Responsive workshop surfaces; scoped to the three business pages. */
.workshop-ui { overflow-wrap: anywhere; }
.workshop-ui *, .workshop-ui *::before, .workshop-ui *::after { box-sizing: border-box; }
.workshop-ui main, .workshop-ui section, .workshop-ui form, .workshop-ui .topbar > div { min-width: 0; }
.workshop-ui input, .workshop-ui select, .workshop-ui textarea { max-width: 100%; min-width: 0; }
.workshop-ui input:not([type="checkbox"]), .workshop-ui select, .workshop-ui textarea { font-size: 16px; }
.workshop-ui button, .workshop-ui a { touch-action: manipulation; }
.workshop-ui button:disabled { opacity: .58; cursor: wait; }
.workshop-ui [hidden], .workshop-ui .hidden { display: none !important; }
.workshop-ui :focus-visible { outline: 3px solid #2096ee; outline-offset: 3px; }
.workshop-ui .workshop-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px clamp(14px, 4vw, 46px); padding: 14px 16px; border: 1px solid #bad8ef; border-radius: 14px; background: #edf7ff; color: #174e77; font-size: 14px; }
.workshop-ui .workshop-notice button { flex: 0 0 auto; }
.workshop-ui .workshop-error { color: #a52a34; }
.workshop-ui .workshop-warning { display: block; color: #8a620e; padding: 8px 0; }
.workshop-ui .workshop-proposal, .workshop-ui .workshop-diagnosis { display: grid; gap: 12px; padding: 16px; margin-top: 12px; border: 1px solid #d9e5ef; border-radius: 12px; background: #f4f9fd; }
.workshop-ui .workshop-proposal label, .workshop-ui .workshop-diagnosis label { display: grid; gap: 6px; color: #52697d; font-size: 13px; }
.workshop-ui .workshop-diagnosis textarea { min-height: 90px; resize: vertical; }
.workshop-ui .workshop-lines { display: grid; gap: 8px; margin: 12px 0; }
.workshop-ui .workshop-lines > div { padding: 12px; border: 1px solid #dce7ef; border-radius: 10px; background: #fff; }
.workshop-ui .workshop-lines small { display: block; margin-top: 4px; color: #62778b; }
.workshop-ui .workshop-weekdays { min-width: 0; margin: 0; padding: 0; border: 0; }
.workshop-ui .workshop-weekdays legend { margin-bottom: 8px; color: #576a7d; font-size: 12px; font-weight: 750; }
.workshop-ui .weekday-grid { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
.workshop-ui .weekday-grid label { display: flex; align-items: center; gap: 5px; min-height: 42px; padding: 8px; }
.workshop-ui .weekday-grid input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; }
.workshop-ui .catalog-work-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.workshop-ui .catalog-work-form select, .workshop-ui .catalog-work-form [name="title"] { grid-column: 1 / -1; }
.workshop-ui .catalog-work-form button { grid-column: 1 / -1; }
.workshop-ui .workshop-category-picker { display: grid; gap: 7px; margin-top: 16px; font-size: 13px; font-weight: 700; color: #245b83; }
.workshop-ui .workshop-category-picker select { width: 100%; }
.workshop-ui .workshop-category-hint { display: block; margin: 8px 0 12px; line-height: 1.5; color: #52697d; }
.workshop-ui .workshop-order-items { min-width: 0; margin: 0; padding: 0; border: 0; }
.workshop-ui .workshop-order-items legend { font-size: 13px; font-weight: 700; color: #52697d; }
.workshop-ui .workshop-order-items:disabled { opacity: .6; }
.workshop-ui .workshop-category-options { min-width: 0; margin: 0; padding: 12px; border: 1px solid #d4e2ed; border-radius: 12px; }
.workshop-ui .workshop-category-options legend { color: #245b83; font-size: 13px; font-weight: 700; }
.workshop-ui .workshop-category-options > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 5px 12px; margin-top: 8px; }
.workshop-ui .workshop-category-options label { display: flex; align-items: center; gap: 8px; min-height: 42px; font-size: 13px; color: #52697d; }
.workshop-ui .workshop-category-options input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; }
.workshop-ui .workshop-catalog-assignment { display: grid; gap: 10px; margin-top: 10px; }
.workshop-ui .workshop-catalog-categories { margin-top: 10px; }
.workshop-ui .workshop-catalog-categories summary { padding: 8px 0; cursor: pointer; color: #245b83; font-size: 13px; line-height: 1.5; }
.workshop-ui .workshop-line-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.workshop-ui .workshop-line-editor label { display: grid; min-width: 0; gap: 5px; font-size: 13px; color: #52697d; }
.workshop-ui .workshop-line-editor label:first-child, .workshop-ui .workshop-line-editor p { grid-column: 1 / -1; }
.workshop-ui .workshop-line-editor input, .workshop-ui .workshop-line-editor select { width: 100%; }
.workshop-ui .workshop-line-editor button { grid-column: 1 / -1; width: 100%; }
.workshop-ui .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.workshop-ui .row-actions > * { max-width: 100%; }
.workshop-ui .registration-consent { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.workshop-ui .registration-consent input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; }
.workshop-ui #appointmentsList, .workshop-ui #workOrdersList { scroll-margin-top: 130px; }
@media (max-width: 1000px) {
  .workshop-ui.pilot-full-sto .sto-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .workshop-ui .topbar { flex-wrap: wrap; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .workshop-ui .topbar h1 { font-size: 19px; }
  .workshop-ui .top-actions { display: flex; flex: 1 1 100%; width: 100%; min-width: 0; margin-left: 0; gap: 8px; }
  .workshop-ui .top-actions select:not(.locale-switch) { flex: 1 1 120px; width: 0; }
  .workshop-ui .top-actions .locale-switch { flex: 0 0 65px; width: 65px; padding: 8px; }
  .workshop-ui .flow-hero, .workshop-ui .passport-head { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .workshop-ui .flow-hero h2 { font-size: 25px; }
  .workshop-ui .workshop-notice { align-items: stretch; flex-direction: column; }
  .workshop-ui .work-order-totals { display: grid; gap: 8px; }
  .workshop-ui .work-order-head { flex-wrap: wrap; gap: 8px; }
  .workshop-ui .registration-progress { grid-template-columns: 1fr; }
  .workshop-ui .flow-layout { grid-template-columns: 1fr; }
  .workshop-ui .flow-form, .workshop-ui .staff-form { grid-template-columns: 1fr; }
  .workshop-ui .inline-work-form input { width: 100%; }
}

@media (max-width: 700px) {
  .workshop-ui.pilot-full-sto .full-pilot-sidebar { position: fixed; z-index: 45; inset: auto 0 0; display: block; width: 100%; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #dbe5ef; background: #fff; }
  .workshop-ui.pilot-full-sto .full-pilot-sidebar > :not(nav) { display: none; }
  .workshop-ui.pilot-full-sto .full-pilot-sidebar nav { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
  .workshop-ui.pilot-full-sto .full-pilot-nav { justify-content: center; min-width: 0; min-height: 46px; padding: 8px; border-radius: 12px; color: #647c91; }
  .workshop-ui.pilot-full-sto .full-pilot-nav.active { background: #e8f4ff; color: #147ed9; }
  .workshop-ui.pilot-full-sto .full-pilot-nav b { background: transparent; }
  .workshop-ui.pilot-full-sto .sto-grid { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

.workshop-ui .topbar { margin: 0; }
.workshop-ui.pilot-full-sto .shell { width: calc(100% - 260px); max-width: none; }
@media (max-width: 1000px) { .workshop-ui.pilot-full-sto .shell { width: calc(100% - 82px); } }
@media (max-width: 700px) { .workshop-ui.pilot-full-sto .shell { width: 100%; } }

.workshop-ui .registration-feedback { width: auto; max-width: 100%; }
.workshop-ui .workspace .trust-badge, .workshop-ui .sto-dashboard-heading .trust-badge { color: #17699e; border-color: #bdddf3; background: #edf7ff; }
.workshop-ui main button:not(.ghost-btn):not(.danger-btn):not(.icon-btn):not(.service-list-card):not(.sto-attention-item) { box-shadow: none; }
.workshop-ui .workspace button[type="submit"] { background: #1687e8; color: #fff; border-color: #1687e8; }
@media (max-width: 700px) {
  .workshop-ui.pilot-full-sto .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .workshop-ui.pilot-full-sto .stats .stat-card { min-width: 0; min-height: 85px; padding: 14px; }
  .workshop-ui.pilot-full-sto .stats .stat-card strong { font-size: 21px; }
  .workshop-ui.pilot-full-sto .stats .stat-card:last-child { grid-column: 1 / -1; }
}

.workshop-ui .flow-hero .trust-badge, .workshop-ui .sto-hero .trust-badge { color: #e3f5ff; border: 1px solid #ffffff40; background: #ffffff16; }

.workshop-ui .workshop-assignment { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 14px; border: 1px solid #d4e2ed; border-radius: 12px; background: #fff; }
.workshop-ui .workshop-assignment legend { color: #245b83; font-size: 13px; font-weight: 750; }
.workshop-ui .workshop-inspections { display: grid; gap: 12px; margin-top: 18px; }
.workshop-ui .workshop-inspections h3 { margin: 0; font-size: 17px; }
.workshop-ui .workshop-inspection { display: grid; gap: 8px; padding: 14px; border: 1px solid #d3e4ef; border-radius: 12px; background: #f5faff; }
.workshop-ui .workshop-defect { display: grid; gap: 5px; margin-top: 8px; padding-top: 12px; border-top: 1px solid #d8e6f0; }
.workshop-ui .workshop-defect p { margin: 5px 0; font-size: 14px; }
.workshop-ui .workshop-inspection-media { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 9px; }
.workshop-ui .workshop-inspection-media img { display: block; width: 100%; max-height: 340px; object-fit: contain; border-radius: 10px; background: #e7eef4; }
