:root {
  --bg: #f6fbfb;
  --panel: #ffffff;
  --panel-soft: #f4fbfb;
  --ink: #303235;
  --muted: #6f7376;
  --line: #d9ecef;
  --cyan: #24c1d8;
  --teal: #45bf87;
  --green: #10966f;
  --green-dark: #087456;
  --orange: #c46b00;
  --red: #bd2c25;
  --red-soft: #fff0ed;
  --shadow: 0 8px 24px rgba(19, 82, 92, 0.07);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(40, 191, 209, 0.05), transparent 28%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: white;
  cursor: pointer;
  font-weight: 800;
  padding: 0.72rem 1rem;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(40, 191, 209, 0.28);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  min-height: 100vh;
}

.intro {
  position: sticky;
  top: 0;
  align-self: start;
  display: block;
  min-height: 100vh;
  padding: 24px 24px 28px;
  border-top: 6px solid;
  border-image: linear-gradient(90deg, var(--cyan), var(--teal)) 1;
  border-right: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 8px 0 26px rgba(19, 82, 92, 0.05);
}

.language-switcher {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin: -4px 0 16px;
}

.language-button {
  min-width: 36px;
  padding: 0.38rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: none;
}

.language-button:hover {
  border-color: var(--cyan);
  background: var(--panel-soft);
}

.language-button.active {
  border-color: var(--green);
  background: #e8f8f1;
  color: var(--green-dark);
}

.intro .eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
}

.brand-logo {
  display: block;
  width: min(205px, 100%);
  height: auto;
  margin: 0 0 16px;
}

.intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.intro .lead {
  margin: 7px 0 22px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.status-card {
  margin-top: 16px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.status-card strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.status-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.tool,
.result-panel {
  grid-column: 2;
}

.tool {
  display: block;
  padding: 24px 32px 0;
}

.process-overview {
  max-width: 1040px;
  margin: 0 auto 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 16px rgba(19, 82, 92, 0.04);
}

.process-overview ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
}

.process-step:not(:last-child)::after {
  position: absolute;
  top: 17px;
  right: 14px;
  left: 54px;
  height: 2px;
  background: #e1eef0;
  content: "";
  z-index: 0;
}

.process-step > span:last-child {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding-right: 18px;
  background: white;
}

.process-number {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  font-size: 0.84rem;
  font-weight: 900;
}

.process-step strong,
.process-step small {
  display: block;
}

.process-step strong {
  color: inherit;
  font-size: 0.88rem;
  line-height: 1.2;
}

.process-step small {
  margin-top: 2px;
  font-size: 0.75rem;
  line-height: 1.25;
}

.process-step.active {
  color: var(--green-dark);
}

.process-step.active .process-number {
  border-color: var(--cyan);
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: white;
  box-shadow: 0 0 0 4px rgba(36, 193, 216, 0.12);
}

.process-step.done {
  color: var(--green);
}

.process-step.done .process-number {
  border-color: rgba(16, 150, 111, 0.22);
  background: #e8f8f1;
  color: transparent;
}

.process-step.done .process-number::after {
  position: absolute;
  color: var(--green);
  content: "✓";
}

.process-step.done:not(:last-child)::after {
  background: rgba(16, 150, 111, 0.35);
}

.progress-panel,
.diagnosis-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.progress-panel,
.diagnosis-panel {
  padding: 20px;
}

.progress-panel {
  margin-top: 14px;
  padding: 16px;
  box-shadow: none;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-weight: 700;
}

.progress-header strong {
  color: var(--green);
}

.progress-track {
  height: 6px;
  margin: 12px 0 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3f2f3;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--teal));
  transition: width 180ms ease;
}

.history-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 1px;
  padding: 1px 0 8px 28px;
  min-height: 30px;
}

.timeline-item:not(:last-child)::after {
  position: absolute;
  top: 20px;
  bottom: -8px;
  left: 9px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  content: "○";
}

.timeline-item.done::before {
  border-color: rgba(16, 150, 111, 0.28);
  background: #e8f8f1;
  color: var(--green);
  content: "✓";
}

.timeline-item.active::before {
  border-color: var(--cyan);
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: white;
  content: "►";
}

.timeline-item strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.2;
}

.timeline-item span {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
}

.timeline-item.pending strong {
  color: var(--muted);
}

.diagnosis-panel {
  width: 100%;
  max-width: 1040px;
  min-height: 390px;
  margin: 0 auto;
  padding: 26px 28px 30px;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.ghost-button,
.secondary-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--green-dark);
  box-shadow: none;
}

.eyebrow,
.step-type {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 12px;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(40, 191, 209, 0.12);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.3rem, 1.75vw, 1.72rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  font-weight: 750;
}

.step-body,
#resultBody {
  color: var(--muted);
  max-width: 760px;
  font-size: 0.98rem;
  line-height: 1.55;
}

.note-box {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #bee8ed;
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  background: #eefbfc;
  color: #286a72;
  line-height: 1.45;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.option-button {
  position: relative;
  min-height: 84px;
  padding: 0.9rem 2.6rem 0.9rem 1rem;
  border: 1px solid var(--line);
  background: #fbfeff;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.option-button::after {
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--green);
  font-size: 1.05rem;
  content: "›";
  transform: translateY(-50%);
}

.option-button:hover {
  border-color: var(--cyan);
  background: #f4fcfd;
  box-shadow: 0 5px 16px rgba(19, 82, 92, 0.07);
}

.option-button span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}

.result-panel {
  display: grid;
  gap: 18px;
  width: calc(100% - 64px);
  max-width: 1040px;
  margin: 18px auto 36px;
  padding: 24px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.field small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink);
  font-weight: 800;
}

.check-field input {
  width: auto;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 0.72rem 0.78rem;
}

input[type="file"] {
  background: white;
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.rma-number,
.diagnosis-list,
.solution-box,
.shipping-box,
.rma-details {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--cyan);
  border-radius: 0;
  background: var(--panel);
}

.rma-number span,
.diagnosis-list > span,
.solution-box > span,
.shipping-box > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.rma-number strong,
.solution-box strong {
  font-size: 1.45rem;
  color: var(--green);
}

.solution-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.shipping-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbfeff;
}

.shipping-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
}

.shipping-grid p,
.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.next-action,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rma-details {
  gap: 16px;
  box-shadow: none;
}

.section-heading {
  display: grid;
  gap: 6px;
}

.section-heading.compact {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.section-heading h3,
.attachments-box h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.attachments-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fbfeff;
}

.attachments-box p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.attachment-button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: white;
  cursor: pointer;
  font-weight: 800;
  padding: 0.85rem 1.05rem;
}

.attachment-button input {
  display: none;
}

.attachments-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: var(--green);
  font-weight: 700;
  list-style: none;
}

.attachments-list .muted {
  color: var(--muted);
  font-weight: 600;
}

#diagnosisBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #eef7f8;
  color: var(--muted);
  font-weight: 900;
}

.badge.selected {
  background: #fff4e8;
  color: var(--orange);
}

.badge.ok {
  background: #e8f8f1;
  color: var(--green);
}

.upload-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

/* Business-platform visual refinement */
body {
  background: #f3f8f9;
}

.app-shell {
  grid-template-columns: 300px minmax(0, 1fr);
}

.intro {
  padding: 20px 20px 26px;
  border-top: 0;
  border-right: 0;
  background: #103f43;
  color: #e5f4f3;
  box-shadow: 10px 0 28px rgba(15, 61, 65, 0.12);
}

.brand-logo {
  width: min(190px, 100%);
  margin: 4px 0 12px;
  opacity: 1;
}

.intro .eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #b9d7d5;
}

.intro h1 {
  color: white;
  font-size: 1.05rem;
  font-weight: 680;
}

.intro .lead {
  color: #b9cecd;
  font-size: 0.9rem;
}

.language-switcher {
  justify-content: flex-start;
  margin: 0 0 18px;
}

.language-button {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #b9cecd;
}

.language-button:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.language-button.active {
  border-color: #35c5b1;
  background: #35c5b1;
  color: #0c393d;
}

.status-card,
.progress-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  color: #e5f4f3;
}

.status-card {
  display: none;
}

.status-card strong,
.progress-header,
.timeline-item strong {
  color: #edf8f7;
}

.status-card p,
.timeline-item.pending strong {
  color: #a9c4c2;
}

.progress-header strong,
.timeline-item span {
  color: #5dd1bd;
}

.progress-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  font-size: 0.86rem;
  font-weight: 600;
}

.progress-header strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.progress-track {
  background: rgba(255, 255, 255, 0.12);
}

.timeline-item:not(:last-child)::after {
  background: rgba(255, 255, 255, 0.16);
}

.timeline-item::before {
  border-color: rgba(255, 255, 255, 0.28);
  background: #103f43;
  color: #b9cecd;
}

.timeline-item.done::before {
  border-color: rgba(93, 209, 189, 0.55);
  background: rgba(93, 209, 189, 0.14);
  color: #6dd8c5;
}

.timeline-item.active::before {
  border-color: #35c5b1;
  background: #35c5b1;
  color: #103f43;
}

.timeline-item strong {
  font-weight: 580;
}

.timeline-item.active strong,
.timeline-item.done:last-child strong {
  font-weight: 700;
}

.timeline-item span {
  font-weight: 620;
}

.tool {
  padding: 22px 28px 0;
}

.process-overview {
  max-width: 1120px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-color: #d8e5e7;
  background: white;
  box-shadow: 0 2px 10px rgba(28, 66, 72, 0.04);
}

.process-step.active .process-number {
  border-color: #35c5b1;
  background: #35c5b1;
  box-shadow: 0 0 0 3px rgba(53, 197, 177, 0.13);
}

.process-step.active,
.process-step.done {
  color: #087b69;
}

.diagnosis-panel {
  max-width: 1120px;
  min-height: 360px;
  padding: 24px 26px 28px;
  border-color: #d8e5e7;
  box-shadow: 0 4px 18px rgba(28, 66, 72, 0.055);
}

.wizard-actions {
  margin-bottom: 14px;
}

.eyebrow,
.step-type {
  margin-bottom: 10px;
  padding: 0.28rem 0.62rem;
  background: #e7f5f4;
  color: #087b69;
  font-size: 0.74rem;
}

h2 {
  max-width: 900px;
  font-size: clamp(1.16rem, 1.4vw, 1.42rem);
  line-height: 1.25;
  font-weight: 680;
}

.step-body,
#resultBody {
  margin: 10px 0 0;
  font-size: 0.94rem;
}

.options {
  gap: 10px;
  margin-top: 18px;
}

.option-button {
  min-height: 76px;
  border-color: #d6e5e7;
  border-radius: 7px;
  background: #fbfdfd;
  font-size: 0.94rem;
  font-weight: 650;
}

.option-button:hover {
  border-color: #35c5b1;
  background: #f2fbf9;
  box-shadow: 0 4px 14px rgba(18, 92, 84, 0.07);
}

.option-button::after {
  color: #078b76;
}

.result-panel {
  max-width: 1120px;
  gap: 12px;
  margin-top: 14px;
  padding: 22px;
  border-color: #d8e5e7;
  box-shadow: 0 4px 18px rgba(28, 66, 72, 0.055);
}

.rma-number,
.diagnosis-list,
.solution-box,
.shipping-box {
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #d8e5e7;
  border-top: 1px solid #d8e5e7;
  border-radius: 7px;
  background: #fbfdfd;
}

.rma-number {
  border-left: 3px solid #25bdd0;
}

.solution-box {
  border-left: 3px solid #35b987;
}

.shipping-box {
  border-left: 3px solid #65a8cc;
}

.rma-number strong,
.solution-box strong {
  font-size: 1.02rem;
  font-weight: 680;
  color: #078b76;
}

.shipping-grid div {
  padding: 12px;
  border-color: #d8e5e7;
  border-radius: 6px;
  background: white;
}

.shipping-grid strong {
  font-size: 0.9rem;
  font-weight: 650;
}

.rma-details {
  gap: 15px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid #d8e5e7;
  border-radius: 0;
  background: transparent;
}

.section-heading.compact {
  padding-top: 14px;
  border-color: #d8e5e7;
}

.section-heading h3,
.attachments-box h3 {
  font-size: 0.94rem;
  font-weight: 680;
}

.field {
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 620;
}

input,
textarea {
  border-color: #d4e3e5;
  border-radius: 6px;
  background: #fff;
  font-size: 0.92rem;
  font-weight: 400;
}

input::placeholder,
textarea::placeholder {
  font-weight: 400;
  opacity: 0.72;
}

#summaryOutput {
  font-weight: 400;
  line-height: 1.45;
}

.attachments-box {
  border-color: #d8e5e7;
  border-radius: 7px;
  background: #f7fbfb;
}

.ghost-button,
.secondary-button {
  color: #087b69;
}

.result-panel > div:first-child h2,
.rma-details > .section-heading:first-child h2 {
  font-size: 1.3rem;
  font-weight: 680;
}

.rma-number span,
.diagnosis-list > span,
.solution-box > span,
.shipping-box > span {
  font-weight: 650;
}

.badge {
  min-height: 28px;
  padding: 0.3rem 0.58rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.badge.selected {
  background: #e7f5f4;
  color: #087b69;
}

@media (max-width: 1020px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .intro {
    position: static;
    min-height: auto;
    border-right: 0;
  }

  .tool,
  .result-panel {
    grid-column: 1;
  }

  .tool {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .result-panel {
    margin: 18px;
  }

  .progress-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .intro {
    padding: 20px;
  }

  .status-card {
    display: none;
  }

  .process-overview {
    padding: 12px;
  }

  .process-overview ol {
    gap: 8px;
  }

  .process-step {
    display: grid;
    justify-items: center;
    gap: 6px;
    text-align: center;
  }

  .process-step > span:last-child {
    padding: 0;
  }

  .process-step small {
    display: none;
  }

  .process-step:not(:last-child)::after {
    top: 17px;
    right: -10px;
    left: calc(50% + 22px);
  }

  .diagnosis-panel {
    min-height: 0;
    padding: 20px;
  }

  .result-panel {
    width: auto;
  }

  .options,
  .inline-form,
  .form-grid,
  .shipping-grid {
    grid-template-columns: 1fr;
  }
}
