:root {
  --bg-primary: #f6f7f9;
  --bg-secondary: #ffffff;
  --bg-subtle: #f0f2f5;
  --border: #dfe3e8;
  --border-strong: #c8ced6;
  --text-primary: #17202a;
  --text-secondary: #5d6875;
  --text-muted: #89929d;
  --accent-purple: #2457d6;
  --accent-blue: #2457d6;
  --accent-cyan: #246b8e;
  --accent-green: #17804b;
  --accent-orange: #9a5b13;
  --accent-red: #c23b3b;
  --accent-pink: #9b4771;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --transition: 150ms ease;
}

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

html {
  color-scheme: light;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.glass-card {
  padding: 22px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.panel-spaced {
  margin-bottom: 20px;
}

.brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-blue);
  color: #ffffff;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.brand-mark-sm {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d49ba;
}

.btn-secondary {
  background: var(--bg-secondary);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #aeb6c0;
}

.btn-danger {
  background: var(--accent-red);
  color: #ffffff;
}

.btn-danger:hover {
  background: #a93131;
}

.btn-success {
  background: var(--accent-green);
  color: #ffffff;
}

.btn-sm {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}

.btn-lg {
  min-height: 44px;
  padding: 11px 20px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.form-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:hover {
  border-color: #aeb6c0;
}

.form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.12);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  min-height: 92px;
  resize: vertical;
}

.form-submit {
  width: 100%;
  margin-top: 4px;
}

.login-container {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px;
  animation: fade-in 220ms ease;
}

.login-card .logo {
  margin-bottom: 30px;
  text-align: center;
}

.login-card .logo .brand-mark {
  margin-bottom: 14px;
}

.login-card .logo h1 {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.login-card .logo p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 14px;
}

.login-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 3px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.login-tab {
  flex: 1;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.login-tab.active {
  border-color: var(--border);
  background: #ffffff;
  color: var(--text-primary);
}

.login-error {
  display: none;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #edc5c5;
  border-radius: var(--radius-sm);
  background: #fff4f4;
  color: #9f2929;
  font-size: 13px;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 100;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 244px;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
  transition: transform 200ms ease;
}

.sidebar-logo {
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.nav-item {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  margin-bottom: 2px;
  padding: 9px 11px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  text-overflow: ellipsis;
  transition: background-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.nav-item.active {
  background: #edf2ff;
  color: #1d49ba;
  font-weight: 650;
}

.nav-back::before {
  content: "";
  width: 7px;
  height: 7px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.nav-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 11px 6px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-section .badge {
  font-size: 10px;
}

.sidebar-actions {
  display: grid;
  gap: 8px;
  padding: 12px 0 4px;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.sidebar-logout {
  margin-top: 8px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px;
}

.user-avatar,
.participant-item .p-avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e7ecf5;
  color: #34435a;
  font-weight: 700;
}

.user-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.user-info {
  min-width: 0;
  flex: 1;
}

.user-info .name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-info .points {
  color: var(--text-secondary);
  font-size: 11px;
}

.sidebar-person {
  cursor: default;
}

.sidebar-person:hover {
  background: transparent;
}

.sidebar-initial {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}

.main-content {
  width: calc(100% - 244px);
  margin-left: 244px;
  padding: 34px 38px;
}

.page-header {
  margin-bottom: 26px;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--accent-blue) !important;
  font-size: 11px !important;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-header h1 {
  margin-bottom: 5px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 740;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.code-button {
  margin-left: 5px;
  padding: 1px 5px;
  border: 0;
  border-radius: 4px;
  background: #edf2ff;
  color: #1d49ba;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.code-button:hover {
  background: #dfe8ff;
}

.meta-separator {
  margin: 0 7px;
  color: var(--border-strong);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
}

.stat-card .stat-value {
  color: var(--text-primary);
  font-size: 30px;
  font-weight: 720;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.badge,
.section-title .badge {
  display: inline-flex;
  min-width: 22px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}

.class-list,
.leaderboard-list,
.news-list {
  display: flex;
  flex-direction: column;
}

.class-list {
  gap: 8px;
}

.class-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--transition), background-color var(--transition);
}

.class-item:hover {
  border-color: var(--border-strong);
  background: #fafbfc;
}

.class-icon {
  display: flex;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: #edf2ff;
  color: #284c9b;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.class-info {
  min-width: 0;
  flex: 1;
}

.class-info .class-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-info .class-meta {
  display: flex;
  gap: 12px;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.class-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
}

.class-badge.host {
  background: #edf2ff;
  color: #1d49ba;
}

.class-badge.member {
  background: #edf7f1;
  color: #17663e;
}

.role-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 11px;
  font-size: 11px;
}

.leaderboard-list {
  gap: 2px;
}

.lb-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 8px;
  border-bottom: 1px solid #edf0f3;
}

.lb-item:last-child {
  border-bottom: 0;
}

.lb-rank {
  display: flex;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.lb-rank.gold {
  background: #fff4d8;
  color: #81510d;
}

.lb-rank.silver {
  background: #eef0f3;
  color: #59616b;
}

.lb-rank.bronze {
  background: #f6ebe3;
  color: #7d4a28;
}

.lb-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 13px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-score {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.news-list {
  gap: 0;
}

.news-item {
  padding: 14px 0;
  border-bottom: 1px solid #edf0f3;
}

.news-item:first-child {
  padding-top: 2px;
}

.news-item:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.news-item .news-title {
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 650;
}

.news-item .news-content {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.news-item .news-meta {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
}

.modal-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23, 32, 42, 0.48);
}

.modal-overlay.show {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px;
  animation: fade-in 160ms ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.modal-close {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.modal-close:hover {
  border-color: var(--border);
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.classroom-layout {
  display: grid;
  height: calc(100vh - 146px);
  min-height: 560px;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
}

.classroom-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.classroom-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.screen-viewer {
  position: relative;
  display: flex;
  min-height: 320px;
  flex: 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #303b49;
  border-radius: var(--radius-lg);
  background: #18212d;
}

.screen-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.screen-viewer .placeholder {
  padding: 24px;
  color: #c0c8d2;
  text-align: center;
}

.screen-viewer .placeholder p {
  margin-top: 14px;
  color: #e8ebef;
  font-size: 14px;
  font-weight: 600;
}

.screen-viewer .placeholder span {
  display: block;
  margin-top: 4px;
  color: #8e99a7;
  font-size: 12px;
}

.screen-placeholder-mark {
  display: inline-flex;
  min-width: 72px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid #586575;
  border-radius: var(--radius-sm);
  color: #9ea8b5;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screen-status {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.screen-status.live {
  background: #ffffff;
  color: var(--accent-red);
}

.screen-status.live::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: pulse 1.5s infinite;
  content: "";
}

.host-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.host-controls .btn {
  flex: 1;
  min-width: 130px;
}

.quiz-panel {
  padding: 22px;
}

.quiz-progress {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quiz-timer {
  margin-bottom: 14px;
  color: var(--text-primary);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  text-align: center;
}

.quiz-question {
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: border-color var(--transition), background-color var(--transition);
}

.quiz-option:hover,
.quiz-option.selected {
  border-color: var(--accent-blue);
  background: #f4f7ff;
}

.quiz-option.correct {
  border-color: #64a782;
  background: #f0f8f3;
}

.quiz-option.wrong {
  border-color: #d98787;
  background: #fff5f5;
}

.quiz-option .opt-letter {
  display: flex;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 750;
}

.quiz-feedback {
  font-size: 15px;
  font-weight: 700;
}

.quiz-feedback.correct {
  color: var(--accent-green);
}

.quiz-feedback.wrong {
  color: var(--accent-red);
}

.participant-list {
  display: flex;
  max-height: 250px;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 3px;
  font-size: 13px;
}

.participant-item .p-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.participant-item .p-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-item .p-role {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  text-transform: capitalize;
}

.p-role.host {
  background: #edf2ff;
  color: #1d49ba;
}

.p-role.participant {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.ppt-viewer {
  position: relative;
}

.ppt-slide-frame {
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.ppt-viewer img {
  display: block;
  width: 100%;
}

.ppt-empty {
  padding: 24px 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.ppt-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.ppt-controls .slide-num {
  min-width: 56px;
  color: var(--text-secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: center;
}

.question-block {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fafbfc;
}

.empty-state {
  padding: 34px 16px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.empty-state span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.toast-container {
  position: fixed;
  z-index: 9999;
  top: 18px;
  right: 18px;
  display: flex;
  width: min(360px, calc(100vw - 36px));
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.1);
  font-size: 13px;
  font-weight: 550;
  transition: opacity 300ms ease;
}

.toast.success {
  border-left-color: var(--accent-green);
}

.toast.error {
  border-left-color: var(--accent-red);
}

.toast.info {
  border-left-color: var(--accent-blue);
}

.mobile-bar,
.sidebar-overlay {
  display: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c8ced6;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .classroom-layout {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .classroom-main,
  .classroom-aside {
    overflow: visible;
  }

  .screen-viewer {
    min-height: min(58vw, 560px);
  }

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

@media (max-width: 820px) {
  .mobile-bar {
    position: fixed;
    z-index: 80;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    height: 58px;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
  }

  .mobile-menu-btn {
    padding: 7px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
  }

  .sidebar {
    width: min(280px, 86vw);
    transform: translateX(-100%);
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 90;
    inset: 0;
    border: 0;
    background: rgba(23, 32, 42, 0.38);
  }

  .sidebar-open .sidebar-overlay {
    display: block;
  }

  .main-content {
    width: 100%;
    margin-left: 0;
    padding: 86px 20px 28px;
  }

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

@media (max-width: 560px) {
  .login-card {
    padding: 28px 22px;
  }

  .main-content {
    padding-right: 14px;
    padding-left: 14px;
  }

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

  .stats-row {
    gap: 8px;
  }

  .stat-card {
    min-height: 104px;
    padding: 15px;
  }

  .stat-card .stat-value {
    font-size: 26px;
  }

  .glass-card {
    padding: 18px;
  }

  .class-item {
    align-items: flex-start;
  }

  .class-info .class-meta {
    flex-direction: column;
    gap: 0;
  }

  .classroom-aside {
    display: flex;
  }

  .screen-viewer {
    min-height: 250px;
  }

  .host-controls {
    flex-direction: column;
  }

  .host-controls .btn {
    width: 100%;
  }

  .modal {
    padding: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
