@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700;800&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --bg-soft: #eef7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --glass: rgba(255, 255, 255, .86);
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --navy: #0b1f3a;
  --royal: #2563eb;
  --blue: #2f6fed;
  --teal: #14b8a6;
  --cyan: #22b8cf;
  --violet: #7c3aed;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --gray: #64748b;
  --shadow: 0 24px 70px rgba(15, 23, 42, .10);
  --shadow-sm: 0 12px 34px rgba(15, 23, 42, .08);
  --shadow-xs: 0 7px 18px rgba(15, 23, 42, .06);
  --radius: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --sidebar: 300px;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  min-height: 100vh;
  direction: rtl;
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  background: radial-gradient(circle at 95% -8%, rgba(37, 99, 235, .15), transparent 35%), radial-gradient(circle at 8% 0%, rgba(20, 184, 166, .13), transparent 32%), linear-gradient(135deg, var(--bg), #fafdff 45%, var(--bg-soft));
}

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

button,
input,
select,
textarea {
  font-family: inherit
}

button {
  cursor: pointer
}

.ltr {
  direction: ltr;
  text-align: left
}

.no-print {
  display: inline-flex
}

.help {
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
  margin-top: 5px
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--royal);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .65px;
  text-transform: uppercase
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 22px 18px;
  color: #fff;
  background: linear-gradient(180deg, rgba(7, 20, 43, .98), rgba(15, 23, 42, .98)), radial-gradient(circle at top right, rgba(20, 184, 166, .30), transparent 35%);
  box-shadow: 18px 0 50px rgba(15, 23, 42, .10);
  border-left: 1px solid rgba(255, 255, 255, .08)
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--royal), var(--teal));
  color: #fff;
  font-weight: 900;
  font-size: 25px;
  box-shadow: 0 18px 42px rgba(37, 99, 235, .35)
}

.brand h1 {
  font-size: 25px;
  margin: 0;
  letter-spacing: .2px
}

.brand small {
  display: block;
  color: #cbd5e1;
  margin-top: 1px;
  font-weight: 600
}

.side-caption {
  margin: 16px 0 18px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 22px;
  background: rgba(255, 255, 255, .065);
  color: #dbeafe;
  line-height: 1.75;
  font-size: 13px
}

.nav {
  display: grid;
  gap: 7px
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #dbeafe;
  font-weight: 700;
  transition: .18s ease
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .13);
  color: #fff;
  transform: translateX(-2px)
}

.nav-icon {
  width: 29px;
  height: 29px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .09);
  color: #a5f3fc;
  font-weight: 900
}

.sidebar-card {
  margin-top: 22px;
  border-radius: 22px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .20), rgba(20, 184, 166, .13));
  border: 1px solid rgba(255, 255, 255, .13)
}

.sidebar-card b {
  display: block;
  font-size: 13px
}

.sidebar-card small {
  display: block;
  margin-top: 5px;
  color: #cbd5e1;
  direction: ltr;
  text-align: left
}

.main {
  padding: 28px 32px 48px;
  min-width: 0
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 23px
}

.page-title h2 {
  font-size: 33px;
  line-height: 1.25;
  letter-spacing: -.4px;
  margin: 5px 0 6px
}

.page-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center
}

.user-pill,
.command-trigger {
  border: 1px solid rgba(226, 232, 240, .95);
  background: var(--glass);
  box-shadow: var(--shadow-xs);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--ink-2);
  font-weight: 700;
  white-space: nowrap
}

.command-trigger {
  color: var(--royal)
}

.user-pill span {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--ok);
  margin-left: 8px;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, .12)
}

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

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr))
}

.grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr))
}

.card {
  position: relative;
  background: var(--glass);
  border: 1px solid rgba(226, 232, 240, .88);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  backdrop-filter: blur(15px)
}

.card h3 {
  margin: 0 0 13px;
  font-size: 20px
}

.card p {
  color: var(--ink-2);
  line-height: 1.85
}

.soft {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border-color: #c7d2fe
}

.inset {
  background: #fff;
  border-style: dashed
}

.metric {
  min-height: 132px;
  overflow: hidden
}

.metric span {
  color: var(--muted);
  font-weight: 800
}

.metric b {
  display: block;
  font-size: 38px;
  letter-spacing: -.7px;
  margin-top: 8px
}

.metric:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(20, 184, 166, .10));
  pointer-events: none
}

.metric:after {
  content: "";
  position: absolute;
  left: -42px;
  bottom: -52px;
  width: 138px;
  height: 138px;
  border-radius: 44px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .18), rgba(20, 184, 166, .18));
  transform: rotate(13deg)
}

.metric>* {
  position: relative
}

.btn {
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--royal), #3b82f6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .22);
  transition: .18s ease
}

.btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.08)
}

.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none
}

.btn.secondary {
  background: linear-gradient(135deg, var(--navy), #1e293b)
}

.btn.ok {
  background: linear-gradient(135deg, #10b981, #16a34a)
}

.btn.warn {
  background: linear-gradient(135deg, #f59e0b, #d97706)
}

.btn.bad {
  background: linear-gradient(135deg, #ef4444, #dc2626)
}

.btn-wide {
  width: 100%
}

.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center
}

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

.field label {
  display: block;
  margin-bottom: 7px;
  color: #1e293b;
  font-weight: 800
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  outline: none;
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
  transition: .18s ease
}

.textarea {
  min-height: 114px;
  resize: vertical
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .11);
  background: #fff
}

.score-input {
  max-width: 112px
}

.filters,
.mini-form,
.inline-filter {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center
}

.mini-form {
  margin: 0 0 8px
}

.inline-domain {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px
}

.inline-domain span {
  padding: 12px 13px;
  border-radius: 14px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  direction: ltr
}

.choice {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  margin: 7px 0
}

.choice input {
  margin-left: 8px
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: right
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
  z-index: 1
}

tr:last-child td {
  border-bottom: 0
}

tbody tr:hover,
table tr:hover td {
  background: #fbfdff
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(29, 78, 216, .10);
  font-size: 13px;
  font-weight: 800
}

.badge.ok {
  background: #ecfdf5;
  color: #166534
}

.badge.warn {
  background: #fffbeb;
  color: #92400e
}

.badge.bad {
  background: #fef2f2;
  color: #991b1b
}

.badge.gray {
  background: #f1f5f9;
  color: #475569
}

.flash {
  border-radius: 18px;
  padding: 13px 15px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  font-weight: 700
}

.flash.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534
}

.flash.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b
}

.flash.info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af
}

.empty {
  border: 1px dashed #cbd5e1;
  border-radius: 22px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  line-height: 1.8
}

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

.section-head h3 {
  margin: 0
}

.nice-list {
  margin: 0;
  padding: 0 18px 0 0;
  line-height: 2;
  color: var(--ink-2)
}

.nice-list li {
  margin: 3px 0
}

.public-wrap {
  width: min(1180px, 100%);
  margin: auto
}

.landing-page,
.login-page,
.student-portal {
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(circle at 95% 0%, rgba(37, 99, 235, .14), transparent 35%), radial-gradient(circle at 0% 4%, rgba(20, 184, 166, .14), transparent 32%), linear-gradient(135deg, #f8fbff, #eef7fb)
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 22px;
  align-items: center;
  min-height: 520px
}

.landing-copy {
  padding: 28px
}

.landing-copy h2 {
  font-size: 46px;
  line-height: 1.22;
  letter-spacing: -1px;
  margin: 16px 0 14px
}

.landing-copy p {
  font-size: 18px;
  line-height: 2;
  color: var(--ink-2);
  max-width: 760px
}

.hero-brand {
  margin-bottom: 14px
}

.landing-panel {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden
}

.landing-panel:after {
  content: "";
  position: absolute;
  left: -70px;
  bottom: -80px;
  width: 250px;
  height: 250px;
  border-radius: 70px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .18), rgba(20, 184, 166, .20));
  transform: rotate(13deg)
}

.product-card>* {
  position: relative
}

.landing-features {
  margin: 6px 0 18px
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0
}

.pricing-card {
  position: relative;
  border-radius: 30px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  overflow: hidden
}

.pricing-card.featured {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #fff, #eff6ff)
}

.pricing-card h3 {
  margin: 8px 0
}

.price {
  font-size: 43px;
  font-weight: 900;
  color: var(--royal)
}

.price span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 800
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: stretch
}

.auth-hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  min-height: 470px;
  color: #fff;
  padding: 34px;
  background: linear-gradient(135deg, #0b1f3a, #164e63 55%, #2563eb);
  box-shadow: var(--shadow)
}

.auth-hero h2 {
  font-size: 38px;
  line-height: 1.28;
  margin: 18px 0 12px
}

.auth-hero p {
  line-height: 2;
  color: #dbeafe
}

.auth-card {
  padding: 28px
}

.portal-hero,
.class-hero,
.dashboard-hero,
.report-header {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 24px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff, #eff6ff);
  border: 1px solid #dbeafe;
  box-shadow: var(--shadow-sm)
}

.portal-hero h1,
.class-hero h1 {
  font-size: 42px;
  margin: 6px 0
}

.portal-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.portal-meta span,
.portal-card,
.class-hero-card,
.hero-mini {
  border: 1px solid #bfdbfe;
  background: #fff;
  border-radius: 20px;
  padding: 12px 14px;
  box-shadow: var(--shadow-xs)
}

.portal-card b,
.class-hero-card b,
.hero-mini b {
  display: block
}

.portal-card span,
.class-hero-card span,
.hero-mini span {
  color: var(--muted);
  line-height: 1.7
}

.student-news-strip,
.news-grid,
.class-cards,
.task-list,
.quick-actions,
.intervention-list,
.timeline-list {
  display: grid;
  gap: 16px
}

.student-news-strip {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 18px
}

.public-post-card,
.task-news-card,
.class-card,
.quick-card,
.intervention-card,
.timeline-item,
.class-admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-xs);
  padding: 18px
}

.public-post-card h3,
.task-news-card h2 {
  margin: 10px 0;
  line-height: 1.45
}

.news-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr))
}

.class-cards {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr))
}

.class-card {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.class-card b {
  display: block;
  font-size: 18px
}

.class-card span {
  display: block;
  color: var(--muted);
  margin-top: 4px
}

.class-card em {
  font-style: normal;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800
}

.task-foot,
.task-news-head,
.mini-stats {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap
}

.mini-stats span {
  display: inline-flex;
  flex-direction: column;
  min-width: 84px;
  padding: 9px 12px;
  border-radius: 15px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--muted)
}

.mini-stats b {
  font-size: 22px;
  color: var(--ink)
}

.quick-actions {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 18px 0
}

.quick-card b {
  display: block;
  font-size: 18px
}

.quick-card span {
  color: var(--muted);
  display: block;
  margin-top: 6px
}

.apex-band {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
  margin-top: 18px
}

.apex-card {
  border-radius: 28px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  padding: 22px
}

.apex-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px
}

.apex-steps div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px;
  line-height: 1.7
}

.kpi-number {
  font-size: 52px;
  color: var(--royal);
  font-weight: 900
}

.rich-toolbar {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 9px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 17px 17px 0 0
}

.rich-toolbar button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 7px 11px;
  font-weight: 800
}

.rich-editor {
  min-height: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 17px 17px;
  padding: 16px;
  line-height: 1.9;
  outline: none
}

.rich-content {
  line-height: 1.9;
  color: var(--ink-2)
}

.question,
.question-builder {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: #fff;
  margin-bottom: 12px
}

.question h4 {
  margin: 0 0 10px;
  line-height: 1.7
}

.editor-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px
}

.editor-steps span {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  color: var(--muted);
  font-weight: 800
}

.editor-steps .active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe
}

.task-row {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px
}

.copy-row {
  display: flex;
  gap: 8px;
  align-items: center
}

.video-frame {
  position: relative;
  aspect-ratio: 16/9;
  background: #0f172a;
  border-radius: 22px;
  overflow: hidden
}

.video-frame iframe,
.video-frame video,
.athar-video {
  width: 100%;
  height: 100%;
  border: 0
}

.checkpoint-box {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 20px;
  padding: 15px;
  margin: 12px 0
}

.command-palette {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  display: none;
  place-items: start center;
  padding-top: 8vh;
  z-index: 60;
  backdrop-filter: blur(8px)
}

.command-palette.open {
  display: grid
}

.command-box {
  width: min(640px, 92vw);
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 14px;
  border: 1px solid var(--line)
}

.command-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  font: inherit
}

.command-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  max-height: 60vh;
  overflow: auto
}

.command-list a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc
}

.command-list small {
  color: var(--muted)
}

.signal-bar {
  height: 9px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 10px
}

.signal-bar span {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--royal), var(--teal))
}

.signal-bar.risk span {
  background: linear-gradient(90deg, var(--warn), var(--bad))
}

.apex-watermark {
  position: fixed;
  left: 12px;
  bottom: 10px;
  color: rgba(100, 116, 139, .32);
  font-size: 12px;
  z-index: 0;
  pointer-events: none
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 24px 0
}

.score-list {
  display: grid;
  gap: 9px
}

.timeline-item h3 {
  margin: 8px 0
}

.intervention-card {
  display: grid;
  gap: 8px
}

.intervention-card ul {
  margin: 0;
  padding-right: 20px;
  line-height: 1.8
}

.print-only {
  display: none
}

@media(max-width:1100px) {
  .app-shell {
    grid-template-columns: 1fr
  }

  .sidebar {
    position: relative;
    height: auto
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr))
  }

  .topbar,
  .portal-hero,
  .class-hero,
  .dashboard-hero,
  .report-header,
  .apex-band,
  .landing-hero,
  .auth-layout,
  .task-row {
    grid-template-columns: 1fr
  }

  .grid-5,
  .grid-4,
  .grid-3,
  .grid-2,
  .pricing-grid {
    grid-template-columns: 1fr
  }

  .main {
    padding: 22px
  }

  .apex-steps {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:640px) {
  .landing-copy {
    padding: 8px
  }

  .landing-copy h2,
  .portal-hero h1,
  .class-hero h1 {
    font-size: 31px
  }

  .topbar {
    display: block
  }

  .topbar-actions {
    margin-top: 12px;
    flex-wrap: wrap
  }

  .page-title h2 {
    font-size: 27px
  }

  .main {
    padding: 18px
  }

  .card {
    padding: 16px
  }

  .editor-steps,
  .apex-steps {
    grid-template-columns: 1fr
  }

  .public-wrap {
    padding: 0
  }

  .auth-hero {
    min-height: auto
  }

  .no-print {
    display: none !important
  }
}

@media print {
  body {
    background: #fff
  }

  .sidebar,
  .topbar,
  .no-print,
  .btn,
  .command-palette,
  .apex-watermark {
    display: none !important
  }

  .app-shell {
    display: block
  }

  .main {
    padding: 0
  }

  .card,
  .table-wrap {
    box-shadow: none;
    border-color: #cbd5e1
  }

  .print-only {
    display: block
  }

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

/* ===== Athar V12 Product UX Polish ===== */
.ltr,
.iso-date {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  text-align: left !important;
  display: inline-block
}

.owner-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff, #eff6ff 60%, #ecfeff);
  overflow: hidden
}

.owner-hero h3 {
  font-size: 32px;
  margin: 5px 0
}

.owner-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px
}

.owner-kpis span {
  display: grid;
  gap: 4px;
  border: 1px solid #dbeafe;
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  color: var(--muted);
  font-weight: 800
}

.owner-kpis b {
  font-size: 28px;
  color: var(--royal)
}

.owner-create-grid {
  align-items: start
}

.owner-create,
.owner-guide {
  min-height: 100%
}

.owner-section {
  margin-top: 20px
}

.owner-tenant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 16px
}

.owner-tenant-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: grid;
  gap: 14px
}

.owner-tenant-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px
}

.owner-tenant-card header h3 {
  margin: 4px 0;
  font-size: 23px
}

.owner-tenant-card header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6
}

.owner-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px
}

.owner-card-grid>div {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 18px;
  padding: 11px
}

.owner-card-grid b {
  display: block;
  color: #334155;
  font-size: 13px;
  margin-bottom: 5px
}

.owner-card-grid span {
  display: block;
  color: #0f172a;
  font-weight: 800;
  line-height: 1.55
}

.owner-manage {
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #f8fbff;
  overflow: hidden
}

.owner-manage summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 15px;
  font-weight: 900;
  color: #1d4ed8
}

.owner-manage summary::-webkit-details-marker {
  display: none
}

.owner-manage[open] summary {
  border-bottom: 1px solid #dbeafe;
  background: #eff6ff
}

.owner-action-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px
}

.owner-action-forms .mini-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  align-items: stretch
}

.owner-action-forms .mini-form .btn {
  white-space: nowrap
}

.compact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px
}

.details-panel {
  padding: 14px
}

.notice-card.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e
}

.license-alert {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 13px 15px;
  display: grid;
  gap: 4px;
  line-height: 1.8
}

.license-alert b {
  font-size: 15px
}

.license-alert span {
  color: var(--ink-2)
}

.license-alert.ok {
  border-color: #bbf7d0;
  background: #f0fdf4
}

.license-alert.warn {
  border-color: #fde68a;
  background: #fffbeb
}

.license-alert.danger {
  border-color: #fecaca;
  background: #fef2f2
}

.license-gate-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 80% 0%, rgba(37, 99, 235, .18), transparent 32%), linear-gradient(135deg, #f8fbff, #eef7fb)
}

.license-gate-card {
  width: min(760px, 100%);
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: 34px
}

.license-gate-card h2 {
  font-size: 34px;
  margin: 12px 0
}

.license-gate-card p {
  line-height: 2;
  color: var(--ink-2)
}

.student-portal .public-wrap {
  width: min(1220px, 100%)
}

.portal-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 56%, #ecfeff 100%);
  border-radius: 36px
}

.portal-hero:before {
  content: "";
  position: absolute;
  left: -90px;
  bottom: -110px;
  width: 290px;
  height: 290px;
  border-radius: 80px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .16), rgba(20, 184, 166, .18));
  transform: rotate(15deg)
}

.portal-hero>* {
  position: relative
}

.portal-card {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px)
}

.public-post-card,
.task-news-card,
.class-card {
  transition: .18s ease
}

.public-post-card:hover,
.task-news-card:hover,
.class-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: #bfdbfe
}

.student-news-strip {
  margin-top: 8px
}

.task-list .task-news-card {
  display: grid;
  gap: 10px
}

.task-foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px
}

.task-submit-layout .card,
.question {
  box-shadow: var(--shadow-xs)
}

.rich-content pre,
.rich-editor pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 18px;
  padding: 14px;
  overflow: auto;
  direction: ltr;
  text-align: left
}

.rich-content code,
.rich-editor code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 2px 6px;
  direction: ltr;
  unicode-bidi: isolate
}

.class-admin-card,
.task-row {
  border-color: #dbeafe
}

.task-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
  box-shadow: var(--shadow-xs)
}

@media(max-width:900px) {

  .owner-hero,
  .owner-kpis,
  .owner-card-grid {
    grid-template-columns: 1fr
  }

  .owner-tenant-grid {
    grid-template-columns: 1fr
  }

  .owner-action-forms {
    grid-template-columns: 1fr
  }
}


/* =========================================================
   Athar V16 Luxury Product UI — Final deployment skin
   ========================================================= */
:root {
  --bg: #f7faff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #111827;
  --ink-2: #334155;
  --muted: #6b7280;
  --line: #dbe5f1;
  --navy: #0f2742;
  --royal: #2563eb;
  --royal-2: #3b82f6;
  --teal: #13b8a6;
  --aqua: #e8fbf8;
  --amber: #f59e0b;
  --shadow: 0 28px 80px rgba(15, 39, 66, .11);
  --shadow-sm: 0 16px 44px rgba(15, 39, 66, .085);
  --shadow-xs: 0 8px 22px rgba(15, 39, 66, .06);
  --radius: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

body {
  background: radial-gradient(circle at 88% -8%, rgba(37, 99, 235, .18), transparent 35%), radial-gradient(circle at 10% 2%, rgba(19, 184, 166, .16), transparent 35%), linear-gradient(135deg, #f9fbff, #eff7ff 47%, #f8fffd);
}

.app-shell {
  grid-template-columns: 310px minmax(0, 1fr)
}

.sidebar {
  background: linear-gradient(180deg, #08192d 0%, #102a46 55%, #0f2742 100%);
  border-left: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 20px 0 70px rgba(15, 39, 66, .14)
}

.brand-mark {
  border-radius: 21px;
  background: linear-gradient(135deg, #2563eb 0%, #12b8a6 100%);
  box-shadow: 0 20px 50px rgba(37, 99, 235, .32)
}

.nav a {
  border-radius: 18px
}

.nav a.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .09));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13)
}

.main {
  padding: 34px 38px 54px
}

.topbar {
  margin-bottom: 28px
}

.page-title h2 {
  font-size: 36px
}

.page-title p {
  font-size: 15px;
  color: #64748b
}

.card {
  background: rgba(255, 255, 255, .94);
  border-color: rgba(219, 229, 241, .9);
  box-shadow: var(--shadow-sm)
}

.card:hover {
  border-color: #c7d8ef
}

.metric {
  border-radius: 28px
}

.metric b {
  font-size: 42px
}

.metric:before {
  background: linear-gradient(145deg, rgba(37, 99, 235, .075), rgba(19, 184, 166, .10))
}

.metric:after {
  opacity: .8
}

.btn {
  border-radius: 17px;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .24)
}

.btn.ghost {
  background: #fff;
  border-color: #dbe5f1;
  box-shadow: 0 8px 20px rgba(15, 39, 66, .045)
}

.input,
.select,
.textarea {
  border-color: #dbe5f1;
  border-radius: 18px;
  background: #fff
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #bfdbfe
}

.input:focus,
.select:focus,
.textarea:focus {
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .10)
}

.table-wrap {
  border-radius: 24px;
  border-color: #dbe5f1;
  box-shadow: 0 10px 30px rgba(15, 39, 66, .04)
}

th {
  background: #f4f8fd;
  color: #1f2f46;
  font-weight: 900
}

td {
  background: #fff
}

tr:hover td {
  background: #f8fbff
}

/* public student portal */
.student-portal {
  padding: 28px;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, .18), transparent 35%), linear-gradient(135deg, #f7fbff, #eef9f7)
}

.portal-hero,
.class-hero,
.task-public-hero {
  border: 1px solid #d8e7fb;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 58%, #e9fbf7 100%);
  min-height: 280px
}

.portal-hero h1,
.class-hero h1,
.task-public-hero h1 {
  font-size: 48px;
  letter-spacing: -.8px;
  color: #08192d
}

.portal-hero p,
.class-hero p,
.task-public-hero p {
  font-size: 18px;
  color: #334155
}

.portal-meta span {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  color: #1d4ed8;
  box-shadow: var(--shadow-xs)
}

.portal-card {
  border: 1px solid #dbeafe;
  border-radius: 26px;
  box-shadow: var(--shadow-xs)
}

/* classrooms: visual cards */
.class-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px
}

.class-card,
.class-admin-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-radius: 30px !important;
  background: linear-gradient(135deg, #fff, #f5faff);
  border: 1px solid #d8e7fb;
  box-shadow: var(--shadow-xs);
  padding: 18px 18px 18px 110px !important
}

.class-card:before,
.class-admin-card:before {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: linear-gradient(135deg, #2563eb, #13b8a6);
  box-shadow: 0 18px 40px rgba(37, 99, 235, .22)
}

.class-card:after,
.class-admin-card:after {
  content: "📘";
  position: absolute;
  left: 34px;
  top: 33px;
  font-size: 34px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .15))
}

.class-cards .class-card:nth-child(6n+2):before,
.classes-grid .class-admin-card:nth-child(6n+2):before {
  background: linear-gradient(135deg, #7c3aed, #2563eb)
}

.class-cards .class-card:nth-child(6n+2):after,
.classes-grid .class-admin-card:nth-child(6n+2):after {
  content: "💻"
}

.class-cards .class-card:nth-child(6n+3):before,
.classes-grid .class-admin-card:nth-child(6n+3):before {
  background: linear-gradient(135deg, #0ea5e9, #14b8a6)
}

.class-cards .class-card:nth-child(6n+3):after,
.classes-grid .class-admin-card:nth-child(6n+3):after {
  content: "🔬"
}

.class-cards .class-card:nth-child(6n+4):before,
.classes-grid .class-admin-card:nth-child(6n+4):before {
  background: linear-gradient(135deg, #f59e0b, #ef4444)
}

.class-cards .class-card:nth-child(6n+4):after,
.classes-grid .class-admin-card:nth-child(6n+4):after {
  content: "🎯"
}

.class-cards .class-card:nth-child(6n+5):before,
.classes-grid .class-admin-card:nth-child(6n+5):before {
  background: linear-gradient(135deg, #059669, #13b8a6)
}

.class-cards .class-card:nth-child(6n+5):after,
.classes-grid .class-admin-card:nth-child(6n+5):after {
  content: "🌱"
}

.class-cards .class-card:nth-child(6n):before,
.classes-grid .class-admin-card:nth-child(6n):before {
  background: linear-gradient(135deg, #0f2742, #2563eb)
}

.class-cards .class-card:nth-child(6n):after,
.classes-grid .class-admin-card:nth-child(6n):after {
  content: "🚀"
}

.class-card:hover,
.class-admin-card:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-sm)
}

.class-card b,
.class-admin-card h3 {
  font-size: 22px;
  color: #0f2742
}

.class-card em {
  position: absolute;
  left: 18px;
  bottom: 16px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe
}

/* Teacher pages */
.quick-card,
.task-row,
.timeline-item,
.kanban-card,
.intervention-card {
  border: 1px solid #dbe5f1;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: .18s ease
}

.quick-card:hover,
.task-row:hover,
.timeline-item:hover,
.kanban-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow-sm)
}

.task-row {
  grid-template-columns: minmax(0, 1fr) 360px;
  background: linear-gradient(135deg, #fff, #f9fcff)
}

.task-news-card {
  border-radius: 28px;
  background: #fff;
  border: 1px solid #dbe5f1;
  box-shadow: var(--shadow-xs);
  padding: 20px
}

.task-news-card h2 {
  font-size: 24px;
  color: #0f2742
}

.task-news-card p {
  color: #475569;
  line-height: 1.85
}

.rich-toolbar {
  background: #f4f8fd;
  border-color: #dbe5f1
}

.rich-editor {
  min-height: 260px;
  border-color: #dbe5f1;
  background: #fff;
  box-shadow: inset 0 4px 18px rgba(15, 39, 66, .03)
}

.editor-steps span.active {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border-color: #93c5fd;
  color: #1d4ed8
}

.question-builder,
.question {
  border-radius: 24px;
  border-color: #dbe5f1;
  background: #fff;
  box-shadow: var(--shadow-xs)
}

.owner-tenant-card {
  border-radius: 32px;
  border-color: #d8e7fb;
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: var(--shadow-sm)
}

.owner-card-grid>div {
  background: #fff;
  border-color: #dbe5f1
}

.owner-manage {
  border-color: #cfe1f7;
  background: #f8fbff
}

.import-hint {
  line-height: 2;
  background: linear-gradient(135deg, #f8fbff, #eff6ff);
  border: 1px solid #dbeafe;
  border-radius: 24px;
  padding: 16px;
  color: #334155
}

.dashboard-hero {
  background: linear-gradient(135deg, #ffffff, #eff6ff 55%, #ecfeff);
  border-color: #d8e7fb
}

.hero-mini {
  border-radius: 26px;
  background: #0f2742;
  color: #fff;
  box-shadow: var(--shadow-sm)
}

.license-alert {
  border-radius: 22px
}

.license-alert.ok {
  background: linear-gradient(135deg, #ecfdf5, #f8fffc);
  border-color: #bbf7d0
}

.license-alert.warn {
  background: linear-gradient(135deg, #fffbeb, #fff);
  border-color: #fde68a
}

.license-alert.danger {
  background: linear-gradient(135deg, #fef2f2, #fff);
  border-color: #fecaca
}

@media(max-width:1100px) {
  .app-shell {
    grid-template-columns: 1fr
  }

  .main {
    padding: 22px
  }

  .task-row {
    grid-template-columns: 1fr
  }

  .class-card,
  .class-admin-card {
    padding-left: 96px !important
  }

  .portal-hero h1,
  .class-hero h1,
  .task-public-hero h1 {
    font-size: 34px
  }
}

@media(max-width:640px) {
  .student-portal {
    padding: 14px
  }

  .portal-hero,
  .class-hero,
  .task-public-hero {
    border-radius: 28px
  }

  .class-card,
  .class-admin-card {
    padding: 96px 16px 16px !important
  }

  .class-card:before,
  .class-admin-card:before {
    right: 16px;
    left: auto
  }

  .class-card:after,
  .class-admin-card:after {
    right: 32px;
    left: auto
  }

  .page-title h2 {
    font-size: 27px
  }
}

/* =========================================================
   Athar V17 — Task Studio Premium Experience
   ========================================================= */
.task-studio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: center;
  padding: 34px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 58%, #e8fbf8 100%);
  border-color: #cfe4ff;
  overflow: hidden;
  position: relative
}

.task-studio-hero:before {
  content: "";
  position: absolute;
  inset: auto -70px -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 48%;
  background: radial-gradient(circle, rgba(37, 99, 235, .18), transparent 65%)
}

.task-studio-hero h3 {
  font-size: 36px;
  line-height: 1.35;
  margin: 8px 0;
  color: #08192d
}

.task-studio-hero p {
  font-size: 17px;
  line-height: 2;
  color: #334155;
  max-width: 780px
}

.studio-orb {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 220px;
  border-radius: 58px;
  background: linear-gradient(135deg, #2563eb, #13b8a6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 30px 80px rgba(37, 99, 235, .25);
  transform: rotate(-4deg)
}

.studio-orb b {
  font-size: 54px
}

.studio-orb span {
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 900;
  opacity: .88
}

.task-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  margin-top: 22px
}

.task-studio-main {
  display: grid;
  gap: 18px
}

.studio-panel {
  padding: 24px;
  border-radius: 34px
}

.panel-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px
}

.panel-heading>span {
  width: 48px;
  height: 48px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-weight: 1000
}

.panel-heading h3 {
  margin: 0;
  font-size: 24px;
  color: #0f2742
}

.panel-heading p {
  margin: 4px 0 0;
  color: #64748b;
  line-height: 1.7
}

.wide-2 {
  grid-column: span 2
}

.task-type-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 16px
}

.task-type-cards label {
  cursor: pointer;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  padding: 16px;
  min-height: 100px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: .18s
}

.task-type-cards input {
  position: absolute;
  opacity: 0
}

.task-type-cards span {
  font-size: 20px;
  font-weight: 1000;
  color: #0f2742
}

.task-type-cards small {
  color: #64748b;
  line-height: 1.6
}

.task-type-cards label:has(input:checked) {
  border-color: #60a5fa;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  box-shadow: 0 18px 44px rgba(37, 99, 235, .12);
  transform: translateY(-2px)
}

.class-pick-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr))
}

.classroom-choice {
  padding: 14px 16px;
  border-radius: 18px
}

.classroom-choice span {
  font-weight: 900;
  color: #0f2742
}

.media-studio {
  background: linear-gradient(135deg, #fff, #f8fcff)
}

.media-upload-box label {
  display: block;
  font-weight: 1000;
  margin-bottom: 8px;
  color: #0f2742
}

.cover-drop,
.video-drop {
  position: relative
}

.cover-drop input,
.video-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2
}

.cover-preview,
.video-preview {
  min-height: 220px;
  border: 2px dashed #bfdbfe;
  border-radius: 28px;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #64748b;
  padding: 20px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: .18s
}

.cover-preview:before {
  content: "🖼️";
  font-size: 42px;
  margin-bottom: 10px
}

.cover-preview.has-image:before {
  display: none
}

.cover-preview.has-image span,
.preview-cover.has-image span {
  background: rgba(15, 39, 66, .68);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  backdrop-filter: blur(8px)
}

.cover-preview span,
.video-preview b {
  font-weight: 1000;
  color: #0f2742
}

.video-preview {
  min-height: 220px;
  border-color: #99f6e4;
  background: linear-gradient(135deg, #ecfeff, #f8fffd)
}

.video-preview:before {
  content: "🎬";
  font-size: 44px;
  margin-bottom: 10px
}

.interactive-video-box {
  margin-top: 14px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow-xs)
}

.tinymce-task-editor {
  min-height: 460px
}

.tox.tox-tinymce {
  border-radius: 24px !important;
  border-color: #dbeafe !important;
  box-shadow: var(--shadow-xs) !important;
  overflow: hidden
}

.mini-add-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 120px;
  gap: 10px
}

.questions-wrap {
  display: grid;
  gap: 12px
}

.task-studio-side {
  position: relative
}

.sticky-brief {
  position: sticky;
  top: 24px;
  border-radius: 34px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border-color: #d8e7fb
}

.preview-cover {
  height: 210px;
  border-radius: 28px;
  background: linear-gradient(135deg, #0f2742, #2563eb);
  display: flex;
  align-items: end;
  padding: 18px;
  color: #fff;
  background-size: cover;
  background-position: center;
  margin: 12px 0 16px;
  overflow: hidden
}

.preview-cover span {
  font-weight: 1000
}

.sticky-brief h3 {
  font-size: 24px;
  color: #0f2742;
  margin: 8px 0
}

.sticky-brief p {
  line-height: 1.8;
  color: #475569
}

.preview-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0
}

.preview-pills span {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900
}

.full {
  width: 100%;
  justify-content: center;
  text-align: center
}

.task-filter-panel {
  margin: 18px 0
}

.tasks-command-center {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, #fff, #eef6ff);
  border-color: #cfe4ff
}

.tasks-command-center h3 {
  font-size: 30px;
  margin: 6px 0;
  color: #08192d
}

.tasks-command-center p {
  color: #475569;
  line-height: 1.8
}

.task-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 18px;
  margin-top: 18px
}

.task-product-card {
  background: #fff;
  border: 1px solid #dbe5f1;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: .2s ease
}

.task-product-card:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: var(--shadow)
}

.task-product-cover {
  height: 190px;
  background: radial-gradient(circle at 80% 0%, rgba(19, 184, 166, .24), transparent 42%), linear-gradient(135deg, #102a46, #2563eb);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px;
  color: #fff
}

.task-product-cover span,
.task-product-cover b {
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 1000
}

.task-product-cover:not(.has-cover):after {
  content: "أثر";
  align-self: center;
  margin: auto;
  font-size: 54px;
  font-weight: 1000;
  opacity: .22
}

.task-product-body {
  padding: 20px
}

.task-product-body h3 {
  font-size: 24px;
  margin: 12px 0;
  color: #0f2742
}

.task-product-body p {
  color: #475569;
  line-height: 1.8
}

.task-product-meta {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: #64748b
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.task-actions form {
  display: inline
}

.badge.teal {
  background: #ecfeff;
  border-color: #99f6e4;
  color: #0f766e
}

.luxury-empty {
  grid-column: 1/-1;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  background: linear-gradient(135deg, #fff, #f8fbff)
}

.v17-public-task {
  grid-template-columns: minmax(0, 1fr) 340px
}

.task-public-cover {
  min-height: 250px;
  border-radius: 34px;
  background: linear-gradient(135deg, #0f2742, #2563eb);
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 22px;
  box-shadow: var(--shadow-sm)
}

.task-public-cover b {
  font-size: 24px
}

.task-public-cover span {
  opacity: .9
}

.task-public-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0
}

.task-public-path span {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 12px;
  text-align: center;
  font-weight: 900;
  color: #1d4ed8;
  box-shadow: var(--shadow-xs)
}

.v17-submit-layout {
  align-items: start
}

.task-content-card,
.submit-card-v17 {
  border-radius: 34px
}

.v17-materials {
  display: grid;
  gap: 12px;
  margin-top: 18px
}

.v17-video-task {
  border: 1px solid #dbeafe;
  border-radius: 28px;
  background: #f8fbff;
  padding: 16px;
  overflow: hidden
}

.video-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px
}

.video-title b {
  font-size: 19px;
  color: #0f2742
}

.video-title span {
  color: #64748b
}

.v17-material-link {
  border-radius: 22px;
  background: #fff;
  border: 1px solid #dbeafe;
  box-shadow: var(--shadow-xs)
}

.v17-question {
  border-radius: 26px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  border-color: #dbeafe
}

.notice-card {
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #f8fbff;
  padding: 14px;
  display: grid;
  gap: 4px
}

.notice-card b {
  color: #0f2742
}

.notice-card span {
  color: #64748b
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 22px;
  overflow: hidden;
  background: #0f172a
}

.video-frame iframe,
.video-frame video,
.athar-video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  border-radius: 22px;
  background: #0f172a
}

@media(max-width:1180px) {
  .task-create-layout {
    grid-template-columns: 1fr
  }

  .task-studio-side {
    order: -1
  }

  .sticky-brief {
    position: relative;
    top: auto
  }

  .task-studio-hero {
    grid-template-columns: 1fr
  }

  .studio-orb {
    display: none
  }

  .v17-public-task {
    grid-template-columns: 1fr
  }

  .task-public-path {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:760px) {
  .task-type-cards {
    grid-template-columns: 1fr 1fr
  }

  .wide-2 {
    grid-column: auto
  }

  .mini-add-row {
    grid-template-columns: 1fr
  }

  .task-gallery {
    grid-template-columns: 1fr
  }

  .tasks-command-center {
    display: block
  }

  .task-public-path {
    grid-template-columns: 1fr
  }

  .task-studio-hero h3 {
    font-size: 28px
  }

  .task-studio-hero {
    padding: 22px
  }

  .studio-panel {
    padding: 18px
  }

  .cover-preview,
  .video-preview {
    min-height: 170px
  }
}

/* Athar V18 — Student Mission View */
.athar-mission-page {
  background:
    radial-gradient(circle at 16% 8%, rgba(37, 99, 235, .10), transparent 34%),
    radial-gradient(circle at 84% 10%, rgba(20, 184, 166, .13), transparent 30%),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 52%, #f8fafc 100%);
}

.mission-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 18px 56px;
  direction: rtl
}

.mission-hero {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  padding: 34px;
  min-height: 330px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 28px;
  align-items: stretch;
  background: linear-gradient(135deg, #0b1736, #123a72 55%, #0ea5a7);
  box-shadow: 0 30px 80px rgba(15, 23, 42, .18);
  color: #fff
}

.mission-hero:before {
  content: "";
  position: absolute;
  inset: -140px auto auto -80px;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  filter: blur(3px)
}

.mission-hero:after {
  content: "";
  position: absolute;
  right: -95px;
  bottom: -140px;
  width: 370px;
  height: 370px;
  border-radius: 999px;
  background: rgba(45, 212, 191, .17)
}

.mission-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px
}

.mission-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px
}

.mission-kicker span {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  color: #bfdbfe;
  background: rgba(255, 255, 255, .11);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16)
}

.mission-kicker b {
  font-size: 13px;
  background: #fff;
  color: #0f766e;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .12)
}

.mission-hero h1 {
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 950;
  letter-spacing: -.03em;
  color: #fff
}

.mission-subtitle {
  font-size: 18px;
  color: #dbeafe;
  margin: 0 0 26px
}

.mission-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.mission-hero-actions .btn.light {
  background: #fff;
  color: #0f172a;
  border: 0
}

.mission-hero-actions .ghost-light {
  background: rgba(255, 255, 255, .13);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .24)
}

.mission-cover-card {
  position: relative;
  z-index: 2;
  border-radius: 30px;
  min-height: 270px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .10));
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 24px 50px rgba(0, 0, 0, .18);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  overflow: hidden
}

.mission-cover-card:not(.has-image):before {
  content: "أثر";
  position: absolute;
  inset: auto 24px 26px auto;
  font-size: 88px;
  font-weight: 950;
  color: rgba(255, 255, 255, .18)
}

.mission-cover-card.has-image .mission-cover-inner {
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(15, 23, 42, .10), rgba(15, 23, 42, .58))
}

.mission-cover-inner {
  position: relative;
  width: 100%;
  padding: 26px;
  color: #fff
}

.mission-cover-inner span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-weight: 900;
  font-size: 12px
}

.mission-cover-inner b {
  display: block;
  font-size: 31px;
  margin-top: 12px
}

.mission-cover-inner small {
  display: block;
  color: #dbeafe;
  font-weight: 800
}

.mission-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0
}

.mission-stats div {
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .07)
}

.mission-stats span {
  display: block;
  color: #64748b;
  font-weight: 850;
  font-size: 13px
}

.mission-stats b {
  display: block;
  color: #0f172a;
  font-size: 21px;
  margin: 7px 0
}

.mission-stats small {
  color: #94a3b8;
  font-weight: 800
}

.mission-journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #edf2f7
}

.journey-step i {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  color: #0369a1;
  font-style: normal;
  font-weight: 950
}

.journey-step.active i {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff
}

.journey-step b {
  display: block;
  color: #0f172a
}

.journey-step span {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 750
}

.mission-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: start
}

.mission-main {
  display: grid;
  gap: 18px
}

.mission-layout .card {
  border: 1px solid #e5edf7;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .07);
  border-radius: 26px
}

.learning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px
}

.learning-grid div {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  border: 1px solid #e8eef7
}

.learning-grid .wide {
  grid-column: 1/-1
}

.learning-grid span {
  display: block;
  color: #2563eb;
  font-weight: 950;
  margin-bottom: 6px
}

.learning-grid p {
  margin: 0;
  color: #334155;
  line-height: 1.9
}

.mission-rich {
  font-size: 16px;
  line-height: 2;
  color: #1e293b
}

.mission-rich h1,
.mission-rich h2,
.mission-rich h3 {
  color: #0f172a
}

.mission-rich pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 18px;
  padding: 16px;
  overflow: auto;
  direction: ltr;
  text-align: left
}

.mission-rich table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 16px;
  overflow: hidden
}

.mission-rich td,
.mission-rich th {
  border: 1px solid #e5edf7;
  padding: 10px
}

.mission-video-grid {
  display: grid;
  gap: 16px
}

.mission-video {
  background: #f8fbff;
  border: 1px solid #e5edf7;
  border-radius: 24px;
  padding: 16px
}

.mission-video .video-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px
}

.mission-video .video-title b {
  font-size: 18px;
  color: #0f172a
}

.mission-video .video-title span {
  color: #64748b;
  font-weight: 800
}

.mission-video video,
.mission-video iframe {
  width: 100%;
  border: 0;
  border-radius: 20px;
  aspect-ratio: 16/9;
  background: #0f172a;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .12)
}

.mission-checkpoint {
  margin-top: 14px;
  border-radius: 18px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 14px
}

.checkpoint-row {
  display: flex;
  gap: 10px
}

.mission-video-help {
  margin: 12px 0 0;
  color: #0f766e;
  font-weight: 850
}

.mission-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px
}

.mission-resource {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: #0f172a;
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 18px;
  padding: 13px;
  transition: .2s
}

.mission-resource:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, .10)
}

.mission-resource i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #ecfeff;
  color: #0f766e;
  font-style: normal;
  font-weight: 950
}

.mission-resource b,
.mission-resource small {
  display: block
}

.mission-resource small {
  color: #64748b;
  font-weight: 800
}

.mission-submit-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px
}

.submit-card-v18 {
  overflow: hidden
}

.submit-card-head {
  margin: -22px -22px 18px;
  padding: 24px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border-bottom: 1px solid #e5edf7
}

.submit-card-head span {
  display: inline-flex;
  color: #2563eb;
  font-weight: 950;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase
}

.submit-card-head h3 {
  font-size: 25px;
  margin: 7px 0;
  color: #0f172a
}

.submit-card-head p {
  margin: 0;
  color: #64748b;
  font-weight: 800;
  line-height: 1.8
}

.identity-input-v18 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em
}

.mission-questions-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px dashed #e5edf7;
  border-bottom: 1px dashed #e5edf7;
  margin: 12px 0;
  color: #0f172a
}

.mission-questions-title span {
  color: #64748b;
  font-weight: 850
}

.v18-question {
  border: 1px solid #e5edf7;
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  margin: 12px 0
}

.question-head {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 12px
}

.question-head i {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #2563eb;
  font-style: normal;
  font-weight: 950
}

.question-head h4 {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: #0f172a
}

.question-head span {
  background: #f1f5f9;
  border-radius: 999px;
  padding: 6px 9px;
  color: #475569;
  font-size: 12px;
  font-weight: 950
}

.choice-list-v18 {
  display: grid;
  gap: 8px
}

.choice-pill {
  border: 1px solid #e5edf7;
  background: #f8fafc;
  border-radius: 16px;
  padding: 11px 12px
}

.choice-pill span {
  font-weight: 850;
  color: #334155
}

.choice-pill:has(input:checked) {
  background: #ecfeff;
  border-color: #2dd4bf
}

.file-drop-v18 {
  display: block;
  border: 1px dashed #93c5fd;
  background: #eff6ff;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  cursor: pointer
}

.file-drop-v18 input {
  display: block;
  margin: 0 auto 10px
}

.file-drop-v18 span {
  display: block;
  font-weight: 950;
  color: #1d4ed8
}

.file-drop-v18 small {
  display: block;
  color: #64748b;
  font-weight: 750
}

.replace-choice-v18 {
  background: #fffbeb;
  border-color: #fde68a
}

.mission-submit-btn {
  height: 54px;
  font-size: 17px;
  box-shadow: 0 18px 36px rgba(37, 99, 235, .22)
}

.mission-submit-btn.disabled,
.mission-submit-btn:disabled {
  opacity: .55;
  cursor: not-allowed
}

.mission-help-card {
  background: #fff
}

.mission-help-card b {
  color: #0f172a
}

.mission-help-card p {
  color: #64748b;
  line-height: 1.8;
  margin: 8px 0 0
}

.mission-no-questions {
  background: #f8fafc;
  border-radius: 18px
}

@media (max-width: 980px) {

  .mission-hero,
  .mission-layout {
    grid-template-columns: 1fr
  }

  .mission-submit-panel {
    position: static
  }

  .mission-stats,
  .mission-journey {
    grid-template-columns: 1fr 1fr
  }

  .mission-resource-grid,
  .learning-grid {
    grid-template-columns: 1fr
  }

  .learning-grid .wide {
    grid-column: auto
  }

  .mission-hero {
    padding: 24px
  }

  .mission-cover-card {
    min-height: 220px
  }
}

@media (max-width: 620px) {
  .mission-shell {
    padding: 14px 10px 36px
  }

  .mission-hero {
    border-radius: 26px
  }

  .mission-hero h1 {
    font-size: 30px
  }

  .mission-stats,
  .mission-journey {
    grid-template-columns: 1fr
  }

  .mission-video .video-title {
    display: block
  }

  .checkpoint-row {
    display: block
  }

  .checkpoint-row .btn {
    margin-top: 8px;
    width: 100%
  }

  .mission-cover-inner b {
    font-size: 25px
  }
}

/* Athar V19 — Unified correction workspace + student private portal */
.full {
  width: 100%
}

.tall {
  min-height: 170px
}

.inline-form {
  display: inline
}

.compact-field {
  align-self: end
}

.settings-studio-form {
  display: grid;
  gap: 18px
}

.settings-hero {
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(239, 246, 255, .92))
}

.settings-hero h3 {
  font-size: 28px;
  margin: 6px 0
}

.settings-link-card {
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 10px
}

.settings-link-card b {
  color: #0f172a
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: start
}

.settings-main {
  display: grid;
  gap: 18px
}

.settings-side {
  position: sticky;
  top: 22px
}

.student-privacy-panel {
  display: grid;
  gap: 10px
}

.student-privacy-panel h3 {
  font-size: 24px;
  margin: 6px 0 0
}

.privacy-toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  transition: .18s
}

.privacy-toggle:hover {
  border-color: #93c5fd;
  transform: translateY(-1px)
}

.privacy-toggle input {
  margin-top: 5px;
  accent-color: #2563eb
}

.privacy-toggle b,
.privacy-toggle small {
  display: block
}

.privacy-toggle b {
  color: #0f172a;
  font-size: 14px
}

.privacy-toggle small {
  color: #64748b;
  line-height: 1.7;
  margin-top: 3px
}

.correction-hero {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #fff, #eff6ff 62%, #ecfeff)
}

.correction-hero h3 {
  font-size: 30px;
  margin: 6px 0 8px
}

.correction-orb {
  width: 152px;
  height: 152px;
  border-radius: 46px;
  background: linear-gradient(135deg, #0b1f3a, #2563eb 64%, #14b8a6);
  color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  box-shadow: 0 26px 60px rgba(37, 99, 235, .22);
  transform: rotate(-4deg)
}

.correction-orb b {
  font-size: 44px;
  line-height: 1
}

.correction-orb span {
  font-weight: 900;
  color: #dbeafe
}

.correction-filter-card {
  margin-bottom: 16px
}

.correction-filters {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 14px;
  align-items: end
}

.correction-empty b,
.correction-empty span {
  display: block
}

.correction-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0
}

.correction-metric {
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  position: relative;
  overflow: hidden
}

.correction-metric:after {
  content: "";
  position: absolute;
  left: -28px;
  bottom: -38px;
  width: 92px;
  height: 92px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(20, 184, 166, .14));
  transform: rotate(12deg)
}

.correction-metric span,
.correction-metric b,
.correction-metric small {
  position: relative;
  display: block
}

.correction-metric span {
  color: #64748b;
  font-weight: 900;
  font-size: 12px
}

.correction-metric b {
  font-size: 30px;
  margin: 6px 0;
  color: #0f172a
}

.correction-metric small {
  color: #64748b;
  font-weight: 800
}

.correction-task-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px
}

.correction-task-summary h3 {
  font-size: 24px;
  margin: 5px 0
}

.correction-task-summary p {
  margin: 0
}

.correction-board {
  display: grid;
  gap: 12px
}

.correction-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) 190px minmax(420px, 1.7fr) 150px;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid #e5edf7;
  border-right: 6px solid #cbd5e1;
  border-radius: 24px;
  padding: 14px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .06)
}

.correction-row.pending {
  border-right-color: #60a5fa
}

.correction-row.graded {
  border-right-color: #16a34a
}

.correction-row.missing,
.correction-row.missing-late {
  border-right-color: #ef4444
}

.correction-row.revision {
  border-right-color: #f59e0b
}

.student-cell {
  display: flex;
  gap: 12px;
  align-items: center
}

.avatar-mini {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  color: #1d4ed8;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 950
}

.student-cell h4 {
  margin: 0 0 5px;
  color: #0f172a
}

.student-cell p {
  margin: 0;
  color: #64748b;
  font-size: 13px
}

.status-cell {
  display: grid;
  gap: 6px
}

.status-cell small {
  color: #64748b;
  font-weight: 800
}

.status-chip {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 950
}

.status-chip.pending {
  background: #eff6ff;
  color: #1d4ed8
}

.status-chip.graded {
  background: #ecfdf5;
  color: #166534
}

.status-chip.missing,
.status-chip.missing-late {
  background: #fef2f2;
  color: #991b1b
}

.status-chip.revision {
  background: #fffbeb;
  color: #92400e
}

.quick-grade-form {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end
}

.score-box label,
.feedback-box label {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 900;
  margin-bottom: 5px
}

.score-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center
}

.score-box label {
  grid-column: 1/-1
}

.score-box span {
  font-weight: 900;
  color: #64748b
}

.feedback-box {
  min-width: 0
}

.review-cell {
  text-align: left
}

.review-cell .btn {
  white-space: nowrap
}

.student-insight-page {
  background: linear-gradient(180deg, #f7fbff, #fff 48%, #f8fafc)
}

.student-insight-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 16px 54px
}

.insight-hero {
  border-radius: 36px;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1f3a, #2563eb 58%, #14b8a6);
  color: #fff;
  min-height: 300px;
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: center;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .18)
}

.insight-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  margin: 8px 0 12px;
  color: #fff;
  letter-spacing: -.04em
}

.insight-hero p {
  font-size: 18px;
  color: #dbeafe;
  line-height: 1.9;
  max-width: 760px
}

.insight-hero .eyebrow {
  color: #a7f3d0
}

.insight-privacy-card {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 28px;
  padding: 24px;
  backdrop-filter: blur(16px);
  display: grid;
  gap: 8px
}

.insight-privacy-card b {
  font-size: 25px;
  color: #fff
}

.insight-privacy-card span {
  color: #e0f2fe;
  line-height: 1.9
}

.insight-login-card {
  margin-top: 18px
}

.student-insight-form {
  display: grid;
  gap: 14px
}

.student-insight-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px
}

.student-insight-guide div {
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06)
}

.student-insight-guide b,
.student-insight-guide span {
  display: block
}

.student-insight-guide b {
  color: #0f172a;
  font-size: 18px
}

.student-insight-guide span {
  color: #64748b;
  line-height: 1.8;
  margin-top: 6px
}

.student-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px
}

.student-profile-card h2 {
  font-size: 34px;
  margin: 5px 0;
  color: #0f172a
}

.student-profile-card p {
  margin: 0;
  color: #64748b
}

.student-note-banner {
  margin-top: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  padding: 12px;
  color: #1e40af;
  font-weight: 800;
  line-height: 1.8
}

.student-profile-ring {
  width: 132px;
  height: 132px;
  border-radius: 40px;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  box-shadow: 0 22px 52px rgba(37, 99, 235, .22)
}

.student-profile-ring b {
  font-size: 42px
}

.student-profile-ring span {
  font-weight: 900;
  color: #e0f2fe
}

.student-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0
}

.student-kpi {
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06)
}

.student-kpi span,
.student-kpi b,
.student-kpi small {
  display: block
}

.student-kpi span {
  font-size: 12px;
  color: #64748b;
  font-weight: 900
}

.student-kpi b {
  font-size: 28px;
  margin: 6px 0;
  color: #0f172a
}

.student-kpi small {
  color: #64748b;
  font-weight: 850
}

.student-task-board {
  margin-top: 16px
}

.student-task-list {
  display: grid;
  gap: 12px
}

.student-task-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: center;
  border: 1px solid #e5edf7;
  border-right: 6px solid #cbd5e1;
  border-radius: 22px;
  background: #fff;
  padding: 16px
}

.student-task-item.graded {
  border-right-color: #16a34a
}

.student-task-item.pending {
  border-right-color: #60a5fa
}

.student-task-item.missing,
.student-task-item.missing-late {
  border-right-color: #ef4444
}

.student-task-item.revision {
  border-right-color: #f59e0b
}

.student-task-item h4 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #0f172a
}

.student-task-item p {
  margin: 0;
  color: #64748b
}

.student-task-side {
  display: grid;
  gap: 9px;
  justify-items: end
}

.student-score {
  font-size: 22px;
  color: #0f172a
}

.teacher-feedback-box {
  margin-top: 10px;
  background: #f8fafc;
  border: 1px solid #e5edf7;
  border-radius: 16px;
  padding: 10px
}

.teacher-feedback-box b,
.teacher-feedback-box span {
  display: block
}

.teacher-feedback-box b {
  color: #0f172a
}

.teacher-feedback-box span {
  color: #334155;
  line-height: 1.8
}

.student-recommendation-card {
  margin-top: 16px
}

.portal-hero-actions {
  margin-top: 16px
}

.portal-hero .btn.light {
  background: #fff;
  color: #0f172a
}

.portal-hero .portal-card {
  min-height: 150px
}

@media (max-width:1200px) {
  .correction-row {
    grid-template-columns: 1fr
  }

  .quick-grade-form {
    grid-template-columns: 1fr
  }

  .review-cell {
    text-align: right
  }

  .correction-metrics {
    grid-template-columns: repeat(3, 1fr)
  }

  .settings-layout,
  .settings-hero {
    grid-template-columns: 1fr
  }

  .settings-side {
    position: static
  }

  .insight-hero {
    grid-template-columns: 1fr
  }

  .correction-task-summary {
    display: grid
  }

  .correction-filters {
    grid-template-columns: 1fr
  }
}

@media (max-width:720px) {

  .student-insight-guide,
  .student-task-item,
  .student-profile-card {
    grid-template-columns: 1fr;
    display: grid
  }

  .student-task-side {
    justify-items: start
  }

  .correction-metrics {
    grid-template-columns: 1fr 1fr
  }

  .insight-hero {
    padding: 24px;
    border-radius: 28px
  }

  .student-profile-ring {
    width: 110px;
    height: 110px
  }

  .grid-2 {
    grid-template-columns: 1fr
  }

  .settings-hero h3,
  .correction-hero h3 {
    font-size: 24px
  }

  .correction-hero {
    grid-template-columns: 1fr
  }

  .correction-orb {
    width: 116px;
    height: 116px
  }

  .correction-metrics {
    grid-template-columns: 1fr
  }
}

/* =========================================================
   Athar V20 — Subject Magazine, Student Home, Analytics close-out
   ========================================================= */
.public-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 18px;
  max-width: 1180px
}

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

.btn.ghost-light {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  color: #fff;
  box-shadow: none
}

.btn.ghost-light:hover {
  background: rgba(255, 255, 255, .22)
}

.subject-home-page {
  background: radial-gradient(circle at 85% 0, rgba(37, 99, 235, .20), transparent 38%), radial-gradient(circle at 12% 3%, rgba(19, 184, 166, .18), transparent 36%), linear-gradient(135deg, #f8fbff, #edf7ff 48%, #f7fffd);
}

.subject-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto 22px;
  padding: 42px;
  border-radius: 42px;
  background: linear-gradient(135deg, #071a2f, #12385f 54%, #0f766e);
  color: #fff;
  box-shadow: 0 34px 90px rgba(15, 39, 66, .22)
}

.subject-hero:before {
  content: "";
  position: absolute;
  inset: -90px auto auto -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 68%)
}

.subject-hero h1 {
  font-size: 56px;
  line-height: 1.15;
  margin: 6px 0;
  color: #fff
}

.subject-hero p {
  font-size: 18px;
  color: #dbeafe
}

.subject-hero .eyebrow {
  color: #99f6e4
}

.subject-live-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .08));
  border-radius: 38px;
  padding: 28px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12)
}

.subject-live-card b {
  font-size: 66px;
  letter-spacing: -2px
}

.subject-live-card span {
  font-weight: 1000;
  color: #99f6e4
}

.subject-live-card small {
  color: #dbeafe
}

.subject-section {
  max-width: 1180px;
  margin: 22px auto
}

.subject-section h2 {
  font-size: 32px;
  margin: 0;
  color: #0f2742
}

.subject-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px
}

.student-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px
}

.student-task-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #fff, #f8fbff);
  border-radius: 30px;
  padding: 22px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 12px
}

.student-task-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #2563eb, #13b8a6)
}

.student-task-card h3 {
  font-size: 23px;
  color: #0f2742;
  margin: 0
}

.student-task-card p {
  line-height: 1.85;
  color: #475569
}

.student-task-card .btn {
  margin-top: auto
}

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

.mag-card {
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid #dbeafe;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: .18s ease
}

.mag-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: #bfdbfe
}

.mag-card-cover {
  height: 178px;
  background-size: cover;
  background-position: center
}

.mag-card-cover.generated {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eff6ff, #ecfeff)
}

.mag-card-cover.generated span {
  font-size: 58px
}

.mag-card-body {
  padding: 20px
}

.mag-card h3 {
  font-size: 24px;
  color: #0f2742;
  margin: 10px 0
}

.post-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap
}

.post-video {
  margin: 14px 0 0
}

.post-video figcaption {
  font-size: 13px;
  color: #64748b;
  margin-top: 8px
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 24px;
  overflow: hidden;
  background: #0f2742;
  box-shadow: var(--shadow-xs)
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0
}

.athar-video {
  width: 100%;
  max-height: 520px;
  border-radius: 24px;
  background: #0f2742
}

.magazine-empty {
  border-radius: 28px;
  background: linear-gradient(135deg, #fff, #f8fbff)
}

.magazine-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: center;
  padding: 34px;
  background: linear-gradient(135deg, #fff, #eff6ff 62%, #ecfeff);
  border-color: #cfe4ff
}

.magazine-hero h3 {
  font-size: 38px;
  line-height: 1.35;
  margin: 8px 0;
  color: #0f2742
}

.magazine-hero p {
  font-size: 17px;
  line-height: 2;
  color: #334155
}

.magazine-orbit {
  width: 235px;
  height: 235px;
  border-radius: 60px;
  background: linear-gradient(135deg, #0f2742, #2563eb 56%, #13b8a6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  box-shadow: 0 34px 88px rgba(37, 99, 235, .24);
  transform: rotate(3deg)
}

.magazine-orbit b {
  font-size: 58px
}

.magazine-orbit span {
  max-width: 160px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .4px
}

.content-studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  margin-top: 20px
}

.site-post-studio {
  border-radius: 36px;
  padding: 26px
}

.media-author-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.content-side .sticky-brief {
  position: sticky;
  top: 18px
}

.idea-list {
  display: grid;
  gap: 10px
}

.idea-list>div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fbff
}

.idea-list b {
  color: #1d4ed8
}

.idea-list span {
  color: #475569;
  line-height: 1.7
}

.posts-control-board {
  margin-top: 22px
}

.teacher-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px
}

.teacher-post-card {
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column
}

.teacher-post-card.is-draft {
  opacity: .72
}

.teacher-post-cover {
  height: 150px;
  background-size: cover;
  background-position: center
}

.teacher-post-cover.no-image {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  color: #1d4ed8;
  font-weight: 1000
}

.teacher-post-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.teacher-post-body h3 {
  margin: 0;
  font-size: 22px;
  color: #0f2742
}

.post-excerpt {
  color: #475569;
  line-height: 1.8
}

.teacher-post-body .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto
}

.teacher-post-body form {
  display: inline
}

.site-post-form .tox-tinymce {
  border-radius: 24px !important;
  border-color: #dbeafe !important;
  overflow: hidden
}

.site-post-form .tox .tox-toolbar,
.site-post-form .tox .tox-toolbar__primary {
  background: #f8fbff !important
}

.analytics-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: center;
  background: linear-gradient(135deg, #fff, #eff6ff 60%, #ecfeff);
  border-color: #cfe4ff
}

.analytics-hero h3 {
  font-size: 36px;
  margin: 8px 0;
  color: #0f2742
}

.analytics-hero p {
  font-size: 17px;
  line-height: 1.95;
  color: #334155
}

.analytics-filter {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 28px;
  padding: 18px;
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow-xs)
}

.analytics-metrics {
  margin-top: 18px
}

.insight-card {
  position: relative;
  overflow: hidden;
  min-height: 170px
}

.insight-card:before {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  opacity: .16
}

.insight-card.success:before {
  background: #13b8a6
}

.insight-card.warn:before {
  background: #f59e0b
}

.insight-card h3 {
  font-size: 30px;
  margin: 8px 0;
  color: #0f2742
}

.class-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px
}

.class-compare-card {
  border: 1px solid #dbeafe;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  padding: 18px;
  box-shadow: var(--shadow-xs)
}

.class-compare-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start
}

.class-compare-head h3 {
  margin: 0;
  font-size: 22px;
  color: #0f2742
}

.class-compare-head span {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900
}

.mini-bars {
  display: grid;
  gap: 12px;
  margin: 16px 0
}

.mini-bars div {
  position: relative;
  background: #f1f5f9;
  border-radius: 999px;
  height: 34px;
  overflow: hidden
}

.mini-bars div span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: linear-gradient(90deg, #2563eb, #13b8a6);
  border-radius: inherit
}

.mini-bars label,
.mini-bars b {
  position: relative;
  z-index: 2;
  font-size: 12px;
  font-weight: 900;
  line-height: 34px
}

.mini-bars label {
  padding-inline-start: 12px;
  color: #0f2742
}

.mini-bars b {
  float: left;
  padding-inline-start: 10px;
  padding-inline-end: 12px;
  color: #0f2742
}

.class-compare-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px
}

@media(max-width:960px) {

  .subject-hero,
  .magazine-hero,
  .content-studio-layout,
  .analytics-hero {
    grid-template-columns: 1fr
  }

  .subject-live-card,
  .magazine-orbit {
    width: 100%;
    height: auto;
    min-height: 160px
  }

  .subject-info-grid,
  .media-author-grid {
    grid-template-columns: 1fr
  }

  .public-top-nav {
    align-items: flex-start;
    flex-direction: column
  }

  .subject-hero h1 {
    font-size: 40px
  }

  .magazine-hero h3,
  .analytics-hero h3 {
    font-size: 30px
  }
}

@media(max-width:640px) {

  .subject-hero,
  .magazine-hero {
    padding: 24px;
    border-radius: 30px
  }

  .subject-hero h1 {
    font-size: 34px
  }

  .subject-section h2 {
    font-size: 26px
  }

  .mag-card-cover,
  .teacher-post-cover {
    height: 135px
  }

  .public-nav-actions {
    width: 100%
  }

  .public-nav-actions .btn {
    flex: 1;
    text-align: center
  }
}


/* Athar V21 — Subject logo and course identity */
.subject-brand-panel {
  background: linear-gradient(135deg, #ffffff, #f8fcff)
}

.subject-brand-editor {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch
}

.subject-logo-preview-box {
  min-height: 230px;
  border-radius: 30px;
  border: 1px solid #dbeafe;
  background: radial-gradient(circle at 20% 20%, rgba(19, 184, 166, .18), transparent 32%), linear-gradient(135deg, #f8fbff, #eef6ff);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-xs)
}

.subject-logo-preview-box img {
  max-width: 82%;
  max-height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(15, 39, 66, .16))
}

.logo-placeholder {
  display: grid;
  gap: 6px;
  text-align: center;
  color: #0f2742
}

.logo-placeholder b {
  font-size: 56px;
  letter-spacing: -1px
}

.logo-placeholder span {
  color: #64748b;
  font-weight: 900
}

.subject-brand-fields {
  display: grid;
  gap: 12px
}

.subject-brand-fields .choice {
  background: #fff;
  border: 1px solid #fee2e2;
  color: #991b1b;
  border-radius: 18px;
  padding: 12px
}

.subject-logo-card {
  min-height: 260px;
  gap: 13px;
  padding: 24px
}

.subject-logo-card .subject-logo-frame {
  width: 190px;
  height: 150px;
  border-radius: 32px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .75);
  padding: 18px
}

.subject-logo-card .subject-logo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(15, 39, 66, .18))
}

.subject-logo-card b {
  font-size: 60px
}

.subject-logo-card span {
  font-size: 18px
}

.subject-logo-card small {
  font-size: 15px;
  line-height: 1.8
}

@media(max-width:900px) {
  .subject-brand-editor {
    grid-template-columns: 1fr
  }

  .subject-logo-preview-box {
    min-height: 190px
  }

  .subject-logo-card .subject-logo-frame {
    width: 170px;
    height: 130px
  }
}

/* =========================================================
   Athar V22 — Classroom Showcase Luxury Cards
   ========================================================= */
.classroom-showcase {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, .08), transparent 32%),
    radial-gradient(circle at 90% 20%, rgba(20, 184, 166, .10), transparent 34%),
    rgba(255, 255, 255, .92);
  border: 1px solid rgba(148, 163, 184, .24);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

.showcase-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px
}

.showcase-header h2 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -.04em;
  color: #0f2742
}

.showcase-header p {
  margin: 0;
  color: #53627a;
  font-size: 16px;
  line-height: 1.9
}

.classroom-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 20px
}

.classroom-summary-strip>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, rgba(239, 246, 255, .88));
  border: 1px solid rgba(191, 219, 254, .72);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .05)
}

.classroom-summary-strip b {
  font-size: 30px;
  color: #1d4ed8;
  line-height: 1
}

.classroom-summary-strip span {
  color: #64748b;
  font-weight: 800;
  font-size: 14px
}

.classroom-tools {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  margin: 10px 0 24px;
  padding: 14px;
  border-radius: 26px;
  background: #f8fbff;
  border: 1px solid rgba(191, 219, 254, .55)
}

.classroom-tools .field {
  margin: 0
}

.classroom-tools label {
  font-size: 13px;
  color: #64748b;
  font-weight: 900;
  margin-bottom: 6px;
  display: block
}

.classroom-tools .input,
.classroom-tools .select {
  background: #fff
}

.classroom-luxury-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch
}

.classroom-luxury-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 300px;
  padding: 22px;
  border-radius: 30px;
  background: linear-gradient(180deg, #fff, rgba(248, 251, 255, .96));
  border: 1px solid rgba(191, 219, 254, .82);
  box-shadow: 0 22px 56px rgba(15, 23, 42, .07);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  overflow: hidden
}

.classroom-luxury-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #2563eb, #14b8a6, #0f766e);
  opacity: .84
}

.classroom-luxury-card::after {
  content: "";
  position: absolute;
  left: -40px;
  bottom: -48px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .09), transparent 70%);
  pointer-events: none
}

.classroom-luxury-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 75px rgba(15, 23, 42, .12);
  border-color: rgba(37, 99, 235, .36)
}

.classroom-card-top {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: center;
  position: relative;
  z-index: 1
}

.classroom-visual {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: 0 18px 38px rgba(37, 99, 235, .20)
}

.classroom-visual span {
  font-size: 38px;
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, .18))
}

.classroom-title h3 {
  margin: 10px 0 4px;
  color: #10233f;
  font-size: 25px;
  line-height: 1.35;
  letter-spacing: -.025em
}

.classroom-title p {
  margin: 0;
  color: #64748b;
  font-weight: 700
}

.badge.status {
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 999px
}

.badge.status.active {
  background: #dcfce7;
  color: #166534
}

.badge.status.pending {
  background: #fff7ed;
  color: #c2410c
}

.badge.status.idle {
  background: #f1f5f9;
  color: #475569
}

.badge.status.done {
  background: #e0f2fe;
  color: #075985
}

.classroom-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  position: relative;
  z-index: 1
}

.classroom-metrics div {
  padding: 13px 10px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, .9);
  text-align: center
}

.classroom-metrics b {
  display: block;
  font-size: 22px;
  color: #1e3a8a
}

.classroom-metrics span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  margin-top: 4px
}

.classroom-progress {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px
}

.classroom-progress div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748b;
  font-weight: 900
}

.classroom-progress b {
  color: #1d4ed8
}

.classroom-progress em {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: #eaf2ff;
  overflow: hidden;
  position: relative
}

.classroom-progress em::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #14b8a6)
}

.classroom-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1
}

.classroom-actions .btn {
  border-radius: 18px;
  padding: 12px 18px
}

.last-activity {
  color: #7b8797;
  font-size: 12px;
  font-weight: 800
}

.luxury-empty {
  padding: 32px;
  border-radius: 24px;
  background: #f8fafc;
  border: 1px dashed rgba(148, 163, 184, .7)
}

.classroom-luxury-card.is-hidden {
  display: none !important
}

@media (max-width:1180px) {
  .classroom-luxury-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .classroom-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media (max-width:760px) {
  .classroom-showcase {
    padding: 22px;
    border-radius: 26px
  }

  .classroom-tools {
    grid-template-columns: 1fr
  }

  .classroom-luxury-grid {
    grid-template-columns: 1fr
  }

  .classroom-summary-strip {
    grid-template-columns: 1fr
  }

  .classroom-card-top {
    grid-template-columns: 72px 1fr
  }

  .classroom-visual {
    width: 70px;
    height: 70px;
    border-radius: 22px
  }

  .classroom-visual span {
    font-size: 30px
  }

  .classroom-title h3 {
    font-size: 21px
  }

  .classroom-metrics {
    grid-template-columns: repeat(2, 1fr)
  }

  .classroom-actions {
    align-items: stretch;
    flex-direction: column
  }

  .classroom-actions .btn {
    text-align: center
  }
}

/* =========================================================
   Athar V23 — Account Security / Password Change
   ========================================================= */
.account-security-panel {
  margin-top: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .08);
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, .12), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.account-security-panel:before {
  content: '🔐';
  position: absolute;
  inset-inline-end: 18px;
  top: 16px;
  font-size: 46px;
  opacity: .12;
  filter: grayscale(.2);
}

.account-security-panel h3 {
  margin: 6px 0 8px;
  font-size: 20px;
  color: #0f172a
}

.account-security-panel .field {
  margin-top: 12px
}

.account-security-panel .input {
  background: #fff
}

.security-hints {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 6px;
}

.security-hints span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #075985;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(14, 165, 233, .16);
}

.notice-card.soft {
  margin-top: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .08);
  color: #334155;
}

.notice-card.soft b {
  color: #0f172a
}

/* =========================================================
   Athar V25 — Owner Command Center Redesign
   ========================================================= */
.owner-command-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(20, 184, 166, .16), transparent 34%),
    radial-gradient(circle at 92% 0%, rgba(37, 99, 235, .20), transparent 38%),
    linear-gradient(135deg, #ffffff, #eff6ff 58%, #ecfeff);
  border: 1px solid rgba(191, 219, 254, .72);
  box-shadow: 0 28px 75px rgba(15, 23, 42, .08);
}

.owner-command-copy h3 {
  font-size: clamp(30px, 3.4vw, 50px);
  margin: 6px 0 10px;
  letter-spacing: -.05em;
  color: #0f2742
}

.owner-command-copy p {
  max-width: 850px;
  line-height: 2;
  color: #53627a;
  font-weight: 700;
  margin: 0 0 16px
}

.owner-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.owner-orbit {
  width: 190px;
  height: 190px;
  border-radius: 52px;
  background: linear-gradient(135deg, #0b1f3a, #2563eb 62%, #14b8a6);
  color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  box-shadow: 0 30px 70px rgba(37, 99, 235, .24);
  transform: rotate(-3deg)
}

.owner-orbit b {
  font-size: 38px;
  line-height: 1;
  color: #fff
}

.owner-orbit span {
  font-size: 13px;
  font-weight: 900;
  color: #dbeafe;
  margin-top: 8px;
  letter-spacing: .08em;
  text-transform: uppercase
}

.owner-metrics-pro {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px
}

.owner-metrics-pro article {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 26px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .05)
}

.owner-metrics-pro article:after {
  content: "";
  position: absolute;
  left: -34px;
  bottom: -46px;
  width: 116px;
  height: 116px;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(20, 184, 166, .14));
  transform: rotate(18deg)
}

.owner-metrics-pro span,
.owner-metrics-pro b,
.owner-metrics-pro small {
  position: relative;
  z-index: 1;
  display: block
}

.owner-metrics-pro span {
  color: #64748b;
  font-size: 12px;
  font-weight: 950
}

.owner-metrics-pro b {
  font-size: 30px;
  color: #10233f;
  margin: 8px 0 5px;
  letter-spacing: -.04em
}

.owner-metrics-pro small {
  color: #7b8797;
  font-weight: 800;
  font-size: 12px
}

.owner-layout-pro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 390px;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px
}

.owner-create-pro,
.owner-side-guide,
.owner-year-closeout {
  border-radius: 32px
}

.owner-form-grid,
.owner-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px
}

.owner-form-grid .span-2,
.owner-edit-grid .span-2,
.owner-cleanup-grid .span-2 {
  grid-column: 1/-1
}

.owner-side-guide {
  position: sticky;
  top: 20px;
  background: linear-gradient(180deg, #fff, #f8fbff)
}

.owner-checks {
  display: grid;
  gap: 10px;
  margin: 16px 0
}

.owner-checks span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 800;
  line-height: 1.7
}

.owner-year-closeout {
  margin: 18px 0;
  background: linear-gradient(135deg, #fff, #fff7ed 60%, #f8fbff);
  border-color: #fed7aa
}

.owner-cleanup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px
}

.owner-section-pro {
  margin-top: 20px
}

.owner-tenant-pro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 18px
}

.owner-tenant-pro-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff, #f8fbff);
  border: 1px solid rgba(191, 219, 254, .82);
  border-radius: 34px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .07);
  padding: 20px;
  display: grid;
  gap: 15px
}

.owner-tenant-pro-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
  opacity: .9
}

.owner-tenant-pro-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1
}

.owner-tenant-pro-card header h3 {
  margin: 5px 0 6px;
  color: #0f2742;
  font-size: 26px;
  letter-spacing: -.035em
}

.owner-tenant-pro-card header p {
  margin: 0;
  color: #64748b;
  font-weight: 800;
  line-height: 1.7
}

.owner-mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px
}

.owner-mini-stats div {
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 20px;
  padding: 12px;
  text-align: center
}

.owner-mini-stats b {
  display: block;
  color: #1d4ed8;
  font-size: 24px
}

.owner-mini-stats span {
  font-size: 12px;
  color: #64748b;
  font-weight: 950
}

.owner-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px
}

.owner-info-grid>div {
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 20px;
  padding: 12px
}

.owner-info-grid b {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 5px
}

.owner-info-grid span {
  display: block;
  color: #10233f;
  font-weight: 900;
  line-height: 1.6;
  word-break: break-word
}

.owner-manage-pro {
  border: 1px solid #cfe1f7;
  border-radius: 24px;
  background: #f8fbff;
  overflow: hidden
}

.owner-manage-pro summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 17px;
  font-weight: 950;
  color: #1d4ed8
}

.owner-manage-pro summary::-webkit-details-marker {
  display: none
}

.owner-manage-pro[open] summary {
  background: #eff6ff;
  border-bottom: 1px solid #dbeafe
}

.details-panel-pro {
  padding: 16px;
  display: grid;
  gap: 16px
}

.owner-action-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px
}

.owner-action-board .mini-form {
  display: grid;
  gap: 10px;
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 22px;
  padding: 14px
}

.owner-action-board .mini-form label {
  font-weight: 950;
  color: #334155
}

.owner-action-board .danger-form {
  border-color: #fecaca;
  background: #fffafa
}

.owner-edit-grid {
  background: #fff;
  border: 1px solid #e5edf7;
  border-radius: 24px;
  padding: 14px
}

.owner-edit-grid .btn {
  align-self: end
}

.owner-tenant-pro-card .copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px
}

.inline-domain {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden
}

.inline-domain input {
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important
}

.inline-domain span {
  padding: 0 12px;
  color: #64748b;
  font-weight: 900;
  white-space: nowrap;
  border-inline-start: 1px solid var(--line)
}

@media(max-width:1220px) {
  .owner-metrics-pro {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }

  .owner-layout-pro {
    grid-template-columns: 1fr
  }

  .owner-side-guide {
    position: relative;
    top: auto
  }
}

@media(max-width:760px) {
  .owner-command-hero {
    grid-template-columns: 1fr
  }

  .owner-orbit {
    width: 100%;
    height: 150px;
    border-radius: 34px;
    transform: none
  }

  .owner-metrics-pro,
  .owner-cleanup-grid,
  .owner-form-grid,
  .owner-edit-grid,
  .owner-info-grid,
  .owner-action-board {
    grid-template-columns: 1fr
  }

  .owner-tenant-pro-grid {
    grid-template-columns: 1fr
  }

  .owner-mini-stats {
    grid-template-columns: repeat(2, 1fr)
  }

  .owner-tenant-pro-card .copy-row {
    grid-template-columns: 1fr
  }

  .owner-command-copy h3 {
    font-size: 30px
  }
}


/* =========================================================
   Athar V28 — Smart Homepage Layout
   ========================================================= */

.smart-homepage .compact-hero {
  margin-bottom: 18px;
}

.home-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -4px;
}

.quick-stat-card {
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(47, 111, 237, .14);
  box-shadow: 0 18px 44px rgba(16, 24, 40, .08);
  border-radius: 24px;
  padding: 20px 18px;
  text-align: center;
}

.quick-stat-card b {
  display: block;
  font-size: 30px;
  color: #2463eb;
  line-height: 1;
  margin-bottom: 8px;
}

.quick-stat-card span {
  color: #64748b;
  font-weight: 800;
}

.compact-class-grid {
  align-items: stretch;
}

.compact-class-card {
  min-height: 315px;
}

.home-tasks-section {
  margin-top: 22px;
}

.compact-task-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-task-card {
  min-height: 230px;
}

.smart-magazine-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(239, 248, 255, .82));
  border: 1px solid rgba(47, 111, 237, .13);
  box-shadow: 0 22px 60px rgba(16, 24, 40, .08);
  border-radius: 30px;
  padding: 30px;
}

.smart-magazine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 18px;
  align-items: stretch;
}

.featured-post-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(16, 24, 40, .08);
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(0, 1.1fr);
  min-height: 300px;
}

.featured-post-cover {
  background-size: cover;
  background-position: center;
  min-height: 260px;
}

.featured-post-cover.generated {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top right, #14b8a6, #2563eb 65%, #0f172a);
}

.featured-post-cover.generated span {
  font-size: 72px;
  filter: drop-shadow(0 18px 35px rgba(0, 0, 0, .25));
}

.featured-post-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-post-body h3 {
  font-size: clamp(24px, 3vw, 36px);
  margin: 12px 0;
  color: #0f172a;
  line-height: 1.35;
}

.featured-post-body p {
  color: #475569;
  font-size: 17px;
  line-height: 1.9;
  margin-bottom: 18px;
}

.mini-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.mini-post-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 14px 36px rgba(16, 24, 40, .07);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.mini-post-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .24);
}

.mini-post-card h4 {
  margin: 8px 0 6px;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.45;
}

.mini-post-card p {
  margin: 0 0 8px;
  color: #64748b;
  line-height: 1.7;
}

.link-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: #2563eb;
  font-weight: 900;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.weekly-challenge-section {
  margin-top: 22px;
}

.weekly-challenge-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 22px;
  align-items: stretch;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f2d4a, #0f766e);
  color: #fff;
  box-shadow: 0 24px 70px rgba(15, 45, 74, .22);
}

.weekly-challenge-copy {
  padding: 34px;
}

.weekly-challenge-copy .eyebrow {
  color: #9ff7ef;
}

.weekly-challenge-copy h2 {
  font-size: clamp(28px, 4vw, 48px);
  margin: 8px 0 12px;
  color: #fff;
}

.weekly-challenge-copy p {
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
  line-height: 1.9;
  max-width: 740px;
}

.weekly-challenge-art {
  min-height: 260px;
  background-size: cover;
  background-position: center;
}

.weekly-challenge-art.generated {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(255, 255, 255, .22), rgba(255, 255, 255, .04));
}

.weekly-challenge-art.generated span {
  font-size: 96px;
}

.subject-info-accordion {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-collapse-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(47, 111, 237, .14);
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(16, 24, 40, .08);
  overflow: hidden;
}

.info-collapse-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: right;
}

.info-collapse-trigger small {
  display: block;
  color: #2563eb;
  font-weight: 900;
  margin-bottom: 4px;
}

.info-collapse-trigger b {
  color: #0f172a;
  font-size: 22px;
}

.info-collapse-trigger em {
  font-style: normal;
  color: #64748b;
  font-weight: 800;
}

.info-collapse-card.open .info-collapse-trigger em {
  color: #2563eb;
}

.info-collapse-body {
  display: none;
  padding: 0 24px 24px;
}

.info-collapse-card.open .info-collapse-body {
  display: block;
}

.post-modal-layer {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(8px);
  z-index: 9990;
}

.athar-post-dialog {
  width: min(920px, calc(100vw - 28px));
  max-height: min(86vh, 900px);
  border: 0;
  border-radius: 30px;
  padding: 0;
  overflow: auto;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
  background: #fff;
  z-index: 9999;
}

.athar-post-dialog::backdrop {
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: sticky;
  top: 12px;
  float: left;
  margin: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .12);
  background: #fff;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(16, 24, 40, .14);
}

.dialog-cover {
  min-height: 280px;
  background-size: cover;
  background-position: center;
}

.dialog-content {
  padding: 30px;
}

.dialog-content h2 {
  font-size: clamp(26px, 4vw, 44px);
  color: #0f172a;
  margin: 12px 0 18px;
}

@media (max-width: 1100px) {

  .home-quick-stats,
  .compact-task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .smart-magazine-layout,
  .featured-post-card,
  .weekly-challenge-card,
  .subject-info-accordion {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {

  .home-quick-stats,
  .compact-task-grid {
    grid-template-columns: 1fr;
  }

  .smart-magazine-section {
    padding: 20px;
    border-radius: 24px;
  }

  .mini-post-card {
    grid-template-columns: 1fr;
  }

  .weekly-challenge-copy {
    padding: 24px;
  }

  .dialog-content {
    padding: 22px;
  }
}

.public-space-redesigned {
  background:
    radial-gradient(circle at top right, rgba(33, 150, 243, 0.08), transparent 22%),
    radial-gradient(circle at top left, rgba(0, 150, 136, 0.07), transparent 18%),
    linear-gradient(180deg, #f7fbff 0%, #f4f7fb 100%);
}

.space-shell-v2 {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 48px;
}

.space-hero-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
  gap: 24px;
  margin-bottom: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-brand-card,
.section-block {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  border-radius: 28px;
}

.hero-copy {
  padding: 28px;
}

.hero-copy h1 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.1;
  color: #10233f;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: #215a8f;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-description {
  color: #50627a;
  line-height: 1.9;
  max-width: 760px;
}

.hero-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.hero-stat-card {
  background: linear-gradient(180deg, #f9fbff 0%, #f2f7ff 100%);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 18px;
  padding: 16px;
}

.hero-stat-card span {
  display: block;
  color: #5b6f8b;
  font-size: .92rem;
  margin-bottom: 8px;
}

.hero-stat-card strong {
  font-size: 1.55rem;
  color: #0f2647;
}

.hero-stat-card.warn {
  background: linear-gradient(180deg, #fffaf3 0%, #fff5e6 100%);
}

.hero-brand-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.hero-brand-top {
  display: flex;
  gap: 16px;
  align-items: center;
}

.subject-logo-wrap,
.subject-logo-fallback {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #103e70, #1f6ac9, #16a39a);
  color: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.subject-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subject-logo-fallback {
  font-size: 2rem;
}

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

.brand-card-links a {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f4f8ff;
  color: #16416d;
  text-decoration: none;
  font-weight: 700;
}

.mini-highlight-card {
  background: linear-gradient(135deg, rgba(16, 62, 112, 0.06), rgba(22, 163, 154, 0.08));
  border: 1px dashed rgba(22, 163, 154, 0.35);
  border-radius: 22px;
  padding: 18px;
}

.section-block {
  padding: 26px;
  margin-bottom: 24px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 8px 0 10px;
  font-size: 1.7rem;
  color: #0f2647;
}

.section-heading p {
  margin: 0;
  color: #5a6d85;
  line-height: 1.8;
}

.section-heading.split {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  flex-wrap: wrap;
}

.magazine-layout-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 20px;
}

.magazine-featured-card,
.mag-compact-card,
.teacher-profile-card,
.teacher-policy-card,
.classroom-card-v2,
.compact-placeholder-card,
.empty-magazine-card,
.classroom-empty-state {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.featured-cover {
  min-height: 270px;
  border-radius: 24px 24px 0 0;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(135deg, #0f3d6e, #206cc9, #19a39a);
  position: relative;
  overflow: hidden;
}

.featured-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.94);
}

.featured-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.featured-content {
  padding: 20px 22px 22px;
}

.featured-content h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  color: #10233f;
}

.featured-content p {
  color: #55687f;
  line-height: 1.9;
  margin-bottom: 16px;
}

.featured-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.meta-note {
  color: #6a7d95;
  font-weight: 700;
}

.magazine-side-grid {
  display: grid;
  gap: 14px;
  align-content: start;
}

.mag-compact-card {
  padding: 12px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.compact-media {
  height: 100px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ebf3ff, #dff7f3);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.compact-body h4 {
  margin: 6px 0;
  font-size: 1.05rem;
  color: #10233f;
}

.compact-body p,
.compact-placeholder-card p,
.empty-magazine-card p,
.classroom-empty-state p,
.teacher-head p,
.teacher-message-box p,
.policy-block p {
  color: #5a6d85;
  line-height: 1.85;
}

.mini-type {
  color: #1770b8;
  font-size: .85rem;
  font-weight: 800;
}

.teacher-message-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 20px;
}

.teacher-profile-card,
.teacher-policy-card {
  padding: 22px;
}

.teacher-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.teacher-avatar {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #0f3d6e, #16a39a);
  color: #fff;
}

.teacher-head h3 {
  margin: 0 0 6px;
  color: #10233f;
}

.teacher-message-box {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
  border-radius: 20px;
  padding: 18px;
}

.teacher-message-box h4,
.policy-title {
  color: #12335d;
  font-weight: 800;
  margin-bottom: 8px;
  display: block;
}

.policy-block+.policy-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(15, 23, 42, 0.1);
}

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

.classrooms-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.classroom-card-v2 {
  overflow: hidden;
}

.classroom-cover-v2 {
  min-height: 146px;
  position: relative;
}

.classroom-cover-1 {
  background: linear-gradient(135deg, #103e70, #206cc9);
}

.classroom-cover-2 {
  background: linear-gradient(135deg, #0f766e, #16a39a);
}

.classroom-cover-3 {
  background: linear-gradient(135deg, #6d28d9, #2563eb);
}

.classroom-cover-4 {
  background: linear-gradient(135deg, #b45309, #f59e0b);
}

.classroom-cover-5 {
  background: linear-gradient(135deg, #be185d, #ec4899);
}

.classroom-cover-6 {
  background: linear-gradient(135deg, #1e3a8a, #14b8a6);
}

.classroom-cover-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 18px;
}

.classroom-icon {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.18);
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.classroom-grade-chip,
.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .82rem;
  font-weight: 800;
}

.classroom-grade-chip {
  background: rgba(255, 255, 255, 0.9);
  color: #143963;
}

.classroom-body-v2 {
  padding: 18px;
}

.classroom-title-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.classroom-title-row h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: #10233f;
}

.classroom-title-row p {
  margin: 0;
  color: #65778f;
}

.status-badge.active,
.badge.ok {
  background: #e7faf5;
  color: #0d7e68;
}

.status-badge.pending {
  background: #fff5e8;
  color: #b56508;
}

.status-badge.done {
  background: #eef6ff;
  color: #1c5bb0;
}

.status-badge.idle,
.badge {
  background: #f1f5f9;
  color: #475569;
}

.classroom-stats-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}

.classroom-stats-mini div {
  background: #f8fbff;
  border: 1px solid rgba(15, 23, 42, .05);
  border-radius: 16px;
  padding: 12px;
}

.classroom-stats-mini span {
  display: block;
  font-size: .82rem;
  color: #62748b;
  margin-bottom: 8px;
}

.classroom-stats-mini strong {
  color: #10233f;
  font-size: 1.2rem;
}

.classroom-actions-v2 .btn {
  width: 100%;
  justify-content: center;
}

.empty-magazine-card,
.compact-placeholder-card,
.classroom-empty-state {
  padding: 28px;
  text-align: center;
}

.empty-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

@media (max-width: 1100px) {

  .space-hero-v2,
  .magazine-layout-v2,
  .teacher-message-grid,
  .classrooms-grid-v2 {
    grid-template-columns: 1fr;
  }

  .hero-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .space-shell-v2 {
    width: min(100% - 20px, 100%);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-brand-card,
  .section-block {
    border-radius: 22px;
  }

  .mag-compact-card {
    grid-template-columns: 1fr;
  }

  .compact-media {
    height: 160px;
  }

  .hero-stats-grid,
  .classroom-stats-mini {
    grid-template-columns: 1fr 1fr;
  }

  .hero-quick-actions,
  .policy-actions,
  .brand-card-links,
  .featured-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .teacher-head,
  .hero-brand-top {
    align-items: start;
    flex-direction: column;
  }
}

/* Athar V34 — Learning Profile UI */
.learning-profile-card{background:linear-gradient(180deg,#f8fbff,#eef6ff);border:1px solid rgba(37,99,235,.14);border-radius:24px;padding:20px;box-shadow:0 14px 36px rgba(15,23,42,.06)}
.learning-profile-card h3{margin:8px 0 10px;color:#0f2647;font-size:24px}.learning-profile-card p{color:#475569;line-height:1.9}.learning-chip-group{margin-top:12px}.learning-chip-group b{display:block;margin-bottom:8px;color:#0f172a}.learning-chip-group div{display:flex;flex-wrap:wrap;gap:8px}.learning-chip{display:inline-flex;padding:7px 11px;border-radius:999px;background:#fff;border:1px solid rgba(15,23,42,.08);font-weight:800;color:#16416d}.learning-reflection-box{background:linear-gradient(180deg,#f8fbff,#eef6ff);border:1px solid rgba(37,99,235,.12);border-radius:22px;padding:16px;margin:16px 0}.student-learning-profile-card{margin-top:18px}.student-learning-profile-card .learning-profile-card{box-shadow:none}


/* =========================================================
   Athar V36.2 — Real task cover image containment
   ========================================================= */
.cover-preview.has-image,
.preview-cover.has-image {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: #f8fbff !important;
}

.cover-preview.has-image {
  border-style: solid !important;
  border-color: #93c5fd !important;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.10), 0 16px 34px rgba(37,99,235,.08);
}

.cover-preview.has-image span,
.preview-cover.has-image span {
  background: rgba(15, 39, 66, .72) !important;
  color: #fff !important;
  padding: 8px 12px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.task-product-cover.has-cover,
.mission-cover-card.has-image,
.cb-task-cover:not(.fallback),
.student-task-cover.has-cover,
.athar-task-cover-frame.has-cover {
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: #eef6ff !important;
}

.athar-task-cover-frame {
  min-height: 150px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg,#0f2e55,#2563eb,#14b8a6);
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px;
}

.athar-task-cover-frame.has-cover::before,
.task-product-cover.has-cover::before,
.mission-cover-card.has-image::before,
.cb-task-cover:not(.fallback)::before,
.student-task-cover.has-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.10), rgba(15,23,42,.05) 45%, rgba(15,23,42,.32));
  pointer-events: none;
}

.athar-task-cover-frame > *,
.task-product-cover > *,
.mission-cover-card > *,
.cb-task-cover > *,
.student-task-cover > * {
  position: relative;
  z-index: 1;
}

.student-task-cover {
  height: 142px;
  margin: -2px -2px 16px;
  border-radius: 24px 24px 18px 18px;
  background: linear-gradient(135deg,#0f2e55,#2563eb,#14b8a6);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

@media (max-width: 720px) {
  .student-task-cover { height: 120px; }
}

.task-mini-cell{display:flex;align-items:center;gap:10px}.task-mini-thumb{width:58px;height:42px;border-radius:12px;background-size:cover;background-position:center;background-repeat:no-repeat;display:inline-block;flex:0 0 58px;background-color:#eef6ff;border:1px solid rgba(15,23,42,.08)}
