/* ===================== GLOBALNE USTAWIENIA ===================== */
:root {
  --font-base: clamp(0.9rem, 1vw + 0.5rem, 1.1rem);
  --font-title: clamp(1.2rem, 2vw + 0.5rem, 1.8rem);
  --container-max-width: 400px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ===================== KONTEKST LOGOWANIA ===================== */
.login-container {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: var(--container-max-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.8s ease;
}

.login-container h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  color: #333;
  font-size: var(--font-title);
  width: 100%;
}

.form-group {
  width: 100%;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-group label {
  margin-bottom: 0.5rem;
  color: #555;
  width: 100%;
  text-align: left;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  font-size: var(--font-base);
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #4facfe;
  outline: none;
}

.extra-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  width: 100%;
}

.extra-options label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Przycisk */
.btn {
  width: 100%;
  padding: 0.75rem;
  background: #4facfe;
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  font-size: var(--font-base);
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #00c6ff;
}

/* ===================== DASHBOARD / PANEL OCEN ===================== */
body.dashboard {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

body.dashboard .login-container {
  width: 90%;
  max-width: 900px;
  padding: 2rem;
}

.filter-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-group label,
.filter-group select,
.filter-group input,
.filter-group button {
  font-size: var(--font-base);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #ddd;
}

th {
  background: #4facfe;
  color: #fff;
}

tbody tr:nth-child(even) {
  background: #f5f5f5;
}

.oceny {
  font-weight: bold;
}

.srednia {
  text-align: center;
}

/* ===================== ANIMACJE ===================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== RESPONSYWNOŚĆ ===================== */
@media (max-width: 900px) {
  body.dashboard .login-container {
    padding: 1rem 1.5rem;
    width: 95%;
    max-width: 100%;
    margin: 1rem auto;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .filter-group label,
  .filter-group select,
  .filter-group input,
  .filter-group button {
    width: 100%;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th, td {
    padding: 0.6rem 0.8rem;
  }

  tbody tr {
    display: table-row;
    border: none;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 500px) {
  .login-container {
    padding: 1.5rem;
  }

  .btn {
    font-size: 0.9rem;
  }
}
