/* Reset podstawowy */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    /* Ładny gradient w tle: Czerń przechodząca w granat */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    height: 100vh;
    display: flex;
    background-attachment: fixed; /* Tło stoi w miejscu jak plakat, treść się przesuwa */
    background-size: cover; 
    justify-content: center;
    align-items: center;
    background-repeat: no-repeat;
    color: #333;
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); /* Cień nadający głębię */
    text-align: center;
}

h2 {
    margin-bottom: 10px;
    color: #0f2027; /* Ciemny kolor tekstu */
}

p {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9em;
    color: #333;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #203a43; /* Kolor ramki przy aktywnym polu */
    box-shadow: 0 0 5px rgba(32, 58, 67, 0.2);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #0056b3; /* Niebieski przycisk */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: #004494; /* Ciemniejszy niebieski po najechaniu */
}

.error-msg {
    background-color: #ffe6e6;
    color: #d8000c; /* Czerwony tekst błędu */
    border: 1px solid #d8000c;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.admin-body {
    /* Czerwony wpadający w czerń/brąz */
    background: linear-gradient(135deg, #8E0E00, #1F1C18);
    min-height: 100vh; /* Żeby tło zawsze było na cały ekran */
    display: block;    /* Resetujemy ustawienie flex z logowania */
    padding-bottom: 50px;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Tło stoi w miejscu jak plakat, treść się przesuwa */
    background-size: cover; 
}

/* Górny pasek */
.navbar {
    background-color: rgba(0, 0, 0, 0.5); /* Półprzezroczysty czarny */
    backdrop-filter: blur(5px); /* Efekt rozmycia */
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.nav-brand {
    font-size: 1.2em;
    font-weight: bold;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9em;
}

.nav-links a:hover {
    text-decoration: underline;
}

.btn-logout {
    background-color: #d8000c;
    padding: 5px 15px;
    border-radius: 4px;
    transition: 0.3s;
    color: white !important;
    text-decoration: none !important;
}

.btn-logout:hover {
    background-color: #a00009;
}

.btn-password {
    background-color: #007bff; /* Niebieski */
    padding: 5px 15px;
    border-radius: 4px;
    transition: 0.3s;
    color: white !important;
    text-decoration: none !important;
    margin-right: 10px;
}

.btn-password:hover {
    background-color: #0056b3;
}

.btn-instruction {
    background-color: #17a2b8; /* Teal */
    padding: 5px 15px;
    border-radius: 4px;
    transition: 0.3s;
    color: white !important;
    text-decoration: none !important;
    margin-right: 10px;
}

.btn-instruction:hover {
    background-color: #138496;
}

/* Kontener główny */
.container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Karty (sekcje) */
.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.card h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    color: #0f2027;
}

/* Formularz w linii */
.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.btn-primary {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.btn-primary:hover {
    background-color: #004494;
}

/* Wiadomości sukcesu */
.success-msg {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* Tabela */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #555;
}

.data-table tr:hover {
    background-color: #f1f1f1;
}

/* Odznaki ról */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    color: white;
    font-weight: bold;
}

.badge-blue { background-color: #0056b3; }
.badge-red { background-color: #d8000c; }


.search-body {
    /* Ten sam gradient co na stronie logowania */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    min-height: 100vh;
    display: block;
    padding-bottom: 50px;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Tło stoi w miejscu jak plakat, treść się przesuwa */
    background-size: cover; 
}





/* ===== Panel: tabela użytkowników (spójna z login/reset) ===== */

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  margin-top: 12px;
}

.data-table thead th {
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.03);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  color: #111;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 14px;
  color: #111;
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.015);
}

.data-table tbody tr:hover {
  background: rgba(0,0,0,0.03);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Email – lepsze łamanie na wąskich ekranach */
.data-table td:nth-child(3) {
  word-break: break-word;
}

/* ===== Badge (rola) ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.03);
}

.badge-blue {
  background: rgba(0, 90, 200, 0.10);
  border-color: rgba(0, 90, 200, 0.25);
  color: #084b9a;
}

.badge-red {
  background: rgba(200, 0, 0, 0.10);
  border-color: rgba(200, 0, 0, 0.25);
  color: #9a0808;
}

/* ===== Akcje w tabeli ===== */
.delete-user-form button.btn-primary {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1;
  border-radius: 10px;
}

/* (opcjonalnie) czerwony przycisk "Usuń" – jeśli chcesz odróżnić */
.btn-danger {
  background: #c51b1b;
  color: #fff;
  border: none;
}
.btn-danger:hover {
  filter: brightness(0.95);
}

/* ===== Responsywność: przewijanie tabeli na mobile ===== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
}
.table-wrap::-webkit-scrollbar {
  height: 10px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 999px;
}
