/* ASC app chrome — LMS + Admin (Educrat shell remapped to brand) */
:root {
  --asc-navy: #0A2A3F;
  --asc-navy-900: #06202F;
  --asc-teal: #12A090;
  --asc-teal-deep: #0C7A6E; /* AA-safe fill with white text */
  --asc-gold: #C7A24E;
  --asc-gold-text: #7A5C14; /* AA-safe gold on white */
  --asc-paper: #F6F8FA;
  --asc-ink: #1E2E38;
  --asc-muted: #5B6B75;
  --asc-line: #E3E8EC;
  --asc-white: #FFFFFF;
  --asc-serif: "Lora", Georgia, serif;
  --asc-sans: "DM Sans", system-ui, sans-serif;
}

body.asc-app {
  margin: 0;
  font-family: var(--asc-sans);
  color: var(--asc-ink);
  background: var(--asc-paper);
  -webkit-font-smoothing: antialiased;
}

.asc-app h1, .asc-app h2, .asc-app h3, .asc-app h4 {
  font-family: var(--asc-serif);
  color: var(--asc-navy);
  margin: 0;
}

.asc-app a { color: inherit; text-decoration: none; }
.asc-app * { box-sizing: border-box; }
.asc-app :focus-visible {
  outline: 3px solid var(--asc-teal);
  outline-offset: 2px;
}

.asc-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) {
  .asc-auth { grid-template-columns: 1fr; }
  .asc-auth__visual { min-height: 160px; }
}
.asc-auth__visual {
  background: linear-gradient(145deg, var(--asc-navy-900), var(--asc-navy) 45%, var(--asc-teal-deep));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
}
.asc-auth__visual h1 { color: #fff; font-size: 2rem; max-width: 18ch; }
.asc-auth__visual p { color: rgba(255,255,255,.78); margin-top: 12px; max-width: 36ch; line-height: 1.5; }
.asc-auth__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--asc-white);
}
.asc-auth__card {
  width: 100%;
  max-width: 420px;
  background: var(--asc-white);
  border: 1px solid var(--asc-line);
  border-radius: 16px;
  padding: 32px;
}
.asc-auth__card .logo { height: 40px; margin-bottom: 24px; }
.asc-auth__card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.asc-auth__card .sub { color: var(--asc-muted); font-size: .95rem; margin-bottom: 24px; }

.asc-field { margin-bottom: 16px; }
.asc-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--asc-muted);
  margin-bottom: 6px;
}
.asc-field input, .asc-field select, .asc-field textarea {
  width: 100%;
  border: 1px solid var(--asc-line);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  color: var(--asc-ink);
  background: var(--asc-white);
  min-height: 44px;
}
.asc-field textarea { min-height: 110px; resize: vertical; }

.asc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  min-height: 44px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--asc-teal-deep);
  color: #fff;
}
.asc-btn.-gold { background: var(--asc-gold); color: var(--asc-navy-900); }
.asc-btn.-outline {
  background: transparent;
  color: var(--asc-navy);
  border: 1px solid var(--asc-line);
}
.asc-btn.-block { width: 100%; }
.asc-btn.-sm { padding: 10px 16px; font-size: .875rem; }
.asc-btn:disabled { opacity: .55; cursor: not-allowed; }
.asc-btn:hover:not(:disabled) { filter: brightness(1.05); }
.asc-btn[aria-disabled="true"] {
  opacity: .55;
  pointer-events: none;
  cursor: not-allowed;
}

.asc-shell { display: flex; min-height: 100vh; }
.asc-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--asc-navy-900);
  color: #fff;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.asc-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 12px;
}
.asc-sidebar__brand img { height: 32px; }
.asc-sidebar__brand span {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
}
.asc-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  min-height: 44px;
  border-radius: 10px;
  color: rgba(255,255,255,.78);
  font-size: .95rem;
  font-weight: 500;
}
.asc-sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.asc-sidebar a.is-active {
  background: var(--asc-teal-deep);
  color: #fff;
}
.asc-sidebar__foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
  color: rgba(255,255,255,.55);
}
.asc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.asc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: var(--asc-white);
  border-bottom: 1px solid var(--asc-line);
}
.asc-topbar h1 { font-size: 1.25rem; }
.asc-topbar__meta { color: var(--asc-muted); font-size: .9rem; }
.asc-burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--asc-navy);
}
.asc-content { padding: 28px; }
@media (max-width: 900px) {
  .asc-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .asc-sidebar.is-open { transform: translateX(0); }
  .asc-burger { display: inline-flex; }
  .asc-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6,32,47,.45);
    z-index: 30;
  }
  .asc-backdrop.is-open { display: block; }
}

.asc-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 24px;
}
.asc-card {
  background: var(--asc-white);
  border: 1px solid var(--asc-line);
  border-radius: 16px;
  padding: 22px 24px;
}
.asc-card h2, .asc-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.asc-card .kpi { font-family: var(--asc-serif); font-size: 2rem; color: var(--asc-teal-deep); }
.asc-card .muted, .muted { color: var(--asc-muted); font-size: .9rem; }
.asc-table-wrap { overflow-x: auto; }
.asc-table { width: 100%; border-collapse: collapse; font-size: .925rem; }
.asc-table th, .asc-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--asc-line);
}
.asc-table th {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--asc-muted);
}
.asc-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(12,122,110,.12);
  color: var(--asc-teal-deep);
}
.asc-badge.-warn { background: rgba(199,162,78,.18); color: #7A5C14; }
.asc-badge.-danger { background: rgba(179,38,30,.12); color: #b3261e; }
.asc-badge.-ok { background: rgba(12,122,110,.12); color: var(--asc-teal-deep); }
.asc-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.asc-progress {
  height: 8px;
  background: var(--asc-paper);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.asc-progress > span {
  display: block;
  height: 100%;
  background: var(--asc-teal-deep);
  border-radius: inherit;
}
.asc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.asc-tabs [role="tab"] {
  border: 1px solid var(--asc-line);
  background: var(--asc-white);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 44px;
  font: inherit;
  cursor: pointer;
}
.asc-tabs [role="tab"][aria-selected="true"],
.asc-tabs button.is-active {
  background: var(--asc-navy);
  color: #fff;
  border-color: var(--asc-navy);
}
.asc-list { display: flex; flex-direction: column; gap: 12px; }
.asc-list__item {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid var(--asc-line);
  border-radius: 12px;
  background: var(--asc-white);
}
.asc-list__item h3, .asc-list__item h4 { font-size: 1rem; margin-bottom: 4px; }
.asc-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .asc-split { grid-template-columns: 1fr; }
}
.asc-curriculum details {
  border: 1px solid var(--asc-line);
  border-radius: 12px;
  background: var(--asc-white);
  margin-bottom: 10px;
  padding: 12px 14px;
}
.asc-curriculum summary { cursor: pointer; font-weight: 700; color: var(--asc-navy); }
.asc-curriculum a {
  display: block;
  padding: 10px 4px;
  color: var(--asc-muted);
  font-size: .9rem;
}
.asc-curriculum a:hover { color: var(--asc-teal-deep); }
.asc-player {
  aspect-ratio: 16/9;
  background: var(--asc-navy-900);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.75);
  margin-bottom: 18px;
  gap: 8px;
  text-align: center;
  padding: 24px;
}
.asc-quiz__q {
  border: 1px solid var(--asc-line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
  background: var(--asc-white);
}
.asc-quiz__q legend {
  font-family: var(--asc-serif);
  font-weight: 600;
  color: var(--asc-navy);
  padding: 0;
}
.asc-quiz__opts label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  min-height: 44px;
  border: 1px solid var(--asc-line);
  border-radius: 10px;
  margin-top: 8px;
  cursor: pointer;
}
.asc-dropzone {
  position: relative;
  border: 2px dashed var(--asc-line);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  background: var(--asc-paper);
  color: var(--asc-muted);
  cursor: pointer;
}
.asc-dropzone.is-ready {
  border-color: var(--asc-teal-deep);
  color: var(--asc-teal-deep);
}
.asc-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.asc-alert {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: .95rem;
}
.asc-alert.-ok { background: rgba(12,122,110,.12); color: var(--asc-teal-deep); }
.asc-alert.-err { background: rgba(179,38,30,.1); color: #b3261e; }
.asc-alert.-warn { background: rgba(199,162,78,.16); color: #7A5C14; }
.asc-form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.asc-design-hub { max-width: 960px; margin: 40px auto; padding: 0 24px; }
.asc-design-hub ul { padding-left: 1.2rem; line-height: 1.8; }
.asc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--asc-navy);
  color: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: .2s ease;
  z-index: 50;
  max-width: 320px;
}
.asc-toast.is-visible { opacity: 1; transform: none; }
