/* Ported from the prototype's student.css — kept in the 'legacy' cascade layer so Tailwind utilities can override it. */
@layer legacy {
/* =========================================================
   الأترجة — مساحة الطالب: the pages beyond the home
   Builds on dashboard.css (tokens, sidebar, top bar, cards,
   buttons, chips, skeletons). Same ivory page, warm-white cards,
   hairline borders, soft shadows, forest ink, gold used sparingly,
   sage for circles. Nothing here introduces a new colour.
   ========================================================= */


/* =========================================================
   FRAME ADDITIONS
   ========================================================= */
.db-crumb{
  display:inline-flex; align-items:center; gap:6px;
  margin-bottom:4px;
  font-size:13.5px; font-weight:600; color:var(--ink-2);
  transition:color .2s;
}
.db-crumb svg{ width:16px; height:16px; transition:transform .3s var(--ease); }
.db-crumb:hover{ color:var(--ink); }
.db-crumb:hover svg{ transform:translateX(3px); }
.db-hello{ min-width:0; }
.db-hello h1{ overflow-wrap:anywhere; }
.db-drawer-all{ margin-top:auto; align-self:stretch; }
/* Nuxt: «عرض كل الإشعارات» is a plain text link with its arrow, not a filled button */
.db-link.db-drawer-all{ align-self:center; padding:14px 6px 4px; }
.db-drawer .db-alert-list{ margin-bottom:16px; }

/* the page: one column of sections that fade up in a small stagger */
.db-page{ display:grid; grid-template-columns:minmax(0, 1fr); gap:20px; align-content:start; outline:none; }
.db-page > *{ animation:db-in .7s var(--ease) both; }
.db-page > *:nth-child(2){ animation-delay:60ms; }
.db-page > *:nth-child(3){ animation-delay:120ms; }
.db-page > *:nth-child(4){ animation-delay:180ms; }
[data-slot].is-in, .dc-panel{ animation:db-in .5s var(--ease) both; }

.db-toolbar{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 20px; }

/* tabs inside a page: a quiet segmented control */
.db-seg{
  display:inline-flex; gap:4px; max-width:100%;
  padding:4px; border-radius:16px;
  background:#EFEADF;
  overflow-x:auto; scrollbar-width:none;
}
.db-seg::-webkit-scrollbar{ display:none; }
.db-seg button{
  display:inline-flex; align-items:center; gap:8px; flex:none;
  height:40px; padding:0 16px;
  border:0; border-radius:12px; background:none;
  font-size:14.5px; font-weight:500; color:var(--ink-2);
  cursor:pointer; white-space:nowrap;
  transition:background .25s var(--ease), color .25s var(--ease), box-shadow .25s;
}
.db-seg button:hover{ color:var(--ink); }
.db-seg button[aria-selected="true"]{ background:var(--card); color:var(--ink); font-weight:600; box-shadow:0 6px 14px -10px rgba(18,60,53,.5); }
.db-seg-n{
  min-width:22px; height:22px; padding:0 7px;
  display:inline-grid; place-items:center;
  border-radius:99px;
  font-size:12px; font-weight:700;
  background:rgba(18,60,53,.07); color:var(--ink-2);
}
.db-seg button[aria-selected="true"] .db-seg-n{ background:var(--gold-soft); color:var(--ink); }
.db-seg-n:empty, .db-seg-n[hidden]{ display:none; }
.db-seg.is-skel span{ width:92px; height:40px; border-radius:12px; }

/* buttons + chips the pages need */
.db-btn--line{ color:var(--ink); background:transparent; box-shadow:inset 0 0 0 1px var(--line-2); }
.db-btn--line:hover{ background:#fff; box-shadow:inset 0 0 0 1px var(--line-2), 0 10px 20px -16px rgba(18,60,53,.6); }
.db-btn:disabled, .db-btn[aria-disabled="true"]{ opacity:.45; cursor:not-allowed; transform:none !important; box-shadow:none; pointer-events:none; }
.db-btn:disabled[title]{ pointer-events:auto; }
.db-chip.is-soft{ color:var(--ink-2); background:#F1EDE3; }
.db-chip svg{ width:14px; height:14px; }
.is-red{ color:var(--red) !important; }

/* form fields beyond inputs */
.db-fld textarea, .db-fld select{
  width:100%; padding:12px 14px;
  border:1px solid var(--line-2); border-radius:13px;
  background:#fff; font:inherit; font-size:15px; font-weight:400; color:var(--ink); line-height:1.7;
  resize:vertical;
  transition:border-color .2s, box-shadow .2s;
}
.db-fld select{
  height:46px; padding:0 14px; padding-inline-end:40px;
  -webkit-appearance:none; appearance:none; cursor:pointer;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5953' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat left 14px center / 16px;
}
[dir="ltr"] .db-fld select{ background-position:right 14px center; }
.db-fld textarea:focus, .db-fld select:focus{ outline:none; border-color:var(--sage); box-shadow:0 0 0 4px rgba(168,199,181,.3); }
.db-fld em{ font-style:normal; font-weight:400; color:var(--ink-3); }

/* home: the task rows carry the source icon */
.tk-ico{ display:grid; place-items:center; width:36px; height:36px; flex:none; border-radius:11px; background:var(--sage-soft); }
.tk-ico svg{ width:17px; height:17px; }
.tk-ico.is-red{ background:var(--red-soft); }
.tk-ico.is-gold{ background:var(--gold-soft); color:var(--ink) !important; }
.db-prog .db-card-head .db-link{ margin-inline-start:auto; font-size:13px; }


/* =========================================================
   TASK CARD (tasks page, a circle's tasks)
   ========================================================= */
.tc-list{ display:grid; gap:12px; }
.tc{
  position:relative;
  display:grid; grid-template-columns:48px minmax(0, 1fr) auto; gap:16px; align-items:center;
  padding:18px 20px;
  border-radius:20px;
  background:var(--card);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  animation:db-in .6s var(--ease) both; animation-delay:calc(var(--i, 0) * 50ms);
  transition:border-color .25s, box-shadow .35s var(--ease), transform .35s var(--ease);
}
.tc:hover{ border-color:var(--line-2); transform:translateY(-2px); box-shadow:0 1px 2px rgba(18,60,53,.04), 0 20px 34px -24px rgba(18,60,53,.4); }
.tc::before{ content:""; position:absolute; inset-block:18px; right:0; width:3px; border-radius:3px 0 0 3px; background:transparent; }
.tc.is-overdue::before{ background:var(--red); }
.tc.is-today::before{ background:var(--gold); }
.tc-ico{ display:grid; place-items:center; width:48px; height:48px; border-radius:15px; background:var(--sage-soft); }
.tc.is-today .tc-ico{ background:var(--gold-soft); }
.tc.is-overdue .tc-ico{ background:var(--red-soft); color:var(--red); }
.tc.is-submitted .tc-ico, .tc.is-graded .tc-ico{ background:#F1EDE3; color:var(--ink-2); }
.tc-top{ display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.tc-kind{ font-size:12.5px; font-weight:600; color:var(--gold-deep); }
.tc-title{ font-size:16.5px; font-weight:700; line-height:1.55; }
.tc-title a:hover{ text-decoration:underline; text-decoration-color:var(--gold); text-underline-offset:5px; }
.tc-meta{ display:flex; flex-wrap:wrap; gap:6px 18px; margin:8px 0 0; padding:0; list-style:none; font-size:13px; color:var(--ink-2); }
.tc-meta li{ display:flex; align-items:center; gap:6px; }
.tc-meta svg{ width:15px; height:15px; color:var(--ink-3); }
.tc-meta a:hover{ color:var(--ink); text-decoration:underline; text-underline-offset:4px; }
.tc-side{ display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
.tc-sub{ display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--ink-2); white-space:nowrap; }
.tc-sub svg{ width:15px; height:15px; }
.tc.is-submitted .tc-sub svg, .tc.is-graded .tc-sub svg{ color:#3F7D5A; }
.tc-acts{ display:flex; gap:8px; }
.tc.is-skel{ animation:none; }
.tc.is-skel .tc-side{ width:180px; }
.sk-line.h20{ height:20px; } .sk-line.h40{ height:40px; border-radius:12px; margin:0; }


/* =========================================================
   SCHEDULE — white surfaces on the warm page, clear grid lines,
   events in four distinct tones: circles sage, lectures gold,
   task deadlines warm sand, level exams clay. Each tone has
   a line (--c), a fill (--c-bg), a border (--c-bd) and a dark
   ink (--c-ink) for the text that sits on the fill.
   ========================================================= */
.calx{
  --cal-line:   rgba(15,53,48,.11);           /* the grid */
  --cal-line-2: rgba(15,53,48,.2);            /* the major hours, the header */
  --cal-tint:   #F4F1E8;                      /* header row, side strips */
  --cal-today:  rgba(212,175,90,.09);         /* the whole of today's column */
}
.calx .t-circle { --c:#5E9A78; --c-bg:#E5F1E9; --c-bd:#B9D6C4; --c-ink:#1D4E39; }
.calx .t-lecture{ --c:#C99A35; --c-bg:#FBF0D5; --c-bd:#EBD39A; --c-ink:#6A4B0E; }
.calx .t-task   { --c:#A08C6C; --c-bg:#F3EDE2; --c-bd:#DDD1BD; --c-ink:#4B3F2C; }
.calx .t-exam   { --c:#C0654F; --c-bg:#FBE9E3; --c-bd:#EFC3B6; --c-ink:#7B2E1E; }
.cal-pop .t-exam{ --c:#C0654F; --c-bg:#FBE9E3; }

/* ---------- at a glance ---------- */
.cal-stats{ display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:14px; }
.cal-stats-sk{ height:92px; border-radius:20px; }
.cs-tile{
  display:flex; align-items:center; gap:14px; min-width:0;
  padding:16px 18px;
  border:1px solid var(--line); border-radius:20px;
  background:var(--card); box-shadow:var(--shadow);
  text-align:right; font:inherit; color:var(--ink);
  animation:db-in .5s var(--ease) both;
}
.cs-tile:nth-child(2){ animation-delay:40ms; } .cs-tile:nth-child(3){ animation-delay:80ms; } .cs-tile:nth-child(4){ animation-delay:120ms; }
button.cs-tile{ cursor:pointer; transition:border-color .2s, transform .25s var(--ease); }
button.cs-tile:hover{ border-color:var(--gold); transform:translateY(-1px); }
.cs-ico{ display:grid; place-items:center; flex:none; width:46px; height:46px; border-radius:14px; }
.cs-ico svg{ width:22px; height:22px; }
.cs-tile.is-ink  .cs-ico{ background:var(--ink); color:#FFFDF8; }
.cs-tile.is-gold .cs-ico{ background:#FBF0D5; color:#8A6514; }
.cs-tile.is-sage .cs-ico{ background:#E5F1E9; color:#2C6449; }
.cs-tile.is-sand .cs-ico{ background:#F3EDE2; color:#5E4F36; }
.cs-txt{ display:grid; min-width:0; }
.cs-txt small{ display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--ink-2); }
.cs-txt b{ font-size:24px; font-weight:700; line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cs-next .cs-txt b{ font-size:19px; line-height:1.6; }
.cs-txt em{ font-style:normal; font-size:12.5px; font-weight:500; color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ---------- the toolbar ---------- */
.cal-bar{
  display:flex; align-items:center; flex-wrap:wrap; gap:12px 16px;
  padding:12px 14px;
  border:1px solid var(--line); border-radius:20px;
  background:var(--card); box-shadow:var(--shadow);
}
.cal-nav{ display:flex; align-items:center; gap:10px; min-width:0; }
.cal-step{ display:flex; border:1px solid var(--line-2); border-radius:13px; overflow:hidden; }
.cal-step .db-icon-btn{ width:40px; height:40px; border:0; border-radius:0; }
.cal-step .db-icon-btn + .db-icon-btn{ border-inline-start:1px solid var(--line-2); }
.cal-step .db-icon-btn:hover{ background:var(--cal-tint); }
.cal-today-btn{
  height:42px; padding:0 16px;
  border:1px solid var(--ink); border-radius:13px; background:var(--card);
  font:inherit; font-size:14px; font-weight:700; color:var(--ink); cursor:pointer;
  transition:background .2s, color .2s;
}
.cal-today-btn:hover{ background:var(--ink); color:#FFFDF8; }
.cal-range{ margin-inline-start:6px; font-size:19px; font-weight:700; white-space:nowrap; }
.cal-views{ margin-inline-start:auto; background:var(--cal-tint); }
.cal-views button{ height:36px; padding:0 15px; font-size:14px; font-weight:600; color:var(--ink-2); }
.cal-views button[aria-selected="true"]{ background:var(--ink); color:#FFFDF8; box-shadow:0 6px 14px -8px rgba(15,53,48,.6); }
.cal-filter{
  display:flex; align-items:center; flex-wrap:wrap; gap:8px;
  flex-basis:100%; padding-top:12px; border-top:1px solid var(--line);
}
.cal-filter-lbl{ font-size:13px; font-weight:700; color:var(--ink-2); margin-inline-end:4px; }
.cal-filter button{
  display:inline-flex; align-items:center; gap:8px;
  height:36px; padding:0 14px;
  border:1px solid var(--c-bd); border-radius:99px; background:var(--c-bg);
  font:inherit; font-size:13.5px; font-weight:700; color:var(--c-ink);
  cursor:pointer; transition:background .2s, color .2s, border-color .2s;
}
.cal-filter button::before{
  content:""; width:16px; height:16px; border-radius:5px; flex:none;
  background:var(--c) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3 6.7 11 12 5.3' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.cal-filter button[aria-pressed="false"]{ background:var(--card); border-color:var(--line-2); color:var(--ink-3); font-weight:600; }
.cal-filter button[aria-pressed="false"]::before{ background:none; box-shadow:inset 0 0 0 1.5px var(--c); }
.cal-filter button:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }

/* ---------- the calendar and its side panel ---------- */
.cal-layout{ display:grid; grid-template-columns:minmax(0, 1fr) 300px; gap:18px; align-items:start; }
.cal{ padding:0; overflow:hidden; border-color:var(--cal-line-2); }
.cal > .db-empty{ margin:22px; }
.cal > .sk-week{ padding:22px; }
.cal-aside{ display:grid; gap:18px; position:sticky; top:16px; }

/* an event, everywhere */
.ce{
  display:block; width:100%; min-width:0;
  padding:7px 10px;
  border:1px solid var(--c-bd); border-radius:11px;
  border-inline-start:4px solid var(--c);
  background:var(--c-bg);
  box-shadow:0 1px 2px rgba(15,53,48,.06), 0 6px 14px -12px rgba(15,53,48,.35);
  text-align:right; cursor:pointer;
  font:inherit; font-size:13px; line-height:1.45; color:var(--ink);
  transition:transform .25s var(--ease), box-shadow .25s, filter .2s;
}
.ce:hover{ transform:translateY(-1px); box-shadow:0 1px 2px rgba(15,53,48,.08), 0 12px 22px -12px rgba(15,53,48,.45); z-index:3; }
.ce:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; z-index:3; }
.ce-top{ display:flex; align-items:center; gap:6px; min-width:0; }
.ce time{ font-size:12px; font-weight:700; color:var(--c-ink); white-space:nowrap; font-variant-numeric:tabular-nums; }
.ce-tag{
  margin-inline-start:auto; padding:1px 7px; border-radius:6px;
  background:rgba(255,255,255,.75); box-shadow:inset 0 0 0 1px var(--c-bd);
  font-style:normal; font-size:11px; font-weight:700; color:var(--c-ink); white-space:nowrap;
}
.ce-t{ display:block; font-weight:700; color:var(--ink); overflow:hidden; text-overflow:ellipsis; }
.ce-who{ display:block; margin-top:2px; font-size:12px; font-weight:500; color:#3E4C46; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ce-live{
  display:inline-flex; align-items:center; gap:5px; padding:1px 7px; border-radius:6px;
  background:#1F6B4A; color:#fff; font-style:normal; font-size:10.5px; font-weight:700;
}
.ce-live::before{ content:""; width:6px; height:6px; border-radius:50%; background:#9BE7BC; animation:db-pulse 1.6s infinite; }
.ce-done{ display:grid; place-items:center; width:18px; height:18px; border-radius:50%; background:var(--c); color:#fff; }
.ce-done svg{ width:11px; height:11px; }
.ce.is-past{ filter:saturate(.45); opacity:.78; box-shadow:none; }
.ce.is-past .ce-t{ color:#3E4C46; }
.ce.is-live{ box-shadow:0 0 0 2px #1F6B4A, 0 10px 22px -12px rgba(31,107,74,.6); }

/* ---------- the time grid ---------- */
.cal-tg{ --hcol:68px; }
.cal-tg-head, .cal-tg-due, .cal-tg-body{
  display:grid; grid-template-columns:var(--hcol) repeat(var(--cols), minmax(0, 1fr));
}
.cal-tg-head{ position:sticky; top:0; z-index:4; background:var(--cal-tint); border-bottom:1px solid var(--cal-line-2); }
.cal-corner{ display:grid; place-items:center; font-size:12px; font-weight:700; color:var(--ink-3); }
.cal-dh{
  position:relative;
  display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:12px 4px 10px;
  border:0; border-inline-start:1px solid var(--cal-line); background:none;
  font:inherit; color:var(--ink); cursor:pointer;
  transition:background .2s;
}
.cal-dh:hover{ background:rgba(15,53,48,.04); }
.cal-dh small{ font-size:13px; font-weight:700; color:var(--ink-2); }
.cal-dh b{ display:grid; place-items:center; min-width:40px; height:40px; padding:0 6px; border-radius:13px; font-size:21px; font-weight:700; line-height:1; font-variant-numeric:tabular-nums; }
.cal-dh-n{ min-height:18px; font-style:normal; font-size:11.5px; font-weight:600; color:var(--ink-3); }
.cal-dh.is-past b, .cal-dh.is-past small{ color:var(--ink-3); }
.cal-dh.is-today{ background:#FBF3DF; }
.cal-dh.is-today::before{ content:""; position:absolute; inset:0 0 auto; height:3px; background:var(--gold); }
.cal-dh.is-today small{ color:#8A6514; }
.cal-dh.is-today b{ background:var(--ink); color:#FFFDF8; box-shadow:0 8px 16px -8px rgba(15,53,48,.6); }
.cal-dh.is-today .cal-dh-n{ color:#8A6514; font-weight:700; }
.cal-tg.is-day .cal-dh{ flex-direction:row; justify-content:flex-start; gap:12px; padding-inline:18px; }

.cal-tg-due{ border-bottom:1px solid var(--cal-line-2); min-height:50px; background:#FDFCF9; }
.cal-lbl{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; font-size:11.5px; font-weight:700; color:var(--ink-2); }
.cal-lbl svg{ width:15px; height:15px; color:var(--ink-3); }
.cal-due-cell{ display:grid; gap:5px; align-content:start; padding:6px 5px; border-inline-start:1px solid var(--cal-line); }
.cal-due-cell.is-today{ background:var(--cal-today); }
.ce--due{ padding:5px 8px; font-size:12px; }
.ce--due .ce-t{ white-space:nowrap; }
.ce--due time{ font-size:11px; }

.cal-tg-body{ position:relative; margin:14px 0; }
.cal-hours{ position:relative; }
.cal-hours span{
  position:absolute; inset-inline:0; transform:translateY(-50%);
  text-align:center; font-size:12px; font-weight:600; color:var(--ink-3); white-space:nowrap; font-variant-numeric:tabular-nums;
}
.cal-hours span.is-major{ color:var(--ink); font-weight:700; }
.cal-col{
  position:relative;
  border-inline-start:1px solid var(--cal-line);
  /* every hour a solid line, every half hour a faint one */
  background-image:repeating-linear-gradient(to bottom,
    var(--cal-line-2) 0 1px, transparent 1px calc(var(--hh) / 2),
    rgba(15,53,48,.055) calc(var(--hh) / 2) calc(var(--hh) / 2 + 1px), transparent calc(var(--hh) / 2 + 1px) var(--hh));
}
.cal-col.is-past{ background-color:#FCFBF8; }
.cal-col.is-today{ background-color:var(--cal-today); }
.ce--block{ position:absolute; z-index:1; overflow:hidden; display:flex; flex-direction:column; gap:2px; }
.ce--block .ce-t{ white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; line-height:1.4; }
.ce--block.is-mid .ce-who{ display:none; }
.ce--block.is-short{ flex-direction:row; align-items:center; gap:6px; padding-block:4px; }
.ce--block.is-short .ce-tag, .ce--block.is-short .ce-who{ display:none; }
.ce--block.is-short .ce-top{ flex:none; }
.ce--block.is-short .ce-t{ display:block; flex:1; min-width:0; white-space:nowrap; }
.cal-tg.is-day .ce--block{ padding:10px 14px; font-size:14.5px; }
.cal-tg.is-day .ce--block .ce-tag{ margin-inline-start:4px; }
.cal-now{ position:absolute; inset-inline:0; height:2px; background:#C0654F; z-index:2; pointer-events:none; }
.cal-now::before{ content:""; position:absolute; right:-5px; top:-4px; width:10px; height:10px; border-radius:50%; background:#C0654F; box-shadow:0 0 0 3px #fff; }
.cal-now em{
  position:absolute; left:4px; top:-10px; padding:1px 6px; border-radius:6px;
  background:#C0654F; color:#fff; font-style:normal; font-size:10.5px; font-weight:700;
}

/* ---------- the side panel ---------- */
.cal-up, .cal-legend{ padding:18px; }
.cal-up-h{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:14px; }
.cal-up-h h3, .cal-legend h3{ font-size:16px; font-weight:700; }
.cal-up-h span{ font-size:13px; font-weight:600; color:var(--ink-2); }
.cal-up-list{ display:grid; gap:2px; margin:0; padding:0; list-style:none; position:relative; }
.cal-up-list li button{
  display:grid; grid-template-columns:62px minmax(0, 1fr); gap:4px 10px; width:100%;
  padding:10px; border:0; border-radius:14px; background:none;
  text-align:right; font:inherit; color:var(--ink); cursor:pointer;
  transition:background .2s;
}
.cal-up-list li button:hover{ background:var(--cal-tint); }
.cal-up-list time{
  align-self:start; padding:4px 0; border-radius:9px;
  background:var(--c-bg); box-shadow:inset 0 0 0 1px var(--c-bd);
  text-align:center; font-size:12.5px; font-weight:700; color:var(--c-ink); font-variant-numeric:tabular-nums;
}
.cal-up-b{ display:grid; gap:2px; min-width:0; }
.cal-up-b .ce-tag{ justify-self:start; margin:0; background:var(--c-bg); }
.cal-up-b b{ font-size:14px; font-weight:700; line-height:1.5; }
.cal-up-b small{ font-size:12.5px; color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-up-s{ grid-column:2; justify-self:start; font-style:normal; font-size:12px; font-weight:700; color:var(--ink-3); }
.cal-up-s.is-live{ color:#1F6B4A; }
.cal-up-list li.is-next button{ background:#FBF3DF; box-shadow:inset 0 0 0 1px #EBD39A; }
.cal-up-list li.is-next .cal-up-s{ color:#8A6514; }
.cal-up-list li.is-past .cal-up-b b{ color:var(--ink-2); }
.cal-up-list li.is-past time{ filter:saturate(.4); opacity:.8; }
.cal-up-none{ display:flex; align-items:center; gap:10px; padding:14px; border-radius:14px; background:var(--cal-tint); font-size:13.5px; font-weight:600; color:var(--ink-2); }
.cal-up-none svg{ width:18px; height:18px; color:#2C6449; }
.cal-up-back{
  display:inline-flex; align-items:center; gap:6px; margin-top:12px; padding:0;
  border:0; background:none; font:inherit; font-size:13.5px; font-weight:700; color:var(--ink); cursor:pointer;
}
.cal-up-back svg{ width:16px; height:16px; }
.cal-up-back:hover{ text-decoration:underline; text-underline-offset:4px; }
.cal-legend h3{ margin-bottom:12px; }
.cal-legend ul{ display:grid; gap:10px; margin:0; padding:0; list-style:none; }
.cal-legend li{ display:grid; grid-template-columns:auto minmax(0, 1fr); align-items:center; gap:10px; }
.cal-legend li b{
  display:inline-flex; align-items:center; justify-content:center; min-width:62px; height:28px; padding:0 10px;
  border:1px solid var(--c-bd); border-inline-start:4px solid var(--c); border-radius:9px;
  background:var(--c-bg); font-size:12.5px; font-weight:700; color:var(--c-ink);
}
.cal-legend li span{ font-size:12.5px; font-weight:500; color:var(--ink-2); line-height:1.5; }

/* ---------- month ---------- */
.cal-mo-head{ display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); padding:12px 0; border-bottom:1px solid var(--cal-line-2); background:var(--cal-tint); }
.cal-mo-head span{ text-align:center; font-size:13px; font-weight:700; color:var(--ink-2); }
.cal-mo-grid{ display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); }
.cal-mc{
  display:flex; flex-direction:column; gap:4px;
  min-height:128px; padding:8px;
  border-bottom:1px solid var(--cal-line);
  border-inline-start:1px solid var(--cal-line);
}
.cal-mc:nth-child(7n+1){ border-inline-start:0; }
.cal-mc.is-out{ background:#F9F7F2; }
.cal-mc.is-out .cal-mc-d{ color:var(--ink-3); font-weight:500; }
.cal-mc.is-today{ background:var(--cal-today); box-shadow:inset 0 3px 0 var(--gold); }
.cal-mc-d{
  align-self:flex-start;
  display:grid; place-items:center; min-width:32px; height:32px; padding:0 4px;
  border:0; border-radius:10px; background:none;
  font:inherit; font-size:15px; font-weight:700; color:var(--ink); cursor:pointer; font-variant-numeric:tabular-nums;
}
.cal-mc-d:hover{ background:rgba(15,53,48,.07); }
.cal-mc.is-today .cal-mc-d{ background:var(--ink); color:#FFFDF8; }
.cal-mc-ev{ display:grid; gap:4px; }
.ce--mini{ display:flex; gap:6px; align-items:baseline; padding:3px 7px; border-radius:8px; border-inline-start-width:3px; font-size:12px; box-shadow:none; }
.ce--mini time{ font-size:11px; }
.ce--mini .ce-t{ white-space:nowrap; }
.cal-mc-more{ align-self:flex-start; padding:0 4px; border:0; background:none; font:inherit; font-size:12px; font-weight:700; color:var(--ink-2); cursor:pointer; }
.cal-mc-more:hover{ color:var(--ink); text-decoration:underline; }
.cal-mc-dots{ display:none; gap:3px; justify-content:center; }
.cal-mc-dots i{ width:7px; height:7px; border-radius:50%; background:var(--c); }

/* ---------- list (and the week on phones) ---------- */
.cal-ag{ display:grid; }
.cal-ag-day{ display:grid; grid-template-columns:78px minmax(0, 1fr); gap:16px; padding:16px 18px; border-bottom:1px solid var(--cal-line); }
.cal-ag-day:last-child{ border-bottom:0; }
.cal-ag-day.is-today{ background:var(--cal-today); box-shadow:inset -3px 0 0 var(--gold); }
.cal-ag-h{
  display:flex; flex-direction:column; align-items:center; gap:1px; align-self:start;
  padding:9px 4px; border:1px solid var(--cal-line); border-radius:16px; background:var(--card);
  font:inherit; color:var(--ink); cursor:pointer;
}
.cal-ag-h small{ font-size:12px; font-weight:700; color:var(--ink-2); }
.cal-ag-h b{ font-size:24px; font-weight:700; line-height:1.25; }
.cal-ag-h span{ font-size:11.5px; font-weight:600; color:var(--ink-3); }
.cal-ag-day.is-today .cal-ag-h{ background:var(--ink); border-color:var(--ink); color:#FFFDF8; }
.cal-ag-day.is-today .cal-ag-h small, .cal-ag-day.is-today .cal-ag-h span{ color:rgba(255,253,248,.85); }
.cal-ag-day.is-past .cal-ag-h b{ color:var(--ink-3); }
.cal-ag-list{ display:grid; gap:8px; align-content:start; }
.ce--row{ display:grid; grid-template-columns:auto minmax(0, 1fr); gap:2px 14px; padding:11px 14px; font-size:14px; }
.ce--row .ce-top{ grid-row:1 / 3; flex-direction:column; align-items:flex-start; gap:4px; min-width:76px; }
.ce--row .ce-tag{ margin:0; }
.ce--row time{ font-size:13px; }
.ce--row .ce-t{ white-space:normal; }
.ce--row .ce-who{ font-size:12.5px; }
.cal-ag-none{ font-size:13.5px; font-weight:500; color:var(--ink-3); padding:10px 0; }

/* the quick detail card */
.cal-pop{
  position:fixed; z-index:55;
  width:320px; padding:18px;
  border-radius:22px;
  background:var(--card);
  border:1px solid var(--line);
  box-shadow:0 30px 60px -28px rgba(18,60,53,.5);
  animation:db-pop .22s var(--ease);
}
.cal-pop[hidden]{ display:none; }
.cal-pop-head{ display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.cal-pop-head .db-icon-btn{ width:36px; height:36px; border-radius:12px; margin-inline-start:auto; }
.cal-pop-type{ display:inline-flex; align-items:center; gap:6px; height:26px; padding:0 10px; border-radius:99px; font-size:12.5px; font-weight:700; background:var(--c-bg); }
.cal-pop-type::before{ content:""; width:8px; height:8px; border-radius:3px; background:var(--c); }
.cal-pop h3{ font-size:17px; font-weight:700; line-height:1.5; }
.cal-pop-rows{ display:grid; gap:8px; margin:12px 0; padding:0; list-style:none; font-size:13.5px; font-weight:500; color:var(--ink-2); }
.cal-pop-rows li{ display:flex; align-items:center; gap:8px; }
.cal-pop-rows svg{ width:16px; height:16px; color:var(--ink-3); }
.cal-pop-rows img{ width:22px; height:22px; border-radius:50%; object-fit:cover; }
.cal-pop-status{ margin-bottom:14px; font-size:13px; font-weight:700; color:var(--gold-deep); }
.cal-pop .db-btn{ width:100%; }

/* ---------- smaller screens ---------- */
@media (max-width:1560px){
  .cal-layout{ grid-template-columns:minmax(0, 1fr); }
  .cal-aside{ position:static; grid-template-columns:minmax(0, 1.4fr) minmax(0, 1fr); align-items:start; }
}
@media (max-width:1100px){
  .cal-stats{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:860px){
  .cal-aside{ grid-template-columns:minmax(0, 1fr); }
  .cal-nav{ width:100%; }
  .cal-views{ margin-inline-start:0; width:100%; }
  .cal-views button{ flex:1 0 auto; }
  .cal-filter{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
  .cal-filter button{ flex:none; }
  .cal-mc{ min-height:66px; padding:6px 4px; align-items:center; }
  .cal-mc-d{ align-self:center; }
  .cal-mc-ev, .cal-mc-more{ display:none; }
  .cal-mc-dots{ display:flex; }
}
@media (max-width:640px){
  .cal-stats{ gap:10px; }
  .cs-tile{ gap:10px; padding:12px; border-radius:16px; }
  .cs-ico{ width:34px; height:34px; border-radius:10px; }
  .cs-ico svg{ width:18px; height:18px; }
  .cs-txt small{ font-size:12px; }
  .cs-txt b{ font-size:20px; }
  .cs-next .cs-txt b{ font-size:15px; }
  .cal-bar{ padding:10px; }
  .cal-range{ font-size:16px; margin-inline-start:2px; }
  .cal-today-btn{ height:40px; padding:0 12px; }
  .cal-pop{ inset:auto 12px 12px 12px !important; width:auto; border-radius:24px; animation:db-sheet .3s var(--ease); }
  .cal-ag-day{ grid-template-columns:62px minmax(0, 1fr); gap:12px; padding:12px; }
  .ce--row{ grid-template-columns:minmax(0, 1fr); }
  .ce--row .ce-top{ grid-row:auto; flex-direction:row; align-items:center; min-width:0; }
}


/* =========================================================
   DETAIL HERO (circle, lecture)
   ========================================================= */
.dh{
  display:grid; grid-template-columns:220px minmax(0, 1fr) minmax(260px, 320px); gap:24px; align-items:center;
  padding:18px;
  border-radius:var(--r);
  background:var(--card);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}
.dh-media{ align-self:stretch; min-height:150px; border-radius:18px; overflow:hidden; background:var(--sage-soft); }
.dh-media img{ width:100%; height:100%; object-fit:cover; display:block; }
.dh-body{ display:grid; gap:16px; min-width:0; padding-block:4px; }
.dh-tags{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.dh-tag{ display:inline-flex; align-items:center; height:28px; padding:0 12px; border-radius:99px; font-size:12.5px; font-weight:600; color:var(--ink-2); background:#F3EFE5; }
.dh-who{ display:flex; align-items:center; gap:12px; }
.dh-who img{ width:46px; height:46px; border-radius:50%; object-fit:cover; border:2px solid var(--gold-light); }
.dh-who small, .dh-facts small{ display:block; font-size:12px; color:var(--ink-3); }
.dh-who b{ font-size:16px; }
.dh-facts{ display:grid; grid-template-columns:repeat(4, minmax(0, auto)); justify-content:start; gap:12px 26px; margin:0; padding:0; list-style:none; }
.dh-facts li{ display:flex; align-items:center; gap:10px; }
.dh-facts li > svg{ width:36px; height:36px; padding:9px; border-radius:12px; background:var(--sage-soft); }
.dh-facts b{ font-size:14px; font-weight:600; }

/* the next meeting: the page's one dark block, like the home's next card */
.dh-next{
  position:relative; overflow:hidden; isolation:isolate;
  align-self:stretch;
  display:flex; flex-direction:column; gap:6px;
  padding:20px;
  border-radius:20px;
  color:#FFFDF8;
  background:
    radial-gradient(80% 90% at 0% 100%, rgba(168,199,181,.18), transparent 70%),
    radial-gradient(70% 80% at 100% 0%, rgba(212,175,90,.16), transparent 70%),
    #123C35;
}
.dh-next-t{ font-size:18px; font-weight:700; line-height:1.5; }
.dh-next-s{ font-size:13.5px; color:rgba(255,253,248,.75); }
.dh-next .nx-actions{ margin-top:auto; padding-top:12px; }
.dh-next .db-btn{ width:100%; }
.dh-next .db-btn[disabled]{ opacity:.55; }
.dh-next-note{ display:flex; align-items:center; gap:6px; margin-top:8px; font-size:12px; color:rgba(255,253,248,.7); }
.dh-next-note svg{ width:14px; height:14px; }
.dh-count{ display:flex; gap:8px; margin-top:6px; }
.dh-count span{ flex:1; display:grid; place-items:center; padding:8px 4px; border-radius:14px; background:rgba(255,253,248,.08); }
.dh-count b{ font-size:24px; line-height:1.2; }
.dh-count small{ font-size:11.5px; color:rgba(255,253,248,.7); }
.dh .sk.dh-media{ border-radius:18px; }

/* detail panels */
.dc-grid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:20px; align-items:start; }
.dc-wide{ grid-column:1 / -1; }
.dc-stack{ display:grid; gap:20px; }
.dc-text{ font-size:15px; line-height:1.95; color:var(--ink-2); }
.dc-text + .dc-text{ margin-top:10px; }
.dc-prog{ margin-top:18px; }
.dc-sub{ margin:22px 0 8px; font-size:15px; font-weight:700; }
.dc-related{ margin-top:6px; }

/* the teacher's words */
.dt-fb blockquote, .dt-quote{
  margin:0; padding:14px 16px;
  border-radius:16px;
  background:#F6F2E8;
  border-inline-start:3px solid var(--gold);
  font-size:15px; line-height:1.9;
}
.dt-fb-by{ display:flex; align-items:center; gap:8px; margin-top:12px; font-size:13.5px; font-weight:600; color:var(--ink-2); }
.dt-fb-by img{ width:28px; height:28px; border-radius:50%; object-fit:cover; }
.dt-fb.is-wait p{ display:flex; align-items:flex-start; gap:8px; font-size:13.5px; line-height:1.7; color:var(--ink-2); }
.dt-fb.is-wait svg{ width:18px; height:18px; margin-top:2px; color:var(--gold-deep); }

/* meetings */
.ss-list, .mt-list{ display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.ss{
  display:flex; align-items:center; gap:14px;
  padding:12px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#FFFEFB;
}
.ss-date{ display:grid; justify-items:center; width:60px; flex:none; padding:6px 4px; border-radius:14px; background:#F6F2E8; line-height:1.3; }
.ss-date small{ font-size:11px; color:var(--ink-2); }
.ss-date b{ font-size:19px; }
.ss.is-past .ss-date{ background:transparent; box-shadow:inset 0 0 0 1px var(--line); }
.ss-body{ flex:1; min-width:0; }
.ss-body b{ display:block; font-size:14.5px; font-weight:600; line-height:1.55; }
.ss-body small{ font-size:12.5px; color:var(--ink-2); }
.ss-side{ display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }

/* materials and attachments */
.mt-row{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:15px; border:1px solid var(--line); background:#FFFEFB; transition:border-color .2s; }
.mt-row:hover{ border-color:var(--line-2); }
.mt-ico{ display:grid; place-items:center; width:40px; height:40px; flex:none; border-radius:12px; background:var(--sage-soft); }
.mt-ico svg{ width:18px; height:18px; }
.mt-body{ flex:1; min-width:0; }
.mt-body b{ display:block; font-size:14.5px; font-weight:600; line-height:1.5; }
.mt-body small{ font-size:12.5px; color:var(--ink-2); }

/* attendance */
.dc-att .pg-ring{ margin-bottom:16px; }
.dc-tiles{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin:0; padding:0; list-style:none; }
.dc-tiles li{ display:grid; justify-items:center; padding:10px; border-radius:14px; background:#F6F2E8; }
.dc-tiles b{ font-size:21px; line-height:1.3; }
.dc-tiles small{ font-size:12.5px; color:var(--ink-2); }
.att-list{ display:grid; margin:0; padding:0; list-style:none; }
.att-list li{ display:grid; grid-template-columns:auto minmax(0, 1fr) auto auto; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); font-size:13.5px; }
.att-list li:last-child{ border-bottom:0; }
.att-topic{ color:var(--ink-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dc-abs{ display:grid; gap:12px; margin-top:14px; }
.dc-abs .db-btn{ justify-self:start; }

/* lecture: axes, recording, waiting */
.dc-axes{ margin:0; padding:0; list-style:none; counter-reset:ax; }
.dc-axes li{ display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); font-size:15px; counter-increment:ax; }
.dc-axes li:last-child{ border-bottom:0; }
.dc-axes li::before{ content:counter(ax); display:grid; place-items:center; width:30px; height:30px; flex:none; border-radius:10px; font-size:13.5px; font-weight:700; background:var(--gold-soft); }
.dc-rec{
  position:relative; overflow:hidden;
  display:grid; place-items:center;
  width:100%; aspect-ratio:16 / 9;
  border:0; border-radius:18px; cursor:pointer;
  background:var(--ink) center / cover;
}
.dc-rec::before{ content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(7,31,26,.1), rgba(7,31,26,.7)); }
.dc-rec .pl-big{ position:relative; }
.dc-rec-t{ position:absolute; bottom:14px; inset-inline-start:16px; font-size:14px; font-weight:600; color:#FFFDF8; }
.dc-rec:hover .pl-big{ transform:scale(1.06); }
.dc-wait{ display:flex; align-items:flex-start; gap:12px; padding:18px; border-radius:16px; border:1px dashed var(--line-2); font-size:13.5px; line-height:1.7; color:var(--ink-2); }
.dc-wait svg{ width:26px; height:26px; color:var(--gold-deep); }
.dc-wait b{ display:block; color:var(--ink); font-size:14.5px; }


/* =========================================================
   PLAYER (the recordings dialog and the lesson video)
   ========================================================= */
.db-player{
  margin:auto;
  width:min(880px, calc(100vw - 32px));
  padding:20px;
  border:0; border-radius:26px;
  color:var(--ink); background:var(--card);
  box-shadow:0 40px 80px -40px rgba(7,31,26,.6);
}
.db-player::backdrop{ background:rgba(7,31,26,.5); backdrop-filter:blur(3px); }
.db-player[open]{ animation:db-pop .3s var(--ease); }
.pl-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.pl-head small{ font-size:12.5px; color:var(--ink-3); }
.pl-head h2{ font-size:19px; font-weight:700; line-height:1.5; }
.pl-head form{ margin:0; }
.pl-screen{
  position:relative; overflow:hidden;
  display:grid; place-items:center;
  aspect-ratio:16 / 9;
  border-radius:18px;
  background:var(--ink) center / cover;
}
.pl-screen::before{ content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(7,31,26,.15), rgba(7,31,26,.55)); transition:background .4s; }
.is-on .pl-screen::before{ background:rgba(7,31,26,.25); }
.pl-big{
  position:relative;
  display:grid; place-items:center;
  width:74px; height:74px;
  border:0; border-radius:50%;
  color:var(--ink); background:rgba(255,253,248,.94);
  box-shadow:0 0 0 10px rgba(255,253,248,.16);
  cursor:pointer;
  transition:transform .35s var(--ease), opacity .3s;
}
.pl-big svg{ width:26px; height:26px; margin-inline-end:-3px; }
.pl-big:hover{ transform:scale(1.06); }
.is-on .pl-big{ opacity:0; pointer-events:none; }
.pl-bar{ display:flex; align-items:center; gap:12px; margin-top:12px; }
.pl-btn{ display:grid; place-items:center; width:42px; height:42px; flex:none; border:0; border-radius:50%; color:#FFFDF8; background:var(--ink); cursor:pointer; }
.pl-btn svg{ width:17px; height:17px; }
.pl-track{ flex:1; height:6px; border-radius:99px; background:rgba(18,60,53,.09); overflow:hidden; }
.pl-track i{ display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg, var(--gold), #8FB59D); }
.pl-time{ font-size:12.5px; color:var(--ink-2); font-variant-numeric:tabular-nums; min-width:38px; text-align:center; }
.pl-note{ margin-top:12px; font-size:13px; color:var(--ink-3); }


/* =========================================================
   TASK DETAILS
   ========================================================= */
.dt-grid{ display:grid; grid-template-columns:minmax(0, 1fr) 340px; gap:20px; align-items:start; }
.dt-main, .dt-aside{ display:grid; grid-template-columns:minmax(0, 1fr); gap:20px; }
.dt-aside{ position:sticky; top:20px; }
.dt-steps{ margin:0; padding:0; list-style:none; counter-reset:st; display:grid; gap:12px; }
.dt-steps li{ display:flex; gap:12px; font-size:15.5px; line-height:1.85; counter-increment:st; }
.dt-steps li::before{ content:counter(st); display:grid; place-items:center; width:28px; height:28px; flex:none; margin-top:2px; border-radius:9px; font-size:13px; font-weight:700; background:var(--sage-soft); }
.dt-submit{ scroll-margin-top:20px; outline:none; }
.dt-facts{ display:grid; gap:16px; margin:0; }
.dt-facts dt{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-2); }
.dt-facts dt svg{ width:16px; height:16px; color:var(--ink-3); }
.dt-facts dd{ margin:2px 0 0; padding-inline-start:24px; font-size:14.5px; font-weight:600; line-height:1.6; }
.dt-facts dd small{ display:block; font-size:12.5px; font-weight:500; color:var(--ink-2); }
.dt-facts dd a:hover{ text-decoration:underline; text-decoration-color:var(--gold); text-underline-offset:4px; }
.dt-form{ display:grid; gap:14px; }
.dt-acts{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:6px; }
.dt-note{ display:flex; align-items:center; gap:8px; margin-bottom:14px; padding:10px 12px; border-radius:12px; font-size:13.5px; background:var(--red-soft); }
.dt-note svg{ width:17px; height:17px; }
.dt-done{ display:flex; align-items:center; gap:12px; padding:14px; border-radius:16px; background:#EEF5EF; }
.dt-done-ico{ display:grid; place-items:center; width:40px; height:40px; flex:none; border-radius:50%; color:#FFFDF8; background:#5E9C78; }
.dt-done b{ display:block; font-size:15px; }
.dt-done small{ font-size:12.5px; color:var(--ink-2); }
.dt-sub-line{ display:flex; align-items:center; gap:8px; margin-top:12px; font-size:14px; }
.dt-sub-line svg{ width:17px; height:17px; color:var(--ink-3); }
.dt-quote{ margin-top:12px; }

/* the drop zone */
.up{
  position:relative;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:28px 18px;
  border:1.5px dashed var(--line-2); border-radius:18px;
  background:#FBF8F1;
  text-align:center; cursor:pointer;
  transition:border-color .2s, background .2s;
}
.up:hover, .up.is-over{ border-color:var(--sage); background:#F3F7F2; }
.up:focus-within{ outline:2px solid var(--gold); outline-offset:3px; }
.up.has-file{ border-style:solid; border-color:var(--sage); background:#F3F7F2; }
.up-ico{ display:grid; place-items:center; width:52px; height:52px; margin-bottom:4px; border-radius:16px; background:var(--gold-soft); }
.up-ico svg{ width:24px; height:24px; }
.up b{ font-size:15px; }
.up small{ font-size:12.5px; color:var(--ink-2); }

/* questions (task + lesson) */
.qz{ margin:0; padding:14px 16px 16px; border:1px solid var(--line); border-radius:16px; }
.qz legend{ display:flex; align-items:center; gap:10px; padding:0 6px; font-size:15px; font-weight:600; }
.qz legend span{ display:grid; place-items:center; width:26px; height:26px; border-radius:50%; font-size:12.5px; background:var(--gold-soft); }
.qz-opt{ display:flex; align-items:center; gap:10px; margin-top:8px; padding:11px 12px; border:1px solid var(--line); border-radius:12px; cursor:pointer; font-size:14.5px; transition:background .2s, border-color .2s; }
.qz-opt:hover{ border-color:var(--line-2); }
.qz-opt input{ accent-color:var(--ink); width:17px; height:17px; margin:0; }
.qz-opt:has(input:checked){ border-color:var(--sage); background:#F3F7F2; }
.qz-opt.is-right{ border-color:#5E9C78; background:#E7F2EA; }
.qz-opt.is-wrong{ border-color:var(--red); background:var(--red-soft); }

.dt-check{ display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--line); border-radius:14px; cursor:pointer; font-size:15px; font-weight:600; }
.dt-check input{ position:absolute; opacity:0; pointer-events:none; }
.dt-check-ui{ display:grid; place-items:center; width:26px; height:26px; flex:none; border:1.6px solid var(--line-2); border-radius:9px; color:transparent; transition:background .2s, border-color .2s, color .2s; }
.dt-check-ui svg{ width:15px; height:15px; }
.dt-check input:checked + .dt-check-ui{ background:var(--ink); border-color:var(--ink); color:#FFFDF8; }
.dt-check input:focus-visible + .dt-check-ui{ outline:2px solid var(--gold); outline-offset:2px; }


/* =========================================================
   LEARNING WORKSPACE
   ========================================================= */
.lw-top{ padding:16px 20px; }
.lw-top-row{ display:flex; align-items:center; flex-wrap:wrap; gap:16px 28px; }
.lw-cover{ width:58px; height:58px; flex:none; border-radius:16px; overflow:hidden; }
.lw-cover img{ width:100%; height:100%; object-fit:cover; display:block; }
.lw-top-facts{ display:flex; flex-wrap:wrap; gap:10px 28px; margin:0; padding:0; list-style:none; }
.lw-top-facts small{ display:block; font-size:12px; color:var(--ink-3); }
.lw-top-facts b{ font-size:14.5px; }
.lw-top-prog{ flex:1; min-width:240px; }

.lw{ display:grid; grid-template-columns:340px minmax(0, 1fr); gap:20px; align-items:start; }
.lw-out{ position:sticky; top:20px; max-height:calc(100vh - 40px); overflow-y:auto; padding:8px; }
.lw-out-wrap > summary{ list-style:none; }
.lw-out-wrap > summary::-webkit-details-marker{ display:none; }
.lw-out-h{ display:flex; align-items:center; gap:10px; padding:12px; font-size:16px; font-weight:700; cursor:pointer; }
.lw-out-h small{ font-size:12.5px; font-weight:500; color:var(--ink-3); }
.lw-out-h > svg{ display:none; margin-inline-start:auto; width:18px; height:18px; transition:transform .3s var(--ease); }
.lw-out-wrap[open] > .lw-out-h > svg{ transform:rotate(180deg); }
.lw-unit{ border-top:1px solid var(--line); }
.lw-unit > summary{ display:flex; align-items:center; gap:12px; padding:12px; border-radius:14px; list-style:none; cursor:pointer; }
.lw-unit > summary::-webkit-details-marker{ display:none; }
.lw-unit > summary:hover{ background:rgba(18,60,53,.03); }
.lw-unit > summary > svg{ width:16px; height:16px; margin-inline-start:auto; color:var(--ink-3); transition:transform .3s var(--ease); }
.lw-unit[open] > summary > svg{ transform:rotate(180deg); }
.lw-num{ display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:11px; font-size:13.5px; font-weight:700; background:#F1EDE3; }
.lw-num svg{ width:15px; height:15px; }
.lw-unit.is-done .lw-num{ background:var(--ink); color:#FFFDF8; }
.lw-unit.is-active .lw-num{ background:var(--gold-soft); box-shadow:inset 0 0 0 1.5px var(--gold); }
.lw-unit.is-locked .lw-num{ color:var(--ink-3); }
.lw-unit.is-locked .lw-unit-t{ opacity:.6; }
.lw-unit-t{ min-width:0; }
.lw-unit-t b{ display:block; font-size:14.5px; font-weight:600; line-height:1.5; }
.lw-unit-t small{ font-size:12px; color:var(--ink-3); }
.lw-unit ul{ display:grid; gap:2px; margin:0; padding:0 0 10px; list-style:none; }
.lw-ls{ display:flex; align-items:center; gap:10px; margin-inline-start:24px; padding:8px 12px; border-radius:13px; font-size:13.5px; line-height:1.5; transition:background .2s, color .2s; }
.lw-ls small{ display:block; font-size:11.5px; color:var(--ink-3); }
.lw-ls-ico{ display:grid; place-items:center; width:28px; height:28px; flex:none; border-radius:9px; background:#F6F2E8; }
.lw-ls-ico svg{ width:14px; height:14px; }
/* the current lesson keeps its dark fill on hover (its text is light) */
a.lw-ls:not(.is-current):hover{ background:rgba(255,253,248,.9); box-shadow:inset 0 0 0 1px var(--line); }
.lw-ls.is-done .lw-ls-ico{ background:#E7F2EA; color:#2F6B4F; }
.lw-ls.is-current{ background:var(--ink); color:#FFFDF8; font-weight:600; box-shadow:0 10px 22px -16px rgba(18,60,53,.9); }
.lw-ls.is-current small{ color:rgba(255,253,248,.7); }
.lw-ls.is-current .lw-ls-ico{ background:rgba(255,253,248,.12); color:var(--gold); }
.lw-ls.is-locked{ opacity:.5; cursor:not-allowed; }

.lw-main{ display:grid; gap:20px; min-width:0; }
.lw-lesson{ padding:26px; }
.lw-kick{ font-size:13px; font-weight:600; color:var(--gold-deep); }
.lw-lesson h2{ margin:6px 0 12px; font-size:clamp(20px, 2vw, 25px); font-weight:700; line-height:1.5; }
.lw-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.lw-video{ margin-bottom:22px; }
.lw-audio{ display:flex; align-items:center; gap:14px; margin-bottom:22px; padding:14px 16px; border-radius:18px; background:#F6F2E8; }
.lw-wave{ flex:1; display:flex; align-items:center; gap:3px; height:38px; }
.lw-wave i{ flex:1; height:30%; border-radius:2px; background:rgba(18,60,53,.16); transition:background .3s; }
.lw-wave i:nth-child(3n){ height:75%; } .lw-wave i:nth-child(4n+1){ height:52%; } .lw-wave i:nth-child(5n+2){ height:100%; } .lw-wave i:nth-child(7n+3){ height:40%; }
.lw-wave i.is-on{ background:var(--gold); }
.lw-text{ font-size:16px; line-height:2; }
.lw-text p{ margin:0 0 14px; }
.dt-details{ white-space:pre-line; overflow-wrap:anywhere; }
.lw-points{ display:grid; gap:8px; margin:0 0 16px; padding:0; list-style:none; }
.lw-points li{ position:relative; padding-inline-start:20px; }
.lw-points li::before{ content:""; position:absolute; right:2px; top:.85em; width:7px; height:7px; border-radius:50%; background:var(--gold); }
.lw-att h3{ margin:20px 0 10px; font-size:15px; font-weight:700; }
.lw-quiz{ display:grid; gap:14px; margin-bottom:12px; }
.lw-quiz .db-btn{ justify-self:start; }
.lw-acts{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:26px; padding-top:20px; border-top:1px solid var(--line); }
.lw-acts .db-btn svg{ width:17px; height:17px; }
.is-done-btn{ color:#2F6B4F; background:#E7F2EA; cursor:default; }
.is-done-btn:hover{ transform:none; box-shadow:none; }
.lw-notes .db-card-head h2{ display:flex; align-items:center; gap:8px; }
.lw-notes .db-card-head h2 svg{ width:18px; height:18px; color:var(--gold-deep); }
.lw-saved{ margin-inline-start:auto; font-size:12.5px; color:var(--ink-3); }
.lw-notes textarea{
  width:100%; min-height:110px; padding:12px 14px;
  border:1px solid var(--line-2); border-radius:14px;
  background:#FFFEFB; font:inherit; font-size:15px; line-height:1.8; color:var(--ink);
  resize:vertical;
}
.lw-notes textarea:focus{ outline:none; border-color:var(--sage); box-shadow:0 0 0 4px rgba(168,199,181,.3); }
.lw-sk-media{ aspect-ratio:16 / 9; border-radius:18px; margin-top:12px; }


/* =========================================================
   PROGRESS
   ========================================================= */
.pr-stats{ grid-column:auto; }
.pr-stats .st em{ display:block; font-style:normal; font-size:12.5px; color:var(--ink-3); }
.pr-grid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:20px; align-items:start; }
.pr-rows{ display:grid; gap:12px; margin:0; padding:0; list-style:none; }
.pr-row{ padding:14px; border-radius:18px; border:1px solid var(--line); background:#FFFEFB; }
.pr-row-main{ display:flex; align-items:center; gap:12px; }
.pr-row-main:hover b{ text-decoration:underline; text-decoration-color:var(--gold); text-underline-offset:4px; }
.pr-thumb{ width:48px; height:48px; flex:none; border-radius:14px; overflow:hidden; }
.pr-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.pr-row-t{ flex:1; min-width:0; }
.pr-row-t b{ display:block; font-size:15px; font-weight:600; line-height:1.5; }
.pr-row-t small{ font-size:12.5px; color:var(--ink-2); }
.pr-meter{ display:grid; grid-template-columns:auto minmax(0, 1fr) 44px; align-items:center; gap:12px; margin-top:12px; font-size:13px; color:var(--ink-2); }
.pr-meter b{ color:var(--ink); font-size:14px; text-align:left; }
.pr-meter .db-bar{ height:7px; }
.pr-note{ display:flex; align-items:flex-start; gap:8px; margin-top:12px; padding:10px 12px; border-radius:12px; background:#F6F2E8; font-size:13.5px; line-height:1.7; color:var(--ink-2); }
.pr-note svg{ width:16px; height:16px; margin-top:4px; color:var(--gold-deep); }

/* the one chart: weekly learning hours against a gentle goal */
.wc{ position:relative; height:260px; }
.wc-cols{ display:flex; gap:12px; height:100%; margin:0; padding:0; list-style:none; }
.wc-cols li{ flex:1; display:grid; grid-template-rows:minmax(0, 1fr) 34px; text-align:center; }
.wc-col{ position:relative; margin-top:20px; display:flex; align-items:flex-end; justify-content:center; }
.wc-bar{ position:relative; width:min(40px, 76%); height:0; border-radius:12px 12px 6px 6px; background:var(--sage-soft); transition:height 1.2s var(--ease); }
.wc-bar b{ position:absolute; bottom:calc(100% + 4px); inset-inline:0; font-size:12px; font-weight:600; color:var(--ink-2); }
.wc-cols li.is-met .wc-bar{ background:var(--sage); }
.wc-cols li.is-now .wc-bar{ background:linear-gradient(180deg, var(--gold), #8FB59D); }
.wc-cols small{ align-self:center; font-size:11.5px; color:var(--ink-3); white-space:nowrap; }
.wc-cols li.is-now small{ color:var(--ink); font-weight:600; }
.wc-goal{ position:absolute; inset-inline:0; bottom:calc((100% - 54px) * var(--g) + 34px); border-top:1.5px dashed rgba(176,143,62,.7); pointer-events:none; z-index:1; }
.wc-goal i{ position:absolute; top:-20px; inset-inline-end:0; font-style:normal; font-size:11.5px; font-weight:600; color:var(--gold-deep); background:var(--card); padding:0 4px; }
.pr-foot{ display:flex; align-items:center; gap:8px; margin-top:16px; font-size:13.5px; color:var(--ink-2); }
.pr-foot svg{ width:18px; height:18px; color:var(--gold-deep); }

.pr-ach-list{ display:grid; margin:0; padding:0; list-style:none; }
.pr-ach-list li{ display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); }
.pr-ach-list li:last-child{ border-bottom:0; }
.pr-badge{ display:grid; place-items:center; width:42px; height:42px; flex:none; border-radius:50%; color:var(--gold-deep); background:var(--gold-soft); }
.pr-badge svg{ width:19px; height:19px; }
.pr-ach-list b{ display:block; font-size:14.5px; font-weight:600; line-height:1.55; }
.pr-ach-list small{ font-size:12.5px; color:var(--ink-3); }


/* =========================================================
   LIBRARY — the public cards, tuned to the workspace's scale
   ========================================================= */
.lib .nb-grid.lib-grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); gap:36px 28px; }
.lib .nb-title{ font-size:19px; }
.lib .nb-kc{ min-height:240px; }
.lib .nb-kc-text{ font-size:18px; }
.lib-types{ display:flex; flex-wrap:wrap; gap:8px; }
.lib-types button{
  height:36px; padding:0 15px;
  border:1px solid var(--line); border-radius:99px;
  background:var(--card);
  font-size:13.5px; font-weight:600; color:var(--ink-2);
  cursor:pointer; transition:background .2s, color .2s, border-color .2s;
}
.lib-types button:hover{ color:var(--ink); border-color:var(--line-2); }
.lib-types button[aria-checked="true"]{ color:#FFFDF8; background:var(--ink); border-color:var(--ink); }
.lib-item{ position:relative; min-width:0; animation:db-in .6s var(--ease) both; animation-delay:calc(var(--i, 0) * 50ms); }
.lib-save{
  position:absolute; top:12px; left:12px; z-index:2;
  display:grid; place-items:center;
  width:40px; height:40px;
  border:0; border-radius:50%;
  color:var(--ink); background:rgba(255,253,248,.92);
  box-shadow:0 8px 18px -12px rgba(18,60,53,.6);
  cursor:pointer;
  transition:transform .3s var(--ease), color .2s;
}
.lib-save svg{ width:18px; height:18px; }
.lib-save:hover{ transform:scale(1.06); }
.lib-save[aria-pressed="true"]{ color:var(--gold-deep); }
.lib-save[aria-pressed="true"] svg{ fill:currentColor; }
.lib-item.is-card .lib-save{ top:16px; left:16px; }
.lib-seen{ display:flex; align-items:center; gap:6px; margin-top:12px; font-size:12.5px; color:var(--ink-3); }
.lib-seen svg{ width:15px; height:15px; }
.lib-sec + .lib-sec{ margin-top:42px; }
.lib-sec .db-block-head{ margin-top:0; }
.lib-more{ display:flex; justify-content:center; margin-top:30px; }
.lib-sk{ aspect-ratio:411 / 347; border-radius:22px; }
.lib > [data-slot] > .db-empty{ background:var(--card); }


/* =========================================================
   NOTIFICATIONS PAGE
   ========================================================= */
.nt-card{ padding:10px; }
.nt-card > .sk-row{ padding:12px; margin:0; }
.nt-list .al{ padding:14px; }
.nt-card > .db-empty{ border:0; }


/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:1560px){
  .dh-facts{ grid-template-columns:repeat(2, minmax(0, auto)); }
}
@media (max-width:1360px){
  .dh{ grid-template-columns:180px minmax(0, 1fr) minmax(250px, 300px); }
}
@media (max-width:1240px){
  .dh{ grid-template-columns:160px minmax(0, 1fr); }
  .dh-next{ grid-column:1 / -1; }
  .dh-next .db-btn{ width:auto; align-self:flex-start; }
  .dt-grid{ grid-template-columns:minmax(0, 1fr) 300px; }
  .lw{ grid-template-columns:300px minmax(0, 1fr); }
  .lib .nb-grid.lib-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:1000px){
  .lw{ grid-template-columns:minmax(0, 1fr); }
  .lw-out{ position:static; max-height:none; }
  .lw-out-h > svg{ display:block; }
  .pr-grid{ grid-template-columns:minmax(0, 1fr); }
}
@media (max-width:860px){
  .dc-grid{ grid-template-columns:minmax(0, 1fr); }
  .dt-grid{ grid-template-columns:minmax(0, 1fr); }
  .dt-aside{ position:static; }
  .pr-stats{ grid-template-columns:repeat(2, minmax(0, 1fr)) !important; }
  .pr-stats .st{ flex-direction:row; align-items:center; }
  .tc{ grid-template-columns:44px minmax(0, 1fr); }
  .tc-ico{ width:44px; height:44px; }
  .tc-side{ grid-column:1 / -1; flex-direction:row; align-items:center; justify-content:space-between; flex-wrap:wrap; padding-top:12px; border-top:1px solid var(--line); }
}
@media (max-width:640px){
  .db-page{ gap:16px; }
  .db-toolbar{ flex-direction:column; align-items:stretch; }
  .db-toolbar > .db-link{ align-self:flex-start; }
  .db-seg{ width:100%; }
  .db-seg button{ flex:1 0 auto; padding:0 12px; }
  .dh{ grid-template-columns:minmax(0, 1fr); gap:16px; padding:14px; }
  .dh-media{ min-height:0; aspect-ratio:16 / 8; }
  .dh-facts{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
  .dh-next .db-btn{ width:100%; }
  .tc{ padding:16px; gap:12px; }
  .tc-acts{ width:100%; }
  .tc-acts .db-btn{ flex:1; }
  .att-list li{ grid-template-columns:minmax(0, 1fr) auto; }
  .att-list .att-topic{ grid-column:1 / -1; grid-row:2; white-space:normal; }
  .lw-lesson{ padding:18px; }
  .lw-acts{ flex-wrap:wrap; }
  .lw-acts > *{ flex:1 1 40%; }
  .lw-acts > :nth-child(2){ order:-1; flex-basis:100%; }
  .lw-top-facts{ gap:10px 20px; }
  .lib .nb-grid.lib-grid{ grid-template-columns:minmax(0, 1fr); }
  .pr-stats .st{ flex-direction:column; align-items:flex-start; }
  .wc-cols{ gap:6px; }
  .wc-cols small{ font-size:10.5px; white-space:normal; line-height:1.3; }
  .db-player{ padding:14px; border-radius:22px; }
}
@keyframes db-sheet{ from{ transform:translateY(24px); opacity:0; } }



/* =========================================================
   MY LEARNING + DISCOVERY — حلقاتي · مناهجي · محاضراتي
   Two tabs over the page: what the student joined, and the public
   catalogue embedded as-is. A hairline with one gold ink that
   slides between the two; the panel fades up on each switch.
   ========================================================= */
.ws-tabs{
  position:relative;
  display:flex; gap:6px;
  border-bottom:1px solid var(--line-2);
  overflow-x:auto; scrollbar-width:none;
}
.ws-tabs::-webkit-scrollbar{ display:none; }
.ws-tabs button{
  display:inline-flex; align-items:center; gap:9px; flex:none;
  height:52px; padding:0 18px;
  border:0; background:none;
  font-size:15.5px; font-weight:500; color:var(--ink-2);
  cursor:pointer; white-space:nowrap;
  transition:color .25s var(--ease);
}
.ws-tabs button svg{ width:19px; height:19px; color:var(--ink-3); transition:color .25s var(--ease); }
.ws-tabs button:hover{ color:var(--ink); }
.ws-tabs button[aria-selected="true"]{ color:var(--ink); font-weight:600; }
.ws-tabs button[aria-selected="true"] svg{ color:var(--gold-deep); }
.ws-tabs button:focus-visible{ outline:2px solid var(--gold); outline-offset:-4px; border-radius:12px; }
.ws-tabs::after{                                       /* the ink: placed by the shell (wsTabs) */
  content:""; position:absolute; bottom:0; left:var(--ink-x, 0);
  width:var(--ink-w, 0); height:2.5px;
  border-radius:3px 3px 0 0;
  background:linear-gradient(90deg, var(--gold-light), var(--gold));
}
.ws-tabs.is-ready::after{ transition:left .42s var(--ease), width .42s var(--ease); }
.ws-tabs-n{
  min-width:22px; height:22px; padding:0 7px;
  display:inline-grid; place-items:center;
  border-radius:99px;
  font-size:12px; font-weight:700;
  background:rgba(18,60,53,.07); color:var(--ink-2);
}
.ws-tabs button[aria-selected="true"] .ws-tabs-n{ background:var(--gold-soft); color:var(--ink); }
.ws-tabs-n[hidden]{ display:none; }

.ws-panel{ display:grid; grid-template-columns:minmax(0, 1fr); gap:20px; align-content:start; }
.ws-panel[hidden]{ display:none; }
.ws-panel.is-in{ animation:ws-in .42s var(--ease) both; }
@keyframes ws-in{ from{ opacity:0; transform:translateY(10px); } }

/* the public catalogue inside the column: no page gutters, the workspace grid */
.ws-explore{ --cl-sand:#F1EADB; }
.ws-explore .cat{ padding:0 0 12px; }
.ws-explore .cat-wrap{ max-width:none; padding:0; }
.ws-explore .cr-head{ margin:26px 0 18px; }
.ws-explore .cf-bar{ box-shadow:var(--shadow); }
.ws-explore .cf-search input:focus-visible{ outline:none; }   /* the search pill shows focus itself */
.db .cg{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
@media (max-width:1360px) and (min-width:1101px){
  .ws-explore .cf-quick{ display:none; }              /* beside the sidebar: "كل الفلاتر" carries every filter */
}
@media (max-width:1240px){ .db .cg{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width:640px){
  .db .cg{ grid-template-columns:minmax(0, 1fr); }
  .ws-tabs{ gap:0; }
  .ws-tabs button{ flex:1 0 auto; justify-content:center; height:48px; padding:0 12px; font-size:14.5px; }
  .ws-tabs button svg{ display:none; }
  .ws-explore .cr-head{ margin:18px 0 14px; }
}


/* =========================================================
   DETAILS INSIDE THE WORKSPACE — explore.html
   The public details template (details.css) in the column:
   no hero ground or thread, the title at the start, the long
   read as one tinted card.
   ========================================================= */
.ws-dt .dt-hero{ padding:0; background:none; overflow:visible; isolation:auto; }
.ws-dt .dt-head{ max-width:760px; margin:0; text-align:start; }
.ws-dt .dt-title{ margin-top:10px; font-size:clamp(28px, 2.8vw, 40px); }
.ws-dt .dt-intro{ max-width:680px; margin:12px 0 0; }
.ws-dt .dt-top{ max-width:none; margin:26px 0 0; grid-template-columns:minmax(0, 1fr) 340px; }
.ws-dt .dt-cover{ min-height:420px; }
.ws-dt .dt-read{ margin-top:22px; padding:52px 44px; border-radius:var(--r); overflow:hidden; }
.ws-dt .dt-read-wrap{ grid-template-columns:200px minmax(0, 760px); gap:56px; max-width:none; justify-content:start; }
.ws-dt .dt-toc{ top:24px; }
.ws-dt .dt-block{ scroll-margin-top:24px; }
.ws-dt .dt-rel{ padding:52px 0 8px; }
.ws-dt .dt-rel-wrap{ max-width:none; }
.ws-dt .dt-rel-head{ margin-bottom:22px; }
.ws-dt .dt-rel-head h2{ font-size:clamp(22px, 2vw, 28px); }
.ws-dt .dt-missing{ padding:80px 24px; }

/* the action, for a student */
.dt-info.is-mine .dt-cta-note{ display:flex; align-items:center; justify-content:center; gap:8px; color:var(--ink); font-weight:600; }
.dt-info.is-mine .dt-cta-note::before{ content:""; width:7px; height:7px; flex:none; border-radius:50%; background:#5E9C78; box-shadow:0 0 0 3px rgba(94,156,120,.18); }
.dt-cta.is-wait{ opacity:.72; }

@media (max-width:1240px){
  .ws-dt .dt-top{ grid-template-columns:minmax(0, 1fr) 300px; }
  .ws-dt .dt-read-wrap{ grid-template-columns:minmax(0, 760px); }
  .ws-dt .dt-toc{ display:none; }
}
@media (max-width:1024px){
  .ws-dt .dt-top{ grid-template-columns:minmax(0, 1fr); }
  .ws-dt .dt-cover{ min-height:0; aspect-ratio:16 / 9; }
}
@media (max-width:640px){
  .ws-dt .dt-title{ font-size:26px; }
  .ws-dt .dt-top{ margin-top:18px; }
  .ws-dt .dt-cover{ aspect-ratio:4 / 3; }
  .ws-dt .dt-read{ margin-top:16px; padding:28px 18px; border-radius:var(--r-sm); }
  .ws-dt .dt-rel{ padding-top:36px; }
}


/* =========================================================
   ENROL IN PLACE — the confirmation (explore.js), on the
   account dialog's surface
   ========================================================= */
.ws-enroll{ width:min(500px, calc(100vw - 32px)); }
.ws-enroll h2{ margin:4px 0 18px; }
.en-kicker{ margin:0; font-size:13px; font-weight:600; color:var(--gold-deep); }
.en-item{
  display:flex; align-items:center; gap:14px;
  padding:12px; border-radius:var(--r-sm);
  background:#F7F2E6; box-shadow:inset 0 0 0 1px var(--line);
}
.en-item > img{ width:72px; height:72px; flex:none; border-radius:12px; object-fit:cover; }
.en-item b{ display:block; font-size:16px; line-height:1.5; }
.en-item span{ display:flex; align-items:center; gap:8px; margin-top:4px; font-size:13.5px; color:var(--ink-2); }
.en-item span img{ width:22px; height:22px; border-radius:50%; object-fit:cover; }
.en-rows{ margin:14px 0 0; }
.en-rows > div{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:11px 2px; border-bottom:1px solid var(--line); }
.en-rows > div:last-child{ border-bottom:0; }
.en-rows dt{ display:inline-flex; align-items:center; gap:8px; font-size:14px; color:var(--ink-2); }
.en-rows dt svg{ width:16px; height:16px; color:var(--gold-deep); }
.en-rows dd{ margin:0; font-size:14.5px; font-weight:600; text-align:left; }
.en-who{
  display:flex; align-items:center; gap:10px;
  margin:14px 0 0; padding:11px 14px; border-radius:14px;
  font-size:13.5px; color:var(--ink-2); background:var(--sage-soft);
}
.en-who svg{ width:18px; height:18px; flex:none; color:var(--ink); }
.en-who b{ color:var(--ink); }
.en-acts{ display:flex; gap:10px; margin-top:20px; }
.en-acts .db-btn{ flex:1; justify-content:center; }
.en-acts .db-btn:first-child{ flex:1.4; }
.en-spin{ width:16px; height:16px; border-radius:50%; border:2px solid rgba(255,253,248,.35); border-top-color:#FFFDF8; animation:en-spin .7s linear infinite; }
@keyframes en-spin{ to{ transform:rotate(360deg); } }
.db-btn.is-busy{ opacity:1; }
.en-done{ padding:14px 0 0; text-align:center; animation:db-in .45s var(--ease) both; }
.en-check{
  display:grid; place-items:center; width:64px; height:64px; margin:0 auto 14px;
  border-radius:50%; color:#FFFDF8;
  background:linear-gradient(140deg, #7FAE91, #4F8B69);
  box-shadow:0 0 0 8px var(--sage-soft);
  animation:en-pop .5s var(--ease) both;
}
.en-check svg{ width:28px; height:28px; }
@keyframes en-pop{ from{ transform:scale(.6); opacity:0; } }
.en-done h2{ margin:0 0 8px; }
.en-done p{ margin:0 auto; max-width:380px; font-size:15px; line-height:1.9; color:var(--ink-2); }
.en-done p b{ color:var(--ink); }
@media (max-width:640px){
  .ws-enroll{ padding:22px 18px; }
  .en-acts{ flex-direction:column-reverse; }
}
@media (prefers-reduced-motion:reduce){
  .ws-panel.is-in, .en-done, .en-check{ animation:none; }
  .ws-tabs.is-ready::after{ transition:none; }
}


/* the line over a discovery catalogue: how «الأنسب» is ordered (student-shell.js) */
.ws-prefs-note{
  display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px;
  margin:0; font-size:13.5px; color:var(--ink-2);
}
.ws-prefs-note[hidden]{ display:none; }
.ws-prefs-note svg{ width:17px; height:17px; color:var(--gold-deep); }
.ws-prefs-note a{ font-weight:600; color:var(--ink); border-bottom:1px solid rgba(176,143,62,.45); transition:border-color .2s; }
.ws-prefs-note a:hover{ border-color:var(--gold-deep); }


/* =========================================================
   حسابي — account.html
   A compact summary card, the workspace tabs, one card per tab.
   Fields are the workspace's own (.db-fld); chips, the segmented
   choice and the toggles are drawn here from the same tokens.
   ========================================================= */

/* ---- summary ---- */
.ac-sum{ flex-direction:row; align-items:center; gap:20px; padding:20px 22px; }
.ac-ava{
  position:relative; flex:none;
  width:84px; height:84px; padding:0;
  border:0; border-radius:50%; background:none; cursor:pointer;
}
.ac-ava-in{
  display:grid; place-items:center; width:100%; height:100%;
  border-radius:50%; overflow:hidden;
  background:linear-gradient(140deg, var(--gold-soft), #EADCB8);
  box-shadow:0 0 0 4px var(--card), 0 0 0 5px var(--line-2);
  transition:transform .35s var(--ease), box-shadow .35s var(--ease);
}
.ac-ava-in b{ font-size:32px; font-weight:700; color:var(--ink); }
.ac-ava-in img{ width:100%; height:100%; object-fit:cover; display:block; }
.ac-ava-cam{
  position:absolute; inset:0; display:grid; place-items:center;
  border-radius:50%; color:#FFFDF8; background:rgba(18,60,53,.5);
  opacity:0; transition:opacity .3s var(--ease);
}
.ac-ava-cam svg{ width:24px; height:24px; }
.ac-ava:hover .ac-ava-in, .ac-ava:focus-visible .ac-ava-in{ transform:scale(1.04); box-shadow:0 0 0 4px var(--card), 0 0 0 5px var(--gold); }
.ac-ava:hover .ac-ava-cam, .ac-ava:focus-visible .ac-ava-cam{ opacity:1; }
.ac-ava:focus-visible{ outline:none; }

.ac-who{ flex:1; min-width:0; }
.ac-tag{ margin-bottom:8px; }
.ac-who h2{ margin:0; font-size:21px; font-weight:700; line-height:1.4; overflow-wrap:anywhere; }
.ac-meta{ display:flex; flex-wrap:wrap; gap:4px 18px; margin:6px 0 0; padding:0; list-style:none; font-size:14px; color:var(--ink-2); }
.ac-meta li{ display:inline-flex; align-items:center; gap:7px; min-width:0; }
.ac-meta svg{ width:16px; height:16px; flex:none; color:var(--ink-3); }
.ac-meta span{ overflow-wrap:anywhere; }
.ac-sum-acts{ display:grid; justify-items:end; gap:6px; align-self:center; }
.ac-photo-x{ font-size:13px; color:var(--ink-2); background:none; border:0; padding:0; cursor:pointer; }
.ac-photo-x:hover{ color:var(--red); }
.ac-photo-x[hidden]{ display:none; }

/* ---- a tab's card ---- */
.ac-sec{ gap:0; padding:28px; }
.ac-narrow{ max-width:720px; }
.ac-head{ margin-bottom:22px; }
.ac-head h2{ margin:0; font-size:19px; font-weight:700; }
.ac-head p{ margin:4px 0 0; font-size:14px; color:var(--ink-2); }
.ac-grid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:18px 20px; }
.ac-stack{ display:grid; gap:18px; max-width:460px; }
.ac-sec .db-fld input, .ac-sec .db-fld select{ width:100%; height:48px; }
.ac-sec .db-fld input[aria-invalid="true"], .ac-sec .db-fld select[aria-invalid="true"]{ border-color:var(--red); box-shadow:0 0 0 4px rgba(181,82,63,.1); }
.ac-sec .db-fld input:focus-visible, .ac-sec .db-fld select:focus-visible{ outline:none; }   /* the field's sage ring is the focus */
.ac-err{ min-height:0; font-size:12.5px; font-weight:500; color:var(--red); }
.ac-err:empty{ display:none; }
.ac-hint{ font-size:12.5px; font-weight:400; line-height:1.7; color:var(--ink-3); }
.ac-hint a, .ac-inline{ color:var(--ink); font-weight:600; border-bottom:1px solid rgba(176,143,62,.45); }
.ac-inline{ padding:0; border-top:0; border-inline:0; background:none; font:inherit; font-size:12.5px; cursor:pointer; }

/* the email: shown, not editable */
.ac-ro{
  display:flex; align-items:center; gap:10px;
  height:48px; padding:0 14px;
  border-radius:13px; background:#F3EFE5;
  font-size:15px; font-weight:400; color:var(--ink-2);
}
.ac-ro svg{ width:16px; height:16px; flex:none; color:var(--ink-3); }
.ac-ro span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* fieldsets read like the other fields */
.ac-fs, .ac-group{ min-width:0; margin:0; padding:0; border:0; }
.ac-fs legend, .ac-group legend{ padding:0; margin-bottom:6px; font-size:13.5px; font-weight:600; }
.ac-group{ padding:20px 0; border-top:1px solid var(--line); }
.ac-group:first-of-type{ padding-top:0; border-top:0; }
.ac-group legend{ margin-bottom:12px; font-size:15px; }
.ac-group legend em{ margin-inline-start:6px; font-style:normal; font-size:12.5px; font-weight:400; color:var(--ink-3); }

/* a single choice: the segmented control */
.ac-seg{ display:inline-flex; gap:4px; padding:4px; border-radius:15px; background:#EFEADF; max-width:100%; }
.ac-seg label{ position:relative; flex:1; }
.ac-seg input{ position:absolute; opacity:0; pointer-events:none; }
.ac-seg span{
  display:grid; place-items:center; min-width:84px; height:40px; padding:0 16px;
  border-radius:11px; font-size:14.5px; font-weight:500; color:var(--ink-2);
  cursor:pointer; white-space:nowrap;
  transition:background .25s var(--ease), color .25s var(--ease), box-shadow .25s;
}
.ac-seg span:hover{ color:var(--ink); }
.ac-seg input:checked + span{ background:var(--card); color:var(--ink); font-weight:600; box-shadow:0 6px 14px -10px rgba(18,60,53,.5); }
.ac-seg input:focus-visible + span{ outline:2px solid var(--gold); outline-offset:1px; }
.ac-fs .ac-seg{ display:flex; }

/* several choices: chips */
.ac-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.ac-chip{ position:relative; }
.ac-chip input{ position:absolute; opacity:0; pointer-events:none; }
.ac-chip span{
  display:inline-flex; align-items:center; gap:7px;
  height:42px; padding:0 18px;
  border-radius:99px; border:1px solid var(--line-2); background:#fff;
  font-size:14.5px; font-weight:500; color:var(--ink);
  cursor:pointer; user-select:none;
  transition:background .25s var(--ease), border-color .25s var(--ease), color .25s, padding .25s var(--ease);
}
.ac-chip span svg{ width:0; height:15px; opacity:0; color:var(--gold-light); transition:width .25s var(--ease), opacity .2s; }
.ac-chip span:hover{ border-color:rgba(176,143,62,.55); }
.ac-chip input:checked + span{ background:var(--ink); border-color:var(--ink); color:#FFFDF8; }
.ac-chip input:checked + span svg{ width:15px; opacity:1; }
.ac-chip input:focus-visible + span{ outline:2px solid var(--gold); outline-offset:2px; }

.ac-note{
  display:flex; align-items:flex-start; gap:10px;
  margin:4px 0 0; padding:12px 14px; border-radius:14px;
  font-size:13.5px; line-height:1.8; color:var(--ink-2); background:var(--sage-soft);
}
.ac-note svg{ width:18px; height:18px; flex:none; margin-top:3px; color:var(--ink); }

/* ---- passwords ---- */
.ac-pw{ position:relative; display:block; }
.ac-pw input{ padding-inline-end:48px; text-align:right; }
.ac-pw input::placeholder{ text-align:right; }
.ac-eye{
  position:absolute; top:50%; left:6px; transform:translateY(-50%);
  display:grid; place-items:center; width:38px; height:38px;
  border:0; border-radius:10px; background:none; color:var(--ink-3); cursor:pointer;
  transition:color .2s, background .2s;
}
.ac-eye:hover{ color:var(--ink); background:rgba(18,60,53,.05); }
.ac-eye svg{ width:18px; height:18px; }
.ac-meter{ display:flex; align-items:center; gap:5px; margin-top:4px; }
.ac-meter i{ flex:1; max-width:56px; height:4px; border-radius:4px; background:rgba(18,60,53,.1); transition:background .3s var(--ease); }
.ac-meter b{ margin-inline-start:8px; font-size:12.5px; font-weight:500; color:var(--ink-2); }
.ac-meter[data-meter="1"] i:nth-child(-n+1){ background:var(--red); }
.ac-meter[data-meter="2"] i:nth-child(-n+2){ background:var(--gold); }
.ac-meter[data-meter="3"] i:nth-child(-n+3){ background:#7FAE91; }
.ac-meter[data-meter="4"] i:nth-child(-n+4){ background:#3F7D5A; }
.ac-rules{ display:flex; flex-wrap:wrap; gap:4px 16px; margin:2px 0 0; padding:0; list-style:none; font-size:12.5px; font-weight:400; color:var(--ink-3); }
.ac-rules li{ display:inline-flex; align-items:center; gap:6px; transition:color .25s; }
.ac-rules li::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.5; transition:background .25s, opacity .25s; }
.ac-rules li.is-ok{ color:#3F7D5A; }
.ac-rules li.is-ok::before{ opacity:1; }

/* ---- notification toggles ---- */
.ac-toggles{ margin:0; padding:0; list-style:none; }
.ac-toggles li + li{ border-top:1px solid var(--line); }
.ac-tg{ display:flex; align-items:center; gap:18px; padding:16px 2px; cursor:pointer; }
.ac-tg > span{ flex:1; min-width:0; }
.ac-tg b{ display:block; font-size:15px; font-weight:600; }
.ac-tg small{ display:block; margin-top:2px; font-size:13.5px; color:var(--ink-2); }
.ac-tg input{ position:absolute; opacity:0; pointer-events:none; }
.ac-tg i{
  position:relative; flex:none; width:46px; height:26px; border-radius:99px;
  background:rgba(18,60,53,.16); transition:background .3s var(--ease);
}
.ac-tg i::after{
  content:""; position:absolute; top:3px; right:3px; width:20px; height:20px;
  border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(7,31,26,.25);
  transition:transform .35s cubic-bezier(.3,1.4,.5,1);
}
.ac-tg input:checked + i{ background:var(--ink); }
.ac-tg input:checked + i::after{ transform:translateX(-20px); }
.ac-tg input:focus-visible + i{ outline:2px solid var(--gold); outline-offset:3px; }
.ac-tg:hover i{ box-shadow:0 0 0 4px rgba(168,199,181,.25); }

/* ---- the action and its quiet line ---- */
.ac-foot{
  display:flex; align-items:center; flex-wrap:wrap; gap:10px 18px;
  margin-top:24px; padding-top:20px; border-top:1px solid var(--line);
}
.ac-foot--auto{ margin-top:4px; padding-top:12px; min-height:44px; }
.ac-forgot{ font-size:13.5px; }
.ac-status{
  display:inline-flex; align-items:center; gap:7px; margin:0;
  font-size:13.5px; font-weight:600; color:#3F7D5A;
  opacity:0; transform:translateY(4px);
  transition:opacity .35s var(--ease), transform .35s var(--ease);
}
.ac-status.is-in{ opacity:1; transform:none; }
.ac-status.is-err{ color:var(--red); }
.ac-status svg{ width:16px; height:16px; }
.ac-sum-acts .ac-status{ font-size:12.5px; }

@media (max-width:860px){
  .ac-grid{ grid-template-columns:minmax(0, 1fr); }
}
@media (max-width:640px){
  .ac-sum{ flex-wrap:wrap; gap:14px 16px; padding:18px; }
  .ac-ava{ width:68px; height:68px; }
  .ac-ava-in b{ font-size:26px; }
  .ac-who h2{ font-size:18px; }
  .ac-sum-acts{ width:100%; justify-items:start; grid-auto-flow:column; justify-content:start; align-items:center; gap:14px; }
  .ac-sec{ padding:20px 18px; }
  .ac-stack{ max-width:none; }
  .ac-seg{ display:flex; }
  .ac-seg span{ min-width:0; padding:0 10px; }
  .ac-chip span{ height:40px; padding:0 15px; }
  /* the action stays within reach while scrolling a long form */
  .ac-foot:not(.ac-foot--auto){
    position:sticky; bottom:0; z-index:5;
    margin:20px -18px -20px; padding:12px 18px calc(12px + env(safe-area-inset-bottom));
    border-radius:0 0 var(--r) var(--r);
    background:rgba(255,253,248,.94);
    -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  }
  .ac-foot .db-btn{ flex:1; justify-content:center; }
  .ac-foot .ac-status{ width:100%; justify-content:center; }
  .ac-foot .ac-status:empty{ display:none; }
}
@media (prefers-reduced-motion:reduce){
  .ac-ava-in, .ac-status, .ac-tg i::after, .ac-chip span, .ac-chip span svg{ transition:none; }
}
.ac-sec .db-fld input[dir="ltr"]{ text-align:right; }
.ac-group .ac-seg{ display:flex; width:fit-content; }


/* =========================================================
   حسابي — the teacher (t-account.html)
   Builds on the account page above (.ac-*): a cream summary with
   the profile's completion, «يظهر للطلاب» marks on the public
   fields, the public card beside the professional tab, a quiet
   «إدارة الحساب» at the very end.
   ========================================================= */

/* ---- summary ---- */
.ta-sum{ align-items:flex-start; background:linear-gradient(170deg, #FFFDF8 0%, #FBF5E7 100%); border-color:rgba(176,143,62,.18); }
.ta-sum .ac-ava{ width:92px; height:92px; margin-top:2px; }
.ta-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.ta-cert{ color:#2F6B4F; background:var(--sage-soft); }
.ta-cert[hidden]{ display:none; }
.ta-sum-acts{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; margin-top:14px; }
.ta-sum-acts .db-link{ font-size:13.5px; }
.ta-done{ align-self:center; width:min(280px, 32%); flex:none; padding:16px 18px; border-radius:18px; background:rgba(255,253,248,.85); box-shadow:inset 0 0 0 1px var(--line); }
.ta-done-h{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin:0 0 10px; font-size:13.5px; font-weight:600; color:var(--ink-2); }
.ta-done-h b{ font-size:22px; color:var(--ink); }
.ta-done-bar{ display:block; height:8px; border-radius:8px; background:rgba(18,60,53,.08); overflow:hidden; }
.ta-done-bar i{ display:block; width:0; height:100%; border-radius:8px; background:linear-gradient(90deg, var(--gold), #7FAE91); transition:width 1.1s var(--ease); }
.ta-done.is-full .ta-done-bar i{ background:#4F8B69; }
.ta-done-hint{ margin:10px 0 0; font-size:12.5px; line-height:1.8; color:var(--ink-2); }

/* ---- what is public ---- */
.ta-pub{
  display:inline-flex; align-items:center; gap:4px; margin-inline-start:6px; padding:1px 8px;
  border-radius:99px; font-style:normal; font-size:11px; font-weight:600; color:#2F6B4F; background:var(--sage-soft);
  vertical-align:middle;
}
.ta-private{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.ta-private svg{ width:15px; height:15px; color:var(--ink-3); }
.ta-private .ta-pub{ margin:0; }
.ac-head p.ta-auto{ display:flex; align-items:flex-start; gap:8px; }
.ta-auto svg{ width:16px; height:16px; flex:none; margin-top:4px; color:var(--gold-deep); }

/* ---- the professional tab: form beside the public card ---- */
.ta-pubgrid{ display:grid; grid-template-columns:minmax(0, 1fr) 340px; gap:20px; align-items:start; }
.ta-pubcol{ display:grid; gap:20px; min-width:0; }
.ta-pubcol .db-fld textarea{ min-height:120px; }
.ta-count{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.ta-count-n{ flex:none; font-size:12px; font-weight:500; color:var(--ink-3); font-variant-numeric:tabular-nums; }
.ta-count-n.is-over{ color:var(--red); font-weight:700; }
.ta-langs{ margin-top:20px; padding-top:20px; border-top:1px solid var(--line); }
.ta-langs .ac-chip span{ height:38px; padding:0 14px; font-size:14px; }

.ta-preview{ position:sticky; top:20px; display:grid; gap:12px; }
.ta-preview-h{ display:flex; align-items:center; gap:8px; margin:0; font-size:13.5px; font-weight:600; color:var(--ink-2); }
.ta-preview-h svg{ width:17px; height:17px; color:var(--gold-deep); }
.ta-pcard{
  display:grid; gap:12px; padding:20px; border-radius:var(--r);
  background:var(--card); border:1px solid var(--line); box-shadow:var(--shadow);
}
.ta-pcard.is-in{ animation:ta-fade .35s var(--ease); }
@keyframes ta-fade{ from{ opacity:.55; } }
.ta-pcard-top{ display:flex; align-items:center; gap:12px; }
.ta-pcard-ava{ display:grid; place-items:center; width:58px; height:58px; flex:none; border-radius:50%; overflow:hidden; background:var(--gold-soft); box-shadow:0 0 0 3px var(--card), 0 0 0 4px var(--line-2); }
.ta-pcard-ava img{ width:100%; height:100%; object-fit:cover; }
.ta-pcard-ava b{ font-size:22px; }
.ta-pcard-name{ display:block; font-size:16.5px; font-weight:700; }
.ta-pcard-where{ display:flex; align-items:center; gap:5px; margin-top:3px; font-size:12.5px; color:var(--ink-2); }
.ta-pcard-where svg{ width:14px; height:14px; color:var(--ink-3); }
.ta-pcard-cert{ display:inline-flex; align-items:center; gap:6px; justify-self:start; padding:4px 10px; border-radius:99px; font-size:12px; font-weight:600; color:#2F6B4F; background:var(--sage-soft); }
.ta-pcard-cert svg{ width:14px; height:14px; }
.ta-pcard-bio{ margin:0; font-size:14px; line-height:1.95; color:var(--ink-2); overflow-wrap:anywhere; }
.ta-pcard-bio.is-empty{ color:var(--ink-3); font-style:italic; }
.ta-pcard-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.ta-pcard-chips span{ padding:4px 10px; border-radius:99px; font-size:12px; font-weight:500; background:var(--gold-soft); }
.ta-pcard-facts{ display:flex; flex-wrap:wrap; gap:6px 16px; margin:0; padding:12px 0 0; list-style:none; border-top:1px solid var(--line); font-size:12.5px; color:var(--ink-2); }
.ta-pcard-facts li{ display:inline-flex; align-items:center; gap:6px; }
.ta-pcard-facts svg{ width:15px; height:15px; color:var(--ink-3); }
.ta-preview-go{ justify-content:center; }

/* certificates */
.ta-drop{
  position:relative; display:grid; justify-items:center; gap:6px; padding:26px 16px;
  border:1.5px dashed rgba(176,143,62,.45); border-radius:18px; background:#FFFCF4;
  text-align:center; cursor:pointer; transition:background .2s, border-color .2s;
}
.ta-drop:hover, .ta-drop.is-over{ background:var(--gold-soft); border-color:var(--gold-deep); }
.ta-drop:focus-within{ outline:2px solid var(--gold); outline-offset:3px; }
.ta-drop input{ position:absolute; inset:0; opacity:0; cursor:pointer; }
.ta-drop-ico{ display:grid; place-items:center; width:44px; height:44px; border-radius:14px; background:var(--card); color:var(--gold-deep); box-shadow:inset 0 0 0 1px var(--line); }
.ta-drop-ico svg{ width:20px; height:20px; }
.ta-drop b{ font-size:14.5px; font-weight:600; }
.ta-drop u{ text-decoration-color:rgba(176,143,62,.6); text-underline-offset:3px; }
.ta-drop small{ font-size:12.5px; color:var(--ink-3); }
.ta-certs{ display:grid; gap:8px; margin:14px 0 0; padding:0; list-style:none; }
.ta-certs:empty{ display:none; }
.ta-certs li{ display:flex; align-items:center; gap:12px; padding:8px; border-radius:14px; border:1px solid var(--line); background:#fff; }
.ta-certs img{ width:64px; height:46px; flex:none; border-radius:9px; object-fit:cover; }
.ta-certs span{ flex:1; min-width:0; }
.ta-certs b{ display:block; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ta-certs small{ font-size:12px; color:var(--ink-3); }
.ta-review{ font-style:normal; color:var(--gold-deep); font-weight:600; }
.ta-certs .db-icon-btn{ width:38px; height:38px; border-radius:12px; }
.ta-certs .db-icon-btn svg{ width:16px; height:16px; }
.ta-certs .db-icon-btn:hover{ color:var(--red); }
[data-cert-msg]{ margin-top:10px; }

/* ---- teaching: read-only, from the content ---- */
.ta-teach{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:18px 28px; }
.ta-tgroup p{ margin:0 0 10px; font-size:13.5px; font-weight:600; color:var(--ink-2); }
.ta-tchips{ display:flex; flex-wrap:wrap; gap:6px; }
.ta-tchips span{ padding:7px 13px; border-radius:99px; font-size:13.5px; font-weight:500; color:var(--ink); background:var(--sage-soft); }
.ta-tedit{ display:inline-block; margin-top:10px; }
.ta-sums{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
.ta-sumtile{
  position:relative; display:grid; gap:2px; padding:16px; border-radius:18px;
  border:1px solid var(--line); background:#fff; transition:border-color .2s, transform .25s var(--ease);
}
.ta-sumtile:hover{ border-color:rgba(176,143,62,.5); transform:translateY(-2px); }
.ta-sumtile-ico{ display:grid; place-items:center; width:38px; height:38px; margin-bottom:8px; border-radius:12px; background:var(--gold-soft); color:var(--gold-deep); }
.ta-sumtile-ico svg{ width:18px; height:18px; }
.ta-sumtile b{ font-size:24px; font-weight:700; line-height:1.2; }
.ta-sumtile > span:not(.ta-sumtile-ico){ font-size:13px; color:var(--ink-2); }
.ta-sumtile i{ position:absolute; top:16px; left:16px; color:var(--ink-3); }
.ta-sumtile i svg{ width:16px; height:16px; }

/* ---- security ---- */
.ta-rows .ac-head{ margin-bottom:8px; }
.ta-row{ display:flex; align-items:center; gap:14px; padding:14px 0; border-top:1px solid var(--line); }
.ta-row > div{ flex:1; min-width:0; }
.ta-row b{ display:block; font-size:14.5px; }
.ta-row small{ font-size:13.5px; color:var(--ink-2); }
.ta-row-ico{ display:grid; place-items:center; width:40px; height:40px; flex:none; border-radius:12px; background:#F3EFE5; color:var(--ink-2); }
.ta-row-ico svg{ width:18px; height:18px; }
.ta-row-ico.is-ok{ background:var(--sage-soft); color:#2F6B4F; }
.ta-ok{ display:inline-flex; align-items:center; gap:7px; color:#2F6B4F !important; font-weight:600; }
.ta-ok::before{ content:""; width:7px; height:7px; border-radius:50%; background:#5E9C78; box-shadow:0 0 0 3px rgba(94,156,120,.18); }
.ta-row .db-link{ border:0; background:none; padding:0; font:inherit; font-size:13.5px; cursor:pointer; }

/* «إدارة الحساب»: apart, quiet, red only in outline */
.ta-danger{ margin-top:12px; padding:22px 24px; border-radius:var(--r); border:1px dashed rgba(181,82,63,.35); background:rgba(246,227,221,.25); }
.ta-danger .ac-head{ margin-bottom:6px; }
.ta-danger .ac-head h2{ font-size:16px; color:var(--red); }
.ta-danger-row{ display:flex; align-items:center; gap:16px; padding:14px 0; border-top:1px solid rgba(181,82,63,.15); }
.ta-danger-row > div{ flex:1; min-width:0; }
.ta-danger-row b{ display:block; font-size:14.5px; }
.ta-danger-row small{ font-size:13px; color:var(--ink-2); }
.ta-danger-btn{
  flex:none; height:40px; padding:0 16px; border-radius:12px; border:1px solid rgba(181,82,63,.45);
  background:transparent; font:inherit; font-size:13.5px; font-weight:600; color:var(--red); cursor:pointer;
  transition:background .2s, border-color .2s;
}
.ta-danger-btn:hover{ background:var(--red-soft); border-color:var(--red); }
.ta-danger-btn.is-solid{ flex:1.4; background:var(--red); border-color:var(--red); color:#fff; }
.ta-danger-btn.is-solid:hover{ background:#9E4534; }
.ta-danger-btn:disabled{ opacity:.45; cursor:not-allowed; }
.ta-confirm{ width:min(460px, calc(100vw - 32px)); }
.ta-confirm-ico{ display:grid; place-items:center; width:52px; height:52px; margin-bottom:12px; border-radius:16px; color:var(--red); background:var(--red-soft); }
.ta-confirm-ico svg{ width:22px; height:22px; }
.ta-confirm h2{ margin:0 0 8px !important; }
.ta-confirm-text{ margin:0 0 16px; font-size:14.5px; line-height:1.9; color:var(--ink-2); }
.ta-confirm .db-fld{ margin-bottom:4px; }
.ta-confirm .db-fld input{ width:100%; }

/* ---- Telegram ---- */
.ta-adv{ border-radius:14px; border:1px solid var(--line); background:#FCFAF4; }
.ta-adv summary{ display:flex; align-items:center; gap:8px; padding:12px 14px; font-size:13.5px; font-weight:600; color:var(--ink-2); cursor:pointer; list-style:none; }
.ta-adv summary::-webkit-details-marker{ display:none; }
.ta-adv summary::before{ content:""; width:7px; height:7px; border-inline-end:1.6px solid currentColor; border-bottom:1.6px solid currentColor; transform:rotate(-45deg); transition:transform .25s var(--ease); }
.ta-adv[open] summary::before{ transform:rotate(45deg); }
.ta-adv .db-fld{ padding:0 14px 14px; }
.ta-adv .db-fld input{ width:100%; }

/* ---- the bank, masked ---- */
.ta-bank{ display:flex; align-items:center; gap:14px; padding:16px; border-radius:18px; border:1px solid var(--line); background:#fff; }
.ta-bank > div{ flex:1; min-width:0; display:grid; gap:2px; }
.ta-bank b{ font-size:15px; }
.ta-bank small{ font-size:13.5px; color:var(--ink-2); }
.ta-bank-ico{ display:grid; place-items:center; width:44px; height:44px; flex:none; border-radius:14px; background:var(--gold-soft); color:var(--gold-deep); }
.ta-bank-ico svg{ width:20px; height:20px; }
.ta-bank-empty{ margin:0 0 14px; }
.ta-bank-form[hidden]{ display:none; }
.ta-bank-form .db-fld input{ width:100%; height:48px; }

@media (max-width:1240px){
  .ta-pubgrid{ grid-template-columns:minmax(0, 1fr) 300px; }
}
@media (max-width:1100px){
  .ta-sum{ flex-wrap:wrap; }
  .ta-done{ width:100%; }
  .ta-pubgrid{ grid-template-columns:minmax(0, 1fr); }
  .ta-preview{ position:static; order:-1; }
}
@media (max-width:640px){
  .ta-teach, .ta-sums{ grid-template-columns:minmax(0, 1fr); }
  .ta-danger{ padding:18px; }
  .ta-danger-row, .ta-bank{ flex-wrap:wrap; }
  .ta-danger-btn{ width:100%; }
  .ta-bank .db-btn{ width:100%; justify-content:center; }
  .ta-sum .ac-ava{ width:72px; height:72px; }
}
@media (prefers-reduced-motion:reduce){
  .ta-done-bar i, .ta-pcard.is-in, .ta-sumtile{ transition:none; animation:none; }
}

/* «لبيب AI» on a circle, curriculum or lecture page — the platform's entry into Labeeb */
.dh-acts{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.lb-btn svg{ color:#B07A2E; }
.lb-btn:hover{ border-color:rgba(176,122,46,.45); background:#FBF4E4; }
.lw-top-row .lb-btn{ flex:none; }


/* =========================================================
   PHONES — one rule for every card's actions: each button
   full width; two buttons share the row exactly half and half;
   three or more stack, each full width.
   ========================================================= */
@media (max-width:640px){
  .db :is(.tc-acts, .dh-acts, .dt-acts, .sn-acts, .py-acts, .ab-acts, .md-acts, .lbs-out-acts){
    display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr); gap:8px;
    width:100%; margin-inline:0; padding-inline:0;
  }
  .db :is(.tc-acts, .dh-acts, .dt-acts, .sn-acts, .py-acts, .ab-acts, .md-acts, .lbs-out-acts):has(> :nth-child(3)){ grid-auto-flow:row; }
  .db :is(.tc-acts, .dh-acts, .dt-acts, .sn-acts, .py-acts, .ab-acts, .md-acts, .lbs-out-acts) > :is(.db-btn, a, button){
    width:100%; min-width:0; margin:0; justify-content:center;
  }
  .db .fr-side .db-btn, .db .ex > .db-btn, .db .dh-next .db-btn{ width:100%; justify-content:center; }
  /* the action in a section header («اضف طلب غياب»…) drops under the title, full width */
  .db .db-card-head .db-btn, .db .db-block-head .db-btn{ flex:1 0 100%; width:100%; margin-inline:0 !important; justify-content:center; }
  .db .db-card-head > div:has(> .db-btn){ flex:1 0 100%; display:flex; flex-wrap:wrap; gap:8px; }

  /* a task card: icon + kind + title on top; meta, progress and the button full width */
  .tc{ grid-template-columns:44px minmax(0, 1fr); align-items:start; gap:6px 12px; }
  .tc-main{ display:contents; }
  .tc-ico{ grid-row:1 / span 2; align-self:start; }
  .tc-top{ grid-column:2; margin:0; flex-wrap:wrap; gap:6px 10px; }
  .tc-title{ grid-column:2; font-size:16px; }
  .tc-meta{ grid-column:1 / -1; margin-top:8px; }
  .tc-side{ grid-column:1 / -1; flex-direction:column; align-items:stretch; gap:12px; margin-top:6px; padding-top:12px; border-top:1px solid var(--line); }
  .db .tt-sub{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 6px; min-width:0; text-align:right; }
  .db .tt-sub .db-bar{ flex-basis:100%; margin-top:4px; }
  .tc-sub{ white-space:normal; }

  /* a session / recording row: date + title on top, the button full width under them */
  .ss{ display:grid; grid-template-columns:60px minmax(0, 1fr); align-items:center; gap:12px; }
  .db .ss-side{ grid-column:1 / -1; display:flex; align-items:center; gap:8px; width:100%; padding:0; }
  .db .ss-side > .db-btn{ flex:1; justify-content:center; }
  .db .ss-side > .db-chip{ flex:none; }
}

}

/* =========================================================
   Nuxt: the student home's composition (layout only — no card
   changes). One 12-column grid: the three top cards share a row
   height; the four figures are equal; «جدول هذا الأسبوع» spans the
   two rows of «مهام تحتاج انتباهك» + «تنبيهات مهمة», so nothing
   leaves a blank area; the learning sections follow at once.
   ========================================================= */
@layer legacy {
.db-grid.db-home{
  grid-template-columns:repeat(12, minmax(0, 1fr));
  gap:24px;
  align-items:stretch;               /* cards fill their row: coordinated heights */
}
.db-home > *{ grid-row:auto !important; }
.db-home > .db-next{ grid-column:span 5 !important; }
.db-home > .db-cont{ grid-column:span 4 !important; }
/* no course to continue: the next card takes the room the continue card left */
.db-home > .db-next:has(+ .db-stats){ grid-column:span 12 !important; }
.db-home > .db-prog{ grid-column:span 3 !important; }
.db-home > .db-stats{ grid-column:span 12 !important; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:24px; }
.db-home > .db-sched{ grid-column:span 8 !important; grid-row:span 2 !important; }
.db-home > .db-tasks,
.db-home > .db-alerts{ grid-column:span 4 !important; }
.db-home > .db-block{ grid-column:span 12 !important; }

/* the week fills the height it spans (no blank under it) */
.db-home > .db-sched{ display:flex; flex-direction:column; }
.db-home > .db-sched > [data-slot="sched"]{ flex:1; display:flex; flex-direction:column; }
.db-home > .db-sched .wk{ flex:1; }

/* the learning sections: 60px after the operational area, 56px between them (24px gap included) */
.db-home > .db-circles{ margin-top:36px; }
.db-home > .db-curr, .db-home > .db-lect{ margin-top:32px; }

/* tablet (the sidebar is a drawer): the top cards wrap in two columns,
   the week takes the full width, then tasks + notifications side by side */
@media (max-width:1100px){
  .db-home > .db-next{ grid-column:span 12 !important; }
  .db-home > .db-cont, .db-home > .db-prog{ grid-column:span 6 !important; }
  .db-home > .db-sched{ grid-column:span 12 !important; grid-row:auto !important; }
  .db-home > .db-tasks, .db-home > .db-alerts{ grid-column:span 6 !important; }
}
@media (max-width:860px){
  .db-grid.db-home{ gap:16px; }
  .db-home > .db-stats{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px; }
  .db-home > .db-circles{ margin-top:24px; }
  .db-home > .db-curr, .db-home > .db-lect{ margin-top:16px; }
}

/* phone: one column, in reading order; no desktop spans */
@media (max-width:640px){
  .db-grid.db-home{ grid-template-columns:minmax(0, 1fr); gap:14px; }
  .db-grid.db-home > *{ grid-column:auto !important; grid-row:auto !important; }
  .db-home > .db-next{ order:1; }  .db-home > .db-cont{ order:2; }   .db-home > .db-prog{ order:3; }
  .db-home > .db-stats{ order:4; gap:12px; }
  .db-home > .db-tasks{ order:5; } .db-home > .db-sched{ order:6; }  .db-home > .db-alerts{ order:7; }
  .db-home > .db-circles{ order:8; margin-top:20px; } .db-home > .db-curr{ order:9; } .db-home > .db-lect{ order:10; }
}
}

/* Labib lesson drawer, teleported outside the workspace layout. */
body.lw-labib-open {
  overflow: hidden;
}
.lw-labib-entry {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 18px;
  color: var(--ink-2);
  font-size: 13px;
}
.lw-labib-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: var(--card);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.lw-labib-trigger img {
  width: 26px;
  height: 26px;
}
.lw-labib-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(18, 60, 53, .42);
}
.lw-labib-drawer {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  width: min(560px, 100vw);
  height: 100dvh;
  background: var(--card, #fffdf8);
  color: var(--ink, #123c35);
  box-shadow: var(--shadow);
}
.lw-labib-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-block-end: 1px solid var(--line);
}
.lw-labib-header > div {
  flex: 1;
  min-width: 0;
}
.lw-labib-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 5px;
}
.lw-labib-header p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.lw-labib-header a {
  font-size: 12px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  flex-shrink: 0;
}
.lw-labib-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 24px;
  cursor: pointer;
  flex-shrink: 0;
}
.lw-labib-frame {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
  border: 0;
}
.lw-labib-trigger:focus-visible,
.lw-labib-drawer :is(button, a):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.lw-labib-focus-guard {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
