/* GŁÓWNE STYLE PLANURIO */
.grafik-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}
.shift-table{
    float:left!important;
    margin:15px;
    background:white;
}
.shift-tables{
    margin:30px auto;!important
}
.grafik-table th,
.grafik-table td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  text-align: center;
}

.grafik-table thead {
  background-color: #f0f4f8;
  color: #003366;
  font-weight: bold;
}

.shift-r {
  background-color: #cde3ff;
  color: #01408a;
  font-weight: bold;
}

.shift-p {
  background-color: #d6ffd8;
  color: #1d7a1d;
  font-weight: bold;
}

.transfer-from {
  border: 2px dashed #f00;
}

.transfer-to {
  border: 2px dashed #28a745;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to right, #e3f2fd, #ffffff);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}
.day-block{
    padding-right:25px;
    padding-left:25px;
    display:grid;
    text-align:center;
}
.tooltip{
    text-align:left!important;
}

h1 {
  text-align: center;
  margin: 30px 0 20px;
  color: #003366;
  font-size: 2.2rem;
  font-weight: 600;
}

h2 {
  text-align: center;
  font-size: 1.6rem;
  color: #003366;
  margin: 20px 0 10px;
  font-weight: 500;
}

h3 {
  font-size: 1.3rem;
  color: #003366;
  margin: 20px 0 10px;
}

p {
  font-size: 15px;
  color: #444;
  margin: 0 0 1em;
}

ul {
  margin: 0 0 1em;
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
}

/* NAWIGACJA */
nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: #003366;
  padding: 1em 2em;
  display: flex;
  gap: 1.5em;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.3s;
}

nav a:hover {
  color: #ffc107;
}

nav a.active {
  text-decoration: underline;
}

nav .right {
  margin-left: auto;
  display: flex;
  gap: 1em;
  align-items: center;
}

nav .logout {
  color: #ffc107;
}

/* MEGA MENU */
.mega-menu {
  position: relative;
  display: inline-block;
}

.mega-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 240px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 10px;
  border-radius: 8px;
  z-index: 1000;
}

.mega-content a {
  display: block;
  padding: 10px;
  color: #003366;
  text-decoration: none;
  font-weight: 500;
}

.mega-content a:hover {
  background-color: #f1f5fb;
  border-radius: 4px;
}

.mega-menu:hover .mega-content {
  display: block;
}

/* BLOKI */
.block {
  max-width: 1400px;
  margin: 30px auto;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* INPUTY I PRZYCISKI */
input[type="file"],
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  font-size: 15px;
  padding: 10px 14px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  transition: border 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

button {
  padding: 12px 20px;
  font-size: 15px;
  background-color: #003366;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}

button:hover {
  background-color: #0056b3;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* TABELA */
table.yearly-stats-table, .grafik-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

table th {
  background-color: #003366;
  color: white;
  padding: 14px;
  text-align: center;
  font-weight: bold;
}

table td {
  padding: 12px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
  color: #333;
}

table tr:hover {
  background-color: #f5f9ff;
}

table td strong {
  color: #007bff;
  font-weight: 600;
}

/* ZMIANY GLOVO */
.shift-r { background-color: #d2f4dc; font-weight: bold; color: #1a4d2e; }
.shift-p { background-color: #ffe8cc; font-weight: bold; color: #8a5200; }
.transfer-from::before { content: "\1F31F Oddany"; color: red; display: block; font-size: 0.8em; }
.transfer-to::before { content: "\267B Przejęty"; color: green; display: block; font-size: 0.8em; }

/* WIADOMOŚCI SYSTEMOWE */
.form-row {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.msg {
  font-size: 14px;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* STOPKA */
footer {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #555;
}

footer a {
  color: #007bff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 600px) {
  nav { flex-wrap: wrap; gap: 0.8em; }
  .block { margin: 20px 10px; padding: 20px; }
  .chart-box { margin: 20px auto; padding: 15px; width: auto !important; }
  .button-group { flex-direction: column; gap: 8px; }
  .shift-tables { flex-direction: column; }
  h1, h2 { font-size: 1.5rem; }
}

/* DRUK */
@media print {
  nav, .history-controls, button, .legend, .logout {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .print-hidden {
    display: none !important;
  }
}
@media print {
  .sum-column {
    display: none !important;
  }

  .grafik-table thead tr:first-child th,
  .grafik-table thead tr:nth-child(2) th {
    font-weight: bold;
    border-bottom: 2px solid black;
  }

  .grafik-table thead tr:nth-child(2) th {
    border-bottom: 3px solid black;
  }

  nav, .history-controls, .block, .right {
    display: none !important;
  }

  .print-only {
    display: block !important;
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 12px;
  }

  .print-only ul {
    list-style-type: none;
    padding-left: 0;
  }

  .print-only li {
    margin-bottom: 4px;
  }

  body {
    margin: 0;
    font-size: 11pt;
  }
}

@media screen {
  .print-only {
    display: none;
  }
}