/* ============================
   GLOBALNE STYLE
============================ */

html, body {
  margin: 0;
  padding: 0;
  height: auto;
  min-height: 100%;
  background: #f4f4f4;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  color: #222;
  line-height: 1.5;
}

/* ============================
   WSPÓLNE KONTENERY
============================ */

.container {
  width: 100%;
  max-width: 900px;
  margin: 25px auto;
  padding: 0 15px 40px;
  box-sizing: border-box;
}

/* Podstrony które mają być centrowane (np. login) 
   → dodawaj po prostu <body class="center-page"> */
.center-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ============================
   NAGŁÓWKI
============================ */

h1, h2, h3, h4 {
  margin: 0 0 15px;
  font-weight: bold;
}

h2 {
  text-align: center;
  margin-bottom: 25px;
}

/* ============================
   FORMULARZE
============================ */

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 15px;
  box-sizing: border-box;
}

/* ============================
   PRZYCISKI
============================ */

button, .btn {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s;
}

button:hover, .btn:hover {
  background-color: #005dc1;
}

/* Przycisk pomocniczy mniejszy */
.btn-small {
  width: auto;
  padding: 6px 14px;
  border-radius: 6px;
  background: #007bff;
}

.button-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

/* ============================
   KARTY (treningi + statystyki)
============================ */

.card {
  width: 100%;
  margin: 20px auto;
  background: #fff;
  border-radius: 12px;
  padding: 18px 22px;
  border: 1px solid #ddd;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  box-sizing: border-box;
}

/* Nagłówek karty treningu */
.training-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-weight: bold;
  margin-bottom: 8px;
}

.training-meta {
  font-size: 0.9em;
  opacity: 0.8;
  margin-bottom: 10px;
}

.stage {
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.stage:first-child {
  border-top: none;
}

.stage h4 {
  margin-bottom: 6px;
}

/* ============================
   TABELKI (np. statystyki)
============================ */

.stats-section {
  margin-bottom: 35px;
}

.section-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 15px;
}

.clean-table th {
  background: #f0f0f0;
  padding: 10px 12px;
  text-align: center;
  font-weight: bold;
  border-bottom: 2px solid #ddd;
}

.clean-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  text-align: center;
}

.clean-table tr:nth-child(even) {
  background: #fafafa;
}

/* Tabela wewnątrz kart statystyk */

.card table {
  width: 100%;
  border-collapse: collapse;
}

.card th, .card td {
  padding: 12px 16px;
  text-align: center;
}

.card th {
  font-size: 1rem;
  background: #f5f5f5;
}

.card td {
  font-size: 1.05rem;
}

/* ============================
   UKŁAD STATYSTYK (1 kolumna)
============================ */

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  width: 100%;
}

/* ============================
   WYKRESY
============================ */

.chart-wrapper,
.chart-block {
  width: 100%;
  max-width: 900px;
  margin: 15px auto;
}

.chart-controls {
  text-align: center;
  margin-bottom: 0.5em;
}

.chart-controls button {
  width: auto;
  padding: 0.3em 0.75em;
  margin: 0 0.2em;
  font-size: 0.9em;
}

.range-active {
  background-color: #0056b3;
  color: #fff;
}

/* ============================
   LINKI
============================ */

a {
  text-decoration: none;
  color: #007bff;
}

a:hover {
  text-decoration: underline;
}

/* Poprawa wyglądu wierszy statystyk */
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px;
  font-size: 1rem;          /* większa czcionka */
}

/* Etykiety po lewej */
.stat-label {
  font-weight: 600;          /* pogrubiona */
}

/* Wartości po prawej */
.stat-value {
  font-weight: 700;          /* jeszcze bardziej pogrubione */
  font-size: 1.05rem;        /* minimalnie większe */
  padding-left: 10px;        /* żeby nie kleiły się do etykiety */
  min-width: 50px;           /* wyrównuje odstępy */
  text-align: right;         /* ładne wyrównanie */
}

.back-link {
  display: inline-block;
  margin-top: 1.2rem;
  font-size: 0.95rem;
}

