* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #050505;
  color: #fff;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

a { text-decoration: none; color: inherit; }

.page-grid::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}

.top-glow {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 0;
  pointer-events: none;
  height: 420px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,130,20,0.14), transparent 38%),
    radial-gradient(circle at 80% 10%, rgba(255,102,0,0.08), transparent 20%),
    linear-gradient(to bottom, rgba(255,120,0,0.04), transparent 70%),
    #050505;
}

.container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.section {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.22);
}

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

.brand {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .06em;
  color: #ff8c1a;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-links a {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: #ededed;
}

.nav-links a:hover {
  border-color: rgba(251,146,60,0.60);
  color: #ffbf7a;
}

.page-box {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 28px;
  padding: 24px;
  background: rgba(255,255,255,0.05);
  box-shadow: 0 18px 60px rgba(0,0,0,0.32);
}

.page-title {
  margin: 0;
  font-size: 32px;
  font-weight: 900;
}

.page-subtitle {
  margin: 10px 0 0;
  color: #d4d4d8;
  line-height: 1.7;
}

.form-grid {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  max-width: 520px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #d4d4d8;
}

input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
  color: #fff;
  padding: 12px 14px;
  font-size: 14px;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(251,146,60,0.70);
  box-shadow: 0 0 0 3px rgba(251,146,60,0.18);
}

select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
  color: #fff;
  padding: 12px 14px;
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-orange {
  border-radius: 14px;
  background: linear-gradient(to right, #ff6a00, #ff8c1a);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 900;
  color: #111;
}

.btn-outline {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.30);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.note {
  margin-top: 14px;
  color: #b0b0b8;
  font-size: 13px;
}

.grid-cards {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.card {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
}

.card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.card-desc {
  margin: 8px 0 0;
  color: #d4d4d8;
  line-height: 1.6;
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
}

th {
  color: #ffbf7a;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.lesson-media {
  display: block;
  width: min(100%, 960px);
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: none;
  border: 0;
  border-radius: 12px;
  margin: 10px auto 0;
  background: rgba(0,0,0,0.36);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
}

.modal-card {
  width: min(520px, 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 18px;
  background: rgba(18,18,18,0.94);
  box-shadow: 0 18px 56px rgba(0,0,0,0.42);
}

.flash {
  margin-bottom: 14px;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  font-size: 13px;
}

.flash-success {
  color: #d3f7dd;
  border-color: rgba(37,211,102,.45);
  background: rgba(37,211,102,.12);
}

.flash-error {
  color: #ffd9d9;
  border-color: rgba(255,99,99,.45);
  background: rgba(255,99,99,.12);
}

.flash-info {
  color: #ffe6cc;
  border-color: rgba(251,146,60,.45);
  background: rgba(251,146,60,.12);
}

.upload-progress {
  margin-top: 10px;
  display: none;
}

.upload-progress.is-visible {
  display: block;
}

.upload-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.08);
}

.upload-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, #ff6a00, #ff8c1a);
  transition: width .15s ease;
}

.upload-progress-text {
  margin-top: 6px;
  font-size: 12px;
  color: #d4d4d8;
}

.kpi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(251,146,60,0.20);
  background: rgba(249,115,22,0.10);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #ffbf7a;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .page-title { font-size: 26px; }
  .container { padding: 16px 14px 28px; }
}
