.auth-page .auth-box { max-width: 420px; }
.auth-form {
  display: flex; flex-direction: column; gap: 14px;
  background: #fff; padding: 24px; border-radius: 16px;
  border: 2px solid #eef2f7; box-shadow: 0 8px 24px rgba(26,58,110,.08);
}
.auth-form[hidden] { display: none; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; color: #1a3a6e; }
.auth-form input {
  padding: 12px 14px; border: 2px solid #eef2f7; border-radius: 10px; font-size: 1rem;
}
.auth-form input:focus { outline: none; border-color: #ff6b2c; }
.auth-submit {
  padding: 14px; background: #ff6b2c; color: #fff; border: none; border-radius: 10px;
  font-weight: 700; font-size: 1rem; cursor: pointer; font-family: inherit;
}
.auth-submit:hover { filter: brightness(1.05); }
.btn-link {
  background: transparent;
  border: none;
  color: #ff6b2c;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
}
.forgot-form { margin-top: 14px; }
.auth-error { color: #c0392b; font-size: .9rem; margin: 0; }
.auth-foot { text-align: center; margin-top: 16px; }
.auth-foot a { color: #ff6b2c; font-weight: 700; }

.admin-wrap { max-width: 1100px; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.btn-secondary {
  padding: 12px 16px; background: #fff; border: 2px solid #1a3a6e; color: #1a3a6e;
  border-radius: 10px; font-weight: 600; text-decoration: none; cursor: pointer; font-family: inherit;
}
.admin-status { font-size: .9rem; color: #5a6a85; min-height: 1.2em; }
.admin-filters { display: flex; gap: 10px; margin-bottom: 16px; }
.admin-filters select, .admin-filters input {
  padding: 10px 12px; border: 2px solid #eef2f7; border-radius: 8px; font-size: .95rem;
}
.admin-table-wrap { overflow-x: auto; background: #fff; border-radius: 12px; border: 2px solid #eef2f7; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef2f7; }
.admin-table th { background: #f7f9fc; color: #1a3a6e; }
.btn-small {
  padding: 8px 12px; background: #2db87a; color: #fff; border: none; border-radius: 8px;
  font-weight: 600; cursor: pointer; font-size: .8rem; white-space: nowrap;
}
.btn-small:disabled { opacity: .5; cursor: not-allowed; }
.role-select, .unlock-select {
  padding: 6px 8px;
  border: 2px solid #eef2f7;
  border-radius: 8px;
  font-size: .85rem;
  max-width: 180px;
}
.admin-h3 { margin: 24px 0 8px; color: #1a3a6e; font-family: Montserrat, sans-serif; }
.sync-log { list-style: none; padding: 0; font-size: .85rem; color: #5a6a85; }
.sync-log li { padding: 6px 0; border-bottom: 1px solid #eef2f7; }
.teacher-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
  align-items: start;
}
.lesson-grid-teacher {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.course-pick-card.is-active {
  border-color: #ff6b2c;
  box-shadow: 0 6px 18px rgba(255, 107, 44, 0.2);
}

.course-pick-meta {
  font-size: 0.75rem;
  font-style: normal;
  color: #5a6a85;
  font-weight: 600;
}

.course-breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: #5a6a85;
}

.course-breadcrumb a {
  color: #ff6b2c;
  font-weight: 700;
  text-decoration: none;
}

.course-group-select {
  padding: 6px 8px;
  border: 2px solid #eef2f7;
  border-radius: 8px;
  font-size: 0.8rem;
  max-width: 200px;
}

.drive-admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 2px solid #eef2f7;
}

.drive-admin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a3a6e;
}

.drive-admin-form input {
  padding: 10px 12px;
  border: 2px solid #eef2f7;
  border-radius: 8px;
  font-size: 0.95rem;
}

.course-open-card {
  border-color: #2db87a !important;
  background: linear-gradient(180deg, #fff 0%, #e8fff5 100%) !important;
}
.teacher-lesson-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: #fff;
  border: 2px solid #eef2f7;
  border-radius: 12px;
  text-decoration: none;
  color: #2d3748;
}
.teacher-lesson-card strong {
  color: #ff6b2c;
  font-family: Montserrat, sans-serif;
}
.teacher-lesson-card span {
  font-size: .85rem;
  color: #5a6a85;
}
.teacher-lesson-card:hover { border-color: #ff6b2c; }
@media (max-width: 900px) {
  .teacher-grid { grid-template-columns: 1fr; }
  .lesson-grid-teacher { grid-template-columns: 1fr; }
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 58, 110, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(26, 58, 110, 0.2);
}
.modal-text {
  color: #1a3a6e;
  line-height: 1.5;
  white-space: pre-line;
  margin: 16px 0 0;
}
.modal-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 4px solid #eef2f7;
  border-top-color: #ff6b2c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.modal-spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: #5a6a85; font-size: .85rem; }
.teacher-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.admin-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0 20px;
}

.admin-health-item {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #eef2f7;
  background: #fff;
  font-size: 0.85rem;
}

.admin-health-item.is-ok { border-color: #2db87a; }
.admin-health-item.is-warn { border-color: #ff6b2c; background: #fff8f3; }
.admin-health-item.is-bad { border-color: #c0392b; background: #fff5f5; }

.teacher-live-banner {
  margin: 12px 0 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #1a3a6e, #2a5298);
  color: #fff;
}

.teacher-live-banner a { color: #ffd166; font-weight: 700; }
