:root {
  --bg: #f6f8ff;
  --card: #ffffff;
  --card-soft: #eef2ff;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --text: #1d2433;
  --muted: #52607a;
  --border: rgba(15, 23, 42, 0.08);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-lg: 0 32px 60px -32px rgba(15, 23, 42, 0.25);
  --shadow-card: 0 18px 34px -20px rgba(15, 23, 42, 0.22);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 55%, #ffffff 100%);
  color: var(--text);
}

@media (max-width: 768px) {
  body {
    align-items: flex-start;
  }
}

.app {
  width: min(1080px, 94vw);
  margin: 0 auto;
}

.login-card,
.dashboard,
.admin-dashboard {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 255, 0.88));
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
}

.login-card {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.3fr);
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.login-visual {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.92), rgba(226, 232, 255, 0.72));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-grid {
  width: 140%;
  height: 140%;
  background-image: linear-gradient(to right, rgba(37, 99, 235, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 165, 233, 0.12) 1px, transparent 1px);
  background-size: 36px 36px;
  filter: drop-shadow(0 10px 24px rgba(37, 99, 235, 0.16));
  animation: gridFloat 14s linear infinite;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.7;
}

.orb-one {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.26), transparent 68%);
  animation: orbPulse 12s ease-in-out infinite;
}

.orb-two {
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.24), transparent 70%);
  animation: orbPulse 16s ease-in-out infinite reverse;
}

.login-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.2rem, 3vw, 2rem);
}

.login-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(82, 96, 122, 0.9);
}

.login-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  letter-spacing: -0.02em;
}

.login-header p {
  margin: 0;
  color: rgba(82, 96, 122, 0.82);
  line-height: 1.6;
  max-width: 38ch;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#login-feedback {
  color: var(--danger);
  font-weight: 500;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

#google-btn {
  width: 100%;
  display: flex;
  justify-content: center;
}

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

.user-details {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.user-details img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.25);
}

.user-details h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}

.user-details p {
  margin: 0.15rem 0 0;
  color: rgba(82, 96, 122, 0.78);
}

.user-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: rgba(37, 99, 235, 0.88);
}

.user-role[data-role='admin'] {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
  color: rgba(220, 38, 38, 0.88);
}

.user-role[data-role='student'] {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.2);
  color: rgba(37, 99, 235, 0.88);
}

.logout {
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  padding: 0.9rem 1.4rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.logout:hover,
.logout:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.45);
  outline: none;
}

.weeks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.week-card {
  --tone: var(--accent);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(237, 242, 255, 0.7));
  border: 1px solid color-mix(in srgb, var(--tone) 15%, var(--border));
  border-radius: 20px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.week-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), transparent 60%);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.week-card:hover::before {
  opacity: 1;
}

.week-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -32px color-mix(in srgb, var(--tone) 60%, rgba(15, 23, 42, 0.32));
}

.week-card--inactive {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92));
  border: 1px solid rgba(15, 23, 42, 0.55);
  box-shadow: 0 26px 48px -30px rgba(15, 23, 42, 0.65);
  color: rgba(226, 232, 240, 0.92);
}

.week-card--inactive .week-index {
  color: rgba(148, 163, 184, 0.82);
}

.week-card--inactive .week-name {
  color: rgba(148, 163, 184, 0.74);
}

.week-card--inactive .week-status-chip {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.3);
  color: rgba(226, 232, 240, 0.88);
}

.week-card--inactive:hover {
  transform: none;
  box-shadow: 0 22px 44px -32px rgba(15, 23, 42, 0.7);
}

.week-inactive-grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2.2rem 0 1.2rem;
}

.week-inactive-grade-value {
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: rgba(248, 250, 252, 0.94);
}

.week-card--inactive .week-card-actions {
  justify-content: center;
}

.week-card--inactive .week-action {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.92);
}

.week-card--inactive .week-action:hover,
.week-card--inactive .week-action:focus-visible {
  box-shadow: 0 18px 34px -22px rgba(15, 23, 42, 0.65);
}

.week-index {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--tone);
}

.week-action {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: var(--tone, var(--accent));
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.week-action:hover,
.week-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -20px color-mix(in srgb, var(--tone) 65%, transparent);
  outline: none;
}

.week-action[disabled] {
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.25);
  color: rgba(82, 96, 122, 0.6);
  box-shadow: none;
  transform: none;
}

.week-action[disabled]:hover,
.week-action[disabled]:focus-visible {
  transform: none;
}

.week-secondary {
  border: 1px solid rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.08);
  color: rgba(37, 99, 235, 0.88);
  border-radius: 999px;
  padding: 0.65rem 1.6rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border 140ms ease;
}

.week-secondary:hover,
.week-secondary:focus-visible {
  border-color: rgba(37, 99, 235, 0.5);
  outline: none;
}

.week-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.week-danger {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.92);
  box-shadow: 0 18px 34px -22px rgba(239, 68, 68, 0.6);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.week-danger:hover,
.week-danger:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(239, 68, 68, 0.65);
  outline: none;
}

.week-danger:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
  transform: none;
}

.week-card--student {
  align-items: stretch;
  width: 100%;
  gap: 1.4rem;
  padding: 1.8rem;
}

.week-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.week-card-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.week-card-title .week-name {
  font-size: 1rem;
  color: rgba(82, 96, 122, 0.8);
}

.week-brief-info {
  width: 100%;
  font-size: 0.9rem;
  color: rgba(82, 96, 122, 0.8);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.week-brief-info a {
  color: var(--accent);
  font-weight: 600;
}

.week-requirements {
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: rgba(29, 36, 51, 0.82);
}

.week-requirements li {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.week-requirements li strong {
  font-size: 0.95rem;
  color: rgba(29, 36, 51, 0.92);
}

.week-requirements li span {
  font-size: 0.85rem;
  color: rgba(82, 96, 122, 0.78);
}

.week-requirements--detail li {
  background: rgba(37, 99, 235, 0.08);
}

.week-submission-info {
  width: 100%;
  font-size: 0.88rem;
  color: rgba(82, 96, 122, 0.82);
}

.week-card-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.admin-week-brief,
.admin-week-submission {
  font-size: 0.9rem;
  color: rgba(82, 96, 122, 0.78);
}

.admin-week-brief a {
  color: var(--accent);
  font-weight: 600;
}

.admin-week-actions {
  display: flex;
  justify-content: flex-end;
}

.student-table--empty {
  padding: 1.6rem;
  text-align: center;
  color: rgba(82, 96, 122, 0.74);
}

.week-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  padding: 2rem;
  z-index: 999;
}

.week-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.week-modal__content {
  width: min(1100px, 96vw);
  max-height: min(880px, 92vh);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  box-shadow: 0 28px 56px -32px rgba(15, 23, 42, 0.28);
}

.week-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.week-modal__title {
  font-size: 1.4rem;
  font-weight: 600;
}

.week-modal__close {
  border: none;
  background: rgba(37, 99, 235, 0.12);
  color: rgba(37, 99, 235, 0.88);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.week-modal__close:hover,
.week-modal__close:focus-visible {
  background: rgba(37, 99, 235, 0.2);
  color: rgba(37, 99, 235, 1);
  outline: none;
}


.week-modal__body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.week-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.week-section__header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.week-section__header p {
  margin: 0.2rem 0 0;
  color: rgba(82, 96, 122, 0.78);
  font-size: 0.9rem;
}

.week-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.week-field span {
  color: rgba(82, 96, 122, 0.78);
}

.week-field input,
.week-field textarea {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: rgba(29, 36, 51, 0.92);
  font-size: 0.95rem;
  transition: border 160ms ease, box-shadow 160ms ease;
}

.week-field input:focus,
.week-field textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.week-field textarea {
  min-height: 90px;
  resize: vertical;
}

.week-brief-body,
.week-brief-upload {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.week-brief-body a {
  color: var(--accent);
  font-weight: 600;
}

.week-brief-meta {
  font-size: 0.85rem;
  color: rgba(82, 96, 122, 0.7);
}

.week-editor-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.week-editor-row {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.week-editor-row input,
.week-editor-row textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  color: rgba(29, 36, 51, 0.92);
  font-size: 0.95rem;
  transition: border 160ms ease, box-shadow 160ms ease;
}

.week-editor-row input:focus,
.week-editor-row textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.week-editor-row textarea {
  min-height: 70px;
  resize: vertical;
}

.week-editor-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(82, 96, 122, 0.78);
}

.week-editor-options input[type='checkbox'] {
  margin-right: 0.35rem;
}

.week-editor-options label {
  display: inline-flex;
  align-items: center;
}

.week-editor-options input[type='number'] {
  width: 90px;
}

.week-editor-add {
  align-self: flex-start;
  border: 1px dashed rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.08);
  color: rgba(37, 99, 235, 0.88);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.week-editor-add:hover,
.week-editor-add:focus-visible {
  border-color: rgba(37, 99, 235, 0.6);
  outline: none;
}

.week-editor-remove {
  border: none;
  align-self: flex-start;
  background: rgba(239, 68, 68, 0.12);
  color: rgba(220, 38, 38, 0.9);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.week-editor-empty {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(82, 96, 122, 0.74);
}

.week-modal__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.week-upload-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.week-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
}

.week-upload-info {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.week-upload-info span {
  font-size: 0.85rem;
  color: rgba(82, 96, 122, 0.74);
}

.week-upload-meta {
  font-size: 0.85rem;
  color: rgba(82, 96, 122, 0.7);
}

.week-upload-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.week-upload-controls a {
  color: var(--accent);
  font-size: 0.9rem;
}

.week-submissions-table {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: auto;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.week-submissions-table table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  color: rgba(29, 36, 51, 0.9);
}

.week-submissions-table thead {
  background: rgba(37, 99, 235, 0.08);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(82, 96, 122, 0.74);
}

.week-submissions-table th,
.week-submissions-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: top;
}

.week-submissions-table tbody tr:nth-child(odd) {
  background: rgba(37, 99, 235, 0.05);
}

.week-submissions-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.12);
}

.week-submissions-files {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.week-submissions-files a {
  color: var(--accent);
  font-size: 0.9rem;
}

.week-submissions-grade {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.week-submissions-grade input {
  width: 88px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.5rem 0.7rem;
  color: rgba(29, 36, 51, 0.92);
  font-size: 0.95rem;
}

.week-submissions-grade__actions {
  display: flex;
  gap: 0.5rem;
}

.week-table-action {
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.12);
  color: rgba(37, 99, 235, 0.88);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border 140ms ease, transform 140ms ease;
}

.week-table-action:hover,
.week-table-action:focus-visible {
  border-color: rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
  outline: none;
}

.week-table-action[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.week-table-action-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.week-table-action--ai {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.16);
}

.week-table-action--danger {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.14);
  color: rgba(220, 38, 38, 0.92);
}

.week-table-action--danger:hover,
.week-table-action--danger:focus-visible {
  border-color: rgba(239, 68, 68, 0.6);
}

.week-grade-meta {
  font-size: 0.8rem;
  color: rgba(82, 96, 122, 0.72);
}

.week-submissions-feedback {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.week-feedback-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.week-feedback-placeholder,
.week-feedback-meta {
  font-size: 0.85rem;
  color: rgba(82, 96, 122, 0.7);
}

.week-warning-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.week-warning-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: rgba(248, 113, 113, 0.92);
}

.week-warning-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.22);
  color: rgba(254, 226, 226, 0.92);
  font-weight: 600;
  font-size: 0.75rem;
}

.week-assessment-body {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.week-assessment-grade,
.week-assessment-feedback {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(29, 36, 51, 0.9);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}

.week-assessment-feedback a {
  color: var(--accent);
  font-weight: 600;
}

.week-grade-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(21, 128, 61, 0.12);
  color: rgba(22, 163, 74, 0.86);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .week-modal__content {
    width: min(96vw, 760px);
    max-height: min(92vh, 720px);
    padding: 1.4rem;
  }

  .week-modal__body {
    padding-right: 0.2rem;
  }

  .week-editor-row {
    grid-template-columns: 1fr;
  }

  .week-upload-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .week-submissions-table {
    margin: 0 -0.4rem;
  }
}

@media (max-width: 560px) {
  .week-submissions-table table {
    min-width: 720px;
  }
}

@media (max-width: 640px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-view-tabs {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .admin-view-tab {
    flex: 1 1 48%;
    text-align: center;
  }

  .logout {
    width: 100%;
  }

  .user-details img {
    width: 56px;
    height: 56px;
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 240px;
  }
}

@media (max-width: 960px) {
  .admin-dashboard {
    padding: 2rem;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@keyframes gridFloat {
  from {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(2deg) scale(1.05);
  }
  to {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes orbPulse {
  0%,
  100% {
    transform: translate(-10%, -6%) scale(1);
    opacity: 0.65;
  }
  50% {
    transform: translate(12%, 14%) scale(1.2);
    opacity: 0.9;
  }
}

.admin-dashboard {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: min(1100px, 94vw);
}

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

.admin-user {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.admin-user img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.2);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.4rem;
}

.admin-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.admin-view-tab {
  border: none;
  background: transparent;
  color: rgba(37, 99, 235, 0.75);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.admin-view-tab:hover,
.admin-view-tab:focus-visible {
  background: rgba(37, 99, 235, 0.12);
  color: rgba(37, 99, 235, 0.92);
  outline: none;
}

.admin-view-tab.is-active {
  background: #ffffff;
  color: rgba(29, 36, 51, 0.95);
  box-shadow: 0 10px 24px -18px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}

.admin-view {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-view[hidden] {
  display: none !important;
}

.admin-stat-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(237, 242, 255, 0.72));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-card);
}

.admin-stat-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(82, 96, 122, 0.7);
}

.admin-stat-value {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 600;
  color: rgba(29, 36, 51, 0.92);
}

.admin-weeks-panel,
.admin-students-panel {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(237, 242, 255, 0.72));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  box-shadow: var(--shadow-card);
}

.admin-evaluation-panel {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(237, 242, 255, 0.72));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  box-shadow: var(--shadow-card);
}

.admin-evaluation-panel header h3 {
  margin: 0;
  font-size: 1.4rem;
}

.admin-evaluation-panel header p {
  margin: 0.4rem 0 0;
  color: rgba(82, 96, 122, 0.78);
  line-height: 1.5;
}

.evaluation-table-wrapper {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-card);
  overflow: auto;
  max-height: clamp(320px, 60vh, 620px);
  scrollbar-gutter: stable;
}

.evaluation-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
  color: rgba(29, 36, 51, 0.94);
}

.evaluation-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.06));
  backdrop-filter: blur(6px);
}

.evaluation-table tfoot {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(226, 232, 255, 0.94));
  box-shadow: 0 -8px 18px -14px rgba(15, 23, 42, 0.45);
}

.evaluation-table th,
.evaluation-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.evaluation-table tbody tr:nth-child(odd) {
  background: rgba(37, 99, 235, 0.04);
}

.evaluation-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.1);
}

.evaluation-student-header,
.evaluation-student-cell {
  text-align: left;
  min-width: 220px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 6px 0 18px -16px rgba(15, 23, 42, 0.45);
}

.evaluation-student-header {
  z-index: 3;
}

.evaluation-student-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.evaluation-student-name {
  font-weight: 600;
  color: rgba(18, 24, 38, 0.95);
}

.evaluation-student-email {
  font-size: 0.85rem;
  color: rgba(82, 96, 122, 0.72);
}

.evaluation-week-header {
  min-width: 120px;
}

.evaluation-week-label {
  display: block;
  font-weight: 600;
  color: rgba(29, 36, 51, 0.92);
}

.evaluation-week-subtitle {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  line-height: 1.3;
  color: rgba(82, 96, 122, 0.7);
}

.evaluation-average-header {
  min-width: 120px;
}

.evaluation-grade-cell {
  font-size: 0.95rem;
  font-weight: 600;
}

.evaluation-grade-cell--filled {
  color: rgba(22, 163, 74, 0.92);
}

.evaluation-grade-cell--empty {
  color: rgba(82, 96, 122, 0.54);
}

.evaluation-average-cell {
  font-weight: 700;
  background: rgba(34, 197, 94, 0.08);
  color: rgba(21, 128, 61, 0.9);
  border-left: 1px solid rgba(34, 197, 94, 0.2);
}

.evaluation-average-cell--filled {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.16);
}

.evaluation-summary-header {
  text-align: left;
  position: sticky;
  left: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 2;
  font-weight: 600;
}

.evaluation-summary-cell {
  font-weight: 600;
  background: rgba(37, 99, 235, 0.06);
  color: rgba(37, 99, 235, 0.88);
}

.evaluation-summary-cell--filled {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.evaluation-summary-cell--overall {
  background: rgba(22, 163, 74, 0.1);
  color: rgba(21, 128, 61, 0.88);
}

.evaluation-empty {
  margin: 0;
  padding: 2rem;
  text-align: center;
  color: rgba(82, 96, 122, 0.72);
}

.evaluation-table-wrapper::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.evaluation-table-wrapper::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
}

.evaluation-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.35);
  border-radius: 999px;
}

.admin-weeks-panel header h3,
.admin-students-panel header h3 {
  margin: 0;
  font-size: 1.4rem;
}

.admin-weeks-panel header p,
.admin-students-panel header p {
  margin: 0.4rem 0 0;
  color: rgba(82, 96, 122, 0.78);
  line-height: 1.5;
}

.admin-weeks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.admin-week-card {
  --tone: rgba(56, 189, 248, 0.6);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(237, 242, 255, 0.74));
  border: 1px solid color-mix(in srgb, var(--tone) 20%, var(--border));
  border-radius: 20px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  border-left: 3px solid color-mix(in srgb, var(--tone) 55%, transparent);
  box-shadow: var(--shadow-card);
}

.admin-week-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.admin-week-card:hover::after {
  opacity: 1;
}

.admin-week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-week-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.admin-week-focus {
  margin: 0;
  color: rgba(82, 96, 122, 0.8);
  line-height: 1.4;
  font-size: 0.95rem;
}

.admin-week-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(82, 96, 122, 0.74);
}

.admin-week-meta time {
  font-variant-numeric: tabular-nums;
}

.week-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: rgba(37, 99, 235, 0.88);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.week-status-chip[data-active='true'] {
  border-color: rgba(34, 197, 94, 0.26);
  background: rgba(34, 197, 94, 0.12);
  color: rgba(22, 163, 74, 0.86);
}

.week-status-chip[data-active='false'] {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.12);
  color: rgba(220, 38, 38, 0.86);
}

.week-toggle {
  position: relative;
  width: 46px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.week-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.week-toggle-indicator {
  position: absolute;
  inset: 0;
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  transition: background 180ms ease;
  pointer-events: none;
}

.week-toggle-indicator::after {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 50%;
  transition: transform 180ms ease, background 180ms ease, border 180ms ease;
}

.week-toggle input:checked + .week-toggle-indicator {
  background: rgba(37, 99, 235, 0.6);
}

.week-toggle input:checked + .week-toggle-indicator::after {
  transform: translateX(22px);
  background: #eef2ff;
  border-color: rgba(37, 99, 235, 0.25);
}

.student-table {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.student-table table {
  width: 100%;
  border-collapse: collapse;
  color: rgba(29, 36, 51, 0.92);
}

.student-table thead {
  background: rgba(37, 99, 235, 0.08);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: rgba(82, 96, 122, 0.74);
}

.student-table th,
.student-table td {
  padding: 0.85rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.student-table tbody tr:nth-child(odd) {
  background: rgba(37, 99, 235, 0.04);
}

.student-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.08);
}

.student-name {
  font-weight: 600;
}

.student-email {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: rgba(82, 96, 122, 0.74);
}

.student-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: rgba(37, 99, 235, 0.88);
  border: 1px solid rgba(37, 99, 235, 0.22);
}

.status-pill.offline {
  background: rgba(148, 163, 184, 0.16);
  color: rgba(82, 96, 122, 0.76);
  border-color: rgba(148, 163, 184, 0.28);
}

.student-table--empty {
  padding: 1.6rem;
  text-align: center;
  color: rgba(82, 96, 122, 0.74);
}
