:root {
  --bg: #f3f6fb;
  --paper: #ffffff;
  --ink: #10233f;
  --muted: #64758b;
  --line: #dbe4ef;
  --brand: #0f766e;
  --brand-dark: #0b4f4a;
  --brand-soft: #d7f0ec;
  --danger: #9f1239;
  --danger-soft: #ffe4e6;
  --warn: #92400e;
  --warn-soft: #ffedd5;
  --ok: #166534;
  --ok-soft: #dcfce7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, #d7f0ec 0%, transparent 55%),
    radial-gradient(1200px 500px at 90% -10%, #dbeafe 0%, transparent 55%),
    var(--bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1180px, 92%);
  margin: 30px auto 56px;
}

.app-shell {
  width: min(1320px, 96%);
  margin: 18px auto 28px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.sidebar {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  background: #0f1e33;
  border-radius: 20px;
  color: #d8e3f0;
  padding: 20px 16px;
  box-shadow: 0 16px 30px rgba(15, 30, 51, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-shell {
  width: min(1400px, 97%);
}

.admin-sidebar {
  background:
    linear-gradient(180deg, rgba(30, 64, 175, 0.22), rgba(15, 23, 42, 0.95)),
    #0b1730;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.admin-sidebar .nav-link {
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.admin-sidebar .nav-link.active {
  background: linear-gradient(120deg, rgba(20, 184, 166, 0.32), rgba(37, 99, 235, 0.35));
  border-color: rgba(191, 219, 254, 0.35);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.admin-content {
  padding-top: 2px;
}

.admin-topbar {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(8px);
  border: 1px solid #d5e0ed;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.sidebar h2 {
  margin: 0;
  color: #fff;
  font-size: 1.12rem;
}

.sidebar p {
  margin: 0;
  color: #9fb2ca;
  font-size: 0.86rem;
}

.sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.nav-link {
  display: block;
  border-radius: 10px;
  padding: 10px 12px;
  color: #dbe8f8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-weight: 600;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.sidebar-footer {
  margin-top: auto;
}

.content {
  min-width: 0;
}

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-title {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.hero {
  background: linear-gradient(130deg, #0f766e, #115e59 60%, #1d4ed8);
  color: #fff;
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 18px 35px rgba(13, 42, 79, 0.18);
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  letter-spacing: -0.02em;
}

.hero p {
  margin: 10px 0 0;
  color: #ddf9f4;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.stat {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
}

.stat small {
  display: block;
  color: #d8f6f1;
  font-size: 0.82rem;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 18px rgba(16, 35, 63, 0.06);
}

.admin-content .card {
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.admin-content .card h3 {
  margin-bottom: 14px;
  font-size: 1.12rem;
}

.card h3,
.card h4 {
  margin-top: 0;
  letter-spacing: -0.01em;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

.button {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-dark));
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.button:hover {
  opacity: 0.95;
}

.button:active {
  transform: translateY(1px);
}

.button.secondary {
  color: var(--ink);
  background: #e8eef7;
}

.button.ghost {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.input,
textarea,
select {
  width: 100%;
  border: 1px solid #c7d2e3;
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
}

.input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

label {
  font-size: 0.88rem;
  color: #475569;
  display: block;
  margin-bottom: 6px;
}

.small {
  color: var(--muted);
  font-size: 0.92rem;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.badge.ok {
  color: var(--ok);
  background: var(--ok-soft);
  border-color: #86efac;
}

.badge.warn {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: #fdba74;
}

.badge.danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #fda4af;
}

.badge.neutral {
  color: #334155;
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.progress-line {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #dbe7f5;
  overflow: hidden;
  margin-top: 6px;
}

.progress-line > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f766e, #2563eb);
}

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

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

.table th,
.table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 9px 7px;
  text-align: left;
  font-size: 0.92rem;
  white-space: nowrap;
}

.admin-content .table th,
.admin-content .table td {
  padding: 11px 10px;
}

.admin-content .table thead th {
  background: #f8fbff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table th {
  color: #334155;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-shell {
  width: min(1080px, 92%);
  margin: 56px auto;
  display: grid;
  gap: 14px;
  grid-template-columns: 1.1fr 0.9fr;
}

.auth-banner {
  background: linear-gradient(125deg, #0f766e, #0b4f4a 55%, #2563eb);
  border-radius: 22px;
  padding: 28px;
  color: #fff;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-banner h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  line-height: 1.1;
}

.auth-banner p {
  color: #dbf7f2;
  margin: 12px 0 0;
}

.auth-bullets {
  display: grid;
  gap: 8px;
}

.auth-bullets span {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  width: fit-content;
}

.auth-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
}

.error {
  color: #9f1239;
  background: #ffe4e6;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #fda4af;
}

.course-outline {
  margin: 0;
  padding-left: 18px;
}

.course-outline li {
  margin-bottom: 6px;
}

code {
  font-size: 0.84rem;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 8px;
  padding: 3px 7px;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: min(1180px, 92%);
    margin-top: 14px;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .auth-banner {
    min-height: auto;
  }

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