﻿﻿﻿﻿/* --- JEDNOLITE STYLE (PLANER HARMONOGRAMU) --- */

: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; }

/* JEDNOLITE TŁO */
body {
  margin: 0;
  background: linear-gradient(180deg, #0f172a 0%, #f1f5f9 65%, #fff 100%);
  color: #e2e8f0;
  min-height: 100vh;
  line-height: 1.6;
}

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

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

/* JEDNOLITY HEADER I STOPKA */
.page-header .container {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  flex-wrap: wrap;
}
.page-footer .container {
  display: flex;
  gap: 8px; 
  align-items: center;
  justify-content: center; /* Wyśrodkowanie w poziomie */
  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; }

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

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

/* JEDNOLITY BIAŁY PODTYTUŁ */
.intro p {
  margin: 0;
  color: #e2e8f0;
}

/* UJEDNOLICONE KARTY */
.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);
  color: var(--bg);
  margin-bottom: 28px; /* Dodane dla spójnego odstępu między kartami w Content */
}

h2 {
    color: #fff; /* Nagłówki dziedziczą kolor po rodzicu */
}
.card h2 { margin-top: 0; }

/* UJEDNOLICONE LABELE I INPUTY */

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: inherit; /* Etykiety dziedziczą kolor po rodzicu */
}

input,
textarea,
select {
  padding: 12px;
  border-radius: 12px;
  border:1px solid rgba(148,163,184,0.25);
  font: inherit;
  background: #fff;
  color: var(--bg);
}

/* UJEDNOLICONE PRZYCISKI */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn {
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn,
.btn-secondary { background: #e2e8f0; color: var(--bg); }
.btn-primary,
.btn-primary.success { background: var(--accent); color: #fff; }
.btn-primary.success { background: #10b981; } /* override dla sukcesu */

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


/* JEDNOLITY TEKST W STOPCE */
.footer-text {
    line-height: 1.4;
    color: #f1f5f9;
}

/* JEDNOLITY PRZYCISK W STOPCE */
.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);
}
/* --- KONIEC JEDNOLITYCH STYLÓW --- */


/* --- UNIKALNE STYLE RAPORTY DZIENNE (LAYOUT I TABELE) --- */

/* Dostosowanie układu do sidebar'u i content'u */
.main-content-area {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  margin-top: 36px;
}

.grid-3 {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

.sidebar {
    /* Usunięto style z poprzedniej odpowiedzi, ponieważ teraz ma klasę .card */
}

/* Tytuł w sidebarze musi być ciemny, jeśli jest w białej karcie */
.sidebar h3 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 18px;
}

.sidebar .days { 
  list-style: none; 
  margin: 0 0 16px; 
  padding: 0; 
}
.sidebar .days li { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 6px 10px; 
  border: 1px solid var(--border); 
  border-radius: 10px; 
  margin-bottom: 8px; 
  background: #f8fafc;
  color: var(--bg);
  cursor: pointer; /* Dodanie kursora */
}
.sidebar .days li.active { outline: 2px solid var(--accent); border: 1px solid var(--accent); }
.sidebar .days button { border: 0; background: transparent; color: var(--accent); cursor: pointer; font-weight: 600; }

.data-table, .sum-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-table th, .sum-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em; 
  color: var(--muted);
  padding: 12px 8px 10px 0;
  border-bottom: 1px solid var(--border);
}

.data-table td, .sum-table td {
  padding: 10px 8px 10px 0;
  border-bottom: 1px solid rgba(148,163,184,0.15);
}

.data-table tr:last-child td, .sum-table tr:last-child td {
  border-bottom: none;
}

.data-table .delete-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 18px; 
  cursor: pointer;
}

.sum-table tr td:last-child { font-weight: 700; color: var(--accent); }

.flex-between { display:flex; align-items:center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chart-controls { display: flex; gap: 8px; }
/* Kontener wykresu - DODAJ TO DO CSS */
.chart-container {
  position: relative;
  height: 320px; /* Stała wysokość zapobiega "wypychaniu" treści */
  margin: 20px 0;
}

#chart {
  max-height: 320px;
}
.footer-actions { 
  display:flex; 
  gap:12px; 
  flex-wrap:wrap; 
  justify-content:center; 
  margin: 0 0 36px; 
}

.hidden { display:none; }

/* --- RESPONSYWNOŚĆ --- */

@media (max-width: 900px) {
  /* Zmiana układu na mobile: sidebar nad treścią */
  .main-content-area {
    grid-template-columns: 1fr;
  }
  .sidebar { 
    margin-bottom: 24px;
    padding: 28px;
    background: var(--bg); /* Dajemy sidebar ciemne tło */
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  }
  .sidebar .days li { background: rgba(255,255,255,0.05); color: #e2e8f0; }
  .sidebar { color: #e2e8f0; } /* Na mobile cały sidebar ma jasny tekst */
  .sidebar .days li.active { outline: 2px solid var(--accent); border: 1px solid var(--accent); }
  
  .intro { margin-top: 36px; }
  
  .data-table, .sum-table { overflow-x: auto; display: block; white-space: nowrap; }
  .data-table, .sum-table { font-size: 14px; }
  
  .grid-3 { grid-template-columns: 1fr; }
  .grid-3 > div { grid-column: span 1 !important; }
  .grid-3 .actions { grid-column: span 1 !important; }
  
  .page-header .container {
    justify-content: center;
    text-align: center;
  }
  .breadcrumbs { display: none; }
  
  /* Wyśrodkowanie w stopce na mobile */
  .page-footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px; 
  }
  .btn-buy-coffee {
    width: 100%;
    margin-top: 0;
  }
  .desktop-only {
    display: none;
  }
}