/* SpeedTex Stage One Back Office visual workflow refresh - v0.57.0 */
:root {
    --speedtex-focus: #2d8cff;
    --speedtex-navy: #072f55;
    --speedtex-cyan: #42a5dc;
}

/* Navigation hierarchy */
.speedtex-shell nav .speedtex-nav-group {
    min-height: 0;
    margin: .9rem .7rem .2rem;
    padding: 0;
    border: 0;
    color: #8edbb0;
    background: transparent;
    font-size: .63rem;
    font-weight: 850;
    letter-spacing: .14em;
    line-height: 1.3;
    text-transform: uppercase;
}
.speedtex-shell nav .speedtex-nav-group:first-child { margin-top: .2rem; }
.speedtex-shell nav a { min-height: 2.75rem; }
.speedtex-shell nav a::before {
    display: grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    border: 0;
    border-radius: .32rem;
    color: #bfe0f7;
    background: rgba(255,255,255,.1);
    content: "•";
    font-size: .9rem;
    font-weight: 900;
    transform: translateY(-50%);
}
.speedtex-shell nav a.active::before { color: var(--speedtex-navy); background: #fff; }
.speedtex-shell nav .speedtex-nav-dashboard::before { content: "⌂"; }
.speedtex-shell nav .speedtex-nav-requests::before { content: "↗"; }
.speedtex-shell nav .speedtex-nav-work-orders::before { content: "✓"; }
.speedtex-shell nav .speedtex-nav-field::before { content: "⌁"; }
.speedtex-shell nav .speedtex-nav-offline-sync::before { content: "↻"; }
.speedtex-shell nav .speedtex-nav-customers::before { content: "●"; font-size: .6rem; }
.speedtex-shell nav .speedtex-nav-communications::before { content: "✉"; }
.speedtex-shell nav .speedtex-nav-catalog::before,
.speedtex-shell nav .speedtex-nav-services::before { content: "▦"; }
.speedtex-shell nav .speedtex-nav-inventory::before { content: "□"; }
.speedtex-shell nav .speedtex-nav-pricing::before { content: "$"; }
.speedtex-shell nav .speedtex-nav-pos::before { content: "▣"; }
.speedtex-shell nav .speedtex-nav-purchasing::before { content: "+"; }
.speedtex-shell nav .speedtex-nav-vendor-returns::before { content: "↩"; }
.speedtex-shell nav .speedtex-nav-service-areas::before { content: "◎"; }
.speedtex-shell nav .speedtex-nav-tax-review::before { content: "%"; }
.speedtex-shell nav .speedtex-nav-catalog-imports::before { content: "⇣"; }
.speedtex-shell nav .speedtex-nav-exports-crm::before { content: "⇄"; }
.speedtex-shell nav .speedtex-nav-system-checks::before { content: "◇"; }
.speedtex-shell nav .speedtex-nav-workspace::before { content: "⌘"; }

/* Page surfaces and action clarity */
.speedtex-shell > main { background: linear-gradient(180deg, rgba(255,255,255,.48), transparent 16rem); }
.speedtex-panel {
    border-color: #d6e2ec;
    box-shadow: 0 10px 32px rgba(9, 54, 91, .065);
}
.speedtex-panel-head { align-items: flex-start; }
.speedtex-panel-head h2 { margin-bottom: .3rem; }
.speedtex-dashboard-hero { border-left: .34rem solid var(--green); }
.speedtex-dashboard-hero-actions a:first-child,
.speedtex-operations-actions + .speedtex-metrics article:first-child { border-color: rgba(18,102,177,.35); }
.speedtex-metrics article {
    position: relative;
    overflow: hidden;
    border-top: .25rem solid var(--blue);
}
.speedtex-metrics article:nth-child(2) { border-top-color: var(--green); }
.speedtex-metrics article:nth-child(3) { border-top-color: #d69318; }
.speedtex-metrics article:nth-child(4) { border-top-color: #7d62bb; }
.speedtex-metrics article::after {
    position: absolute;
    right: -.8rem;
    bottom: -1.1rem;
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 50%;
    content: "";
    background: rgba(18,102,177,.045);
}

/* Workspace chooser and focused operations */
.speedtex-workspace-shell { max-width: 74rem; border-top: .38rem solid var(--green); }
.speedtex-workspace-grid { gap: 1.1rem; }
.speedtex-workspace-card {
    position: relative;
    display: grid;
    grid-template-columns: auto auto minmax(0,1fr);
    align-items: center;
    min-height: 8.7rem;
    padding: 1.2rem;
    overflow: hidden;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.speedtex-workspace-card:hover { border-color: #9bc7e7; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(12,58,95,.1); }
.speedtex-workspace-card input { width: 1.15rem; height: 1.15rem; accent-color: var(--blue); }
.speedtex-workspace-card .speedtex-workspace-icon {
    display: grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: .85rem;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), #2793cd);
    box-shadow: 0 8px 20px rgba(18,102,177,.2);
    font-size: 1.15rem;
    font-weight: 900;
}
.speedtex-workspace-card-mobile .speedtex-workspace-icon::before { content: "M"; }
.speedtex-workspace-card-pos .speedtex-workspace-icon::before { content: "$"; }
.speedtex-workspace-card-storefront .speedtex-workspace-icon::before { content: "S"; }
.speedtex-workspace-card-full .speedtex-workspace-icon::before { content: "BO"; font-size: .78rem; }
.speedtex-workspace-card-pos .speedtex-workspace-icon { background: linear-gradient(135deg, #25884c, #48ad6d); }
.speedtex-workspace-card-storefront .speedtex-workspace-icon { background: linear-gradient(135deg, #7254ad, #9b79d1); }
.speedtex-workspace-card-full .speedtex-workspace-icon { background: linear-gradient(135deg, #33465d, #172a40); }
.speedtex-workspace-detail { display: grid; gap: .35rem; }
.speedtex-workspace-card:has(input:checked)::after {
    position: absolute;
    top: .65rem;
    right: .7rem;
    color: var(--green-dark);
    content: "Selected";
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.speedtex-operation-card {
    position: relative;
    grid-template-columns: 2.65rem minmax(0,1fr);
    column-gap: .8rem;
    align-items: center;
    min-height: 8.25rem;
    border-top: .22rem solid var(--blue);
}
.speedtex-operation-card > span:last-child { grid-column: 2; }
.speedtex-operation-card:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(12,58,95,.12); }
.speedtex-operation-icon {
    display: grid;
    grid-row: 1 / span 2;
    place-items: center;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: .75rem;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--green));
    font-weight: 900;
}
.speedtex-operation-card-work-orders .speedtex-operation-icon::before { content: "WO"; font-size: .72rem; }
.speedtex-operation-card-new-customer .speedtex-operation-icon::before { content: "+"; }
.speedtex-operation-card-customers .speedtex-operation-icon::before { content: "C"; }
.speedtex-operation-card-requests .speedtex-operation-icon::before { content: "R"; }
.speedtex-operation-card-pos .speedtex-operation-icon::before { content: "$"; }
.speedtex-operation-card-inventory .speedtex-operation-icon::before { content: "I"; }

/* Status language */
.speedtex-sync-state {
    display: inline-flex;
    padding: .3rem .58rem;
    border-radius: 999px;
    color: #42536a;
    background: #edf1f5;
    font-size: .8rem;
    font-weight: 800;
}
.speedtex-sync-synced, .speedtex-status-completed, .speedtex-status-ready_for_return { color: #0e6035; background: #ddf6e7; }
.speedtex-sync-failed, .speedtex-status-cancelled, .speedtex-status-unable_to_repair { color: #8f252b; background: #ffe3e5; }
.speedtex-sync-pending, .speedtex-status-awaiting_parts, .speedtex-status-awaiting_review { color: #7a4d00; background: #fff0c9; }
.speedtex-status-en_route, .speedtex-status-arrived, .speedtex-status-repair_in_progress, .speedtex-status-testing_quality_check { color: #124b78; background: #dff0ff; }

/* Inputs, focus, and touch usability */
button, .button, .speedtex-secondary-link, input, select, textarea { min-height: 2.75rem; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid rgba(45,140,255,.38);
    outline-offset: 2px;
}
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #f4f9fd; }

@media (max-width: 900px) {
    .speedtex-shell > aside { padding-bottom: .85rem; }
    .speedtex-shell nav { padding-bottom: .25rem; }
    .speedtex-shell nav .speedtex-nav-group { display: none; }
    .speedtex-shell nav a { min-width: max-content; min-height: 2.85rem; padding-right: .9rem; }
    .speedtex-shell > main { padding-top: 1.25rem; }
    .speedtex-operation-card { min-height: 7rem; }
}

@media (max-width: 650px) {
    .speedtex-shell > main { padding: 1rem .8rem 5rem; }
    .speedtex-shell > main > header { align-items: flex-start; gap: .7rem; }
    .speedtex-user { max-width: 48%; }
    .speedtex-panel, .speedtex-dashboard-hero { border-radius: .9rem; }
    .speedtex-dashboard-hero-actions { justify-content: stretch; }
    .speedtex-dashboard-hero-actions a { flex: 1 1 100%; }
    .speedtex-workspace-shell { width: calc(100% - 1rem); margin: .5rem auto; padding: 1rem; }
    .speedtex-workspace-card { grid-template-columns: auto auto minmax(0,1fr); min-height: 7.5rem; padding: .9rem; }
    .speedtex-workspace-card .speedtex-workspace-icon { width: 2.65rem; height: 2.65rem; }
    .speedtex-workspace-switch { right: .65rem; bottom: .65rem; min-height: 2.75rem; display: inline-flex; align-items: center; }
    .speedtex-table-wrap { border: 1px solid var(--line); border-radius: .75rem; }
    .speedtex-table-wrap table { min-width: 44rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
