/* BestCours Dashboard Skin 1.1.0
 * One visual system for the portal (/compte/), the 1BAC app and the 2BAC app.
 * Visual only: no layout logic or behaviour of the apps is changed.
 * Selectors are prefixed with "html body" so they win over the apps' inline CSS
 * without needing !important, except where the theme's full-width fix uses it.
 */

:root {
  --bcs-green: #0b6b4f;
  --bcs-green-600: #095c44;
  --bcs-green-50: #eaf6f0;
  --bcs-lime: #d9f36a;
  --bcs-ink: #13241e;
  --bcs-muted: #61746c;
  --bcs-line: #dde6e1;
  --bcs-surface: #ffffff;
  --bcs-bg: #f3f6f4;
  --bcs-radius: 18px;
  --bcs-radius-sm: 12px;
  --bcs-shadow: 0 1px 2px rgba(19, 36, 30, .04), 0 8px 24px rgba(19, 36, 30, .06);
  --bcs-shadow-hover: 0 2px 4px rgba(19, 36, 30, .05), 0 16px 36px rgba(19, 36, 30, .10);
  --bcs-ring: 0 0 0 3px rgba(11, 107, 79, .22);
  --bcs-font: "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --bcs-content: 1180px;
}

/* ---------- 1. Page canvas: same background and type everywhere ---------- */
html body .bcportal-root,
html body .bcapp-root,
html body .bc2app-root {
  background:
    radial-gradient(1200px 380px at 85% -120px, rgba(11, 107, 79, .09), transparent 70%),
    var(--bcs-bg);
  color: var(--bcs-ink);
  font-family: var(--bcs-font);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 2. Restore spacing the theme's full-width fix removes ----------
 * "body main>*{padding:0!important;margin:0!important;width:100%!important}"
 * also hits the portal's own <main> and its cards, gluing them to the screen
 * edge. Re-apply the intended container and card padding. */
html body #bestcours-portal > main {
  width: min(var(--bcs-content), calc(100% - 40px)) !important;
  margin: 0 auto !important;
  padding: clamp(24px, 4vw, 48px) 0 96px !important;
}
html body #bestcours-portal > main > section {
  width: auto !important;
}
html body #bestcours-portal > main > .bcp-welcome {
  padding: clamp(24px, 4vw, 44px) !important;
}
html body #bestcours-portal > main > .bcp-create {
  padding: 18px !important;
  margin: 24px 0 !important;
}
html body #bestcours-portal > main > .bcp-heading {
  padding: 0 !important;
  margin: 0 !important;
}
html body #bestcours-portal > main > .bcp-report {
  margin-top: 28px !important;
  padding: clamp(18px, 3vw, 30px) !important;
}
html body #bestcours-portal > main > .bcp-join {
  margin: 4vh auto !important;
  padding: clamp(24px, 5vw, 48px) !important;
  max-width: 980px !important;
}

/* ---------- 3. Top bar ---------- */
html body .bcp-top,
html body .bcapp-root .bc-top,
html body .bc2app-root .bc-top {
  min-height: 68px;
  height: auto;
  padding: 10px max(20px, calc((100% - var(--bcs-content)) / 2));
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--bcs-line);
  position: sticky;
  top: 0;
  z-index: 30;
}
html body .bcp-top > a > b,
html body .bc-top > a > b {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #0e7a5b, #08533d);
  color: var(--bcs-lime);
  font-size: 17px;
  box-shadow: 0 4px 12px rgba(11, 107, 79, .25);
}
html body .bcp-top strong,
html body .bc-top > a strong {
  font-size: 19px;
  letter-spacing: -.2px;
}
html body .bc-main-nav {
  background: var(--bcs-bg);
  border-color: var(--bcs-line);
  border-radius: 12px;
  padding: 4px;
}
html body .bc-main-nav button {
  padding: 8px 14px;
  border-radius: 9px;
  font-weight: 600;
  color: var(--bcs-muted);
  transition: background .15s, color .15s;
}
html body .bc-main-nav button:hover,
html body .bc-main-nav button.active,
html body .bc-main-nav button[aria-current] {
  background: var(--bcs-surface);
  color: var(--bcs-green);
  box-shadow: 0 1px 3px rgba(19, 36, 30, .08);
}
html body .bcp-user button,
html body .bc-top > button {
  border: 1px solid var(--bcs-line);
  background: var(--bcs-surface);
  color: var(--bcs-ink);
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
html body .bcp-user button:hover,
html body .bc-top > button:hover {
  border-color: #e3b4b4;
  color: #a12f2f;
}
html body .bcp-user > span {
  color: var(--bcs-muted);
  font-weight: 600;
}

/* ---------- 4. Content width ---------- */
html body .bcapp-root .bc-content,
html body .bc2app-root .bc-content {
  width: min(var(--bcs-content), calc(100% - 40px));
  padding: clamp(24px, 4vw, 44px) 0 110px;
}

/* ---------- 5. Page headings ---------- */
html body .bcp-heading small,
html body .bcp-welcome > small,
html body .bc-heading small {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bcs-green-50);
  color: var(--bcs-green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}
html body .bcp-heading h1,
html body .bcp-welcome h1,
html body .bc-heading h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
  margin: 12px 0 6px;
  letter-spacing: -.3px;
  color: var(--bcs-ink);
}
html body .bcp-heading p,
html body .bcp-welcome > p,
html body .bc-heading p {
  color: var(--bcs-muted);
  font-size: 15px;
  margin: 0;
}

/* ---------- 6. Cards and panels ---------- */
html body .bcp-welcome,
html body .bcp-create,
html body .bcp-grid article,
html body .bcp-join,
html body .bcp-report,
html body .bcp-hero form,
html body .bc-create,
html body .bc-progress,
html body .bc-lessons,
html body .bc-table,
html body .bc-flow,
html body .bc-join,
html body .bc-result,
html body .bc-settings > form,
html body .bc-settings > .bc-join {
  background: var(--bcs-surface);
  border: 1px solid var(--bcs-line);
  border-radius: var(--bcs-radius);
  box-shadow: var(--bcs-shadow);
}
html body .bc-progress,
html body .bc-lessons,
html body .bc-table {
  padding: clamp(18px, 2.4vw, 26px);
}
html body .bc-progress > h2,
html body .bc-lessons > header h2 {
  font-size: 20px;
  margin: 0 0 16px;
}

/* ---------- 7. KPI tiles ---------- */
html body .bc-stats > div,
html body .bcp-kpis > div {
  position: relative;
  overflow: hidden;
  background: var(--bcs-surface);
  border: 1px solid var(--bcs-line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--bcs-shadow);
}
html body .bc-stats > div::before,
html body .bcp-kpis > div::before {
  content: "";
  position: absolute;
  inset-block: 14px;
  inset-inline-start: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--bcs-green);
}
html body .bc-stats > div:nth-child(2)::before,
html body .bcp-kpis > div:nth-child(2)::before { background: #2385a8; }
html body .bc-stats > div:nth-child(3)::before,
html body .bcp-kpis > div:nth-child(3)::before { background: #d18a2b; }
html body .bc-stats > div:nth-child(4)::before,
html body .bcp-kpis > div:nth-child(4)::before { background: #7a5bb0; }
html body .bc-stats small,
html body .bcp-kpis small {
  font-size: 13px;
  font-weight: 600;
  color: var(--bcs-muted);
}
html body .bc-stats b,
html body .bcp-kpis b {
  font-size: 30px;
  font-weight: 800;
  margin-top: 6px;
  color: var(--bcs-ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- 8. Subject and level cards ---------- */
html body .bc-subjects button,
html body .bcp-current {
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(19, 36, 30, .14);
  transition: transform .2s ease, box-shadow .2s ease;
}
html body .bc-subjects button:hover,
html body .bcp-current:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(19, 36, 30, .18);
}
html body .bc-subjects b {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .25);
  font-size: 14px;
}
/* The portal's own ".\32bac" selector is a malformed CSS escape, so 2BAC
 * cards always fell back to the 1BAC blue. Match the class by attribute. */
html body .bcp-current[class~="2bac"] {
  background: linear-gradient(135deg, #704315, #d18a2b);
}
html body .bcp-badge[class~="2bac"] {
  background: linear-gradient(145deg, #7c4c18, #d69131);
}
html body .bcp-current a {
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

/* ---------- 9. Progress by lesson ---------- */
html body .bc-progress article {
  border-radius: 14px;
  padding: 16px;
  background: #fbfcfb;
  transition: border-color .15s;
}
html body .bc-progress article:hover { border-color: #b9d6c8; }
html body .bc-progress i {
  height: 8px;
  background: #e7eeea;
}
html body .bc-progress em {
  background: linear-gradient(90deg, #0e8a66, var(--bcs-green));
}
html body .bc-progress strong { font-size: 13px; }
html body .bc-progress span { font-size: 11px; }

/* ---------- 10. Learning-path strip ---------- */
html body .bc-flow { padding: 20px; gap: 18px; }
html body .bc-flow > div > b {
  width: 36px;
  height: 36px;
  background: var(--bcs-green-50);
  color: var(--bcs-green);
  border: 2px solid var(--bcs-green);
  font-weight: 800;
}
html body .bc-flow small { font-size: 12px; }
html body .bc-flow > i { opacity: .5; }

/* ---------- 11. Class cards (teacher) ---------- */
html body .bcp-grid { gap: 16px; }
html body .bcp-grid article {
  padding: 20px;
  transition: box-shadow .2s, border-color .2s;
}
html body .bcp-grid article:hover {
  box-shadow: var(--bcs-shadow-hover);
  border-color: #c9ddd3;
}
html body .bcp-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}
html body .bc-class-grid { gap: 14px; }
html body .bc-class-grid article {
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--bcs-shadow);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
html body .bc-class-grid article:hover {
  box-shadow: var(--bcs-shadow-hover);
  border-color: #c9ddd3;
  transform: translateY(-2px);
}
html body .bc-class-grid article > span {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-weight: 800;
}
/* The ✎ / × buttons were ~18px and side by side: easy to hit "delete" by mistake. */
html body .bc-class-grid aside { gap: 6px; }
html body .bc-class-grid aside button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bcs-line);
  background: var(--bcs-surface);
  color: var(--bcs-muted);
  font-size: 15px;
  cursor: pointer;
}
html body .bc-class-grid aside button:hover { background: var(--bcs-green-50); color: var(--bcs-green); }
html body .bc-class-grid aside button[data-delete] { margin-inline-start: 6px; }
html body .bc-class-grid aside button[data-delete]:hover {
  background: #fdeeee;
  border-color: #e9b9b9;
  color: #a12f2f;
}
/* Portal class cards: "حذف" sat between "تعديل" and "لائحة التلاميذ".
 * Move it to the end of the row, pushed away from the other actions. */
html body .bcp-actions .danger {
  order: 99;
  margin-inline-start: auto;
}
html body .bcp-actions .danger:hover { background: #fdeeee; border-color: #e9b9b9; }

/* "Click a class to see its results" placeholder under the class list */
html body .bcapp-root .bc-content > section:not([class]):not(:has(*)),
html body .bc2app-root .bc-content > section:not([class]):not(:has(*)) {
  padding: 28px 20px;
  border: 1.5px dashed #c8d8cf;
  border-radius: var(--bcs-radius);
  background: rgba(255, 255, 255, .6);
  color: var(--bcs-muted);
  text-align: center;
}

/* Score colours, set by skin.js on result cells */
html body [data-bcs-score] { font-weight: 800; }
html body [data-bcs-score="high"] { color: #0f7a4f; }
html body [data-bcs-score="mid"]  { color: #a8660f; }
html body [data-bcs-score="low"]  { color: #b3261e; }

html body .bcp-actions a,
html body .bcp-actions button,
html body .bc-class-grid aside button {
  border-radius: 9px;
  font-weight: 600;
  transition: background .15s, border-color .15s;
}
html body .bcp-actions a:hover,
html body .bcp-actions button:hover {
  background: var(--bcs-green-50);
  border-color: #bcd9cb;
}

/* ---------- 12. Forms ---------- */
html body .bcp-create input,
html body .bcp-create select,
html body .bc-create input,
html body .bcp-join input,
html body .bc-join input,
html body .bc-settings input {
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--bcs-line);
  border-radius: var(--bcs-radius-sm);
  background: #fbfcfb;
  color: var(--bcs-ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
html body .bcp-create input:focus,
html body .bcp-create select:focus,
html body .bc-create input:focus,
html body .bcp-join input:focus,
html body .bc-join input:focus,
html body .bc-settings input:focus {
  outline: none;
  border-color: var(--bcs-green);
  background: #fff;
  box-shadow: var(--bcs-ring);
}
html body .bcp-create form,
html body .bc-create form { gap: 10px; align-items: stretch; }
html body .bcp-primary,
html body .bc-primary {
  min-height: 46px;
  border-radius: var(--bcs-radius-sm) !important;
  background: var(--bcs-green) !important;
  box-shadow: 0 4px 12px rgba(11, 107, 79, .22);
  transition: background .15s, transform .1s, box-shadow .15s;
  cursor: pointer;
}
html body .bcp-primary:hover,
html body .bc-primary:hover {
  background: var(--bcs-green-600) !important;
  box-shadow: 0 6px 16px rgba(11, 107, 79, .28);
}
html body .bcp-primary:active,
html body .bc-primary:active { transform: translateY(1px); }

/* ---------- 13. Empty states ---------- */
html body .bcp-empty,
html body .bc-empty {
  padding: 48px 24px;
  border: 1.5px dashed #c8d8cf;
  border-radius: var(--bcs-radius);
  background: rgba(255, 255, 255, .7);
  color: var(--bcs-muted);
  text-align: center;
}
html body .bcp-empty::before,
html body .bc-empty::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--bcs-green-50);
  color: var(--bcs-green);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}
html body .bcp-empty b {
  font-size: 17px;
  color: var(--bcs-ink);
}

/* ---------- 14. Tables in teacher reports ---------- */
html body .bcp-report-table,
html body .bcp-attempts,
html body .bc-table {
  border-radius: 14px;
}
html body .bcp-report-table .head,
html body .bcp-attempts .head,
html body .bc-table .head {
  background: #f1f6f3;
  color: var(--bcs-muted);
  font-size: 13px;
}
html body .bcp-report-table > button:hover { background: var(--bcs-green-50); }

/* ---------- 15. Floating tools: one tidy dock ----------
 * Five plugins each place their own button at a different corner/offset with
 * different sizes and colours. Align them into two neat columns with one style. */
html body .bcroster-launch,
html body .bcatt-launch,
html body .bcwheel-launch,
html body .bcam-button,
html body .bcchat-launch {
  height: 44px;
  min-width: 150px;
  justify-content: center;
  text-align: center;
  padding: 0 16px !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 12px !important;
  font: 700 14px/44px var(--bcs-font) !important;
  box-shadow: 0 6px 18px rgba(19, 36, 30, .18) !important;
  transition: transform .15s, box-shadow .15s;
}
html body .bcroster-launch:hover,
html body .bcatt-launch:hover,
html body .bcwheel-launch:hover,
html body .bcam-button:hover,
html body .bcchat-launch:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(19, 36, 30, .24) !important;
}
/* One column on the left. In RTL the right side holds student names and
 * headings, so buttons there covered the most important column of tables.
 * Bottom up: chat, roster, lesson visibility, attendance, wheel. */
html body .bcchat-launch,
html body .bcroster-launch,
html body .bcam-button,
html body .bcatt-launch,
html body .bcwheel-launch { right: auto !important; left: 20px !important; }
html body .bcchat-launch   { bottom: 20px !important; }
html body .bcroster-launch { bottom: 72px !important; }
html body .bcam-button     { bottom: 124px !important; }
html body .bcatt-launch    { bottom: 176px !important; }
html body .bcwheel-launch  { bottom: 228px !important; }
/* One palette: primary green for the main tools, neutrals for the others */
html body .bcroster-launch { background: var(--bcs-green) !important; }
html body .bcam-button     { background: var(--bcs-green) !important; }
html body .bcatt-launch    { background: #1f3b33 !important; }
html body .bcwheel-launch  { background: #1f3b33 !important; }
html body .bcchat-launch   { background: #123f62 !important; }

/* ---------- 16. Keyboard focus ---------- */
html body .bcportal-root :focus-visible,
html body .bcapp-root :focus-visible,
html body .bc2app-root :focus-visible,
html body .bcroster-launch:focus-visible,
html body .bcatt-launch:focus-visible,
html body .bcwheel-launch:focus-visible,
html body .bcam-button:focus-visible,
html body .bcchat-launch:focus-visible {
  outline: 3px solid rgba(11, 107, 79, .45);
  outline-offset: 2px;
}

/* ---------- 17. Mobile ---------- */
@media (max-width: 850px) {
  html body .bcp-top,
  html body .bcapp-root .bc-top,
  html body .bc2app-root .bc-top { padding-inline: 16px; }
}
@media (max-width: 600px) {
  html body #bestcours-portal > main,
  html body .bcapp-root .bc-content,
  html body .bc2app-root .bc-content { width: calc(100% - 32px) !important; }
  html body #bestcours-portal > main > .bcp-welcome { padding: 22px 18px !important; }
  html body .bc-stats b,
  html body .bcp-kpis b { font-size: 24px; }
  html body .bcroster-launch,
  html body .bcatt-launch,
  html body .bcwheel-launch,
  html body .bcam-button,
  html body .bcchat-launch {
    height: 40px;
    min-width: 0;
    padding: 0 12px !important;
    font-size: 13px !important;
    line-height: 40px !important;
  }
  html body .bcchat-launch,
  html body .bcroster-launch,
  html body .bcam-button,
  html body .bcatt-launch,
  html body .bcwheel-launch { left: 12px !important; }
  html body .bcchat-launch   { bottom: 12px !important; }
  html body .bcroster-launch { bottom: 58px !important; }
  html body .bcam-button     { bottom: 104px !important; }
  html body .bcatt-launch    { bottom: 150px !important; }
  html body .bcwheel-launch  { bottom: 196px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html body .bcportal-root *,
  html body .bcapp-root *,
  html body .bc2app-root * { transition: none !important; }
  html body .bc-subjects button:hover,
  html body .bcp-current:hover,
  html body .bc-class-grid article:hover { transform: none; }
}

@media print {
  html body .bcroster-launch,
  html body .bcatt-launch,
  html body .bcwheel-launch,
  html body .bcam-button,
  html body .bcchat-launch { display: none !important; }
}

/* =====================================================================
 * 1.1.0 — Teacher dashboard: tools toolbar, class report, phone layout
 * ===================================================================== */

/* ---------- Tools toolbar (replaces the floating buttons on teacher pages) */
html body.bcs-docked .bcroster-launch,
html body.bcs-docked .bcatt-launch,
html body.bcs-docked .bcwheel-launch,
html body.bcs-docked .bcam-button,
html body.bcs-docked .bcchat-launch { display: none !important; }

html body .bcs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 6px;
  padding: 8px;
  background: var(--bcs-surface);
  border: 1px solid var(--bcs-line);
  border-radius: 16px;
  box-shadow: var(--bcs-shadow);
}
html body .bcs-toolbar[hidden] { display: none; }
html body .bcs-tool {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--bcs-line);
  border-radius: 11px;
  background: #fbfcfb;
  color: var(--bcs-ink);
  font: 600 14px/1 var(--bcs-font);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
html body .bcs-tool i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-style: normal;
  font-size: 14px;
  background: var(--bcs-green-50);
  color: var(--bcs-green);
}
html body .bcs-tool:hover { background: var(--bcs-green-50); border-color: #bcd9cb; color: var(--bcs-green); }
html body .bcs-tool-attendance i { background: #fff3db; color: #8a5a00; }
html body .bcs-tool-wheel i { background: #e7f0f8; color: #1d5b85; }
html body .bcs-tool-lessons i { background: #efe9f8; color: #5b3f8c; }
html body .bcs-tool-chat { margin-inline-start: auto; }
html body .bcs-tool-chat i { background: #e3edf6; color: #123f62; }
html body .bcs-tool b {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d23b3b;
  color: #fff;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
}
html body .bcs-tool b[hidden] { display: none; }

/* ---------- Class report */
html body .bcs-hide { display: none !important; }
html body .bcs-report {
  margin: 22px 0 14px;
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--bcs-surface);
  border: 1px solid var(--bcs-line);
  border-radius: var(--bcs-radius);
  box-shadow: var(--bcs-shadow);
}
html body .bcs-report-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
html body .bcs-report-head small {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bcs-green-50);
  color: var(--bcs-green);
  font-size: 12px;
  font-weight: 700;
}
html body .bcs-report-head h2 { margin: 8px 0 2px; font-size: 22px; }
html body .bcs-report-head p { margin: 0; color: var(--bcs-muted); font-size: 13px; }
html body .bcs-report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
html body .bcs-report-actions button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid var(--bcs-line);
  background: #fff;
  color: var(--bcs-green);
  font: 700 14px/1 var(--bcs-font);
  cursor: pointer;
}
html body .bcs-report-actions button[data-bcs-print] { background: var(--bcs-green); border-color: var(--bcs-green); color: #fff; }
html body .bcs-report-actions button:hover { filter: brightness(.96); }

html body .bcs-insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 10px;
}
html body .bcs-insights > div {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f6f9f7;
  border: 1px solid #e6eee9;
}
html body .bcs-insights span { display: block; color: var(--bcs-muted); font-size: 13px; font-weight: 600; }
html body .bcs-insights b { display: block; margin-top: 4px; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
html body .bcs-insights .bcs-warn { background: #fff4f4; border-color: #f3d2d2; }
html body .bcs-insights .bcs-warn b { color: #b3261e; }
html body .bcs-note { margin: 0 0 12px; color: var(--bcs-muted); font-size: 14px; }
html body .bcs-note b { color: var(--bcs-ink); }

html body .bcs-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 6px 0 14px;
  border-radius: 12px;
  background: var(--bcs-bg);
  border: 1px solid var(--bcs-line);
}
html body .bcs-tabs button {
  padding: 9px 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--bcs-muted);
  font: 700 14px/1 var(--bcs-font);
  cursor: pointer;
}
html body .bcs-tabs button.active { background: #fff; color: var(--bcs-green); box-shadow: 0 1px 3px rgba(19,36,30,.1); }

html body .bcs-table { border: 1px solid var(--bcs-line); border-radius: 14px; overflow: hidden; }
html body .bcs-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.6fr) minmax(150px, 1.3fr) repeat(3, minmax(70px, .6fr)) minmax(120px, .9fr);
  gap: 10px;
  align-items: center;
  padding: 11px 14px;
  border-top: 1px solid #edf2ef;
  font-size: 14px;
}
html body .bcs-lessons-sum .bcs-row { grid-template-columns: minmax(220px, 2fr) minmax(160px, 1.3fr) repeat(2, minmax(80px, .6fr)); }
html body .bcs-row.bcs-head { border-top: 0; background: #f1f6f3; color: var(--bcs-muted); font-weight: 700; font-size: 13px; }
html body .bcs-row.bcs-flag { background: #fffafa; }
html body .bcs-row b { font-weight: 700; }
html body .bcs-row small {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fdeeee;
  color: #b3261e;
  font-size: 11px;
  font-weight: 700;
}
html body .bcs-pct { display: inline-block; min-width: 44px; font-weight: 800; }
html body .bcs-bar {
  display: inline-block;
  vertical-align: middle;
  width: calc(100% - 54px);
  max-width: 140px;
  height: 7px;
  margin-inline-start: 6px;
  border-radius: 99px;
  background: #e8eeea;
  overflow: hidden;
}
html body .bcs-bar em { display: block; height: 100%; border-radius: 99px; background: var(--bcs-green); }
html body .bcs-bar em[data-bcs-score="mid"] { background: #d18a2b; }
html body .bcs-bar em[data-bcs-score="low"] { background: #c8423a; }
html body .bcs-insights b[data-bcs-score="high"] { color: #0f7a4f; }
html body .bcs-insights b[data-bcs-score="mid"] { color: #a8660f; }
html body .bcs-insights b[data-bcs-score="low"] { color: #b3261e; }

/* ---------- Phones: rows become cards */
@media (max-width: 760px) {
  html body .bcs-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body .bcs-tool-chat { margin-inline-start: 0; }
  html body .bcs-tool { flex: 1 1 calc(50% - 8px); justify-content: flex-start; }
  html body .bcs-tabs { display: flex; width: 100%; }
  html body .bcs-tabs button { flex: 1; padding: 10px 6px; }
  html body .bcs-table { border: 0; overflow: visible; }
  html body .bcs-row.bcs-head { display: none; }
  html body .bcs-row,
  html body .bcs-lessons-sum .bcs-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--bcs-line);
    border-radius: 14px;
    background: #fff;
  }
  html body .bcs-row > span:first-child { grid-column: 1 / -1; font-size: 15px; }
  html body .bcs-row > span:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    color: var(--bcs-muted);
    font-size: 11px;
    font-weight: 600;
  }
  /* The apps' own attempts table */
  html body .bc-table { overflow: visible !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  html body .bc-table > div.head { display: none !important; }
  html body .bc-table > div:not(.head) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    min-width: 0 !important;
    gap: 6px 12px !important;
    margin-bottom: 10px;
    padding: 12px 14px !important;
    border: 1px solid var(--bcs-line) !important;
    border-radius: 14px;
    background: #fff;
    font-size: 14px !important;
  }
  html body .bc-table > div:not(.head) > span:nth-child(2) { grid-column: 1 / -1; }
  html body .bc-table > div:not(.head) > span[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--bcs-muted);
    font-size: 11px;
    font-weight: 600;
  }
}
