/* dashboard.css — Style prywatnego pulpitu ucznia, odtwarzacza i wydruku PDF (APEX Quiz) */

.hidden {
  display: none !important;
}

.muted-text {
  color: #8b949e;
  font-size: 0.95rem;
}

/* GÓRNY PASEK NAWIGACJI */
.dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 24px;
  background: #161b22;
  border-bottom: 1px solid #30363d;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-link {
  color: #f0f6fc;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
}

.brand-link span {
  color: #56d364;
}

.badge-beta {
  background: rgba(86, 211, 100, 0.14);
  color: #56d364;
  border: 1px solid rgba(86, 211, 100, 0.4);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.dash-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* PRZYCISKI */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-ghost,
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: #238636;
  color: #ffffff;
  border-color: #2ea043;
}

.btn-primary:hover {
  background: #2ea043;
}

.btn-secondary {
  background: #21262d;
  color: #c9d1d9;
  border-color: #30363d;
}

.btn-secondary:hover {
  border-color: #56d364;
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: #56d364;
  border-color: #56d364;
}

.btn-ghost {
  background: transparent;
  color: #8b949e;
  border-color: #30363d;
}

.btn-ghost:hover {
  color: #f0f6fc;
}

.btn-google {
  width: 100%;
  background: #ffffff;
  color: #1f2328;
  font-size: 1rem;
  padding: 12px;
}

.btn-google span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4285f4;
  color: #ffffff;
  font-weight: 900;
}

/* KARTA LOGOWANIA */
.auth-card {
  max-width: 440px;
  margin: 32px auto;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 14px;
  padding: 28px 24px;
}

.auth-header h1 {
  font-size: 1.45rem;
  margin-bottom: 8px;
  color: #f0f6fc;
}

.auth-header p {
  color: #8b949e;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: #8b949e;
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #30363d;
}

.auth-divider span {
  padding: 0 10px;
}

.auth-form .form-group {
  margin-bottom: 14px;
}

.auth-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #c9d1d9;
}

.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #f0f6fc;
  font-size: 1rem;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.error-box {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(248, 81, 73, 0.14);
  border: 1px solid #f85149;
  color: #ffa198;
  font-size: 0.9rem;
}

/* BANER PROFILU UCZNIA */
.profile-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #161b22;
  border: 1px solid #30363d;
  border-left: 4px solid #56d364;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.profile-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-pill {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.78rem;
  color: #8b949e;
}

.plan-free {
  color: #56d364;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* SIATKA KAFELKÓW Z QUIZAMI */
.quizzes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.quiz-tile {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.quiz-tile:hover {
  border-color: #56d364;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #56d364;
  font-weight: 700;
}

.quiz-tile h4 {
  font-size: 1.15rem;
  color: #f0f6fc;
  margin: 6px 0;
}

.quiz-tile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: #161b22;
  border: 1px dashed #30363d;
  border-radius: 12px;
}

/* ODTWARZACZ QUIZU */
.player-card {
  max-width: 720px;
  margin: 0 auto;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 14px;
  padding: 24px;
}

.player-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.question-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f0f6fc;
  margin: 16px 0;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  text-align: left;
  padding: 12px 16px;
  border-radius: 10px;
  background: #0d1117;
  border: 1px solid #30363d;
  color: #e6edf3;
  font-size: 1rem;
  cursor: pointer;
}

.option-btn:hover:not(:disabled) {
  border-color: #56d364;
}

.option-btn.correct {
  background: rgba(46, 160, 67, 0.22);
  border-color: #56d364;
  color: #ffffff;
}

.option-btn.wrong {
  background: rgba(248, 81, 73, 0.2);
  border-color: #f85149;
}

.feedback-box {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #0d1117;
  border-left: 4px solid #56d364;
  color: #c9d1d9;
}

.summary-box {
  text-align: center;
  padding: 20px 0;
}

.score-big {
  font-size: 2rem;
  font-weight: 900;
  color: #56d364;
  margin: 12px 0;
}

.summary-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* MODAL ŚCIĄGAWKI PDF */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 4, 9, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-window {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid #30363d;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.cheatsheet-paper {
  background: #ffffff;
  color: #111827;
  padding: 24px;
  border-radius: 8px;
  line-height: 1.55;
}

/* STYL WYDRUKU A4 */
@media print {
  body * {
    visibility: hidden;
  }
  #cheatsheet-modal,
  #cheatsheet-modal * {
    visibility: visible;
  }
  #cheatsheet-modal {
    position: absolute;
    inset: 0;
    background: #ffffff;
    padding: 0;
  }
  .modal-window {
    border: none;
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  .no-print {
    display: none !important;
  }
}

/* Odznaka Konto PRO */
.plan-pro {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

/* Wbudowany generator quizów wewnątrz Pulpitu */
.dash-creator-card {
  background: #161b22;
  border: 2px solid #56d364;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.dash-creator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.dash-creator-header h4 {
  margin: 0;
  color: #56d364;
  font-size: 1.1rem;
}

.dash-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
