/* Interactive Bees / Quick Quiz Assessment Portal Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

body.assessment-portal-body,
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  background-color: #fefce8 !important;
  background-image: radial-gradient(#eab308 0.75px, transparent 0.75px), linear-gradient(135deg, #fffdf0 0%, #fef8d6 50%, #fef3c7 100%) !important;
  background-size: 18px 18px, 100% 100% !important;
  background-attachment: fixed !important;
  min-height: 100vh;
  color: #1e293b;
  margin: 0;
  padding: 0;
}

/* Prevent forced uppercase on titles */
h1, h2, h3, h4, h5, h6,
.question,
.portal-header-title,
.portal-quiz-title,
.portal-topic-title {
  text-transform: none !important;
}

/* Navbar Enhancement */
.portal-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid #fef08a;
  box-shadow: 0 4px 15px rgba(234, 179, 8, 0.08);
  padding: 12px 0;
  margin-bottom: 0;
}

.portal-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.portal-nav-icon {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  color: #0f172a;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.3);
}

.portal-nav-title {
  font-weight: 800;
  font-size: 18px;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.3px;
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-nav-link {
  font-weight: 700;
  font-size: 13px;
  color: #475569 !important;
  padding: 8px 16px !important;
  border-radius: 9999px;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.portal-nav-link:hover,
.portal-nav-link.active {
  color: #0f172a !important;
  background: #fef3c7;
}

.portal-nav-btn {
  background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
  color: #0f172a !important;
  font-weight: 800;
  border-radius: 9999px;
  padding: 8px 20px !important;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
  transition: all 0.2s ease;
}

.portal-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 179, 8, 0.4);
}

/* Layout Wrapper */
.portal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 15px 60px;
  min-height: calc(100vh - 120px);
}

/* Brand Header Badge */
.portal-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 3px solid #eab308;
  border-radius: 18px;
  padding: 8px 24px 8px 10px;
  box-shadow: 0 10px 30px -5px rgba(234, 179, 8, 0.25);
  margin-bottom: 24px;
}

.portal-brand-icon {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  color: #0f172a;
  font-weight: 900;
  font-size: 16px;
  border-radius: 10px;
  padding: 8px 14px;
  line-height: 1;
}

.portal-brand-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.portal-brand-title {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #0f172a;
  text-transform: uppercase;
  line-height: 1.2;
}

.portal-brand-sub {
  font-size: 10px;
  font-weight: 800;
  color: #d97706;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Page Header Titles */
.portal-header-title {
  font-size: 36px;
  font-weight: 900;
  color: #0f172a;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  text-transform: none;
}

.portal-header-title .highlight {
  color: #d97706;
}

.portal-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.portal-pill {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.portal-pill-amber {
  background: #fef3c7;
  color: #b45309;
  border: 1.5px solid #fde68a;
}

.portal-pill-indigo {
  background: #eef2ff;
  color: #4338ca;
  border: 1.5px solid #c7d2fe;
}

.portal-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  margin-bottom: 32px;
}

/* Assessment Entry Card */
.portal-card {
  background: #ffffff;
  border: 3px solid #eab308;
  border-radius: 24px;
  padding: 36px 36px 32px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 50px -10px rgba(234, 179, 8, 0.25), 0 8px 20px -4px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  margin: 0 auto;
}

.portal-card-wide {
  max-width: 850px !important;
}

.portal-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.portal-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #1e293b;
  text-transform: uppercase;
  margin: 0;
}

.portal-tag {
  font-size: 10px;
  font-weight: 800;
  color: #d97706;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.portal-input-group {
  margin-bottom: 22px;
}

.portal-input {
  width: 100%;
  background: #eff6ff;
  border: 1.5px solid #dbeafe;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  transition: all 0.2s ease;
  height: 48px;
  box-sizing: border-box;
}

.portal-input:focus {
  background: #ffffff;
  border-color: #eab308;
  box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.2);
  outline: none;
}

.portal-password-wrapper {
  position: relative;
}

.portal-password-wrapper .portal-input {
  padding-right: 75px;
}

.portal-toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 800;
  color: #d97706;
  cursor: pointer;
  padding: 4px 8px;
  z-index: 5;
}

.portal-toggle-pw:hover {
  color: #b45309;
}

.portal-btn-primary {
  width: 100%;
  background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
  border: none;
  border-radius: 9999px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(234, 179, 8, 0.35);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  margin-top: 10px;
}

.portal-btn-primary:hover,
.portal-btn-primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(234, 179, 8, 0.45);
  background: linear-gradient(180deg, #fde047 0%, #ca8a04 100%);
  color: #0f172a !important;
}

.portal-btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 2px solid #cbd5e1;
  border-radius: 9999px;
  padding: 14px 24px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.portal-btn-secondary:hover:not(:disabled) {
  background: #e2e8f0;
  color: #0f172a;
}

.portal-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.portal-footer-link {
  margin-top: 24px;
  text-align: center;
}

.portal-footer-link a {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  transition: color 0.2s ease;
}

.portal-footer-link a:hover {
  color: #d97706;
}

/* Topic Dashboard Cards for Logged In User */
.portal-topic-card {
  background: #ffffff;
  border: 2px solid #fde047;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(234, 179, 8, 0.15);
  transition: all 0.3s ease;
  margin-bottom: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.portal-topic-card:hover {
  transform: translateY(-4px);
  border-color: #eab308;
  box-shadow: 0 15px 35px -5px rgba(234, 179, 8, 0.25);
}

.portal-topic-header {
  background: linear-gradient(135deg, #fef08a 0%, #fef3c7 100%);
  padding: 20px 24px;
  border-bottom: 1.5px solid #fde047;
}

.portal-topic-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  text-transform: none;
}

.portal-topic-desc {
  font-size: 13px;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

.portal-topic-body {
  padding: 20px 24px;
  flex-grow: 1;
}

.portal-topic-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.portal-stat-item {
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
}

.portal-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.portal-stat-val {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.portal-topic-footer {
  padding: 16px 24px 24px;
  background: #ffffff;
}

/* Live Quiz Interface Component */
.portal-quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 2.5px solid #eab308;
  border-radius: 18px;
  padding: 16px 24px;
  box-shadow: 0 8px 25px rgba(234, 179, 8, 0.2);
  margin-bottom: 30px;
}

.portal-quiz-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  text-transform: none !important;
}

.portal-clock-badge {
  background: linear-gradient(135deg, #fde047 0%, #eab308 100%);
  color: #0f172a;
  font-weight: 900;
  font-size: 18px;
  padding: 8px 20px;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35);
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-quiz-card {
  background: #ffffff;
  border: 3px solid #eab308;
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 20px 45px -10px rgba(234, 179, 8, 0.2);
  margin: 0 auto;
}

.portal-question-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 24px;
  line-height: 1.5;
  text-transform: none !important;
}

/* Quiz Option Card Styling */
.portal-option-label {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 16px 20px !important;
  margin-bottom: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  color: #1e293b !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
}

.portal-option-label:hover {
  background: #fffdf0 !important;
  border-color: #fde047 !important;
  transform: translateX(4px);
}

.portal-option-label.active {
  background: #fef3c7 !important;
  border-color: #eab308 !important;
  box-shadow: 0 6px 18px rgba(234, 179, 8, 0.25) !important;
}

.portal-option-label input[type="radio"] {
  accent-color: #eab308;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.portal-option-badge {
  background: #fef08a;
  color: #b45309;
  font-weight: 900;
  font-size: 13px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-option-label.active .portal-option-badge {
  background: #eab308;
  color: #0f172a;
}

.portal-option-text {
  flex-grow: 1;
  text-transform: none !important;
}

/* Question Stepper Display Rules */
.myQuestion {
  display: none !important;
}

.myQuestion.active {
  display: block !important;
}

/* Results & Scorecards */
.portal-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.portal-score-box {
  background: #ffffff;
  border: 2.5px solid #fde047;
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(234, 179, 8, 0.12);
}

.portal-score-num {
  font-size: 32px;
  font-weight: 900;
  color: #d97706;
}

.portal-score-title {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.portal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #fde047;
  margin-bottom: 30px;
}

.portal-table th {
  background: #fef08a;
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  padding: 14px 18px;
  border-bottom: 2px solid #fde047;
}

.portal-table td {
  background: #ffffff;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  font-weight: 600;
}

.portal-badge-correct {
  background: #dcfce7;
  color: #15803d;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
}

.portal-badge-wrong {
  background: #ffe4e6;
  color: #be123c;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
}

/* FAQ Accordion Styling */
.portal-faq-item {
  background: #ffffff;
  border: 2px solid #fde047;
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(234, 179, 8, 0.1);
}

.portal-faq-header {
  background: #fffdf0;
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-faq-body {
  padding: 20px 24px;
  color: #334155;
  line-height: 1.6;
  border-top: 1px solid #fef08a;
}

/* Footer Styling */
.front-footer {
  background: #0f172a !important;
  color: #94a3b8 !important;
  padding: 20px 0 !important;
  font-size: 13px;
  border-top: 3px solid #eab308;
}

/* Print CSS Rules */
@media print {
  body {
    background: #ffffff !important;
  }
  .portal-navbar, .front-footer, .print_btn {
    display: none !important;
  }
  .portal-card, .portal-quiz-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}
