.cvt-tool {
  --cvt-ink: #0f172a;
  --cvt-muted: #64748b;
  --cvt-soft: #f6f9fb;
  --cvt-panel: #ffffff;
  --cvt-line: #d9e3ea;
  --cvt-line-strong: #b8c7d2;
  --cvt-brand: #0f766e;
  --cvt-brand-dark: #115e59;
  --cvt-accent: #2563eb;
  --cvt-good: #7ccf8a;
  --cvt-warn: #f8d66d;
  --cvt-busy: #dfe8f2;
  --cvt-white: #fff;
  width: min(100%, 1180px);
  margin: 0 auto;
  color: var(--cvt-ink);
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
}

.cvt-tool,
.cvt-tool * {
  box-sizing: border-box;
}

.cvt-tool :where(h2, h3, h4, p, span, strong, label, input, button, table, th, td) {
  font-family: inherit;
  letter-spacing: 0;
}

.cvt-tool :where(p, h2, h3, h4) {
  margin-top: 0;
}

.cvt-search,
.cvt-results {
  width: 100%;
}

.cvt-search,
.cvt-info-card,
.cvt-class-card,
.cvt-coach-section,
.cvt-detail {
  border: 1px solid var(--cvt-line);
  border-radius: 12px;
  background: var(--cvt-panel);
  box-shadow: 0 18px 50px rgb(15 23 42 / 7%);
}

.cvt-search {
  position: relative;
  padding: 22px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 96%), rgb(248 251 252 / 96%)),
    radial-gradient(circle at top left, rgb(15 118 110 / 8%), transparent 34%);
}

.cvt-steps {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cvt-steps span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dce6ec;
  border-radius: 999px;
  background: #fff;
  color: var(--cvt-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.cvt-steps .is-active {
  border-color: rgb(15 118 110 / 28%);
  background: #eaf7f5;
  color: var(--cvt-brand-dark);
}

.cvt-heading,
.cvt-kicker {
  display: none;
}

.cvt-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(160px, 0.72fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.cvt-form.is-loading {
  opacity: 0.42;
  pointer-events: none;
}

.cvt-field {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 0;
}

.cvt-field span {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.cvt-field input,
.cvt-filter {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--cvt-line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--cvt-ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  box-shadow: 0 1px 0 rgb(15 23 42 / 3%);
}

.cvt-field input:focus,
.cvt-filter:focus {
  outline: 4px solid rgb(15 118 110 / 12%);
  border-color: var(--cvt-brand);
}

.cvt-primary,
.cvt-ghost,
.cvt-secondary,
.cvt-coach {
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

.cvt-primary {
  min-height: 48px;
  padding: 0 24px;
  background: var(--cvt-brand);
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgb(15 118 110 / 20%);
}

.cvt-primary:hover,
.cvt-ghost:hover,
.cvt-secondary:hover,
.cvt-coach:hover {
  filter: brightness(0.97);
}

.cvt-ghost {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--cvt-line);
  background: #fff;
  color: #334155;
  white-space: nowrap;
}

.cvt-secondary {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  background: #111827;
  color: #fff;
}

.cvt-secondary:disabled,
.cvt-primary:disabled,
.cvt-ghost:disabled,
.cvt-coach:disabled {
  cursor: wait;
  opacity: 0.72;
}

.cvt-suggestions {
  position: absolute;
  z-index: 9999;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--cvt-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgb(15 23 42 / 15%);
}

.cvt-suggestions button {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  color: var(--cvt-ink);
  text-align: left;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.cvt-suggestions button:hover {
  background: #effaf8;
}

.cvt-message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--cvt-brand-dark);
  font-size: 14px;
  font-weight: 700;
}

.cvt-message.is-error {
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff1f2;
  color: #b42318;
}

.cvt-progress {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 22px;
  border-radius: 12px;
  background: rgb(255 255 255 / 72%);
  backdrop-filter: blur(2px);
}

.cvt-progress[hidden] {
  display: none;
}

.cvt-progress-card {
  width: min(100%, 360px);
  padding: 18px;
  display: grid;
  gap: 9px;
  border: 1px solid var(--cvt-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 60px rgb(15 23 42 / 14%);
  text-align: center;
}

.cvt-progress-card strong {
  font-size: 16px;
  line-height: 1.25;
}

.cvt-progress-card p {
  margin: 0;
  color: var(--cvt-muted);
  font-size: 13px;
}

.cvt-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.cvt-progress-track i {
  width: 42%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cvt-brand), var(--cvt-accent));
  animation: cvt-progress-slide 1.1s ease-in-out infinite;
}

@keyframes cvt-progress-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(245%); }
}

.cvt-results {
  margin-top: 16px;
}

.cvt-results-bar {
  margin-bottom: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--cvt-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgb(15 23 42 / 5%);
}

.cvt-results-bar span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.cvt-results-bar .cvt-ghost {
  min-height: 36px;
}

.cvt-summary,
.cvt-class-grid {
  display: grid;
  gap: 12px;
}

.cvt-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.cvt-info-card {
  min-height: 82px;
  padding: 14px;
  display: grid;
  gap: 4px;
}

.cvt-info-card span {
  color: var(--cvt-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.cvt-info-card strong {
  color: var(--cvt-ink);
  font-size: 15px;
  line-height: 1.25;
}

.cvt-info-card p {
  margin: 0;
  color: var(--cvt-muted);
  font-size: 12px;
}

.cvt-class-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cvt-class-card {
  padding: 16px;
  display: grid;
  gap: 9px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cvt-class-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgb(15 23 42 / 9%);
}

.cvt-class-card h3 {
  margin: 0;
  color: var(--cvt-ink);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.2;
}

.cvt-class-card p {
  margin: 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.35;
}

.cvt-class-card .cvt-muted {
  min-height: 38px;
  color: var(--cvt-muted);
  font-size: 13px;
}

.cvt-class-number {
  color: var(--cvt-brand-dark) !important;
  font-size: 36px !important;
  font-weight: 900;
  line-height: 1 !important;
}

.cvt-coach-section,
.cvt-detail {
  margin-top: 16px;
  padding: 18px;
}

.cvt-section-title h3,
.cvt-detail-header h3 {
  margin: 0 0 4px;
  color: var(--cvt-ink);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.25;
}

.cvt-section-title p,
.cvt-detail-header p {
  margin: 0;
  color: var(--cvt-muted);
  font-size: 14px;
  line-height: 1.45;
}

.cvt-coaches {
  margin-top: 14px;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 0 0 10px;
  scrollbar-color: #94a3b8 #eef2f7;
}

.cvt-engine,
.cvt-coach {
  min-width: 76px;
  min-height: 58px;
  padding: 8px 10px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  white-space: nowrap;
}

.cvt-engine {
  background: #f97316;
  font-size: 14px;
  font-weight: 900;
}

.cvt-coach {
  background: var(--cvt-accent);
  box-shadow: 0 8px 18px rgb(37 99 235 / 18%);
}

.cvt-coach strong {
  font-size: 18px;
  line-height: 1;
}

.cvt-coach span {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.cvt-coach.is-active {
  background: #effaf8;
  color: var(--cvt-ink);
  box-shadow: inset 0 0 0 2px var(--cvt-brand);
}

.cvt-layout {
  margin-top: 12px;
  border-top: 1px solid var(--cvt-line);
  padding-top: 14px;
}

.cvt-layout-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cvt-layout-head h4,
.cvt-layout-head p {
  margin: 0;
}

.cvt-layout-head h4 {
  font-size: 18px;
  font-weight: 850;
  line-height: 1.2;
}

.cvt-layout-head p {
  color: var(--cvt-muted);
  font-size: 14px;
}

.cvt-berth-map {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, 28px);
  grid-auto-columns: 58px;
  gap: 8px;
  overflow-x: auto;
  padding: 12px;
  border: 1px solid #edf1f7;
  border-radius: 12px;
  background: #fbfcfe;
  scrollbar-color: #94a3b8 #eef2f7;
}

.cvt-berth {
  min-width: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 6px;
  color: var(--cvt-ink);
  font-size: 12px;
  font-weight: 850;
}

.cvt-berth-occupied {
  background: var(--cvt-busy);
}

.cvt-berth-partial {
  background: var(--cvt-warn);
}

.cvt-berth-vacant {
  background: var(--cvt-good);
}

.cvt-legend {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--cvt-muted);
  font-size: 13px;
}

.cvt-legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.cvt-legend i {
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 1px solid var(--cvt-line);
  border-radius: 4px;
}

.cvt-detail-header {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px);
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.cvt-view-tabs {
  margin: 0 0 12px;
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--cvt-line);
  border-radius: 999px;
  background: #f8fafc;
}

.cvt-view-tabs button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cvt-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.cvt-view-tabs button.is-active {
  background: #fff;
  color: var(--cvt-brand-dark);
  box-shadow: 0 5px 16px rgb(15 23 42 / 8%);
}

.cvt-detail-stats {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cvt-detail-stats span {
  min-height: 34px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--cvt-line);
  border-radius: 999px;
  background: #fff;
  color: var(--cvt-muted);
  font-size: 13px;
}

.cvt-detail-stats b {
  color: var(--cvt-ink);
}

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

.cvt-route-card {
  padding: 14px;
  display: grid;
  gap: 11px;
  border: 1px solid var(--cvt-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.cvt-route-card.is-open {
  border-color: rgb(15 118 110 / 35%);
  box-shadow: 0 14px 34px rgb(15 23 42 / 7%);
}

.cvt-route-toggle {
  width: 100%;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.cvt-route-toggle em {
  min-width: 52px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: #ecfdf5;
  color: var(--cvt-brand-dark);
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.cvt-route-toggle::after {
  content: "Show seats";
  grid-column: 1 / -1;
  width: max-content;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.cvt-route-toggle[aria-expanded="true"]::after {
  content: "Hide seats";
  background: var(--cvt-brand);
}

.cvt-route-label {
  display: block;
  margin-bottom: 3px;
  color: var(--cvt-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.cvt-route-card strong {
  display: block;
  color: var(--cvt-ink);
  font-size: 15px;
  line-height: 1.3;
}

.cvt-route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cvt-route-meta span,
.cvt-berth-chip {
  min-height: 28px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef6ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.cvt-route-seats {
  padding-top: 10px;
  border-top: 1px solid var(--cvt-line);
}

.cvt-route-seats[hidden] {
  display: none;
}

.cvt-route-seats p {
  margin: 0 0 8px;
  color: var(--cvt-muted);
  font-size: 13px;
  font-weight: 750;
}

.cvt-route-seats ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.cvt-route-seats li {
  min-height: 38px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 54px 1fr 1.2fr 0.9fr;
  gap: 8px;
  align-items: center;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
}

.cvt-route-seats li b {
  color: var(--cvt-ink);
}

.cvt-route-seats li span {
  line-height: 1.25;
}

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

.cvt-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--cvt-line);
  border-radius: 12px;
}

.cvt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cvt-table th {
  padding: 11px 12px;
  background: #111827;
  color: #fff;
  text-align: left;
  white-space: nowrap;
  font-weight: 800;
}

.cvt-table td {
  padding: 11px 12px;
  border-top: 1px solid var(--cvt-line);
  color: var(--cvt-ink);
  background: #fff;
}

.cvt-table tr:nth-child(even) td {
  background: var(--cvt-soft);
}

.cvt-mobile-rows {
  display: none;
}

.cvt-row-card {
  padding: 14px;
  border: 1px solid var(--cvt-line);
  border-radius: 12px;
  background: #fff;
}

.cvt-row-card strong,
.cvt-row-card span {
  display: block;
  line-height: 1.35;
}

.cvt-row-card span {
  margin-top: 5px;
  color: var(--cvt-muted);
}

@media (max-width: 1080px) {
  .cvt-form,
  .cvt-summary {
    grid-template-columns: 1fr 1fr;
  }

  .cvt-primary {
    width: 100%;
  }

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

@media (max-width: 720px) {
  .cvt-tool {
    font-size: 15px;
  }

  .cvt-search,
  .cvt-coach-section,
  .cvt-detail {
    padding: 14px;
  }

  .cvt-steps {
    grid-template-columns: 1fr;
  }

  .cvt-form,
  .cvt-summary,
  .cvt-class-grid,
  .cvt-detail-header,
  .cvt-route-grid {
    grid-template-columns: 1fr;
  }

  .cvt-class-card .cvt-muted {
    min-height: 0;
  }

  .cvt-route-toggle {
    grid-template-columns: 1fr;
  }

  .cvt-route-toggle em {
    min-width: 0;
    width: 64px;
  }

  .cvt-route-seats li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .cvt-table-wrap {
    display: none;
  }

  .cvt-mobile-rows {
    display: grid;
    gap: 10px;
  }
}
