:root {
  --bg: #f6f1e8;
  --surface: rgba(255, 255, 255, 0.86);
  --ink: #1f1d1a;
  --muted: #655f56;
  --line: rgba(20, 50, 74, 0.12);
  --teal: #007d74;
  --teal-strong: #005c56;
  --orange: #f36d3c;
  --navy: #14324a;
  --shadow: 0 18px 44px rgba(20, 50, 74, 0.12);
  --radius: 28px;
  --max: 1280px;
  --mono: "Cascadia Code", "Consolas", "Courier New", monospace;
  --display: "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 125, 116, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(243, 109, 60, 0.16), transparent 28%),
    linear-gradient(180deg, #faf5ee 0%, #f2ede2 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 50, 74, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 50, 74, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 80%);
}

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

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

button {
  cursor: pointer;
  border: 0;
}

.page-shell {
  width: min(100%, calc(var(--max) + 48px));
  margin: 0 auto;
  padding: 20px 24px 48px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(250, 246, 239, 0.88);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(20, 50, 74, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--navy), #1e4c68);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
}

.brand-mark-logo {
  overflow: hidden;
  background: none;
  box-shadow: 0 8px 20px rgba(20, 50, 74, 0.16);
}

.brand-mark-logo img,
.hero-brand-image,
.stack-brand-banner img,
.mobile-brand-banner img,
.footer-brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 1rem;
}

.brand-copy span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.96rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 18%);
}

.panel-hero,
.section-split,
.feature-strip,
.service-grid,
.section-grid,
.mobile-grid,
.payment-stack,
.hero-stack,
.hero-metrics {
  display: grid;
  gap: 20px;
}

.panel-hero {
  grid-template-columns: 1.3fr 0.9fr;
  padding: 34px;
  margin-bottom: 24px;
}

.feature-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 28px;
}

.feature-card,
.stack-card,
.utility-card,
.payment-card,
.mobile-card {
  position: relative;
  z-index: 1;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.highlight-card {
  background:
    radial-gradient(circle at top right, rgba(243, 109, 60, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(20, 50, 74, 0.95), rgba(20, 50, 74, 0.88));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}

.highlight-card .eyebrow,
.highlight-card .muted-text {
  color: rgba(255, 255, 255, 0.76);
}

.hero-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.metric-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(20, 50, 74, 0.06);
  border: 1px solid rgba(20, 50, 74, 0.06);
}

.metric-card strong {
  display: block;
  font-size: 1.4rem;
  font-family: var(--display);
}

.metric-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.section-grid {
  margin-bottom: 28px;
}

.section-split {
  grid-template-columns: 1.08fr 0.92fr;
  align-items: start;
}

.ticket-board-column {
  display: grid;
  gap: 20px;
}

.section-split > .panel,
.panel:not(.panel-hero) {
  padding: 26px;
}

.section-heading {
  max-width: 68ch;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading p:last-child,
.muted-text {
  color: var(--muted);
}

.ticket-summary-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.8));
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-strong);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  line-height: 1.02;
}

h1 {
  font-size: clamp(2.6rem, 4vw, 4.6rem);
  max-width: 12ch;
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(1.65rem, 2vw, 2.5rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

p {
  line-height: 1.55;
}

.hero-lede {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-brand-lockup,
.stack-brand-banner,
.mobile-brand-banner,
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-brand-lockup {
  margin-bottom: 18px;
  padding: 12px;
  width: fit-content;
  max-width: min(100%, 420px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 50, 74, 0.08);
}

.hero-brand-image {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(20, 50, 74, 0.12);
}

.hero-brand-copy span {
  display: block;
  max-width: 24ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.stack-brand-banner {
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(20, 50, 74, 0.04);
}

.stack-brand-banner img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  flex: 0 0 auto;
}

.stack-brand-banner strong {
  display: block;
  font-size: 0.96rem;
}

.invoice-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(20, 50, 74, 0.1);
}

.invoice-header .hero-brand-lockup,
.mobile-preview-head .hero-brand-lockup {
  margin-bottom: 0;
  padding: 0;
  max-width: none;
  background: none;
  border: 0;
}

.hero-actions,
.detail-actions,
.calendar-actions,
.form-row-actions,
.filter-bar,
.planner-toggle,
.topbar-actions,
.payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 24px;
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(20, 50, 74, 0.04);
  border: 1px solid rgba(20, 50, 74, 0.08);
}

.service-top,
.ticket-card-header,
.ticket-card-footer,
.invoice-row,
.invoice-header,
.planner-summary-head,
.compat-row,
.summary-row,
.detail-card,
.plan-card,
.shortcut-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.service-price,
.tag,
.payment-badges span,
.status-chip,
.filter-button,
.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.service-price {
  background: rgba(0, 125, 116, 0.12);
  color: var(--teal-strong);
  font-family: var(--mono);
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.payment-badges span,
.status-chip,
.filter-button,
.toggle-button {
  background: rgba(20, 50, 74, 0.06);
  color: var(--navy);
  border: 1px solid rgba(20, 50, 74, 0.08);
}

.filter-button.is-active,
.toggle-button.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.mini-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.mini-list li + li {
  margin-top: 10px;
}

.side-panel,
.panel-utility {
  display: grid;
  gap: 16px;
}

.booking-form {
  display: grid;
  gap: 16px;
}

.booking-form label,
.lookup-form label,
.payment-card label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-weight: 600;
}

.booking-form input,
.lookup-form input,
.booking-form select,
.booking-form textarea,
.payment-card input {
  width: 100%;
  border: 1px solid rgba(20, 50, 74, 0.14);
  border-radius: 18px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.booking-form textarea {
  resize: vertical;
  min-height: 110px;
}

.lookup-form {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

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

.lookup-input-row {
  display: grid;
  grid-template-columns: auto;
  gap: 12px;
  align-items: center;
}

.tracking-access-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(0, 125, 116, 0.16);
  background: rgba(216, 239, 226, 0.72);
}

.security-slot {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(20, 50, 74, 0.08);
  background: rgba(20, 50, 74, 0.04);
}

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

.booking-summary,
.invoice-card,
.planner-output {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
  border: 1px solid var(--line);
}

.summary-grid,
.detail-card-list,
.plan-list,
.shortcut-list,
.timeline,
.invoice-grid,
.compat-list,
.warning-list,
.recommend-list {
  display: grid;
  gap: 10px;
}

.summary-row,
.detail-card,
.plan-card,
.shortcut-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(20, 50, 74, 0.05);
}

.ticket-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  overflow-x: auto;
}

.board-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 220px;
}

.column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.column-head span {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.ticket-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(20, 50, 74, 0.08);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px rgba(20, 50, 74, 0.06);
}

.ticket-card.is-selected {
  outline: 2px solid rgba(0, 125, 116, 0.4);
  background: rgba(216, 239, 226, 0.76);
}

.ticket-card button {
  width: 100%;
  padding: 0;
  background: none;
  text-align: left;
  color: inherit;
}

.ticket-card-footer {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.status-chip[data-tone="success"] {
  background: rgba(34, 197, 94, 0.12);
  color: #136c37;
}

.status-chip[data-tone="warning"] {
  background: rgba(243, 109, 60, 0.14);
  color: #9d421f;
}

.status-chip[data-tone="info"] {
  background: rgba(0, 125, 116, 0.14);
  color: var(--teal-strong);
}

.progress-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.progress-step {
  padding: 14px 12px;
  border-radius: 18px;
  text-align: center;
  background: rgba(20, 50, 74, 0.05);
  color: var(--muted);
}

.progress-step.is-current {
  background: rgba(0, 125, 116, 0.14);
  border: 1px solid rgba(0, 125, 116, 0.24);
  color: var(--navy);
}

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

.timeline-item {
  position: relative;
  padding: 0 0 0 22px;
  color: var(--muted);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
}

.timeline-item strong {
  display: block;
  color: var(--ink);
}

.invoice-row.total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.planner-output,
.payment-stack {
  align-items: start;
}

.planner-controls {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

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

.part-card,
.symptom-card,
.warning-card,
.recommend-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(20, 50, 74, 0.08);
  background: rgba(20, 50, 74, 0.04);
}

.warning-card {
  background: rgba(243, 109, 60, 0.12);
}

.recommend-card {
  background: rgba(216, 239, 226, 0.8);
}

.budget-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(20, 50, 74, 0.08);
  overflow: hidden;
}

.budget-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--orange));
}

.phone-shell {
  width: min(100%, 310px);
  margin: 0 auto;
  padding: 12px;
  border-radius: 34px;
  background: linear-gradient(180deg, #151515, #2f2f2f);
  box-shadow: 0 24px 50px rgba(20, 50, 74, 0.24);
}

.phone-screen {
  min-height: 520px;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(243, 109, 60, 0.18), transparent 32%), linear-gradient(180deg, #f7f3eb, #f0e8db);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-preview {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 520px;
}

.mobile-preview-head,
.mobile-preview-body,
.mobile-preview-footer {
  padding: 18px;
}

.mobile-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mobile-preview-body {
  display: grid;
  gap: 12px;
}

.mobile-preview-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(20, 50, 74, 0.08);
}

.mobile-preview-footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mobile-tab {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 16px;
  background: rgba(20, 50, 74, 0.06);
  font-size: 0.78rem;
}

.mobile-grid {
  grid-template-columns: 1.06fr 0.94fr;
}

.mobile-brand-banner {
  justify-content: space-between;
  margin-bottom: 12px;
}

.mobile-brand-banner img {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  box-shadow: 0 8px 18px rgba(20, 50, 74, 0.12);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(20, 50, 74, 0.32);
  backdrop-filter: blur(6px);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 31;
  width: min(100%, 460px);
  height: 100%;
  padding: 22px;
  background: #f8f3ea;
  box-shadow: -18px 0 40px rgba(20, 50, 74, 0.2);
  overflow-y: auto;
}

.drawer-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(20, 50, 74, 0.08);
}

.drawer-body,
.toast-root {
  display: grid;
  gap: 18px;
}

.dispatch-note {
  padding: 18px;
  border-radius: 22px;
  background: rgba(20, 50, 74, 0.06);
}

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(20, 50, 74, 0.94);
  color: #fff;
  box-shadow: 0 16px 28px rgba(20, 50, 74, 0.24);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 18px 6px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-brand {
  max-width: 54ch;
}

.footer-brand img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(20, 50, 74, 0.1);
}

.primary-button,
.secondary-button,
.ghost-button,
.tertiary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, var(--navy), #275b7a);
  color: #fff;
  box-shadow: 0 14px 30px rgba(20, 50, 74, 0.18);
}

.secondary-button {
  background: var(--teal);
  color: #fff;
}

.ghost-button {
  background: rgba(20, 50, 74, 0.06);
  color: var(--navy);
  border: 1px solid rgba(20, 50, 74, 0.1);
}

.tertiary-button {
  background: rgba(243, 109, 60, 0.14);
  color: #984221;
}

.full-width {
  width: 100%;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .panel-hero,
  .section-split,
  .mobile-grid,
  .feature-strip {
    grid-template-columns: 1fr;
  }

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

  .hero-metrics,
  .ticket-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .page-shell {
    padding-inline: 14px;
  }

  .topbar {
    border-radius: 28px;
    flex-wrap: wrap;
  }

  .primary-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    padding-top: 4px;
  }

  .panel-hero,
  .section-split > .panel,
  .ticket-board-column > .panel {
    padding: 22px;
  }

  .hero-metrics,
  .service-grid,
  .form-row,
  .lookup-field-grid,
  .lookup-input-row,
  .part-grid,
  .symptom-grid,
  .progress-rail {
    grid-template-columns: 1fr;
  }

  .ticket-board {
    display: flex;
  }

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero-brand-lockup,
  .stack-brand-banner,
  .mobile-brand-banner,
  .footer-brand {
    align-items: flex-start;
  }

  .hero-actions,
  .detail-actions,
  .calendar-actions,
  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions button,
  .detail-actions button,
  .calendar-actions button,
  .topbar-actions button,
  .lookup-input-row button {
    width: 100%;
  }
}
