/* [split 6/9] servbg.com stylesheet: redesigned stats, compact stats row, news popup, stats tabs, quiz user summary. Split from style.css on 2026-10-12 (lines 4250-5729 of the original); the nine css/*.css parts load in numbered order, then the terminal css/app.css. See style.css stub. */
/* ============================================
   GAMIFICATION VISUAL EFFECTS
   ============================================ */

/* Floating time change */
.time-change-float {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.time-change-float.show {
  animation: floatUp 1s ease-out forwards;
}

.time-change-float.positive {
  color: #3fb950;
  text-shadow: 0 0 10px rgba(63, 185, 80, 0.5);
}

.time-change-float.negative {
  color: #f85149;
  text-shadow: 0 0 10px rgba(248, 81, 73, 0.5);
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-40px);
  }
}

/* Streak flames */
.streak-stat {
  position: relative;
}

.streak-flames {
  position: absolute;
  top: -8px;
  right: -20px;
  font-size: 16px;
  animation: flicker 0.5s infinite alternate;
}

.streak-flames.hot {
  font-size: 18px;
  animation: flicker 0.3s infinite alternate;
}

.streak-flames.legendary {
  font-size: 22px;
  animation: flicker 0.2s infinite alternate, pulse 0.5s infinite;
}

@keyframes flicker {
  from { opacity: 0.8; transform: scale(1); }
  to { opacity: 1; transform: scale(1.1); }
}

/* Streak value glow */
#survivalStreak.streak-hot {
  color: #ff6b35;
  text-shadow: 0 0 8px rgba(255, 107, 53, 0.5);
}

#survivalStreak.streak-legendary {
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
  animation: legendaryPulse 0.5s infinite alternate;
}

@keyframes legendaryPulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* Screen shake on wrong */
.survival-game-container.shake {
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* Combo text */
.combo-text {
  color: #ffd700;
  font-weight: 700;
  animation: comboPulse 0.5s ease-out;
}

.streak-text {
  color: #ff6b35;
  font-weight: 600;
}

@keyframes comboPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Timer urgency effects */
.timer-circle.urgent {
  animation: urgentPulse 0.5s infinite;
  border-color: #f85149;
}

.timer-circle.danger {
  animation: dangerPulse 0.3s infinite;
  border-color: #f85149;
  box-shadow: 0 0 20px rgba(248, 81, 73, 0.5);
}

@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(248, 81, 73, 0.3); }
  50% { box-shadow: 0 0 15px rgba(248, 81, 73, 0.6); }
}

@keyframes dangerPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(248, 81, 73, 0.5); }
  50% { transform: scale(1.05); box-shadow: 0 0 25px rgba(248, 81, 73, 0.8); }
}

/* Answer button hover effects */
.survival-answer-btn {
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.survival-answer-btn:hover:not(:disabled) {
  transform: translateX(4px);
  border-color: var(--accent);
  background: rgba(63, 185, 80, 0.1);
}

.survival-answer-btn:active:not(:disabled) {
  transform: scale(0.98);
}

/* Correct/wrong button states */
/* Forced override, kept on purpose: .survival-answer-btn:hover:not(:disabled) is
   (0,3,0) and outranks these (0,2,0) result classes, so forcing is the only way to
   pin the correct/wrong verdict colour while the pointer is still on the button. */
.survival-answer-btn.correct {
  background: rgba(63, 185, 80, 0.2) !important;
  border-color: #3fb950 !important;
  animation: correctFlash 0.3s ease;
}

.survival-answer-btn.wrong {
  background: rgba(248, 81, 73, 0.2) !important;
  border-color: #f85149 !important;
  animation: wrongShake 0.3s ease;
}

@keyframes correctFlash {
  0% { background: rgba(63, 185, 80, 0.5); }
  100% { background: rgba(63, 185, 80, 0.2); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Category badge */
.survival-category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-console);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

/* ============================================
   AUTHENTICATION STYLES
   ============================================ */

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 11px;
  cursor: pointer;
  transition: border-bottom-color 0.15s, color 0.15s;
  border-bottom: 2px solid transparent;
}

.auth-tab:hover {
  color: var(--text-primary);
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-form {
  padding: 16px;
  max-width: 420px;
  margin: 0 auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 16px;
}

.auth-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.auth-header h3 {
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 16px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 11px;
}

.form-group {
  margin-bottom: 10px;
}

.auth-input {
  width: 100%;
  background: var(--bg-console);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 13px;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-submit-btn {
  width: 100%;
  background: var(--accent);
  border: none;
  color: var(--bg-primary);
  padding: 10px;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.auth-submit-btn:hover {
  opacity: 0.9;
}

.auth-link {
  text-align: center;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s;
}

.auth-link:hover {
  color: var(--accent);
}

.auth-message {
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
  display: none;
}

.auth-message.success {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.auth-message.error {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.auth-success, .auth-error {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  display: inline-block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(63, 185, 80, 0.2);
  color: #3fb950;
  font-size: 32px;
  line-height: 60px;
  margin-bottom: 16px;
}

.error-icon {
  display: inline-block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(248, 81, 73, 0.2);
  color: #f85149;
  font-size: 32px;
  line-height: 60px;
  margin-bottom: 16px;
}

/* Profile actions */
.profile-actions {
  display: flex;
  gap: 8px;
}

.profile-pwd-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.profile-pwd-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

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

.profile-logout-btn {
  background: transparent;
  border: 1px solid #f85149;
  color: #f85149;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 10px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.profile-logout-btn:hover {
  background: #f85149;
  color: var(--bg-primary);
}

/* Password change form */
.password-change-form {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

.password-change-form h4 {
  color: var(--accent);
  font-size: 12px;
  margin-bottom: 12px;
}

.password-change-form .auth-input {
  margin-bottom: 10px;
}

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

.profile-cancel-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 10px;
  cursor: pointer;
}

.profile-cancel-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* =============================================
   REDESIGNED STATS PAGE - Dual Board Layout
   ============================================= */

.stats-dual-boards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--bg-primary);
}

.stats-board {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.stats-board.nightmare-board {
  border-color: rgba(248, 81, 73, 0.3);
}

.stats-board.survival-board {
  border-color: rgba(139, 148, 158, 0.3);
}

.board-header {
  padding: 12px 16px;
  background: var(--bg-console);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nightmare-board .board-header {
  background: linear-gradient(135deg, rgba(248, 81, 73, 0.1) 0%, transparent 100%);
}

.survival-board .board-header {
  background: linear-gradient(135deg, rgba(139, 148, 158, 0.1) 0%, transparent 100%);
}

.board-icon {
  font-size: 20px;
}

.board-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.board-subtitle {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
}

.board-table {
  padding: 8px;
}

.board-row {
  display: grid;
  grid-template-columns: 28px minmax(80px, 1fr) 65px 55px minmax(95px, 1fr) minmax(80px, 1.2fr);
  gap: 8px;
  padding: 8px 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}
.col-result {
  color: var(--text-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.col-result .crw-good { color: #3fb950; font-weight: 500; }
.col-result .crw-bad  { color: #f85149; font-weight: 500; }
.col-result .crw-pct  { color: var(--text-muted); }

.board-row.header-row {
  background: var(--bg-console);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px;
}

.board-row:last-child {
  border-bottom: none;
}

.board-row.top3 {
  background: rgba(63, 185, 80, 0.05);
}

.board-row.rank1 .col-rank,
.board-row.rank1 .col-nick {
  color: #ffd700;
}

.board-row.rank2 .col-rank,
.board-row.rank2 .col-nick {
  color: #c0c0c0;
}

.board-row.rank3 .col-rank,
.board-row.rank3 .col-nick {
  color: #cd7f32;
}

.col-rank {
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}

.col-nick {
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-score {
  color: var(--accent);
  font-weight: 600;
  text-align: right;
}

.col-qa, .col-pct, .col-time, .col-streak {
  color: var(--text-muted);
  text-align: center;
}

.col-correct {
  color: #3fb950;
  text-align: center;
  font-weight: 500;
}

.col-wrong {
  color: #f85149;
  text-align: center;
  font-weight: 500;
}

.col-title {
  color: var(--text-muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 11px;
}

/* Bottom stats grid */
.stats-grid-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 16px 16px;
}

@media (max-width: 1200px) {
  .stats-dual-boards {
    grid-template-columns: 1fr;
  }
  
  .stats-grid-bottom {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .board-row {
    grid-template-columns: 25px 1fr 55px 45px 30px 30px 35px minmax(50px, 1fr);
    font-size: 10px;
  }
}

@media (max-width: 768px) {
  .stats-grid-bottom {
    grid-template-columns: 1fr;
  }
  
  .board-row {
    grid-template-columns: 22px 1fr 50px 30px 30px 35px;
    font-size: 10px;
  }
  
  .col-time, .col-title {
    display: none;
  }
}

/* =============================================
   COMPACT STATS ROW (No scroll)
   ============================================= */

.stats-row-compact {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-console);
  border-top: 1px solid var(--border-color);
}

.stats-section-mini {
  flex: 1;
}

.section-header-mini {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

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

.stat-item {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
}

.stat-item strong {
  color: var(--text-primary);
}

.stat-item strong.accent { color: var(--accent); }
.stat-item strong.gold { color: #ffd700; }
.stat-item strong.fire { color: #f85149; }

/* Make page modals fit without scroll */
.page-modal-body {
  max-height: calc(100vh - 120px);
  overflow: hidden;
}

.stats-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 140px);
}

.stats-dual-boards {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.board-table {
  overflow: hidden;
}

/* Compact modal for better fit */
.page-modal.compact .page-modal-content {
  max-width: 95vw;
  max-height: 90vh;
}

/* =============================================
   NEWS POPUP
   ============================================= */

.news-item {
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.news-item:hover {
  background: rgba(88, 166, 255, 0.08);
  border-color: var(--accent-border);
  transform: translateX(3px);
}

.news-item:hover .news-read-more {
  color: var(--accent);
  opacity: 1;
}

.news-text-preview {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* The label is a real link when the item has a source URL. */
a.news-read-more { text-decoration: none; }
a.news-read-more::after { content: none; } /* the label already ends in an arrow */

.news-read-more::after {
  content: '→';
  transition: transform 0.2s ease;
}

.news-item:hover .news-read-more::after {
  transform: translateX(3px);
}

.news-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  padding: 20px;
}

.news-popup {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-width: 600px;
  max-height: 80vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.news-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-console);
  border-bottom: 1px solid var(--border-color);
}

.news-popup-source {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.news-popup-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.news-popup-close:hover {
  color: var(--error);
}

.news-popup-content {
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-primary);
  overflow-y: auto;
  flex: 1;
  max-height: 60vh;
}

.news-popup-content a {
  color: var(--accent);
  margin-left: 4px;
}

.news-popup-content a:hover {
  text-decoration: underline;
}

.news-popup-actions {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-console);
}

.news-popup-btn {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.news-popup-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.news-popup-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-console);
}

.news-popup-btn-primary:hover {
  color: var(--bg-console);
  opacity: .88;
}

.news-popup-time {
  padding: 10px 16px;
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: var(--bg-console);
}

/* =============================================
   STATS TABS & PROGRESS PAGE
   ============================================= */
.stats-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.stats-tab {
  background: transparent;
  border: none;
  padding: 12px 24px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.stats-tab:hover {
  color: var(--text-secondary);
}

.stats-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.stats-tab-panel {
  display: none;
}

.stats-tab-panel.active {
  display: block;
}

/* Progress Login Prompt */
.progress-login-prompt {
  text-align: center;
  padding: 60px 40px;
  max-width: 400px;
  margin: 0 auto;
}

.progress-login-prompt .prompt-icon {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.progress-login-prompt h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.progress-login-prompt p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.prompt-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.prompt-btn {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.prompt-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.prompt-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.prompt-btn.primary:hover {
  background: var(--accent-hover);
}

/* Progress Section */
.progress-section {
  margin-bottom: 24px;
}

.section-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.progress-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.progress-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}

.progress-stat-box .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.progress-stat-box.nightmare .stat-value {
  color: #f85149;
}

.progress-stat-box.survival .stat-value {
  color: var(--accent);
}

.progress-stat-box .stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.progress-stat-box .stat-meta {
  font-size: 10px;
  color: var(--text-muted);
}

/* Knowledge Bars */
.knowledge-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.knowledge-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 50px 50px;
  gap: 12px;
  align-items: center;
}

.bar-category {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 8px;
  background: var(--bg-console);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  /* Live: index.php:8282 sets style="width:${accuracy}%" inline from JS per
     data value. Converting to transform:scaleX() needs the JS to set a scale
     factor instead of a width percentage — out of scope for a CSS-only fix
     (touch ONLY style.css). Kept, judged low-risk: small fixed-height bar,
     isolated repaint. */
  transition: width 0.3s ease; /* impeccable-disable-line layout-transition -- JS-driven data-value width fill; transform conversion requires a companion JS change, out of scope for this CSS-only pass */
}

.bar-fill.expert { background: var(--accent); }
.bar-fill.proficient { background: #56d364; }
.bar-fill.learning { background: var(--warning); }
.bar-fill.beginner { background: var(--text-muted); }

.bar-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.bar-meta {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
}

.knowledge-summary {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.no-data-message {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 13px;
}

/* =============================================
   QUIZ USER SUMMARY
   ============================================= */
.quiz-user-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.summary-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.summary-actions {
  display: flex;
  gap: 12px;
}

.summary-link {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
}

.summary-link:hover {
  color: var(--text-primary);
}

.summary-stats {
  display: flex;
  gap: 24px;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.summary-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Quiz User Bar */
.quiz-user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.quiz-user-status {
  font-size: 12px;
  color: var(--text-muted);
}

.quiz-user-status a {
  color: var(--accent);
  text-decoration: none;
}

.quiz-user-status a:hover {
  text-decoration: underline;
}

.quiz-stats-link {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
}

.quiz-stats-link:hover {
  color: var(--accent);
}

.quiz-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.quiz-footer-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 14px;
  text-align: center;
}

/* Mode prompt boxes */
.nightmare-title {
  font-size: 16px;
  font-weight: 600;
  color: #f85149;
  margin-bottom: 12px;
}

.nightmare-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.survival-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.survival-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.survival-prompt-box {
  border-color: #238636;
  background: linear-gradient(180deg, rgba(35,134,54,0.08) 0%, transparent 100%);
}

.text-success { color: var(--accent); }
.text-danger { color: #f85149; }
.text-warning { color: var(--warning); }

.mode-user-badge {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
  font-size: 12px;
  text-align: center;
  color: var(--accent);
}

.mode-user-badge.survival {
  background: rgba(35,134,54,0.15);
  border-color: #238636;
  color: var(--accent);
}

.mode-login-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}

.mode-login-hint a {
  color: var(--accent);
  text-decoration: none;
}

.mode-login-hint a:hover {
  text-decoration: underline;
}

.mode-buttons {
  display: flex;
  gap: 10px;
}

.survival-start-btn {
  flex: 1;
  background: #238636;
  border: none;
  border-radius: var(--radius);
  padding: 12px 20px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

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

.resume-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
  margin-bottom: 8px;
}

.resume-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 11px;
  transition: border-color 0.15s, color 0.15s;
}

.resume-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* Form inputs in prompts */
.nightmare-prompt-box .form-input {
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .progress-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .knowledge-bar-row {
    grid-template-columns: 100px 1fr 40px 40px;
    gap: 8px;
  }
  
  .summary-stats {
    gap: 16px;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Employer rails (T4 / T19) — company dashboard inside profile modal,
   invitation table, status badges, and /invite.php candidate landing.
   These are duplicated in index.php's inline <style> for SPA rendering;
   here we keep style.css authoritative for /invite.php (which doesn't load
   index.php's inline block).
   ────────────────────────────────────────────────────────────────────── */

.pl-company-section {
  margin: 0 18px 18px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pl-company-individual {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.pl-company-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.pl-company-info { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #e6edf3; }
.pl-company-info-mail { color: var(--text-muted, #8b949e); font-size: 11px; }

.pl-invite-form { display: flex; flex-direction: column; gap: 8px; }
.pl-invite-fields {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr auto;
  gap: 8px; align-items: center;
}
.pl-invite-input, .pl-invite-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px; padding: 8px 10px; color: #e6edf3;
  font-family: inherit; font-size: 12px; min-width: 0;
}
.pl-invite-input:focus, .pl-invite-select:focus {
  outline: none; border-color: rgba(63,185,80,0.5); background: rgba(255,255,255,0.06);
}
.pl-invite-msg { font-size: 11px; min-height: 14px; padding: 4px 0; }
.pl-invite-msg.pl-good { color: #3fb950; }
.pl-invite-msg.pl-bad  { color: #f85149; }

.pl-invite-table { display: flex; flex-direction: column; gap: 4px; }
.pl-invite-row {
  display: grid;
  grid-template-columns: 2.2fr 1.4fr 1.2fr 1fr 0.9fr 1.4fr;
  gap: 8px; align-items: center; padding: 8px 10px;
  border-radius: 6px; background: rgba(255,255,255,0.02);
  font-size: 12px; color: #e6edf3;
}
.pl-invite-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-invite-row.pl-invite-head {
  background: rgba(255,255,255,0.04); color: var(--text-muted, #8b949e);
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
}

.status-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; border: 1px solid transparent; white-space: nowrap;
}
.status-badge-pending   { background: rgba(63,185,80,0.12);   color: #3fb950; border-color: rgba(63,185,80,0.4); }
.status-badge-claimed   { background: rgba(245,166,35,0.12);  color: #f5a623; border-color: rgba(245,166,35,0.4); }
.status-badge-submitted { background: rgba(63,185,80,0.18);   color: #3fb950; border-color: rgba(63,185,80,0.6); }
.status-badge-expired   { background: rgba(139,148,158,0.12); color: #8b949e; border-color: rgba(139,148,158,0.3); }
.status-badge-revoked   { background: rgba(248,81,73,0.10);   color: #f85149; border-color: rgba(248,81,73,0.4); }
.status-badge-declined  { background: rgba(248,81,73,0.10);   color: #f85149; border-color: rgba(248,81,73,0.4); }



