:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #eff6ff;
  --border: #e5e7eb;
  --success: #16a34a;
  --error: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 1080px;
  margin: 40px auto;
  padding: 0 20px 60px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 8px 0;
}

.header h1 {
  margin: 0;
  font-size: 30px;
}

.header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

.card.subtle {
  background: #f9fafb;
  box-shadow: none;
  border: 1px solid var(--border);
}

.main-card {
  padding: 0;
  overflow: hidden;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
}

.steps {
  background: #f8fafc;
  padding: 28px 24px;
  border-right: 1px solid var(--border);
}

.steps-header {
  margin-bottom: 20px;
}

.steps-title {
  display: block;
  font-weight: 700;
}

.steps-sub {
  color: var(--muted);
  font-size: 13px;
}

.steps ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.step-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid transparent;
  font-size: 14px;
}

.step-item.active {
  border-color: rgba(37, 99, 235, 0.4);
  background: #ffffff;
  font-weight: 600;
}

.steps-help {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}

.content {
  padding: 32px;
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.summary-inline {
  position: static;
  min-width: 240px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

textarea {
  resize: vertical;
}

.step-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.step-panel.active {
  display: block;
}

.muted {
  color: var(--muted);
  margin-top: 6px;
}

.funding {
  margin-top: 20px;
}

.funding .label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.funding-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.funding-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.funding-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.08);
}

.funding-card input {
  accent-color: var(--primary);
}

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

.slot {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.slot.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.thank-you {
  background: var(--accent);
  padding: 24px;
  border-radius: 16px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border);
}

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

.status {
  font-size: 14px;
  color: var(--muted);
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--error);
}

code {
  background: #eef2ff;
  padding: 2px 6px;
  border-radius: 6px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .steps {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 20px;
  margin-top: 12px;
  align-items: start;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-header h3 {
  margin: 0;
  font-size: 18px;
}

.calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.btn.icon {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 12px 0 4px;
}

.calendar-body {
  display: block;
}

.calendar-day {
  border: 1px solid transparent;
  background: transparent;
  text-align: center;
  padding: 8px 0;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.calendar-day.header {
  font-weight: 600;
  color: var(--muted);
  cursor: default;
  background: transparent;
}

.calendar-day.empty {
  background: transparent;
  border: none;
  cursor: default;
}

.calendar-day.today {
  border-color: rgba(37, 99, 235, 0.3);
}

.calendar-day.selected {
  background: var(--primary);
  color: #fff;
}

.calendar-day:hover:not(.header):not(.empty):not(.disabled) {
  border-color: rgba(37, 99, 235, 0.3);
}

.calendar-day.disabled {
  color: #cbd5f5;
  cursor: not-allowed;
}

.calendar-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.summary-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  position: sticky;
  top: 20px;
}

.summary-top {
  position: static;
  margin-bottom: 16px;
}

.summary-slots {
  position: sticky;
  top: 20px;
}

.summary-card h4 {
  margin-top: 0;
}

.summary-line {
  margin: 8px 0;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-body {
    grid-template-columns: 1fr;
  }

  .calendar-right {
    border-left: none;
    padding-left: 0;
  }
}
