@font-face {
  font-family: "IRANYekanXFaNum";
  src: url("/assets/fonts/IRANYekanXFaNum-Regular.woff2?v=2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanXFaNum";
  src: url("/assets/fonts/IRANYekanXFaNum-Medium.woff2?v=2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanXFaNum";
  src: url("/assets/fonts/IRANYekanXFaNum-DemiBold.woff2?v=2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanXFaNum";
  src: url("/assets/fonts/IRANYekanXFaNum-Bold.woff2?v=2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanXFaNum";
  src: url("/assets/fonts/IRANYekanXFaNum-ExtraBold.woff2?v=2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanXFaNum";
  src: url("/assets/fonts/IRANYekanXFaNum-Black.woff2?v=2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  --page: #ffffff;
  --sidebar: #fafafa;
  --surface: #ffffff;
  --surface-soft: #f5f6f8;
  --field: #eceef2;
  --text: #0a0a0a;
  --muted: #717182;
  --subtle: #9ba2ae;
  --border: rgba(0, 0, 0, 0.1);
  --line: #e5e5e5;
  --primary: #3b82f6;
  --primary-soft: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --warning: #f59e0b;
  --info: #00b8db;
  --sidebar-width: 320px;
}

html.dark {
  --page: #09090f;
  --sidebar: #16161e;
  --surface: #16161e;
  --surface-soft: #1d1d27;
  --field: #1d1d27;
  --text: #f5f5f7;
  --muted: #a1a1ad;
  --subtle: #777785;
  --border: rgba(255, 255, 255, 0.1);
  --line: #2a2a34;
  --primary-soft: rgba(59, 130, 246, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: "IRANYekanXFaNum", Tahoma, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  direction: ltr;
}

.main-content,
.sidebar {
  direction: rtl;
}

.main-content {
  min-width: 0;
  background: var(--page);
}

.topbar {
  height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  direction: ltr;
}

.topbar h1 {
  margin: 0;
  direction: rtl;
  font-size: 15px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  direction: ltr;
}

.icon-button,
.theme-toggle,
.mobile-menu {
  border: 0;
  background: transparent;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--field);
  color: var(--muted);
}

.icon-button svg {
  font-size: 16px;
}

.primary-button {
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #f5f5f7;
  font-size: 12px;
  font-weight: 500;
}

.primary-button svg {
  font-size: 16px;
}

.mobile-menu {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--field);
}

.dashboard-content {
  padding: 32px;
}

.project-panel {
  margin-top: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  direction: rtl;
  text-align: right;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 23px;
}

.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.service-pill {
  min-width: 150px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  white-space: nowrap;
}

.service-pill span {
  color: var(--muted);
  font-size: 10px;
}

.service-pill strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.service-pill strong.is-online {
  color: var(--success);
}

.service-pill strong.is-offline {
  color: #ef4444;
}

.workflow-progress {
  position: relative;
  margin-top: 22px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr) 38px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  border-radius: 22px;
  background:
    radial-gradient(circle at 85% 0, rgba(1, 99, 150, 0.12), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface-soft) 84%, #e9f8ff), var(--surface));
  overflow: hidden;
  isolation: isolate;
  direction: rtl;
  text-align: right;
}

.workflow-progress::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(1, 99, 150, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 99, 150, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to left, #000, transparent 80%);
}

.workflow-step {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 16px 104px 16px 16px;
  display: flex;
  align-items: center;
  border: 2px solid transparent;
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.34);
  transition:
    opacity 280ms ease,
    filter 280ms ease,
    transform 280ms ease,
    border-color 280ms ease,
    box-shadow 280ms ease;
}

.workflow-step::before,
.workflow-step::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: #0284b8;
  opacity: 0;
  transition: opacity 220ms ease;
}

.workflow-step::before {
  top: 9px;
  right: 9px;
  border-top: 1.5px solid;
  border-right: 1.5px solid;
  border-radius: 0 7px 0 0;
}

.workflow-step::after {
  bottom: 9px;
  left: 9px;
  border-bottom: 1.5px solid;
  border-left: 1.5px solid;
  border-radius: 0 0 0 7px;
}

.workflow-step.is-active,
.workflow-step.is-ready {
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(1, 99, 150, 0.12),
    inset 0 2px 8px rgba(255, 255, 255, 0.52);
}

.workflow-step.is-active::before,
.workflow-step.is-active::after,
.workflow-step.is-ready::before,
.workflow-step.is-ready::after {
  opacity: 1;
}

.workflow-step.is-ready {
  border-color: color-mix(in srgb, var(--success) 42%, #ffffff);
}

.workflow-step.is-pending {
  opacity: 0.46;
  filter: blur(1.2px) saturate(0.65);
  transform: scale(0.96);
}

.workflow-step.is-complete {
  opacity: 0.76;
  transform: scale(0.97);
}

.workflow-step.is-complete .workflow-step-number {
  background: var(--success);
}

.workflow-step.is-complete .workflow-step-number::before {
  content: "✓";
}

.workflow-step.is-complete .workflow-step-number {
  font-size: 0;
}

.workflow-step.is-complete .workflow-step-number::before {
  font-size: 11px;
}

.workflow-artwork {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(247, 250, 250, 0.72);
  transform: translateY(-50%);
}

.workflow-artwork img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.workflow-step-number {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #016396;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
}

.workflow-step-copy {
  min-width: 0;
  direction: rtl;
  text-align: right;
}

.workflow-step-copy small {
  color: var(--muted);
  font-size: 9px;
}

.workflow-step-copy h3 {
  margin: 3px 0 0;
  color: #016396;
  font-size: 13px;
  font-weight: 600;
  line-height: 22px;
}

.dark .workflow-step-copy h3 {
  color: #5dc5ee;
}

.workflow-step-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 18px;
}

.workflow-step-state {
  margin-top: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #016396;
  font-size: 10px;
  font-weight: 600;
}

.workflow-step-state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.workflow-step.is-active .workflow-step-state::before {
  animation: workflow-pulse 850ms ease-in-out infinite alternate;
}

.workflow-step.is-complete .workflow-step-state {
  color: var(--success);
}

.workflow-connector {
  position: relative;
  align-self: center;
  height: 2px;
  background: color-mix(in srgb, var(--primary) 24%, var(--border));
}

.workflow-connector::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 50%;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--primary) 25%, var(--surface));
  transform: translate(50%, -50%) rotate(45deg);
}

.workflow-progress[data-workflow-state="analyzing"] .workflow-connector:first-of-type,
.workflow-progress[data-workflow-state="report"] .workflow-connector {
  background: linear-gradient(90deg, #4db4d9, #016396);
}

.workflow-progress[data-workflow-state="analyzing"] .workflow-connector:first-of-type::before,
.workflow-progress[data-workflow-state="report"] .workflow-connector::before {
  background: #016396;
  box-shadow: 0 0 0 5px rgba(1, 99, 150, 0.1);
}

.workflow-live-status {
  min-height: 22px;
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 22px;
  direction: rtl;
  text-align: right;
}

.workflow-panel[hidden] {
  display: none !important;
}

.project-panel[data-active-panel="analyzing"] .workflow-live-status {
  color: #016396;
  font-weight: 600;
}

.project-panel[data-active-panel="report"] {
  padding-bottom: 16px;
}

.analysis-workspace {
  position: relative;
  min-height: 340px;
  margin-top: 20px;
  padding: 38px;
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 52px;
  border: 1px solid color-mix(in srgb, #016396 20%, var(--border));
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 45%, rgba(77, 180, 217, 0.2), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface-soft) 88%, #e8f8ff), var(--surface));
  overflow: hidden;
  direction: rtl;
  text-align: right;
}

.analysis-workspace::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(1, 99, 150, 0.12) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

.analysis-workspace-visual {
  position: relative;
  z-index: 1;
  width: 230px;
  height: 230px;
  display: grid;
  place-items: center;
  justify-self: center;
}

.analysis-workspace-visual::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(77, 180, 217, 0.12);
  box-shadow:
    0 0 0 22px rgba(77, 180, 217, 0.06),
    0 22px 60px rgba(1, 99, 150, 0.22);
  animation: analysis-breathe 1.5s ease-in-out infinite alternate;
}

.analysis-workspace-visual img {
  position: relative;
  z-index: 2;
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(1, 99, 150, 0.18));
}

.analysis-orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(1, 99, 150, 0.2);
  border-radius: 50%;
  animation: analysis-spin 5s linear infinite;
}

.analysis-orbit::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4db4d9;
  box-shadow: 0 0 0 5px rgba(77, 180, 217, 0.12);
}

.analysis-orbit-one {
  width: 210px;
  height: 210px;
}

.analysis-orbit-two {
  width: 174px;
  height: 174px;
  animation-duration: 3.8s;
  animation-direction: reverse;
}

.analysis-workspace-copy {
  position: relative;
  z-index: 1;
  direction: rtl;
  text-align: right;
}

.analysis-workspace-copy h3 {
  margin: 6px 0 0;
  color: #016396;
  font-size: 24px;
  font-weight: 600;
  line-height: 38px;
}

.dark .analysis-workspace-copy h3 {
  color: #5dc5ee;
}

.analysis-workspace-copy > p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 25px;
}

.analysis-progress {
  position: relative;
  height: 8px;
  margin-top: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 10%, var(--field));
  overflow: hidden;
}

.analysis-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8edcf4, #016396);
  animation: analysis-progress 1.5s ease-in-out infinite;
}

.analysis-runtime-steps {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  direction: rtl;
  text-align: right;
}

.analysis-runtime-steps span {
  position: relative;
  min-height: 50px;
  padding: 10px 32px 10px 10px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--muted);
  font-size: 10px;
  line-height: 18px;
}

.analysis-runtime-steps span::before {
  content: "";
  position: absolute;
  right: 12px;
  width: 10px;
  height: 10px;
  border: 2px solid color-mix(in srgb, var(--muted) 28%, transparent);
  border-radius: 50%;
}

.analysis-runtime-steps .is-done {
  color: var(--success);
}

.analysis-runtime-steps .is-done::before {
  content: "✓";
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(16, 185, 129, 0.14);
  font-size: 8px;
}

.analysis-runtime-steps .is-running {
  border-color: rgba(1, 99, 150, 0.25);
  color: #016396;
  font-weight: 600;
}

.analysis-runtime-steps .is-running::before {
  border-color: rgba(1, 99, 150, 0.2);
  border-top-color: #016396;
  animation: analysis-spin 700ms linear infinite;
}

.analysis-workspace-copy > small {
  margin-top: 16px;
  display: block;
  color: var(--subtle);
  font-size: 9px;
  line-height: 18px;
}

@keyframes analysis-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes analysis-breathe {
  to {
    transform: scale(1.08);
    opacity: 0.72;
  }
}

@keyframes analysis-progress {
  0% {
    left: -38%;
  }
  100% {
    left: 100%;
  }
}

.workflow-progress[data-workflow-state="analyzing"] + .workflow-live-status {
  color: #016396;
  font-weight: 600;
}

@keyframes workflow-pulse {
  to {
    opacity: 0.25;
    transform: scale(1.5);
  }
}

.project-form {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  direction: rtl;
  text-align: right;
}

.form-fields {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.location-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.location-fields label,
.rule-version-field,
.parameter-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

select,
.location-fields input,
.parameter-fields input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 0;
  background: var(--field);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5L10 12L14.5 7.5' stroke='%23717182' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: left 14px center;
  background-size: 18px 18px;
  background-repeat: no-repeat;
}

select {
  padding: 0 16px 0 42px;
}

.location-fields input,
.parameter-fields input {
  background-image: none;
}

input::placeholder {
  color: var(--subtle);
}

select:disabled {
  opacity: 0.45;
}

select:focus,
.location-fields input:focus,
.parameter-fields input:focus,
.code-inputs input:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.parameter-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.8fr);
  gap: 12px;
  align-items: end;
}

.contract-note {
  min-height: 48px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  line-height: 20px;
}

.review-code {
  margin: 0;
  padding: 0;
  border: 0;
}

.review-code legend,
.field-label {
  margin-bottom: 6px;
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.upload-field {
  text-align: center;
}

.code-inputs {
  display: grid;
  grid-template-columns: repeat(7, minmax(46px, 1fr));
  gap: 8px;
}

.code-part {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.code-part > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-help,
.code-error {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 18px;
}

.code-help {
  color: var(--muted);
}

.code-error {
  color: #b42318;
}

.code-error[hidden] {
  display: none;
}

.code-inputs input[aria-invalid="true"] {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.1);
}

.code-inputs input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 0;
  background: var(--field);
  color: var(--text);
  text-align: center;
  font-size: 18px;
}

.dropzone {
  min-height: 180px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: 24px;
  direction: rtl;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.dropzone.is-disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.dropzone.is-disabled:hover,
.dropzone.is-disabled.is-dragging {
  border-color: var(--border);
  background: transparent;
}

.dropzone-title {
  width: 100%;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  text-align: center;
}

.dropzone-formats,
.selected-file {
  width: 100%;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.dropzone-formats {
  width: 100%;
  text-align: center;
}

.selected-file {
  color: var(--success);
  font-weight: 500;
  text-align: center;
}

.upload-options {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  align-self: center;
  direction: rtl;
}

.upload-options i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--field);
  color: var(--muted);
  font-style: normal;
}

.upload-options svg {
  font-size: 16px;
}

.analysis-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cost-card {
  min-height: 108px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--field);
}

.api-state-card {
  align-items: stretch;
  direction: rtl;
  text-align: right;
}

.cost-card span {
  color: var(--muted);
  font-size: 11px;
}

.api-state-card > span,
.api-state-card > strong,
.api-state-card > small {
  width: 100%;
  text-align: right;
}

.cost-card strong {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 500;
  line-height: 30px;
}

.cost-card small {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 11px;
}

.api-state-card strong {
  font-size: 15px;
}

.api-state-card strong.online {
  color: var(--success);
}

.api-state-card strong.online + #rules-state {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--success) 32%, var(--border));
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.16), color-mix(in srgb, var(--surface) 82%, transparent)),
    var(--surface);
  color: color-mix(in srgb, var(--success) 74%, var(--text));
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  border-right: 4px solid var(--success);
}

.api-state-card strong.offline {
  color: #ef4444;
}

.analysis-steps {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  color: #647a87;
  font-size: 12px;
}

.dark .analysis-steps {
  color: var(--muted);
}

.analysis-steps li {
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.analysis-steps span {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  font-size: 11px;
}

.submit-analysis {
  width: 100%;
  height: 48px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  transition: opacity 160ms ease, transform 160ms ease;
}

.submit-analysis:not(:disabled):hover {
  transform: translateY(-1px);
}

.submit-analysis:disabled {
  background: var(--field);
  color: var(--muted);
  cursor: not-allowed;
}

.submit-analysis svg {
  font-size: 17px;
}

.sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--sidebar);
}

.sidebar-brand {
  height: 72px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  direction: ltr;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
}

.theme-toggle:hover {
  background: var(--field);
}

.theme-toggle svg {
  grid-area: 1 / 1;
  font-size: 16px;
}

.sun-icon,
.dark .moon-icon {
  display: none;
}

.dark .sun-icon {
  display: block;
}

.product-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-brand span {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.product-brand strong {
  font-size: 12px;
  font-weight: 400;
}

.product-brand small {
  color: var(--muted);
  font-size: 11px;
}

.product-brand i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary);
  color: #ffffff;
  font-style: normal;
}

.product-brand svg {
  font-size: 18px;
}

.sidebar-nav {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--line);
}

.nav-label {
  padding: 0 12px 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
}

.sidebar-nav a,
.recent-projects a {
  display: flex;
  align-items: center;
  border-radius: 14px;
  color: var(--muted);
}

.sidebar-nav a {
  height: 40px;
  padding: 0 12px;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.sidebar-nav a svg {
  font-size: 16px;
}

.sidebar-nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-nav a:hover,
.recent-projects a:hover {
  background: var(--field);
  color: var(--text);
}

.recent-projects {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.empty-session {
  margin: 4px 12px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 20px;
}

.recent-projects a {
  height: 34px;
  padding: 0 12px;
  gap: 10px;
  font-size: 12px;
}

.status {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
}

.success-dot { background: #5ce7a9; }
.warning-dot { background: var(--warning); }
.neutral-dot { background: var(--text); }

.sidebar-backdrop {
  display: none;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: 24px;
  left: 50%;
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--text);
  color: var(--page);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.results-panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  direction: rtl;
  text-align: right;
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
}

.results-heading h2 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 600;
}

.results-workspace {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
  direction: rtl;
}

.report-column {
  min-width: 0;
  direction: rtl;
  text-align: right;
}

.report-outcome {
  position: relative;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 86%, #fff), var(--surface)),
    var(--surface);
  box-shadow: 0 18px 40px rgba(31, 41, 55, 0.08);
  overflow: hidden;
}

.report-outcome::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--primary);
}

.report-outcome.failed {
  border-color: rgba(239, 68, 68, 0.3);
  background:
    linear-gradient(135deg, rgba(254, 242, 242, 0.94), var(--surface)),
    var(--surface);
}

.report-outcome.failed::before,
.report-outcome.failed .outcome-meter span {
  background: #ef4444;
}

.report-outcome.warning {
  border-color: rgba(245, 158, 11, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.94), var(--surface)),
    var(--surface);
}

.report-outcome.warning::before,
.report-outcome.warning .outcome-meter span {
  background: var(--warning);
}

.report-outcome.passed::before,
.report-outcome.passed .outcome-meter span {
  background: var(--success);
}

.outcome-main {
  min-width: 0;
}

.outcome-main h3 {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  line-height: 38px;
}

.outcome-main p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 24px;
}

.outcome-score {
  min-height: 112px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.outcome-score strong {
  color: var(--text);
  font-size: 38px;
  font-weight: 800;
  line-height: 42px;
}

.outcome-score strong span {
  margin-right: 2px;
  color: var(--muted);
  font-size: 18px;
}

.outcome-score small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.outcome-meter {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  background: var(--field);
  overflow: hidden;
}

.outcome-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.outcome-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.outcome-stats span {
  min-height: 54px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--muted);
  font-size: 10px;
  line-height: 18px;
}

.outcome-stats strong {
  color: var(--text);
  font-size: 18px;
  line-height: 22px;
}

.report-status {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: 11px;
}

.report-status.passed {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.report-status.failed {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.report-status.warning {
  background: rgba(245, 158, 11, 0.14);
  color: var(--warning);
}

.pipeline-stages {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  direction: rtl;
  text-align: right;
}

.pipeline-stage {
  position: relative;
  min-height: 60px;
  padding: 10px 34px 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.pipeline-stage::before {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 20px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  font-size: 10px;
  font-weight: 700;
}

.pipeline-stage span {
  font-size: 11px;
  font-weight: 600;
}

.pipeline-stage small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.pipeline-stage.muted::before {
  content: "—";
  background: var(--field);
  color: var(--muted);
}

.report-summary {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  direction: rtl;
  text-align: right;
}

.report-column .pipeline-stages {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-column .report-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-column .report-narrative {
  grid-template-columns: 1fr;
}

.report-column .narrative-section:first-child,
.report-column .narrative-section:last-child:not(:first-child) {
  grid-column: auto;
}

.report-column .report-details {
  grid-template-columns: 1fr;
}

.summary-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.summary-item strong {
  margin-top: 6px;
  display: block;
  font-size: 18px;
  font-weight: 600;
}

.report-narrative {
  margin: 20px 0 0;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(59, 130, 246, 0.12), transparent 38%),
    var(--primary-soft);
  color: var(--text);
  font-size: 13px;
  line-height: 26px;
  direction: rtl;
  text-align: right;
}

.narrative-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 5px 18px rgba(31, 41, 55, 0.04);
  direction: rtl;
  text-align: right;
}

.narrative-section:first-child {
  grid-column: 1 / -1;
}

.narrative-section:last-child:not(:first-child) {
  grid-column: 1 / -1;
}

.narrative-section h3 {
  position: relative;
  margin: 0 0 12px;
  padding: 0 15px 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
}

.narrative-section h3::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.11);
}

.narrative-section p {
  margin: 0;
  color: var(--muted);
  line-height: 25px;
}

.narrative-section p + p {
  margin-top: 10px;
}

.narrative-highlight {
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border));
  border-radius: 12px;
  background: linear-gradient(
    110deg,
    color-mix(in srgb, var(--primary-soft) 80%, transparent),
    color-mix(in srgb, var(--surface) 90%, transparent)
  );
}

.narrative-highlight span {
  color: var(--muted);
  font-size: 11px;
}

.narrative-highlight strong {
  color: var(--primary);
  font-size: 13px;
}

.narrative-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  list-style: none;
  direction: rtl;
  text-align: right;
}

.narrative-list li {
  position: relative;
  padding-right: 18px;
  color: var(--muted);
  line-height: 24px;
  white-space: normal;
}

.narrative-list-ul li::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.narrative-list-ol {
  counter-reset: narrative-item;
}

.narrative-list-ol li {
  counter-increment: narrative-item;
  padding-right: 28px;
}

.narrative-list-ol li::before {
  content: counter(narrative-item);
  position: absolute;
  top: 3px;
  right: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}

.narrative-list li.has-children {
  padding-right: 0;
}

.narrative-list li.has-children::before {
  display: none;
}

.narrative-list-nested {
  margin-top: 9px;
  padding: 10px 12px;
  gap: 7px;
  border-right: 2px solid color-mix(in srgb, var(--primary) 32%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary-soft) 55%, transparent);
}

.narrative-list-nested li {
  font-size: 12px;
  line-height: 23px;
}

.narrative-list-nested li::before {
  width: 5px;
  height: 5px;
}

.narrative-section strong {
  color: var(--text);
  font-weight: 700;
}

.narrative-section em {
  color: var(--text);
}

.narrative-section code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--field);
  color: var(--primary);
  font-family: inherit;
  font-size: 11px;
}

.narrative-section blockquote {
  margin: 0;
  padding: 10px 14px;
  border-right: 3px solid var(--primary);
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--muted);
}

.narrative-section hr {
  height: 1px;
  margin: 12px 0;
  border: 0;
  background: var(--border);
}

.report-details {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  direction: rtl;
  text-align: right;
}

.report-group {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
  direction: rtl;
  text-align: right;
}

.report-group.is-critical { border-color: rgba(239, 68, 68, 0.24); }
.report-group.is-success { border-color: rgba(16, 185, 129, 0.24); }
.report-group.is-warning { border-color: rgba(245, 158, 11, 0.28); }

.report-group-head {
  min-height: 66px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.report-group-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
}

.report-group-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.report-group-head > strong {
  min-width: 38px;
  height: 38px;
  padding-inline: 10px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font-size: 15px;
}

.report-group.is-critical .report-group-head > strong {
  background: rgba(239, 68, 68, 0.11);
  color: #d73c49;
}

.report-group.is-success .report-group-head > strong {
  background: rgba(16, 185, 129, 0.11);
  color: #13835b;
}

.report-group.is-warning .report-group-head > strong {
  background: rgba(245, 158, 11, 0.12);
  color: #a56e08;
}

.report-item-list {
  margin: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}

.report-item-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid var(--border);
  border-right-width: 4px;
  border-radius: 14px;
  background: #fff;
}

.report-item-card.is-critical { border-right-color: #ef4444; }
.report-item-card.is-success { border-right-color: #10b981; }
.report-item-card.is-warning { border-right-color: #f59e0b; }
.report-item-card.is-info { border-right-color: var(--primary); }

.report-item-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--field);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.report-item-card.is-critical .report-item-number {
  background: rgba(239, 68, 68, 0.11);
  color: #d73c49;
}

.report-item-card.is-success .report-item-number {
  background: rgba(16, 185, 129, 0.11);
  color: #13835b;
}

.report-item-card.is-warning .report-item-number {
  background: rgba(245, 158, 11, 0.12);
  color: #a56e08;
}

.report-item-content { min-width: 0; }

.report-item-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-item-title-row h4 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.7;
}

.report-item-content > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.report-legal-reference {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: 9px;
}

.report-measurements {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.report-measurements span {
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}

.report-measurements strong {
  color: var(--text);
  font-size: 11px;
}

.report-entity-reference {
  margin-top: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
  border-radius: 11px;
  background: color-mix(in srgb, var(--primary) 4%, #fff);
}

.report-entity-badge {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  direction: ltr;
  font-size: 11px;
  font-weight: 800;
}

.report-entity-reference div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.report-entity-reference strong {
  color: var(--text);
  font-size: 11px;
}

.report-entity-reference div > span {
  color: var(--muted);
  font-size: 10px;
}

.report-entity-reference button {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid color-mix(in srgb, var(--primary) 42%, var(--border));
  border-radius: 9px;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
}

.report-entity-reference button:hover {
  background: var(--primary-soft);
}

.report-technical-reference {
  margin-top: 8px;
  color: var(--subtle);
  font-size: 9px;
}

.report-technical-reference summary {
  width: fit-content;
  cursor: pointer;
}

.report-technical-reference code {
  margin-top: 5px;
  padding: 4px 7px;
  display: inline-block;
  border-radius: 6px;
  background: var(--field);
  color: var(--muted);
  font-size: 9px;
}

.report-empty {
  margin: 16px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

/* Current public workflow accepts an image and analyzes the configured simple plan. */
.location-fields {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.parameter-fields {
  display: none !important;
}

.upload-preview {
  width: min(100%, 420px);
  max-height: 210px;
  margin-top: 14px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.analyzed-plan-card {
  position: sticky;
  top: 18px;
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  direction: rtl;
  text-align: right;
}

.analyzed-plan-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.analyzed-plan-heading h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.analysis-scope-badge {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.plan-svg {
  min-height: 0;
  aspect-ratio: 1 / 1;
  max-height: calc(100vh - 180px);
  padding: 12px;
  display: grid;
  place-items: center;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.plan-svg svg {
  width: 100%;
  height: auto;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  stroke-width: initial;
}

.analyzed-plan-card > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 700ms ease-in-out infinite alternate;
}

@keyframes pulse {
  to {
    opacity: 0.3;
    transform: scale(0.7);
  }
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 280px;
  }

  .dashboard-content {
    padding: 24px;
  }

  .project-form {
    gap: 24px;
  }

  .workflow-progress {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .workflow-connector {
    width: 2px;
    height: 18px;
    justify-self: center;
  }

  .workflow-step.is-pending,
  .workflow-step.is-complete {
    transform: none;
  }

  .analysis-workspace {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 28px;
  }

  .analysis-workspace-visual {
    width: 190px;
    height: 190px;
  }

  .analysis-workspace-visual img {
    width: 150px;
    height: 150px;
  }

  .analysis-orbit-one {
    width: 180px;
    height: 180px;
  }

  .analysis-orbit-two {
    width: 146px;
    height: 146px;
  }

  .code-inputs {
    grid-template-columns: repeat(7, minmax(38px, 1fr));
  }
}

@media (max-width: 960px) {
  .app-shell {
    display: block;
  }

  .topbar {
    padding: 0 20px;
  }

  .mobile-menu {
    display: grid;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    transform: translateX(100%);
    transition: transform 220ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 15;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(3, 2, 19, 0.45);
  }

  .sidebar-backdrop.is-visible {
    display: block;
  }

  .project-form {
    grid-template-columns: 1fr;
  }

  .analysis-summary {
    display: grid;
    grid-template-columns: 280px 1fr;
    align-items: start;
  }

  .submit-analysis {
    grid-column: 1 / -1;
  }

  .report-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pipeline-stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-workspace {
    grid-template-columns: 1fr;
  }

  .analyzed-plan-card {
    position: static;
  }

  .plan-svg {
    aspect-ratio: auto;
    min-height: 320px;
    max-height: none;
  }
}

@media (max-width: 700px) {
  .dashboard-content {
    padding: 18px;
  }

  .topbar-actions .profile-button {
    display: none;
  }

  .project-panel {
    margin-top: 0;
    padding: 18px;
  }

  .panel-heading {
    flex-direction: column;
  }

  .service-pill {
    width: 100%;
    min-width: 0;
  }

  .workflow-progress {
    padding: 12px;
  }

  .workflow-step {
    min-height: 122px;
    padding-right: 94px;
  }

  .workflow-artwork {
    width: 74px;
    height: 74px;
  }

  .workflow-artwork img {
    width: 64px;
    height: 64px;
  }

  .analysis-workspace {
    min-height: 0;
    padding: 28px 18px;
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: right;
  }

  .analysis-workspace-copy > p {
    margin-inline: 0;
  }

  .analysis-runtime-steps {
    grid-template-columns: 1fr;
    text-align: right;
  }

  .location-fields {
    grid-template-columns: 1fr;
  }

  .parameter-fields {
    grid-template-columns: 1fr;
  }

  .code-inputs {
    gap: 5px;
  }

  .code-inputs input {
    height: 44px;
    border-radius: 11px;
  }

  .analysis-summary {
    display: flex;
  }

  .report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-outcome {
    grid-template-columns: 1fr;
  }

  .outcome-score {
    min-height: 96px;
  }

  .outcome-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-details {
    grid-template-columns: 1fr;
  }

  .report-narrative {
    grid-template-columns: 1fr;
  }

  .narrative-section:first-child {
    grid-column: auto;
  }

  .narrative-section:last-child:not(:first-child) {
    grid-column: auto;
  }

  .pipeline-stages {
    grid-template-columns: 1fr;
  }

  .dropzone {
    padding: 20px 12px;
  }

  .analyzed-plan-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .plan-svg {
    min-height: 220px;
  }
}

/* Completed orders page */
.completed-orders-panel {
  width: 100%;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.completed-orders-panel h2 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.completed-orders-panel .orders-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.completed-orders-panel .orders-table {
  min-width: 760px;
}

.completed-orders-panel .orders-table th,
.completed-orders-panel .orders-table td {
  height: 40px;
  padding-block: 6px;
}

.completed-orders-panel .orders-table td button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.app-shell[data-section="completed"] .dashboard-content,
.app-shell[data-section="active"] .dashboard-content {
  min-height: calc(100vh - 72px);
}

@media (max-width: 620px) {
  .completed-orders-panel {
    min-height: 0;
    padding: 14px;
  }
}

/* Final support layout overrides */
.app-shell[data-section="tickets"] .support-panel {
  min-height: 0;
  padding: 16px;
  border-radius: 12px;
}

.app-shell[data-section="tickets"] .ticket-compose-card,
.app-shell[data-section="tickets"] .ticket-detail-card {
  position: static;
  inset: auto;
  min-height: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.app-shell[data-section="tickets"] .ticket-compose-card header {
  min-height: 32px;
  margin: 0 0 8px;
  padding: 0;
  display: block;
}

.app-shell[data-section="tickets"] .ticket-compose-actions {
  margin-top: 18px;
  direction: ltr;
  justify-content: flex-start;
}

.app-shell[data-section="tickets"] .ticket-compose-actions .support-primary-button {
  padding: 8px 18px;
  border: 0;
  background: #0879aa;
  color: #fff;
}

.app-shell[data-section="tickets"] .ticket-message-field textarea {
  min-height: 100px;
}

/* User-facing report: interactive plan and readable findings */
.app-shell[data-view="report"] .result-preview-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
}

.app-shell[data-view="report"] .result-preview-main,
.app-shell[data-view="report"] .result-preview-aside,
.app-shell[data-view="report"] .result-plan-card {
  min-height: 0;
}

.app-shell[data-view="report"] .result-plan-card {
  display: flex;
  flex-direction: column;
}

.plan-viewer-toolbar {
  min-height: 46px;
  margin-top: 8px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dce7ec;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #f6fafc;
  color: #60727c;
  font-size: 11px;
}

.plan-viewer-toolbar > div {
  display: flex;
  gap: 6px;
  direction: ltr;
}

.plan-viewer-toolbar button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #cddde5;
  border-radius: 8px;
  background: #fff;
  color: #0879aa;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.plan-viewer-toolbar button:hover,
.plan-viewer-toolbar button:focus-visible {
  border-color: #0879aa;
  background: #eaf5fa;
  outline: 0;
}

.plan-viewer-toolbar button:active {
  transform: scale(0.94);
}

.plan-viewer-toolbar svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg {
  width: 100%;
  height: clamp(520px, 64vh, 760px);
  min-height: 520px;
  max-height: none;
  padding: 0;
  display: block;
  border: 1px solid #dce7ec;
  border-radius: 0 0 12px 12px;
  background: #fff;
  overflow: hidden;
  outline: 0;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg:focus-within {
  border-color: #0879aa;
  box-shadow: 0 0 0 3px rgba(8, 121, 170, 0.12);
}

.app-shell[data-view="report"] .result-plan-card .plan-svg svg {
  width: 100%;
  height: 100%;
  max-height: none;
  display: block;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg svg.is-panning {
  cursor: grabbing;
}

.app-shell[data-view="report"] .result-preview-aside {
  max-height: calc(clamp(520px, 64vh, 760px) + 82px);
}

.app-shell[data-view="report"] .result-findings-card {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.app-shell[data-view="report"] .result-findings-card > header {
  min-height: 40px;
  flex: none;
}

.app-shell[data-view="report"] .result-findings {
  min-height: 0;
  margin-top: 10px;
  padding-inline-end: 5px;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #b9d2df transparent;
}

.report-finding-group.is-success {
  background: #edf9f4;
}

.report-finding-group.is-success summary strong {
  color: #13835b;
}

.app-shell[data-view="report"] .report-finding-group summary {
  min-height: 52px;
  padding: 11px 14px;
  font-size: 12px;
}

.app-shell[data-view="report"] .report-finding-group summary strong {
  font-size: 12px;
}

.app-shell[data-view="report"] .result-finding {
  padding: 14px 12px;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
}

.app-shell[data-view="report"] .result-finding-icon {
  width: 24px;
  height: 24px;
}

.app-shell[data-view="report"] .result-finding h4 {
  font-size: 13px;
  line-height: 1.75;
}

.app-shell[data-view="report"] .result-finding p {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.9;
}

.app-shell[data-view="report"] .result-finding.is-success h4 {
  color: #13835b;
}

.app-shell[data-view="report"] .report-measurements {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app-shell[data-view="report"] .report-measurements span {
  min-height: 54px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid rgba(8, 121, 170, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.74);
  color: #687981;
  font-size: 10px;
}

.app-shell[data-view="report"] .report-measurements strong {
  color: #233842;
  font-size: 12px;
}

.app-shell[data-view="report"] .result-finding-action {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  color: #344a55;
}

.result-finding-location {
  min-height: 30px;
  margin-top: 10px;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #bcd8e5;
  border-radius: 999px;
  background: #fff;
  color: #0879aa;
  font: 600 10px/1.4 inherit;
  cursor: pointer;
}

.result-finding-location span {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0879aa;
  color: #fff;
  direction: ltr;
}

@media (max-width: 960px) {
  .app-shell[data-view="report"] .result-preview-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell[data-view="report"] .result-plan-card .plan-svg {
    height: clamp(440px, 60svh, 660px);
    min-height: 440px;
  }

  .app-shell[data-view="report"] .result-preview-aside {
    max-height: none;
  }

  .app-shell[data-view="report"] .result-findings {
    flex: 0 1 auto;
    max-height: 620px;
  }
}

@media (max-width: 600px) {
  .plan-viewer-toolbar {
    align-items: flex-start;
  }

  .plan-viewer-toolbar > span {
    max-width: 190px;
    line-height: 1.7;
  }

  .app-shell[data-view="report"] .result-plan-card .plan-svg {
    height: clamp(380px, 58svh, 520px);
    min-height: 380px;
  }

  .app-shell[data-view="report"] .report-measurements {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Specificity guard for the legacy report cascade below. */
.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg {
  border-color: #263841;
  background: #05090c;
}

.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg:focus-within {
  border-color: #4acdf7;
  box-shadow: 0 0 0 2px rgba(74, 205, 247, 0.16);
}

.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg .bg {
  fill: #05090c !important;
}

.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg .grid {
  stroke: #16252c !important;
}

.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg .plan-frame {
  fill: none !important;
  stroke: #52646d !important;
}

.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg .slot {
  fill: transparent !important;
  stroke: #176dff !important;
}

.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg .yard {
  fill: none !important;
  stroke: #74e8ff !important;
}

.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg .driveway {
  fill: none !important;
  stroke: #f2e85c !important;
}

/* CAD-first report viewer — native SVG, layer colors, and drafting contrast */
.app-shell[data-view="report"] .plan-viewer-toolbar {
  border-color: #263841;
  background: #10181d;
  color: #9fb1ba;
}

.app-shell[data-view="report"] .plan-viewer-toolbar > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-shell[data-view="report"] .cad-viewer-badge {
  padding: 3px 6px;
  border: 1px solid #39505b;
  border-radius: 4px;
  background: #18242a;
  color: #7fdfff;
  font: 600 9px/1 Consolas, monospace;
  letter-spacing: 0.08em;
}

.app-shell[data-view="report"] .plan-viewer-toolbar button {
  border-color: #344850;
  background: #172228;
  color: #82dfff;
}

.app-shell[data-view="report"] .plan-viewer-toolbar button:hover,
.app-shell[data-view="report"] .plan-viewer-toolbar button:focus-visible {
  border-color: #67d6ff;
  background: #203039;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg {
  border-color: #263841;
  background: #05090c;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg:focus-within {
  border-color: #4acdf7;
  box-shadow: 0 0 0 2px rgba(74, 205, 247, 0.16);
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .bg {
  fill: #05090c !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .grid {
  stroke: #16252c !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .plan-frame {
  fill: none !important;
  stroke: #52646d !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .site-boundary {
  fill: none !important;
  stroke: #b9c7cd !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .wall {
  fill: #11191e !important;
  stroke: #d8e3e7 !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .column {
  fill: #26343b !important;
  stroke: #f1f5f6 !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .slot {
  fill: transparent !important;
  stroke: #176dff !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .slot-accessible {
  fill: transparent !important;
  stroke: #2fe47c !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .slot-tandem {
  fill: transparent !important;
  stroke: #27d7ff !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .car-body {
  fill: #061125 !important;
  stroke: #176dff !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .car-detail,
.app-shell[data-view="report"] .result-plan-card .plan-svg .car-symbol {
  fill: none !important;
  stroke: #176dff !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .car-wheel {
  fill: #176dff !important;
  stroke: none !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .door,
.app-shell[data-view="report"] .result-plan-card .plan-svg .door-ped {
  fill: none !important;
  stroke: #ff805d !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .stair,
.app-shell[data-view="report"] .result-plan-card .plan-svg .elevator {
  stroke: #42eaa0 !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .elevator {
  fill: #071613 !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .elevator-detail {
  stroke: #42eaa0 !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .yard {
  fill: none !important;
  stroke: #74e8ff !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .driveway {
  fill: none !important;
  stroke: #f2e85c !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .ramp {
  fill: none !important;
  stroke: #ffb15a !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .other {
  fill: none !important;
  stroke: #8ba0aa !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .label,
.app-shell[data-view="report"] .result-plan-card .plan-svg .title,
.app-shell[data-view="report"] .result-plan-card .plan-svg .legend-text {
  fill: #cfe0e6 !important;
  stroke: #05090c !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .slot-number,
.app-shell[data-view="report"] .result-plan-card .plan-svg .dim-text,
.app-shell[data-view="report"] .result-plan-card .plan-svg .scaletext {
  fill: #f1ef16 !important;
  stroke: #05090c !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .dim-line,
.app-shell[data-view="report"] .result-plan-card .plan-svg .dim-tick,
.app-shell[data-view="report"] .result-plan-card .plan-svg .scalebar {
  stroke: #d5eb32 !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .dim-ext {
  stroke: #7f9530 !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .entity-reference-marker circle {
  fill: #05090c;
  stroke: #f1ef16;
  filter: none;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .entity-reference-marker text {
  fill: #f1ef16 !important;
  stroke: none !important;
  font-family: Consolas, monospace;
  font-size: 18px;
  font-weight: 600;
}

/* Order form controls — quiet, high-contrast product UI */
.app-shell .project-form .location-fields label,
.app-shell .project-form .project-name-field,
.app-shell .project-form .review-code,
.app-shell .project-form .upload-field {
  gap: 8px;
}

.app-shell .project-form .location-fields label > span,
.app-shell .project-form .project-name-field > span,
.app-shell .project-form .review-code legend,
.app-shell .project-form .field-label {
  color: #2e4652;
  font-size: 13px;
  font-weight: 650;
  line-height: 22px;
}

.app-shell .project-form select,
.app-shell .project-form .project-name-field input,
.app-shell .project-form .code-digit {
  height: 48px;
  border: 1px solid #bdccd3;
  border-radius: 10px;
  outline: 0;
  background: #ffffff;
  color: #243d49;
  font-family: inherit;
  font-size: 13px;
  box-shadow: 0 1px 1px rgba(25, 55, 68, 0.03);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.app-shell .project-form select,
.app-shell .project-form .project-name-field input {
  padding-inline: 14px 40px;
}

.app-shell .project-form .project-name-field input {
  padding-inline: 14px;
}

.app-shell .project-form select:hover:not(:disabled),
.app-shell .project-form .project-name-field input:hover:not(:disabled),
.app-shell .project-form .code-digit:hover:not(:disabled) {
  border-color: #8fa6b1;
}

.app-shell .project-form select:focus,
.app-shell .project-form .project-name-field input:focus,
.app-shell .project-form .code-digit:focus {
  border-color: #087ba8;
  box-shadow: 0 0 0 3px rgba(8, 123, 168, 0.12);
}

.app-shell .project-form select:focus-visible,
.app-shell .project-form .project-name-field input:focus-visible,
.app-shell .project-form .code-digit:focus-visible {
  outline: none;
}

.app-shell .project-form select:disabled,
.app-shell .project-form .project-name-field input:disabled,
.app-shell .project-form .code-digit:disabled {
  border-color: #d3dde2;
  background: #f3f6f7;
  color: #83949c;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}

.app-shell .project-form input::placeholder {
  color: #82939b;
  opacity: 1;
}

.app-shell .project-form input:-webkit-autofill,
.app-shell .project-form input:-webkit-autofill:hover,
.app-shell .project-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #243d49;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  caret-color: #243d49;
  transition: background-color 9999s ease-out;
}

.app-shell .project-form .code-inputs {
  gap: 8px;
}

.app-shell .project-form .code-digit {
  min-width: 0;
  padding: 0;
  background: #fbfcfd;
  font-size: 17px;
  font-weight: 650;
  text-align: center;
}

.app-shell .project-form .dropzone {
  min-height: 140px;
  padding: 26px 20px;
  border: 1px dashed #afc0c8;
  border-radius: 14px;
  background: #fbfcfd;
  box-shadow: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.app-shell .project-form .dropzone:hover:not(.is-disabled),
.app-shell .project-form .dropzone:focus-visible,
.app-shell .project-form .dropzone.is-dragging {
  border-color: #087ba8;
  outline: none;
  background: #f5fafc;
}

.app-shell .project-form .dropzone.is-disabled,
.app-shell .project-form .dropzone[aria-disabled="true"] {
  border-color: #cdd8dd;
  background: #f6f8f9;
  opacity: 1;
  cursor: not-allowed;
}

.app-shell .project-form .dropzone-title {
  color: #405762;
  font-size: 14px;
  font-weight: 600;
}

.app-shell .project-form .dropzone-formats {
  color: #758790;
  font-size: 12px;
}

.app-shell .project-form .upload-options i {
  border: 1px solid #d9e2e6;
  background: #edf2f4;
}

@media (max-width: 600px) {
  .app-shell .project-form select,
  .app-shell .project-form .project-name-field input,
  .app-shell .project-form .code-digit {
    height: 46px;
  }

  .app-shell .project-form .code-inputs {
    gap: 5px;
  }

  .app-shell .project-form .dropzone {
    min-height: 132px;
    padding: 22px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell .project-form select,
  .app-shell .project-form input,
  .app-shell .project-form .dropzone {
    transition: none;
  }
}

@media (max-width: 900px) {
  .report-item-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .report-group-head,
  .report-item-list {
    padding-inline: 12px;
  }

  .report-item-card {
    padding: 13px;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 9px;
  }

  .report-item-number {
    width: 26px;
    height: 26px;
  }

  .report-item-title-row,
  .report-entity-reference {
    align-items: stretch;
  }

  .report-item-title-row {
    flex-direction: column;
    gap: 6px;
  }

  .report-legal-reference {
    width: fit-content;
  }

  .report-measurements {
    grid-template-columns: 1fr;
  }

  .report-entity-reference {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .report-entity-reference button {
    grid-column: 1 / -1;
  }
}

/* Precisely centered completed-step checkmarks */
.app-shell[data-view="analyzing"] .order-stepper .is-complete b::before,
.app-shell[data-view="survey"] .order-stepper .is-complete b::before,
.app-shell[data-view="complete"] .order-stepper .is-complete b::before,
.report-order-stepper .is-complete b::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(1px);
}

/* Compact two-plan report presentation */
.app-shell[data-view="report"] .results-panel {
  min-height: 620px;
}

.app-shell[data-view="report"] .report-order-stepper {
  margin-block: 24px 26px;
}

.app-shell[data-view="report"] .result-preview-layout {
  margin-top: 18px;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.72fr);
  gap: 22px;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg {
  min-height: 310px;
  max-height: 370px;
  padding: 0;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg svg {
  max-height: 360px;
}

.app-shell[data-view="report"] .result-findings {
  margin-top: 6px;
  gap: 8px;
}

.app-shell[data-view="report"] .result-finding {
  padding-block: 9px;
}

.app-shell[data-view="report"] .report-next-button {
  min-height: 38px;
}

.app-shell[data-view="report"] .mock-plan-lines,
.app-shell[data-view="report"] .mock-plan-axes {
  vector-effect: non-scaling-stroke;
}

/* Transactions page */
.transactions-panel {
  width: 100%;
  min-height: 324px;
  padding: 22px 20px 18px;
  border: 1px solid #dce5e9;
  border-radius: 12px;
  background: #fff;
}

.transactions-panel h2 {
  margin: 0 0 28px;
  color: #304654;
  font-size: 18px;
  font-weight: 800;
  line-height: 28px;
}

.transactions-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.transactions-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0 3px;
  table-layout: fixed;
  color: #314955;
  font-size: 13px;
  text-align: center;
}

.transactions-table th {
  height: 48px;
  padding: 10px 14px;
  border: 0;
  background: #0876a8;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.transactions-table th:first-child {
  border-radius: 0 7px 7px 0;
}

.transactions-table th:last-child {
  border-radius: 7px 0 0 7px;
}

.transactions-table td {
  height: 48px;
  padding: 8px 14px;
  border: 0;
  background: #eef7fb;
  vertical-align: middle;
}

.transactions-table td:first-child {
  border-radius: 0 6px 6px 0;
}

.transactions-table td:last-child {
  border-radius: 6px 0 0 6px;
}

.transactions-table time {
  white-space: nowrap;
}

.transaction-amount {
  width: min(100%, 170px);
  min-height: 27px;
  margin-inline: auto;
  padding: 4px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #d8f8eb;
  color: #28564b;
  font-variant-numeric: tabular-nums;
}

.app-shell[data-section="transactions"] .dashboard-content {
  min-height: calc(100vh - 72px);
}

@media (max-width: 700px) {
  .transactions-panel {
    min-height: 0;
    padding: 16px 14px;
  }

  .transactions-panel h2 {
    margin-bottom: 18px;
    font-size: 16px;
  }
}

/* Support screens and order completion */
.app-shell[data-section="tickets"] .support-panel {
  min-height: 0;
  padding: 16px;
  border-radius: 12px;
}

.support-list-view .support-page-heading {
  min-height: 52px;
  margin-bottom: 14px;
  align-items: flex-start;
}

.support-list-view .support-page-heading h2 {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.support-list-view .support-page-heading p {
  margin-top: 18px;
  font-size: 11px;
  font-weight: 500;
}

.support-primary-button {
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: #0879aa;
  color: #fff;
  box-shadow: 0 4px 7px rgba(1, 99, 150, 0.22);
  font-size: 11px;
  font-weight: 600;
}

.support-list-view > .ticket-filters {
  width: 84px;
  margin-bottom: 18px;
  padding: 2px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.support-list-view > .ticket-filters button {
  min-width: 38px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  font-size: 8px;
}

.support-list-view > .ticket-filters button.is-active {
  background: #0879aa;
  color: #fff;
}

.support-list-view .ticket-list {
  max-height: none;
  overflow: visible;
}

.support-ticket-table-wrap {
  overflow-x: auto;
}

.support-ticket-table {
  min-width: 680px;
}

.support-ticket-table th,
.support-ticket-table td {
  height: 40px;
}

.support-ticket-table td button {
  justify-content: center;
}

.ticket-compose-card,
.app-shell[data-section="tickets"] .ticket-detail-card {
  position: static;
  min-height: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.ticket-compose-card header {
  min-height: 32px;
  margin-bottom: 8px;
  display: block;
}

.ticket-compose-card header > div,
.support-detail-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.ticket-compose-card h3,
.support-detail-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
}

.support-back-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #edf1f3;
  color: var(--muted);
}

.support-back-button svg {
  width: 12px;
  height: 12px;
}

.ticket-compose-intro {
  margin: 6px 0 18px;
  text-align: center;
}

.ticket-compose-intro h4 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.ticket-compose-intro p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.ticket-compose-card .ticket-compose-grid {
  gap: 16px;
}

.ticket-compose-card > label,
.ticket-compose-grid label {
  gap: 7px;
  font-size: 9px;
}

.ticket-compose-card input,
.ticket-compose-card select,
.ticket-compose-card textarea {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 10px;
}

.ticket-message-field {
  margin-top: 12px;
}

.ticket-message-field textarea {
  min-height: 100px;
  resize: none;
}

.ticket-compose-actions {
  margin-top: 18px;
  direction: ltr;
  justify-content: flex-start;
  gap: 10px;
}

.ticket-compose-actions .support-primary-button,
.ticket-attachment-button {
  min-width: 110px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.ticket-compose-actions .support-primary-button {
  padding: 8px 18px !important;
  background: #0879aa !important;
  color: #fff !important;
}

.ticket-attachment-button {
  border: 1px solid #0879aa;
  background: #fff;
  color: #0879aa;
}

.support-detail-title {
  margin-bottom: 28px;
}

.support-detail-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  direction: ltr;
}

.ticket-meta-card,
.ticket-conversation-card {
  direction: rtl;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.ticket-meta-card {
  min-height: 430px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.ticket-meta-card dl {
  margin: 0;
  display: grid;
  gap: 11px;
}

.ticket-meta-card dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket-meta-card dt {
  color: var(--muted);
  font-size: 9px;
}

.ticket-meta-card dd {
  margin: 0;
  color: var(--text);
  font-size: 9px;
  font-weight: 500;
  text-align: left;
}

.ticket-agent-card {
  margin-top: auto;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #d5e8f1;
  border-radius: 7px;
  background: #f3fafd;
}

.ticket-agent-card > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #0879aa;
  border-radius: 50%;
  color: #0879aa;
}

.ticket-agent-card strong,
.ticket-agent-card small {
  display: block;
}

.ticket-agent-card strong {
  color: #0879aa;
  font-size: 10px;
}

.ticket-agent-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.ticket-conversation-card {
  min-height: 430px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.ticket-conversation-card > header {
  min-height: 46px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #0879aa;
  border-radius: 7px;
  background: #dcecf4;
  color: #0879aa;
}

.ticket-conversation-card > header strong {
  font-size: 10px;
}

.ticket-conversation-card .ticket-thread {
  flex: 1;
  padding: 18px 12px;
  align-content: start;
}

.ticket-conversation-card .ticket-reply {
  width: min(62%, 310px);
  padding: 14px;
  border: 1px solid #dbe2e6;
  border-radius: 7px;
  background: #f5f6f7;
}

.ticket-conversation-card .ticket-reply.is-agent {
  margin-right: auto;
  margin-left: 0;
  border: 0;
  background: #d7e9f2;
  color: #0879aa;
}

.ticket-conversation-card .ticket-reply p {
  font-size: 9px;
  line-height: 2;
}

.ticket-conversation-card .chat-composer {
  min-height: 44px;
  padding: 5px 8px;
  display: flex;
  direction: rtl;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  box-shadow: 0 2px 6px rgba(33, 53, 64, 0.08);
}

.ticket-conversation-card .chat-composer input {
  order: 1;
}

.ticket-conversation-card .ticket-composer-attachment,
.ticket-conversation-card .chat-send-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 0;
  border-radius: 50%;
}

.ticket-conversation-card .ticket-composer-attachment {
  order: 2;
  background: transparent;
  color: var(--muted);
}

.ticket-conversation-card .chat-send-button {
  order: 3;
  background: #0879aa;
  color: #fff;
}

.app-shell[data-view="complete"] .project-panel {
  min-height: 518px;
}

.app-shell[data-view="complete"] .panel-heading > div:first-child p,
.app-shell[data-view="complete"] .order-demo-button {
  display: none;
}

.app-shell[data-view="complete"] .order-stepper {
  margin-block: 28px 34px;
}

.app-shell[data-view="complete"] .order-stepper::before {
  border-color: #86bdd5;
}

.app-shell[data-view="complete"] .order-stepper .is-complete {
  color: var(--primary-dark);
}

.app-shell[data-view="complete"] .order-stepper .is-complete b {
  position: relative;
  background: #0879aa;
  color: transparent;
  font-size: 0;
}

.app-shell[data-view="complete"] .order-stepper .is-complete b::before {
  content: "✓";
  color: #fff;
  font-size: 26px;
  font-weight: 500;
}

.completion-workspace {
  min-height: 315px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.completion-illustration {
  position: relative;
  width: 260px;
  min-height: 190px;
  padding-top: 58px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.completion-row,
.completion-card {
  display: grid;
  grid-template-columns: 30px 78px 50px;
  align-items: center;
  gap: 10px;
}

.completion-row span,
.completion-card span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #b9ccd5;
  color: #fff;
  font-size: 14px;
}

.completion-row i,
.completion-card i {
  height: 5px;
  border-radius: 999px;
  background: #c9d1d5;
}

.completion-card.is-featured {
  position: absolute;
  top: 8px;
  left: 34px;
  width: 142px;
  padding: 13px;
  grid-template-columns: 30px 72px;
  gap: 8px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 25px rgba(41, 71, 85, 0.12);
  transform: rotate(-5deg);
}

.completion-card.is-featured span {
  background: #5ce4c4;
}

.completion-card.is-featured i:last-child {
  grid-column: 2;
  width: 48px;
}

.completion-workspace h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.completion-home-button {
  min-width: 120px;
  height: 40px;
  margin-top: 28px;
  border: 0;
  border-radius: 999px;
  background: #0879aa;
  color: #fff;
  box-shadow: 0 4px 7px rgba(1, 99, 150, 0.24);
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 760px) {
  .support-detail-layout {
    grid-template-columns: 1fr;
  }

  .ticket-meta-card {
    min-height: 0;
  }

  .ticket-conversation-card .ticket-reply {
    width: 86%;
  }

  .ticket-compose-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding: 0 14px;
  }

  .new-project-button {
    padding: 0 12px;
  }

  .topbar h1 {
    font-size: 14px;
  }

  .project-panel {
    margin-inline: -4px;
    border-radius: 20px;
  }

  .code-inputs {
    grid-template-columns: repeat(7, minmax(32px, 1fr));
  }

  .sidebar {
    width: min(300px, 86vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Dashboard — Figma dark layout */
:root {
  --page: #f5f6f8;
  --sidebar: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f7fa;
  --field: #f0f1f4;
  --text: #16161d;
  --muted: #70707f;
  --subtle: #9494a2;
  --border: rgba(15, 15, 23, 0.1);
  --line: #e8e8ed;
  --primary: #3b82f6;
  --primary-soft: rgba(59, 130, 246, 0.13);
  --success: #10b981;
  --warning: #f59e0b;
  --info: #0ea5e9;
  --sidebar-width: 256px;
}

html.dark {
  color-scheme: dark;
  --page: #09090f;
  --sidebar: #16161e;
  --surface: #16161e;
  --surface-soft: #1b1b24;
  --field: #1d1d27;
  --text: #f4f4f6;
  --muted: #a0a0ad;
  --subtle: #747481;
  --border: rgba(255, 255, 255, 0.09);
  --line: #282831;
  --primary-soft: rgba(59, 130, 246, 0.18);
}

[hidden],
.sr-only {
  display: none !important;
}

body {
  min-height: 100vh;
  background: var(--page);
  font-size: 12px;
}

.app-shell {
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
}

.topbar {
  height: 60px;
  padding-inline: 26px;
}

.topbar h1 {
  font-size: 14px;
  font-weight: 600;
}

.topbar-actions {
  gap: 10px;
}

.icon-button {
  width: 32px;
  height: 32px;
  background: transparent;
}

.primary-button {
  height: 34px;
  padding-inline: 14px;
  border-radius: 12px;
  font-size: 11px;
}

.dashboard-content {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding: 26px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  direction: rtl;
}

.stat-card {
  position: relative;
  min-height: 126px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  text-align: right;
}

.stat-icon {
  position: absolute;
  top: 19px;
  right: 19px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.stat-icon svg {
  font-size: 18px;
}

.stat-total .stat-icon {
  background: rgba(59, 130, 246, 0.14);
  color: #3b82f6;
}

.stat-complete .stat-icon {
  background: rgba(16, 185, 129, 0.13);
  color: #10b981;
}

.stat-payment .stat-icon {
  background: rgba(245, 158, 11, 0.13);
  color: #f59e0b;
}

.stat-analyzing .stat-icon {
  background: rgba(6, 182, 212, 0.13);
  color: #06b6d4;
}

.stat-card strong {
  margin-top: 30px;
  color: var(--text);
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

.stat-card > span:last-child {
  color: var(--muted);
  font-size: 11px;
  line-height: 20px;
}

.project-panel {
  margin-top: 18px;
  padding: 20px;
  border-radius: 20px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 20px;
}

.project-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 224px;
  gap: 26px;
  direction: rtl;
}

.form-fields {
  gap: 12px;
}

.location-fields {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.location-fields label {
  gap: 5px;
  font-size: 10px;
}

select,
.location-fields input {
  height: 40px;
  padding-right: 12px;
  border-radius: 11px;
  font-size: 11px;
}

select {
  padding-left: 36px;
  background-position: left 10px center;
}

.review-code legend,
.field-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 18px;
  text-align: right;
}

.code-inputs {
  grid-template-columns: repeat(7, minmax(38px, 1fr));
  gap: 6px;
}

.code-inputs input {
  height: 40px;
  border-radius: 11px;
  font-size: 16px;
}

.upload-field {
  text-align: right;
}

.dropzone {
  min-height: 142px;
  padding: 20px;
  border-width: 1px;
  border-radius: 20px;
  border-color: var(--border);
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.06);
}

.dropzone.is-disabled {
  opacity: 0.62;
}

.dropzone-title {
  font-size: 12px;
  line-height: 20px;
}

.dropzone-formats,
.selected-file {
  margin-top: 3px;
  font-size: 10px;
}

.selected-file {
  width: auto;
  max-width: 100%;
  margin-top: 9px;
  padding: 7px 12px;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview {
  display: none !important;
}

.upload-options {
  margin-top: 11px;
  gap: 6px;
}

.upload-options i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 12px;
}

.analysis-summary {
  gap: 12px;
}

.cost-card {
  min-height: 86px;
  padding: 12px;
  border-radius: 11px;
}

.cost-card span,
.cost-card small {
  font-size: 9px;
}

.cost-card strong {
  margin-top: 3px;
  font-size: 17px;
  line-height: 26px;
}

.analysis-steps {
  gap: 7px;
  font-size: 9px;
}

.analysis-steps li {
  min-height: 19px;
  gap: 8px;
  white-space: nowrap;
}

.analysis-steps span {
  flex-basis: 17px;
  width: 17px;
  height: 17px;
  font-size: 9px;
}

.submit-analysis {
  height: 40px;
  border-radius: 11px;
  font-size: 10px;
}

.submit-analysis:disabled {
  opacity: 0.74;
}

.analysis-workspace {
  min-height: 260px;
  margin-top: 16px;
  padding: 36px;
  grid-template-columns: 82px 1fr;
  gap: 24px;
  border-radius: 18px;
}

.analysis-loader {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--primary-soft);
  color: var(--primary);
  animation: dashboard-pulse 900ms ease-in-out infinite alternate;
}

.analysis-loader svg {
  font-size: 32px;
}

.analysis-workspace h3 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.analysis-workspace p {
  margin: 0;
  color: var(--muted);
  line-height: 2;
}

@keyframes dashboard-pulse {
  to { opacity: 0.55; transform: scale(0.94); }
}

.sidebar {
  border-left-color: var(--line);
}

.sidebar-brand {
  height: 60px;
  padding-inline: 13px;
}

.theme-toggle {
  width: 30px;
  height: 30px;
}

.product-brand {
  gap: 9px;
}

.product-brand strong {
  font-size: 11px;
}

.product-brand small {
  font-size: 9px;
}

.product-brand i {
  width: 30px;
  height: 30px;
  border-radius: 12px;
}

.sidebar-nav {
  padding: 11px 10px 8px;
}

.nav-label {
  padding: 0 10px 5px;
  font-size: 9px;
}

.sidebar-nav a {
  height: 34px;
  padding-inline: 10px;
  gap: 9px;
  border-radius: 11px;
  font-size: 11px;
}

.sidebar-nav a svg {
  font-size: 14px;
}

.recent-projects {
  padding: 10px;
  gap: 1px;
}

.recent-projects a {
  height: 31px;
  padding-inline: 10px;
  gap: 9px;
  font-size: 10px;
}

.status {
  width: 5px;
  height: 5px;
  flex-basis: 5px;
}

.info-dot {
  background: #3b82f6;
}

.session-project {
  margin: 8px 8px 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field);
}

.session-project strong,
.session-project span {
  display: block;
}

.session-project span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 18px;
}

.results-panel {
  margin-top: 18px;
  border-radius: 20px;
}

.toast {
  font-size: 11px;
}

@media (min-width: 1440px) {
  .dashboard-content {
    padding: 32px;
  }

  .stat-card {
    min-height: 142px;
  }

  .project-form {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 34px;
  }
}

@media (max-width: 1050px) {
  :root {
    --sidebar-width: 228px;
  }

  .dashboard-content {
    padding: 20px;
  }

  .project-form {
    gap: 18px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .topbar {
    padding-inline: 18px;
  }

  .mobile-menu {
    display: grid;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    transform: translateX(100%);
    transition: transform 220ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 15;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.56);
  }

  .sidebar-backdrop.is-visible {
    display: block;
  }
}

@media (max-width: 720px) {
  .dashboard-content {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-panel {
    padding: 16px;
  }

  .project-form {
    grid-template-columns: 1fr;
  }

  .analysis-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .submit-analysis {
    grid-column: 1 / -1;
  }

  .analysis-workspace {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .analysis-loader {
    margin-inline: auto;
  }
}

@media (max-width: 480px) {
  .topbar-actions .profile-button,
  .topbar h1 {
    display: none;
  }

  .location-fields {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 108px;
  }

  .code-inputs {
    gap: 4px;
  }

  .code-inputs input {
    min-width: 0;
    height: 38px;
  }

  .analysis-summary {
    display: flex;
  }

  .dropzone {
    padding-inline: 12px;
  }
}

/* Passwordless OTP authentication */
.auth-gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  min-width: 0;
  min-height: 100svh;
  padding: clamp(16px, 4vw, 40px);
  display: grid;
  place-items: center;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 18%, rgba(59, 130, 246, 0.08), transparent 28%),
    var(--page);
}

.auth-content {
  width: min(420px, 100%);
}

.auth-brand {
  position: fixed;
  top: 24px;
  right: clamp(20px, 4vw, 48px);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
}

.auth-brand i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--primary);
  color: #fff;
  font-style: normal;
}

.auth-brand span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.auth-brand strong {
  font-size: 12px;
  font-weight: 600;
}

.auth-brand small {
  color: var(--muted);
  font-size: 9px;
  direction: ltr;
}

.auth-step {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.auth-status-icon {
  width: 48px;
  height: 48px;
  margin-inline: auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
}

.auth-status-icon.is-success {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.auth-status-icon svg {
  font-size: 23px;
}

.auth-step h1 {
  margin: 18px 0 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 28px;
}

.auth-step > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 22px;
}

.auth-step > p strong {
  color: var(--text);
  direction: ltr;
  unicode-bidi: isolate;
}

.auth-panel {
  width: 100%;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.18);
}

.auth-field {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  color: var(--muted);
  text-align: right;
  font-size: 10px;
}

.auth-field input {
  width: 100%;
  height: 48px;
  padding-inline: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: 0;
  background: var(--field);
  color: var(--text);
  direction: ltr;
  text-align: left;
  font-size: 14px;
}

.auth-field input:focus,
.otp-digit:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 13px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  transition: transform 160ms ease, opacity 160ms ease;
}

.auth-submit:not(:disabled):hover {
  transform: translateY(-1px);
}

.auth-submit:disabled {
  background: var(--field);
  color: var(--muted);
  cursor: not-allowed;
}

.auth-mode-note {
  margin-top: 14px;
  color: var(--subtle);
  font-size: 9px;
  line-height: 19px;
}

.debug-otp {
  margin: 14px auto 0;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.09);
  color: var(--warning);
}

.debug-otp span {
  font-size: 9px;
}

.debug-otp strong {
  direction: ltr;
  font-size: 14px;
  letter-spacing: 3px;
}

.otp-inputs {
  margin-top: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.otp-digit {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: 0;
  background: var(--field);
  color: var(--text);
  text-align: center;
  font-size: 18px;
}

.auth-error {
  margin-top: 10px !important;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444 !important;
}

.auth-otp-footer {
  min-height: 28px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
}

.auth-link {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
}

.auth-link:hover {
  color: var(--primary);
}

.auth-timer {
  color: var(--muted);
  font-size: 9px;
  direction: ltr;
}

.topbar-actions {
  position: relative;
}

.profile-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  left: 0;
  width: 190px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  direction: rtl;
  text-align: right;
}

.profile-menu > span,
.profile-menu > strong {
  display: block;
}

.profile-menu > span {
  color: var(--muted);
  font-size: 9px;
}

.profile-menu > strong {
  margin-top: 3px;
  direction: ltr;
  font-size: 11px;
}

.profile-menu button {
  width: 100%;
  height: 34px;
  margin-top: 10px;
  padding-inline: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-size: 10px;
}

@media (max-width: 480px) {
  .auth-gate {
    padding: 12px;
    align-items: center;
  }

  .auth-content {
    width: min(390px, 100%);
  }

  .auth-brand {
    top: 18px;
    right: 18px;
  }

  .auth-panel {
    padding: 14px;
    border-radius: 18px;
  }

  .otp-inputs {
    gap: 6px;
  }

  .otp-digit {
    height: 46px;
  }

  .code-inputs {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 350px) {
  .auth-gate {
    padding-inline: 8px;
  }

  .auth-panel {
    padding-inline: 10px;
  }

  .otp-inputs {
    gap: 4px;
  }

  .otp-digit {
    height: 42px;
    font-size: 16px;
  }
}

/* Polling-based floor-plan analysis status */
.analysis-workspace {
  min-height: 560px;
  margin-top: 0;
  padding: 42px 20px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  direction: rtl;
  text-align: center;
}

.analysis-workspace::after {
  display: none;
}

.analysis-brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 38px color-mix(in srgb, var(--primary) 28%, transparent);
  animation: analysis-mark-pulse 1.2s ease-in-out infinite alternate;
}

.analysis-brand-mark svg {
  width: 27px;
  height: 27px;
}

.analysis-status-card {
  width: min(100%, 560px);
  padding: 30px 34px 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(3, 2, 19, 0.12);
}

.dark .analysis-status-card {
  background: #17171f;
  border-color: #2c2d38;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.3);
}

.analysis-status-card > .eyebrow {
  color: var(--primary);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.analysis-status-card h3 {
  margin: 6px 0 2px;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.8;
}

.analysis-status-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 2;
}

.analysis-progress-meta {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.analysis-progress-meta strong {
  color: var(--primary);
  direction: ltr;
  font-size: 10px;
  font-weight: 500;
}

.analysis-progress-track {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--field) 86%, transparent);
  overflow: hidden;
  direction: rtl;
}

.analysis-progress-track span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7ef7, #72a8ff, #2f7ef7);
  background-size: 180% 100%;
  transition: width 380ms ease;
  animation: analysis-progress-glow 1.4s linear infinite;
}

.analysis-runtime-list {
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
  text-align: right;
}

.analysis-runtime-list li {
  min-height: 48px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: color-mix(in srgb, var(--muted) 56%, transparent);
  font-size: 10px;
  transition: 180ms ease;
}

.analysis-stage-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--field) 88%, transparent);
  color: color-mix(in srgb, var(--muted) 48%, transparent);
}

.analysis-stage-icon svg {
  width: 13px;
  height: 13px;
}

.analysis-runtime-list li.is-done {
  color: var(--muted);
}

.analysis-runtime-list li.is-done .analysis-stage-icon {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.analysis-runtime-list li.is-active {
  border-color: color-mix(in srgb, var(--primary) 14%, transparent);
  background: var(--primary-soft);
  color: var(--text);
  font-weight: 600;
}

.analysis-runtime-list li.is-active .analysis-stage-icon {
  background: color-mix(in srgb, var(--primary) 13%, transparent);
  color: var(--primary);
  animation: analysis-stage-pulse 850ms ease-in-out infinite alternate;
}

.analysis-job-ref {
  margin: 0;
  color: var(--subtle);
  font-size: 9px;
}

.analysis-job-ref b {
  color: var(--muted);
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 400;
}

@keyframes analysis-mark-pulse {
  to { transform: translateY(-3px); box-shadow: 0 18px 44px color-mix(in srgb, var(--primary) 38%, transparent); }
}

@keyframes analysis-progress-glow {
  to { background-position: -180% 0; }
}

@keyframes analysis-stage-pulse {
  to { opacity: 0.55; transform: scale(0.92); }
}

@media (max-width: 700px) {
  .analysis-workspace {
    min-height: 520px;
    padding: 28px 0 18px;
    gap: 18px;
  }

  .analysis-status-card {
    padding: 24px 18px 18px;
    border-radius: 18px;
  }
}

@media (max-width: 420px) {
  .analysis-workspace {
    min-height: 500px;
  }

  .analysis-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .analysis-status-card {
    padding-inline: 13px;
  }

  .analysis-runtime-list li {
    padding-inline: 9px;
  }
}

/* Figma panel refresh — AI Draw / Panel */
.app-shell {
  --page: #f7fafa;
  --sidebar: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f3fafd;
  --field: #ffffff;
  --text: #364954;
  --muted: #717182;
  --subtle: #9ca3af;
  --border: #eceef2;
  --line: #e0e7eb;
  --primary: #016396;
  --primary-dark: #005e94;
  --primary-soft: #f3fafd;
  --success: #10b981;
  --warning: #997404;
  --danger: #c35e66;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  color-scheme: light;
}

.app-shell .main-content {
  min-width: 0;
  padding-top: 72px;
  background: var(--page);
}

.app-shell .topbar {
  position: fixed;
  z-index: 40;
  inset: 0 0 auto;
  width: 100%;
  height: 72px;
  padding: 16px 32px;
  display: flex;
  direction: ltr;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: #fff;
  box-shadow: none;
}

.app-shell .topbar-title {
  direction: rtl;
  flex: 1;
  justify-content: flex-start;
}

.app-shell .topbar h1 {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 30px;
}

.app-shell .topbar-actions {
  position: relative;
  display: flex;
  direction: ltr;
}

.app-shell .new-project-button {
  display: none;
}

.app-shell .profile-button {
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #cfdae0;
  border-radius: 999px;
  background: #f2f6f8;
  color: #506975;
  box-shadow: none;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.app-shell .profile-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.app-shell .profile-button:hover,
.app-shell .profile-button[aria-expanded="true"] {
  border-color: #9eb2bc;
  background: #eaf1f4;
  color: #284957;
}

.app-shell .profile-button:focus-visible {
  outline: 2px solid rgba(8, 123, 168, 0.28);
  outline-offset: 2px;
}

/* Collapsible desktop navigation rail */
.app-shell.app-shell .sidebar {
  overflow: hidden;
  transition: width 220ms ease, padding 220ms ease, transform 220ms ease;
}

.app-shell .sidebar-collapse {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #d5e0e5;
  border-radius: 8px;
  background: #f5f8f9;
  color: #506975;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 220ms ease;
}

.app-shell .sidebar-collapse:hover,
.app-shell .sidebar-collapse:focus-visible {
  border-color: #8eb4c4;
  outline: none;
  background: #eaf3f6;
  color: #087ba8;
}

.app-shell .sidebar-collapse svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.app-shell.app-shell .sidebar-nav {
  margin-top: 56px;
}

@media (min-width: 901px) {
  .app-shell.app-shell {
    transition: grid-template-columns 220ms ease, gap 220ms ease;
  }

  .app-shell.app-shell.is-sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 20px;
  }

  .app-shell.app-shell.is-sidebar-collapsed .sidebar {
    width: 76px;
    padding: 40px 8px;
  }

  .app-shell.app-shell.is-sidebar-collapsed .sidebar-collapse {
    left: 22px;
    transform: rotate(180deg);
  }

  .app-shell.app-shell.is-sidebar-collapsed .sidebar-nav {
    gap: 18px;
  }

  .app-shell.app-shell.is-sidebar-collapsed .sidebar-nav a {
    min-height: 44px;
    padding: 6px;
    justify-content: center;
    gap: 0;
    border-radius: 10px;
    font-size: 0;
  }

  .app-shell.app-shell.is-sidebar-collapsed .sidebar-nav img,
  .app-shell.app-shell.is-sidebar-collapsed .sidebar-order-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .app-shell.app-shell.is-sidebar-collapsed .sidebar-order-icon svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 900px) {
  .app-shell.app-shell .sidebar-collapse {
    display: none;
  }

  .app-shell.app-shell .sidebar-nav {
    margin-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell.app-shell,
  .app-shell.app-shell .sidebar,
  .app-shell .sidebar-collapse {
    transition: none;
  }
}

.app-shell .profile-menu {
  direction: rtl;
  top: 48px;
  right: auto;
  left: 0;
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

.app-shell .mobile-menu {
  display: none;
}

.app-shell .dashboard-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 32px 0 32px 32px;
}

.dashboard-home {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-intro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  direction: rtl;
}

.dashboard-order-card,
.subscription-card {
  min-height: 80px;
  border-radius: 8px;
}

.dashboard-order-card {
  position: relative;
  height: 80px;
  padding: 12px;
  border: 1px solid rgba(1, 74, 114, 0.35);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.dashboard-order-card::before,
.dashboard-order-card::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(1, 74, 114, 0.35);
  border-right: 0;
  border-radius: 12px;
  pointer-events: none;
}

.dashboard-order-card::before {
  inset: 6px 0 6px 6px;
}

.dashboard-order-card::after {
  inset: 0 0 0 0;
}

.dashboard-order-card > span {
  position: relative;
  z-index: 1;
  height: 56px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: 8px;
  background: var(--primary-dark);
  box-shadow: 0 0 10px rgba(1, 74, 114, 0.5);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.dashboard-order-card > svg {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 9px;
  width: 58px;
  height: 58px;
  opacity: 0.18;
  transform: rotate(-13deg);
}

.subscription-card {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
  background: #fff;
}

.subscription-card strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.subscription-card > span {
  color: #014a72;
  font-size: 16px;
  font-weight: 500;
}

.subscription-card small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.dashboard-home .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  direction: rtl;
}

.dashboard-home .stat-card {
  min-height: 104px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 10px 5px rgba(19, 158, 202, 0.05);
  text-align: right;
}

.dashboard-home .stat-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 24px;
}

.dashboard-home .stat-card > strong {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
}

.dashboard-home .stat-payment > strong {
  color: #997404;
}

.dashboard-home .stat-complete > strong {
  color: #10b981;
}

.dashboard-home .stat-credit {
  flex-direction: row;
  align-items: center;
  direction: ltr;
}

.dashboard-home .stat-credit > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  direction: rtl;
}

.dashboard-home .stat-credit p {
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-home .stat-credit p strong {
  color: var(--text);
  font-size: 28px;
  font-weight: 600;
}

.dashboard-home .stat-credit p small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.credit-progress {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
}

.credit-progress img {
  position: absolute;
  inset: 0;
  width: 72px;
  height: 72px;
}

.credit-progress b {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.recent-orders-card {
  padding: 16px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 10px 5px rgba(19, 158, 202, 0.05);
}

.recent-orders-card h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.orders-table-wrap {
  overflow-x: auto;
}

.orders-table {
  width: 100%;
  min-width: 810px;
  border-collapse: separate;
  border-spacing: 0 4px;
  table-layout: fixed;
  text-align: center;
}

.orders-table th,
.orders-table td {
  height: 44px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 24px;
}

.orders-table th {
  background: #05689a;
  color: #fff;
  font-size: 14px;
}

.orders-table th:first-child {
  border-radius: 0 8px 8px 0;
}

.orders-table th:last-child {
  border-radius: 8px 0 0 8px;
}

.orders-table td {
  background: #f3fafd;
  color: var(--text);
}

.orders-table td:first-child {
  border-radius: 0 8px 8px 0;
}

.orders-table td:last-child {
  border-radius: 8px 0 0 8px;
}

.orders-table td button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.orders-table td button img,
.orders-table td button svg {
  width: 16px;
  height: 16px;
}

.order-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.orders-table td .delete-analysis-button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #c83232;
}

.orders-table td .delete-analysis-button:hover,
.orders-table td .delete-analysis-button:focus-visible {
  background: rgba(200, 50, 50, 0.1);
  outline: none;
}

.order-status {
  min-width: 94px;
  height: 28px;
  padding: 2px 12px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.order-status.is-progress {
  background: #ccdfea;
  color: #005e94;
}

.order-status.is-complete {
  background: #defaee;
  color: #255c44;
}

.order-status.is-rejected {
  background: #fde3e6;
  color: #c35e66;
}

.app-shell .project-panel {
  width: 100%;
  min-height: 676px;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.app-shell .panel-heading {
  min-height: 28px;
  justify-content: flex-start;
}

.app-shell .panel-heading h2 {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
}

.order-stepper {
  position: relative;
  width: min(718px, 100%);
  margin: 40px auto;
  padding: 0;
  display: flex;
  direction: rtl;
  align-items: flex-start;
  justify-content: space-between;
  list-style: none;
}

.order-stepper::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 32px;
  right: 11%;
  left: 11%;
  border-top: 1px solid #e0e7eb;
}

.order-stepper li {
  position: relative;
  z-index: 1;
  width: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #afb6bb;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-align: center;
}

.order-stepper b {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ebeff1;
  font-size: 18px;
  font-weight: 600;
  line-height: 30px;
}

.order-stepper .is-active {
  color: var(--primary-dark);
  font-weight: 600;
}

.order-stepper .is-active b {
  background: #f3fafd;
}

.order-stepper .is-complete {
  color: #1d7250;
}

.order-stepper .is-complete b {
  background: #defaee;
  color: #1d7250;
}

.app-shell .project-form {
  margin-top: 0;
  display: block;
}

.app-shell .form-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-shell .location-fields,
.project-identity-fields {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.app-shell .location-fields label,
.project-name-field,
.rule-version-field {
  gap: 8px;
}

.app-shell .location-fields label > span,
.project-name-field > span,
.rule-version-field > span,
.app-shell .review-code legend,
.app-shell .field-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 24px;
}

.app-shell select,
.project-name-field input,
.project-name-field select,
.app-shell .code-digit {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  box-shadow: none;
}

.project-name-field {
  display: flex;
  flex-direction: column;
}

.project-name-field input,
.project-name-field select {
  width: 100%;
  padding: 8px;
  font-family: inherit;
  text-align: right;
}

.app-shell .review-code {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-shell .code-inputs {
  gap: 8px;
}

.app-shell .code-digit {
  min-width: 0;
}

.app-shell .upload-field {
  gap: 6px;
}

.app-shell .dropzone {
  min-height: 128px;
  padding: 24px;
  border: 1.5px dashed var(--border);
  border-radius: 24px;
  background: #fff;
  box-shadow: none;
}

.app-shell .dropzone:hover {
  border-color: var(--primary);
  background: #fafdff;
}

.app-shell .dropzone-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.app-shell .dropzone-formats {
  color: var(--muted);
  font-size: 12px;
}

.app-shell .upload-options {
  margin-top: 8px;
  gap: 8px;
}

.app-shell .upload-options i {
  width: 32px;
  height: 32px;
  padding: 8px;
  border-radius: 999px;
  background: #eceef2;
}

.app-shell .upload-options img {
  width: 16px;
  height: 16px;
}

.app-shell .analysis-summary {
  width: 100%;
  margin-top: 20px;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.app-shell .analysis-summary > :not(.submit-analysis) {
  display: none;
}

.app-shell .submit-analysis {
  width: 100%;
  height: 40px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 5px rgba(1, 99, 150, 0.28);
}

.app-shell .submit-analysis:disabled {
  background: #b7c5cc;
  box-shadow: none;
}

.app-shell .analysis-workspace {
  margin-top: 40px;
  border-color: var(--border);
  border-radius: 16px;
  background: #fff;
}

.app-shell .sidebar {
  position: sticky;
  z-index: 20;
  top: 104px;
  width: 260px;
  height: calc(100vh - 136px);
  min-height: 600px;
  margin-top: 104px;
  padding: 40px 0 40px 32px;
  border: 0;
  border-radius: 16px 0 0 16px;
  background: #fff;
  box-shadow: none;
  color: var(--text);
}

.app-shell .sidebar-brand {
  min-height: auto;
  padding: 0;
  border: 0;
}

.app-shell .theme-toggle {
  display: none;
}

.app-shell .product-brand {
  width: 100%;
  padding: 8px 24px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
}

.app-shell .product-brand img {
  width: 32px;
  height: 32px;
}

.app-shell .sidebar-nav {
  margin-top: 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.app-shell .sidebar-nav a {
  width: 100%;
  min-height: 40px;
  padding: 4px 24px;
  display: flex;
  flex-direction: row;
  direction: rtl;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border-radius: 8px 0 0 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
}

.app-shell .sidebar-nav a:hover {
  background: #f3fafd;
}

.app-shell .sidebar-nav a.active {
  background: var(--primary-dark);
  color: #fff;
}

.app-shell .sidebar-nav a.active img {
  filter: brightness(0) invert(1);
}

.app-shell .sidebar-nav img,
.app-shell .sidebar-order-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  object-fit: contain;
}

.app-shell .sidebar-order-icon {
  display: grid;
  place-items: center;
}

.app-shell .sidebar-order-icon svg {
  width: 24px;
  height: 24px;
}

.app-shell .results-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.app-shell .result-preview-layout {
  gap: 32px;
}

.app-shell .analyzed-plan-card,
.app-shell .result-findings-card,
.app-shell .result-side-card {
  border-color: var(--border);
  background: #fff;
  box-shadow: none;
}

.app-shell[data-section="dashboard"] .project-panel,
.app-shell[data-section="dashboard"] .results-panel {
  display: none !important;
}

.app-shell[data-section="order"] .dashboard-home {
  display: none;
}

.app-shell[data-view="report"] .dashboard-home {
  display: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 20px;
  }

  .app-shell .sidebar {
    width: 230px;
    padding-left: 20px;
  }

  .app-shell .sidebar-nav a {
    padding-inline: 16px;
    font-size: 14px;
  }

  .app-shell .dashboard-content {
    padding-left: 20px;
  }

  .dashboard-home .stats-grid {
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .app-shell .topbar {
    padding-inline: 20px;
  }

  .app-shell .mobile-menu {
    display: grid;
    order: -1;
  }

  .app-shell .sidebar {
    position: fixed;
    top: 72px;
    right: 0;
    z-index: 50;
    width: min(300px, 86vw);
    height: calc(100vh - 72px);
    min-height: 0;
    margin: 0;
    padding: 32px 0 32px 24px;
    border-radius: 16px 0 0 16px;
    transform: translateX(105%);
  }

  .app-shell .sidebar.is-open {
    transform: translateX(0);
  }

  .app-shell .dashboard-content {
    padding: 24px;
  }

  .dashboard-intro-grid,
  .dashboard-home .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-home .stat-card {
    min-height: 96px;
  }

  .order-stepper {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 18px;
  }

  .order-stepper::before {
    display: none;
  }

  .order-stepper li {
    flex: 0 0 106px;
  }
}

@media (max-width: 620px) {
  .app-shell .dashboard-content {
    padding: 16px;
  }

  .dashboard-intro-grid,
  .dashboard-home,
  .dashboard-home .stats-grid {
    gap: 16px;
  }

  .dashboard-order-card,
  .subscription-card {
    min-height: 72px;
  }

  .subscription-card {
    padding: 14px;
  }

  .subscription-card strong,
  .subscription-card > span {
    font-size: 14px;
  }

  .app-shell .project-panel,
  .app-shell .results-panel {
    padding: 16px;
  }

  .app-shell .location-fields,
  .project-identity-fields {
    grid-template-columns: 1fr;
  }

  .order-stepper {
    margin-block: 28px;
  }
}

/* Analysis result preview */
.topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
}

.topbar-result-back {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
}

.topbar-result-back svg {
  width: 13px;
  height: 13px;
}

.topbar-report-status {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
}

.topbar-report-status.failed {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.topbar-report-status.passed {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.topbar-report-status.warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.result-payment-button {
  background: var(--primary);
  color: #fff;
}

.app-shell[data-view="report"] .new-project-button,
.app-shell[data-view="report"] .stats-grid,
.app-shell[data-view="report"] .project-panel {
  display: none;
}

.app-shell[data-view="report"] .dashboard-content {
  max-width: 1180px;
  padding-top: 18px;
}

.app-shell[data-view="report"] .topbar {
  position: sticky;
  z-index: 14;
  top: 0;
  background: color-mix(in srgb, var(--page) 94%, transparent);
  backdrop-filter: blur(14px);
}

.app-shell[data-view="report"] .results-heading,
.app-shell[data-view="report"] .session-project {
  display: none;
}

.app-shell[data-view="report"] .results-panel {
  margin-top: 0;
}

.results-panel {
  scroll-margin-top: 76px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.results-heading {
  min-height: 48px;
  padding: 0 2px 12px;
}

.results-heading > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.results-heading small {
  color: var(--muted);
  font-size: 8px;
}

.results-heading h2 {
  margin: 1px 0 0;
  font-size: 13px;
}

.result-back {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.result-back svg {
  width: 14px;
  height: 14px;
}

.result-preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: start;
  gap: 16px;
  direction: rtl;
}

.result-preview-main,
.result-preview-aside {
  min-width: 0;
}

.result-preview-main {
  display: grid;
  gap: 16px;
}

.result-plan-card {
  position: static;
  padding: 0;
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
}

.result-plan-card .analyzed-plan-heading {
  min-height: 54px;
  margin: 0;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}

.result-plan-card .analyzed-plan-heading h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
}

.plan-location {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.plan-location > svg {
  width: 14px;
  height: 14px;
}

.result-plan-card .analysis-scope-badge {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.result-plan-card .plan-svg {
  min-height: 390px;
  max-height: 520px;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: #0d0d13;
}

.result-plan-card .plan-svg svg {
  max-height: 480px;
  border-radius: 8px;
}

.dark .result-plan-card .plan-svg .bg {
  fill: #0d0d13 !important;
}

.dark .result-plan-card .plan-svg .grid {
  stroke: #20212a !important;
}

.dark .result-plan-card .plan-svg .plan-frame {
  stroke: #454754 !important;
}

.dark .result-plan-card .plan-svg .slot {
  fill: #181921 !important;
  stroke: #353744 !important;
}

.dark .result-plan-card .plan-svg .driveway,
.dark .result-plan-card .plan-svg .yard {
  fill: #111219 !important;
  stroke: #30323e !important;
}

.dark .result-plan-card .plan-svg .label,
.dark .result-plan-card .plan-svg .title,
.dark .result-plan-card .plan-svg .legend-text,
.dark .result-plan-card .plan-svg .dim-text,
.dark .result-plan-card .plan-svg .scaletext {
  fill: #989aa7 !important;
  stroke: #0d0d13 !important;
}

.result-plan-card .plan-svg .preview-violation {
  fill: rgba(239, 68, 68, 0.16) !important;
  stroke: #ef4444 !important;
  stroke-width: 2.4 !important;
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.55));
}

.result-plan-card .plan-svg .preview-warning {
  fill: rgba(245, 158, 11, 0.14) !important;
  stroke: #f59e0b !important;
  stroke-width: 2.1 !important;
}

.result-plan-card .plan-svg .preview-focused {
  fill: rgba(8, 121, 170, 0.24) !important;
  stroke: #0879aa !important;
  stroke-width: 3.4 !important;
  filter: drop-shadow(0 0 7px rgba(8, 121, 170, 0.72));
}

.result-plan-card .plan-svg .entity-reference-marker {
  pointer-events: none;
}

.result-plan-card .plan-svg .entity-reference-marker circle {
  fill: #0879aa;
  stroke: #fff;
  stroke-width: 2;
  filter: drop-shadow(0 2px 3px rgba(2, 73, 104, 0.32));
}

.result-plan-card .plan-svg .entity-reference-marker text {
  fill: #fff;
  stroke: none;
  direction: ltr;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 9px;
  font-weight: 800;
}

.result-findings-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
}

.result-findings-card > header {
  min-height: 62px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.result-findings-card h3,
.result-side-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
}

.result-findings-card header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.result-findings-card header p strong {
  color: var(--text);
  font-weight: 500;
}

.result-findings {
  display: grid;
}

.result-finding {
  min-height: 72px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(70px, auto);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.result-finding-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.result-finding-icon svg {
  width: 13px;
  height: 13px;
}

.result-finding.is-critical .result-finding-icon {
  background: rgba(239, 68, 68, 0.11);
  color: #ef4444;
}

.result-finding.is-warning .result-finding-icon {
  background: rgba(245, 158, 11, 0.11);
  color: var(--warning);
}

.result-finding.is-info .result-finding-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.result-finding.is-success .result-finding-icon {
  background: rgba(16, 185, 129, 0.11);
  color: var(--success);
}

.result-finding h4 {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
}

.result-finding p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.8;
}

.result-finding > small {
  color: var(--subtle);
  direction: ltr;
  font-size: 8px;
  text-align: left;
}

.result-locked {
  min-height: 56px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--surface-soft);
  color: var(--muted);
}

.result-locked > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.result-locked svg {
  width: 14px;
  height: 14px;
}

.result-locked strong {
  font-size: 9px;
  font-weight: 500;
}

.result-preview-aside {
  display: grid;
  gap: 12px;
}

.result-side-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.project-info-card dl {
  margin: 14px 0 0;
  display: grid;
  gap: 12px;
}

.project-info-card dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.project-info-card dt {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 8px;
}

.project-info-card dt svg {
  width: 15px;
  height: 15px;
}

.project-info-card dd {
  margin: 0;
  max-width: 138px;
  color: var(--text);
  font-size: 9px;
  font-weight: 500;
  text-align: left;
  overflow-wrap: anywhere;
}

.result-summary-card .report-outcome {
  margin-top: 14px;
}

.result-summary-grid {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.result-summary-grid::before {
  display: none;
}

.result-summary-metric {
  min-height: 76px;
  padding: 12px 8px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.result-summary-metric strong {
  font-size: 19px;
  font-weight: 600;
}

.result-summary-metric span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.result-summary-metric.is-critical {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
}

.result-summary-metric.is-critical strong {
  color: #ef4444;
}

.result-summary-metric.is-warning {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.08);
}

.result-summary-metric.is-warning strong {
  color: var(--warning);
}

.result-purchase-card {
  border-color: rgba(59, 130, 246, 0.32);
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), var(--surface));
}

.result-purchase-card > p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.9;
}

.result-purchase-card > div {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.result-purchase-card > div span {
  color: var(--muted);
  font-size: 8px;
}

.result-purchase-card > div strong {
  font-size: 11px;
  font-weight: 600;
}

.result-purchase-button {
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
}

.result-purchase-button svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 1050px) {
  .result-preview-layout {
    grid-template-columns: minmax(0, 1fr) 238px;
  }

  .result-plan-card .plan-svg {
    min-height: 340px;
  }
}

@media (max-width: 820px) {
  .result-preview-layout {
    grid-template-columns: 1fr;
  }

  .result-preview-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-purchase-card {
    grid-column: 1 / -1;
  }

  .project-info-card dd {
    max-width: none;
  }
}

@media (max-width: 600px) {
  .app-shell[data-view="report"] .dashboard-content {
    padding: 14px;
  }

  .app-shell[data-view="report"] .topbar {
    padding-inline: 12px;
  }

  .app-shell[data-view="report"] .topbar-title {
    min-width: 0;
    display: flex;
  }

  .app-shell[data-view="report"] .topbar-title h1 {
    display: block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-payment-button {
    padding-inline: 10px;
    font-size: 0;
  }

  .result-payment-button svg {
    width: 16px;
    height: 16px;
    font-size: initial;
  }

  .result-preview-aside {
    grid-template-columns: 1fr;
  }

  .result-purchase-card {
    grid-column: auto;
  }

  .result-plan-card .plan-svg {
    min-height: 250px;
    padding: 8px;
  }

  .result-finding {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .result-finding > small {
    grid-column: 2;
    text-align: right;
  }
}

@media (max-width: 380px) {
  .results-heading .report-status,
  .topbar-report-status {
    display: none;
  }

  .result-plan-card .analyzed-plan-heading {
    padding-inline: 13px;
  }

  .result-findings-card > header,
  .result-finding,
  .result-side-card {
    padding-inline: 13px;
  }
}

/* Demo entry, ticket and chat flows */
.auth-demo-button {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  color: var(--primary);
  font: 600 13px/22px inherit;
  cursor: pointer;
}

.auth-demo-button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.app-shell .panel-heading > div:first-child p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 22px;
}

.order-demo-button,
.support-primary-button {
  min-height: 40px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font: 600 12px/24px inherit;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(1, 99, 150, 0.18);
}

.order-demo-button {
  margin-right: auto;
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: none;
}

.order-demo-button svg,
.support-primary-button svg {
  width: 17px;
  height: 17px;
}

.order-payment-panel {
  width: min(560px, 100%);
  margin: 42px auto 12px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.payment-success-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
}

.payment-success-mark svg { width: 24px; height: 24px; }
.order-payment-panel h3 { margin: 4px 0; color: var(--text); font-size: 18px; }
.order-payment-panel > p { margin: 0 auto 20px; color: var(--muted); font-size: 11px; line-height: 22px; }

.payment-order-summary {
  padding: 6px 16px;
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcfd;
  text-align: right;
}

.payment-order-summary > div {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.payment-order-summary > div:last-child { border-bottom: 0; }
.payment-order-summary span { color: var(--muted); font-size: 10px; }
.payment-order-summary strong { color: var(--text); font-size: 11px; }
.payment-order-summary .payment-total strong { color: var(--primary); font-size: 14px; }

.payment-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.payment-back-button {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font: 600 11px/22px inherit;
  cursor: pointer;
}

.payment-demo-note { display: block; margin-top: 12px; color: var(--subtle); font-size: 9px; }

.support-panel {
  min-height: 676px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
}

.support-page-heading {
  min-height: 64px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.support-page-heading h2,
.ticket-compose-card h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 22px;
  line-height: 32px;
}

.support-page-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 22px;
}

.support-eyebrow {
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ticket-stats {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ticket-stats article {
  position: relative;
  min-height: 88px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.ticket-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.ticket-stats strong {
  color: var(--text);
  font-size: 23px;
}

.ticket-stats i {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(1, 99, 150, 0.07);
}

.ticket-stats i.is-open { background: #10b981; }
.ticket-stats i.is-waiting { background: #f59e0b; }
.ticket-stats i.is-closed { background: #9ca3af; }

.ticket-workspace,
.chat-workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  direction: ltr;
}

.ticket-list-card,
.ticket-detail-card,
.ticket-compose-card,
.chat-conversations-card,
.chat-room {
  direction: rtl;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.ticket-tools {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.support-search {
  height: 40px;
  min-width: 180px;
  flex: 1;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafcfd;
}

.support-search svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.support-search input,
.chat-composer input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 12px/22px inherit;
}

.ticket-filters {
  display: flex;
  gap: 5px;
}

.ticket-filters button {
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 600 10px/20px inherit;
  cursor: pointer;
}

.ticket-filters button.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.ticket-list {
  max-height: 440px;
  overflow-y: auto;
}

.ticket-list-item,
.chat-conversation-item {
  width: 100%;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-align: right;
  cursor: pointer;
}

.ticket-list-item:last-child,
.chat-conversation-item:last-child { border-bottom: 0; }

.ticket-list-item:hover,
.ticket-list-item.is-active,
.chat-conversation-item:hover,
.chat-conversation-item.is-active { background: #f3fafd; }

.ticket-list-item strong,
.chat-conversation-item strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-list-item p,
.chat-conversation-item p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-list-item time,
.chat-conversation-item time {
  color: var(--subtle);
  font-size: 9px;
}

.ticket-status {
  padding: 3px 8px;
  justify-self: end;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.ticket-status.is-open { background: #defaee; color: #1d7250; }
.ticket-status.is-waiting { background: #fff4d6; color: #8a6700; }
.ticket-status.is-closed { background: #eef0f2; color: #697781; }

.ticket-detail-card {
  min-height: 438px;
  padding: 22px;
}

.ticket-detail-header {
  padding-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.ticket-detail-header h3 { margin: 5px 0; font-size: 16px; }
.ticket-detail-header p,
.ticket-detail-meta { margin: 0; color: var(--muted); font-size: 10px; }

.ticket-thread {
  padding-top: 18px;
  display: grid;
  gap: 14px;
}

.ticket-reply {
  max-width: 86%;
  padding: 12px 14px;
  border-radius: 12px 3px 12px 12px;
  background: #f3fafd;
}

.ticket-reply.is-agent {
  margin-right: auto;
  border-radius: 3px 12px 12px 12px;
  background: #f5f6f7;
}

.ticket-reply strong { display: block; margin-bottom: 5px; font-size: 10px; }
.ticket-reply p { margin: 0; font-size: 11px; line-height: 22px; }
.ticket-reply time { color: var(--subtle); font-size: 8px; }

.ticket-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.ticket-compose-card {
  position: absolute;
  z-index: 5;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 16px 40px rgba(33, 53, 64, 0.13);
}

.ticket-compose-card header,
.ticket-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-icon-button,
.chat-composer > button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.support-icon-button svg,
.chat-composer svg { width: 17px; height: 17px; }

.ticket-compose-card > label,
.ticket-compose-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.ticket-compose-card input,
.ticket-compose-card select,
.ticket-compose-card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font: 500 12px/22px inherit;
  resize: vertical;
}

.ticket-compose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ticket-compose-actions { margin-top: auto; justify-content: flex-end; }
.ticket-compose-actions > button:first-child { padding: 8px 16px; border: 0; background: transparent; color: var(--muted); font: 600 11px/22px inherit; cursor: pointer; }

.chat-availability {
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: #defaee;
  color: #1d7250;
  font-size: 10px;
  font-weight: 700;
}

.chat-availability i,
.chat-room-header span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.chat-workspace { grid-template-columns: minmax(0, 1fr) 290px; }
.chat-conversations-card { padding-top: 14px; }
.chat-conversations-card > .support-search { margin: 0 14px 14px; }
.chat-conversation-list { border-top: 1px solid var(--border); }
.chat-conversation-item { grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; }
.chat-conversation-avatar { grid-row: 1 / 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 800; }
.chat-conversation-item p { grid-column: 2 / 4; }

.chat-room {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.chat-room-header {
  min-height: 68px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.chat-agent-avatar { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; border-radius: 12px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 800; }
.chat-room-header > div:nth-child(2) { display: flex; flex-direction: column; }
.chat-room-header strong { font-size: 12px; }
.chat-room-header span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.chat-room-header .chat-order-reference { margin-right: auto; padding: 5px 9px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 9px; }

.chat-messages {
  min-height: 360px;
  max-height: 430px;
  padding: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  background: #fbfcfd;
}

.chat-message { max-width: min(72%, 480px); }
.chat-message.is-user { align-self: flex-start; }
.chat-message.is-agent { align-self: flex-end; }
.chat-message p { margin: 0; padding: 10px 13px; border-radius: 13px 4px 13px 13px; background: var(--primary); color: #fff; font-size: 11px; line-height: 22px; }
.chat-message.is-agent p { border-radius: 4px 13px 13px 13px; background: #fff; color: var(--text); box-shadow: 0 3px 14px rgba(35, 56, 68, 0.08); }
.chat-message time { display: block; margin-top: 4px; color: var(--subtle); font-size: 8px; }
.chat-message.is-user time { text-align: left; }

.chat-typing { min-height: 28px; padding: 4px 18px; display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 9px; background: #fbfcfd; }
.chat-typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); animation: chat-bounce 900ms infinite alternate; }
.chat-typing i:nth-child(2) { animation-delay: 150ms; }
.chat-typing i:nth-child(3) { animation-delay: 300ms; }
.chat-typing span { margin-right: 5px; }
@keyframes chat-bounce { to { transform: translateY(-3px); opacity: 0.45; } }

.chat-composer {
  min-height: 66px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.chat-composer input { height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: #fafcfd; }
.chat-composer .chat-send-button { border-color: var(--primary); background: var(--primary); color: #fff; }

@media (max-width: 900px) {
  .ticket-workspace,
  .chat-workspace { grid-template-columns: 1fr; }
  .ticket-detail-card { order: 2; }
  .ticket-list-card { order: 1; }
  .chat-conversations-card { max-height: 260px; overflow-y: auto; }
}

@media (max-width: 620px) {
  .support-panel { padding: 16px; }
  .support-page-heading { align-items: flex-start; }
  .support-page-heading p { display: none; }
  .ticket-stats { grid-template-columns: 1fr; }
  .ticket-stats article { min-height: 70px; }
  .ticket-tools { align-items: stretch; flex-direction: column; }
  .ticket-filters { justify-content: stretch; }
  .ticket-filters button { flex: 1; }
  .ticket-compose-grid { grid-template-columns: 1fr; }
  .chat-room-header .chat-order-reference { display: none; }
  .chat-message { max-width: 88%; }
  .app-shell .panel-heading { align-items: flex-start; gap: 12px; }
  .order-demo-button { padding-inline: 10px; font-size: 10px; }
}

/* Analysis progress — light horizontal layout */
.app-shell[data-view="analyzing"] .project-panel {
  min-height: 0;
}

.app-shell[data-view="analyzing"] .panel-heading {
  margin-bottom: 0;
}

.app-shell[data-view="analyzing"] .panel-heading > div:first-child p,
.app-shell[data-view="analyzing"] .order-demo-button {
  display: none;
}

.app-shell[data-view="analyzing"] .order-stepper {
  margin-block: 26px 22px;
}

.app-shell[data-view="analyzing"] .order-stepper .is-complete {
  color: var(--primary-dark);
}

.app-shell[data-view="analyzing"] .order-stepper .is-complete b {
  position: relative;
  background: #0879aa;
  color: transparent;
  font-size: 0;
}

.app-shell[data-view="analyzing"] .order-stepper .is-complete b::before {
  content: "✓";
  color: #fff;
  font-size: 26px;
  font-weight: 500;
}

.app-shell[data-view="analyzing"] .order-stepper::before {
  border-color: #88bfd7;
}

.app-shell .analysis-workspace {
  min-height: 0;
  margin-top: 0;
  padding: 0;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: right;
}

.app-shell .analysis-brand-mark,
.app-shell .analysis-job-ref,
.app-shell .analysis-status-card > .eyebrow {
  display: none;
}

.app-shell .analysis-status-card,
.dark .app-shell .analysis-status-card {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell .analysis-status-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
  text-align: right;
}

.app-shell .analysis-status-card > p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 20px;
  text-align: right;
}

.app-shell .analysis-progress-meta {
  margin-top: 20px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.app-shell .analysis-progress-meta strong {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.app-shell .analysis-progress-track {
  height: 7px;
  margin-top: 6px;
  background: #e7edf0;
}

.app-shell .analysis-progress-track span {
  background: linear-gradient(90deg, #0675a5 0%, #0675a5 70%, #54a9ca 84%, #0675a5 100%);
  background-size: 160% 100%;
}

.app-shell .analysis-runtime-list {
  position: relative;
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 50px;
  direction: rtl;
}

/* Report and survey steps */
.app-shell[data-view="report"] .dashboard-content {
  max-width: none;
  padding-top: 32px;
}

.app-shell[data-view="report"] .results-panel {
  min-height: 738px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.app-shell[data-view="report"] .results-heading {
  min-height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-shell[data-view="report"] .results-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
}

.app-shell[data-view="report"] .report-status,
.app-shell[data-view="report"] .topbar-report-status {
  display: none;
}

.report-order-stepper {
  margin-block: 28px 30px;
}

.report-order-stepper::before,
.app-shell[data-view="survey"] .order-stepper::before {
  border-color: #86bdd5;
}

.report-order-stepper .is-complete,
.app-shell[data-view="survey"] .order-stepper .is-complete {
  color: var(--primary-dark);
}

.report-order-stepper .is-complete b,
.app-shell[data-view="survey"] .order-stepper .is-complete b {
  position: relative;
  background: #0879aa;
  color: transparent;
  font-size: 0;
}

.report-order-stepper .is-complete b::before,
.app-shell[data-view="survey"] .order-stepper .is-complete b::before {
  content: "✓";
  color: #fff;
  font-size: 26px;
  font-weight: 500;
}

.report-project-strip {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.report-project-strip h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.report-project-row {
  display: flex;
  direction: rtl;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.report-project-data {
  flex: 1;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 24px;
}

.result-finding-locations {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.result-finding-locations .result-finding-location {
  margin-top: 0;
}

.report-project-data > div {
  min-width: 0;
}

.report-project-data dt {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 9px;
}

.report-project-data dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.report-project-data dd b {
  max-width: 170px;
  overflow: hidden;
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-project-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf5fa;
  color: #0879aa;
}

.report-project-icon svg {
  width: 13px;
  height: 13px;
}

.report-download-button,
.report-next-button {
  border: 0;
  background: #0879aa;
  color: #fff;
  box-shadow: 0 4px 7px rgba(1, 99, 150, 0.2);
}

.report-download-button {
  min-width: 108px;
  height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  font-size: 9px;
  white-space: nowrap;
}

.report-download-button svg {
  width: 13px;
  height: 13px;
  transform: rotate(180deg);
}

.app-shell[data-view="report"] .result-preview-layout {
  margin-top: 22px;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.75fr);
  gap: 28px;
}

.app-shell[data-view="report"] .result-preview-main {
  display: block;
}

.app-shell[data-view="report"] .result-preview-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app-shell[data-view="report"] .result-plan-card {
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.app-shell[data-view="report"] .result-plan-card .analyzed-plan-heading {
  min-height: 28px;
  padding: 0;
  border: 0;
}

.app-shell[data-view="report"] .result-plan-card .analyzed-plan-heading h3,
.app-shell[data-view="report"] .result-findings-card > header h3 {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.app-shell[data-view="report"] .plan-location {
  display: none;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg {
  min-height: 382px;
  max-height: 448px;
  padding: 4px;
  display: grid;
  place-items: center;
  border: 0;
  background: #fff;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg svg {
  width: 100%;
  height: auto;
  max-height: 430px;
  border-radius: 0;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .bg {
  fill: #fff !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .grid {
  stroke: #edf1f3 !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .plan-frame {
  stroke: #58666e !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .slot {
  fill: #f8fafb !important;
  stroke: #60727c !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .driveway,
.app-shell[data-view="report"] .result-plan-card .plan-svg .yard {
  fill: #fafcfd !important;
  stroke: #60727c !important;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg text {
  fill: #42545e !important;
  stroke: transparent !important;
}

.app-shell[data-view="report"] .result-findings-card {
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.app-shell[data-view="report"] .result-findings-card > header {
  min-height: 28px;
  padding: 0;
  border: 0;
}

.app-shell[data-view="report"] .result-findings {
  margin-top: 8px;
  gap: 10px;
}

.report-finding-group {
  border-radius: 12px;
  overflow: hidden;
}

.report-finding-group summary {
  min-height: 46px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-size: 9px;
}

.report-finding-group summary::-webkit-details-marker {
  display: none;
}

.report-finding-group summary span {
  color: var(--muted);
}

.report-finding-group summary strong {
  font-size: 10px;
  font-weight: 600;
}

.report-finding-group summary svg {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
  transition: transform 180ms ease;
}

.report-finding-group[open] summary svg {
  transform: rotate(-90deg);
}

.report-finding-group.is-critical {
  background: #fdf1f2;
}

.report-finding-group.is-critical summary strong {
  color: #c85b64;
}

.report-finding-group.is-warning {
  background: #fff8ed;
}

.report-finding-group.is-warning summary strong {
  color: #df9712;
}

.report-finding-items {
  padding: 0 10px 10px;
  display: grid;
  gap: 8px;
}

.app-shell[data-view="report"] .result-finding {
  min-height: 0;
  padding: 11px 10px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.app-shell[data-view="report"] .result-finding.is-map-focused {
  background: rgba(236, 248, 253, 0.92);
  box-shadow: inset -3px 0 #0879aa, 0 5px 16px rgba(8, 121, 170, 0.12);
}

.app-shell[data-view="report"] .result-finding-location.is-map-focused {
  border-color: #0879aa;
  background: #0879aa;
  color: #fff;
}

.app-shell[data-view="report"] .result-finding-icon {
  width: 20px;
  height: 20px;
  background: transparent;
}

.app-shell[data-view="report"] .result-finding h4 {
  color: #c85b64;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
}

.app-shell[data-view="report"] .result-finding.is-warning h4 {
  color: #b97c0c;
}

.app-shell[data-view="report"] .result-finding.is-success h4 {
  color: #13835b;
}

.app-shell[data-view="report"] .result-finding p {
  margin-top: 6px;
  color: #56656d;
  font-size: 10px;
  line-height: 1.9;
}

.app-shell[data-view="report"] .result-finding-reasons {
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.app-shell[data-view="report"] .result-finding-reasons li {
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(200, 91, 100, 0.16);
  border-radius: 8px;
  background: rgba(255, 247, 248, 0.72);
  color: #56656d;
  font-size: 10px;
  line-height: 1.9;
}

.app-shell[data-view="report"] .result-finding-reasons strong,
.app-shell[data-view="report"] .result-finding-reasons b {
  color: #b74853;
  font-weight: 700;
}

.app-shell[data-view="report"] .result-finding-reasons small {
  color: #74838b;
  font-size: 9px;
}

.report-next-button {
  width: 100%;
  min-height: 40px;
  margin-top: auto;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.app-shell[data-view="survey"] .project-panel {
  min-height: 698px;
}

.app-shell[data-view="survey"] .panel-heading > div:first-child p,
.app-shell[data-view="survey"] .order-demo-button {
  display: none;
}

.app-shell[data-view="survey"] .order-stepper {
  margin-block: 28px 34px;
}

.survey-workspace {
  display: block;
}

.survey-intro {
  min-height: 88px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 8px;
  background: #066b9d;
  color: #fff;
}

.survey-intro h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
}

.survey-intro p {
  margin: 2px 0 0;
  color: #fff;
  font-size: 12px;
  line-height: 22px;
}

.survey-form {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.survey-question {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(360px, 2fr);
  align-items: center;
  gap: 32px;
  border: 0;
}

.survey-question legend {
  grid-column: 1;
  width: 100%;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
}

.survey-scale {
  grid-column: 2;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  direction: rtl;
  align-items: center;
}

.survey-scale label {
  min-height: 54px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.survey-scale input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.survey-scale span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: #edf1f3;
  color: #455861;
  font-size: 14px;
  font-weight: 500;
  transition: 160ms ease;
}

.survey-scale label:hover span {
  border-color: #6eaecb;
  background: #f3fafd;
}

.survey-scale input:focus-visible + span {
  outline: 3px solid rgba(8, 121, 170, 0.2);
  outline-offset: 2px;
}

.survey-scale input:checked + span {
  border-color: #0879aa;
  background: #0879aa;
  color: #fff;
  box-shadow: 0 3px 8px rgba(1, 99, 150, 0.22);
}

.survey-actions {
  margin-top: 14px;
  display: flex;
  direction: ltr;
  align-items: center;
  gap: 8px;
}

.survey-submit,
.survey-back {
  min-width: 120px;
  height: 40px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.survey-submit {
  border: 0;
  background: #0879aa;
  color: #fff;
  box-shadow: 0 4px 6px rgba(1, 99, 150, 0.24);
}

.survey-back {
  border: 1px solid #0879aa;
  background: #fff;
  color: #0879aa;
}

@media (max-width: 900px) {
  .report-project-row {
    align-items: stretch;
    flex-direction: column;
  }

  .report-download-button {
    align-self: flex-start;
  }

  .app-shell[data-view="report"] .result-preview-layout {
    grid-template-columns: 1fr;
  }

  .app-shell[data-view="report"] .result-preview-aside {
    display: grid;
  }

  .survey-question {
    grid-template-columns: minmax(180px, 0.7fr) minmax(300px, 1.6fr);
    gap: 16px;
  }
}

@media (max-width: 620px) {
  .app-shell[data-view="report"] .results-panel {
    padding: 16px;
  }

  .report-project-data {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .survey-question {
    display: block;
  }

  .survey-question legend {
    margin-bottom: 4px;
  }

  .survey-scale {
    min-width: 0;
  }

  .survey-scale span {
    width: 34px;
    height: 34px;
  }

  .survey-submit,
  .survey-back {
    flex: 1;
    min-width: 0;
  }
}

@media print {
  .app-shell {
    display: block;
  }

  .app-shell .topbar,
  .app-shell .sidebar,
  .report-download-button,
  .report-next-button {
    display: none !important;
  }

  .app-shell .main-content {
    padding: 0;
  }

  .app-shell .dashboard-content {
    padding: 0;
  }

  .app-shell[data-view="report"] .results-panel {
    border: 0;
  }
}

.app-shell .analysis-runtime-list li {
  position: relative;
  min-height: 42px;
  padding: 7px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: #edf1f3;
  color: #b2bbc0;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.app-shell .analysis-runtime-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -40px;
  width: 30px;
  height: 2px;
  border-radius: 99px;
  background: #8bc2d8;
  transform: translateY(-50%);
}

.app-shell .analysis-runtime-list .analysis-stage-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 0;
  background: transparent;
  color: inherit;
}

.app-shell .analysis-runtime-list li.is-done {
  background: #e1f7f0;
  color: #12b88a;
}

.app-shell .analysis-runtime-list li.is-done .analysis-stage-icon {
  background: transparent;
  color: #12b88a;
}

.app-shell .analysis-runtime-list li.is-active {
  border: 0;
  background: #e5f1f6;
  color: #0675a5;
  font-weight: 600;
}

.app-shell .analysis-runtime-list li.is-active .analysis-stage-icon {
  background: transparent;
  color: #18a6d5;
}

@media (max-width: 700px) {
  .app-shell .analysis-runtime-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .app-shell .analysis-runtime-list li:not(:last-child)::after {
    display: none;
  }

  .app-shell[data-view="analyzing"] .order-stepper {
    margin-block: 22px 18px;
  }
}

/* Final support and completion cascade */
.app-shell[data-section="tickets"] .support-panel {
  min-height: 0;
  padding: 16px;
  border-radius: 12px;
}

.app-shell[data-section="tickets"] .ticket-compose-card,
.app-shell[data-section="tickets"] .ticket-detail-card {
  position: static;
  inset: auto;
  min-height: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.app-shell[data-section="tickets"] .ticket-compose-card header {
  min-height: 32px;
  margin: 0 0 8px;
  padding: 0;
  display: block;
}

.app-shell[data-section="tickets"] .ticket-compose-actions {
  margin-top: 18px;
  direction: ltr;
  justify-content: flex-start;
}

.app-shell[data-section="tickets"] .ticket-compose-actions .support-primary-button {
  padding: 8px 18px;
  border: 0;
  background: #0879aa;
  color: #fff;
}

.app-shell[data-section="tickets"] .ticket-message-field textarea {
  min-height: 100px;
}

/* Animated technology stepper */
.order-stepper {
  --step-progress: 0;
  --step-accent: #0785b7;
  --step-glow: rgba(12, 154, 199, 0.3);
  position: relative;
  isolation: isolate;
  width: min(640px, 100%);
  margin: 32px auto 38px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  overflow: visible;
}

.order-stepper::before,
.order-stepper::after {
  content: "";
  position: absolute;
  top: 20px;
  right: calc(100% / 6);
  left: calc(100% / 6);
  height: 2px;
  border: 0;
  border-radius: 999px;
}

.order-stepper::before {
  z-index: -2;
  display: block;
  background: #dfe7eb;
}

.order-stepper::after {
  z-index: -1;
  background: linear-gradient(90deg, #19b8cf, var(--step-accent));
  box-shadow: 0 0 10px var(--step-glow);
  transform: scaleX(var(--step-progress));
  transform-origin: right center;
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.order-stepper li {
  width: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: #8999a3;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  transition: color 250ms ease, transform 250ms ease;
}

.order-stepper b {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe5e9;
  border-radius: 50%;
  background: #f4f7f8;
  color: #91a0a9;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 5px #fff;
  transition: color 250ms ease, background 250ms ease, border-color 250ms ease,
    box-shadow 250ms ease, transform 250ms ease;
}

.order-stepper .is-active {
  color: var(--primary-dark);
  font-weight: 700;
  transform: translateY(-1px);
}

.order-stepper .is-active b {
  border-color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(135deg, #036c9d 0%, #08a6c5 55%, #25c3d4 100%);
  background-size: 180% 180%;
  color: #fff;
  box-shadow: 0 0 0 5px #fff, 0 0 0 7px rgba(12, 154, 199, 0.14),
    0 8px 20px rgba(2, 117, 160, 0.22);
  animation: order-step-gradient 3.2s ease-in-out infinite,
    order-step-breathe 2.4s ease-in-out infinite;
}

.order-stepper .is-complete {
  color: #167b82;
}

.order-stepper .is-complete b,
.app-shell[data-view="analyzing"] .order-stepper .is-complete b,
.app-shell[data-view="survey"] .order-stepper .is-complete b,
.app-shell[data-view="complete"] .order-stepper .is-complete b,
.report-order-stepper .is-complete b {
  position: relative;
  border-color: #0785b7;
  border-radius: 50%;
  background: #0785b7;
  color: transparent;
  font-size: 0;
  box-shadow: 0 0 0 5px #fff, 0 5px 14px rgba(2, 117, 160, 0.16);
  animation: order-step-complete 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.order-stepper .is-complete b::before,
.app-shell[data-view="analyzing"] .order-stepper .is-complete b::before,
.app-shell[data-view="survey"] .order-stepper .is-complete b::before,
.app-shell[data-view="complete"] .order-stepper .is-complete b::before,
.report-order-stepper .is-complete b::before {
  content: "✓";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  transform: none;
  animation: order-step-check 300ms 100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.app-shell[data-view="analyzing"] .order-stepper::before,
.app-shell[data-view="survey"] .order-stepper::before,
.app-shell[data-view="complete"] .order-stepper::before,
.report-order-stepper::before {
  border: 0;
  background: #dfe7eb;
}

@keyframes order-step-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes order-step-breathe {
  0%, 100% {
    box-shadow: 0 0 0 5px #fff, 0 0 0 7px rgba(12, 154, 199, 0.12),
      0 8px 20px rgba(2, 117, 160, 0.2);
  }
  50% {
    box-shadow: 0 0 0 5px #fff, 0 0 0 10px rgba(12, 154, 199, 0.05),
      0 10px 24px rgba(2, 117, 160, 0.28);
  }
}

@keyframes order-step-complete {
  from { transform: scale(0.82); }
  to { transform: scale(1); }
}

@keyframes order-step-check {
  from { opacity: 0; transform: scale(0.45) rotate(-18deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.dark .order-stepper::before,
.dark .app-shell[data-view="analyzing"] .order-stepper::before,
.dark .app-shell[data-view="survey"] .order-stepper::before,
.dark .app-shell[data-view="complete"] .order-stepper::before,
.dark .report-order-stepper::before {
  background: #33424b;
}

.dark .order-stepper b {
  border-color: #43535d;
  background: #2a3841;
  color: #a9b7bf;
  box-shadow: 0 0 0 5px var(--surface);
}

.dark .order-stepper .is-active b {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #0875a7 0%, #09a6c4 55%, #25c3d4 100%);
  color: #fff;
  box-shadow: 0 0 0 5px var(--surface), 0 0 0 7px rgba(28, 183, 211, 0.16),
    0 8px 22px rgba(0, 0, 0, 0.24);
}

.dark .order-stepper .is-complete b {
  border-color: #1198ba;
  background: #0785b7;
  box-shadow: 0 0 0 5px var(--surface), 0 5px 14px rgba(0, 0, 0, 0.22);
}

@media (max-width: 900px) {
  .order-stepper {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: initial;
    gap: 0;
    overflow: visible;
  }

  .order-stepper::before,
  .order-stepper::after {
    display: block;
  }

  .order-stepper li {
    width: auto;
    flex: initial;
  }
}

@media (max-width: 620px) {
  .order-stepper {
    margin-block: 24px 30px;
  }

  .order-stepper li {
    gap: 7px;
    font-size: 11px;
    line-height: 18px;
  }

  .order-stepper b {
    width: 36px;
    height: 36px;
  }

  .order-stepper::before,
  .order-stepper::after {
    top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .order-stepper::after,
  .order-stepper li,
  .order-stepper b,
  .order-stepper .is-active b,
  .order-stepper .is-complete b,
  .order-stepper .is-complete b::before {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Compact order stepper — final override */
.order-stepper {
  --step-progress: 0;
  --step-progress-mobile: 33.333%;
  --step-strip: transparent;
  --step-track: #dbe6eb;
  --step-accent: #0785b7;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: min(552px, 100%);
  min-height: 60px;
  margin-block: 0 24px;
  margin-inline: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  list-style: none;
}

.app-shell[data-view="analyzing"] .order-stepper,
.app-shell[data-view="report"] .report-order-stepper,
.app-shell[data-view="survey"] .order-stepper,
.app-shell[data-view="complete"] .order-stepper {
  margin-block: 0 24px;
  margin-inline: 0 auto;
}

.order-stepper::before,
.order-stepper::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 16.667%;
  left: 16.667%;
  height: 3px;
  display: block;
  border: 0;
  border-radius: 999px;
}

.order-stepper::before {
  z-index: -2;
  background: var(--step-track);
}

.order-stepper::after {
  z-index: -1;
  background: linear-gradient(90deg, #19b8cf, var(--step-accent));
  box-shadow: none;
  transform: scaleX(var(--step-progress));
  transform-origin: right center;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.order-stepper li {
  position: relative;
  z-index: 1;
  width: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #788b95;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
  transform: none;
  transition: color 220ms ease;
}

.order-stepper b {
  position: relative;
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #d2dee3;
  border-radius: 50%;
  background: #edf2f4;
  color: #81929b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  transition: color 220ms ease, background 220ms ease, border-color 220ms ease,
    box-shadow 220ms ease, transform 220ms ease;
}

.order-stepper .is-active {
  color: #075f88;
  font-weight: 700;
  transform: none;
}

.order-stepper .is-active b {
  border: 0;
  background: linear-gradient(135deg, #05709e 0%, #08a0be 58%, #2bc2cf 100%);
  background-size: 100% 100%;
  color: #fff;
  box-shadow: 0 5px 12px rgba(3, 112, 151, 0.16);
  animation: order-step-activate 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.order-stepper .is-complete {
  color: #167b82;
}

.order-stepper .is-complete b,
.app-shell[data-view="analyzing"] .order-stepper .is-complete b,
.app-shell[data-view="survey"] .order-stepper .is-complete b,
.app-shell[data-view="complete"] .order-stepper .is-complete b,
.report-order-stepper .is-complete b {
  position: relative;
  border: 0;
  border-radius: 50%;
  background: var(--step-accent);
  color: transparent;
  font-size: 0;
  box-shadow: 0 4px 10px rgba(2, 117, 160, 0.12);
  animation: order-step-complete 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.order-stepper .is-complete b::before,
.app-shell[data-view="analyzing"] .order-stepper .is-complete b::before,
.app-shell[data-view="survey"] .order-stepper .is-complete b::before,
.app-shell[data-view="complete"] .order-stepper .is-complete b::before,
.report-order-stepper .is-complete b::before {
  content: "✓";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  transform: none;
  animation: order-step-check 260ms 70ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes order-step-activate {
  from { opacity: 0.78; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.dark .order-stepper {
  --step-strip: transparent;
  --step-track: #3a4952;
  border: 0;
  background: transparent;
}

.dark .order-stepper b {
  border-color: #465760;
  background: #2b3941;
  color: #a9b7bf;
  box-shadow: none;
}

.dark .order-stepper .is-active {
  color: #8ed8e5;
}

.dark .order-stepper .is-active b {
  border: 0;
  background: linear-gradient(135deg, #0875a7 0%, #09a6c4 58%, #25c3d4 100%);
  color: #fff;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2);
}

.dark .order-stepper .is-complete b {
  border: 0;
  background: #0785b7;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

@media (max-width: 620px) {
  .order-stepper,
  .app-shell[data-view="analyzing"] .order-stepper,
  .app-shell[data-view="report"] .report-order-stepper,
  .app-shell[data-view="survey"] .order-stepper,
  .app-shell[data-view="complete"] .order-stepper {
    width: 100%;
    min-height: 44px;
    margin-block: 0 24px;
    margin-inline: 0;
    padding: 0;
    display: block;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .order-stepper li {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .order-stepper::before {
    content: attr(data-mobile-label);
    position: static;
    z-index: auto;
    width: auto;
    height: auto;
    display: block;
    background: transparent;
    color: #284653;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-align: right;
  }

  .order-stepper::after {
    content: "";
    position: static;
    z-index: auto;
    width: 100%;
    height: 4px;
    margin-top: 10px;
    display: block;
    background: linear-gradient(
      to left,
      var(--step-accent) 0 var(--step-progress-mobile),
      var(--step-track) var(--step-progress-mobile) 100%
    );
    box-shadow: none;
    transform: none;
    transition: background 300ms ease;
  }

  .dark .order-stepper::before {
    background: transparent;
    color: #d5e6ec;
  }
}

@media (prefers-reduced-motion: reduce) {
  .order-stepper::after,
  .order-stepper li,
  .order-stepper b,
  .order-stepper .is-active b,
  .order-stepper .is-complete b,
  .order-stepper .is-complete b::before {
    animation: none !important;
    transition: none !important;
  }
}

/* Full-width segmented step indicator — adapted for wide RTL forms */
.order-stepper,
.app-shell[data-view="analyzing"] .order-stepper,
.app-shell[data-view="report"] .report-order-stepper,
.app-shell[data-view="survey"] .order-stepper,
.app-shell[data-view="complete"] .order-stepper {
  width: 100%;
  min-height: 58px;
  margin-block: 0 28px;
  margin-inline: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 6px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.order-stepper::before,
.order-stepper::after {
  display: none;
}

.order-stepper li {
  position: relative;
  width: auto;
  min-width: 0;
  min-height: 58px;
  padding: 15px 4px 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: #71838d;
  font-size: 13px;
  font-weight: 500;
  line-height: 22px;
  text-align: right;
  transform: none;
  transition: color 180ms ease;
}

.order-stepper li::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  border-radius: 999px;
  background: #dce6ea;
  transform-origin: right center;
  transition: background 320ms ease, transform 320ms ease;
}

.order-stepper li b {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border: 1px solid #c8d5db;
  border-radius: 50%;
  background: #f5f8f9;
  color: #687b85;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.order-stepper li.is-active {
  color: #075f88;
  font-weight: 700;
}

.order-stepper li.is-active::before {
  background: linear-gradient(90deg, #16b4c9 0%, #0785b7 100%);
  animation: order-segment-enter 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.order-stepper li.is-active b {
  border: 0;
  background: #0785b7;
  color: #fff;
  box-shadow: none;
  animation: none;
}

.order-stepper li.is-complete {
  color: #176f78;
}

.order-stepper li.is-complete::before {
  background: #0879aa;
}

.order-stepper li.is-complete b,
.app-shell[data-view="analyzing"] .order-stepper li.is-complete b,
.app-shell[data-view="survey"] .order-stepper li.is-complete b,
.app-shell[data-view="complete"] .order-stepper li.is-complete b,
.report-order-stepper li.is-complete b {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  border: 0;
  background: #0879aa;
  box-shadow: none;
  animation: none;
}

.order-stepper li.is-complete b::before,
.app-shell[data-view="analyzing"] .order-stepper li.is-complete b::before,
.app-shell[data-view="survey"] .order-stepper li.is-complete b::before,
.app-shell[data-view="complete"] .order-stepper li.is-complete b::before,
.report-order-stepper li.is-complete b::before {
  font-size: 14px;
  animation: order-step-check 220ms 40ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes order-segment-enter {
  from { opacity: 0.55; transform: scaleX(0.82); }
  to { opacity: 1; transform: scaleX(1); }
}

.dark .order-stepper {
  border: 0;
  background: transparent;
}

.dark .order-stepper li {
  color: #9aabb3;
}

.dark .order-stepper li::before {
  background: #3a4952;
}

.dark .order-stepper li b {
  border-color: #4a5c66;
  background: #27363e;
  color: #b4c1c7;
  box-shadow: none;
}

.dark .order-stepper li.is-active {
  color: #9ce2ec;
}

.dark .order-stepper li.is-active::before {
  background: linear-gradient(90deg, #20bfd0 0%, #1198ba 100%);
}

.dark .order-stepper li.is-active b,
.dark .order-stepper li.is-complete b {
  border: 0;
  background: #1198ba;
  color: #fff;
  box-shadow: none;
}

.dark .order-stepper li.is-complete::before {
  background: #1198ba;
}

@media (max-width: 620px) {
  .order-stepper,
  .app-shell[data-view="analyzing"] .order-stepper,
  .app-shell[data-view="report"] .report-order-stepper,
  .app-shell[data-view="survey"] .order-stepper,
  .app-shell[data-view="complete"] .order-stepper {
    min-height: 44px;
    margin-block: 0 24px;
    display: block;
  }

  .order-stepper li {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .order-stepper li::before {
    display: none;
  }

  .order-stepper::before {
    content: attr(data-mobile-label);
    position: static;
    width: auto;
    height: auto;
    display: block;
    background: transparent;
    color: #284653;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-align: right;
  }

  .order-stepper::after {
    content: "";
    position: static;
    width: 100%;
    height: 5px;
    margin-top: 10px;
    display: block;
    border-radius: 999px;
    background: linear-gradient(
      to left,
      var(--step-accent) 0 var(--step-progress-mobile),
      var(--step-track) var(--step-progress-mobile) 100%
    );
    box-shadow: none;
    transform: none;
    transition: background 240ms ease;
  }

  .dark .order-stepper::before {
    color: #d5e6ec;
  }
}

@media (prefers-reduced-motion: reduce) {
  .order-stepper li,
  .order-stepper li::before,
  .order-stepper li b,
  .order-stepper li.is-active::before,
  .order-stepper li.is-complete b::before,
  .order-stepper::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Final report viewer cascade — intentionally last */
.app-shell[data-view="report"] .results-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell[data-view="report"] .report-project-strip {
  padding-bottom: 22px;
}

.app-shell[data-view="report"] .report-project-strip h3 {
  margin-bottom: 16px;
  font-size: 18px;
  line-height: 28px;
}

.app-shell[data-view="report"] .report-project-data {
  gap: 32px;
}

.app-shell[data-view="report"] .report-project-data dt {
  margin-bottom: 8px;
  font-size: 11px;
  line-height: 18px;
}

.app-shell[data-view="report"] .report-project-data dd {
  gap: 10px;
}

.app-shell[data-view="report"] .report-project-data dd b {
  max-width: 240px;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
}

.app-shell[data-view="report"] .report-project-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.app-shell[data-view="report"] .report-project-icon svg {
  width: 17px;
  height: 17px;
}

.app-shell[data-view="report"] .report-download-button {
  min-width: 126px;
  height: 40px;
  padding-inline: 18px;
  gap: 9px;
  font-size: 11px;
}

.app-shell[data-view="report"] .report-download-button svg {
  width: 15px;
  height: 15px;
}

.app-shell[data-view="report"] .result-preview-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
}

.app-shell[data-view="report"] .result-preview-main,
.app-shell[data-view="report"] .result-preview-aside,
.app-shell[data-view="report"] .result-plan-card {
  min-height: 0;
}

.app-shell[data-view="report"] .result-plan-card {
  display: flex;
  flex-direction: column;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg {
  width: 100%;
  height: clamp(520px, 64vh, 760px);
  min-height: 520px;
  max-height: none;
  padding: 0;
  display: block;
  border: 1px solid #dce7ec;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg svg {
  width: 100%;
  height: 100%;
  max-height: none;
  display: block;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg svg.is-panning {
  cursor: grabbing;
}

.app-shell[data-view="report"] .result-preview-aside {
  height: calc(clamp(520px, 64vh, 760px) + 82px);
  max-height: calc(clamp(520px, 64vh, 760px) + 82px);
}

.app-shell[data-view="report"] .result-findings-card {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.app-shell[data-view="report"] .result-findings {
  flex: 1 1 0;
  min-height: 0;
  margin-top: 10px;
  padding-inline-end: 8px;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: #9fc5d5 #edf4f7;
  scrollbar-width: thin;
}

.app-shell[data-view="report"] .result-findings::-webkit-scrollbar {
  width: 8px;
}

.app-shell[data-view="report"] .result-findings::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #edf4f7;
}

.app-shell[data-view="report"] .result-findings::-webkit-scrollbar-thumb {
  border: 2px solid #edf4f7;
  border-radius: 999px;
  background: #75aec5;
}

.app-shell[data-view="report"] .report-finding-group summary {
  min-height: 52px;
  padding: 11px 14px;
  font-size: 12px;
}

.app-shell[data-view="report"] .report-finding-group summary strong {
  font-size: 12px;
}

.app-shell[data-view="report"] .result-finding {
  padding: 14px 12px;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
}

.app-shell[data-view="report"] .result-finding h4 {
  font-size: 13px;
  line-height: 1.75;
}

.app-shell[data-view="report"] .result-finding p {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.9;
}

.app-shell[data-view="report"] .report-measurements {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 960px) {
  .app-shell[data-view="report"] .result-preview-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell[data-view="report"] .result-plan-card .plan-svg {
    height: clamp(440px, 60svh, 660px);
    min-height: 440px;
  }

  .app-shell[data-view="report"] .result-preview-aside {
    height: auto;
    max-height: none;
  }

  .app-shell[data-view="report"] .result-findings {
    flex: 0 1 auto;
    max-height: 620px;
  }
}

@media (max-width: 600px) {
  .app-shell[data-view="report"] .result-plan-card .plan-svg {
    height: clamp(380px, 58svh, 520px);
    min-height: 380px;
  }

  .app-shell[data-view="report"] .report-measurements {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Frameless analysis surface and clearer violation heading */
.app-shell[data-view="analyzing"] .project-panel {
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dark .app-shell[data-view="analyzing"] .project-panel {
  background: transparent;
}

.app-shell[data-view="report"] .report-finding-group.is-critical summary span {
  color: #dc2626;
  font-size: 14px;
  font-weight: 700;
}

.app-shell[data-view="report"] .report-finding-group.is-critical summary strong {
  color: #dc2626;
  font-size: 13px;
  font-weight: 700;
}

.dark .app-shell[data-view="report"] .report-finding-group.is-critical summary span,
.dark .app-shell[data-view="report"] .report-finding-group.is-critical summary strong {
  color: #ff6b74;
}

/* The report is the terminal step; keep the CAD drafting canvas light. */
.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg {
  border-color: #dce7ec;
  background: #fff;
}

.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg .bg {
  fill: #fff !important;
}

.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg .grid {
  stroke: #edf1f3 !important;
}

.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg:focus-within {
  border-color: #45b8e4;
  box-shadow: 0 0 0 2px rgba(69, 184, 228, 0.14);
}

.app-shell[data-view="report"] .plan-viewer-toolbar {
  border-color: #dce7ec;
  background: #fff;
  color: #60727c;
}

.app-shell[data-view="report"] .cad-viewer-badge {
  border-color: #b9dbe8;
  background: #edf8fc;
  color: #0879aa;
}

.app-shell[data-view="report"] .plan-viewer-toolbar button {
  border-color: #d3e2e8;
  background: #fff;
  color: #0879aa;
}

.app-shell[data-view="report"] .plan-viewer-toolbar button:hover,
.app-shell[data-view="report"] .plan-viewer-toolbar button:focus-visible {
  border-color: #63bddc;
  background: #f0f9fc;
}

/* Compact analysis loader — distinct from the workflow stepper. */
.app-shell[data-view="analyzing"] .analysis-status-card {
  display: block;
}

.app-shell[data-view="analyzing"] .analysis-status-card > h3 {
  width: 100%;
}

.app-shell[data-view="analyzing"] .analysis-loader {
  --analysis-progress: 0%;
  --analysis-progress-angle: 0deg;
  --analysis-progress-cap-opacity: 0;
  --analysis-ring-radius: 63px;
  position: relative;
  width: 136px;
  height: 136px;
  margin: 32px auto 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #08a8c5 var(--analysis-progress), #e2edf1 0);
  box-shadow: 0 18px 48px rgba(5, 123, 164, 0.17);
  transition: background 380ms ease;
}

.app-shell[data-view="analyzing"] .analysis-loader::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #08a8c5;
  box-shadow: 0 0 0 2px rgba(8, 168, 197, 0.08);
  opacity: var(--analysis-progress-cap-opacity);
  transform: translate(-50%, -50%) rotate(var(--analysis-progress-angle))
    translateY(calc(-1 * var(--analysis-ring-radius)));
  transition: transform 180ms linear, opacity 180ms ease;
}

.app-shell[data-view="analyzing"] .analysis-loader::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #e3edf1;
  border-radius: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 4px #f7fafb;
}

.app-shell[data-view="analyzing"] .analysis-loader-orbit {
  position: absolute;
  z-index: 2;
  inset: -5px;
  border: 1px solid transparent;
  border-top-color: rgba(8, 168, 197, 0.72);
  border-right-color: rgba(8, 168, 197, 0.18);
  border-radius: 50%;
  animation: analysis-loader-orbit 1.7s linear infinite;
}

.app-shell[data-view="analyzing"] .analysis-loader-orbit::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #08a8c5;
  box-shadow: 0 0 0 4px rgba(8, 168, 197, 0.11);
}

.app-shell[data-view="analyzing"] .analysis-loader-core {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 3px;
}

.app-shell[data-view="analyzing"] .analysis-loader-core strong {
  color: #075f84;
  direction: ltr;
  font-size: 24px;
  font-weight: 750;
  line-height: 1;
}

.app-shell[data-view="analyzing"] .analysis-loader-core small {
  color: #7c929d;
  font-size: 10px;
  font-weight: 500;
}

.app-shell[data-view="analyzing"] .analysis-phase-list {
  width: min(760px, 100%);
  margin: 34px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}

.app-shell[data-view="analyzing"] .analysis-phase-list li {
  position: relative;
  min-height: 52px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #dce7eb;
  border-radius: 14px;
  background: #f7fafb;
  color: #82939c;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
  white-space: nowrap;
  transition: color 240ms ease, border-color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

.app-shell[data-view="analyzing"] .analysis-phase-state {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd9df;
  border-radius: 50%;
  background: #fff;
  color: #879aa3;
  font-size: 11px;
  font-weight: 750;
}

.app-shell[data-view="analyzing"] .analysis-phase-list li.is-active {
  border-color: rgba(8, 168, 197, 0.36);
  background: #eefafd;
  color: #086f94;
  box-shadow: 0 10px 26px rgba(8, 138, 178, 0.09);
}

.app-shell[data-view="analyzing"] .analysis-phase-list li.is-active .analysis-phase-state {
  border-color: transparent;
  background: linear-gradient(145deg, #0ab4c8, #087eae);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(8, 168, 197, 0.1);
}

.app-shell[data-view="analyzing"] .analysis-phase-list li.is-done {
  border-color: #c9eadf;
  background: #f0faf7;
  color: #137a61;
}

.app-shell[data-view="analyzing"] .analysis-phase-list li.is-done .analysis-phase-state {
  border-color: #21ad86;
  background: #21ad86;
  color: #fff;
}

@keyframes analysis-loader-orbit {
  to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
  .app-shell[data-view="analyzing"] .analysis-loader {
    --analysis-ring-radius: 51px;
    width: 112px;
    height: 112px;
    margin-top: 26px;
  }

  .app-shell[data-view="analyzing"] .analysis-loader-core strong {
    font-size: 20px;
  }

  .app-shell[data-view="analyzing"] .analysis-phase-list {
    width: min(360px, 100%);
    margin-top: 26px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .app-shell[data-view="analyzing"] .analysis-phase-list li {
    min-height: 46px;
    justify-content: flex-start;
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell[data-view="analyzing"] .analysis-loader-orbit {
    animation: none;
  }

  .app-shell[data-view="analyzing"] .analysis-loader {
    transition: none;
  }

  .app-shell[data-view="analyzing"] .analysis-loader::after {
    transition: none;
  }

  .app-shell[data-view="analyzing"] .analysis-phase-list li {
    transition: none;
  }
}

/* The supplied top-view vehicle asset stays crisp while zooming the CAD canvas. */
.app-shell.app-shell[data-view="report"] .result-plan-card .plan-svg .car-topview-image {
  image-rendering: auto;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .car-parking-motion {
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform, opacity;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .car-violation-glass-surface,
.app-shell[data-view="report"] .result-plan-card .plan-svg .car-violation-glass,
.app-shell[data-view="report"] .result-plan-card .plan-svg .car-violation-outline {
  opacity: 0;
  pointer-events: none;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .car-parking-motion.car-has-violation.is-parked .car-symbol {
  filter: drop-shadow(0 2px 4px rgba(122, 17, 43, 0.28));
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .car-parking-motion.car-has-violation.is-parked .car-violation-glass-surface {
  opacity: 0.24;
  filter: blur(1.25px) saturate(0.78) brightness(1.04);
  animation: car-violation-glass-reveal 520ms cubic-bezier(.2,.78,.24,1) both;
}

.app-shell[data-view="report"] .result-plan-card .plan-svg .car-parking-motion.car-has-violation.is-parked .car-violation-glass,
.app-shell[data-view="report"] .result-plan-card .plan-svg .car-parking-motion.car-has-violation.is-parked .car-violation-outline {
  opacity: 1;
  fill: rgba(178, 24, 55, 0.32) !important;
  stroke: rgba(255, 112, 137, 0.68) !important;
  stroke-width: 1.1 !important;
  filter: blur(0.55px) drop-shadow(0 0 6px rgba(178, 24, 55, 0.5));
  animation: car-violation-glass-reveal 520ms cubic-bezier(.2,.78,.24,1) both;
}

@keyframes car-violation-glass-reveal {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell[data-view="report"] .result-plan-card .plan-svg .car-parking-motion {
    will-change: auto;
  }

  .app-shell[data-view="report"] .result-plan-card .plan-svg .car-parking-motion.car-has-violation.is-parked .car-violation-glass-surface {
    opacity: 0.24;
    animation: none;
  }

  .app-shell[data-view="report"] .result-plan-card .plan-svg .car-parking-motion.car-has-violation.is-parked .car-violation-glass,
  .app-shell[data-view="report"] .result-plan-card .plan-svg .car-parking-motion.car-has-violation.is-parked .car-violation-outline {
    animation: none;
  }
}
