body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f6fa;
}
* {
  box-sizing: border-box;
}
/* layout */
.container {
  display: flex;
  min-height: 100vh;
}

/* MENU */
.menu {
  width: 240px;
  background: #2f3640;
  color: #fff;
  padding: 20px;
}

.menu h3 {
  margin: 20px 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  color: #aaa;
}

.menu a {
  display: block;
  padding: 8px 10px;
  margin-bottom: 5px;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

.menu a:hover {
  background: #40739e;
}

/* logout */
.menu .logout {
  margin-top: 20px;
  color: #ff6b6b;
}

/* CONTENT */
.content {
  flex: 1;
  padding: 30px;
  background: #fff;
}

/* nagłówki */
h1 {
  margin-top: 0;
}

p {
  font-size: 0.9em;
  background-color: bisque;
  padding: 10px;
  border-radius: 10px;
  margin: 1px;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th {
  text-align: left;
  padding: 10px;
  background: #2f3640;
  color: #fff;
}

/* hover */
tr:hover {
  background: #f1f2f6;
}

/* ===== STATUS ===== */

.status-3 td {
  background: #ffcccc; /* admin */
}

.status-2 td {
  background: #cce0ff; /* nauczyciel */
}

.status-1 td {
  background: #ccffcc; /* uczeń */
}

/* ===== GRUPA ===== */

.grupa-1 td:first-child {
  border-left: 6px solid #0984e3; /* Testy */
}

.grupa-2 td:first-child {
  border-left: 6px solid #00b894; /* System */
}

.grupa-3 td:first-child {
  border-left: 6px solid #e1b12c; /* Analiza */
}

/* ===== HOVER ===== */

tr:hover td {
  filter: brightness(0.9);
}

/* ===== GRUPA - kolor całej komórki ===== */

td.grupa-1 {
  background: #0984e3;
  color: #fff;
  font-weight: bold;
  text-align: center;
}

td.grupa-2 {
  background: #00b894;
  color: #fff;
  font-weight: bold;
  text-align: center;
}

td.grupa-3 {
  background: #fbc531;
  color: #000;
  font-weight: bold;
  text-align: center;
}

/* =========================================
   PYTANIA / ODPOWIEDZI (UX)
========================================= */

/* aktywne pytanie */
tr.aktywne td {
  background: #eaf3ff;
  border-left: 4px solid #0984e3;
}

/* blok odpowiedzi */
.odp {
  background: #f8f9fa;
  padding: 6px 8px;
  margin: 5px 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* hover odpowiedzi */
.odp:hover {
  background: #eaf3ff;
}

/* input odpowiedzi */
.odp input[type="text"] {
  width: 250px;
}

/* checkbox poprawnej */
.odp input[type="checkbox"] {
  transform: scale(1.1);
}

/* zaznaczona odpowiedź */
.odp input[type="checkbox"]:checked {
  accent-color: green;
}

/* textarea pytania */
textarea {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #ccc;
  padding: 6px;
}

/* select */
select {
  padding: 4px;
  border-radius: 4px;
}

/* przyciski */
button {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #aaa;
  background: #eee;
  cursor: pointer;
}

/* hover */
button:hover {
  background: #ddd;
}

/* zielony zapis */
button[name*="zapisz"],
.btn-edycja {
  background: #27ae60;
  color: #fff;
  border: none;
}
.btn-edycja {
  background: #4161ca !important;
}
.btn-edycja:hover {
  background: #6f80b9;
}
/* czerwone usuń */
button[name*="usun"] {
  background: #e74c3c;
  color: #fff;
  border: none;
}

#pytanie {
  background-color: rgb(233, 171, 95);
  padding: 10px;
  border-radius: 7px;
}

#pytanie > .odpowiedzi {
  background-color: bisque;
  padding: 10px;
}
#pytanie > .odpowiedzi:first-of-type {
  border-radius: 7px 7px 0 0;
}
#pytanie > .odpowiedzi:last-of-type {
  border-radius: 0 0 7px 7px;
}

.odpowiedz-dodatkowa {
  padding: 10px;
}
#pytanie textarea {
  width: 100%;
}
.akcje {
  display: flex;
  padding: 10px;
}
.akcje-lewo {
  flex: 1;
  text-align: left;
  padding-left: 10px;
}
.akcje-prawo {
  flex: 1;
  text-align: right;
  padding-right: 10px;
}

/* tworzenie testy.php */
.panel-testy {
  max-width: 1100px;
  margin: 0 auto;
  font-family: Arial;
}

.box {
  background: #ffffff;
  border: 1px solid #666;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.box h2 {
  margin-top: 0;
  font-size: 18px;
}
.edycja {
  background: #516ecc !important;
}
.nowy {
  background: #41ca48 !important;
}
/* formularze */
input:not([type="checkbox"]):not([type="radio"]) {
  padding: 5px;
  margin-top: 3px;
  margin-bottom: 10px;
  width: 250px;
}

button {
  padding: 6px 10px;
  cursor: pointer;
}

/* tabela */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #2f3640;
  color: white;
  padding: 8px;
  text-align: center;
}

td {
  padding: 8px;
  border-bottom: 1px solid #666;
}

tr:hover {
  background: #f5f6fa;
}

/* przycisk usuń */
button[name="usun"] {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 4px;
}

button[name="usun"]:hover {
  background: #c0392b;
}

/* import */
.box table form {
  display: flex;
  gap: 5px;
  justify-content: center;
}
.pytania-do-testu a {
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  display: block;
  width: 100%;
  color: brown;
}
.btn-on {
  background: #16a34a;
  color: white;
}

.btn-off {
  background: #dc2626;
  color: white;
}

/* podgląd pytań */

.podglad-tresc {
  padding: 6px;
  background: #f5f5f5;
  border-radius: 5px;
  margin-bottom: 5px;
}
.pytanie-box {
  padding: 8px;
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  border-radius: 5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.odp {
  margin: 5px 0;
  padding: 6px;
  background: #fafafa;
  border-left: 3px solid #ccc;
  border-radius: 4px;
}

.odp-ok {
  border-left: 4px solid #4caf50;
  background: #e8f5e9;
}
.typ {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
  width: 100%;
  display: block;
}

.typ-jedno {
  background: #2196f3;
}

.typ-wielo {
  background: #ff9800;
}

.typ-otwarte {
  background: #9c27b0;
}

.odp-nowa {
  border-left: 4px dashed #999;
  background: #f0f0f0;
}
