: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;
}

button,
input,
select {
  font: inherit;
}

.admin-layout {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 20;
  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: 10px;
}

.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);
}

.main-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 32px;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumb a {
  color: var(--cyan);
}

.topbar-actions {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  z-index: 10;
  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;
}

.btn:disabled {
  opacity: 0.64;
  cursor: wait;
}

.btn.is-loading,
.quick-action.is-loading,
.table-btn.is-loading,
.mini-action-card.is-loading {
  opacity: 0.72;
  cursor: wait;
}

.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);
}

.hero-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(68, 217, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(17, 30, 51, 0.95) 0%, rgba(10, 18, 31, 0.98) 100%);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-card__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.hero-card__header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.04;
}

.hero-description {
  margin: 14px 0 0;
  max-width: 850px;
  color: var(--muted);
  line-height: 1.75;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge--published {
  background: rgba(51, 209, 122, 0.14);
  color: #74f0aa;
}

.badge--draft {
  background: rgba(255, 184, 77, 0.14);
  color: #ffd18b;
}

.badge--dark {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.hero-stats {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.hero-stat {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.hero-stat span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.hero-stat strong {
  font-size: 1.25rem;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.quick-action {
  appearance: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-left-color: rgba(68, 217, 255, 0.15);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.quick-action:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  border-left-color: var(--cyan);
  background: rgba(68, 217, 255, 0.04);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.quick-action strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.quick-action span {
  color: var(--muted);
  line-height: 1.55;
  display: block;
  font-size: 0.85rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 380px;
  gap: 22px;
}

.main-column,
.side-column {
  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: 18px;
}

.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;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.info-item {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-item span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.info-item strong {
  font-size: 1rem;
}

.readiness-card {
  display: grid;
  gap: 16px;
}

.readiness-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.readiness-card__hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.readiness-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.readiness-pill.is-ready {
  color: #7ef0b3;
  border-color: rgba(126, 240, 179, 0.28);
  background: rgba(0, 200, 120, 0.12);
}

.readiness-pill.is-pending {
  color: #ffd27a;
  border-color: rgba(255, 210, 122, 0.22);
  background: rgba(255, 190, 60, 0.11);
}

.readiness-checklist,
.readiness-alerts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.readiness-item,
.readiness-alerts li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.readiness-item.is-ready {
  border-color: rgba(126, 240, 179, 0.2);
  background: rgba(0, 200, 120, 0.08);
}

.readiness-item.is-missing,
.readiness-alerts li {
  border-color: rgba(255, 210, 122, 0.18);
  background: rgba(255, 190, 60, 0.08);
}

.readiness-alerts li.is-success {
  border-color: rgba(126, 240, 179, 0.2);
  background: rgba(0, 200, 120, 0.08);
  color: #7ef0b3;
}

.readiness-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.readiness-item.is-ready .readiness-item__icon {
  color: #02160d;
  background: #7ef0b3;
}

.readiness-item.is-missing .readiness-item__icon {
  color: #221300;
  background: #ffd27a;
}

.modules-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.module-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.module-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.module-card__top h3 {
  margin: 0;
  font-size: 1rem;
}

.module-card__top span {
  color: var(--muted);
  font-size: 0.92rem;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.lesson-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.lesson-toolbar input,
.lesson-toolbar select {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  padding: 0 14px;
}

.lesson-toolbar input {
  flex: 1;
}

.lessons-table-wrap {
  overflow-x: auto;
}

.lessons-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.lessons-table th,
.lessons-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lessons-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.025);
}

.lessons-table tbody tr {
  transition: background 0.15s ease;
}

.lessons-table tbody tr:hover {
  background: rgba(68, 217, 255, 0.04);
}

.lessons-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--cyan);
}

.lesson-status {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.lesson-status--published {
  background: rgba(51, 209, 122, 0.14);
  color: #74f0aa;
}

.lesson-status--draft {
  background: rgba(255, 184, 77, 0.14);
  color: #ffd18b;
}

.content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(68, 217, 255, 0.1);
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 700;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  transition: 0.25s ease;
}

.table-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.flow-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.flow-step.active {
  border-color: var(--border-strong);
  background: rgba(68, 217, 255, 0.08);
}

.flow-step span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 800;
}

.flow-step strong {
  display: block;
  margin-bottom: 6px;
}

.flow-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.mini-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-action-card {
  appearance: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition: 0.25s ease;
}

.mini-action-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.mini-action-card strong {
  display: block;
  margin-bottom: 8px;
}

.mini-action-card span {
  display: block;
  color: var(--muted);
  line-height: 1.6;
}

.empty-state {
  margin-top: 14px;
  padding: 36px 20px;
  border: 1px dashed var(--border);
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.empty-state h3 {
  margin: 0 0 10px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.overlay,
.sidebar::before,
.sidebar::after {
  pointer-events: none;
}

@media (max-width: 1280px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@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);
  }

  .topbar,
  .hero-card__header,
  .panel__header--between,
  .lesson-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 680px) {
  .main-content {
    padding: 18px;
  }

  .info-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }
}
