/* ========================================
   AVI 异步视频面试平台 - 全局样式
   ======================================== */

/* --- CSS Variables --- */
:root {
  --primary: #1a3a5c;
  --primary-light: #2d5f8a;
  --primary-dark: #0f2440;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* --- Utility --- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--gray-500); }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }

/* --- Top Navigation --- */
.top-nav {
  background: var(--primary);
  color: #fff;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.top-nav .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.top-nav .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links button {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links button:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.nav-links button.active {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* --- Page Container --- */
.page {
  display: none;
  animation: fadeIn 0.4s ease;
}

.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes recording-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}

/* ========================================
   候选人端 - 通用布局
   ======================================== */
.candidate-layout {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  min-height: calc(100vh - 60px);
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.card-title .icon.blue { background: #dbeafe; color: var(--accent); }
.card-title .icon.green { background: var(--success-light); color: var(--success); }
.card-title .icon.orange { background: var(--warning-light); color: var(--warning); }
.card-title .icon.red { background: var(--danger-light); color: var(--danger); }

/* --- Step Indicator --- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
  padding: 0 1rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  transition: var(--transition);
  flex-shrink: 0;
}

.step-dot.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.step-dot.done {
  background: var(--success);
  color: #fff;
}

.step-line {
  width: 36px;
  height: 2px;
  background: var(--gray-200);
  transition: var(--transition);
}

.step-line.done { background: var(--success); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: var(--gray-300);
  color: var(--gray-500);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: #fff;
  transition: var(--transition);
  color: var(--gray-800);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder { color: var(--gray-400); }

.input-row {
  display: flex;
  gap: 10px;
}

.input-row .form-input { flex: 1; }

.input-row .btn {
  flex-shrink: 0;
  padding: 11px 18px;
  font-size: 0.85rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gray-600);
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* ========================================
   Page 1: 欢迎页
   ======================================== */
.welcome-hero {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-xl);
  color: #fff;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.welcome-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.welcome-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 250px;
  height: 250px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.welcome-hero > * { position: relative; z-index: 1; }

.welcome-company {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.welcome-position {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.welcome-sub {
  font-size: 0.9rem;
  opacity: 0.75;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--gray-50);
  border-radius: var(--radius);
}

.info-item .info-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #dbeafe;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.info-item .info-text {
  display: flex;
  flex-direction: column;
}

.info-item .info-text .label {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.info-item .info-text .value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
}

.tip-list {
  list-style: none;
  padding: 0;
}

.tip-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.tip-list li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ========================================
   Page 4: 设备检测
   ======================================== */
.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}

.device-item:last-child { border-bottom: none; }

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

.device-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.device-icon.camera { background: #ede9fe; color: #7c3aed; }
.device-icon.mic { background: #fce7f3; color: #db2777; }
.device-icon.network { background: #e0f2fe; color: #0284c7; }

.device-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gray-800);
}

.device-desc {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.checking {
  background: var(--warning-light);
  color: var(--warning);
}

.status-badge.passed {
  background: var(--success-light);
  color: var(--success);
}

.status-badge.failed {
  background: var(--danger-light);
  color: var(--danger);
}

.status-badge.waiting {
  background: var(--gray-100);
  color: var(--gray-400);
}

/* Camera Preview */
.camera-preview-box {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: 1rem;
}

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

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  gap: 8px;
}

.camera-placeholder .cam-icon {
  font-size: 3rem;
  opacity: 0.5;
}

/* ========================================
   Page 5: 简历上传
   ======================================== */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.03);
}

.upload-zone .upload-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}

.upload-zone p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.upload-zone .upload-hint {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-top: 1rem;
}

.file-preview .file-icon {
  width: 42px;
  height: 42px;
  background: #dbeafe;
  color: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.file-preview .file-info { flex: 1; }
.file-preview .file-name { font-weight: 600; font-size: 0.9rem; }
.file-preview .file-size { font-size: 0.78rem; color: var(--gray-500); }

.resume-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
}

.resume-tag {
  padding: 4px 12px;
  background: #ede9fe;
  color: #7c3aed;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  animation: slideUp 0.3s ease;
}

/* ========================================
   Page 7: 面试间
   ======================================== */
.interview-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: calc(100vh - 60px);
}

.interview-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 12px 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.interview-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--gray-600);
}

.progress-bar {
  width: 140px;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.interview-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.interview-timer.warning { color: var(--warning); }
.interview-timer.danger { color: var(--danger); animation: pulse 1s infinite; }

.timer-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.timer-icon.warning { background: var(--warning); }
.timer-icon.danger { background: var(--danger); }

.interview-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
}

.question-area { display: flex; flex-direction: column; gap: 1rem; }

.question-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.question-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #dbeafe;
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.question-badge.followup {
  background: #fef3c7;
  color: #d97706;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.question-hint {
  font-size: 0.82rem;
  color: var(--gray-500);
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.video-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-preview-card {
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  position: relative;
}

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

.recording-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

.recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: recording-pulse 1.5s infinite;
}

.video-controls {
  display: flex;
  gap: 10px;
}

.video-controls .btn { flex: 1; }

.btn-record {
  background: var(--danger);
  color: #fff;
  position: relative;
}

.btn-record:hover { background: #dc2626; }

.btn-record.recording {
  animation: recording-pulse 1.5s infinite;
}

/* Anti-cheat Warning */
.anti-cheat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--warning-light);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: #92400e;
  font-weight: 500;
}

.anti-cheat-bar.alert {
  background: var(--danger-light);
  color: #991b1b;
  animation: pulse 0.5s ease;
}

/* ========================================
   Page 8: 完成页
   ======================================== */
.complete-layout {
  max-width: 520px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  text-align: center;
}

.complete-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 1.5rem;
  animation: pulse 1s ease;
}

.complete-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}

.complete-desc {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.summary-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.summary-item {
  text-align: center;
}

.summary-item .num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.summary-item .label {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ========================================
   后台管理 - 通用布局
   ======================================== */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

.admin-sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid var(--gray-200);
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.sidebar-section {
  padding: 0 1rem;
  margin-bottom: 1.5rem;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
  padding: 0 12px;
  margin-bottom: 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-item:hover { background: var(--gray-50); color: var(--gray-800); }
.sidebar-item.active { background: #eff6ff; color: var(--accent); font-weight: 600; }

.sidebar-item .item-icon {
  width: 22px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Admin Tabs */
.admin-tab {
  display: none;
  animation: fadeIn 0.3s ease;
}

.admin-tab.active {
  display: block;
}

.admin-main {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.admin-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-800);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #fff;
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

.stat-card .stat-change {
  font-size: 0.75rem;
  color: var(--success);
  margin-top: 4px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.search-input {
  padding: 9px 14px 9px 36px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.88rem;
  width: 260px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") 10px center/18px no-repeat;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select {
  padding: 9px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.88rem;
  background: #fff;
  color: var(--gray-600);
  cursor: pointer;
}

/* Table */
.data-table {
  width: 100%;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.data-table td {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--gray-50); }

.candidate-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}

.candidate-name {
  font-weight: 600;
  color: var(--gray-800);
}

.candidate-id {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.action-btns {
  display: flex;
  gap: 6px;
}

/* ========================================
   Modal / Drawer
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active { display: flex; }

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }

.modal-body {
  padding: 1.5rem;
}

.modal-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--gray-900);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.play-btn-overlay {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.play-btn-overlay:hover {
  background: rgba(255,255,255,0.35);
  transform: scale(1.1);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-item {
  padding: 10px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}

.detail-item .dt-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 2px;
}

.detail-item .dt-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
}

.question-list-review {
  margin-top: 1rem;
}

.q-review-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.q-review-item:last-child { border-bottom: none; }

.q-review-label {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.q-review-text {
  font-size: 0.9rem;
  color: var(--gray-700);
}

.q-review-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.78rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .interview-main {
    grid-template-columns: 1fr;
  }

  .video-preview-card {
    aspect-ratio: 4/3;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .interview-top-bar {
    flex-direction: column;
    gap: 8px;
  }
}
