/* SpeedTex Stage One interface polish — v0.58.6 */
:root{
  --st-navy:#07335c;
  --st-blue:#0878c9;
  --st-green:#24a665;
  --st-sky:#eaf6fd;
  --st-ink:#10263d;
  --st-muted:#5f7184;
  --st-border:#d6e3ed;
  --st-panel-shadow:0 12px 34px rgba(7,51,92,.075);
  --st-panel-shadow-hover:0 16px 42px rgba(7,51,92,.11);
}

body.speedtex-tbo-app{background:radial-gradient(circle at 92% 0,rgba(8,120,201,.075),transparent 32rem),linear-gradient(180deg,#f7fafc 0,#edf4f8 100%);color:var(--st-ink)}
.speedtex-shell>aside{background:radial-gradient(circle at 10% 0,rgba(40,183,112,.2),transparent 16rem),linear-gradient(170deg,#084d80 0%,#06345d 47%,#052b4c 100%)}
.speedtex-shell aside .speedtex-brand{height:3.9rem;border:0;border-radius:1rem;box-shadow:0 14px 32px rgba(0,21,42,.25)}
.speedtex-shell aside .speedtex-eyebrow{margin-top:1.05rem;color:#91edb8}
.speedtex-shell nav{gap:.12rem}.speedtex-shell nav a{margin:.04rem 0;border-radius:.72rem}.speedtex-shell nav a:not(.active):hover{background:rgba(255,255,255,.1)}
.speedtex-shell nav a.active{background:linear-gradient(100deg,#2aac65,#0d8dc5);box-shadow:0 9px 22px rgba(0,20,43,.24)}
.speedtex-shell nav .speedtex-nav-acceptance::before{content:"✓"}.speedtex-shell nav .speedtex-nav-locations::before{content:"⌖"}.speedtex-shell nav .speedtex-nav-vehicles::before{content:"▰"}
.speedtex-logout{border-color:rgba(255,255,255,.14);background:rgba(0,0,0,.11)}

.speedtex-shell>main{max-width:118rem;padding-top:2.15rem}
.speedtex-shell>main>header{min-height:4.8rem;margin-bottom:1.35rem;padding-bottom:1.2rem}
.speedtex-shell>main>header h1{font-size:clamp(1.85rem,2.3vw,2.65rem);font-weight:720}
.speedtex-shell>main>header .speedtex-eyebrow{margin-bottom:.2rem;color:#198d50}
.speedtex-shell>main>header::after{width:6.3rem;height:4px;background:linear-gradient(90deg,#0878c9 0 54%,#24a665 54%)}
.speedtex-user{background:rgba(255,255,255,.92);backdrop-filter:blur(9px)}

.speedtex-panel,.speedtex-metrics article,.speedtex-work-order-summary article,.speedtex-zone-card,.speedtex-device-card,.speedtex-visit-card{border-color:var(--st-border);box-shadow:var(--st-panel-shadow)}
.speedtex-panel{position:relative;border-radius:1.05rem;background:rgba(255,255,255,.97)}
.speedtex-panel:not(.speedtex-panel-flush){padding:1.45rem}
.speedtex-panel>h2:first-child,.speedtex-panel-head h2{font-size:1.22rem;font-weight:760}
.speedtex-panel>h2:first-child{position:relative;margin-bottom:1rem;padding-bottom:.72rem;border-bottom:1px solid #e7eef4}
.speedtex-panel>h2:first-child::after{position:absolute;left:0;bottom:-1px;width:2.8rem;height:2px;border-radius:9px;background:linear-gradient(90deg,var(--st-blue),var(--st-green));content:""}
.speedtex-panel-head{gap:1rem;padding-bottom:.2rem}.speedtex-panel-head p{max-width:62rem}
.speedtex-detail-grid,.speedtex-action-grid,.speedtex-grid-two{gap:1rem}
.speedtex-detail-grid>.speedtex-panel,.speedtex-action-grid>.speedtex-panel{margin-top:0}

button,.button,.speedtex-primary-link,.speedtex-link-button{border-radius:.72rem!important;box-shadow:0 5px 14px rgba(8,83,142,.12);font-weight:780!important;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
button:hover,.button:hover,.speedtex-primary-link:hover,.speedtex-link-button:hover{transform:translateY(-1px);box-shadow:0 9px 20px rgba(8,83,142,.18)}
.speedtex-panel form>button:not(.speedtex-wide),.speedtex-form-actions button{width:auto;min-width:10rem;padding-inline:1.15rem}
.speedtex-secondary-link,.speedtex-secondary-button,.speedtex-back-link{border:1px solid #cbdbe7!important;border-radius:.7rem!important;background:#fff!important;color:#0a558e!important;box-shadow:0 4px 12px rgba(7,51,92,.07);font-weight:760!important;text-decoration:none}
.speedtex-danger-button{background:#b42318!important}

input[type=text],input[type=password],input[type=email],input[type=tel],input[type=search],input[type=number],input[type=date],input[type=time],input[type=datetime-local],input[type=file],select,textarea{border:1px solid #bdcedb!important;border-radius:.72rem!important;background:#fff;box-shadow:inset 0 1px 2px rgba(15,35,55,.025);transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
input:hover,select:hover,textarea:hover{border-color:#8fb2ca!important}
input:focus,select:focus,textarea:focus{border-color:#1785cc!important;box-shadow:0 0 0 4px rgba(23,133,204,.13)!important;outline:0!important}
label{color:#263d54;font-size:.91rem}label small{color:#718196;font-weight:500;line-height:1.4}
fieldset{border:1px solid var(--st-border);border-radius:.9rem;background:#fbfdff}

.speedtex-table-wrap{border:1px solid var(--st-border);border-radius:.88rem;background:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.6)}
.speedtex-panel-flush>.speedtex-table-wrap{border-right:0;border-bottom:0;border-left:0;border-radius:0 0 1.05rem 1.05rem}
table{font-size:.91rem}thead{background:linear-gradient(180deg,#eff7fc,#e7f1f8)}
th{padding:.86rem .9rem;color:#40566d;font-size:.7rem;font-weight:850;letter-spacing:.075em}
td{padding:.9rem;color:#263b50}tbody tr:nth-child(even){background:#fbfdff}tbody tr:hover{background:#f0f8fd}
td>a:not(.button){color:#0868ad;font-weight:760;text-decoration-thickness:1px;text-underline-offset:3px}
td small{color:#6a7c8f}.speedtex-financial-cell strong{color:#173b5d}

.speedtex-status,.speedtex-status-pill,.speedtex-queue-status,.speedtex-priority,.speedtex-zone-state,.speedtex-check-status{display:inline-flex;align-items:center;min-height:1.8rem;padding:.27rem .62rem;border-radius:999px;font-size:.76rem;font-weight:820;line-height:1.15}
.speedtex-queue-status{color:#134e75;background:#e1f2fc}.speedtex-priority-normal{color:#365268;background:#eaf0f5}.speedtex-priority-high{color:#8a4d00;background:#fff0c7}.speedtex-priority-urgent{color:#922625;background:#fee4e2}
.speedtex-alert,.speedtex-notice{border-radius:.8rem;box-shadow:0 6px 18px rgba(7,51,92,.06)}

.speedtex-facts{overflow:hidden;border:1px solid #e1eaf1;border-radius:.82rem;background:#fbfdff}
.speedtex-facts>div{padding:.7rem .82rem;border-bottom:1px solid #e7eef4}.speedtex-facts>div:last-child{border-bottom:0}.speedtex-facts dt{color:#60748a}.speedtex-facts dd{color:#20384f;font-weight:650}
.speedtex-record-list{overflow:hidden;border:1px solid var(--st-border);border-radius:.82rem}.speedtex-record-list li{margin:0!important;padding:.78rem .9rem!important;border-bottom:1px solid #e5edf3;background:#fff}.speedtex-record-list li:last-child{border-bottom:0}

.speedtex-work-order-summary{gap:.85rem}.speedtex-work-order-summary article{position:relative;overflow:hidden;border-top:4px solid var(--st-blue);background:linear-gradient(145deg,#fff,#f7fbfe)}
.speedtex-work-order-summary article:nth-child(2){border-top-color:var(--st-green)}.speedtex-work-order-summary article:nth-child(3){border-top-color:#e4a11b}.speedtex-work-order-summary article:nth-child(4){border-top-color:#7755ad}
.speedtex-work-order-summary article::after{position:absolute;right:-1rem;bottom:-1.5rem;width:5rem;height:5rem;border-radius:50%;background:rgba(8,120,201,.055);content:""}
.speedtex-work-order-summary strong{color:var(--st-navy)}
.speedtex-work-order-filters form,.speedtex-search-form{align-items:end;gap:.8rem}.speedtex-work-order-filters label,.speedtex-search-form label{margin:0}

.speedtex-zone-grid{gap:1rem}.speedtex-zone-card{position:relative;overflow:hidden;border-radius:1rem;background:linear-gradient(155deg,#fff,#f8fbfd)}
.speedtex-zone-card::before{position:absolute;inset:0 auto 0 0;width:4px;background:#a9bac8;content:""}.speedtex-zone-card:has(.speedtex-zone-state.active)::before{background:var(--st-green)}
.speedtex-zone-card h3{color:var(--st-navy);font-size:1.06rem}.speedtex-zone-state{color:#526476;background:#e9eef3}.speedtex-zone-state.active{color:#0a6538;background:#daf5e5}
.speedtex-mapping-grid{gap:.8rem}.speedtex-import-summary article{border-top:3px solid var(--st-blue);background:#f9fcfe}

.speedtex-device-card,.speedtex-visit-card{border-radius:.95rem;background:linear-gradient(155deg,#fff,#f9fcfe)}
.speedtex-device-card h3,.speedtex-visit-card h3{color:var(--st-navy)}
.speedtex-timeline li{border-left-color:#9fc9e4}.speedtex-timeline li::before{box-shadow:0 0 0 4px #e6f4fc}
.speedtex-photo-grid img{border-radius:.8rem;box-shadow:0 8px 22px rgba(7,51,92,.12)}

.speedtex-empty-state{min-height:8rem;place-content:center;border:1px dashed #b9d0e0;border-radius:.85rem;background:linear-gradient(135deg,#f9fcfe,#f2f8fc)}
.speedtex-empty-state strong{font-size:1rem}.speedtex-empty-state span{max-width:42rem}

@media(max-width:1100px){.speedtex-shell{grid-template-columns:16.5rem minmax(0,1fr)}.speedtex-shell>main{padding-inline:1.4rem}.speedtex-detail-grid{grid-template-columns:1fr}}
@media(max-width:900px){
  .speedtex-shell{display:block}.speedtex-shell>aside{position:sticky;top:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.65rem;width:100%;height:auto;max-height:none;padding:.65rem .8rem;overflow:visible;z-index:100}
  .speedtex-shell aside .speedtex-brand{width:9.5rem;height:2.6rem;padding:.35rem .5rem;border-radius:.7rem;background-size:calc(100% - 1rem) auto}.speedtex-shell aside>.speedtex-eyebrow{display:none}
  .speedtex-shell nav{display:flex;gap:.35rem;margin:0;padding:.1rem;overflow-x:auto;scrollbar-width:thin}.speedtex-shell nav a{flex:0 0 auto;min-height:2.55rem;margin:0;padding:.6rem .8rem .6rem 2.25rem;background:rgba(255,255,255,.055)}
  .speedtex-logout{min-width:max-content;margin:0;padding:.6rem .78rem .6rem 2.2rem}
  .speedtex-shell>main{padding-top:1.4rem}
}
@media(max-width:650px){
  .speedtex-shell>aside{grid-template-columns:7.7rem auto;padding:.55rem}.speedtex-shell aside .speedtex-brand{width:7.7rem}.speedtex-shell nav{grid-column:1/-1;grid-row:2}.speedtex-shell nav a{font-size:.82rem}.speedtex-logout{display:inline-flex;grid-column:2;grid-row:1;justify-self:end}
  .speedtex-shell>main{padding:.9rem .7rem 5rem}.speedtex-shell>main>header{min-height:4rem}.speedtex-shell>main>header h1{font-size:1.75rem}.speedtex-user{display:none}
  .speedtex-panel:not(.speedtex-panel-flush){padding:1rem}.speedtex-panel>h2:first-child{font-size:1.12rem}.speedtex-detail-grid,.speedtex-action-grid,.speedtex-grid-two,.speedtex-zone-grid{grid-template-columns:1fr!important}
  .speedtex-panel form>button:not(.speedtex-wide),.speedtex-form-actions button{width:100%}.speedtex-secondary-link,.speedtex-back-link{min-height:2.6rem;padding:.58rem .7rem}
  .speedtex-table-wrap table{min-width:46rem}th,td{padding:.75rem}.speedtex-facts{grid-template-columns:1fr}.speedtex-facts>div{grid-template-columns:1fr;gap:.15rem}
}
@media(prefers-reduced-motion:reduce){button,.button,.speedtex-primary-link,.speedtex-link-button{transition:none}}
