/* xtime Inspect (Cox Automotive / Xtime), rebuilt from a live capture of inspect.app.coxautoinc.com
   (Treasure Valley Subaru, 2026-09-10). Colors sampled from the real screens: section/card blue
   #3F83AA, work-line + buttons #2980B9, primary line #666, completed rows #93D6AF, pending rows
   #D9E6EE, active tab #F4A52A, ASM/Tech orange #d9800a, associated orange #e58a2e. */

:root {
  --xt-blue: #3F83AA;          /* section headers, card headers, work-line bars */
  --xt-blue2: #2980B9;         /* action buttons, work-line accents, undecided */
  --xt-orange: #F4A52A;        /* active tab, workflow active */
  --xt-id-orange: #d9800a;     /* ASM/Tech ids on the dashboard */
  --xt-assoc: #e58a2e;         /* associated-line orange border */
  --xt-primary-bar: #666666;   /* primary (customer concern) line bar */
  --xt-green: #93D6AF;         /* completed / waiting rows */
  --xt-green2: #4aa96c;        /* approved legend */
  --xt-red: #d9534f;           /* declined */
  --xt-pending: #D9E6EE;       /* pending row bg */
  --xt-navy: #0c1018;          /* dealer bar */
  --xt-ink: #2b2f33;
  --xt-rule: #d7dee4;
  --xt-sans: Arial, 'Helvetica Neue', Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--xt-sans); color: var(--xt-ink); background: #fff; font-size: 13px; }

/* ============================ Cox Automotive top bar ============================ */
.xt-cox { display: flex; align-items: center; height: 34px; background: #fff; border-bottom: 1px solid #e2e6ea; padding: 0 14px; gap: 10px; }
.xt-cox-brand { display: flex; align-items: center; gap: 9px; }
.xt-cox-logo { font-variant: small-caps; font-weight: 700; font-size: 17px; color: #1b2a4a; letter-spacing: .3px; }
.xt-waffle { display: grid; grid-template-columns: repeat(3, 3px); grid-template-rows: repeat(3, 3px); gap: 2px; }
.xt-waffle i { width: 3px; height: 3px; background: #7a8390; border-radius: 1px; }
.xt-cox-xtime { color: var(--xt-blue2); font-size: 15px; font-weight: 500; }
.xt-cox-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.xt-gethelp { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #b9c6d4; border-radius: 4px; padding: 4px 10px; color: var(--xt-blue2); font-size: 12px; }
.xt-bell { position: relative; color: #5a6470; }
.xt-bell .warn { position: absolute; top: -3px; right: -4px; width: 10px; height: 10px; background: #f0ad4e; border-radius: 50%; font-size: 8px; color: #fff; text-align: center; line-height: 10px; }
.xt-cox-av { width: 26px; height: 26px; border-radius: 50%; background: #1f6fb2; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }

/* ============================ dealer navy bar ============================ */
.xt-dealbar { display: flex; align-items: center; height: 32px; background: var(--xt-navy); padding: 0 16px; color: #fff; }
.xt-dealname { font-weight: 700; font-size: 13px; letter-spacing: .3px; text-transform: uppercase; }
.xt-dealbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 12px; }
.xt-dealbar-right .caret { color: #8a93a0; }
.xt-user { color: #e6e9ee; }
.xt-partsbadge { background: #4a5260; color: #cfd6df; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 2px; letter-spacing: .5px; }
.xt-chatbadge { position: relative; color: #cfd6df; }
.xt-chatbadge .n { position: absolute; top: -5px; right: -7px; background: #e0342c; color: #fff; font-size: 9px; font-weight: 700; border-radius: 8px; padding: 0 4px; }
.xt-xtimelogo { display: inline-flex; align-items: center; gap: 5px; color: #fff; font-size: 14px; }
.xt-xtimelogo .inf { color: var(--xt-orange); font-size: 15px; }

/* ============================ module tabs ============================ */
.xt-tabs { display: flex; align-items: stretch; height: 34px; background: #f3f4f5; border-bottom: 1px solid #dfe3e7; }
.xt-tab-inspect { background: #2b2f33; color: #fff; display: inline-flex; align-items: center; padding: 0 22px; font-weight: 700; font-size: 13px; }
.xt-tab { display: inline-flex; align-items: center; gap: 6px; padding: 0 18px; font-size: 13px; color: #6b7178; cursor: pointer; border-right: 1px solid #e4e7ea; }
.xt-tab.active { background: #fff; color: var(--xt-orange); font-weight: 700; box-shadow: 0 -2px 0 var(--xt-orange) inset; }

.xt-main { padding: 18px 22px 40px; }

/* ============================ dashboard toolbar ============================ */
.xt-toolbar { display: flex; align-items: center; gap: 10px; margin: 0 auto 14px; max-width: 1660px; padding: 0 10px; }
.xt-legend-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c3ccd4; border-radius: 4px; background: #fff; padding: 6px 12px; font-size: 12.5px; color: var(--xt-blue2); cursor: pointer; }
.xt-goto { display: flex; align-items: center; border: 1px solid #c3ccd4; border-radius: 4px; padding: 5px 10px; width: 230px; color: #9aa4ad; }
.xt-goto input { border: 0; outline: 0; flex: 1; font-family: var(--xt-sans); font-size: 12.5px; }

/* ============================ dashboard grids ============================ */
.xt-board { max-width: 1660px; margin: 0 auto; }
.xt-section { margin-bottom: 16px; border: 1px solid #cdd6de; border-radius: 3px; overflow: hidden; }
.xt-section-hdr { background: var(--xt-blue); color: #fff; font-weight: 700; font-size: 13px; padding: 9px 14px; }
table.xt-grid { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 12px; }
table.xt-grid thead th { background: var(--xt-blue); color: #eaf1f6; font-weight: 700; font-size: 12px; text-align: left;
  padding: 7px 8px; white-space: nowrap; border-right: 1px solid #4b8cb2; position: relative; }
table.xt-grid thead th .sort { color: #bcd4e4; font-size: 9px; margin-left: 4px; }
table.xt-grid tbody td { padding: 3px 8px; border-bottom: 1px solid #e6ebef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 21px; }
.xt-row.pending td { background: var(--xt-pending); }
.xt-row.pending:nth-child(even) td { background: #eef4f8; }
.xt-row.completed td, .xt-row.waiting td { background: var(--xt-green); }
.xt-row.completed:nth-child(even) td, .xt-row.waiting:nth-child(even) td { background: #eafaf0; }
.xt-row:hover td { background: #cfe3f0 !important; }
.xt-last-viewer, .xt-asm, .xt-tech { color: var(--xt-id-orange); }
.xt-ro-cell { display: flex; align-items: center; gap: 6px; }
.xt-ro-chip { background: #cfe0f0; color: #1c5a8f; font-weight: 700; padding: 1px 5px; border-radius: 2px; cursor: pointer; }
.xt-cust-link { color: var(--xt-blue2); cursor: pointer; }
.xt-pickedup-ic { color: #5a6470; }
/* Column widths (11) */
.xt-grid col.c-lv { width: 150px } .xt-grid col.c-ro { width: 130px } .xt-grid col.c-tag { width: 70px }
.xt-grid col.c-e { width: 34px } .xt-grid col.c-pr { width: 96px } .xt-grid col.c-cust { width: 150px }
.xt-grid col.c-asm { width: 70px } .xt-grid col.c-tech { width: 70px } .xt-grid col.c-time { width: 70px }
.xt-grid col.c-instk { width: 74px } .xt-grid col.c-pick { width: 74px }

/* PartsBot injected "Source" button in the RO cell (extension queuebutton.ts) */
.pb-source-btn { font: 11px/1 var(--xt-sans); border: 1px solid #9fb2c8; background: #fff; color: #22303f; border-radius: 3px; padding: 2px 7px; margin-left: 4px; cursor: pointer; }
.pb-source-btn:hover { background: #2a6f97; color: #fff; border-color: #2a6f97; }

/* ============================ Details page ============================ */
.xt-det { max-width: 1660px; margin: 0 auto; }
.xt-ro-header { display: flex; align-items: flex-start; border: 1px solid var(--xt-rule); border-radius: 3px; padding: 12px 16px; margin-bottom: 16px; gap: 20px; }
.xt-ro-header .ro-left { min-width: 300px; }
.xt-ro-header .lbls { display: flex; gap: 60px; font-size: 11px; color: #8a929b; font-weight: 700; }
.xt-ro-num { font-size: 22px; font-weight: 700; color: #2b2f33; margin: 2px 0 10px; }
.xt-ro-checks { display: flex; gap: 20px; font-size: 12px; }
.xt-ro-checks label { display: inline-flex; align-items: center; gap: 6px; color: #55606a; }
/* workflow chevrons */
.xt-flow { margin-left: auto; display: flex; align-items: center; gap: 0; }
.xt-chev { position: relative; padding: 6px 20px 6px 26px; font-size: 12px; font-weight: 700; color: #fff; margin-left: -12px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); }
.xt-chev.done { background: #f3c98a; color: #7a5a1e; }
.xt-chev.active { background: var(--xt-orange); color: #6a4708; }
.xt-chev.future { background: #cfd4d9; color: #7d858d; }
.xt-chev.active .sub { display: block; font-size: 9px; font-weight: 700; }
.xt-flow-mode { writing-mode: vertical-rl; text-orientation: mixed; color: var(--xt-green2); font-size: 10px; font-weight: 700; margin-left: 8px; letter-spacing: 1px; }

.xt-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.xt-card { border: 1px solid var(--xt-rule); border-radius: 3px; }
.xt-card-hdr { background: var(--xt-blue); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 7px; }
.xt-card-body { padding: 16px; }
.xt-kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 10px; align-items: center; font-size: 12.5px; }
.xt-kv > label { text-align: right; color: #55606a; font-weight: 700; text-transform: uppercase; font-size: 11px; }
.xt-kv input, .xt-kv select { font-family: var(--xt-sans); font-size: 12.5px; padding: 6px 8px; border: 1px solid #b9c6d4; border-radius: 3px; width: 100%; }
.xt-kv .plain { color: #2b2f33; }
.xt-card-btn { background: var(--xt-blue2); color: #fff; border: 0; border-radius: 3px; padding: 7px 12px; font-size: 12px; font-weight: 700; cursor: pointer; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
.xt-chat-body { height: 240px; display: grid; place-items: center; color: #9aa4ad; font-size: 13px; background: #f4f6f8; border-radius: 3px; }
.xt-chat-input { display: flex; align-items: center; gap: 8px; margin-top: 8px; border: 1px solid #dfe3e7; border-radius: 3px; padding: 8px 10px; color: #9aa4ad; }

/* PartsBot bar (extension control.ts) */
.pb-xt-bar { display: flex; align-items: center; gap: 12px; border: 1px solid #cfd8e3; background: #f5f8fb; color: #22303f;
  border-radius: 4px; padding: 8px 12px; font: 13px/1.4 var(--xt-sans); margin-bottom: 12px; }
.pb-xt-bar .pb-xt-label { font-weight: 800; }
.pb-xt-read { border: 1px solid #9fb2c8; background: #fff; color: #22303f; border-radius: 4px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; }
.pb-xt-source { border: 1px solid #2a6f97; background: #2a6f97; color: #fff; border-radius: 4px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pb-xt-source:hover { background: #23628a; }
.pb-xt-note { color: #5a6b7c; font-size: 12px; }

.xt-showtoggle { display: flex; align-items: center; gap: 26px; padding: 8px 4px; font-size: 12.5px; color: #55606a; }
.xt-showtoggle label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.xt-legend-row { margin-left: auto; display: flex; gap: 18px; font-size: 12px; }
.xt-legend-row .lg { display: inline-flex; align-items: center; gap: 6px; }
.xt-legend-row .sw { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.sw-assoc { background: var(--xt-assoc); } .sw-und { background: var(--xt-blue2); }
.sw-app { background: var(--xt-green2); } .sw-dec { background: var(--xt-red); }

/* ============================ repair-order lines ============================ */
.xt-lines { border-top: 1px solid var(--xt-rule); padding-top: 4px; }
.xt-addrec-hdr { font-size: 14px; font-weight: 700; color: #55606a; margin: 18px 0 10px; }
.xt-group { border: 1px solid var(--xt-assoc); border-radius: 3px; margin-bottom: 14px; }
.xt-group.solo { border-color: var(--xt-rule); }
.xt-line { }
.xt-line-bar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; color: #fff; font-size: 13px; font-weight: 600; }
.xt-line.primary .xt-line-bar { background: var(--xt-primary-bar); }
.xt-line.undecided .xt-line-bar { background: var(--xt-blue2); }
.xt-line.approved .xt-line-bar { background: var(--xt-green2); }
.xt-line.declined .xt-line-bar { background: var(--xt-red); }
.xt-line-bar .primary-tag { font-weight: 700; }
.xt-line-body { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; }
.xt-line-body .prt-lbl { color: #55606a; font-weight: 700; font-size: 12px; }
.xt-line-body .prt-input { flex: 1; max-width: 460px; border: 1px solid #c3ccd4; border-radius: 3px; padding: 6px 8px; font-family: var(--xt-sans); font-size: 12px; }
.xt-line-icons { display: inline-flex; gap: 8px; color: #7a8390; }
.xt-nopa { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #55606a; }
.xt-labor { font-size: 11px; color: #7a8390; font-weight: 700; letter-spacing: .3px; }
.xt-line-actions { margin-left: auto; display: inline-flex; gap: 4px; }
.xt-la-btn { background: var(--xt-blue2); color: #fff; border: 0; border-radius: 3px; padding: 6px 10px; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.xt-la-btn.ghost { background: #eef1f4; color: #55606a; border: 1px solid #dfe3e7; }
.xt-la-btn.trash { background: #eef1f4; color: #8a929b; border: 1px solid #dfe3e7; padding: 6px 8px; }
.xt-line-unavail { text-align: center; color: #9aa4ad; font-size: 12px; padding: 8px; font-style: italic; }
/* authoring controls on a line */
.xt-line-work { flex: 1; max-width: 620px; border: 1px solid transparent; background: rgba(255,255,255,.18); color: #fff; border-radius: 3px; padding: 5px 8px; font-family: var(--xt-sans); font-size: 13px; font-weight: 600; }
.xt-line-work::placeholder { color: rgba(255,255,255,.7); }
.xt-line-work:focus { outline: none; background: #fff; color: #2b2f33; }
.xt-state-sel { border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.9); color: #2b2f33; border-radius: 3px; font-size: 11.5px; padding: 3px 5px; font-family: var(--xt-sans); }
.xt-line-x { background: rgba(255,255,255,.25); border: 0; color: #fff; border-radius: 3px; cursor: pointer; font-size: 14px; width: 24px; height: 24px; }

.xt-det-actions { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; padding-top: 14px; border-top: 1px solid var(--xt-rule); }
.xt-btn-save { background: var(--xt-blue2); color: #fff; border: 0; border-radius: 4px; padding: 9px 20px; font-size: 13px; font-weight: 800; cursor: pointer; }
.xt-btn-add { background: #fff; color: var(--xt-blue2); border: 1px dashed #9fb2c8; border-radius: 4px; padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer; }
.xt-msg { font-size: 12.5px; font-weight: 700; } .xt-msg.ok { color: var(--xt-green2); } .xt-msg.err { color: var(--xt-red); }

.xt-footer { border-top: 1px solid var(--xt-navy); background: var(--xt-navy); color: #cfd6df; font-size: 11px; padding: 8px 16px; display: flex; justify-content: space-between; margin-top: 24px; }
.xt-footer a { color: #9fc4e0; text-decoration: none; }

/* ============================ PartsBot side panel + dialog overlay (reused) ============= */
.pb-side { position: fixed; top: 0; right: 0; width: 320px; height: 100vh; background: #0f172a; color: #e2e8f0; z-index: 55; display: flex; flex-direction: column; border-left: 1px solid #1e293b; font-family: var(--xt-sans); transform: translateX(100%); transition: transform .25s ease; box-shadow: -8px 0 30px rgba(0,0,0,.18); }
.pb-side.open { transform: none; }
body.pb-side-open { padding-right: 320px; }
.pb-side-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid #1e293b; }
.pb-bolt { color: #38bdf8; display: inline-flex; }
.pb-side-title { font-weight: 900; font-size: 15px; }
.pb-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; margin-left: auto; }
.pb-side-close { background: none; border: 0; color: #64748b; font-size: 20px; cursor: pointer; margin-left: 8px; }
.pb-side-identity { padding: 12px 16px; font-size: 13px; color: #94a3b8; border-bottom: 1px solid #1e293b; }
.pb-side-identity strong { color: #e2e8f0; }
.pb-side-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.pb-side-feed { display: flex; flex-direction: column; gap: 9px; }
.pb-feed-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: #cbd5e1; opacity: 0; transform: translateY(4px); animation: pbrise .25s forwards; }
@keyframes pbrise { to { opacity: 1; transform: none; } }
.pb-feed-ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.pb-feed-row.active .pb-feed-ic { color: #38bdf8; animation: pbspin 1s linear infinite; }
.pb-feed-row.done .pb-feed-ic { color: #22c55e; }
@keyframes pbspin { to { transform: rotate(360deg); } }
.pb-sum-card { background: #111c33; border: 1px solid #1e293b; border-radius: 10px; padding: 12px; margin-top: 8px; }
.pb-sum-line { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: #cbd5e1; }
.pb-sum-line .k { color: #94a3b8; }
.pb-sum-total { font-weight: 900; font-size: 16px; color: #fff; border-top: 1px solid #1e293b; margin-top: 6px; padding-top: 8px; }
.pb-sum-view { display: block; text-align: center; margin-top: 10px; background: #38bdf8; color: #06283d; font-weight: 700; text-decoration: none; padding: 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.pb-sum-note { font-size: 11.5px; color: #7c8aa0; margin-top: 8px; line-height: 1.4; }
.pb-side-foot { padding: 10px 16px; font-size: 10.5px; color: #64748b; border-top: 1px solid #1e293b; line-height: 1.4; }

.pb-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(15,23,42,.55); }
.pb-overlay-frame { position: absolute; inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); border: 0; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.4); background: #fff; }
.pb-overlay-close { position: absolute; top: 30px; right: 34px; z-index: 61; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #0f172a; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.pb-overlay-close:hover { background: #1e293b; }

/* ============================ estimate confirmation ============================ */
.est-wrap { max-width: 820px; margin: 0 auto; }
.est-card { background: #fff; border: 1px solid var(--xt-rule); border-radius: 10px; overflow: hidden; }
.est-head { background: linear-gradient(90deg, #0ea5e9, #06b6d4); color: #fff; padding: 18px 22px; }
.est-head h1 { margin: 0; font-size: 20px; font-weight: 900; }
.est-head .est-meta { font-size: 13px; opacity: .92; margin-top: 3px; }
.est-body { padding: 18px 22px; }
.est-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 12px; }
.est-table th { text-align: left; font-size: 12px; color: #6b7280; border-bottom: 1px solid var(--xt-rule); padding: 6px 4px; }
.est-table td { padding: 8px 4px; border-bottom: 1px solid #f1f4f7; }
.est-pending { color: #b7791f; font-weight: 700; font-size: 12px; }
.est-tot { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.est-tot.grand { font-size: 18px; font-weight: 900; border-top: 2px solid var(--xt-rule); margin-top: 8px; padding-top: 10px; }
.est-actions { padding: 16px 22px; border-top: 1px solid var(--xt-rule); display: flex; gap: 12px; }
.est-btn { font-family: var(--xt-sans); font-size: 14px; font-weight: 700; border-radius: 6px; padding: 9px 20px; cursor: pointer; border: 1px solid var(--xt-blue2); }
.est-btn.primary { background: var(--xt-blue2); color: #fff; }
.est-btn.secondary { background: #fff; color: var(--xt-blue2); }
