/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BODY */
body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f9;
  color: #333;
  padding: 25px;
  line-height: 1.5;
}

/* HEADER */
header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  font-size: 36px;
  font-weight: bold;
  color: #1f3a5f;
}

.subtitle {
  color: #666;
  margin-top: 8px;
}

/* GŁÓWNY KONTENER */
.container {
  max-width: 1300px;
  margin: 0 auto;
}

/* KARTY */
.card,
#summary,
.month,
.info {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* FORMULARZ */
label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  font-weight: bold;
}

input,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  font-size: 15px;
}

/* PRZYCISKI */
button {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: #1f3a5f;
  color: white;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background: #274c7d;
}

/* STAN SUKCESU PRZYCISKU */
button.btn-success {
  background: #16a34a !important;
  transform: scale(1.02);
}

/* PODSUMOWANIE I LEGENDA */
#summary {
  margin-top: 25px;
}

#summary h2 {
  margin-bottom: 15px;
  color: #1f3a5f;
}

.legend-box {
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #e2e8f0;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

#summary hr {
  margin: 15px 0;
  border: none;
  border-top: 1px solid #ddd;
}

/* KALENDARZ */
#calendarContainer {
  margin-top: 25px;
}

.month {
  margin-bottom: 30px;
}

.month h2 {
  margin-bottom: 20px;
  color: #1f3a5f;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}

.weekdays div {
  text-align: center;
  font-weight: bold;
  padding: 8px;
}

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

.day {
  min-height: 80px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  padding: 6px;
}

.day div:first-child {
  font-size: 16px;
}

.day div:last-child {
  margin-top: 5px;
  font-size: 20px;
}

.empty {
  background: transparent;
}

/* KOLORYSTYKA ZMIAN */
.rano {
  background: #22c55e;
}

.nocka {
  background: #3b82f6;
}

.pop {
  background: #f59e0b;
}

.wolne {
  background: #9ca3af;
}

.swieto {
  background: #dc2626;
}

/* SEKCJA INFO */
.info {
  margin-top: 30px;
}

.info h2 {
  margin-bottom: 15px;
}

.info p {
  margin-bottom: 10px;
}

.info ul {
  margin-left: 20px;
  margin-top: 10px;
}

.info li {
  margin-bottom: 6px;
}

/* FOOTER */
footer {
  text-align: center;
  margin-top: 40px;
  color: #666;
  padding-bottom: 20px;
}

footer nav {
  margin-top: 10px;
}

footer a {
  color: #1f3a5f;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .logo {
    font-size: 28px;
  }

  .calendar {
    gap: 4px;
  }

  .day {
    min-height: 60px;
  }

  .day div:first-child {
    font-size: 14px;
  }

  .day div:last-child {
    font-size: 16px;
  }
}

/* WYDRUK */
@media print {
  body {
    background: white;
    padding: 0;
  }

  .card button,
  .info,
  footer {
    display: none;
  }

  .card,
  .month {
    box-shadow: none;
    break-inside: avoid;
  }
}
/* DOLNE PRZYCISKI AKCJI */
.bottom-actions {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-secondary {
  background: #64748b;
}

.btn-secondary:hover {
  background: #475569;
}

.btn-calendar {
  background: #7c3aed;
}

.btn-calendar:hover {
  background: #6d28d9;
}

/* TABELA PODSUMOWANIA MIESIĘCZNEGO */
.table-container {
  overflow-x: auto;
  margin-top: 10px;
}

.monthly-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.monthly-table th,
.monthly-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.monthly-table th {
  background: #f1f5f9;
  color: #1f3a5f;
  font-weight: bold;
}

.monthly-table tr:hover {
  background: #f8fafc;
}

@media (max-width: 600px) {
  .monthly-table {
    font-size: 12px;
  }
  .monthly-table th, 
  .monthly-table td {
    padding: 8px 6px;
  }
  .shifts-col {
    display: none;
  }
}



