/* ============================================================
   NEXUM — Global Styles
   ============================================================ */

:root {
  --navy: #0F172A;
  --navy-mid: #1E293B;
  --navy-light: #334155;
  --blue: #3B82F6;
  --blue-hover: #2563EB;
  --blue-light: #DBEAFE;
  --white: #F8FAFC;
  --grey: #94A3B8;
  --grey-light: #E2E8F0;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.18);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
}

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

.hidden { display: none !important; }
.mt-2 { margin-top: 12px; }

/* ── Navbar ── */
.navbar {
  background: rgba(15,23,42,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(59,130,246,0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { cursor: pointer; display: flex; align-items: center; }
.logo-img { height: 44px; width: auto; object-fit: contain; border-radius: 4px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: var(--grey);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--white); text-decoration: none; }
.nav-btn {
  background: var(--blue);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
  cursor: pointer;
}
.nav-btn:hover { background: var(--blue-hover); text-decoration: none; }
.nav-btn-outline {
  border: 1px solid rgba(59,130,246,0.4);
  color: var(--blue) !important;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-btn-outline:hover { background: rgba(59,130,246,0.1); text-decoration: none; }
.nav-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.admin-badge { background: rgba(239,68,68,0.15); color: #F87171; border: 1px solid rgba(239,68,68,0.3); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--grey); border-radius: 2px; }
.mobile-menu { display: none; padding: 12px 24px 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.mobile-menu.open { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a { color: var(--grey); padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 500; display: block; }
.mobile-menu a:hover { color: var(--white); background: rgba(255,255,255,0.05); text-decoration: none; }

/* ── Footer ── */
.footer {
  background: rgba(15,23,42,0.95);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 24px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--grey);
}
.footer-brand { font-weight: 700; color: var(--white); }
.footer-sep { opacity: 0.4; }
.footer-link { color: var(--grey); }
.footer-link:hover { color: var(--blue); }
.footer-copy { opacity: 0.6; }

/* ── Buttons ── */
.btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--blue-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.5);
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:hover { background: rgba(59,130,246,0.08); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-full { width: 100%; justify-content: center; display: block; text-align: center; }
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #F87171;
  border: 1px solid rgba(239,68,68,0.3);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--grey); margin-bottom: 6px; }
.input-field {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border 0.2s;
  font-family: var(--font);
}
.input-field:focus { border-color: var(--blue); background: rgba(255,255,255,0.08); }
.input-field::placeholder { color: rgba(148,163,184,0.5); }
select.input-field { cursor: pointer; }
.response-textarea {
  width: 100%;
  min-height: 200px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  resize: vertical;
  line-height: 1.7;
  font-family: var(--font);
  transition: border 0.2s;
}
.response-textarea:focus { border-color: var(--blue); }
.response-textarea::placeholder { color: rgba(148,163,184,0.5); }

/* ── Messages ── */
.error-msg {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #FCA5A5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.success-msg {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #6EE7B7;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* ── Auth Pages ── */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: rgba(30,41,59,0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  backdrop-filter: blur(10px);
}
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.auth-header p { color: var(--grey); font-size: 0.9rem; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.875rem; color: var(--grey); }
.admin-lock-icon { font-size: 2.5rem; margin-bottom: 12px; }

.toggle-tabs { display: flex; background: rgba(255,255,255,0.05); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 20px; }
.tab-btn {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--grey);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active { background: var(--blue); color: #fff; }

/* OTP */
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.otp-digit {
  width: 52px;
  height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: var(--white);
  outline: none;
  transition: border 0.2s;
}
.otp-digit:focus { border-color: var(--blue); background: rgba(255,255,255,0.1); }
.otp-hint { text-align: center; color: var(--grey); font-size: 0.8rem; margin-bottom: 16px; }
.otp-code-display { font-weight: 700; color: var(--blue); letter-spacing: 3px; font-size: 1rem; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 24px;
}
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.4);
  color: var(--blue);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.hero-accent { color: var(--blue); }
.hero-sub { font-size: 1.1rem; color: var(--grey); max-width: 560px; margin: 0 auto 36px; line-height: 1.75; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}
.shape-1 { width: 500px; height: 500px; background: var(--blue); top: -100px; right: -100px; }
.shape-2 { width: 400px; height: 400px; background: #8B5CF6; bottom: -80px; left: -80px; }
.shape-3 { width: 300px; height: 300px; background: #06B6D4; top: 40%; left: 30%; }

/* ── Features Strip ── */
.features-strip {
  background: rgba(30,41,59,0.5);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 24px;
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.feature-item { display: flex; align-items: center; gap: 14px; }
.feature-icon { font-size: 1.4rem; }
.feature-text { display: flex; flex-direction: column; }
.feature-text strong { font-size: 0.9rem; font-weight: 700; }
.feature-text span { font-size: 0.8rem; color: var(--grey); }

/* ── Leaderboard ── */
.leaderboard-section { padding: 80px 24px; }
.section-inner { max-width: 860px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.section-sub { color: var(--grey); }
.lb-table-wrap {
  background: rgba(30,41,59,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
}
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th { padding: 14px 20px; text-align: left; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--grey); background: rgba(0,0,0,0.2); border-bottom: 1px solid rgba(255,255,255,0.06); }
.lb-table td { padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.9rem; }
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tr:hover td { background: rgba(59,130,246,0.04); }
.rank-1 td { background: rgba(251,191,36,0.05); }
.rank-2 td { background: rgba(148,163,184,0.04); }
.rank-3 td { background: rgba(180,83,9,0.04); }
.rank-cell { font-size: 1.1rem; width: 60px; }
.name-cell { font-weight: 600; }
.stat-cell { color: var(--grey); }
.weekly-badge { background: rgba(59,130,246,0.15); color: var(--blue); padding: 3px 10px; border-radius: 12px; font-size: 0.78rem; font-weight: 600; }
.empty-lb { text-align: center; color: var(--grey); padding: 40px !important; }
.lb-cta { text-align: center; margin-top: 32px; }
.lb-cta p { color: var(--grey); margin-bottom: 14px; }

/* ── Page Container ── */
.page-container { max-width: 1100px; margin: 0 auto; padding: 48px 24px; }
.page-header { margin-bottom: 36px; }
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.page-sub { color: var(--grey); font-size: 1rem; }
.back-btn {
  display: inline-flex;
  align-items: center;
  color: var(--grey);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.back-btn:hover { color: var(--white); }

/* ── Dashboard ── */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: rgba(30,41,59,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border 0.2s;
}
.stat-card:hover { border-color: rgba(59,130,246,0.3); }
.stat-num { font-size: 2.4rem; font-weight: 800; color: var(--blue); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 0.85rem; color: var(--grey); font-weight: 500; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dash-card {
  background: rgba(30,41,59,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 28px;
}
.dash-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--white); }
.recent-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.2s;
}
.recent-item:last-of-type { border-bottom: none; }
.recent-item:hover { opacity: 0.8; }
.ri-title { font-size: 0.9rem; font-weight: 500; margin-bottom: 4px; }
.ri-meta { display: flex; align-items: center; gap: 8px; }
.ri-date { font-size: 0.78rem; color: var(--grey); }
.task-preview {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
}
.task-preview:last-of-type { border-bottom: none; }
.task-preview:hover { opacity: 0.8; }
.tp-title { font-size: 0.9rem; font-weight: 500; margin-bottom: 4px; }
.tp-meta { display: flex; gap: 8px; }

/* ── Status Badges ── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-submitted { background: rgba(16,185,129,0.15); color: #6EE7B7; border: 1px solid rgba(16,185,129,0.3); }
.badge-draft { background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }
.badge-lg { font-size: 0.85rem; padding: 5px 14px; }

/* ── Deadline Tags ── */
.deadline-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.deadline-closed { background: rgba(239,68,68,0.1); color: #FCA5A5; border: 1px solid rgba(239,68,68,0.25); }
.deadline-urgent { background: rgba(239,68,68,0.15); color: #F87171; border: 1px solid rgba(239,68,68,0.3); }
.deadline-soon { background: rgba(245,158,11,0.12); color: #FCD34D; border: 1px solid rgba(245,158,11,0.25); }
.deadline-ok { background: rgba(16,185,129,0.1); color: #6EE7B7; border: 1px solid rgba(16,185,129,0.2); }
.no-deadline { background: rgba(148,163,184,0.1); color: var(--grey); border: 1px solid rgba(148,163,184,0.2); }
.deadline-sm { font-size: 0.72rem; padding: 2px 8px; }
.deadline-exact { font-size: 0.8rem; color: var(--grey); }

/* ── Tasks Grid ── */
.tasks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.task-card {
  background: rgba(30,41,59,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
}
.task-card:not(.task-closed):hover { border-color: rgba(59,130,246,0.4); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.task-closed { opacity: 0.45; }
.tc-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.tc-title { font-size: 1rem; font-weight: 700; flex: 1; line-height: 1.4; }
.tc-desc { font-size: 0.875rem; color: var(--grey); line-height: 1.6; margin-bottom: 16px; }
.tc-footer { display: flex; justify-content: flex-end; }
.open-label { color: var(--blue); font-size: 0.875rem; font-weight: 600; }
.closed-label { color: rgba(148,163,184,0.5); font-size: 0.875rem; }

/* ── Task Detail ── */
.task-detail-header { margin-bottom: 28px; }
.task-detail-header h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 10px; line-height: 1.3; }
.task-meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.task-instructions {
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
}
.task-instructions h3 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--grey); margin-bottom: 14px; }
.task-instructions p { color: var(--grey); line-height: 1.8; white-space: pre-wrap; }
.closed-banner {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: #FCA5A5;
  font-size: 0.95rem;
  font-weight: 500;
}
.submission-area {
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 28px;
}
.submission-area h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.file-upload-area { margin: 14px 0; }
.file-label { font-size: 0.875rem; color: var(--grey); display: block; margin-bottom: 6px; }
.file-input { display: block; color: var(--grey); font-size: 0.85rem; }
.existing-file { font-size: 0.8rem; color: var(--blue); display: block; margin-top: 4px; }
.task-actions { display: flex; gap: 12px; margin-top: 20px; justify-content: flex-end; }

/* ── Submissions List ── */
.sub-list-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 12px 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--grey);
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
}
.sub-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 16px 20px;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none;
  cursor: pointer;
  transition: background 0.15s;
  background: rgba(30,41,59,0.4);
}
.sub-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.sub-row:hover { background: rgba(59,130,246,0.06); }
.sub-title { font-size: 0.9rem; font-weight: 500; }
.sub-date { font-size: 0.85rem; color: var(--grey); }
.submissions-list { margin-top: 8px; }
.empty-state-card {
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}
.empty-state-card p { color: var(--grey); margin-bottom: 20px; }
.empty-state { color: var(--grey); font-size: 0.875rem; text-align: center; padding: 16px 0; }

/* ── Submission Detail ── */
.submission-detail-card {
  background: rgba(30,41,59,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 36px;
}
.sd-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.sd-header h1 { font-size: 1.5rem; font-weight: 800; flex: 1; }
.sd-success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  color: #6EE7B7;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.sd-meta { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sd-meta-item { display: flex; gap: 12px; align-items: baseline; }
.sd-label { font-size: 0.8rem; font-weight: 600; color: var(--grey); text-transform: uppercase; letter-spacing: 0.5px; min-width: 120px; }
.sd-response h3 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--grey); margin-bottom: 14px; }
.sd-response-text {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-size: 0.9rem;
  color: var(--grey);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ── Admin ── */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 28px; background: rgba(255,255,255,0.04); padding: 4px; border-radius: var(--radius-sm); width: fit-content; }
.admin-tab {
  padding: 10px 22px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--grey);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-tab.active { background: var(--blue); color: #fff; }
.admin-table-wrap {
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  overflow: auto;
}
.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.admin-table th { padding: 13px 18px; text-align: left; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--grey); background: rgba(0,0,0,0.2); border-bottom: 1px solid rgba(255,255,255,0.07); }
.admin-table td { padding: 14px 18px; font-size: 0.875rem; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(59,130,246,0.04); }
.admin-filters { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-select { max-width: 240px; }
.admin-add-task {
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
}
.admin-add-task h3 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-hr { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 28px 0; }
.tasks-admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.atr-info { display: flex; align-items: center; gap: 12px; flex: 1; }
.atr-info strong { font-size: 0.9rem; }
.atr-actions { display: flex; gap: 8px; }

/* ── Privacy ── */
.privacy-card {
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 800px;
}
.privacy-card h2 { font-size: 1.1rem; font-weight: 700; margin: 28px 0 10px; color: var(--white); }
.privacy-card h2:first-child { margin-top: 0; }
.privacy-card p { color: var(--grey); line-height: 1.75; font-size: 0.95rem; }
.privacy-card ul { color: var(--grey); padding-left: 20px; line-height: 1.9; font-size: 0.95rem; }
.privacy-card strong { color: var(--white); }
.privacy-link { color: var(--blue); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .tasks-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .sub-list-header, .sub-row { grid-template-columns: 2fr 1fr; }
  .sub-list-header span:nth-child(3), .sub-list-header span:nth-child(4),
  .sub-row span:nth-child(3), .sub-row span:nth-child(4) { display: none; }
  .auth-card { padding: 28px 22px; }
  .features-strip { gap: 24px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .otp-digit { width: 42px; height: 48px; font-size: 1.2rem; }
  .hero-cta { flex-direction: column; align-items: center; }
}

/* ── Password field ── */
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap .input-field { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer;
  font-size: 1rem; color: var(--grey); padding: 0; line-height: 1;
}
.pw-toggle:hover { color: var(--white); }

/* ── System Feedback Section (Home) ── */
.system-feedback-section { padding: 60px 24px 0; }
.sf-card {
  max-width: 860px; margin: 0 auto;
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius);
  padding: 36px 40px;
  display: flex; gap: 24px; align-items: flex-start;
}
.sf-icon { font-size: 2.2rem; flex-shrink: 0; margin-top: 2px; }
.sf-heading { font-size: 1.25rem; font-weight: 800; margin-bottom: 10px; }
.sf-body { color: var(--grey); line-height: 1.75; font-size: 0.95rem; }

/* ── Dashboard Feedback Card ── */
.feedback-card { margin-top: 24px; }
.feedback-intro { color: var(--grey); font-size: 0.875rem; margin-bottom: 14px; }
.feedback-item {
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.fb-task { font-weight: 700; font-size: 0.875rem; margin-bottom: 6px; color: var(--white); }
.fb-text { color: var(--grey); font-size: 0.875rem; line-height: 1.65; }
.fb-date { font-size: 0.75rem; color: rgba(148,163,184,0.5); margin-top: 6px; }

/* ── Submission Detail Feedback ── */
.sd-feedback {
  margin-top: 24px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sd-feedback h3 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--grey); margin-bottom: 12px; }
.sd-feedback-text {
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  padding: 16px; color: var(--grey); line-height: 1.7; font-size: 0.9rem;
}
.sd-feedback-pending {
  margin-top: 24px; padding: 14px 16px;
  background: rgba(148,163,184,0.06);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: var(--radius-sm);
  color: var(--grey); font-size: 0.875rem;
}

/* ── File download link ── */
.file-download-link { color: var(--blue); text-decoration: underline; cursor: pointer; font-size: 0.85rem; }

/* ── Admin tiny buttons ── */
.btn-tiny {
  background: none; border: none; cursor: pointer;
  font-size: 0.82rem; padding: 2px 6px; border-radius: 4px;
  color: var(--grey); transition: color 0.2s;
}
.btn-tiny:hover { color: var(--white); }
.btn-tiny.btn-blue {
  background: rgba(59,130,246,0.12); color: #93C5FD;
  border: 1px solid rgba(59,130,246,0.25); padding: 4px 10px;
}
.btn-tiny.btn-green {
  background: rgba(16,185,129,0.1); color: #6EE7B7;
  border: 1px solid rgba(16,185,129,0.25); padding: 4px 10px;
}
.btn-tiny.btn-blue:hover { background: rgba(59,130,246,0.2); }
.btn-tiny.btn-green:hover { background: rgba(16,185,129,0.2); }
.pw-cell { font-family: monospace; font-size: 0.85rem; margin-right: 6px; color: var(--grey); }

/* ── Feedback Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: #1E293B; border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); padding: 32px;
  width: 100%; max-width: 580px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  background: none; border: none; color: var(--grey);
  font-size: 1.1rem; cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.modal-close:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.modal-meta {
  background: rgba(0,0,0,0.2); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 0.85rem; color: var(--grey);
  line-height: 1.8; margin-bottom: 16px;
}
.modal-response { margin-bottom: 4px; font-size: 0.85rem; color: var(--grey); }
.modal-response strong { color: var(--white); display: block; margin-bottom: 6px; }
.modal-response-text {
  background: rgba(0,0,0,0.2); border-radius: var(--radius-sm);
  padding: 12px; font-size: 0.85rem; color: var(--grey);
  line-height: 1.65; max-height: 120px; overflow-y: auto;
  white-space: pre-wrap;
}

/* ── mt-3 ── */
.mt-3 { margin-top: 24px; }

/* ── Hidden admin dot in footer ── */
.admin-secret-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}
.admin-secret-dot:hover { opacity: 0.3; background: var(--grey); }

/* ── Marks Badge ── */
.marks-badge {
  display: inline-block;
  background: rgba(251,191,36,0.12);
  color: #FCD34D;
  border: 1px solid rgba(251,191,36,0.3);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Marks Card on Dashboard ── */
.marks-card { margin-top: 0; }
.marks-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.marks-item:last-of-type { border-bottom: none; }
.marks-task { font-size: 0.875rem; font-weight: 500; flex: 1; }
.marks-score { display: flex; align-items: baseline; gap: 2px; }
.marks-num { font-size: 1.5rem; font-weight: 800; color: #FCD34D; }
.marks-denom { font-size: 0.85rem; color: var(--grey); }
.marks-total { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.9rem; color: var(--grey); text-align: right; }
.marks-total strong { color: #FCD34D; font-size: 1.1rem; }

/* ── Marks selector in admin modal ── */
.marks-selector { display: flex; gap: 10px; margin-top: 8px; }
.marks-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--grey);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.marks-btn:hover { border-color: #FCD34D; color: #FCD34D; }
.marks-btn.active { background: rgba(251,191,36,0.2); border-color: #FCD34D; color: #FCD34D; }

/* ── Submission detail marks ── */
.sd-feedback-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sd-marks-badge {
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.35);
  border-radius: 10px;
  padding: 6px 16px;
  display: flex; align-items: baseline; gap: 3px;
}
.sd-marks-badge span { font-size: 1.6rem; font-weight: 800; color: #FCD34D; }
.sd-marks-badge small { font-size: 0.85rem; color: var(--grey); }

/* ── tc-footer marks ── */
.tc-footer { display: flex; justify-content: space-between; align-items: center; }
