:root {
  --bg: #edf3fb;
  --ink: #18212f;
  --muted: #72829a;
  --panel: #ffffff;
  --panel-strong: #eef3ff;
  --line: #dbe4f3;
  --accent: #6b63e6;
  --accent-soft: #e9e7ff;
  --accent-blue: #5ea9f1;
  --accent-cyan: #7ce1d0;
  --accent-sky: #8cb8ff;
  --shadow: 0 30px 60px rgba(90, 115, 168, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(107, 99, 230, 0.18), transparent 24%),
    linear-gradient(180deg, #f4f7fd 0%, var(--bg) 100%);
  color: var(--ink);
}

a {
  color: var(--accent);
  text-decoration: none;
}

button,
.button-link {
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 0.9rem 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button[disabled],
.button-link[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
}

.button-link.secondary,
button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.stat-card-form {
  margin: 0;
}

.stat-card-button {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
  min-height: 160px;
}

.stat-card-button span,
.stat-card-button p {
  color: white;
}

.class-attendance-action {
  display: flex;
  justify-content: flex-end;
  margin: -0.5rem 0 1.25rem;
}

.attendance-button {
  min-width: 180px;
  min-height: 54px;
  font-size: 1rem;
}

.attendance-status-tag {
  padding: 0.85rem 1.2rem;
  font-size: 0.95rem;
}

.text-button {
  padding: 0;
  background: transparent;
  border: none;
  color: var(--accent);
  font-weight: 700;
}

.text-button.danger {
  color: #b91c1c;
}

.text-button:hover {
  text-decoration: underline;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
  margin-top: 0.45rem;
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  margin: 0;
}

label {
  display: block;
  font-weight: 600;
}

.field-help {
  display: block;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.24), transparent 18%),
    linear-gradient(180deg, #74baf1 0%, #6ab4ef 45%, #69afea 100%);
}

.login-card,
.panel,
.stat-card,
.material-card,
.question-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(219, 228, 243, 0.9);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(760px, 100%);
  border-radius: 28px;
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
}

.login-screen {
  width: min(460px, 100%);
  display: grid;
  justify-items: center;
  gap: 1rem;
  color: white;
}

.login-brandmark {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  position: relative;
  isolation: isolate;
}

.login-brandmark::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 228px;
  height: 228px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.3) 42%, rgba(255, 255, 255, 0) 72%);
  filter: blur(10px);
  z-index: -1;
}

.login-brand-logo {
  width: 148px;
  height: 148px;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(7, 38, 94, 0.22));
}

.login-copy {
  text-align: center;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: 0.24em;
  font-weight: 300;
}

.login-copy p {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
}

.login-form {
  width: 100%;
  display: grid;
  gap: 1rem;
}

.login-field {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 20px rgba(217, 234, 246, 0.85);
  overflow: hidden;
}

.login-field-icon {
  display: grid;
  place-items: center;
  height: 100%;
  color: #64748b;
  font-weight: 800;
  border-right: 1px solid #cfdbe6;
  background: #f9fbfd;
}

.login-field input {
  margin-top: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #3a4b5a;
  padding: 1rem 1rem;
}

.login-field input::placeholder {
  color: #8a9aa8;
}

.login-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.96);
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 500;
}

.remember-row input {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(75, 98, 118, 0.56);
  background: rgba(82, 102, 119, 0.82);
  position: relative;
}

.remember-row input:checked::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 7px;
  height: 13px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.forgot-link {
  color: rgba(255, 255, 255, 0.92);
  font-style: italic;
}

.login-submit {
  width: 100%;
  border-radius: 8px;
  background: white;
  color: #5d636a;
  letter-spacing: 0.22em;
  font-weight: 400;
  box-shadow: 0 8px 20px rgba(217, 234, 246, 0.82);
}

.login-secondary {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  border-radius: 8px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.login-flash-stack {
  width: 100%;
  display: grid;
  gap: 0.75rem;
}

.login-flash {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  padding: 0.85rem 1rem;
  text-align: center;
  color: white;
}

.login-demo {
  width: 100%;
  margin-top: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.96);
}

.login-demo strong,
.login-demo p {
  margin: 0;
}

.login-demo p + p {
  margin-top: 0.35rem;
}

.register-body {
  min-height: 100vh;
  margin: 0;
  padding: 2rem;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 20%),
    linear-gradient(180deg, #74baf1 0%, #69afea 100%);
}

.register-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 28px 60px rgba(28, 78, 118, 0.16);
}

.register-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #12344b;
}

.register-header p {
  color: #5b7082;
}

.register-eyebrow {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #2f7cc0;
  font-size: 0.82rem;
  font-weight: 700;
}

.register-form {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.register-flash {
  border-radius: 10px;
  background: rgba(219, 70, 70, 0.12);
  border: 1px solid rgba(219, 70, 70, 0.2);
  padding: 0.9rem 1rem;
  color: #8f1d1d;
}

.register-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.required-mark {
  color: #d92d20;
  font-weight: 800;
}

.field-help {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.password-field {
  max-width: 420px;
}

.password-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
}

.password-input-wrap input {
  margin-top: 0.45rem;
}

.password-toggle {
  margin-top: 0.45rem;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: #e8f2fb;
  color: #1f5f93;
  font-weight: 700;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hidden-field {
  display: none;
}

.page-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.app-body {
  padding: 2rem;
  background:
    radial-gradient(circle at top left, rgba(107, 99, 230, 0.14), transparent 20%),
    linear-gradient(180deg, #eef4fb 0%, #e8eff9 100%);
}

.app-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - 4rem);
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(74, 96, 153, 0.22);
  transition: grid-template-columns 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar {
  padding: 1.4rem 1rem;
  background: linear-gradient(180deg, #6c64e7 0%, #5a9fec 100%);
  color: white;
  min-height: 100%;
  transition: padding 0.42s cubic-bezier(0.22, 1, 0.36, 1), background 0.42s ease;
}

.brand {
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

.sidebar-role {
  color: rgba(255, 255, 255, 0.76);
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.sidebar-nav {
  display: grid;
  gap: 0.7rem;
  margin-top: 2rem;
}

.sidebar-nav a.active {
  font-weight: 800;
  color: white;
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-nav .logout-link {
  color: #ffe1e1;
  background: rgba(185, 28, 28, 0.18);
}

.sidebar-nav .logout-link .nav-icon {
  color: #ffe1e1;
}

.sidebar-nav .logout-link:hover {
  background: rgba(185, 28, 28, 0.28);
  color: white;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 0.75rem;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  transition: padding 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.28s ease, color 0.28s ease, gap 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.nav-icon svg,
.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sidebar-head {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.8rem;
}

.sidebar-copy {
  display: grid;
  gap: 0.15rem;
  transition: opacity 0.24s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.28);
  padding: 0.35rem;
  overflow: hidden;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-toggle {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  margin-top: 1rem;
  align-self: center;
  display: inline-grid;
  place-items: center;
  transition: background 0.28s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-toggle {
  display: none;
  position: static;
  transform: none;
  color: #5c61c6;
  background: #edf2ff;
}

.content {
  padding: 1.6rem;
  display: grid;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
}

.hero,
.panel-header,
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero {
  padding: 0.15rem 0 0.25rem;
}

.topbar {
  align-items: stretch;
}

.welcome-profile-card {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 1.7rem;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 62%, #eef5ff 100%);
  border: 1px solid rgba(214, 226, 245, 0.95);
  box-shadow: 0 22px 48px rgba(89, 112, 168, 0.12);
  overflow: hidden;
}

.welcome-profile-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-blue) 100%);
  border-radius: 999px;
}

.welcome-profile-photo {
  width: 104px;
  height: 104px;
  border-radius: 26px;
  overflow: hidden;
  flex: 0 0 auto;
  background: linear-gradient(180deg, #ffffff 0%, #ebf4ff 100%);
  border: 1px solid rgba(207, 222, 245, 0.95);
  box-shadow: 0 16px 28px rgba(93, 125, 181, 0.12);
}

.welcome-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.welcome-profile-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.welcome-profile-copy h1 {
  margin: 0;
  font-size: clamp(2.35rem, 3.7vw, 3.35rem);
  line-height: 1.05;
}

.welcome-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.welcome-profile-meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.68rem 1rem;
  border-radius: 999px;
  background: #edf4ff;
  color: #55739d;
  font-size: 0.98rem;
  font-weight: 600;
}

.welcome-profile-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.74rem 1.05rem;
  border-radius: 999px;
  background: #e8ecff;
  color: #5b63d1;
  font-size: 0.98rem;
  font-weight: 800;
}

.hero h1,
.panel h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
}

.eyebrow {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.muted,
.lead {
  color: var(--muted);
}

.stats-grid,
.card-grid {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  border-radius: 28px;
  padding: 1.4rem;
  min-height: 132px;
  display: grid;
  align-content: end;
  color: white;
  border: none;
}

.stat-card-link {
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.stat-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(79, 112, 173, 0.22);
}

.stat-card.disabled {
  color: rgba(24, 33, 47, 0.75);
  background: linear-gradient(180deg, #eef3fb 0%, #e4ebf8 100%);
}

.stat-card span {
  font-size: 2.15rem;
  font-weight: 800;
}

.panel {
  border-radius: 26px;
  padding: 1.5rem;
  border: 1px solid rgba(219, 228, 243, 0.9);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.account-photo-block {
  margin-bottom: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.account-photo-actions {
  display: grid;
  justify-items: start;
  gap: 1rem;
}

.account-photo-preview {
  width: min(240px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 18px 36px rgba(69, 107, 170, 0.12);
  cursor: zoom-in;
}

.modal-open {
  overflow: hidden;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.photo-modal[hidden] {
  display: none;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 18, 40, 0.72);
  backdrop-filter: blur(4px);
}

.photo-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 820px);
  max-height: 90vh;
  padding: 1rem;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  box-shadow: 0 30px 80px rgba(12, 38, 82, 0.35);
  animation: photoModalRise 0.22s ease-out;
}

.photo-modal-image {
  width: 100%;
  max-height: calc(90vh - 2rem);
  object-fit: contain;
  border-radius: 20px;
  display: block;
}

.photo-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(18, 52, 75, 0.14);
  color: #12344b;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

.image-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.image-modal-header strong {
  font-size: 1.05rem;
  color: var(--ink);
}

.image-modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes photoModalRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logout-modal-dialog {
  width: min(92vw, 520px);
  padding: 2rem;
  display: grid;
  gap: 1.35rem;
}

.logout-modal-copy h2 {
  margin: 0.3rem 0 0.65rem;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  color: var(--ink);
}

.logout-modal-copy .muted strong {
  color: var(--ink);
}

.logout-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.9rem;
}

.logout-confirm-button {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  min-width: 120px;
}

.logout-cancel-button {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  min-width: 120px;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.detail-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.detail-card p {
  margin: 0;
}

.material-card,
.question-card {
  border-radius: 24px;
  padding: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e4eaf5;
  box-shadow: none;
}

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

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: #f2ebe1;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}

.icon-button:hover {
  background: #eadbc4;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #ece9ff;
  color: #625fd8;
  font-size: 0.85rem;
  font-weight: 700;
}

.tag.soft {
  background: #eef4ff;
  color: #6680b5;
}

.tag.success {
  background: #dbf5e7;
  color: #16794f;
}

.tag.danger {
  background: #fde6e6;
  color: #b42318;
}

.attendance-table-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 0.48rem 0.85rem;
  text-align: center;
  line-height: 1.2;
}

.report-overview-grid {
  align-items: start;
}

.report-answer-stack {
  display: grid;
  gap: 1rem;
}

.answer-review-card {
  border: 1px solid rgba(111, 132, 190, 0.18);
  border-radius: 26px;
  padding: 1.3rem 1.4rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 247, 255, 0.98) 100%);
}

.answer-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.answer-review-head h3 {
  margin: 0;
}

.answer-option-list {
  margin: 0.6rem 0 1rem;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.4rem;
}

.selected-answer {
  color: var(--primary-700);
  font-weight: 700;
}

.compact-grid {
  margin-top: 0.4rem;
}

.report-question-block {
  border-top: 1px solid rgba(111, 132, 190, 0.16);
  padding-top: 0.95rem;
  margin-top: 0.95rem;
}

.report-question-block:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.link-button {
  border: none;
  background: none;
  padding: 0;
  color: var(--primary-700);
  font: inherit;
  cursor: pointer;
}

.link-button:hover {
  color: var(--primary-800);
}

.tag-success {
  background: rgba(68, 201, 154, 0.18);
  color: #0a8b63;
}

.tag-danger {
  background: rgba(255, 110, 110, 0.18);
  color: #d53c3c;
}

.facilitator-review-dialog {
  width: min(92vw, 900px);
  padding: 1.4rem;
}

.facilitator-review-form {
  display: grid;
  gap: 1rem;
}

.flash-stack {
  display: grid;
  gap: 0.75rem;
}

.flash {
  background: #ffffff;
  border-left: 5px solid var(--accent);
  padding: 0.9rem 1rem;
  border-radius: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.top-gap {
  margin-top: 1rem;
}

.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.85rem;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-slider {
  position: relative;
  width: 60px;
  height: 34px;
  border-radius: 999px;
  background: #d8e3f7;
  transition: background 180ms ease;
  flex: 0 0 auto;
}

.switch-slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 6px 16px rgba(85, 107, 146, 0.22);
  transition: transform 180ms ease;
}

.switch-control input:checked + .switch-slider {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-blue) 100%);
}

.switch-control input:checked + .switch-slider::after {
  transform: translateX(26px);
}

.switch-label {
  color: var(--ink);
  font-weight: 600;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.evaluation-card {
  display: grid;
  gap: 0.9rem;
}

.evaluation-item-form {
  display: grid;
  gap: 0.9rem;
}

.danger-button {
  border-color: #dc2626 !important;
  color: #dc2626 !important;
}

.full-width {
  grid-column: 1 / -1;
}

.table-wrapper {
  overflow-x: auto;
}

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

th,
td {
  padding: 0.95rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.question-stack {
  display: grid;
  gap: 1rem;
}

.choice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(212, 196, 178, 0.45);
}

.choice-row:first-of-type {
  margin-top: 0.75rem;
}

.choice-row span {
  flex: 1;
}

.quiz-list {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.quiz-dashboard-list {
  display: grid;
  gap: 1rem;
}

.quiz-dashboard-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.45);
}

.quiz-dashboard-card h3 {
  margin: 0.25rem 0 0.5rem;
}

.quiz-dashboard-card p {
  margin: 0;
}

.quiz-dashboard-meta {
  display: grid;
  gap: 0.75rem;
  justify-items: end;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inline-actions form {
  margin: 0;
}

.room-key {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  background: #e9f2ff;
  color: #2057a8;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.join-class-form {
  display: grid;
  grid-template-columns: minmax(180px, 320px) max-content;
  align-items: end;
  gap: 1rem;
}

.quiz-list-title {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 700;
}

.quiz-link {
  display: inline-flex;
  width: fit-content;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  background: #f2ebe1;
  color: var(--ink);
  font-weight: 700;
}

.quiz-link.static {
  cursor: default;
}

.quiz-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.quiz-item:first-child {
  border-top: none;
  padding-top: 0;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.material-layout {
  display: grid;
  gap: 1.25rem;
}

.panel-subsection {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.video-shell {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 24px;
  overflow: hidden;
}

.video-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.info-box {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  border: 1px solid #dce6f7;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}

.info-box strong {
  display: block;
  margin-bottom: 0.35rem;
}

.info-box p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.warning-box {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}

.review-answer-list p {
  margin: 0.6rem 0;
}

.selected-answer {
  font-weight: 800;
  color: var(--accent);
}

.top-gap {
  margin-top: 1rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0 0.25rem;
}

.topbar h1 {
  margin: 0.15rem 0 0;
  font-size: 2rem;
}

.topbar-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  font-weight: 700;
}

.topbar-chip {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ece9ff 0%, #dff0ff 100%);
  color: #5c61c6;
  font-weight: 700;
}

.sidebar.collapsed .sidebar-copy,
.sidebar.collapsed .nav-label {
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
}

.sidebar.collapsed .nav-label {
  width: 0;
  min-width: 0;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-head {
  justify-items: center;
  margin-bottom: 0.5rem;
}

.sidebar.collapsed .sidebar-nav a {
  width: 54px;
  min-width: 54px;
  height: 54px;
  justify-content: center;
  padding: 0;
  margin-inline: auto;
}

.sidebar.collapsed {
  padding-inline: 0.65rem;
}

.sidebar.collapsed .sidebar-nav {
  justify-items: center;
  margin-top: 0.5rem;
}

.sidebar.collapsed .sidebar-toggle {
  width: 54px;
  height: 54px;
  align-self: center;
  margin-inline: auto;
  transform: rotate(180deg);
}

.app-shell:has(.sidebar.collapsed) {
  grid-template-columns: 86px minmax(0, 1fr);
}

.nav-label {
  transition: opacity 0.24s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.sidebar.collapsed .nav-icon {
  margin: 0;
}

.dashboard-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f4f7ff 100%);
  border: 1px solid #e2e8f6;
  border-radius: 26px;
  padding: 1.6rem;
  box-shadow: 0 18px 34px rgba(120, 140, 188, 0.1);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.2rem;
}

.teacher-dashboard-grid {
  grid-template-columns: 1.6fr 0.9fr;
}

.spotlight-panel,
.teacher-side-panel {
  background: linear-gradient(180deg, #fbfcff 0%, #f6f9ff 100%);
}

.spotlight-stack {
  display: grid;
  gap: 1rem;
}

.spotlight-card {
  border-radius: 22px;
  padding: 1.1rem 1.2rem;
  color: white;
}

.spotlight-card p,
.spotlight-card strong {
  margin: 0;
}

.spotlight-card p {
  opacity: 0.8;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.spotlight-card strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.45;
}

.spotlight-card a {
  display: inline-flex;
  margin-top: 0.9rem;
  color: white;
  font-weight: 700;
}

.gradient-primary {
  background: linear-gradient(135deg, #6d63e8 0%, #8d83ff 100%);
}

.gradient-secondary {
  background: linear-gradient(135deg, #57a7f0 0%, #79c2ff 100%);
}

.gradient-tertiary {
  background: linear-gradient(135deg, #46c9c2 0%, #7ee1d6 100%);
}

.accent-blue {
  background: linear-gradient(135deg, #6d63e8 0%, #827cff 100%);
}

.accent-primary {
  background: linear-gradient(135deg, #2563eb 0%, #5aaaf2 100%);
}

.accent-softblue {
  background: linear-gradient(135deg, #5d94f2 0%, #7ab7ff 100%);
}

.accent-cyan {
  background: linear-gradient(135deg, #47c9c4 0%, #7ce1d0 100%);
}

.accent-sky {
  background: linear-gradient(135deg, #7697ff 0%, #8dcbff 100%);
}

.demo-box {
  background: var(--panel-strong);
  padding: 1rem 1.2rem;
  border-radius: 20px;
}

.compact {
  justify-content: flex-start;
}

.compact form {
  margin: 0;
}

@media (max-width: 920px) {
  .page-shell,
  .app-shell,
  .dashboard-grid,
  .teacher-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .sidebar-toggle {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .stats-grid,
  .form-grid,
  .option-grid,
  .quiz-item {
    grid-template-columns: 1fr;
  }

  .quiz-item {
    display: grid;
  }

  .quiz-dashboard-card {
    display: grid;
  }

  .quiz-dashboard-meta {
    justify-items: start;
  }

  .inline-actions {
    justify-content: flex-start;
  }

  .join-class-form {
    grid-template-columns: 1fr;
  }

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

  .welcome-profile-card {
    flex-wrap: wrap;
    padding-right: 1.2rem;
  }

  .welcome-profile-status {
    position: static;
    width: fit-content;
    margin-left: 102px;
  }
}

@media (max-width: 560px) {
  .login-copy h1 {
    letter-spacing: 0.14em;
  }

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

  .register-body {
    padding: 1rem;
  }

  .register-shell {
    padding: 1.25rem;
  }

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

  .register-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .app-body {
    padding: 0;
  }

  .app-shell {
    min-height: 100vh;
    border-radius: 0;
  }

  .sidebar-copy,
  .nav-label {
    display: inline;
  }

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

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

  .welcome-profile-card {
    width: 100%;
    padding: 1rem;
  }

  .welcome-profile-photo {
    width: 74px;
    height: 74px;
  }

  .welcome-profile-meta {
    flex-direction: column;
  }

  .welcome-profile-status {
    margin-left: 0;
  }
}
