/*
Podstawowy plik stylów CSS dla systemu zapisów
*/

body {
  font-family: 'Poppins', Arial, sans-serif;
  background: #fff;
  color: #222;
  margin: 0;
}

/* Stary styl header usunięty – zastąpiony przez .app-header */

/* Styl dla linków */
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: #0056b3;
}

/* Styl dla przycisków */
button, input[type="submit"] {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  padding: 8px 18px;
  cursor: pointer;
}

button:hover, input[type="submit"]:hover {
  background: #0056b3;
}

/* Styl dla formularzy */
form {
  margin: 20px 0;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1em;
  color: #222;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 8px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #007bff;
  outline: none;
}

/* Styl dla tabel */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 1em;
}

th,
td {
  border: 1px solid #dee2e6;
  padding: 4px;
  text-align: left;
}

th {
  background: #f2f2f2;
  color: #222;
}

/* Styl dla komunikatów o błędach i sukcesach */
.error {
  color: #dc3545;
  font-weight: bold;
}

.success {
  color: #28a745;
  font-weight: bold;
}

.main-content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===================== UTILITIES (bez inline style) ===================== */
.container-center { margin: 0 auto; }
.pad-y-2 { padding: 2em 0; }
.text-center { text-align: center; }
.muted { color: #555; }
.fs-15 { font-size: 1.5em; }
.fs-12 { font-size: 1.2em; }
.fs-085 { font-size: 0.85em; }
.mb-1 { margin-bottom: 1em; }
.mb-2 { margin-bottom: 2em; }
.mt-1-5 { margin-top: 1.5em; }
.icon-50 { width: 50px; height: 50px; }

/* Poprawka dla przycisków w nagłówku */
.header13 .nav-buttons {
  margin-top: 8px;
  margin-right: 16px;
}

.admin-form-inline {
  display: inline-block;
}

.admin-form-flex {
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-btn {
  margin-left: 8px;
}

.admin-input-small {
  width: 120px;
}

.admin-input-medium {
  width: 180px;
}

.admin-child-row {
  margin-bottom: 8px;
}

/* Poprawki dla tabeli nauczycieli */
table.admin-table {
  width: 90%;
  max-width: 1200px;
  border-collapse: collapse;
  margin: 0 auto;
}

table.admin-table td,
table.admin-table th {
  padding: 4px;
  vertical-align: middle;
}

table.admin-table input[type="text"],
table.admin-table input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  min-width: 120px;
}

/* --- Przyciski zapisów / wypisów --- */
.btn-zapis, .btn-wypis {
  font-weight: 600;
  letter-spacing: .3px;
  transition: background .18s, box-shadow .18s, transform .1s;
  display: inline-block;
  min-width: 130px;
  text-align: center;
}

.btn-zapis {
  background: linear-gradient(135deg,#1e9d34,#138d46);
  box-shadow: 0 2px 4px rgba(20,130,50,.25);
}
.btn-zapis:hover {
  background: linear-gradient(135deg,#26b03f,#169d52);
  box-shadow: 0 3px 6px rgba(20,130,50,.35);
}
.btn-zapis:active {
  transform: translateY(1px);
}

.btn-wypis {
  background: linear-gradient(135deg,#c62828,#b71c1c);
  box-shadow: 0 2px 4px rgba(150,20,20,.25);
}
.btn-wypis:hover {
  background: linear-gradient(135deg,#e53935,#d32f2f);
  box-shadow: 0 3px 6px rgba(150,20,20,.35);
}
.btn-wypis:active {
  transform: translateY(1px);
}

/* Stan nieaktywny lub brak tokenów */
.btn-zapis[disabled], .btn-wypis[disabled] {
  filter: grayscale(.4) brightness(.9);
  cursor: not-allowed;
  box-shadow: none;
}

/* Kolorowe utility */
.text-red { color:#c62828; font-weight:600; }
.text-gray { color:#666; }

/* Komunikaty (informacje / alerty dla użytkownika) */
.komunikat {
  margin: 20px 0;
  padding: 12px 18px 12px 46px;
  border: 1px solid #b3d8ff;
  background: linear-gradient(180deg,#eef7ff 0%, #e2f1ff 100%);
  color: #0b496f;
  border-radius: 8px;
  font-weight: 500;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 2px 4px rgba(0,0,0,.06);
  overflow-wrap: anywhere;
}
.komunikat:before {
  content: 'ℹ';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  line-height: 1;
  color: #0a6dad;
  font-weight: 600;
}
.komunikat--success {
  border-color: #b4e2c5;
  background: linear-gradient(180deg,#ecfff4 0%, #e1faed 100%);
  color: #1b5e38;
}
.komunikat--success:before { content: '✔'; color:#1e7c49; }
.komunikat--error {
  border-color: #f4c7c7;
  background: linear-gradient(180deg,#fff2f2 0%, #ffe6e6 100%);
  color: #7d1f1f;
}
.komunikat--error:before { content: '✖'; color:#b62525; }
.komunikat--warn {
  border-color: #f3dfb2;
  background: linear-gradient(180deg,#fff9e9 0%, #fff1cf 100%);
  color: #6b4b00;
}
.komunikat--warn:before { content: '⚠'; color:#b57900; }
.komunikat a { color:#0a6dad; font-weight:600; }
.komunikat a:hover { text-decoration: underline; }

/* Kontener na wiele komunikatów */
.flash-wrapper { max-width: 1000px; margin: 0 auto; }

/* Tabela kółek */
table.tabela_kolka {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 32px;
  font-size: 0.92rem;
  table-layout: auto;
}
table.tabela_kolka th, table.tabela_kolka td {
  padding: 4px 6px;
  border: 1px solid #d9e2e8;
  vertical-align: middle;
  text-align: center;
  line-height: 1.25;
}
table.tabela_kolka th {
  background: linear-gradient(#f5f8fa,#eef2f5);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  color:#44535c;
}
table.tabela_kolka td:nth-child(2), table.tabela_kolka th:nth-child(2) {
  text-align: left;
  font-weight: 500;
}
table.tabela_kolka tr:nth-child(even) td { background:#fafbfd; }
table.tabela_kolka tr:hover td { background:#f0f6ff; }
table.tabela_kolka td { white-space: nowrap; }
table.tabela_kolka td:nth-child(2) { white-space: normal; }

/* Specyficzne pole opisu w panelu – pełna szerokość komórki */
textarea.opis-field {
  display:block;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  resize:vertical;
  min-height:260px;
  font-family:inherit;
  line-height:1.35;
}

/* ===================== WSPÓLNY NAGŁÓWEK ===================== */
.app-header { 
  width:100%;
  background:#f8f9fa;
  border-bottom:1px solid #ddd;
  margin:0 0 20px 0;
  box-sizing:border-box;
}
.app-header__inner {
  max-width:1400px;
  margin:0 auto;
  padding:12px 30px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:32px;
}
.app-header__logo img {
  display:block;
  height:56px;
  width:auto;
}
.app-header__nav { 
  display:flex;
  align-items:center;
  gap:28px;
}
.app-header__link { 
  color:#0d47a1;
  text-decoration:none;
  font-weight:500;
  font-size:15px;
  line-height:1;
  position:relative;
  padding:6px 4px;
}
.app-header__link:hover, .app-header__link:focus-visible { 
  color:#08306b;
  outline:none;
}
.app-header__link img { 
  height:28px; width:auto; display:block;
}
@media (max-width: 700px) {
  .app-header__inner { flex-wrap:wrap; padding:10px 18px; }
  .app-header__nav { gap:16px; }
  .app-header__logo img { height:48px; }
}

/* ===================== HORYZONTALNE MENU PANELI ===================== */
.panel-menu { margin:18px 0 8px; padding:0; }
.panel-menu__list { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:4px 14px; align-items:center; }
.panel-menu__item { position:relative; }
.panel-menu__link { text-decoration:none; font-weight:500; color:#1a2840; padding:6px 10px 8px; border-radius:6px; display:block; line-height:1.1; transition:background .15s, color .15s; }
.panel-menu__link:hover, .panel-menu__link:focus-visible { background:#e9f2ff; outline:none; color:#0d4a92; }
.panel-menu__item--active .panel-menu__link { background:#0d4a92; color:#fff; box-shadow:0 2px 6px rgba(0,0,0,.18); }
.panel-menu__divider { color:#999; user-select:none; }
@media (max-width:780px){
  .panel-menu__list { gap:4px 8px; }
  .panel-menu__link { padding:6px 8px; font-size:14px; }
}
