/**
 * Jaikey app UX polish — shop-aligned surface, hierarchy, density.
 * Loaded after app.css / report-theme.css.
 */

/* ---- Multi-agent structured bay ---- */
.field-multi-agents .multi-agent-slots {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px 0 12px;
}

.agent-slot {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 12px 10px;
}

.agent-slot-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.agent-slot-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  letter-spacing: -0.02em;
  min-width: 4.5rem;
}

.agent-slot-name {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 280px;
  font-size: 0.88rem;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.agent-slot-name::placeholder {
  color: var(--muted-2);
}

.agent-slot-remove {
  margin-left: auto;
  font-size: 0.8rem;
}

.agent-slot-body {
  width: 100%;
  min-height: 120px;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  padding: 10px 12px;
}

.agent-slot-body:focus {
  outline: 2px solid rgba(255, 180, 60, 0.35);
  outline-offset: 1px;
}

.multi-add-agent {
  margin-top: 4px;
}

.multi-routing-field textarea {
  width: 100%;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}

/* ---- Workflow framework (paste first, framework after) ---- */
.field-workflow-framework {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.workflow-fw-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.workflow-fw-row label {
  margin: 0;
  font-weight: 650;
  font-size: 0.9rem;
}

.workflow-fw-row select {
  min-width: 220px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

.workflow-fw-detect {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.workflow-fw-detect.is-detected {
  color: var(--text);
}

.workflow-fw-detect .fw-check {
  color: #6dcea0;
  font-weight: 700;
  margin-right: 4px;
}

/* ---- Type & rhythm ---- */
body {
  font-feature-settings: "ss01" on, "cv11" on;
  -webkit-font-smoothing: antialiased;
}

.main .content {
  padding: 28px 28px 48px;
  max-width: 760px;
}

h1 {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.lead {
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 36rem;
}

.lead strong {
  color: var(--text);
  font-weight: 650;
}

/* ---- Sidebar ---- */
.side {
  background: linear-gradient(180deg, #0e0e10 0%, #0a0a0b 100%);
  border-right-color: rgba(255, 255, 255, 0.07);
  padding: 18px 12px 16px;
}

.side-brand .by {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin-top: 2px;
}

.nav-btn {
  border-radius: 11px;
  padding: 11px 12px;
  font-weight: 650;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-btn.active {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.4);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.08);
}

.side-help a {
  font-size: 0.76rem;
  padding: 2px 0;
}

/* ---- Topbar ---- */
.topbar {
  padding: 10px 24px;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.crumb {
  font-size: 0.84rem;
  font-weight: 600;
}

.chip {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.chip.good {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

/* ---- Buttons ---- */
.btn {
  min-height: 46px;
  padding: 0 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
}

.btn-lg {
  min-height: 50px;
  padding: 0 26px;
  font-size: 1.02rem;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 55%, #fdba74 120%);
  color: #0a0a0b;
  border: none;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.36);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.88rem;
}

/* ---- Cards ---- */
.card {
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.045) 0%,
    rgba(255, 255, 255, 0.018) 100%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.card.soft {
  opacity: 1;
  border-color: rgba(249, 115, 22, 0.28);
  background: linear-gradient(
    165deg,
    rgba(249, 115, 22, 0.1) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
}

.label {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--accent-2);
}

/* ---- Home ---- */
.home-hero {
  text-align: center;
  padding: 28px 16px 24px;
  margin: 0 0 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(249, 115, 22, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.home-hero .tag {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.08);
  margin-bottom: 16px;
}

.home-hero h1 {
  margin-bottom: 10px;
}

.home-one-liner {
  margin: 0 auto 18px !important;
  max-width: 28rem !important;
  text-align: center;
  color: var(--muted);
}

.home-flow {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  margin: 0 auto 18px;
  padding: 0;
}

.home-flow li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.home-flow li span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.2);
  color: var(--accent-2);
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.7rem;
  font-weight: 800;
}

.home-actions {
  justify-content: center;
  margin-top: 4px !important;
}

.beta-access-home {
  max-width: 28rem;
  margin: 0 auto 16px;
  border-color: rgba(249, 115, 22, 0.28);
  background: rgba(249, 115, 22, 0.06);
  font-size: 0.88rem;
  color: var(--muted);
}

.beta-access-home a {
  color: var(--accent-2);
  font-weight: 700;
  border-bottom: 1px solid rgba(251, 146, 60, 0.35);
}

.beta-access-home a:hover {
  color: #fff;
}

.recent-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 16px 18px;
}

.recent-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.recent-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  padding: 36px 22px;
  border-radius: 16px;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.015);
}

.empty-state-title {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

/* ---- Forms / input ---- */
.field {
  margin-bottom: 18px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.field-hint,
.field-hint-line {
  color: var(--muted-2);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
}

.field-hint-line {
  margin: 8px 0 0;
}

textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input:not([type]) {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.1);
  background: #0c0c0e;
  padding: 14px 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input:not([type]):focus {
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
  outline: none;
}

#sys-body {
  min-height: 220px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.sys-dropzone {
  position: relative;
  border-radius: 14px;
}

.sys-dropzone.is-dragover,
.sys-dropzone.drag-over {
  outline: 2px dashed rgba(249, 115, 22, 0.65);
  outline-offset: 2px;
  background: rgba(249, 115, 22, 0.06);
}

.sys-body-actions .btn {
  min-height: 36px;
}

.quota-line {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.86rem;
  white-space: pre-line;
  margin-bottom: 16px;
}

.quota-line.good {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.06);
}

.quota-line.warn {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.07);
}

/* ---- Pipeline ---- */
.pipeline-card {
  border-radius: 16px;
  border-color: rgba(249, 115, 22, 0.2);
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(249, 115, 22, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.pipeline-status {
  font-size: 1.05rem;
}

.pipeline-hint {
  margin-top: 14px;
  font-size: 0.84rem;
  color: var(--muted-2);
  text-align: center;
}

.progress-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.progress-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-list li.is-active,
.progress-list li.active {
  color: var(--text);
  font-weight: 700;
}

/* ---- Report ---- */
.report-sticky-summary {
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(22, 22, 26, 0.98), rgba(14, 14, 16, 0.96));
  padding: 16px 16px 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.report-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 6px;
}

.done-label {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.report-mode-chip {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.report-mode-chip.full {
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
}

.free-report-tagline {
  margin: 4px 0 10px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Scores present, not hero */
.report-sticky-summary .score-row {
  gap: 10px;
  margin-top: 8px;
}

.report-sticky-summary .score-box {
  padding: 12px 12px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.report-sticky-summary .score-box strong {
  font-size: clamp(1.35rem, 3vw, 1.65rem) !important;
  font-weight: 800;
}

.report-sticky-summary .score-box > span:first-child {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  font-weight: 700;
}

.improvements-line {
  font-size: 0.88rem;
  color: var(--muted);
}

.findings-head-row .label {
  font-size: 0.72rem;
}

.repair-cta-card {
  padding: 18px 18px 16px;
}

.repair-cta-text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.repair-cta-card .btn-primary {
  min-width: 160px;
}

.download-report-card {
  margin-top: 18px;
}

/* Controlled report */
.controlled-banner-kicker {
  font-family: var(--jk-mono, ui-monospace, monospace);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--accent-2);
}

/* ---- Auth ---- */
.auth-gate {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(249, 115, 22, 0.14), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(249, 115, 22, 0.06), transparent 40%),
    #0a0a0b;
}

.auth-card {
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #141416 0%, #0f0f11 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  padding: 32px 28px;
}

.auth-title {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.auth-sub {
  max-width: 300px;
  color: var(--muted);
}

.auth-card .btn-primary {
  margin-top: 4px;
}

/* ---- Toast ---- */
.toast {
  border-radius: 12px;
  border-color: rgba(249, 115, 22, 0.35);
  background: #141416;
  bottom: 20px;
  right: 20px;
  max-width: min(360px, calc(100vw - 32px));
}

/* ---- Mobile ---- */
@media (max-width: 800px) {
  .main .content {
    padding: 18px 14px 36px;
  }

  .home-hero {
    padding: 22px 12px 20px;
  }

  .home-flow li {
    font-size: 0.82rem;
    padding: 6px 12px 6px 6px;
  }

  .side {
    padding: 10px;
  }

  .side-brand .by {
    display: none;
  }

  .nav-btn {
    min-height: 40px;
  }

  .report-sticky-summary .score-box strong {
    font-size: 1.3rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .nav-btn,
  .screen {
    transition: none !important;
    animation: none !important;
  }
}

/* ---- Garage dashboard ---- */
.shop-status-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
}

@media (max-width: 720px) {
  .shop-status-grid {
    grid-template-columns: 1fr;
  }
}

.shop-status-card {
  padding: 16px 16px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
}

.shop-status-dl {
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.shop-status-dl > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.shop-status-dl dt {
  margin: 0;
  color: var(--muted-2);
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.shop-status-dl dd {
  margin: 0;
  font-weight: 800;
  color: var(--text);
  text-align: right;
}

.plan-banner {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  background: linear-gradient(165deg, rgba(249, 115, 22, 0.12), rgba(255, 255, 255, 0.02));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-banner-kicker {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.plan-banner-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan-banner-list li {
  position: relative;
  padding: 5px 0 5px 18px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.plan-banner-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--good);
  font-weight: 800;
}

.plan-banner .btn {
  align-self: flex-start;
  margin-top: 4px;
}

.side-plan-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: rgba(249, 115, 22, 0.06);
  margin-bottom: 10px;
}

.side-plan-label {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 8px;
}

.side-plan-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.side-plan-list li {
  padding: 2px 0 2px 14px;
  position: relative;
}

.side-plan-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--good);
  font-size: 0.72rem;
  font-weight: 800;
}

.side-plan-upgrade {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-2);
  text-decoration: none;
}

.side-plan-upgrade:hover {
  color: #fff;
}

.quota-line-side {
  white-space: pre-line;
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 10px;
  border-radius: 10px;
  margin: 8px 0 0;
}

/* ---- Repair tickets ---- */
.repair-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.repair-ticket {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(165deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  padding: 14px 16px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.repair-ticket-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.repair-ticket-id {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.repair-badge {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.repair-badge-repaired {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.repair-badge-ready {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
}

.repair-badge-approval {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
}

.repair-badge-progress {
  border-color: rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.1);
  color: #fdba74;
}

.repair-badge-blocked {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.repair-ticket-dl {
  margin: 0 0 10px;
  display: grid;
  gap: 6px;
}

.repair-ticket-dl > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 8px;
  font-size: 0.9rem;
}

.repair-ticket-dl dt {
  margin: 0;
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
  padding-top: 3px;
}

.repair-ticket-dl dd {
  margin: 0;
  color: var(--text);
  font-weight: 650;
}

.repair-delta {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.repair-service-pips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.repair-service-pips span {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
}

.repair-summary {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 6px;
}

.repair-summary-key {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-right: 6px;
}

.repair-ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.repair-ticket-versions {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.repair-ticket-versions summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 0;
}

.repair-ticket-versions .lineage-track {
  margin-top: 8px;
}

/* Hide legacy lineage group chrome if any leftover */
.lineage-group-head {
  display: none;
}

/* ---- Repair queue dashboard (service computer) ---- */
.home-hero-queue {
  text-align: left;
  padding: 20px 18px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
  margin-bottom: 14px;
}

.home-hero-queue h1 {
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  margin: 0 0 8px;
}

.home-hero-queue .home-one-liner {
  margin: 0 0 14px !important;
  max-width: none !important;
  text-align: left !important;
  font-size: 0.98rem;
}

.home-hero-queue .home-actions {
  justify-content: flex-start;
  margin: 0 0 14px !important;
}

.home-plan-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.84rem;
  color: var(--muted);
}

.home-plan-kicker {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.home-plan-bits {
  flex: 1 1 auto;
  min-width: 0;
}

.home-plan-link {
  font-weight: 700;
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.84rem;
}

.home-plan-link:hover {
  color: #fff;
}

.shop-status-compact {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 18px;
}

.shop-status-dl-compact > div {
  padding: 4px 0;
  border-top: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.86rem;
}

.shop-status-dl-compact > div:last-child {
  border-bottom: none;
}

.shop-status-compact .label {
  margin-bottom: 6px;
}

.service-history-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.history-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-filter {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.history-filter.active,
.history-filter:hover {
  border-color: rgba(249, 115, 22, 0.4);
  color: var(--text);
  background: rgba(249, 115, 22, 0.1);
}

.history-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.history-search {
  flex: 1 1 160px;
  min-width: 140px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0c0e;
  color: var(--text);
  font-size: 0.88rem;
}

.history-sort {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0c0e;
  color: var(--text);
  font-size: 0.84rem;
}

.work-order {
  padding: 16px 16px 12px;
}

.work-order .repair-ticket-id {
  letter-spacing: 0.12em;
}

.repair-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--muted);
}

.repair-meta-row em {
  font-style: normal;
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-right: 4px;
  font-weight: 700;
}

.repair-badge-failed {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.repair-badge-diagnosing {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.12);
  color: #fdba74;
}

.side-account {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-account-label {
  font-family: var(--jk-mono, ui-monospace, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 800;
  margin-bottom: 6px;
}

.side-account .user-pill {
  margin-bottom: 8px;
}

.side-foot .side-listbulb,
.side-help {
  display: none;
}

@media (max-width: 800px) {
  .home-hero-queue {
    text-align: center;
  }
  .home-hero-queue .home-one-liner {
    text-align: center !important;
  }
  .home-hero-queue .home-actions {
    justify-content: center;
  }
  .home-plan-strip {
    justify-content: center;
    text-align: center;
  }
}
