


/* ====== STRUKTURA PANELU ====== */

/* Kontener główny panelu */
.admin-panel-container {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  font-family: 'Inter', sans-serif;
  background-color: #f8f9fb;
  margin-top: 80px; /* Adjust this value to match the height of the main header bar */
}

/* Lewa kolumna: lista użytkowników, menu */
.admin-sidebar {
  width: 280px;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Prawa kolumna: szczegóły użytkownika */
.admin-content {
  flex: 1;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ====== TYPOGRAFIA I NAGŁÓWKI ====== */

.panel-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.label {
  font-weight: 500;
  margin-top: 0.5rem;
  margin-bottom: 0.3rem;
  display: block;
  color: #333;
}

/* ====== INPUTY, BUTTONY, FORMULARZE ====== */

.input-field,
.select-field {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.checkbox-field {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.button-primary {
  background-color: #366eff;
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s;
}

.button-primary:hover {
  background-color: #1e50d4;
}

.button-secondary {
  background-color: #e6e6e6;
  color: #333;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.button-secondary:hover {
  background-color: #d4d4d4;
}

/* ====== TABELA UŻYTKOWNIKÓW ====== */

.user-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.user-table th,
.user-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.user-table tr:hover {
  background-color: #f2f2f2;
  cursor: pointer;
}

.user-table tr.active {
  background-color: #e7f0ff;
}

/* ====== KARTY, ZAKŁADKI, MODUŁY ====== */

.tab-nav {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 1rem;
}

.tab-nav .tab {
  padding: 0.5rem 1rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.tab-nav .tab.active {
  border-color: #366eff;
  color: #366eff;
}

/* Sekcja z checkboxami dla modułów */
.module-checkbox-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ====== LOADER ====== */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(248, 249, 251, 0.75); /* matches .admin-panel-container bg with opacity */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader {
  border: 4px solid #e6e6e6;
  border-top: 4px solid #366eff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-text {
  margin-top: 1rem;
  font-size: 1rem;
  color: #333;
  font-weight: 500;
}