:root {
  --bg: #07111f;
  --panel: rgba(11, 22, 38, 0.88);
  --panel-2: rgba(17, 30, 51, 0.95);
  --card: rgba(15, 24, 40, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(79, 209, 255, 0.28);
  --text: #f5f7fb;
  --muted: #9aa8bf;
  --cyan: #44d9ff;
  --cyan-2: #22b8ff;
  --violet: #7c5cff;
  --success: #33d17a;
  --warning: #ffb84d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(68, 217, 255, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #06101b 0%, #07111f 50%, #050c16 100%);
  color: var(--text);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  overflow-x: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(4, 10, 18, 0.75);
  backdrop-filter: blur(18px);
  padding: 22px 14px 18px;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar__brand h2 {
  margin: 0;
  font-size: 1rem;
}

.sidebar__brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.sidebar__logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #04111d;
  font-weight: 800;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 13px;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar__link:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar__link.active {
  color: var(--text);
  background: rgba(68, 217, 255, 0.1);
  border-color: var(--border-strong);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.sidebar__note {
  margin-top: 24px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar__note-label {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
}

.sidebar__note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
}

.main-content {
  min-width: 0;
  overflow-x: hidden;
  padding: 32px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 700;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border-radius: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.25s ease;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  color: #04101d;
  box-shadow: 0 12px 35px rgba(34, 184, 255, 0.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  border-top-width: 2px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.stats-grid .stat-card:nth-child(1):hover { border-color: rgba(68, 217, 255, 0.22); }
.stats-grid .stat-card:nth-child(2):hover { border-color: rgba(51, 209, 122, 0.22); }
.stats-grid .stat-card:nth-child(3):hover { border-color: rgba(124, 92, 255, 0.22); }
.stats-grid .stat-card:nth-child(4):hover { border-color: rgba(255, 184, 77, 0.22); }

.stats-grid .stat-card:nth-child(1) { border-top-color: var(--cyan); }
.stats-grid .stat-card:nth-child(2) { border-top-color: var(--success); }
.stats-grid .stat-card:nth-child(3) { border-top-color: var(--violet); }
.stats-grid .stat-card:nth-child(4) { border-top-color: var(--warning); }

.stats-grid .stat-card:nth-child(1) .stat-card__value { color: var(--cyan); }
.stats-grid .stat-card:nth-child(2) .stat-card__value { color: var(--success); }
.stats-grid .stat-card:nth-child(3) .stat-card__value { color: var(--violet); }
.stats-grid .stat-card:nth-child(4) .stat-card__value { color: var(--warning); }

.stat-card__label {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.stat-card__value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.stat-card__helper {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 380px;
  gap: 22px;
}

.dashboard-main,
.dashboard-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.panel {
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel__header {
  margin-bottom: 20px;
}

.panel__header--between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-label {
  margin: 0 0 10px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
}

.panel__header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.mini-link {
  color: var(--cyan);
  font-weight: 700;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.quick-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition: 0.25s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.quick-card__icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(68, 217, 255, 0.08);
  border: 1px solid rgba(68, 217, 255, 0.12);
  color: var(--cyan);
  font-size: 1.3rem;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.quick-card:hover .quick-card__icon {
  background: rgba(68, 217, 255, 0.14);
  border-color: rgba(68, 217, 255, 0.25);
}

.quick-card__body strong {
  display: block;
  margin-bottom: 8px;
}

.quick-card__body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.recent-courses {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recent-course {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.recent-course__left strong {
  display: block;
  margin-bottom: 8px;
}

.recent-course__left p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.recent-course__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  font-size: 0.9rem;
}

.mini-btn.primary {
  border-color: rgba(68, 217, 255, 0.2);
  background: rgba(68, 217, 255, 0.1);
  color: var(--cyan);
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shortcut-btn {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  font-size: 0.9rem;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.shortcut-btn:hover {
  border-color: var(--border-strong);
  background: rgba(68, 217, 255, 0.08);
  transform: translateX(2px);
}


@media (max-width: 1280px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    overflow-y: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .main-content {
    padding: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .recent-course,
  .panel__header--between {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions,
  .recent-course__actions {
    flex-direction: column;
  }
}