/* ==========================================================================
   Biteworld — product surfaces
   The quote panel and the supplier workspace demo share one dark chrome:
   hairline rails, mono telemetry, violet reserved for AI.
   ========================================================================== */

/* ---------- quote application ---------- */

.quote-app {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(110% 70% at 100% 0%, rgba(76, 66, 150, 0.24), transparent 58%),
    linear-gradient(180deg, #12141a, #0d0e13);
  box-shadow: 0 60px 140px -80px rgba(0, 0, 0, 0.95);
}

.quote-app__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.quote-app__title {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.82);
}

.quote-app__title i {
  font-style: normal;
  color: rgba(255, 255, 255, 0.28);
  margin-inline: 2px;
}

.quote-app__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

@media (min-width: 640px) {
  .quote-app__body {
    grid-template-columns: minmax(230px, 0.78fr) minmax(0, 1.22fr);
  }
}

.quote-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
  .quote-form {
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.control {
  display: grid;
  gap: 9px;
}

.control__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.control__label b {
  font-size: 12px;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.92);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.segmented__btn {
  height: 34px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    background 0.25s,
    color 0.25s;
}

.segmented__btn:first-child {
  border-left: 0;
}

.segmented__btn:hover {
  color: #fff;
}

.segmented__btn[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 0 -1px 0 var(--ai-a);
}

.control input[type='range'] {
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.control input[type='range']::-webkit-slider-runnable-track {
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.control input[type='range']::-moz-range-track {
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.control input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(139, 123, 246, 0.22);
}

.control input[type='range']::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(139, 123, 246, 0.22);
}

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap select {
  width: 100%;
  height: 38px;
  padding: 0 30px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.select-wrap select option {
  background: #12141a;
  color: #fff;
}

.select-wrap .icon {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.quote-form .btn {
  margin-top: auto;
  width: 100%;
}

.quote-doc {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px;
}

.doc {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.022);
  animation: doc-in 0.45s var(--ease);
}

@keyframes doc-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.doc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
}

.doc__id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.doc__id .mono {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
}

.doc__meta {
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.36);
  text-align: right;
}

.doc__lines {
  display: flex;
  flex-direction: column;
  padding: 4px 12px;
}

.doc__lines li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  animation: line-in 0.5s var(--ease) backwards;
}

.doc__lines li:nth-child(1) {
  animation-delay: 40ms;
}
.doc__lines li:nth-child(2) {
  animation-delay: 90ms;
}
.doc__lines li:nth-child(3) {
  animation-delay: 140ms;
}
.doc__lines li:nth-child(4) {
  animation-delay: 190ms;
}
.doc__lines li:nth-child(5) {
  animation-delay: 240ms;
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.doc__label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.62);
  min-width: 0;
}

.doc__label i {
  font-style: normal;
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.26);
  white-space: nowrap;
}

.doc__amount {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.doc__sum {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  margin-top: auto;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.42);
}

.doc__sum .mono {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.68);
}

.doc__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(90deg, rgba(139, 123, 246, 0.14), rgba(139, 123, 246, 0) 72%);
}

.doc__total > span {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.doc__total > div {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.doc__total b {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
}

.doc__total i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}

.doc__basis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.doc__basis > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.doc__basis span {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.doc__basis b {
  font-size: 10.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc__confidence {
  display: grid;
  grid-template-columns: auto minmax(40px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px 13px;
}

.doc__confidence > span {
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.doc__confidence b {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.72);
}

.doc__meter {
  position: relative;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.doc__meter i {
  display: block;
  height: 100%;
  background: var(--ai-grad);
  transition: width 0.8s var(--ease);
}

/* loading state */

.doc--loading {
  padding: 12px;
  gap: 10px;
  border-style: dashed;
}

.doc__skeleton {
  height: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  background-size: 220% 100%;
  animation: shimmer 1.2s linear infinite;
}

.doc__skeleton:nth-child(1) {
  width: 42%;
}
.doc__skeleton:nth-child(2) {
  width: 100%;
}
.doc__skeleton:nth-child(3) {
  width: 85%;
}
.doc__skeleton:nth-child(4) {
  width: 64%;
}
.doc__skeleton:nth-child(5) {
  width: 92%;
  height: 22px;
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

.quote-app__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.quote-app__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.36);
}

.quote-app__meta .mono {
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.26);
  margin-right: 4px;
}

.quote-app__meta b {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ai-a);
}

.quote-app .btn--ghost {
  --btn-fg: rgba(255, 255, 255, 0.75);
  --btn-line: rgba(255, 255, 255, 0.22);
}

.quote-app .btn--ghost:hover {
  --btn-bg: #fff;
  --btn-fg: #111;
  --btn-line: #fff;
}

/* ---------- supplier workspace demo panel ---------- */

.window-toolbar {
  flex: none;
}

#demo-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 300px;
  padding: 20px;
  outline: none;
}

#demo-panel.panel-enter {
  animation: panel-enter 0.4s var(--ease);
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.demo-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-panel-title h3 {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
}

.demo-panel-title .icon {
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.35);
}

.demo-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.demo-status .icon {
  width: 11px;
  height: 11px;
  color: #7fd1a8;
}

.demo-primary {
  align-self: flex-start;
  margin-top: 4px;
}

.demo-guidance {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  max-width: 40ch;
}

.trip-route {
  display: flex;
  max-width: 440px;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}

.route-stop {
  display: grid;
  gap: 3px;
}

.route-stop span {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.route-stop strong {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
}

.route-link {
  flex: 1 1 auto;
  max-width: 220px;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.3);
}

.route-link .icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.route-link::before {
  content: '';
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0 4px, transparent 4px 8px);
}

.trip-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.driver-field {
  display: grid;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.driver-field select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12.5px;
  letter-spacing: 0;
  text-transform: none;
}

.driver-field select option {
  background: #12141a;
  color: #fff;
}

.driver-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.trip-checklist {
  display: grid;
  gap: 0;
}

.trip-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
}

.trip-checklist li .icon {
  width: 12px;
  height: 12px;
  color: #7fd1a8;
}

.trip-checklist li.pending-step {
  color: rgba(255, 255, 255, 0.26);
}

.trip-checklist li.pending-step .icon {
  color: rgba(255, 255, 255, 0.18);
}

.wallet-label {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.wallet-amount {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.wallet-amount strong {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.035em;
  color: #fff;
}

.wallet-amount span {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
}

.wallet-note {
  max-width: 44ch;
  font-size: 11.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.36);
}

.no-transfer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.no-transfer .icon {
  width: 11px;
  height: 11px;
  color: #7fd1a8;
}

.demo-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-progress span {
  position: relative;
  padding: 12px 10px 12px 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
  line-height: 1.5;
}

.demo-progress span:first-child {
  border-left: 0;
  padding-left: 16px;
}

.demo-progress span::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 16px;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.demo-progress span:first-child::before {
  left: 0;
}

.demo-progress span[data-done] {
  color: rgba(255, 255, 255, 0.68);
}

.demo-progress span[data-done]::before {
  border-color: #7fd1a8;
  background: #7fd1a8;
  box-shadow: 0 0 8px rgba(127, 209, 168, 0.5);
}

@media (max-width: 560px) {
  .demo-progress span {
    padding: 10px 6px 10px 14px;
    font-size: 7px;
    letter-spacing: 0.06em;
  }
  .demo-progress span::before {
    left: 5px;
    top: 14px;
  }
  .demo-progress span:first-child::before {
    left: 0;
  }
}

/* A control that does not affect the current service type stays visible but inactive,
   so the form layout never jumps when the supplier switches service. */
.control.is-inactive {
  opacity: 0.42;
}

.select-wrap select:disabled {
  cursor: not-allowed;
}
