:root {
  --bg: #f4f0e8;
  --ink: #1f2421;
  --ink-muted: #4a524d;
  --accent: #1b7f5c;
  --accent-soft: #d5efe5;
  --panel: #fffdf8;
  --line: #d8d0c3;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, #fef5da 0, #f4f0e8 45%),
    radial-gradient(circle at 90% 90%, #dcefe7 0, #f4f0e8 40%);
  min-height: 100vh;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(3px);
  position: sticky;
  top: 0;
}

.topnav a {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

#app {
  width: min(960px, 92vw);
  margin: 1.25rem auto 2rem;
  display: grid;
  gap: 1rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.hero {
  border-left: 6px solid var(--accent);
}

h1,
h2 {
  margin: 0 0 0.5rem;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
}

.stacked-form {
  display: grid;
  gap: 0.8rem;
}

.stacked-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--ink-muted);
}

.stacked-form input,
.stacked-form button {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.6rem 0.7rem;
  font-size: 0.95rem;
}

.stacked-form button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: pointer;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: #fff;
}

.list li span {
  color: var(--ink-muted);
  text-align: right;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
}

.kpis article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem;
  background: var(--accent-soft);
}

.status {
  color: var(--ink-muted);
  min-height: 1.2em;
}

.stepper {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.stepper li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  text-align: center;
  background: #fff;
  color: var(--ink-muted);
}

.stepper li.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.stepper li.done {
  background: var(--accent-soft);
  color: var(--ink);
}

.choice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.choice-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.choice-option {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 12px;
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
}

.choice-option span {
  color: var(--ink-muted);
}

.choice-option.selected {
  background: #d9f2e7;
  border-color: #8fceb1;
}

.choice-option.selected strong,
.choice-option.selected span {
  color: #124536;
}

.wizard-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

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

.checkbox-line {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.field-error {
  min-height: 1.1rem;
  color: #a13a2a;
  font-size: 0.82rem;
}

.date-hint {
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.calendar-picker {
  position: relative;
  width: fit-content;
}

.calendar-popup {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 5;
  width: min(330px, 84vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(31, 36, 33, 0.15);
  padding: 0.65rem;
}

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

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
}

.calendar-weekdays {
  margin-bottom: 0.3rem;
  color: var(--ink-muted);
  font-size: 0.78rem;
  text-align: center;
}

.calendar-cell {
  height: 2rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.86rem;
  text-align: center;
}

.calendar-cell.empty {
  visibility: hidden;
}

.calendar-cell.day {
  cursor: pointer;
}

.calendar-cell.day.available {
  background: #d9f2e7;
  color: #104233;
  border-color: #9fd7bd;
}

.calendar-cell.day.available.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.calendar-cell.day.unavailable {
  background: #ece8e0;
  color: #8a877f;
  border-color: #ddd6ca;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .list li span {
    text-align: left;
  }

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