/* ========================================
   RESET & GLOBAL STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* ========================================
   AUTHENTICATION STYLES
   ======================================== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.auth-card h1 {
  margin-bottom: 30px;
  color: #1a202c;
  text-align: center;
}

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

.auth-header p {
  color: #718096;
  margin-top: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
}

.auth-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  color: #718096;
}

.auth-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #4a5568;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

/* ========================================
   BUTTON STYLES
   ======================================== */
.btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  padding: 10px 20px;
  background: #e2e8f0;
  color: #2d3748;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-back {
  padding: 10px 20px;
  background: #e2e8f0;
  color: #2d3748;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 30px;
  transition: all 0.2s;
}

.btn-back:hover {
  background: #cbd5e0;
}

.btn-add {
  padding: 12px 24px;
  white-space: nowrap;
}

.btn-view {
  padding: 8px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-view:hover {
  background: #5a67d8;
}

.btn-recording {
  padding: 8px 16px;
  background: #48bb78;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-recording:hover {
  background: #38a169;
}

.btn-delete {
  padding: 8px 16px;
  background: #f56565;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-delete:hover {
  background: #e53e3e;
}

.btn-delete-admin {
  padding: 8px 16px;
  background: #f56565;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-delete-admin:hover {
  background: #e53e3e;
}

/* ========================================
   MESSAGE STYLES
   ======================================== */
.error-message {
  background: #fee;
  color: #c00;
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  display: none;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  display: none;
  text-align: center;
  border: 1px solid #c3e6cb;
}

.success-message strong {
  display: block;
  margin-bottom: 5px;
}

.success-message small {
  color: #1e7e34;
}

.error {
  color: #e53e3e;
}

/* ========================================
   DASHBOARD STYLES
   ======================================== */
.dashboard-container {
  min-height: 100vh;
  padding: 20px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 20px 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
  color: #1a202c;
}

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

.dashboard-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-content h2 {
  margin-bottom: 30px;
  color: #1a202c;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.subject-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px;
  border-radius: 12px;
  text-decoration: none;
  color: white;
  transition: transform 0.3s;
}

.subject-card:hover {
  transform: translateY(-5px);
}

.subject-card h3 {
  margin-bottom: 10px;
}

/* ========================================
   EXAM PAGE STYLES
   ======================================== */
.exam-container {
  display: flex;
  min-height: 100vh;
  background: #f7fafc;
}

.exam-sidebar {
  width: 300px;
  background: white;
  padding: 30px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.student-info {
  margin-bottom: 30px;
}

.student-info h3 {
  margin-bottom: 15px;
  color: #1a202c;
}

.student-info p {
  margin-bottom: 10px;
  color: #4a5568;
}

.recording-status {
  margin-bottom: 30px;
}

.recording-status h3 {
  margin-bottom: 15px;
  color: #1a202c;
}

.recording-status .recording-status {
  color: #2f855a;
  font-weight: 600;
  margin-bottom: 10px;
}

#camera-preview {
  margin-bottom: 10px;
  min-height: 150px;
  background: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

#recording-status {
  font-weight: 600;
}

.exam-content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

#loading {
  text-align: center;
  font-size: 18px;
  color: #4a5568;
  padding: 50px;
}

/* ========================================
   QUESTION & ANSWER STYLES
   ======================================== */
.question-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.question-section h2 {
  margin-bottom: 25px;
  color: #1a202c;
  padding-bottom: 15px;
  border-bottom: 2px solid #e2e8f0;
}

.question {
  margin-bottom: 30px;
  padding: 20px;
  background: #f7fafc;
  border-radius: 8px;
}

.question-text {
  margin-bottom: 15px;
  color: #2d3748;
  font-size: 16px;
  line-height: 1.6;
}

.option {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.option:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.option input[type="radio"] {
  margin-right: 12px;
}

.answer-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}

.answer-textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
}

.answer-input:focus,
.answer-textarea:focus {
  outline: none;
  border-color: #667eea;
}

/* ========================================
   HISTORY & STUDENT INFO STYLES
   ======================================== */
.history-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.student-info-card {
  background: #f7fafc;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border-left: 4px solid #667eea;
}

.student-info-card p {
  color: #4a5568;
  margin-bottom: 8px;
  font-size: 16px;
}

.student-info-card strong {
  color: #1a202c;
}

.exams-list {
  display: grid;
  gap: 20px;
}

.exam-history-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s;
}

.exam-history-card:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.exam-history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.exam-history-header h3 {
  color: #1a202c;
  font-size: 20px;
  margin-bottom: 5px;
}

.exam-date {
  color: #718096;
  font-size: 14px;
}

.status-badge {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pending {
  background: #eff6ff;
  color: #1e40af;
}

.status-passed {
  background: #d1fae5;
  color: #065f46;
}

.status-cheated {
  background: #fee2e2;
  color: #7f1d1d;
}

.status-failed {
  background: #fef3c7;
  color: #92400e;
}
.exam-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.score-section {
  background: #f7fafc;
  padding: 15px;
  border-radius: 8px;
}

.score-section h4 {
  color: #1a202c;
  margin-bottom: 10px;
  font-size: 16px;
}

.score-breakdown {
  margin-bottom: 15px;
}

.score-breakdown p {
  color: #4a5568;
  font-size: 14px;
  margin-bottom: 5px;
}

.auto-score {
  color: #667eea;
  font-weight: 600;
  font-size: 16px;
  margin-top: 10px;
}

.final-score-section {
  background: #f0fff4;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #48bb78;
}

.final-score-section h4 {
  color: #1a202c;
  margin-bottom: 10px;
  font-size: 16px;
}

.final-score {
  color: #48bb78;
  font-weight: 600;
  font-size: 18px;
}

.cheat-warning {
  background: #fff5f5;
  border: 1px solid #f56565;
  border-radius: 8px;
  padding: 15px;
  color: #742a2a;
}

.loading,
.no-data {
  text-align: center;
  padding: 50px;
  color: #718096;
  font-size: 18px;
}

/* ========================================
   ADMIN LAYOUT STYLES
   ======================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #f7fafc;
}

.admin-sidebar {
  width: 280px;
  background: #1a202c;
  color: white;
  padding: 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.admin-header {
  padding: 30px 20px;
  background: #2d3748;
  border-bottom: 1px solid #4a5568;
}

.admin-header h2 {
  margin-bottom: 8px;
  color: white;
  font-size: 24px;
}

.admin-header p {
  color: #a0aec0;
  font-size: 14px;
}

.admin-nav {
  padding: 20px 0;
}

.admin-nav .nav-item {
  display: block;
  padding: 15px 20px;
  color: #a0aec0;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.admin-nav .nav-item:hover {
  background: #2d3748;
  color: white;
  border-left-color: #667eea;
}

.admin-nav .nav-item.active {
  background: #2d3748;
  color: white;
  border-left-color: #667eea;
}

.admin-content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

.admin-content h1 {
  color: #1a202c;
  margin-bottom: 30px;
  font-size: 32px;
}

/* ========================================
   ADMIN FILTER & SEARCH STYLES
   ======================================== */
.filter-section {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
}

.filter-select {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  background: white;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: #667eea;
}

/* ========================================
   SUBMISSIONS LIST STYLES
   ======================================== */
.submissions-list {
  display: grid;
  gap: 20px;
}

.submission-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.submission-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.submission-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.submission-header h3 {
  color: #1a202c;
  font-size: 20px;
  margin-bottom: 5px;
}

.student-id {
  color: #718096;
  font-size: 14px;
}

.subject-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.submission-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.submission-info p {
  color: #4a5568;
  font-size: 14px;
}

.recording-badge {
  display: inline-block;
  background: #48bb78;
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
}

.no-recording {
  display: inline-block;
  background: #e2e8f0;
  color: #718096;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
}

.submission-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
}

/* ========================================
   EXAM DETAIL STYLES
   ======================================== */
.exam-detail-header {
  background: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.exam-detail-header h1 {
  color: #1a202c;
  margin-bottom: 15px;
  font-size: 28px;
}

.exam-detail-header p {
  color: #4a5568;
  margin-bottom: 8px;
  font-size: 16px;
}

.recording-info {
  background: #f0fff4;
  border: 1px solid #48bb78;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

.no-recording-info {
  color: #718096;
  font-style: italic;
  margin-top: 10px;
}

/* ========================================
   ANSWER CARD STYLES
   ======================================== */
.answers-section h2 {
  color: #1a202c;
  margin: 30px 0 20px 0;
  font-size: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.answer-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #e2e8f0;
}

.answer-card.correct {
  border-left-color: #48bb78;
  background: #f0fff4;
}

.answer-card.incorrect {
  border-left-color: #f56565;
  background: #fff5f5;
}

.answer-card h3 {
  color: #2d3748;
  margin-bottom: 15px;
  font-size: 18px;
}

.answer-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-info p {
  color: #4a5568;
  font-size: 15px;
}

.answer-info strong {
  color: #2d3748;
}

.result-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
}

.result-badge.correct {
  background: #48bb78;
  color: white;
}

.result-badge.incorrect {
  background: #f56565;
  color: white;
}

.options-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.option-item {
  padding: 8px 14px;
  background: #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  color: #4a5568;
}

.option-item.selected {
  background: #667eea;
  color: white;
  font-weight: 600;
}

.option-item.correct-option {
  border: 2px solid #48bb78;
}

.option-item.selected.correct-option {
  background: #48bb78;
}

.long-answer {
  background: #f7fafc;
  padding: 20px;
  border-radius: 8px;
  color: #2d3748;
  line-height: 1.8;
  font-size: 15px;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-top: 10px;
}

.long-answer-card {
  border-left-color: #667eea;
}

.long-answer-text {
  background: #f7fafc;
  padding: 20px;
  border-radius: 8px;
  color: #2d3748;
  line-height: 1.8;
  font-size: 15px;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-top: 10px;
  border: 1px solid #e2e8f0;
}

.sample-answer {
  background: #fffaf0;
  border: 1px solid #ed8936;
  padding: 20px;
  border-radius: 8px;
  color: #744210;
  line-height: 1.8;
  font-size: 15px;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-top: 10px;
}

.no-answers {
  text-align: center;
  padding: 50px;
  color: #718096;
  font-size: 18px;
  background: white;
  border-radius: 12px;
}

/* ========================================
   ADMIN MANAGEMENT STYLES
   ======================================== */
.add-admin-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.add-admin-section h2 {
  margin-bottom: 20px;
  color: #1a202c;
}

.admin-form .form-row {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.admin-form .form-group {
  flex: 1;
  min-width: 200px;
}

.admin-form .form-group label {
  display: block;
  margin-bottom: 8px;
  color: #4a5568;
  font-weight: 500;
}

.admin-form .form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
}

.admin-form .form-group input:focus {
  outline: none;
  border-color: #667eea;
}

.admins-list-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admins-list-section h2 {
  margin-bottom: 20px;
  color: #1a202c;
}

.admins-list {
  display: grid;
  gap: 15px;
}

.admin-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.admin-info h3 {
  color: #1a202c;
  margin-bottom: 5px;
}

.admin-username {
  color: #667eea;
  font-size: 14px;
  margin-bottom: 5px;
}

.admin-created {
  color: #718096;
  font-size: 12px;
}

/* ========================================
   QUESTION MANAGEMENT STYLES
   ======================================== */
.add-question-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.add-question-section h2 {
  margin-bottom: 20px;
  color: #1a202c;
}

.question-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.question-form .form-group {
  margin-bottom: 20px;
}

.question-form .form-group label {
  display: block;
  margin-bottom: 8px;
  color: #4a5568;
  font-weight: 500;
}

.question-form .form-group input,
.question-form .form-group select,
.question-form .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}

.question-form .form-group input:focus,
.question-form .form-group select:focus,
.question-form .form-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

.questions-list-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.questions-list-section h2 {
  margin-bottom: 20px;
  color: #1a202c;
}

.questions-list {
  display: grid;
  gap: 20px;
}

.question-card {
  background: #f7fafc;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}

.question-card-header {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.type-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #e2e8f0;
  color: #4a5568;
}

.type-badge.multiple_choice {
  background: #bee3f8;
  color: #2b6cb0;
}

.type-badge.fill_in_blank {
  background: #fefcbf;
  color: #975a16;
}

.type-badge.long_answer {
  background: #c6f6d5;
  color: #276749;
}

.question-card-body {
  margin-bottom: 15px;
}

.question-card-body .question-text {
  color: #1a202c;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.options-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.option-tag {
  padding: 6px 12px;
  background: #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  color: #4a5568;
}

.option-tag.correct {
  background: #48bb78;
  color: white;
}

.correct-answer-preview {
  color: #4a5568;
  font-size: 14px;
  margin-top: 10px;
}

.sample-preview {
  color: #718096;
  font-size: 14px;
  margin-top: 10px;
  font-style: italic;
}

.question-card-actions {
  display: flex;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
}

/* ========================================
   RECORDING PLAYER MODAL & VIDEO
   ======================================== */

.modal-header {
  position: relative;
  padding: 20px 40px 20px 20px;
}
.recording-modal-content {
  max-width: 900px;
  width: 95%;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  padding: 0;
  overflow: hidden;
}

.recording-player-container {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 32px 24px;
}

.recording-player {
  flex: 1 1 340px;
  max-width: 420px;
  min-width: 280px;
  background: #f7fafc;
  border-radius: 12px;
  padding: 18px 18px 24px 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.recording-player h3 {
  margin-bottom: 12px;
  color: #2d3748;
  font-size: 18px;
}

.recording-player video {
  width: 100%;
  max-width: 370px;
  min-height: 220px;
  max-height: 340px;
  background: #222;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  outline: none;
}

.recording-status-text {
  font-size: 14px;
  margin-top: 2px;
  color: #718096;
}

.recording-status-text.available {
  color: #38a169;
}

.recording-status-text.unavailable {
  color: #e53e3e;
}

/* Modal overlay (if not already present) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 41, 59, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal close button */
.btn-close {
  background: none;
  border: none;
  font-size: 3rem;
  color: #718096;
  cursor: pointer;
  position: absolute;
  top: 18px;
  right: 28px;
  transition: color 0.2s;
}

.btn-close:hover {
  color: #e53e3e;
}

/* ====== "View Recording" Button ====== */
.btn-view-recording,
.btn-recording {
  padding: 10px 26px;
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(72, 187, 120, 0.08);
  transition: background 0.18s, transform 0.18s;
  margin-top: 10px;
  margin-bottom: 4px;
  display: inline-block;
}

.btn-view-recording:hover,
.btn-recording:hover {
  background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
  transform: translateY(-2px) scale(1.03);
  color: #fff;
}

/* ========================================
   RECORDINGS MANAGEMENT STYLES
   ======================================== */
.view-description {
  color: #718096;
  margin-bottom: 20px;
  font-size: 15px;
}

.recordings-list {
  display: grid;
  gap: 20px;
}

.recording-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 2px solid transparent;
  transition: all 0.3s;
}

.recording-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.recording-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.recording-header h3 {
  color: #1a202c;
  font-size: 18px;
  margin-bottom: 5px;
}

.recording-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recording-info p {
  color: #4a5568;
  font-size: 14px;
}

.recording-files {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.recording-files span {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.file-available {
  background: #d1fae5;
  color: #065f46;
}

.file-missing {
  background: #fee2e2;
  color: #7f1d1d;
}

.recording-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
}

.recording-actions .btn-view:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
}

.recording-actions .btn-view:disabled:hover {
  background: #cbd5e0;
}

/* ========================================
   GRADING ACTIONS STYLES
   ======================================== */
.grading-actions {
  background: white;
  padding: 30px;
  border-radius: 12px;
  margin-top: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.grading-actions h2 {
  color: #1a202c;
  margin-bottom: 15px;
}

.grading-actions p {
  color: #4a5568;
  margin-bottom: 20px;
}

.grading-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-pass {
  padding: 12px 30px;
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-pass:hover {
  transform: translateY(-2px);
}

.btn-cheat {
  padding: 12px 30px;
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-cheat:hover {
  transform: translateY(-2px);
}

.grading-actions.graded {
  background: #f0fff4;
  border: 2px solid #48bb78;
}

.la-score-input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.la-score-input label {
  color: #2d3748;
}

.la-score {
  width: 80px;
  padding: 8px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
}

.la-score:focus {
  outline: none;
  border-color: #667eea;
}

.la-score:disabled {
  background: #f7fafc;
  color: #718096;
}

/* ========================================
   SUBMISSION BADGES
   ======================================== */
.submission-badges {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  .exam-container {
    flex-direction: column;
  }

  .exam-sidebar {
    width: 100%;
  }

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

  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
  }

  .filter-section {
    flex-direction: column;
  }

  .search-input {
    min-width: 100%;
  }

  .question-form .form-row {
    grid-template-columns: 1fr;
  }

  .exam-scores {
    grid-template-columns: 1fr;
  }

  .recording-player-container {
    flex-direction: column;
    gap: 18px;
    padding: 18px 6px;
  }

  .recording-player {
    max-width: 100%;
    min-width: 0;
  }

  .recording-player video {
    max-width: 100%;
    min-height: 180px;
    max-height: 240px;
  }
}
