/* --- RESET I STYLE GLOBALNE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}
/* --- PLAKIETKA UŻYTKOWNIKA W TOPBARZE --- */
.user-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(45, 125, 115, 0.1); /* Delikatne miętowe tło */
  color: #2d7d73; /* Główny miętowy kolor tekstu */
  padding: 8px 16px;
  border-radius: 20px; /* Zaokrąglone brzegi w stylu "pill" */
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(45, 125, 115, 0.15);
  
  /* Jeśli ikonka to emoji, ten filtr zmieni jej kolor z fioletu na ciemny miętowy */
  filter: hue-rotate(45deg); 
}

/* --- POLA TEKSTOWE I FORMULARZE --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  background-color: #ffffff;
  color: #111111;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Style po kliknięciu w pole (Focus) */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  border-color: #2d7d73;
  box-shadow: 0 0 0 3px rgba(45, 125, 115, 0.15);
  background-color: #ffffff;
}

/* Styl dla placeholderów (szary tekst pomocniczy) */
::placeholder {
  color: #aaa;
  opacity: 1;
}

/* Specyficzne poprawki dla wieloliniowego pola tekstowego */
textarea {
  min-height: 120px;
  resize: vertical; /* Pozwala użytkownikowi zmieniać wysokość tylko w pionie */
}

/* Styl dla etykiet pol (Label), jeśli ich używasz */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
  text-align: left;
}


html {
  padding-top: 70px; /* Zapewnia miejsce na stały navbar/topbar */
  background: #f5f7fa;
}

body {
  background: #f5f7fa;
  color: #111;
  line-height: 1.5;
}

h1, h2, h3 {
  color: #111;
}

/* --- STRUKTURA I UKŁADY (LAYOUT) --- */
.layout, .dashboard-layout {
  display: flex;
  gap: 25px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  align-items: flex-start;
}

.main, .dashboard-main {
  flex: 1;
  background: white;
  border-radius: 22px;
  padding: 35px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .05);
}

/* --- NAWIGACJA (NAVBAR / TOPBAR) --- */
.navbar, .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e5e5e5;
  z-index: 9999;
}

.nav {
  text-align: center;
  margin: 20px 0 30px;
}

.nav-links {
  display: flex;
  gap: 25px;
}

.nav-links a {
  color: #333;
  text-decoration: none;
  transition: .3s;
}

.nav-links a:hover {
  color: #2d7d73;
}

/* --- LOGO --- */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 28px;
  font-weight: bold;
  color: #2d7d73;
  max-width: 220px;
  margin: 0;
}

.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* --- PANEL BOCZNY (SIDEBAR) --- */
.sidebar {
  width: 260px;
  background: white;
  border-radius: 22px;
  padding: 25px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .05);
  position: sticky;
  top: 95px; /* Uwzględnia padding-top i margines */
}

.sidebar h2 {
  color: #2d7d73;
  margin-bottom: 12px;
  font-size: 18px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.5px;
}

.sidebar p {
  color: #666;
  margin: 8px 0;
}

.side-link {
  display: block;
  background: #f5f7fa;
  border: 1px solid #e5e7eb;
  padding: 12px 16px;
  margin: 8px 0;
  color: #333;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  border-radius: 12px;
  transition: .3s;
}

.side-link:hover {
  background: #2d7d73;
  color: white;
  border-color: #2d7d73;
}

/* --- ELEMENTY INTERFEJSU (KARTY / BLOKI) --- */
.frame, .card, .info, .app-card, .auth-box, .largebox {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, .05);
  transition: .3s;
}

.frame {
  max-width: 380px;
  margin-bottom: 20px;
}

.info {
  width: 420px;
  margin-top: 10px;
}

.largebox {
  width: 90%;
  max-width: 1200px;
  margin-top: 40px;
}

.card:hover, .app-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .08);
}

.card h2, .app-card h2 {
  color: #2d7d73;
  margin-bottom: 10px;
}

.card p, .app-card p {
  color: #666;
}

/* --- SEKCJA HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px 20px;
  background: radial-gradient(circle at top, rgba(104, 176, 162, .15), transparent 50%);
}

.hero h1 {
  font-size: 70px;
  margin-bottom: 20px;
  text-transform: none;
}

.hero p {
  color: #666;
  font-size: 20px;
  max-width: 700px;
  margin-bottom: 30px;
}

/* --- PRZYCISKI --- */
.hero button, a.button, .classic-btn, .download-btn, .auth-box button {
  display: inline-block;
  background: #2d7d73;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: .3s;
  text-align: center;
  box-shadow: 0 4px 10px rgba(45, 125, 115, 0.2);
}

.hero button:hover, a.button:hover, .classic-btn:hover, .download-btn:hover, .auth-box button:hover {
  background: #24645c;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(45, 125, 115, 0.3);
}

.hero button:active, a.button:active, .classic-btn:active {
  transform: translateY(0);
}

.delete-btn {
  display: inline-block;
  background: #c62828;
  color: white;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: bold;
  transition: .3s;
}

.delete-btn:hover {
  background: #b71c1c;
  opacity: .95;
}

/* --- FORMULARZE --- */
.auth-box {
  width: 90%;
  max-width: 420px;
  text-align: center;
  border-radius: 22px;
}

.auth-box h1 {
  font-size: 42px;
  margin-bottom: 25px;
  color: #2d7d73;
}

.auth-box form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-box input {
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  transition: .3s;
}

.auth-box input:focus {
  border-color: #2d7d73;
  box-shadow: 0 0 0 3px rgba(45, 125, 115, 0.15);
}

.auth-box p {
  margin-top: 20px;
  color: #666;
}

.auth-box a {
  color: #2d7d73;
  text-decoration: none;
  font-weight: bold;
}

/* --- TABELE --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th {
  text-align: center;
  background: #2d7d73;
  color: white;
  padding: 15px;
  font-weight: bold;
  border-top-left-radius: 8px; /* Delikatne zaokrąglenie nagłówków */
  border-top-right-radius: 8px;
}

td {
  text-align: center;
  padding: 15px;
  border-bottom: 1px solid #e5e7eb;
  color: #333;
}

tr:hover {
  background: #f5f7fa;
}

/* --- SIATKI I GRUPY PRZEDMIOTÓW --- */
.cards, .apps-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  padding: 40px 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 40px;
}

/* --- OBRAZY I GRAPY --- */
.app-card img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 15px;
}

.img-box {
  width: 120px;
  height: 140px;
  border: 1px solid #e5e7eb;
  background: #f5f7fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  padding: 10px;
}

.img-box img {
  width: 100%;
  height: 90px;
  object-fit: contain;
}

.img-text {
  font-size: 12px;
  color: #666;
  font-family: monospace;
  letter-spacing: 0.5px;
}

/* --- BŁĘDY I PROGRES --- */
.error-box {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef5350;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 12px;
  font-weight: bold;
}

.progress-bg {
  width: 100%;
  background: #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
}

.progress-bar {
  width: 0%;
  background: #2d7d73;
  color: white;
  padding: 8px;
  text-align: center;
  border-radius: 12px;
  transition: .3s;
}

/* --- POZOSTAŁE STYLE --- */
.center-text {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

menu {
  padding-left: 20px;
}

menu li {
  margin-bottom: 12px;
  color: #333;
}

footer {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 14px;
}

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 900px) {
  .layout, .dashboard-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    position: static;
  }
  .main, .dashboard-main {
    padding: 20px;
  }
  .hero h1 {
    font-size: 40px;
  }
}