/* Live Campus signed-in shell: the Operations-style workspace from Civadelia
   (civadelia_workspace_v3.css, campusone_tenant_shell_v1.css, responsive_shell_phase11d),
   consolidated into one file without the legacy body.co-ui-* layers.
   Dark sidebar, white apple tile, the school colour on the active item, a white topbar. */

:root {
  --success: #067647;
  --success-soft: #ecfdf3;
  --success-border: #abefc6;
  --info-soft: #eff8ff;
  --info-text: #175cd3;
  --sidebar-bg: #18292f;
  --sidebar-bg-deep: #122229;
  --sidebar-text: rgba(255, 255, 255, .78);
  --sidebar-muted: rgba(255, 255, 255, .5);
  --topbar-h: 64px;
  --sidebar-w: 252px;
}
html[data-civa-theme="dark"] {
  --success: #75e0a7;
  --success-soft: #0f2e22;
  --success-border: #1f5f45;
  --info-soft: #172a45;
  --info-text: #84caff;
  --sidebar-bg: #161b22;
  --sidebar-bg-deep: #10141a;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand-text); }
h1, h2, h3, h4 { line-height: var(--lh-tight); margin: 0; }
.lc-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lc-svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.lc-skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 12px; background: var(--surface); }
.lc-skip:focus { left: 8px; }

/* Logos are supplied on white: in dark mode they sit on a white plate. */
.lc-logo-plate { display: inline-flex; align-items: center; background: #fff; border-radius: var(--radius-md); }
html[data-civa-theme="dark"] .lc-logo-plate { padding: 4px 8px; }

/* ---- layout ---------------------------------------------------------------------------------- */
.lc-shell { min-height: 100vh; }
.lc-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: var(--z-overlay);
  width: var(--sidebar-w); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-deep) 100%);
  color: var(--sidebar-text);
  box-shadow: 1px 0 0 rgba(8, 25, 20, .12);
}
.lc-frame { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.lc-main { flex: 1; width: min(100% - 40px, 1440px); margin: 0 auto; padding: 24px 0 48px; }
.lc-main:focus { outline: none; }

/* ---- sidebar --------------------------------------------------------------------------------- */
.lc-side-brand {
  display: flex; align-items: center; gap: 10px; height: var(--topbar-h); padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff; text-decoration: none;
}
.lc-apple { width: 36px; height: 36px; flex: none; padding: 3px; border-radius: 9px; background: #fff; box-shadow: 0 2px 10px rgba(8, 24, 20, .18); }
.lc-apple img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lc-side-brand strong { display: block; font-size: 13px; letter-spacing: .01em; }
.lc-side-brand small { display: block; color: var(--sidebar-muted); font-size: 11.5px; }
.lc-side-nav { flex: 1; overflow-y: auto; padding: 10px 0 16px; }
.lc-nav-label { display: block; padding: 14px 18px 6px; color: var(--sidebar-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .095em; text-transform: uppercase; }
.lc-side-nav a, .lc-side-nav summary {
  display: flex; align-items: center; gap: 10px; min-height: 38px; margin: 1px 8px; padding: 0 11px;
  border-radius: 7px; color: var(--sidebar-text); font-size: 13.5px; text-decoration: none; cursor: pointer; list-style: none;
}
.lc-side-nav summary::-webkit-details-marker { display: none; }
.lc-side-nav a:hover, .lc-side-nav summary:hover { background: rgba(255, 255, 255, .065); color: #fff; }
.lc-side-nav a:focus-visible, .lc-side-nav summary:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.lc-side-nav a.is-active {
  background: color-mix(in srgb, var(--brand) 78%, #0b1220 22%); color: #fff;
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, .64);
}
.lc-side-nav .lc-badge-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 11px; text-align: center; }
.lc-side-nav details summary .lc-chev { margin-left: auto; transition: transform .15s; }
.lc-side-nav details[open] summary .lc-chev { transform: rotate(90deg); }
.lc-side-nav details a { padding-left: 39px; min-height: 34px; font-size: 13px; }
/* A group with its active sub-item: the group label stays bright, the sub-item carries the highlight. */
.lc-side-nav details.is-active-group > summary { color: #fff; background: rgba(255, 255, 255, .05); }
.lc-side-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
/* The school's logo mark (the symbol only), on a white tile so every colour in it reads on the dark menu. */
.lc-mark { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 4px; border-radius: 10px; background: #fff; color: var(--brand); font-weight: 800; font-size: 20px; }
.lc-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lc-side-brand strong { font-size: 14px; }
/* "Powered by Civadelia": small muted text with a link, everywhere. */
.lc-powered { display: inline-block; color: var(--text-muted); font-size: 12px; text-decoration: none; }
.lc-powered:hover { color: var(--text); text-decoration: underline; }
.lc-side-foot { text-align: center; }
.lc-side-foot .lc-powered { color: var(--sidebar-muted); }
.lc-side-foot .lc-powered:hover { color: #fff; }
/* Log out, under the Account group: looks like a menu link. */
.lc-side-logout { margin: 0; }
.lc-side-logout button { display: flex; align-items: center; gap: 10px; width: calc(100% - 16px); min-height: 38px; margin: 1px 8px; padding: 0 11px;
  border: 0; border-radius: 7px; background: none; color: var(--sidebar-text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.lc-side-logout button:hover { background: rgba(255, 255, 255, .065); color: #fff; }
.lc-side-logout button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

/* ---- topbar ---------------------------------------------------------------------------------- */
.lc-topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 97%, transparent); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.lc-topbar-title { min-width: 0; flex: 1; }
.lc-topbar-title strong { display: block; color: var(--text); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-topbar-title small { display: block; color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-topbar-actions { display: flex; align-items: center; gap: 6px; }
/* "Browse courses": the same outline button as "My learning" in the marketplace header. */
.lc-btn-outline {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; margin-right: 4px;
  border: 1.5px solid var(--brand-text); border-radius: 8px; color: var(--brand-text);
  font-weight: 650; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.lc-btn-outline:hover { background: var(--brand-faint); }
.lc-btn-outline:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.lc-btn-outline .lc-icon { width: 16px; height: 16px; }
@media (max-width: 640px) {
  .lc-btn-outline { padding: 0 10px; margin-right: 0; }
  .lc-browse span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.lc-icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--text-muted); cursor: pointer; text-decoration: none;
}
.lc-icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.lc-icon-btn:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 1px; }
.lc-icon-btn .lc-dot { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; font-weight: 700; }
.lc-menu-btn { display: none; }
.lc-user-menu { position: relative; }
.lc-user-menu summary { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 10px; cursor: pointer; list-style: none; }
.lc-user-menu summary::-webkit-details-marker { display: none; }
.lc-user-menu summary:hover { background: var(--surface-hover); }
.lc-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 14px; }
.lc-avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.lc-user-copy strong { display: block; font-size: 13px; color: var(--text); }
.lc-user-copy small { display: block; font-size: 11.5px; color: var(--text-muted); }
.lc-popover {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-dropdown); min-width: 230px; padding: 6px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md);
}
.lc-popover a, .lc-popover button {
  display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; text-decoration: none; cursor: pointer;
}
.lc-popover a:hover, .lc-popover button:hover { background: var(--surface-hover); }
.lc-popover hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 6px 0; }
.lc-popover-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 6px; }
.lc-popover-head strong { display: block; }
.lc-popover-head small { color: var(--text-muted); }

/* Theme switch (Civadelia civa-v2-theme-switch) */
.lc-theme-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; font-size: 13.5px; }
.lc-switch { position: relative; width: 38px; height: 22px; border: 0; border-radius: 11px; background: var(--border-strong); cursor: pointer; padding: 0; }
.lc-switch span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.lc-switch[aria-checked="true"] { background: var(--brand); }
.lc-switch[aria-checked="true"] span { left: 19px; }

/* ---- flash messages ---------------------------------------------------------------------------- */
.lc-flash-wrap { display: grid; gap: 8px; margin-bottom: 16px; }
.lc-flash { padding: 11px 14px; border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: var(--radius-md); background: var(--surface); }
.lc-flash.success { border-left-color: var(--success); }
.lc-flash.error { border-left-color: var(--danger); }
.lc-flash.warning { border-left-color: var(--warning-accent); }

/* ---- mobile ---------------------------------------------------------------------------------- */
.lc-scrim { display: none; }
@media (max-width: 959px) {
  .lc-sidebar { transform: translateX(-100%); transition: transform .2s ease; width: min(86vw, 300px); }
  .lc-shell.is-nav-open .lc-sidebar { transform: none; }
  .lc-shell.is-nav-open .lc-scrim { display: block; position: fixed; inset: 0; z-index: calc(var(--z-overlay) - 1); background: rgba(10, 16, 24, .45); }
  .lc-frame { margin-left: 0; }
  .lc-menu-btn { display: inline-grid; }
  .lc-topbar { padding: 0 10px; }
  .lc-user-copy { display: none; }
  .lc-main { width: calc(100% - 32px); padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Theme toggle shows the moon in light mode and the sun in dark mode. */
html[data-civa-theme="dark"] .lc-when-light, html:not([data-civa-theme="dark"]) .lc-when-dark { display: none; }

/* Breadcrumb and "Back to ..." above every signed-in page. */
.lc-context { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.lc-context .ui-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--text-muted); }
.lc-context .ui-breadcrumb li { min-width: 0; overflow-wrap: anywhere; }
.lc-context .ui-breadcrumb li + li::before { content: "›"; margin: 0 6px 0 4px; color: var(--text-faint); }
.lc-context .ui-breadcrumb a { color: var(--brand-text); text-decoration: none; }
.lc-context .ui-breadcrumb a:hover { text-decoration: underline; }
.lc-context .ui-breadcrumb [aria-current] { color: var(--text); font-weight: 600; }
.lc-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px 4px 6px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; }
.lc-back:hover { border-color: var(--brand-text); color: var(--brand-text); }
.lc-back .lc-icon { width: 16px; height: 16px; }

/* The hidden attribute always hides, even on components that set their own display. */
[hidden] { display: none !important; }
