:root {
  --green-dark:   #1b4332;
  --green-mid:    #2d6a4f;
  --green-light:  #40916c;
  --green-accent: #52b788;
  --green-pale:   #d8f3dc;
  --cream:        #fafaf7;
  --white:        #ffffff;
  --text-dark:    #1a1a1a;
  --text-mid:     #4a5568;
  --text-light:   #718096;
  --border:       #e2e8f0;
  --radius:       12px;
  --radius-sm:    8px;
  --t:            0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 55%, var(--green-light) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute;
  top: -60%; right: -8%;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}
header::after {
  content: '';
  position: absolute;
  bottom: -40%; left: 15%;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  pointer-events: none;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}
.logo-box {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.header-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.header-text p {
  font-size: .85rem;
  opacity: .72;
  margin-top: 3px;
}
.live-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  white-space: nowrap;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #74c69d;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(.8); }
}

/* ── NAV ── */
nav {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
}
.tab-btn {
  padding: 15px 22px;
  border: none;
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--t), background var(--t);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.tab-btn:hover  { color: var(--green-mid); background: var(--green-pale); }
.tab-btn.active { color: var(--green-dark); border-bottom-color: var(--green-accent); }

/* ── MAIN ── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}
.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: fadeUp .3s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── STEP INDICATOR ── */
.steps-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.steps-bar-wrap .steps-bar {
  flex: 1;
  margin-bottom: 0;
}
.steps-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-light);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .3s, color .3s;
  flex-shrink: 0;
}
.step-circle.active { background: var(--green-mid); color: #fff; }
.step-circle.done   { background: var(--green-accent); color: #fff; }
.step-text {
  font-size: .8rem;
  color: var(--text-light);
  font-weight: 600;
  transition: color .3s;
}
.step-item.active .step-text { color: var(--green-dark); }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 24px;
  max-width: 64px;
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  animation: fadeUp .35s ease backwards;
}
.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}

/* ── FORM ── */
.field-wrap { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 7px;
}
select {
  width: 100%;
  padding: 11px 38px 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  appearance: none;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a5568' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
select:focus, input:focus { outline: none; border-color: var(--green-accent); box-shadow: 0 0 0 3px rgba(82,183,136,.2); }
select:disabled { opacity: .45; cursor: not-allowed; background-color: #f8f8f8; }
input[type="number"], input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--t), box-shadow var(--t);
}
input[type="number"]::-webkit-inner-spin-button { opacity: 0.5; }

/* ── HAUSNUMMER ROW ── */
.hausnr-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.hausnr-row .field-wrap { margin-bottom: 0; }
.field-hausnr    { flex: 1; min-width: 100px; }
.field-hausnrzus { flex: 1; min-width: 80px; }

.btn-submit {
  padding: 11px 22px;
  background: var(--green-mid);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t);
  white-space: nowrap;
  height: 46px;
  flex-shrink: 0;
}
.btn-submit:hover { background: var(--green-dark); }

/* ── RESET BUTTON ── */
.btn-reset {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-mid);
  font-family: 'Outfit', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-reset:hover { border-color: #c3004d; color: #c3004d; background: #fff5f7; }

/* ── SPINNER / LOADING ── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid var(--border);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: .88rem;
  padding: 6px 0;
}

/* ── INFO BOXES ── */
.info-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  line-height: 1.55;
  margin-bottom: 12px;
}
.info-box:last-child { margin-bottom: 0; }
.info-box.green  { background: var(--green-pale); border: 1px solid rgba(64,145,108,.3); color: var(--green-dark); }
.info-box.yellow { background: #fffbeb; border: 1px solid rgba(251,186,0,.4);  color: #7c5e0a; }
.info-box.blue   { background: #eff6ff; border: 1px solid rgba(0,142,207,.3);  color: #1e40af; }
.info-box.grey   { background: #f8fafc; border: 1px solid var(--border);       color: var(--text-mid); }
.box-icon { font-size: 1.05rem; flex-shrink: 0; margin-top: 1px; }

/* ── QUERY DISPLAY ── */
.query-box {
  font-family: 'Courier New', monospace;
  font-size: .76rem;
  background: #12192b;
  color: #7dd3a8;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  overflow-x: auto;
  white-space: nowrap;
  line-height: 1.6;
}
.q-method { color: #fbbf24; font-weight: bold; }
.q-url    { color: #93c5fd; }
.q-param  { color: #f9a8d4; }
.q-ok     { color: #86efac; }
.q-err    { color: #fca5a5; }

/* ── DATES LIST ── */
.dates-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.date-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--green-accent);
  transition: background var(--t);
}
.date-row:hover { background: var(--green-pale); }
.date-day {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green-dark);
  min-width: 38px;
  text-align: center;
  line-height: 1;
}
.date-meta { flex: 1; }
.date-weekday { font-weight: 600; font-size: .9rem; color: var(--text-dark); }
.date-full    { font-size: .78rem; color: var(--text-light); margin-top: 1px; }

/* ── WASTE GRID ── */
.section-head { margin-bottom: 22px; }
.section-head h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 6px;
}
.section-head p { color: var(--text-mid); font-size: .9rem; }

.waste-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.waste-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  border: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform var(--t), box-shadow var(--t);
}
.waste-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.waste-dot {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.waste-info h3 {
  font-family: 'Outfit', sans-serif;
  font-size: .93rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.3;
}
.code-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: .72rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.color-swatch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.swatch-block {
  width: 13px; height: 13px;
  border-radius: 3px;
  flex-shrink: 0;
}
.swatch-hex {
  font-size: .72rem;
  font-family: 'Courier New', monospace;
  color: var(--text-light);
}
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 600;
  background: var(--green-pale);
  color: var(--green-dark);
}

/* ── HINTS ── */
.hint-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.hint-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: .98rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hint-card p {
  font-size: .88rem;
  color: var(--text-mid);
  line-height: 1.65;
  white-space: pre-line;
}

/* ── CALENDAR ── */
.cal-wrap { margin-top: 4px; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-mid);
}
.cal-legend-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-nav h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
}
.cal-nav-btn {
  width: 34px; height: 34px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mid);
  transition: border-color var(--t), color var(--t), background var(--t);
}
.cal-nav-btn:hover { border-color: var(--green-accent); color: var(--green-dark); background: var(--green-pale); }
.cal-nav-btn:disabled { opacity: .35; cursor: not-allowed; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 0 8px;
}
.cal-day {
  min-height: 72px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 5px 5px;
  background: var(--white);
  transition: background var(--t);
  overflow: hidden;
}
.cal-day.empty { background: transparent; border-color: transparent; }
.cal-day.today { border-color: var(--green-accent); background: var(--green-pale); }
.cal-day.has-events { background: var(--white); }
.day-num {
  font-family: 'Outfit', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-light);
  display: block;
  margin-bottom: 4px;
}
.cal-day.today .day-num { color: var(--green-dark); }
.day-badges {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.day-badge {
  display: block;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* ── FOOTER ── */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 22px 24px;
  font-size: .78rem;
  margin-top: 48px;
}
footer a { color: var(--green-accent); text-decoration: none; }
footer p + p { margin-top: 5px; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .header-inner { padding: 18px 16px; }
  .live-badge { display: none; }
  .nav-inner { padding: 0 8px; }
  .tab-btn { padding: 13px 10px; font-size: .78rem; gap: 5px; }
  main { padding: 20px 16px 36px; }
  .card { padding: 18px 16px; }
  .waste-grid { grid-template-columns: 1fr; }
  .step-text { display: none; }
  .cal-day { min-height: 54px; padding: 4px 3px 3px; }
  .day-badge { font-size: .6rem; padding: 1px 3px; }
  .day-num { font-size: .75rem; }
  .cal-legend-item { font-size: .72rem; }
}
