:root {
  color-scheme: light;
  --bg: #f3f6f8;
  --paper: #fff;
  --ink: #162934;
  --muted: #4d626f;
  --line: #d7e1e6;
  --accent: #086962;
  --tint: #e5f3ef;
  --hover: #edf3f5;
  --focus: #08786e;
  --bar: #168476;
  --hero: #12363c;
  --shadow: 0 2px 4px #122f3a08;
  font-family: system-ui, -apple-system, sans-serif;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1725;
  --paper: #142536;
  --ink: #edf6f8;
  --muted: #adc2cf;
  --line: #344d60;
  --accent: #6ed8ce;
  --tint: #22444b;
  --hover: #203b49;
  --focus: #6ed8ce;
  --bar: #68cbbd;
  --hero: #15373e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, a { font: inherit; }
a { color: var(--accent); }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden], #status:empty { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 2; inset: 12px auto auto 12px; background: var(--paper); padding: 12px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.shell > aside { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid var(--line); }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; }
.sidebar-brand .dp-brand { color: var(--ink); }
.sidebar-brand .dp-brand b, .sidebar-brand .dp-brand small { color: var(--accent); }
[data-theme="dark"] .sidebar-brand .dp-brand { color: #fff; }
[data-theme="dark"] .sidebar-brand .dp-brand small { color: #b7d6df; }
.sidebar-brand img { background: #142c3a; border-radius: 9px; padding: 4px; }
.sidebar-body { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; scrollbar-gutter: stable; padding: 4px 12px 14px 14px; }
.icon-button { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; text-decoration: none; }
.icon-button:hover, .nav-item:hover { color: var(--ink); background: var(--hover); }
.nav-toggle { border-color: var(--line); }
.nav-search { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; padding-left: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--bg); }
.nav-search input { border: 0; background: transparent; padding: 10px 5px; }
.nav-group + .nav-group { margin-top: 12px; }
.nav-heading { margin: 0 0 3px; padding: 0 9px; color: var(--muted); font-size: .7rem; font-weight: 750; }
.nav-item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 6px 9px; border: 0; border-radius: 8px; text-align: left; text-decoration: none; color: var(--muted); background: transparent; font-size: .84rem; line-height: 1.3; }
.nav-item[aria-current="page"] { background: var(--tint); color: var(--accent); box-shadow: inset 2px 0 var(--accent); font-weight: 700; }
.nav-empty { padding: 0 9px; }
.sidebar-footer { margin-top: auto; padding-top: 12px; }
.sidebar-tools { display: flex; gap: 4px; padding-bottom: 5px; }
.sidebar-account { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; border-top: 1px solid var(--line); padding-top: 8px; }
.account-profile { flex: 1; min-width: 0; padding-left: 4px; }
.account-copy { min-width: 0; }
.account-copy strong, .account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: var(--muted); font-size: .69rem; margin-top: 2px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--tint); color: var(--accent); font-weight: 750; }
.nav-collapsed .shell { grid-template-columns: 76px minmax(0, 1fr); }
.nav-collapsed .sidebar-brand { flex-direction: column; }
.nav-collapsed .wordmark, .nav-collapsed .nav-heading, .nav-collapsed .nav-search, .nav-collapsed .nav-label, .nav-collapsed .account-copy { display: none; }
.nav-collapsed .nav-item { justify-content: center; }
.nav-collapsed .sidebar-tools, .nav-collapsed .sidebar-account { flex-direction: column; align-items: center; }
.shell > main { width: 100%; max-width: 1440px; margin-inline: auto; padding: 28px clamp(16px, 3vw, 48px) 40px; }
.page-header { margin-bottom: 21px; }
.page-date { margin: 0 0 4px; color: var(--muted); font-size: .84rem; }
.page-date::first-letter { text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
h2 { margin: 0 0 10px; font-size: 1.15rem; letter-spacing: -.025em; }
p { color: var(--muted); line-height: 1.55; }
.card, .formation-card, .metric { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.card { padding: 20px; margin: 16px 0; }
.formation-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, .55fr); gap: 12px; align-items: center; margin-bottom: 18px; padding: clamp(18px, 3vw, 30px); color: #effcfa; background: linear-gradient(125deg, var(--hero), #18524f); border-color: #377669; }
.formation-card h2 { font-size: clamp(1.35rem, 2.7vw, 1.85rem); }
.formation-card p { margin: 0 0 12px; color: #cce7e2; font-size: .88rem; }
.formation-card .formation-next { color: #effcfa; font-weight: 700; }
.formation-card .formation-module { margin-bottom: 4px; }
.formation-card .actions { margin-top: 12px; }
.formation-card .primary { background: #94edda; border-color: #94edda; color: #10362e; }
.formation-card .secondary { background: transparent; border-color: #88b3ad; color: #effcfa; }
.formation-card :focus-visible { outline-color: #b0f9e8; }
.formation-progress { display: block; width: min(100%, 400px); height: 9px; margin-bottom: 6px; accent-color: #94edda; border: 0; border-radius: 10px; overflow: hidden; background: #365c60; }
.formation-progress::-webkit-progress-bar { background: #365c60; }
.formation-progress::-webkit-progress-value { background: #94edda; }
.keyboard-art { width: min(100%, 275px); height: auto; justify-self: center; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 10px; margin: 16px 0; }
.metric { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 14px; }
.metric small { color: var(--muted); font-size: .8rem; }
.metric strong { font-size: clamp(1.1rem, 1.6vw, 1.5rem); line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.icon-tile { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--accent); background: var(--tint); }
.dashboard-panels { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; }
.dashboard-panels .card { margin: 0; }
.week-period { font-size: .78rem; margin: 0; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(3px, 1vw, 10px); margin: 14px 0; padding: 0; list-style: none; }
.week-day { display: grid; grid-template-rows: auto 90px auto; gap: 5px; min-width: 0; text-align: center; font-size: .73rem; }
.week-day strong { font-size: .75rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.week-day small { color: var(--muted); font-size: inherit; }
.week-day[aria-current="date"] small { color: var(--accent); font-weight: 750; }
.week-bar { position: relative; overflow: hidden; min-width: 0; border-radius: 6px; background: var(--bg); }
.week-bar > div { position: absolute; inset: auto 0 0; background: var(--bar); border-radius: 6px 6px 0 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 9px 12px; min-height: 40px; border-radius: 8px; text-decoration: none; font-size: .85rem; font-weight: 700; }
.btn:hover { box-shadow: inset 0 0 0 1px currentColor; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
label { display: grid; gap: 7px; font-size: .85rem; font-weight: 650; margin: 12px 0; }
input { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--paper); }
form { max-width: 520px; }
.users { display: grid; gap: 8px; margin: 16px 0; }
.user { display: grid; grid-template-columns: 1fr 1.25fr .8fr; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; font-size: .85rem; }
.user span, .hint { color: var(--muted); }
.hint { font-size: .8rem; }
.sync-panel h2, .cloud-status h3 { display: flex; align-items: center; gap: .55rem; }
.sync-panel h2 .icon { order: -1; }
.sync-indicators { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; margin: 12px 0; }
.sync-indicators > div { min-width: 0; border: 1px solid var(--line); background: color-mix(in srgb, currentColor 6%, transparent); border-radius: 10px; padding: 10px; }
.sync-indicators dt { color: var(--muted); font-size: .78rem; }
.sync-indicators dd { margin: 6px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sync-consent { display: flex; align-items: flex-start; }
.sync-consent input { flex: none; width: 1em; height: 1em; margin: .2em 0 0; }
.badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; margin: 14px 0; }
.badge { display: grid; align-content: start; gap: 7px; border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
.badge[data-earned="true"] { background: var(--tint); }
.badge[data-earned="false"] .icon-tile { background: var(--bg); color: var(--muted); }
.badge small { color: var(--muted); }
.badge-state { font-size: .75rem; font-weight: 700; color: var(--accent); }
.badge[data-earned="false"] .badge-state { color: var(--muted); }
@media (max-width: 1060px) { .dashboard-panels { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .shell, .nav-collapsed .shell { grid-template-columns: 1fr; }
  .shell > aside { position: static; height: auto; border: 0; border-bottom: 1px solid var(--line); }
  .nav-collapsed .sidebar-brand { flex-direction: row; }
  .nav-collapsed .wordmark { display: block; }
  .nav-collapsed .sidebar-body { display: none; }
  .sidebar-body { overflow: visible; }
  .sidebar-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
  .sidebar-account { padding-top: 0; border-top: 0; }
  .nav-item { min-height: 44px; }
  .shell > main { padding-top: 18px; }
  .user { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 490px) {
  .formation-card { grid-template-columns: 1fr; }
  .keyboard-art { display: none; }
  .card { padding: 14px; }
}
