/* =========================================================
   TVK AI Interview Assessment Platform - Modern Design System
   ========================================================= */

:root {
  --bg-dark: #0b0f19;
  --bg-card: #131b2e;
  --bg-card-hover: #1b2640;
  --bg-card-glass: rgba(19, 27, 46, 0.85);
  --border-color: #233152;
  --border-focus: #3b82f6;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
}

.hidden {
  display: none !important;
}

/* Container & Header */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 40px;
  width: 100%;
  flex: 1;
}

.app-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  margin-bottom: 24px;
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-logo-img {
  height: 46px;
  width: 46px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-success {
  background: var(--success-bg);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: var(--warning-bg);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: var(--danger-bg);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-primary-lg, .badge-success-lg, .badge-warning-lg, .badge-danger-lg {
  padding: 8px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 9999px;
  display: inline-block;
}

.badge-success-lg {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
}

.badge-primary-lg {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid #3b82f6;
}

.badge-warning-lg {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.badge-danger-lg {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: #1e293b;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #334155;
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-count-choice {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
}

.btn-count-choice.active {
  background: #3b82f6;
  color: white;
  border-color: #60a5fa;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* Card General */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

/* Registration Form View */
.registration-container {
  max-width: 740px;
  margin: 30px auto;
}

.view-header {
  text-align: center;
  margin-bottom: 28px;
}

.view-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.view-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-control.input-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Resume Upload Component */
.resume-dropzone {
  position: relative;
  background: #0f172a;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.resume-dropzone:hover, .resume-dropzone.dragover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.resume-dropzone.has-file {
  border-style: solid;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.resume-dropzone.error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.resume-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.resume-dropzone.has-file .resume-file-input {
  pointer-events: none;
  opacity: 0;
}

.resume-upload-content {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.upload-icon {
  font-size: 1.35rem;
}

.upload-text-wrap {
  display: flex;
  flex-direction: column;
}

.upload-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #93c5fd;
}

.upload-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.resume-file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  z-index: 5;
}

.resume-file-details {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.resume-file-name {
  font-size: 0.85rem;
  color: #34d399;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  display: block;
}

.resume-file-size {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.btn-clear-file {
  background: transparent;
  border: none;
  color: #f87171;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  transition: transform 0.15s;
}

.btn-clear-file:hover {
  transform: scale(1.2);
  color: #ef4444;
}

/* Selfie Photo & Hardware Verification */
.selfie-verification-card {
  margin-top: 22px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

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

.device-status-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.selfie-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.selfie-viewport-wrap {
  position: relative;
  width: 250px;
  height: 188px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #3b82f6;
  background: #020617;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.selfie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.selfie-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.selfie-prompt-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.92);
}

.selfie-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Candidate Photo Thumbnails Across Views */
.candidate-header-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.candidate-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.candidate-scorecard-photo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #3b82f6;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(0.95); opacity: 1; }
}

/* Centered Form Action Button */
.form-actions-center {
  margin-top: 28px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-actions-center .btn-primary {
  transition: all 0.25s ease;
}

.form-actions-center .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.45);
}

/* Track Selection View */
.tracks-section {
  margin-bottom: 30px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.track-card:hover {
  background: var(--bg-card-hover);
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.track-card.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.track-card.selected::before {
  content: "Selected";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #3b82f6;
  color: white;
  padding: 2px 8px;
  border-radius: 9999px;
}

.track-icon {
  font-size: 26px;
  margin-bottom: 10px;
  display: inline-block;
}

.track-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.track-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Interview Chamber View */
.chamber-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
}

.candidate-mini-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.candidate-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.timer-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: #0f172a;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.timer-urgent {
  color: #ef4444;
  border-color: #ef4444;
  animation: pulse-border 1s infinite alternate;
}

.timer-expired {
  color: #f87171 !important;
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.2) !important;
  animation: pulse-border 0.5s infinite alternate;
}

@keyframes pulse-border {
  from { box-shadow: 0 0 5px rgba(239, 68, 68, 0.4); }
  to { box-shadow: 0 0 15px rgba(239, 68, 68, 0.8); }
}

/* Question Timeout Alert Banner */
.chamber-timeout-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(185, 28, 28, 0.35));
  border: 1px solid rgba(239, 68, 68, 0.65);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  color: #fee2e2;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.25);
  animation: fadeInDown 0.35s ease-out;
  margin-bottom: 6px;
}

.timeout-banner-icon {
  font-size: 1.85rem;
  line-height: 1;
}

.timeout-banner-text {
  flex: 1;
}

.timeout-banner-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fecaca;
  margin-bottom: 2px;
}

.timeout-banner-text p {
  font-size: 0.88rem;
  color: #fca5a5;
  margin: 0;
  line-height: 1.4;
}

.timeout-loader-ring {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(254, 202, 202, 0.25);
  border-top-color: #f87171;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Overall Assessment Timeout Alert on Results View */
.results-timeout-alert {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(185, 28, 28, 0.35));
  border: 1px solid rgba(239, 68, 68, 0.7);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.25);
  animation: fadeInDown 0.4s ease-out;
}

.results-timeout-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: #1e293b;
  border-radius: 9999px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  transition: width 0.4s ease;
}

/* Interview Grid Layout */
.chamber-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

/* Left Sidebar: AI Interviewer & Camera */
.chamber-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ai-interviewer-card {
  text-align: center;
  padding: 24px 16px;
}

.ai-avatar-ring {
  width: 90px;
  height: 90px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  position: relative;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.ai-speaking {
  animation: ai-talk 1.2s infinite ease-in-out alternate;
}

@keyframes ai-talk {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(6, 182, 212, 0.4); }
  100% { transform: scale(1.08); box-shadow: 0 0 30px rgba(6, 182, 212, 0.85); }
}

/* Webcam Container */
.webcam-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
  border: 1px solid var(--border-color);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.webcam-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* mirror */
}

.webcam-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 20px;
}

/* Main Interactive Question Chamber */
.chamber-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.question-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.6;
  color: #f8fafc;
  margin-bottom: 18px;
}

.question-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

/* Answer Input Area */
.answer-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mic-active-msg {
  color: #06b6d4;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulse-text 1.5s infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.btn-mic {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-mic.recording {
  background: #ef4444;
  color: white;
  border-color: #f87171;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.answer-textarea {
  width: 100%;
  min-height: 180px;
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  font-family: inherit;
}

.answer-textarea:focus {
  border-color: var(--border-focus);
}

/* Live Evaluation Card */
.evaluation-card {
  background: linear-gradient(145deg, #111a2e, #17233d);
  border: 1px solid #2e4374;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.eval-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.score-display-box {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.score-big {
  font-size: 2.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  background: #0b1120;
  border: 1px solid var(--border-color);
}

.score-high {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.5);
}

.score-medium {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.5);
}

.score-low {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.5);
}

.subscores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  flex: 1;
}

.subscore-item {
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.subscore-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.subscore-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: #93c5fd;
}

.eval-feedback-section {
  margin-bottom: 16px;
}

.eval-feedback-section h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: #e2e8f0;
}

.eval-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.eval-list li {
  font-size: 0.88rem;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.eval-model-box {
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border-left: 3px solid #3b82f6;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Results Stream & Scorecard View */
.results-header-banner {
  background: linear-gradient(135deg, #1e3a8a, #172554);
  border: 1px solid #2563eb;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.results-header-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.results-score-highlight {
  text-align: right;
}

.results-score-highlight .percentage {
  font-size: 3.5rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
}

.kpi-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 8px;
}

.meter-track {
  width: 100%;
  height: 8px;
  background: #0f172a;
  border-radius: 9999px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
}

/* Stream Table Items */
.stream-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stream-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
}

.stream-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.stream-item-num {
  font-weight: 700;
  color: #3b82f6;
  margin-right: 8px;
}

.stream-item-topic {
  font-weight: 600;
  font-size: 0.95rem;
}

.stream-item-q {
  font-size: 0.92rem;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.stream-item-ans {
  background: #0b1120;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 10px;
}

.eval-metrics-mini {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 6px;
}

.eval-good {
  color: #34d399;
  font-size: 0.82rem;
}

.eval-gap {
  color: #fbbf24;
  font-size: 0.82rem;
}

/* Modal Settings */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

/* Navbar Admin Portal Link */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-admin-btn:hover {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* Track Selection Top Bar & Right Profile */
.track-selection-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.candidate-header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.candidate-header-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3b82f6;
}

.candidate-header-text {
  display: flex;
  flex-direction: column;
}

.welcome-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Level Selector Card (Freshers vs Experienced) */
.level-selector-card {
  margin-bottom: 24px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.level-pills-wrap {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-level-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.btn-level-choice:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  color: #f1f5f9;
}

.btn-level-choice.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.16);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.btn-level-choice .level-icon {
  font-size: 1.6rem;
}

.btn-level-choice .level-text {
  display: flex;
  flex-direction: column;
}

.btn-level-choice .level-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
}

.btn-level-choice .level-subtitle {
  font-size: 0.76rem;
  color: #93c5fd;
  margin-top: 2px;
}

.btn-level-choice .level-check {
  font-size: 1.1rem;
  color: #10b981;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-level-choice.active .level-check {
  opacity: 1;
}

/* Selection Status Card */
.selection-status-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  border: 2px solid;
  transition: all 0.3s ease;
}

.selection-status-card.selected {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 78, 59, 0.3));
  border-color: #10b981;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.selection-status-card.selected .status-title {
  color: #34d399;
}

.selection-status-card.not-selected {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(127, 29, 29, 0.25));
  border-color: #ef4444;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.15);
}

.selection-status-card.not-selected .status-title {
  color: #f87171;
}

.status-icon-wrap {
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-content {
  flex: 1;
}

/* Automated Email Notification Card */
.email-notification-card {
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.8));
}

.email-text-content {
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #cbd5e1;
}

/* Responsive */
@media (max-width: 960px) {
  .chamber-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full-width {
    grid-column: span 1;
  }
  .kpi-cards-grid {
    grid-template-columns: 1fr;
  }
  .results-header-banner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .results-score-highlight {
    text-align: center;
  }
}

/* Print Stylesheet for Scorecard & Certificate */
@media print {
  body {
    background: white !important;
    color: black !important;
    font-size: 11pt;
  }
  .app-navbar, .btn, .chamber-top-bar, .modal-overlay, .nav-actions {
    display: none !important;
  }
  .card, .results-header-banner, .stream-item-card {
    background: transparent !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    color: black !important;
    page-break-inside: avoid;
  }
  .percentage {
    color: #1e3a8a !important;
  }
  .stream-item-ans {
    background: #f8fafc !important;
    color: #334155 !important;
  }
}
