/* CareLearn - liquid glass theme for the signed-in app (worker, provider and owner pages,
   sign-in, the learning pages and the console). Loaded last so it restyles the surfaces the
   other stylesheets define. Colours, spacing, wording and layout are untouched: these rules
   only change backgrounds, borders, shadows and corner rounding. The public pages get the
   same look from the "Liquid glass theme" block at the end of home.css. */
html { background: #E8ECF2; }
html body { background: transparent; }
html body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(40rem 32rem at 22% 18%, color-mix(in srgb, var(--accent, #0A66D8) 26%, transparent), transparent 62%),
  radial-gradient(34rem 30rem at 82% 34%, rgba(251,146,60,.17), transparent 62%),
  radial-gradient(38rem 34rem at 50% 78%, rgba(6,182,212,.20), transparent 62%),
  radial-gradient(50rem 36rem at 96% 108%, rgba(37,99,235,.14), transparent 60%); }
html body:has(.h-site)::before { display: none; }   /* public pages draw their own */
@media print { html body::before { display: none; } html { background: #fff; } }

html body {
  --lg-bevel: inset 1px 1px 0 rgba(255,255,255,.95), inset -1px -1px 0 rgba(255,255,255,.55), inset 0 14px 22px -16px rgba(255,255,255,.95), inset 0 -14px 22px -16px rgba(15,23,42,.10);
  --lg-spec: linear-gradient(135deg, rgba(255,255,255,.42), rgba(255,255,255,0) 26%, rgba(255,255,255,0) 74%, rgba(255,255,255,.2));
  --lg-tint: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.5));
  --lg-shadow: 0 1px 2px rgba(20,24,40,.06), 0 14px 36px rgba(20,24,40,.10); }

/* glass panels: dashboards, learning home, sign-in, console */
html body .panel, html body .db-kpi, html body .ln-onb, html body .ln-cont, html body .au-card, html body .au-side,
html body .card {
  background: var(--lg-spec), var(--lg-tint); border: 1px solid rgba(255,255,255,.7);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--lg-shadow), var(--lg-bevel); }
html body .panel, html body .ln-cont, html body .au-card, html body .au-side { border-radius: 24px; }
html body .db-kpi, html body .ln-onb, html body .card { border-radius: 20px; }
/* lists of many cards: same finish without the live blur, so long pages scroll smoothly */
html body .ln-card { background: var(--lg-spec), linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,255,255,.64)); border: 1px solid rgba(255,255,255,.7); border-radius: 20px; box-shadow: var(--lg-shadow), var(--lg-bevel); }
/* lesson pages: a little more solid, so long reading stays comfortable */
html body .ln-rail, html body .lesson { background: var(--lg-spec), linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.8)); border: 1px solid rgba(255,255,255,.75); border-radius: 24px;
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); box-shadow: var(--lg-shadow), var(--lg-bevel); }
/* tinted notices keep their own colour, with rounded glass edges */
html body .callout, html body .ln-gaps, html body .db-rolesum, html body .db-remind { border-radius: 18px; box-shadow: var(--lg-bevel); }
/* tables and fields sit on the glass instead of on white blocks */
html body .panel th, html body .panel thead, html body .panel table { background: transparent; }
html body .panel input:not([type=checkbox]):not([type=radio]), html body .panel select, html body .panel textarea,
html body .au-card input:not([type=checkbox]):not([type=radio]) { background-color: rgba(255,255,255,.62); border-radius: 14px; box-shadow: inset 0 1px 2px rgba(15,23,42,.08), 0 0 0 1px rgba(255,255,255,.7); }
html body .db-chip:not(.on), html body .pk-pre:not(.on), html body .chip { background-color: rgba(255,255,255,.6); }

/* buttons */
html body .btn:not(.secondary):not(.ghost):not(.danger):not(.linkbtn) { background-image: linear-gradient(155deg, color-mix(in srgb, var(--accent, #0A66D8) 94%, transparent), color-mix(in srgb, var(--accent-deep2, #0852AE) 90%, transparent));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent, #0A66D8) 28%, transparent), inset 0 1px 0 rgba(255,255,255,.45), inset 0 0 0 1px rgba(255,255,255,.12); }
html body .btn.secondary { background-image: var(--lg-spec), linear-gradient(180deg, rgba(255,255,255,.66), rgba(255,255,255,.4)); border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 4px 14px rgba(20,24,40,.08), var(--lg-bevel); }

/* dialogs */
html body .overlay { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html body .overlay > * { border-radius: 26px; box-shadow: 0 30px 80px rgba(11,22,32,.35), var(--lg-bevel); }

/* header: one glass bar on every page */
html body .bar { background: transparent;
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 8px 28px rgba(20,24,40,.10), inset 1px 1px 0 rgba(255,255,255,.95), inset -1px -1px 0 rgba(255,255,255,.5); }
@media (min-width: 921px) {
  html body:not(:has(.h-site)) .bar { top: calc(env(safe-area-inset-top, 0px) + 12px); width: min(1180px, calc(100% - 32px)); margin: 12px auto 0; border-radius: 999px; }
  html body:not(:has(.h-site)) .bar-in { padding-inline: 22px 12px; }
}
/* phones and tablets: a rounded floating bar, and a rounded menu under it */
@media (max-width: 920px) {
  html body .bar { top: calc(env(safe-area-inset-top, 0px) + 8px); margin: 8px 10px 0; border-radius: 22px; }
  html body .bar .topnav { top: calc(100% + 8px); border-radius: 20px; border: 1px solid rgba(255,255,255,.75); background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); box-shadow: 0 18px 40px rgba(20,24,40,.18); }
}
@media (prefers-reduced-transparency: reduce) {
  html body .panel, html body .db-kpi, html body .ln-onb, html body .ln-cont, html body .au-card, html body .card, html body .bar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
