/*
 * Modern theme.
 *
 * Part 1 - the "modern" colour of the settings panel (top bar, logo header, sidebar, background), painted like the built-in colours:
 *          only colours, no size or position changes, so every menu, button, list box and the AI Tutor pages keep their layout.
 * Part 2 - the dashboard skin (.l4d). It is scoped to the four dashboards, so no other page is restyled.
 *
 * Nothing here changes markup or behaviour. Removing this file (and the link in index.html) restores the previous look.
 */

/* ---------------------------------------------------------------- Part 1: colour "modern" */
.main-header .logo-header[data-background-color="modern"],
.sidebar[data-background-color="modern"] { background: linear-gradient(180deg, #0c2a66, #081a42) !important; }
.main-header .logo-header[data-background-color="modern"]:after { background: transparent !important; }
.sidebar[data-background-color="modern"] .sidebar-background:after { background: #0c2a66; opacity: .0; }

/* Light top bar (same text colours as the built-in "white" top bar) */
.main-header .navbar-header[data-background-color="modern"] {
    background: rgba(255, 255, 255, .96) !important;
    border-bottom: 1px solid #e1e8f4 !important;
}
.main-header .navbar-header[data-background-color="modern"] .btn-minimize,
.main-header .navbar-header[data-background-color="modern"] .nav-search .input-group,
.main-header .navbar-header[data-background-color="modern"] .navbar-nav .nav-item .nav-link:hover,
.main-header .navbar-header[data-background-color="modern"] .navbar-nav .nav-item .nav-link:focus,
.main-header .navbar-header[data-background-color="modern"] .navbar-nav .nav-item.active .nav-link { background: rgba(31, 107, 255, .08) !important; }
.main-header .navbar-header[data-background-color="modern"] .btn-minimize,
.main-header .navbar-header[data-background-color="modern"] .nav-search .input-group .form-control,
.main-header .navbar-header[data-background-color="modern"] .nav-search .search-icon,
.main-header .navbar-header[data-background-color="modern"] .navbar-nav .nav-item .nav-link { color: #1f2a44 !important; }

/* Sidebar accents: active entry in the brand colour (colours only) */
.sidebar[data-background-color="modern"] .nav > .nav-item.active > a,
.sidebar[data-background-color="modern"] .nav-collapse li.active > a { background: rgba(31, 107, 255, .35) !important; }
.sidebar[data-background-color="modern"] .nav > .nav-item a:hover,
.sidebar[data-background-color="modern"] .nav > .nav-item a:focus { background: rgba(255, 255, 255, .08) !important; }

/* ---------------------------------------------------------------- Part 2: dashboard skin */
.l4d {
    --l4d-brand: #1f6bff; --l4d-brand-2: #14b8c9; --l4d-text: #11203f; --l4d-muted: #667593;
    --l4d-surface: #ffffff; --l4d-soft: #f5f8fd; --l4d-border: #e1e8f4;
    --l4d-ok: #13a869; --l4d-warn: #f19a2b; --l4d-bad: #e0475b; --l4d-violet: #7a5cff;
    --l4d-shadow: 0 1px 2px rgba(16, 32, 80, .05), 0 10px 28px rgba(16, 32, 80, .07);
    --l4d-r: 16px;
    color: var(--l4d-text);
}
.l4d .page-title { font-weight: 800; letter-spacing: -.01em; }

/* cards */
.l4d .card { border: 1px solid var(--l4d-border); border-radius: var(--l4d-r); box-shadow: var(--l4d-shadow); background: var(--l4d-surface); }
.l4d .card-round { border-radius: var(--l4d-r); }
.l4d .card-header { background: transparent; border-bottom: 1px solid var(--l4d-border); border-radius: var(--l4d-r) var(--l4d-r) 0 0; }
.l4d .card-title { font-weight: 700; letter-spacing: -.005em; }
.l4d .card.bg-light, .l4d .bg-light { background: var(--l4d-soft) !important; }
.l4d .border { border-color: var(--l4d-border) !important; border-radius: 12px; }

/* progress bars */
.l4d .progress { height: 8px; border-radius: 99px; background: #eaf0fa; overflow: hidden; }
.l4d .progress-bar { border-radius: 99px; }
.l4d .progress-bar.bg-info { background: linear-gradient(90deg, var(--l4d-brand), var(--l4d-brand-2)) !important; }
.l4d .progress-bar.bg-primary { background: var(--l4d-brand) !important; }

/* buttons, badges, alerts */
.l4d .btn { border-radius: 12px; font-weight: 600; }
.l4d .btn-primary { background: var(--l4d-brand); border-color: var(--l4d-brand); box-shadow: 0 8px 18px rgba(31, 107, 255, .28); }
.l4d .btn-primary:hover, .l4d .btn-primary:focus { background: #1a5cdd; border-color: #1a5cdd; }
.l4d .badge { border-radius: 99px; padding: .32em .7em; font-weight: 600; }
.l4d .badge-light { background: var(--l4d-soft); border: 1px solid var(--l4d-border); color: var(--l4d-text); }
.l4d .alert { border-radius: 14px; border-width: 1px; }
.l4d .alert-danger { background: #fdecef; border-color: #f6c2ca; color: #8c1f33; }
.l4d .alert-warning { background: #fff4de; border-color: #f6d99e; color: #7a4b00; }
.l4d .alert-success { background: #e4f6ec; border-color: #b6e4cb; color: #0b5a39; }

/* statistic cards (teacher): icon in a coloured tile */
.l4d .card-stats .icon-big { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff !important; font-size: 22px; line-height: 1; }
.l4d .card-stats .icon-big i { font-size: inherit; color: inherit; }
.l4d .card-stats .icon-big.text-warning { background: var(--l4d-warn); }
.l4d .card-stats .icon-big.text-primary { background: var(--l4d-brand); }
.l4d .card-stats .icon-big.text-success { background: var(--l4d-ok); }
.l4d .card-stats .icon-big.text-danger { background: var(--l4d-bad); }
.l4d .card-stats .icon-big.text-info { background: var(--l4d-brand-2); }
.l4d .card-stats .icon-big.text-secondary { background: var(--l4d-violet); }
.l4d .card-stats .card-category { color: var(--l4d-muted); font-size: 12.5px; }
.l4d .card-stats .card-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }

/* hero row: welcome banner + the credit card */
.l4d-hero-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.l4d-hero {
    flex: 1 1 520px; min-width: 0; position: relative; overflow: hidden; color: #fff; border-radius: var(--l4d-r, 16px); padding: 28px 32px; min-height: 180px;
    background: radial-gradient(900px 300px at 85% 0, rgba(78, 170, 255, .45), transparent 60%), linear-gradient(120deg, #0b2d6e, #1553c9);
    box-shadow: 0 1px 2px rgba(16, 32, 80, .05), 0 10px 28px rgba(16, 32, 80, .12);
}
.l4d-hero:after { content: ""; position: absolute; right: -60px; top: -40px; width: 320px; height: 320px; border-radius: 50%; border: 52px solid rgba(255, 255, 255, .08); pointer-events: none; }
.l4d-hero h1, .l4d-hero h2 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: #fff; position: relative; }
.l4d-hero p { margin: 0 0 20px; font-size: 16px; opacity: .92; max-width: 560px; position: relative; color: #fff; }
.l4d-hero .btn { position: relative; }
.l4d-hero-row > .row { flex: 0 1 340px; min-width: 280px; margin: 0; }
.l4d-hero-row > .row > [class*="col-"] { padding: 0; max-width: 100%; flex: 0 0 100%; }
.l4d-hero-row > .row .card { height: 100%; margin: 0; }
.l4d-hero-row > .row.mb-4 { margin-bottom: 0 !important; }

/* new-assignment notice */
.l4d-notice {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px;
    background: var(--l4d-surface, #fff); border: 1px solid var(--l4d-border, #e1e8f4); border-left: 4px solid var(--l4d-warn, #f19a2b); border-radius: 14px;
    box-shadow: var(--l4d-shadow, 0 10px 28px rgba(16, 32, 80, .07));
}
.l4d-notice .l4d-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--l4d-warn, #f19a2b); flex: none; }
.l4d-notice .l4d-notice-text { flex: 1 1 240px; min-width: 0; }
.l4d-notice .l4d-notice-text small { display: block; color: var(--l4d-muted, #667593); }

/* assigned list */
.l4d-assign-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--l4d-border, #e1e8f4); color: inherit; text-decoration: none; }
.l4d-assign-row:last-child { border-bottom: 0; }
.l4d-assign-row:hover { text-decoration: none; background: var(--l4d-soft, #f5f8fd); }
.l4d-assign-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.l4d-assign-body { flex: 1 1 auto; min-width: 0; }
.l4d-assign-body strong, .l4d-assign-body small { display: block; overflow: hidden; text-overflow: ellipsis; }
.l4d-assign-body small { color: var(--l4d-muted, #667593); }
.l4d-ring { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.l4d-ring b { width: 92px; height: 92px; border-radius: 50%; background: var(--l4d-surface, #fff); display: grid; place-items: center; font-size: 24px; letter-spacing: -.02em; }
.l4d-legend { flex: 1 1 140px; }
.l4d-legend div { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--l4d-muted, #667593); }
.l4d-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.l4d-legend b { margin-left: auto; color: var(--l4d-text, #11203f); padding-left: 12px; }

/* recommendation cards */
.l4d .card.border-0.shadow-sm { border: 1px solid var(--l4d-border) !important; box-shadow: var(--l4d-shadow) !important; }

/* admin / super admin operations: same palette */
.l4d .ops-hero-card { border-radius: var(--l4d-r); background: radial-gradient(900px 300px at 85% 0, rgba(78, 170, 255, .45), transparent 60%), linear-gradient(120deg, #0b2d6e, #1553c9); box-shadow: 0 1px 2px rgba(16, 32, 80, .05), 0 10px 28px rgba(16, 32, 80, .12); }
.l4d .ops-metric-card, .l4d .ops-panel, .l4d .ops-split-card { border-radius: var(--l4d-r); border: 1px solid var(--l4d-border); box-shadow: var(--l4d-shadow); }
.l4d .ops-dashboard-shell { color: var(--l4d-text); }

/* mobile */
@media (max-width: 767.98px) {
    .l4d-hero { padding: 22px 20px; min-height: 0; flex-basis: 100%; }
    .l4d-hero h1, .l4d-hero h2 { font-size: 24px; }
    .l4d-hero p { font-size: 15px; }
    .l4d-hero-row > .row { flex-basis: 100%; }
    .l4d-assign-row { align-items: flex-start; }
    .l4d .card-stats .icon-big { width: 42px; height: 42px; font-size: 19px; }
    .l4d .card-body { padding: 1rem; }
}

/* ---------------------------------------------------------------- Part 3: top bar, sidebar, operations cards */
/* Top bar buttons (modern top bar only): round buttons like the concept; behaviour and sizes of the bar are unchanged. */
.main-header .navbar-header[data-lf-layout] .topbar-nav > .nav-item > .nav-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px;
    margin-left: 6px; padding: 0 12px; border-radius: 999px; border: 1px solid #e1e8f4; background: #fff;
    box-shadow: 0 1px 2px rgba(16, 32, 80, .04);
}
.main-header .navbar-header[data-lf-layout] .topbar-nav > .nav-item > .nav-link i { margin: 0; line-height: 1; }
.main-header .navbar-header[data-lf-layout] .topbar-nav > .nav-item > .nav-link:hover { background: #eef3fb !important; }
.main-header .navbar-header[data-lf-layout] .btn-minimize { border-radius: 12px; }

/* Credit pill in the top bar */
.l4d-credit-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #e1e8f4; background: #fff; color: #11203f !important; text-decoration: none !important; white-space: nowrap; box-shadow: 0 1px 2px rgba(16, 32, 80, .04); }
.l4d-credit-pill strong { font-weight: 800; }
.l4d-credit-pill small { color: #667593; font-weight: 500; }
.l4d-credit-dot { width: 8px; height: 8px; border-radius: 50%; background: #13a869; flex: none; }
@media (max-width: 575.98px) { .l4d-credit-pill small { display: none; } .l4d-credit-pill { padding: 0 10px; } }

/* Sidebar: the group that is open gets the brand-coloured icon chip and a soft highlight */
.sidebar[data-lf-layout] .nav > .nav-item:has(> .collapse.show) > a { background: rgba(255, 255, 255, .08); border-radius: 12px; }
.sidebar[data-lf-layout] .nav > .nav-item:has(> .collapse.show) > a > i { background: #1f6bff; color: #fff; box-shadow: 0 6px 14px rgba(31, 107, 255, .4); }
.sidebar[data-lf-layout] .nav > .nav-item > a:hover > i { background: rgba(255, 255, 255, .18); }

/* Operations (admin / super admin): metric tiles and panels in the dashboard palette */
.l4d .ops-metric-card { align-items: center; padding: 1.1rem 1.2rem; }
.l4d .ops-metric-icon { width: 52px; height: 52px; min-width: 52px; flex: none; border-radius: 14px; }
.l4d .ops-metric-value { font-weight: 800; letter-spacing: -.02em; }
.l4d .ops-hero-card { padding: 1.5rem 1.75rem; }
.l4d .ops-hero-title { font-size: 1.75rem; letter-spacing: -.02em; }
.l4d .ops-hero-stats div { border-radius: 14px; background: rgba(255, 255, 255, .12); }
.l4d .ops-section-kicker, .l4d .ops-metric-label { color: var(--l4d-muted); }
.l4d .ops-subscription-table th, .l4d .table th { text-transform: uppercase; font-size: 11.5px; letter-spacing: .06em; color: var(--l4d-muted); border-top: 0; }
@media (max-width: 767.98px) { .l4d .ops-hero-card { grid-template-columns: 1fr; } .l4d .ops-hero-stats { grid-template-columns: 1fr; } }

/* Operations metric tiles: icon on top, value, label (the concept) */
.l4d .ops-metric-card { flex-direction: column; justify-content: center; text-align: center; gap: .55rem; padding: 1.25rem 1rem; }
.l4d .ops-metric-card > div:last-child { width: 100%; }
.l4d .ops-metric-value { font-size: 1.75rem; line-height: 1.15; }
.l4d .ops-metric-meta { color: var(--l4d-muted); font-size: .85rem; }

/* Language selector in the modern top bar: same round pill as the other buttons */
.main-header .navbar-header[data-lf-layout] .topbar-nav .dropdown.d-inline-block > .btn {
    height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #e1e8f4; background: #fff; color: #1f2a44; font-weight: 600; box-shadow: 0 1px 2px rgba(16, 32, 80, .04);
}

/* ---------------------------------------------------------------- Part 4: the concept's typography, sidebar scale, header user card, charts */
.l4d, .l4d .card, .l4d .btn, .sidebar[data-lf-layout], .main-header .navbar-header[data-lf-layout], .main-header .logo-header[data-lf-layout] {
    font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
.l4d { font-size: 14px; line-height: 1.45; }
.l4d h1, .l4d h2, .l4d h3, .l4d h4, .l4d h5, .l4d h6, .l4d .page-title, .l4d .card-title, .l4d .ops-hero-title { font-family: inherit; }

/* Sidebar scale: 36px chips, 14px/600 group labels, 13.5px entries, chevron instead of the triangle */
.sidebar[data-lf-layout] .nav > .nav-item > a { padding: 8px 10px; border-radius: 12px; display: flex; align-items: center; }
.sidebar[data-lf-layout] .nav > .nav-item > a > i { width: 36px; height: 36px; font-size: 19px; border-radius: 11px; margin-right: 12px; background: rgba(255, 255, 255, .10); }
.sidebar[data-lf-layout] .nav > .nav-item > a p { font-size: 14px; font-weight: 600; letter-spacing: 0; margin: 0; line-height: 1.25; white-space: normal; flex: 1 1 auto; }
.sidebar[data-lf-layout] .nav > .nav-item > a .caret { display: none; }
.sidebar[data-lf-layout] .nav > .nav-item > a:has(.caret)::after { content: "\f107"; font-family: "Font Awesome 5 Free"; font-weight: 900; margin-left: auto; padding-left: 8px; opacity: .7; transition: transform .2s; }
.sidebar[data-lf-layout] .nav > .nav-item > a:has(+ .collapse.show)::after { transform: rotate(180deg); }
.sidebar[data-lf-layout] .nav .nav-section .text-section { font-size: 11px; font-weight: 700; letter-spacing: .1em; opacity: .65; }
.sidebar[data-lf-layout] .nav-collapse li a .sub-item { font-size: 13.5px; font-weight: 500; }
.sidebar[data-lf-layout] .nav-collapse li.active > a .sub-item, .sidebar[data-lf-layout] .nav-collapse li a.active .sub-item { font-weight: 700; }

/* Header: menu search + user card (modern top bar only) */
.lf-menu-search, .lf-topbar-avatar, .lf-topbar-user { display: none; }
.main-header .navbar-header[data-lf-layout] .lf-menu-search {
    display: flex; align-items: center; gap: 10px; position: relative; flex: 0 1 460px; min-width: 0; margin-left: 12px; padding: 0 16px; height: 40px;
    background: #fff; border: 1px solid #e1e8f4; border-radius: 999px; box-shadow: 0 1px 2px rgba(16, 32, 80, .04); color: #667593;
}
.main-header .navbar-header[data-lf-layout] .lf-menu-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: #11203f; font-size: 14px; }
.lf-menu-search-results { position: absolute; top: 46px; left: 0; right: 0; z-index: 1200; background: #fff; border: 1px solid #e1e8f4; border-radius: 14px; box-shadow: 0 18px 40px rgba(16, 32, 80, .18); overflow: hidden; }
.lf-menu-search-results[hidden] { display: none; }
.lf-menu-search-hit { display: flex; flex-direction: column; padding: 9px 14px; color: #11203f; text-decoration: none; border-bottom: 1px solid #eef2fa; }
.lf-menu-search-hit:last-child { border-bottom: 0; }
.lf-menu-search-hit:hover, .lf-menu-search-hit:focus { background: #eef3fb; text-decoration: none; }
.lf-menu-search-hit small { color: #667593; }
.main-header .navbar-header[data-lf-layout] .topbar-nav > .nav-item > a.nav-link[href="/profile"] { padding: 0 14px 0 4px; height: 44px; gap: 10px; }
.main-header .navbar-header[data-lf-layout] a.nav-link[href="/profile"] > i,
.main-header .navbar-header[data-lf-layout] a.nav-link[href="/profile"] > .lf-topbar-link-label { display: none; }
.main-header .navbar-header[data-lf-layout] .lf-topbar-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #ffb36b, #ff6b9a); color: #fff; font-weight: 700; }
.main-header .navbar-header[data-lf-layout] .lf-topbar-user { display: inline-flex; flex-direction: column; line-height: 1.15; text-align: left; }
.main-header .navbar-header[data-lf-layout] .lf-topbar-user b { font-size: 13px; font-weight: 700; color: #11203f; }
.main-header .navbar-header[data-lf-layout] .lf-topbar-user small { font-size: 11.5px; color: #667593; }
@media (max-width: 991.98px) { .main-header .navbar-header[data-lf-layout] .lf-menu-search { display: none; } .main-header .navbar-header[data-lf-layout] .lf-topbar-user { display: none; } }

/* Operations: concept tiles (no uppercase labels), HTML bars and donut */
.l4d .ops-metric-label { text-transform: none; letter-spacing: 0; font-size: .85rem; font-weight: 500; order: 3; }
.l4d .ops-metric-card > div:last-child { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.l4d .ops-metric-value { order: 1; }
.l4d .ops-metric-meta { order: 4; }
.l4d .ops-section-kicker { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; }
.l4d .ops-panel .card-title { font-size: 1.05rem; font-weight: 800; }
.l4d-bars { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding: 0 6px; border-left: 1px solid #e1e8f4; border-bottom: 1px solid #e1e8f4; }
.l4d-bar-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.l4d-bar { display: block; width: 100%; max-width: 52px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #1f6bff, rgba(20, 184, 201, .35)); }
.l4d-bar-col:nth-child(3n) .l4d-bar { background: linear-gradient(180deg, #14b8c9, rgba(20, 184, 201, .3)); }
.l4d-bar-value { font-size: 11px; font-weight: 700; color: #667593; margin-bottom: 3px; }
.l4d-bar-labels { display: flex; gap: 8px; padding: 6px 6px 0; }
.l4d-bar-labels span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 11.5px; color: #667593; white-space: nowrap; overflow: visible; }
.l4d-donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; min-height: 190px; }
.l4d-donut { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; flex: none; position: relative; }
.l4d-donut b { width: 96px; height: 96px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 22px; letter-spacing: -.02em; }
.l4d-legend--wide { flex: 1 1 150px; }
@media (max-width: 575.98px) { .l4d-bars { height: 150px; gap: 5px; } .l4d-bar-value { display: none; } }

/* ---------------------------------------------------------------- Part 5: operations panel in the concept's layout */
.l4d .ops-hero-card.ops-hero-card--plain { display: block; background: #fff; color: var(--l4d-text); border: 1px solid var(--l4d-border); box-shadow: var(--l4d-shadow); padding: 1.4rem 1.6rem; }
.l4d .ops-hero-card--plain .ops-kicker { background: #1f6bff; color: #fff; margin-bottom: .7rem; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .78rem; padding: .3rem .8rem; }
.l4d .ops-hero-card--plain .ops-hero-title { color: var(--l4d-text); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .3rem; }
.l4d .ops-hero-card--plain .ops-hero-subtitle { color: var(--l4d-muted); max-width: none; }
.l4d .ops-section-kicker { display: none; }

.l4d-tilegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.l4d-tilegrid .ops-metric-card { height: 100%; }
.l4d .ops-metric-card.accent-cyan .ops-metric-icon { background: #1f6bff; }
.l4d .ops-metric-card.accent-blue .ops-metric-icon { background: #14b8c9; }
.l4d .ops-metric-card.accent-gold .ops-metric-icon { background: #13a869; }
.l4d .ops-metric-card.accent-emerald .ops-metric-icon { background: #f19a2b; }
.l4d .ops-metric-card.accent-violet .ops-metric-icon { background: #7a5cff; }
.l4d .ops-metric-card.accent-red .ops-metric-icon { background: #e0475b; }

.l4d-sec { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin: 1.5rem 0 .8rem; color: var(--l4d-text); }
.l4d-pill { display: inline-block; font-size: 12px; color: var(--l4d-muted); border: 1px solid var(--l4d-border); border-radius: 9px; padding: 4px 10px; font-weight: 500; white-space: nowrap; background: #fff; }

.l4d-kvgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.l4d-kvtile, .l4d .ops-stat-block { background: #fff; border: 1px solid var(--l4d-border); border-radius: 14px; padding: 14px 16px; box-shadow: var(--l4d-shadow); }
.l4d-kvtile small, .l4d .ops-stat-block span { display: block; color: var(--l4d-muted); font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: 0; margin-bottom: 4px; }
.l4d-kvtile b, .l4d .ops-stat-block strong { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--l4d-text); }
.l4d-kvtile--ok b { color: var(--l4d-ok); }
.l4d-kvtile--bad b { color: var(--l4d-bad); }
.l4d .ops-split-card { background: #fff; border: 1px solid var(--l4d-border); border-radius: 14px; padding: 14px 16px; }
.l4d .ops-split-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--l4d-border); }
.l4d .ops-split-line:last-child { border-bottom: 0; }
.l4d .ops-split-line span { color: var(--l4d-muted); }
.l4d .ops-split-line strong { font-weight: 700; }

.l4d .l4d-table th, .l4d .table.table-striped th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--l4d-muted); font-weight: 700; border-top: 0; border-bottom: 1px solid var(--l4d-border); padding: 10px 12px; }
.l4d .l4d-table td, .l4d .table.table-striped td { padding: 12px; border-top: 0; border-bottom: 1px solid var(--l4d-border); vertical-align: middle; }
.l4d .table-striped tbody tr:nth-of-type(odd) { background: transparent; }
.l4d-chip { display: inline-block; min-width: 30px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #eef3fb; color: var(--l4d-text); text-align: center; }
.l4d-chip--ok { background: #e4f6ec; color: #0b7a4c; }
.l4d-chip--warn { background: #fff1d6; color: #8a5a00; }
.l4d-bars--short { height: 150px; }
.l4d-bars--short .l4d-bar { max-width: 90px; }

/* AI telemetry and AI usage report: tiles and tables like the concept */
.l4d .card .border.rounded.p-2.text-center { padding: 14px 16px !important; border-radius: 14px; text-align: left !important; background: #fff; box-shadow: var(--l4d-shadow); }
.l4d .card .border.rounded.p-2.text-center .small.text-muted { font-size: 12.5px; }
.l4d .card .border.rounded.p-2.text-center .h4, .l4d .card .border.rounded.p-2.text-center .h5 { font-weight: 800; letter-spacing: -.02em; }
.l4d .card-header h5 { font-weight: 800; letter-spacing: -.005em; }
.l4d .badge-info { background: #fff; color: var(--l4d-muted); border: 1px solid var(--l4d-border); font-weight: 500; border-radius: 9px; }
.l4d-tilegrid .ops-metric-card { justify-content: flex-start; }

/* ===== Part 6: student analysis report, usage rows, activity list, AI usage report, section link ===== */
.l4d-chip--bad { background: #fde5e8; color: #b3263b; }
.l4d-chip--blue { background: #e5eeff; color: #1f6bff; }
.l4d-chip--violet { background: #efeaff; color: #5b3fd6; }
.l4d-chip--muted { background: #f1f4fa; color: var(--l4d-muted); font-weight: 600; }
.l4d-chip b { font-weight: 800; }
.l4d-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.l4d-sec-link { font-size: .85rem; font-weight: 700; color: var(--l4d-brand); }
.l4d-sec-link:hover { text-decoration: none; opacity: .8; }

.l4d .card-header .card-title, .l4d-report-head h5, .l4d-aiusage-head h5 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; margin: 0; color: var(--l4d-text); }
.l4d .card-header { padding: 1.1rem 1.4rem; }
.l4d .card-body { padding: 1.2rem 1.4rem; }

/* usage rows (subscription statistics) */
.l4d-usage { padding: 12px 0; border-bottom: 1px solid var(--l4d-border); }
.l4d-usage:last-child { border-bottom: 0; padding-bottom: 0; }
.l4d-usage:first-child { padding-top: 0; }
.l4d-usage-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.l4d-usage-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.l4d-usage-name strong { font-weight: 700; }
.l4d-usage-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.l4d-usage .progress { height: 8px; border-radius: 99px; background: #eaf0fa; overflow: hidden; }
.l4d-usage .progress-bar { border-radius: 99px; background: linear-gradient(90deg, var(--l4d-brand), var(--l4d-brand-2)); }
.l4d-usage .progress-bar.bg-warning { background: linear-gradient(90deg, #f19a2b, #f5bb62) !important; }
.l4d-usage .progress-bar.bg-danger { background: linear-gradient(90deg, #e0475b, #ee7a89) !important; }

/* key/value list (content summary) */
.l4d-kvlist .list-group-item { border-color: var(--l4d-border); padding: .85rem 0; background: transparent; }
.l4d-kvlist .list-group-item:first-child { border-top: 0; padding-top: 0; }
.l4d-kvlist .list-group-item span { color: var(--l4d-muted); }
.l4d-kvlist .list-group-item strong { font-weight: 800; }

/* recent activities */
.l4d-act { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--l4d-border); color: inherit; text-decoration: none; }
.l4d-act:last-child { border-bottom: 0; padding-bottom: 0; }
.l4d-act:first-child { padding-top: 0; }
.l4d-act:hover { text-decoration: none; }
.l4d-act-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 16px; flex: none; }
.l4d-act-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.l4d-act-body strong { font-weight: 700; }
.l4d-act-body small { color: var(--l4d-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l4d-act-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.l4d-act-meta small { color: var(--l4d-muted); }

/* student analysis report */
.l4d-report { background: var(--l4d-surface); border: 1px solid var(--l4d-border); border-radius: var(--l4d-r); box-shadow: var(--l4d-shadow); padding: 1.4rem; margin-bottom: 1.5rem; }
.l4d-report-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 1.2rem; }
.l4d-report-head .l4d-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--l4d-brand), var(--l4d-brand-2)); font-size: 18px; flex: none; }
.l4d-report-title { flex: 1; min-width: 0; }
.l4d-report-title small { color: var(--l4d-muted); }
.l4d-report-block { margin-bottom: 1.2rem; }
.l4d-eyebrow { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: var(--l4d-muted); margin-bottom: 8px; }
.l4d-place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.l4d-place { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--l4d-border); border-radius: 14px; background: var(--l4d-soft); }
.l4d-place-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #e5eeff; color: var(--l4d-brand); flex: none; }
.l4d-place-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; overflow-wrap: anywhere; }
.l4d-place-body small { color: var(--l4d-muted); }
.l4d-window-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 1.2rem; }
.l4d-window { border: 1px solid var(--l4d-border); border-radius: 14px; padding: 16px; background: #fff; }
.l4d-window-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.l4d-window-head h6 { margin: 0; font-weight: 800; font-size: 1rem; }
.l4d-window-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.l4d-window-stats div { background: var(--l4d-soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.l4d-window-stats b { font-size: 1.35rem; line-height: 1.2; letter-spacing: -.02em; }
.l4d-window-stats span { font-size: .75rem; color: var(--l4d-muted); }
.l4d-window-foot { display: block; margin-top: 12px; color: var(--l4d-muted); }
.l4d-report-cols { display: grid; grid-template-columns: 5fr 7fr; gap: 14px; }
.l4d-report-panel { border: 1px solid var(--l4d-border); border-radius: 14px; padding: 16px 18px; background: #fff; }
.l4d-report-panel h6 { font-weight: 800; margin-bottom: 14px; }
.l4d-kv { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--l4d-border); }
.l4d-kv:last-child { border-bottom: 0; }
.l4d-kv span { color: var(--l4d-muted); }
.l4d-kv b { font-weight: 800; }
.l4d-skill { margin-bottom: 14px; }
.l4d-skill:last-child { margin-bottom: 0; }
.l4d-skill-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-weight: 600; }
.l4d-skill-top small, .l4d-skill-avg { color: var(--l4d-muted); }
.l4d-skill .progress { height: 8px; border-radius: 99px; background: #eaf0fa; overflow: hidden; }
.l4d-skill .progress-bar { border-radius: 99px; }
.l4d-skill-avg { display: block; margin-top: 4px; font-size: .78rem; }
@media (max-width: 991px) {
    .l4d-window-grid, .l4d-report-cols { grid-template-columns: 1fr; }
}

/* AI usage report */
.l4d-aiusage-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 1rem; }
.l4d-seg { display: inline-flex; padding: 4px; gap: 2px; background: #f1f4fa; border: 1px solid var(--l4d-border); border-radius: 12px; }
.l4d-seg button { border: 0; background: transparent; padding: 7px 16px; border-radius: 9px; font-weight: 700; color: var(--l4d-muted); cursor: pointer; }
.l4d-seg button.active { background: #fff; color: var(--l4d-brand); box-shadow: 0 1px 3px rgba(16, 32, 80, .12); }
.l4d-aiusage-body { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 24px; align-items: stretch; }
.l4d-aiusage-chart { display: flex; align-items: stretch; gap: 14px; height: 240px; padding: 10px 6px 0; border-bottom: 1px solid var(--l4d-border); }
.l4d-aibar { flex: 1; border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; cursor: pointer; }
.l4d-aibar b { font-size: .85rem; margin-bottom: 6px; color: var(--l4d-text); }
.l4d-aibar-fill { display: block; width: 100%; max-width: 84px; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #1f6bff, #a9c4ff); opacity: .45; transition: opacity .15s, height .3s; min-height: 4px; }
.l4d-aibar.active .l4d-aibar-fill { opacity: 1; }
.l4d-aibar small { margin-top: 8px; color: var(--l4d-muted); font-weight: 600; }
.l4d-aibar.active small { color: var(--l4d-brand); font-weight: 800; }
.l4d-aiusage .l4d-table th.on, .l4d-aiusage .l4d-table td.on { color: var(--l4d-brand); font-weight: 800; background: rgba(31, 107, 255, .05); }
@media (max-width: 991px) { .l4d-aiusage-body { grid-template-columns: 1fr; } }

/* ===== Part 7: teacher all-students analysis reports (CSS only, markup and behaviour unchanged) ===== */
.l4d-reportpage .card-header h5 { font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; }
.l4d-reportpage .card.border-info { border-color: var(--l4d-border) !important; border-top: 3px solid var(--l4d-brand) !important; }
.l4d-reportpage .card-body > .row:first-child .border.rounded,
.l4d-reportpage .card-body .row.mb-3 .border.rounded.p-2 { padding: 14px 16px !important; border-radius: 14px !important; background: var(--l4d-soft); border: 1px solid var(--l4d-border) !important; display: flex; flex-direction: column-reverse; gap: 2px; }
.l4d-reportpage .border.rounded.p-2 strong { font-size: 1.6rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.l4d-reportpage .border.rounded.p-2 .small { font-size: .74rem !important; font-weight: 600; }
.l4d-reportpage .border.rounded.p-3 { border-radius: 14px !important; background: #fff; border: 1px solid var(--l4d-border) !important; padding: 16px !important; }
.l4d-reportpage .border.rounded.p-3 > .d-flex { margin-bottom: 14px !important; }
.l4d-reportpage h6 { font-weight: 800; letter-spacing: -.005em; }
.l4d-reportpage .table { border-collapse: separate; border-spacing: 0; }
.l4d-reportpage .table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--l4d-muted); font-weight: 700; border-top: 0 !important; border-bottom: 1px solid var(--l4d-border) !important; padding: 10px 12px; white-space: nowrap; background: transparent; }
.l4d-reportpage .table td { padding: 12px; border-top: 0 !important; border-bottom: 1px solid var(--l4d-border) !important; vertical-align: middle; }
.l4d-reportpage .table-bordered, .l4d-reportpage .table-bordered th, .l4d-reportpage .table-bordered td { border-left: 0 !important; border-right: 0 !important; }
.l4d-reportpage .table-striped tbody tr:nth-of-type(odd) { background: transparent; }
.l4d-reportpage .table tbody tr:hover { background: var(--l4d-soft); }
.l4d-reportpage .progress { height: 8px !important; border-radius: 99px; background: #eaf0fa; overflow: hidden; }
.l4d-reportpage .progress-bar { border-radius: 99px; background: linear-gradient(90deg, var(--l4d-brand), var(--l4d-brand-2)) !important; }
.l4d-reportpage .badge { border-radius: 99px; padding: 5px 10px; font-weight: 700; }
.l4d-reportpage .badge-info { background: #e5eeff; color: #1f6bff; }
.l4d-reportpage .badge-secondary { background: #f1f4fa; color: var(--l4d-muted); }
.l4d-reportpage .badge-light { background: #f1f4fa; color: var(--l4d-muted); }


/* ===== Part 8: the modern layout (round buttons, search, user card, sidebar scale) is independent of the colour; every colour keeps it ===== */
.main-header .navbar-header[data-lf-layout] .topbar-nav > .nav-item > .nav-link,
.main-header .navbar-header[data-lf-layout] .topbar-nav .dropdown.d-inline-block > .btn { color: #1f2a44 !important; }
.main-header .navbar-header[data-lf-layout] .topbar-nav > .nav-item > .nav-link i { color: #1f2a44 !important; }
.main-header .navbar-header[data-lf-layout] .topbar-nav > .nav-item > .nav-link:hover { background: #eef3fb !important; }
.main-header .navbar-header[data-lf-layout] .btn-minimize { background: #fff !important; color: #1f2a44 !important; border: 1px solid #e1e8f4; }
.main-header .navbar-header[data-lf-layout] .btn-minimize i, .main-header .navbar-header[data-lf-layout] .btn-minimize .icon-menu { color: #1f2a44 !important; }
.main-header .navbar-header[data-lf-layout] .lf-topbar-user b { color: #11203f !important; }
.main-header .navbar-header[data-lf-layout] .lf-topbar-user small { color: #667593 !important; }
/* the open group's icon chip: a light tile that works on any sidebar colour (modern keeps the brand blue) */
.sidebar[data-lf-layout]:not([data-background-color="modern"]) .nav > .nav-item:has(> .collapse.show) > a > i { background: rgba(255, 255, 255, .28); box-shadow: none; }
.sidebar[data-lf-layout][data-background-color="white"] .nav > .nav-item > a > i { background: #eef3fb; }
.sidebar[data-lf-layout][data-background-color="white"] .nav > .nav-item:has(> .collapse.show) > a > i { background: #1f6bff; color: #fff; }

/* Part 9: AdSense unit (free plan only); collapses when Google has no ad to show */
.l4d-ad { margin: 1.5rem 0; text-align: center; overflow: hidden; }
.l4d-ad ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* Part 10: AdSense side rails (public pages, wide screens only): fixed beside the 1180px content column, never part of the layout flow */
.l4d-ad-rail { position: fixed; top: 130px; width: 160px; margin: 0; z-index: 5; }
.l4d-ad-rail--left { left: calc(50% - 770px); }
.l4d-ad-rail--right { left: calc(50% + 610px); }
@media (max-width: 1559.98px) { .l4d-ad-rail { display: none; } }

/* Part 11: advertising section of the privacy policy */
.privacy-ads-notice { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid #e1e8f4; }
.privacy-ads-notice h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: .9rem; }
.privacy-ads-notice p, .privacy-ads-notice li { overflow-wrap: anywhere; }

/* The cookie banner carries one more sentence (advertising cookies): on wider screens the buttons move under the text instead of squeezing it into a narrow column */
@media (min-width: 768px) {
    .lf-public .cookie-banner-card { flex-wrap: wrap; }
    .lf-public .cookie-banner-copy { flex: 1 1 calc(100% - 90px); }
    .lf-public .cookie-banner-actions { flex: 1 1 100%; justify-content: flex-end; }
}

/* Every item of the cookie preferences window reads the same, not only the "necessary" one */
.lf-public .cookie-preferences-item + .cookie-preferences-item { margin-top: 10px; }
.lf-public .cookie-preferences-item strong { font-size: 15px; color: var(--navy); }
.lf-public .cookie-preferences-item span { font-size: 14px; color: var(--muted); }
