/* =============================================
   EPIC ACADEMIC INTEGRITY SUITE — STYLESHEET
   Epic Systems Nexus — epicsystemsnexus.africa
   ============================================= */

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

:root {
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --success: #16a34a;
  --success-light: #dcfce7;
  --grey: #6b7280;
  --grey-light: #f3f4f6;
  --grey-border: #e5e7eb;
  --text: #111827;
  --text-sub: #6b7280;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --radius: 8px;
  --radius-lg: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- NAVBAR --- */
.demo-banner {
  background: var(--warning-light);
  color: var(--warning);
  border-bottom: 1px solid #fcd34d;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
}

.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--grey-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo-img { height: 40px; width: 40px; object-fit: contain; border-radius: 8px; }
.nav-logo {
  width: 38px; height: 38px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.nav-title { display: block; font-weight: 700; font-size: 0.95rem; color: var(--text); }
.nav-sub { display: block; font-size: 0.72rem; color: var(--text-sub); }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  color: var(--text-sub);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}
.nav-link:hover { background: var(--grey-light); color: var(--text); text-decoration: none; }
.nav-link-active { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  color: var(--text-sub);
  font-size: 0.875rem;
  font-weight: 500;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 0.3rem;
  font-family: inherit;
}
.nav-dropdown-toggle:hover, .nav-dropdown.nav-dropdown-open .nav-dropdown-toggle {
  background: var(--grey-light); color: var(--text);
}
.nav-dropdown-toggle .caret { font-size: 0.65rem; transition: transform 0.15s; }
.nav-dropdown.nav-dropdown-open .caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px); left: 0;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  z-index: 100;
}
.nav-dropdown.nav-dropdown-open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.875rem;
  text-decoration: none;
}
.nav-dropdown-menu a:hover { background: var(--grey-light); text-decoration: none; }
.nav-dropdown-menu a.nav-link-active { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }
.nav-dropdown-menu .nav-dropdown-hint {
  padding: 0.4rem 0.6rem 0.3rem;
  font-size: 0.72rem;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 900px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 0.75rem;
    display: none;
  }
  .nav-dropdown.nav-dropdown-open .nav-dropdown-menu { display: block; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--grey-border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    gap: 0.25rem;
    z-index: 99;
  }
  .nav-links.nav-links-open { display: flex; }
  .nav-user { margin-left: 0; padding-left: 0; border-left: none; border-top: 1px solid var(--grey-border); padding-top: 0.5rem; margin-top: 0.25rem; flex-direction: column; align-items: stretch; gap: 0.5rem; }
}
.nav-user { display: flex; align-items: center; gap: 0.75rem; margin-left: 1rem; padding-left: 1rem; border-left: 1px solid var(--grey-border); }
.nav-username { font-size: 0.875rem; font-weight: 500; color: var(--text); }
.nav-logout {
  font-size: 0.8rem;
  color: var(--danger);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--danger);
  border-radius: 6px;
}
.nav-logout:hover { background: var(--danger); color: white; text-decoration: none; }

/* --- MAIN & FOOTER --- */
.main-content { min-height: calc(100vh - 64px - 50px); }
.footer {
  background: var(--white);
  border-top: 1px solid var(--grey-border);
  text-align: center;
  padding: 0.85rem;
  font-size: 0.75rem;
  color: var(--text-sub);
}

/* --- PAGE WRAPPER --- */
.page-wrapper { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

/* --- PAGE HEADER --- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-title { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.page-sub { font-size: 0.875rem; color: var(--text-sub); margin-top: 0.2rem; }
.header-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* --- MESSAGES --- */
.messages-container { max-width: 1100px; margin: 1rem auto 0; padding: 0 1.5rem; }
.message {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
}
.message-error { background: var(--danger-light); color: var(--danger); border: 1px solid #fca5a5; }
.message-success { background: var(--success-light); color: var(--success); border: 1px solid #86efac; }
.message-warning { background: var(--warning-light); color: var(--warning); border: 1px solid #fcd34d; }
.message-close { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: inherit; padding: 0 0.25rem; }

/* --- SCOPE NOTICE --- */
/* Tells a split (programme-assigned) lecturer that what they're looking
   at is a subset of the course, not the whole roster/results — shown on
   course_detail, assignment_detail, and similarity_results whenever
   lecturer_visible_programme_names() returns a restricted list instead
   of None. */
.scope-notice {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid var(--primary);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.scope-notice strong { font-weight: 700; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-outline { background: white; color: var(--text); border: 1px solid var(--grey-border); }
.btn-outline:hover { background: var(--grey-light); color: var(--text); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }
.btn-full { width: 100%; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }

/* --- CARDS --- */
.section-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.section-card-danger { border-color: #fca5a5; background: #fff8f8; }
.section-card-viva { border-color: #93c5fd; background: #f0f7ff; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }

/* --- STATS GRID --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stats-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 500px; }
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-icon-blue { background: var(--primary-light); }
.stat-icon-red { background: var(--danger-light); }
.stat-icon-orange { background: var(--warning-light); }
.stat-icon-green { background: var(--success-light); }
.stat-info { display: flex; flex-direction: column; }
.stat-number { font-size: 1.75rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-sub); margin-top: 0.2rem; }

/* --- COURSES GRID --- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.course-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: block;
  transition: all 0.15s;
  box-shadow: var(--shadow);
  color: var(--text);
}
.course-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-1px);
}
.course-code { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.course-name { font-size: 0.95rem; font-weight: 600; margin: 0.3rem 0; }
.course-meta { font-size: 0.8rem; color: var(--text-sub); }
.course-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-sub);
}
.course-status { margin-top: 0.5rem; }

/* --- BADGES --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green { background: var(--success-light); color: var(--success); }
.badge-grey { background: var(--grey-light); color: var(--grey); }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-orange { background: var(--warning-light, #fff4e5); color: var(--warning, #b45309); }

/* --- RISK BADGES --- */
.risk-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.risk-high { background: var(--danger-light); color: var(--danger); }
.risk-medium { background: var(--warning-light); color: var(--warning); }
.risk-low { background: var(--success-light); color: var(--success); }
.risk-unknown { background: var(--grey-light); color: var(--grey); }

/* --- REVIEW STATUS SELECT (similarity matches) --- */
.review-badge,
.review-select {
  -webkit-appearance: none;
  appearance: none;
  padding: 0.3rem 1.75rem 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.review-not_reviewed, .review-select-not_reviewed {
  background-color: var(--grey-light); color: var(--grey); border-color: var(--grey-border);
}
.review-discussed, .review-select-discussed {
  background-color: var(--primary-light); color: var(--primary); border-color: var(--primary);
}
.review-cleared, .review-select-cleared {
  background-color: var(--success-light); color: var(--success); border-color: var(--success);
}
.review-escalated, .review-select-escalated {
  background-color: var(--danger-light); color: var(--danger); border-color: var(--danger);
}

/* --- STAT STRIP --- */
.stat-strip {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.stat-card-danger { border-color: var(--danger); }
.stat-number { font-size: 1.75rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.stat-card-danger .stat-number { color: var(--danger); }
.stat-label { font-size: 0.8rem; color: var(--text-sub); margin-top: 0.15rem; }

/* --- COLLAPSIBLE STUDENT CARDS --- */
.review-roster { display: flex; flex-direction: column; gap: 0.6rem; }
.card-list { display: flex; flex-direction: column; gap: 0.75rem; }
.card {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--grey-border);
  border-radius: 8px;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.card-title { font-weight: 700; margin-bottom: 0.35rem; }
.card-sub { font-size: 0.875rem; color: var(--text-sub); }

.review-card {
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.review-card-danger { border-left: 4px solid var(--danger); }
.review-card-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}
.review-card-summary::-webkit-details-marker { display: none; }
.review-card-summary::after {
  content: '▸';
  margin-left: auto;
  color: var(--grey);
  transition: transform 0.15s ease;
}
.review-card[open] .review-card-summary::after { transform: rotate(90deg); }
.review-card[open] .review-card-summary { border-bottom: 1px solid var(--grey-border); }

.review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.review-avatar-danger { background: var(--danger-light); color: var(--danger); }
.review-avatar-warning { background: var(--warning-light); color: var(--warning); }

.review-summary-main { display: flex; flex-direction: column; margin-right: 0.5rem; }
.review-summary-name { font-weight: 600; color: var(--text); }
.review-summary-stat { font-size: 0.8rem; color: var(--text-sub); white-space: nowrap; }
.review-summary-score { font-weight: 700; font-size: 0.85rem; white-space: nowrap; }

.severity-meter {
  width: 80px; height: 6px;
  background: var(--grey-light);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.severity-meter-sm { width: 60px; margin-top: 0.35rem; }
.severity-meter-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--warning), var(--danger));
  border-radius: 999px;
}

.review-card-body { padding: 0.75rem 1rem; background: var(--grey-light); }
.review-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--grey-border);
}
.review-match-row:last-child { border-bottom: none; }
.review-match-main { display: flex; flex-direction: column; gap: 0.15rem; }
.review-match-vs { font-weight: 600; color: var(--text); }

/* --- STATUS BADGES --- */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-pending { background: var(--warning-light); color: var(--warning); }
.status-analysed { background: var(--primary-light); color: var(--primary); }
.status-flagged { background: var(--danger-light); color: var(--danger); }
.status-cleared { background: var(--success-light); color: var(--success); }
.status-awaiting_payment { background: var(--grey-light); color: var(--grey); }
.status-processing { background: var(--primary-light); color: var(--primary); }
.status-complete { background: var(--success-light); color: var(--success); }
.status-failed { background: var(--danger-light); color: var(--danger); }

/* --- MARKING STATUS BADGES --- */
.marking-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.3rem;
}
.marking-marked { background: var(--success-light); color: var(--success); }
.marking-unmarked { background: var(--grey-light); color: var(--grey); }

/* --- IMPORT REVIEW BADGES --- */
.import-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.import-new { background: var(--success-light); color: var(--success); }
.import-update { background: var(--primary-light); color: var(--primary); }
.import-unchanged { background: var(--grey-light); color: var(--grey); }
.import-warning { background: var(--warning-light); color: var(--warning); }
.import-skipped { background: var(--danger-light); color: var(--danger); }

/* --- TABLES --- */
.table-wrapper { overflow-x: auto; overflow-y: visible; }
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.filter-tabs a {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--grey, #6b7280);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.filter-tabs a:hover {
  color: var(--primary);
}
.filter-tabs a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  background: var(--grey-light);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-sub);
  border-bottom: 1px solid var(--grey-border);
}
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--grey-border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }
.data-table td:first-child { border-left: 4px solid transparent; }
.row-high td:first-child { border-left-color: var(--danger); }
.row-medium td:first-child { border-left-color: var(--warning); }
.student-name { font-weight: 600; }
.student-reg { font-size: 0.78rem; color: var(--text-sub); }
.file-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  background: var(--grey-light);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-sub);
  margin-right: 0.35rem;
}
.actions-cell { display: flex; gap: 0.5rem; flex-wrap: nowrap; align-items: center; }

/* --- FORMS --- */
.form-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 680px;
  box-shadow: var(--shadow);
}
.main-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--grey-border);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  transition: border-color 0.15s;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
}
.form-hint { font-size: 0.78rem; color: var(--text-sub); }
.required { color: var(--danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 0.5rem; }

/* --- IMPORT PREVIEW --- */
.import-summary { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.import-chip {
  flex: 1;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.import-chip-ready { background: var(--success-light); border-color: #86efac; }
.import-chip-error { background: var(--danger-light); border-color: #fca5a5; }
.import-chip-number { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.import-chip-ready .import-chip-number { color: var(--success); }
.import-chip-error .import-chip-number { color: var(--danger); }
.import-chip-label { font-size: 0.8rem; color: var(--text-sub); font-weight: 600; }
.import-row-error { background: var(--danger-light); }
.import-row-error td { color: #7f1d1d; }
.import-row-ready td:first-child { border-left: 3px solid var(--success); }
.import-row-error td:first-child { border-left: 3px solid var(--danger); }

/* --- IMPORT UPLOAD PAGE --- */
.import-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .import-layout { grid-template-columns: 1fr; } }
.dropzone {
  border: 2px dashed var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--grey-light);
}
.dropzone:hover, .dropzone.dropzone-active { border-color: var(--primary); background: #eef2ff; }
.dropzone-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.dropzone-title { font-weight: 700; margin-bottom: 0.25rem; }
.dropzone-sub { font-size: 0.85rem; color: var(--text-sub); }
.dropzone-filename { margin-top: 1rem; font-weight: 600; color: var(--primary); font-size: 0.9rem; }
.requirement-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.requirement-list li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.88rem; }
.requirement-icon { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 800; margin-top: 0.1rem; }
.requirement-icon-required { background: var(--danger-light); color: var(--danger); }
.requirement-icon-optional { background: var(--grey-light); color: var(--text-sub); }

/* --- INTEGRITY OVERVIEW --- */
.integrity-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 900px) { .integrity-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.integrity-stat-card {
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  background: white;
}
.integrity-stat-number { font-size: 1.7rem; font-weight: 800; line-height: 1; display:block; margin-bottom: 0.35rem; }
.integrity-stat-label { font-size: 0.8rem; color: var(--text-sub); font-weight: 600; }
.integrity-stat-danger .integrity-stat-number { color: var(--danger); }
.integrity-stat-warning .integrity-stat-number { color: var(--warning); }
.integrity-stat-success .integrity-stat-number { color: var(--success); }

.risk-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 0.75rem 0; background: var(--grey-light); }
.risk-bar-segment { height: 100%; }
.risk-bar-high { background: var(--danger); }
.risk-bar-medium { background: var(--warning); }
.risk-bar-low { background: var(--success); }
.risk-bar-unknown { background: var(--grey-border); }
.risk-legend { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-sub); }
.risk-legend-item { display: flex; align-items: center; gap: 0.4rem; }
.risk-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.leaderboard-row { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--grey-border); }
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-course { font-weight: 600; font-size: 0.88rem; }
.leaderboard-count { font-weight: 700; color: var(--danger); font-size: 0.9rem; }

/* --- SETTINGS LAYOUT --- */
.settings-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
}
.logo-dropzone {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo-preview-circle {
  width: 72px; height: 72px;
  border-radius: 14px;
  background: var(--grey-light);
  border: 1px solid var(--grey-border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-sub);
}
.logo-preview-circle img { width: 100%; height: 100%; object-fit: contain; }
.logo-upload-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--grey-border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: white;
}
.logo-upload-btn:hover { background: var(--grey-light); }
.settings-preview-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  background: var(--white);
}
.settings-preview-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-sub);
  margin-bottom: 0.75rem;
}
.checkbox-group { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.checkbox-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.875rem; font-weight: 500; cursor: pointer; }
.inline-form { display: inline; }
.filter-form { padding: 0; }
.filter-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; align-items: end; }
.filter-actions { display: flex; align-items: flex-end; }

/* --- AUTH --- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  padding: 2rem;
}
.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo-circle {
  width: 64px; height: 64px;
  background: var(--primary);
  color: white;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 auto 1rem;
}
.auth-title { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.auth-sub { font-size: 0.85rem; color: var(--text-sub); margin-top: 0.25rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-sub); }

/* --- HOME PAGE --- */
.home-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.home-hero { text-align: center; color: white; margin-bottom: 3rem; }
.home-logo-circle {
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.2);
  border: 3px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 800; color: white;
  margin: 0 auto 1.25rem;
}
.home-title { font-size: 2rem; font-weight: 800; color: white; }
.home-sub { font-size: 1rem; color: rgba(255,255,255,0.75); margin-top: 0.5rem; }
.home-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 700px; width: 100%; }
.home-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  display: block;
  transition: all 0.2s;
  color: var(--text);
}
.home-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.2); text-decoration: none; }
.home-card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.home-card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.75rem; }
.home-card-desc { font-size: 0.875rem; color: var(--text-sub); margin-bottom: 1.25rem; line-height: 1.6; }
.home-card-btn { color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.home-footer { color: rgba(255,255,255,0.5); font-size: 0.78rem; margin-top: 3rem; }

/* --- UPLOAD ZONE --- */
.upload-zone {
  border: 2px dashed var(--grey-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.upload-zone:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-icon { font-size: 2.5rem; color: var(--text-sub); display: block; margin-bottom: 0.75rem; }
.upload-text { font-weight: 600; color: var(--text); }
.upload-hint { font-size: 0.8rem; color: var(--text-sub); margin-top: 0.4rem; }
.upload-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.file-selected { font-size: 0.875rem; margin-top: 0.5rem; font-weight: 500; }

/* --- SUCCESS PAGE --- */
.success-card {
  max-width: 580px;
  margin: 3rem auto;
  background: white;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.success-icon {
  width: 72px; height: 72px;
  background: var(--success-light);
  color: var(--success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700;
  margin: 0 auto 1.5rem;
}
.success-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.success-sub { color: var(--text-sub); margin-bottom: 2rem; }
.reference-box {
  background: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}
.reference-label { font-size: 0.8rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.reference-number { font-size: 1.75rem; font-weight: 900; color: var(--primary); letter-spacing: 0.1em; margin: 0.25rem 0; }
.reference-hint { font-size: 0.78rem; color: var(--text-sub); }
.submission-summary { text-align: left; border: 1px solid var(--grey-border); border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.summary-row { display: flex; padding: 0.7rem 1rem; border-bottom: 1px solid var(--grey-border); font-size: 0.875rem; }
.summary-row:last-child { border-bottom: none; }
.summary-label { font-weight: 600; width: 130px; flex-shrink: 0; color: var(--text-sub); }
.summary-value { color: var(--text); }
.success-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* --- STUDENT VERIFIED BANNER --- */
.student-verified-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--success-light);
  border: 1px solid #86efac;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.verified-icon {
  width: 36px; height: 36px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  flex-shrink: 0;
}
.verified-name { font-weight: 700; color: var(--text); }
.verified-reg { font-size: 0.8rem; color: var(--text-sub); }

/* --- ASSIGNMENT INFO BOX --- */
.assignment-info-box {
  background: var(--grey-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.info-row { display: flex; gap: 1rem; padding: 0.4rem 0; font-size: 0.875rem; }
.info-label { font-weight: 600; width: 140px; flex-shrink: 0; color: var(--text-sub); }
.info-value { color: var(--text); }

/* --- ASSIGNMENTS LIST --- */
.assignments-list { display: flex; flex-direction: column; gap: 0.5rem; }
.assignment-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all 0.15s;
}
.assignment-item:hover { border-color: var(--primary); background: var(--primary-light); text-decoration: none; }
.assignment-info { flex: 1; }
.assignment-title { font-weight: 600; }
.assignment-meta { font-size: 0.8rem; color: var(--text-sub); margin-top: 0.2rem; }
.assignment-stats { margin-right: 1rem; }
.assignment-arrow { color: var(--text-sub); font-size: 1.2rem; }

/* --- DETAIL GRID --- */
.detail-grid { display: flex; flex-direction: column; }
.detail-row { display: flex; padding: 0.75rem 0; border-bottom: 1px solid var(--grey-border); font-size: 0.9rem; }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 600; width: 180px; flex-shrink: 0; color: var(--text-sub); }
.detail-value { color: var(--text); }

/* --- TEXT PREVIEW --- */
.text-preview {
  background: var(--grey-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  color: var(--text);
}

/* --- ANALYSIS RESULT --- */
.risk-banner {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.risk-banner-high { background: var(--danger-light); color: var(--danger); border: 1px solid #fca5a5; }
.risk-banner-medium { background: var(--warning-light); color: var(--warning); border: 1px solid #fcd34d; }
.risk-banner-low { background: var(--success-light); color: var(--success); border: 1px solid #86efac; }

.score-layout { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.score-circle {
  width: 130px; height: 130px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 6px solid;
}
.score-circle.score-high { border-color: var(--danger); background: var(--danger-light); }
.score-circle.score-medium { border-color: var(--warning); background: var(--warning-light); }
.score-circle.score-low { border-color: var(--success); background: var(--success-light); }
.score-number { font-size: 2.2rem; font-weight: 900; line-height: 1; }
.score-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.2rem; }
.score-details { flex: 1; }
.verdict-line { display: flex; gap: 0.75rem; margin-bottom: 0.4rem; font-size: 0.9rem; }
.verdict-label { font-weight: 600; color: var(--text-sub); width: 90px; }
.verdict-value { color: var(--text); font-weight: 500; }
.summary-text { margin-top: 1rem; font-size: 0.9rem; line-height: 1.7; color: var(--text); padding: 1rem; background: var(--grey-light); border-radius: var(--radius); }

/* --- INDICATORS --- */
.indicators-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.indicators-heading { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.indicators-ai { color: var(--danger); }
.indicators-human { color: var(--success); }
.indicators-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.indicator-item { padding: 0.5rem 0.85rem; border-radius: 6px; font-size: 0.875rem; }
.indicator-ai { background: var(--danger-light); color: var(--danger); }
.indicator-human { background: var(--success-light); color: var(--success); }

/* --- SECTION BARS --- */
.section-bars { display: flex; flex-direction: column; gap: 1.25rem; }
.section-bar-item {}
.section-bar-header { display: flex; justify-content: space-between; margin-bottom: 0.4rem; font-size: 0.875rem; }
.section-bar-name { font-weight: 600; }
.section-bar-score { font-weight: 700; }
.score-high { color: var(--danger); }
.score-medium { color: var(--warning); }
.score-low { color: var(--success); }
.section-bar-track { height: 10px; background: var(--grey-light); border-radius: 999px; overflow: hidden; }
.section-bar-fill { height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.fill-high { background: var(--danger); }
.fill-medium { background: var(--warning); }
.fill-low { background: var(--success); }
.section-bar-note { font-size: 0.78rem; color: var(--text-sub); margin-top: 0.3rem; }

/* --- FLAGGED SENTENCES --- */
.flagged-list { display: flex; flex-direction: column; gap: 1rem; }
.flagged-item { border-left: 4px solid var(--danger); padding: 0.85rem 1rem; background: var(--danger-light); border-radius: 0 var(--radius) var(--radius) 0; }
.flagged-sentence { font-style: italic; font-size: 0.9rem; color: var(--text); margin-bottom: 0.4rem; }
.flagged-reason { font-size: 0.8rem; color: var(--danger); font-weight: 600; }

.style-metric-list { display: flex; flex-direction: column; gap: 0.5rem; }
.style-metric-row { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0.9rem; background: var(--grey-light); border-radius: var(--radius); font-size: 0.85rem; }
.style-metric-flagged { background: var(--warning-light); border-left: 4px solid var(--warning); }
.style-metric-label { font-weight: 600; color: var(--text); }
.style-metric-values { color: var(--text-sub); font-size: 0.8rem; }

/* --- VIVA LIST --- */
.viva-list { padding-left: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.viva-item {}
.viva-question { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.viva-purpose { font-size: 0.8rem; color: var(--text-sub); margin-top: 0.25rem; font-style: italic; }

/* --- PRINT CARDS --- */
.print-card {
  background: white;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

/* --- VIVA PRINT CARD --- */
.viva-print-card { font-family: 'Times New Roman', serif; }
.viva-print-header { text-align: center; margin-bottom: 1rem; }
.viva-print-logo { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.viva-print-sub { font-size: 0.8rem; color: var(--text-sub); margin-top: 0.25rem; }
.viva-print-warning {
  background: var(--danger-light);
  color: var(--danger);
  text-align: center;
  padding: 0.6rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  border: 2px solid var(--danger);
}
.viva-print-info { border: 1px solid var(--grey-border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.25rem; }
.viva-info-row { display: flex; border-bottom: 1px solid var(--grey-border); font-size: 0.875rem; }
.viva-info-row:last-child { border-bottom: none; }
.viva-info-label { font-weight: 700; width: 160px; padding: 0.5rem 0.85rem; background: var(--grey-light); flex-shrink: 0; }
.viva-info-value { padding: 0.5rem 0.85rem; }
.viva-print-instruction {
  font-style: italic;
  font-size: 0.875rem;
  color: var(--text-sub);
  border-left: 3px solid var(--primary);
  padding: 0.5rem 0.85rem;
  margin-bottom: 1.25rem;
}
.viva-questions-section { margin-bottom: 1.5rem; }
.viva-questions-title { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; margin-bottom: 0.75rem; color: var(--primary); }
.viva-print-questions { padding-left: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.viva-print-question {}
.viva-q-text { font-weight: 600; font-size: 0.9rem; }
.viva-q-purpose { font-size: 0.8rem; color: var(--text-sub); margin-top: 0.25rem; font-style: italic; }
.viva-outcome-section { border-top: 2px solid var(--text); padding-top: 1.25rem; }
.viva-outcome-title { font-weight: 700; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 0.75rem; }
.viva-outcome-options { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.viva-outcome-opt { font-size: 0.875rem; font-weight: 600; }
.viva-outcome-sign { display: flex; flex-direction: column; gap: 0.75rem; }
.viva-sign-line { font-size: 0.875rem; border-bottom: 1px solid var(--text); padding-bottom: 0.5rem; }

/* --- EVIDENCE REPORT --- */
.evidence-print-card { font-family: Arial, sans-serif; }
.evidence-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 1rem; }
.evidence-logo-area { display: flex; align-items: center; gap: 1rem; }
.evidence-logo-circle {
  width: 52px; height: 52px;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800;
  flex-shrink: 0;
}
.evidence-org { font-weight: 800; font-size: 0.95rem; }
.evidence-sub { font-size: 0.75rem; color: var(--text-sub); }
.evidence-title-area { text-align: right; }
.evidence-doc-title { font-weight: 800; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.evidence-doc-ref { font-size: 0.8rem; color: var(--text-sub); margin-top: 0.2rem; }
.evidence-doc-date { font-size: 0.8rem; color: var(--text-sub); }
.evidence-divider { height: 3px; background: var(--primary); border-radius: 2px; margin-bottom: 1.5rem; }
.evidence-section { margin-bottom: 1.5rem; }
.evidence-section-title {
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  border-bottom: 1px solid var(--grey-border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.85rem;
}
.evidence-info-grid { display: flex; flex-direction: column; }
.evidence-info-row { display: flex; font-size: 0.875rem; padding: 0.45rem 0; border-bottom: 1px solid var(--grey-border); }
.evidence-info-row:last-child { border-bottom: none; }
.evidence-info-label { font-weight: 700; width: 200px; flex-shrink: 0; color: var(--text-sub); }
.evidence-info-value { color: var(--text); }
.evidence-score-banner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.evidence-score-high { background: var(--danger-light); border: 2px solid var(--danger); }
.evidence-score-medium { background: var(--warning-light); border: 2px solid var(--warning); }
.evidence-score-low { background: var(--success-light); border: 2px solid var(--success); }
.evidence-score-main { display: flex; flex-direction: column; align-items: center; }
.evidence-score-number { font-size: 2.5rem; font-weight: 900; line-height: 1; }
.evidence-score-label { font-size: 0.72rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; }
.evidence-score-details { font-size: 0.875rem; display: flex; flex-direction: column; gap: 0.3rem; }
.evidence-summary { font-size: 0.875rem; line-height: 1.7; padding: 0.85rem; background: var(--grey-light); border-radius: var(--radius); }
.evidence-indicators-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.evidence-indicator-heading { font-weight: 700; font-size: 0.85rem; margin-bottom: 0.5rem; }
.evidence-list { padding-left: 1.25rem; font-size: 0.875rem; display: flex; flex-direction: column; gap: 0.3rem; }
.evidence-list-ai li { color: var(--danger); }
.evidence-list-human li { color: var(--success); }
.evidence-note { font-size: 0.8rem; color: var(--text-sub); font-style: italic; margin-bottom: 0.85rem; }
.evidence-flagged-item { border-left: 3px solid var(--danger); padding: 0.75rem 1rem; background: var(--danger-light); border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 0.75rem; }
.evidence-flagged-sentence { font-style: italic; font-size: 0.875rem; margin-bottom: 0.3rem; }
.evidence-flagged-reason { font-size: 0.8rem; color: var(--danger); font-weight: 600; }
.evidence-viva-list { padding-left: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.evidence-viva-item {}
.evidence-viva-q { font-weight: 600; font-size: 0.875rem; }
.evidence-viva-purpose { font-size: 0.8rem; color: var(--text-sub); font-style: italic; margin-top: 0.2rem; }
.evidence-outcome-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.evidence-outcome-box {
  border: 1.5px solid var(--text);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.evidence-sign-section { display: flex; flex-direction: column; gap: 1rem; }
.evidence-sign-row { font-size: 0.875rem; border-bottom: 1px solid var(--text); padding-bottom: 0.75rem; }
.evidence-footer-note {
  font-size: 0.72rem;
  color: var(--text-sub);
  border-top: 1px solid var(--grey-border);
  padding-top: 1rem;
  margin-top: 1.5rem;
  line-height: 1.6;
  font-style: italic;
}

/* --- EMPTY STATE --- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-sub);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 1.25rem; }

/* --- ACTION BUTTONS --- */
.action-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .stats-grid, .stats-grid-3, .stats-grid-4 { grid-template-columns: 1fr 1fr; }
  .home-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .indicators-grid { grid-template-columns: 1fr; }
  .evidence-indicators-grid { grid-template-columns: 1fr; }
  .evidence-outcome-boxes { grid-template-columns: 1fr; }
  .score-layout { flex-direction: column; }
  .page-header { flex-direction: column; }
}

@media (max-width: 480px) {
  .stats-grid, .stats-grid-3, .stats-grid-4 { grid-template-columns: 1fr; }
  .auth-card { padding: 1.5rem; }
  .print-card { padding: 1rem; }
}
/* --- AUTOCOMPLETE SUGGESTIONS --- */
.suggestions-box {
  border: 1px solid var(--grey-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: white;
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
  position: absolute;
  width: 100%;
  z-index: 50;
  left: 0;
  top: 100%;
}
.suggestion-item {
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  cursor: pointer;
  border-bottom: 1px solid var(--grey-border);
  color: var(--text);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--primary-light); color: var(--primary); }
/* --- LANDING PAGE --- */
.landing-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.landing-hero {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 60%, #0f172a 100%);
  padding: 6rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 60%);
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.landing-hero-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.landing-logo-circle {
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 900; color: white;
  margin: 0 auto 1.5rem;
  backdrop-filter: blur(10px);
}
.landing-title {
  font-size: 3rem;
  font-weight: 900;
  color: white;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.landing-tagline {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.landing-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.landing-cta-btn {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.landing-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  text-decoration: none;
  color: var(--primary-dark);
}

.landing-statement {
  background: white;
  padding: 4rem 2rem;
  border-bottom: 1px solid var(--grey-border);
}
.landing-statement-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.landing-statement-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.landing-statement-text {
  font-size: 1rem;
  color: var(--text-sub);
  line-height: 1.9;
  margin-bottom: 1rem;
}

.landing-features {
  background: #f8fafc;
  padding: 4rem 2rem;
}
.landing-features-inner { max-width: 1100px; margin: 0 auto; }
.landing-features-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 2.5rem;
}
.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.landing-feature-card {
  background: white;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}
.landing-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.landing-feature-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.landing-feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.landing-feature-card p {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.7;
}

.landing-cta-section {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
  padding: 4rem 2rem;
  text-align: center;
}
.landing-cta-inner { max-width: 600px; margin: 0 auto; }
.landing-cta-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.75rem;
}
.landing-cta-sub {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.landing-cta-btn-white {
  background: white;
  color: var(--primary);
}

.landing-footer {
  background: #0f172a;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.landing-footer a { color: rgba(255,255,255,0.6); }
.landing-footer a:hover { color: white; }

@media (max-width: 768px) {
  .landing-title { font-size: 2rem; }
  .landing-features-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .landing-features-grid { grid-template-columns: 1fr; }
  .landing-title { font-size: 1.6rem; }
}
.logout-form { display: inline; margin: 0; }
.logout-form .nav-logout {
  font-size: 0.8rem;
  color: var(--danger);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--danger);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-family: inherit;
}
.logout-form .nav-logout:hover { background: var(--danger); color: white; }
.form-group { position: relative; }
/* --- SIMILARITY / PLAGIARISM --- */
.similarity-list { display: flex; flex-direction: column; gap: 1rem; }
.similarity-item {
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--grey-border);
}
.similarity-high { background: var(--danger-light); border-left-color: var(--danger); }
.similarity-medium { background: var(--warning-light); border-left-color: var(--warning); }
.similarity-low { background: var(--grey-light); border-left-color: var(--grey); }
.similarity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.similarity-students { font-weight: 700; font-size: 0.95rem; }
.similarity-vs { color: var(--text-sub); font-weight: 500; margin: 0 0.5rem; }
.similarity-score-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}
.similarity-score-high { background: var(--danger); color: white; }
.similarity-score-medium { background: var(--warning); color: white; }
.similarity-score-low { background: var(--grey); color: white; }
.similarity-snippets { margin-top: 0.85rem; display: flex; flex-direction: column; gap: 0.4rem; }
.similarity-snippet {
  background: white;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-style: italic;
}
.snippet-count { color: var(--text-sub); font-style: normal; font-size: 0.78rem; }
/* --- MARKING --- */
.marking-ai-suggestion {
  background: var(--grey-light);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 0.5rem;
}
/* --- KEBAB / OVERFLOW MENU --- */
.kebab-wrap { position: relative; display: inline-block; }
.kebab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--grey-border);
  background: white;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.kebab-btn:hover { background: var(--grey-light); }
.kebab-dropdown {
  display: none;
  position: fixed;
  min-width: 200px;
  background: white;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  overflow: hidden;
}
.kebab-dropdown.open { display: block; }
.kebab-dropdown a,
.kebab-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.kebab-dropdown a:hover,
.kebab-dropdown button:hover { background: var(--grey-light); text-decoration: none; }
.kebab-dropdown form { margin: 0; }
/* --- DASHBOARD: NEEDS YOUR ATTENTION --- */
.stat-card-link { cursor: pointer; transition: all 0.15s; }
.stat-card-link:hover { border-color: var(--primary); box-shadow: var(--shadow-md); text-decoration: none; }
.stat-card-link.stat-card-urgent { border-color: var(--danger); }

.attention-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
  .attention-grid { grid-template-columns: 1fr; }
}
.attention-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  scroll-margin-top: 80px;
}
.attention-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.85rem; }
.attention-card-title { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.attention-card-count { font-size: 0.78rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px; }
.attention-card-danger .attention-card-count { background: var(--danger-light); color: var(--danger); }
.attention-card-warning .attention-card-count { background: var(--warning-light); color: var(--warning); }
.attention-card-blue .attention-card-count { background: var(--primary-light); color: var(--primary-dark); }
.attention-list { display: flex; flex-direction: column; gap: 0.5rem; }
.attention-item { display: block; padding: 0.6rem 0.75rem; background: var(--grey-light); border-radius: var(--radius); color: var(--text); }
.attention-item:hover { background: var(--primary-light); text-decoration: none; }
.attention-item-title { font-weight: 600; font-size: 0.82rem; }
.attention-item-sub { color: var(--text-sub); font-size: 0.75rem; margin-top: 0.15rem; }
.attention-empty { font-size: 0.82rem; color: var(--success); font-weight: 600; padding: 0.4rem 0; }
.attention-footer { margin-top: 0.75rem; text-align: right; }
/* --- DASHBOARD: CONTEXT STRIP --- */
.dash-context-strip {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.dash-context-item { display: flex; align-items: baseline; gap: 0.4rem; }
.dash-context-number { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.dash-context-label { font-size: 0.78rem; color: var(--text-sub); }
.dash-context-divider { width: 1px; height: 24px; background: var(--grey-border); }
@media (max-width: 640px) {
  .dash-context-strip { display: flex; flex-wrap: wrap; gap: 1rem; }
}
.attention-card-icon { margin-right: 0.4rem; }
.attention-card-count-zero { background: var(--success-light) !important; color: var(--success) !important; }

/* --- STUDENT ACCESS PAGE (lecturer) --- */
.badge-red { background: #fde8e8; color: #b91c1c; }
.access-tabs { flex-wrap: wrap; }
.access-info-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem;
  padding: 0.6rem 0.9rem; margin-bottom: 1rem;
  font-size: 0.85rem; color: var(--text-sub, #6b7280);
  background: #f9fafb; border: 1px solid var(--grey-border, #e5e7eb); border-radius: 8px;
}
.access-info-details { font-size: 0.85rem; }
.access-info-details summary { cursor: pointer; color: var(--primary, #2563eb); list-style: none; }
.access-info-details summary::-webkit-details-marker { display: none; }
.access-info-details summary::before { content: "ⓘ "; }
.access-info-details p { margin: 0.5rem 0 0; color: var(--text-sub, #6b7280); max-width: 60ch; }
.access-toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 0.75rem 0 1rem; }
.access-toolbar .toolbar-sep { flex-basis: 100%; height: 0; }
.access-sub { display: block; font-size: 0.75rem; color: var(--text-sub, #6b7280); margin-top: 0.15rem; }
.access-row-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: flex-start; }
.access-row-actions details { position: relative; }
.access-row-actions summary { list-style: none; cursor: pointer; }
.access-row-actions summary::-webkit-details-marker { display: none; }
.access-email-form { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.35rem; min-width: 15rem; }
.access-pager { display: flex; gap: 0.75rem; align-items: center; justify-content: center; margin-top: 1rem; }
