:root {
  --bg: #0c0c0d;
  --surface: #161618;
  --surface-elevated: #1c1c1f;
  --border: #2c2c2e;
  --border-focus: #3c3c40;
  --text: #fafafa;
  --text-muted: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-muted: rgba(59, 130, 246, 0.12);
  --success: #22c55e;
  --error: #ef4444;
  --radius: 10px;
  --radius-sm: 6px;
  --font: "DM Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
}

.header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.header h1 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}

.api-config label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.api-config input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.api-config input::placeholder {
  color: var(--text-muted);
}

.api-config input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.stepper {
  margin-bottom: 1.5rem;
}

.stepper ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.stepper li {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stepper li::after {
  content: "›";
  color: var(--border);
  margin-left: 0.25rem;
  font-weight: 400;
}

.stepper li:last-child::after {
  display: none;
}

.stepper [aria-current="step"] {
  color: var(--accent);
}

.stepper [data-state="completed"] {
  color: var(--text-muted);
}

.step-content {
  flex: 1;
  padding: 0.25rem 0 1rem;
}

.step-content .placeholder {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.step-content h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  letter-spacing: -0.01em;
}

.step-content label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.step-content input,
.step-content select,
.step-content textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.875rem;
}

.step-content input:focus,
.step-content select:focus,
.step-content textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.step-content .input-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.step-content .option-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.step-content .option-card {
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s;
}

.step-content .option-card:hover {
  border-color: var(--text-muted);
}

.step-content .option-card[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.step-content .option-card .title {
  font-weight: 500;
}

.step-content .option-card .meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Pricing cards */
.pricing-grid {
  display: grid;
  gap: 0.75rem;
}

.pricing-card {
  padding: 1rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.pricing-card:hover {
  border-color: var(--border-focus);
  background: var(--surface-elevated);
}

.pricing-card--selected {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.pricing-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pricing-card__title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.pricing-card__price {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}

.pricing-card__period {
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.pricing-card__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.pricing-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pricing-card__setup,
.pricing-card__term {
  color: var(--text-muted);
}

.no-coverage-msg {
  color: var(--text-muted);
  padding: 1rem 0;
  margin: 0;
}

.no-addons-msg {
  margin: 0 0 0.75rem 0;
}

.text-muted {
  color: var(--text-muted);
}

.footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  padding: 0.625rem 1.25rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-elevated);
  border-color: var(--border-focus);
}

.error {
  color: var(--error);
  font-size: 0.8125rem;
  margin: 0;
  min-height: 1.25rem;
}

.success-msg {
  color: var(--success);
  font-size: 0.8125rem;
}

.loading {
  color: var(--text-muted);
}

.ws-status {
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  margin-top: 0.75rem;
}

.ws-status.connected { border-left: 3px solid var(--success); }
.ws-status.closed { border-left: 3px solid var(--text-muted); }
.ws-status.error { border-left: 3px solid var(--error); }

.addon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.addon-row input[type="number"] {
  width: 4rem;
  margin-bottom: 0;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: 0;
}

.radio-group input {
  width: auto;
  margin-bottom: 0;
}

.subsection {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0.75rem 0;
}

.order-summary {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.order-summary .charge-block {
  margin-bottom: 0.5rem;
}

.order-summary .charge-type {
  text-transform: capitalize;
  font-weight: 500;
}

.order-summary .charge-total {
  float: right;
}

.order-summary .line-item {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-left: 0.5rem;
  margin-bottom: 0.25rem;
}

.calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.calendar-day {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-day .day-label {
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.calendar-day .day-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  padding: 0.75rem;
}

.calendar-slot {
  min-width: 0;
}
