﻿:root {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #0f172a;
  --accent: #f97316;
  --muted: #475569;
  --card: #ffffff;
  --border: #e2e8f0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(180deg, #0f172a 0%, #f1f5f9 65%, #fff 100%);
  color:#e2e8f0;
  min-height: 100vh;
}

.container {
  width: min(1080px, 94vw);
  margin: 0 auto;
}

.page-header,
.page-footer {
  color: #f1f5f9;
}

.page-header .container,
.page-footer .container {
  display: flex;
  /* Zmieniony odstęp na 8px */
  gap: 8px; 
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  flex-wrap: wrap;
}

.page-footer {
  background: rgba(15,23,42,0.92);
  font-size: 14px;
  text-align: center;
}

.page-footer a { color: #fbd38d; }

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  font-size: 14px;
}

.breadcrumbs a { color: #e2e8f0; text-decoration: none; }

.intro {
  margin: 64px auto 36px;
  text-align: center;
  color:#e2e8f0;
  width: min(720px, 100%);
}

.intro h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.intro p {
  margin: 0;
  color: #e2e8f0;
}

.grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 36px;
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 28px;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 24px 50px rgba(15,23,42,0.35);
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

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

input,
textarea,
select {
  padding: 12px;
  border-radius: 12px;
  border:1px solid rgba(148,163,184,0.25);
  font: inherit;
  background: rgba(15,23,42,0.9);
}

textarea { resize: vertical; }

.btn-primary,
.btn-secondary,
.btn-danger {
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-secondary { background: #e2e8f0; color:#e2e8f0; }
.btn-danger { background: #fee2e2; color: #b91c1c; }

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover { transform: translateY(-2px); }

.summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 18px;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.summary-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.banner {
  padding: 12px;
  border-radius: 12px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 600;
}

.banner.hidden { display: none; }

.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hidden { display:none; }

.schedule-list {
  display: grid;
  gap: 18px;
}

.calendar { margin-top: 8px; }
.cal-header { display:flex; align-items:center; justify-content: space-between; gap:8px; margin-bottom:8px; }
.cal-header button { border:1px solid rgba(148,163,184,0.25); background: rgba(15,23,42,0.9); color:#e2e8f0; border-radius:10px; padding:6px 10px; cursor:pointer; }
.cal-title { font-weight:800; letter-spacing:0.02em; }
.cal-grid { display:grid; grid-template-columns: repeat(7, 1fr); gap:6px; }
.cal-dow { text-align:center; font-size:12px; color:var(--muted); padding:6px 0; }
.cal-cell { background: rgba(15,23,42,0.9); border:1px solid rgba(148,163,184,0.25); border-radius:12px; padding:8px; min-height:90px; display:flex; flex-direction:column; gap:6px; cursor:pointer; }
.cal-cell.other { opacity:0.5; }
.cal-cell.today { outline:2px solid var(--accent); }
.cal-cell.selected { box-shadow: 0 24px 50px rgba(15,23,42,0.35); }
.cal-cell .mini-events { font-size: 12px; line-height: 1.3; color:#e2e8f0; }
.cal-cell .mini-events div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-cell .badges { margin-top:auto; display:flex; gap:4px; flex-wrap:wrap; }
.cal-cell .badge { height:8px; width:8px; border-radius:999px; background:#cbd5e1; }
.cal-cell .badge.has { background:#f97316; }
.cal-cell .badge.today { background:#1d4ed8; }
.cal-cell .badge.selected { background:#0ea5e9; }

.cal-stations { position: relative; margin-top: 8px; }
.cal-stations .btn-secondary { padding:8px 12px; border-radius:10px; background:#e2e8f0; color:#e2e8f0; border:0; cursor:pointer; }
.dropdown { position:absolute; z-index:10; background: rgba(15,23,42,0.9); border:1px solid rgba(148,163,184,0.25); border-radius:12px; padding:8px 10px; box-shadow: 0 24px 50px rgba(15,23,42,0.35); min-width: 220px; }
.dropdown .chk { display:block; font-size:14px; margin:6px 0; }
.dropdown .chk-list { max-height: 180px; overflow:auto; }

.list-range { margin: 10px 0 16px; display:flex; gap:12px; justify-content:flex-end; align-items:center; }
.list-range select { padding:8px 12px; border:1px solid rgba(148,163,184,0.25); border-radius:10px; }

.day-group {
  border:1px solid rgba(148,163,184,0.25);
  border-radius: 16px;
  padding: 18px;
  background: #f8fafc;
}

.day-group h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.event {
  border-radius: 12px;
  padding: 14px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(15,23,42,0.08);
  display: grid;
  gap: 6px;
  position: relative;
}

.event.conflict {
  border-color: #f97316;
  box-shadow: 0 24px 50px rgba(15,23,42,0.35);
}

.event strong { font-size: 16px; }

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

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

.event button {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #ef4444;
  font-size: 20px;
  cursor: pointer;
}

.empty {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  padding: 24px;
}

/* --- STYLE DLA STOPKI --- */

.footer-text {
    line-height: 1.4;
    color: #f1f5f9;
}

.btn-buy-coffee {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  text-align: center;
  
  background: var(--accent); 
  color: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4); 
}

.btn-buy-coffee:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .summary-actions { flex-direction: column; align-items: stretch; }
  .schedule-header { flex-direction: column; align-items: stretch; }
  
  /* Poprawiona responsywność stopki */
  .page-footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* Zwiększamy odstęp na mobile, aby przyciski się nie sklejały */
    gap: 10px; 
  }
  .btn-buy-coffee {
    width: 100%;
    margin-top: 0;
  }
  .desktop-only {
    display: none;
  }
}