/* ========================= */
/* Reset i ogólne            */
/* ========================= */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  overflow-x: hidden;
}
body {
  background: #f5f7fa;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1f2a37;
  line-height: 1.5;
}

/* ========================= */
/* STRONA LOGOWANIA          */
/* ========================= */
body.login-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items:center;
  min-height: 100dvh;
  background:
    radial-gradient(900px 300px at 20% 10%, rgba(25,118,210,0.15), transparent 60%),
    radial-gradient(700px 250px at 80% 0%, rgba(0,198,255,0.12), transparent 60%),
    linear-gradient(135deg, #e8f0fe, #f5f7fa);
  padding: 20px;
  overflow-y: auto;
}

.logo-text {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #1976d2, #00c6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeSlideDown 0.8s ease forwards;
}

.login-card {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(25,118,210,0.18);
  width: 100%;
  max-width: 400px;
  margin: auto;
  opacity: 0;
  transform: translateY(-20px);
  animation: cardFadeIn 0.8s ease forwards;
  animation-delay: 0.2s;
}

h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: #1976d2;
  font-weight: 700;
}

label {
  display: grid;
  gap: 6px;
  margin-top: 1rem;
  font-weight: 600;
  color: #334155;
}

input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.25s ease;
}
input:hover { border-color: #90caf9; }
input:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25,118,210,.15);
  transform: scale(1.02);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.remember { display: flex; align-items: center; gap: 6px; color: #475569; }
.forgot { color: #1976d2; text-decoration: none; font-weight: 500; }
.forgot:hover { text-decoration: underline; }

/* Przyciski tylko na stronie logowania */
body.login-page button {
  margin-top: 1.2rem;
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(135deg, #1976d2, #00c6ff);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}
body.login-page button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px rgba(25,118,210,.3);
}
body.login-page button:active { transform: scale(0.98); opacity: 0.9; }

.error { color: #ef4444; text-align: center; margin-bottom: 0.8rem; font-weight: 600; }

.links { text-align: center; margin-top: 0.8rem; font-size: 0.9rem; color: #64748b; }
.links a { color: #1976d2; }
.links a:hover { text-decoration: underline; }

.spinner { display: none; text-align: center; margin-top: 18px; }
.spinner div {
  width: 42px; height: 42px;
  border: 4px solid #1976d2;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}
.spinner p { color: #334155; font-weight: 600; }

.login-footer {
  margin-top: 1rem;
  text-align: center;
  color: #334155;
  font-size: 0.85rem;
  position: relative;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 0.6s;
}
@media (min-width: 768px) and (min-height: 700px) {
  .login-footer { position: fixed; bottom: 10px; left: 0; right: 0; }
}

/* ========================= */
/* PANEL ADMINA              */
/* ========================= */
body.admin-page {
  display: flex;
  min-height: 100vh;
}

.admin-layout {
  display: flex;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: #1e293b;
  color: #fff;
  padding: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.sidebar .logo-text {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #60a5fa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar h4 { margin-top: 1rem; font-size: 1rem; color: #cbd5e1; }
.sidebar .nav-link {
  display: block;
  padding: 8px 0;
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.2s ease;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #38bdf8;
  font-weight: 600;
}

/* Mobile sidebar */
@media (max-width: 768px) {
  .sidebar { 
    position: fixed; 
    top: 0; left: 0; 
    height: 100%; 
    transform: translateX(-100%); 
    z-index: 999; 
  }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
}

/* Main content */
.main-content {
  flex: 1;
  padding: 20px;
  margin-left: 240px;
  animation: fadeIn 0.5s ease;
}

/* Cards / hover */
.hover-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(25,118,210,0.2);
}

/* Tables */
.table-hover tbody tr:hover {
  background-color: #f0f8ff;
  transition: background 0.2s ease;
}

/* ========================= */
/* Animacje                  */
/* ========================= */
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardFadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeSlideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ========================= */
/* Dodatkowe elementy panelu */
/* ========================= */
.main-content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1976d2;
  margin-bottom: 1rem;
}
.main-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1f2a37;
}

/* Karty (np. dashboard skróty) */
.card {
  border: none;
  border-radius: 12px;
  background: #fff;
  transition: all 0.25s ease;
}
.card h5 {
  color: #1976d2;
  font-weight: 600;
}
.card p {
  color: #475569;
  font-size: 0.9rem;
}

/* Przyciski */
.btn {
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25,118,210,0.2);
}

/* Tabele */
.table {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
}
.table td {
  vertical-align: middle;
}

/* Modal */
.modal-content {
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}
.modal-header {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}
.modal-title {
  font-weight: 600;
  color: #1976d2;
}

/* Animacje wejścia sekcji */
.animate-fadeIn {
  animation: fadeIn 0.6s ease;
}

/* Responsywność */
@media (max-width: 992px) {
  .main-content { padding: 15px; }
  .card h5 { font-size: 1rem; }
}
@media (max-width: 768px) {
  .main-content h1 { font-size: 1.4rem; }
  .main-content h2 { font-size: 1.2rem; }
}

/* ========================= */
/* Hamburger (mobile)        */
/* ========================= */
.hamburger-btn {
  all: unset;
  position: fixed;
  top: 12px;
  left: 12px;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background-color: #1e293b !important; /* ciemny jak sidebar */
  color: #fff !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 1060;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
}
.hamburger-btn i {
  font-size: 1.4rem !important;
}
.hamburger-btn:hover {
  background-color: #334155 !important;
}
