/* SpeedTex Stage One Back Office — repair workspace and diagnostic workflow v0.58.34 */
:root {
  --st34-blue: #0878bc;
  --st34-navy: #062f52;
  --st34-green: #218653;
  --st34-red: #bd2d3a;
  --st34-gold: #9b6a00;
  --st34-text: #36546c;
  --st34-muted: #6b8294;
  --st34-line: #d6e3ec;
  --st34-soft: #f4f8fb;
}

.speedtex-repair-command {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: .65rem;
  align-items: stretch;
  margin: 0 0 .8rem;
  padding: .75rem;
  border: 1px solid #c6dce9;
  border-top: 4px solid var(--st34-blue);
  border-radius: .8rem;
  background: #fff;
  box-shadow: 0 5px 18px rgba(6,47,82,.06);
}
.speedtex-repair-command > div { min-width: 0; padding: .25rem .5rem; border-right: 1px solid var(--st34-line); }
.speedtex-repair-command span { display: block; color: var(--st34-muted); font-size: .65rem; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.speedtex-repair-command strong { display: block; margin-top: .12rem; overflow: hidden; color: var(--st34-navy); font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.speedtex-repair-command > a { display: grid; place-items: center; min-width: 9rem; padding: .55rem .75rem; border-radius: .55rem; color: #fff; background: var(--st34-blue); font-size: .79rem; font-weight: 850; text-align: center; text-decoration: none; }

.speedtex-repair-lines-panel { scroll-margin-top: 1rem; }
.speedtex-repair-line-list { display: grid; gap: .75rem; margin-top: .8rem; }
.speedtex-repair-line-card {
  display: grid;
  grid-template-columns: minmax(14rem, .8fr) minmax(20rem, 1.2fr);
  gap: 1rem;
  padding: .85rem;
  border: 1px solid var(--st34-line);
  border-radius: .72rem;
  background: #fff;
}
.speedtex-repair-line-summary > span { color: var(--st34-blue); font-size: .68rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.speedtex-repair-line-summary h3 { margin: .18rem 0 .08rem; color: var(--st34-navy); font-size: 1rem; }
.speedtex-repair-line-summary p { margin: 0 0 .55rem; color: var(--st34-text); font-size: .8rem; }
.speedtex-repair-line-summary dl { display: grid; gap: .28rem; margin: 0; }
.speedtex-repair-line-summary dl > div { display: flex; justify-content: space-between; gap: 1rem; padding-top: .28rem; border-top: 1px solid #e7eef3; }
.speedtex-repair-line-summary dt { color: var(--st34-muted); font-size: .72rem; }
.speedtex-repair-line-summary dd { margin: 0; color: var(--st34-navy); font-size: .75rem; font-weight: 800; }
.speedtex-repair-line-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; align-items: end; }
.speedtex-repair-line-form label { font-size: .72rem; }
.speedtex-repair-line-form .speedtex-wide { grid-column: 1 / -1; }
.speedtex-repair-line-form button { justify-self: end; }

.speedtex-device-switcher { display: flex; gap: .45rem; margin: 0 0 .65rem; overflow-x: auto; padding-bottom: .2rem; }
.speedtex-device-switcher button { flex: 0 0 auto; min-height: 2.5rem; padding: .5rem .75rem; border: 1px solid #bdd3e1; border-radius: .55rem; color: var(--st34-text); background: #fff; font-size: .77rem !important; font-weight: 800; }
.speedtex-device-switcher button[aria-selected="true"] { border-color: var(--st34-blue); color: #fff; background: var(--st34-blue); }
.speedtex-device-workspace { grid-template-columns: 1fr !important; }
.speedtex-device-workflow-card { padding: .95rem !important; }
.speedtex-device-workflow-card form { display: grid; gap: .7rem; }
.speedtex-device-form-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.speedtex-device-form-sections textarea { min-height: 7rem; }
.speedtex-custody-details { border: 1px solid var(--st34-line); border-radius: .65rem; overflow: hidden; }
.speedtex-custody-details > summary { padding: .75rem .85rem; color: var(--st34-navy); cursor: pointer; font-size: .8rem; font-weight: 850; background: var(--st34-soft); }
.speedtex-custody-details .speedtex-custody-fieldset { margin: .2rem .75rem .75rem; }
.speedtex-note-device { display: inline-flex; margin-left: .5rem; padding: .15rem .4rem; border-radius: 999px; color: #1d628c; background: #eaf5fb; font-size: .68rem; font-weight: 800; }

.speedtex-condition-form { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.speedtex-condition-matrix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.speedtex-condition-matrix label { display: grid; grid-template-columns: minmax(0, 1fr) 8.25rem; gap: .45rem; align-items: center; padding: .45rem; border: 1px solid var(--st34-line); border-radius: .5rem; background: #fff; }
.speedtex-condition-matrix label > span { color: var(--st34-navy); font-size: .72rem; font-weight: 800; }
.speedtex-condition-matrix select { min-width: 0; }
.speedtex-condition-history { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--st34-line); }
.speedtex-condition-history h3 { margin: 0 0 .55rem; color: var(--st34-navy); font-size: .95rem; }
.speedtex-condition-report-list { display: grid; gap: .55rem; }
.speedtex-condition-report-list article { display: grid; grid-template-columns: minmax(12rem, .8fr) minmax(18rem, 1.2fr); gap: .65rem 1rem; padding: .7rem; border: 1px solid var(--st34-line); border-radius: .6rem; background: #fff; }
.speedtex-condition-report-list article > div:first-child { display: grid; }
.speedtex-condition-report-list article strong { color: var(--st34-navy); font-size: .8rem; }
.speedtex-condition-report-list article span { color: var(--st34-muted); font-size: .7rem; }
.speedtex-condition-report-list article p { grid-column: 1 / -1; margin: 0; color: var(--st34-text); font-size: .76rem; }
.speedtex-condition-counts { display: flex; flex-wrap: wrap; gap: .3rem; align-content: start; }
.speedtex-condition-counts span { padding: .2rem .4rem; border-radius: 999px; background: #edf2f6; font-weight: 750; }
.speedtex-condition-counts .is-working { color: #176c41; background: #e8f7ee; }
.speedtex-condition-counts .is-failed { color: #9a2530; background: #fdecee; }

.speedtex-photo-filter { display: flex; gap: .35rem; margin: .5rem 0 .75rem; overflow-x: auto; }
.speedtex-photo-filter button { flex: 0 0 auto; min-height: 2.1rem; padding: .35rem .6rem; border: 1px solid #c2d5e1; border-radius: 999px; color: var(--st34-text); background: #fff; font-size: .7rem !important; font-weight: 800; }
.speedtex-photo-filter button[aria-pressed="true"] { border-color: var(--st34-blue); color: #fff; background: var(--st34-blue); }

.speedtex-mobile-actions { display: none; }

.speedtex-customer-review-mode .speedtex-shell > aside,
.speedtex-customer-review-mode .speedtex-shell main > header,
.speedtex-customer-review-mode .speedtex-shell main > section:not(.speedtex-customer-review-section),
.speedtex-customer-review-mode .speedtex-connectivity,
.speedtex-customer-review-mode .speedtex-menu-toggle { display: none !important; }
.speedtex-customer-review-mode .speedtex-shell { display: block !important; max-width: 54rem; margin: 0 auto; }
.speedtex-customer-review-mode .speedtex-shell main { padding: 1rem !important; }
.speedtex-customer-review-mode .speedtex-customer-review-section { display: block !important; border-top: 5px solid var(--st34-blue); }
.speedtex-customer-review-toggle { position: fixed; z-index: 1100; right: 1rem; bottom: 1rem; }

@media (max-width: 1050px) {
  .speedtex-repair-command { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .speedtex-repair-command > a { grid-column: 1 / -1; }
  .speedtex-repair-line-card { grid-template-columns: 1fr; }
  .speedtex-condition-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .speedtex-repair-command { grid-template-columns: 1fr 1fr; padding: .6rem; }
  .speedtex-repair-command > div { border-right: 0; border-bottom: 1px solid var(--st34-line); }
  .speedtex-repair-command strong { white-space: normal; }
  .speedtex-repair-line-form,
  .speedtex-device-form-sections,
  .speedtex-condition-form,
  .speedtex-condition-matrix,
  .speedtex-condition-report-list article { grid-template-columns: 1fr !important; }
  .speedtex-repair-line-form button { width: 100%; justify-self: stretch; }
  .speedtex-condition-report-list article p { grid-column: auto; }
  .speedtex-condition-matrix label { grid-template-columns: minmax(0, 1fr) 8rem; }
  .speedtex-mobile-actions {
    position: fixed;
    z-index: 1000;
    right: .55rem;
    bottom: .55rem;
    left: .55rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .25rem;
    padding: .35rem;
    border: 1px solid #bed3e0;
    border-radius: .7rem;
    background: rgba(255,255,255,.97);
    box-shadow: 0 8px 25px rgba(6,47,82,.2);
  }
  .speedtex-mobile-actions a { display: grid; place-items: center; min-height: 2.7rem; padding: .25rem; border-radius: .45rem; color: var(--st34-navy); font-size: .68rem; font-weight: 850; text-align: center; text-decoration: none; }
  .speedtex-mobile-actions a:last-child { color: #fff; background: var(--st34-blue); }
  .speedtex-tbo-app { padding-bottom: 4.6rem; }
}

@media (max-width: 430px) {
  .speedtex-repair-command { grid-template-columns: 1fr; }
  .speedtex-repair-command > a { grid-column: auto; }
  .speedtex-condition-matrix label { grid-template-columns: 1fr; }
}

@media print {
  .speedtex-repair-command > a,
  .speedtex-device-switcher,
  .speedtex-photo-filter,
  .speedtex-mobile-actions,
  [data-customer-review] { display: none !important; }
}
