/* Compatibility for the original Buddy design on the protected FastAPI pages. */
[hidden] { display: none !important; }
body > svg[width="0"] { position: absolute; }
.meter i:nth-child(1), .meter i:nth-child(5) { --m: .45; }
.meter i:nth-child(2), .meter i:nth-child(4) { --m: .75; }
.meter i:nth-child(3) { --m: 1; }
a { color: var(--violet); }
.logo, .btn, .tab, .button { text-decoration: none; }
.logo { color: var(--ink); }
.inline-form { display: inline-flex; margin: 0; }
.skip-link { position: absolute; top: -80px; left: 12px; z-index: 100; background: white; padding: 10px; }
.skip-link:focus { top: 8px; }
.buddy-main { outline: none; min-width: 0; }
.buddy-main > .card + .card, .section-gap { margin-top: 16px; }
.buddy-main h1 { font-size: 26px; }
.buddy-main h2 { font-size: 20px; }
.heading-row, .actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.actions { justify-content: flex-start; margin: 14px 0; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.table-scroll a { display: inline-block; }
.auth-form { display: grid; gap: 10px; }
.auth-form input, .auth-form select, .filters input, .filters select { min-width: 0; padding: 11px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--field); }
.auth-form label { font-weight: 800; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 16px 0; }
.filters label { display: grid; gap: 5px; font-size: 13px; font-weight: 800; }
.button, .auth-form button, .filters button { display: inline-flex; justify-content: center; align-items: center; padding: 12px 22px; border: 0; border-radius: 999px; background: linear-gradient(135deg,var(--brand-2),var(--brand)); color: #fff; font-weight: 800; }
.form-card { max-width: 620px; }
.reference, .empty-state { color: var(--muted); font-size: 13px; line-height: 1.6; }
.eyebrow { color: var(--muted); font-weight: 800; font-size: 13px; }
.metric-grid, .score-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 12px; }
dl { margin: 14px 0; } dt { color: var(--muted); font-size: 13px; } dd { margin: 4px 0; font-size: 22px; font-weight: 800; }
.trend-figure { margin: 0; } .trend-figure figcaption { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.trend-figure svg { display: block; width: 100%; max-height: 250px; }
.trend-figure svg text { fill: var(--muted); font-family: var(--font); font-size: 11px; }
path.chart-axis { fill: none; stroke: var(--line); } .chart-line { fill: none; stroke: var(--violet); stroke-width: 3; } .chart-point { fill: var(--violet); }
.pagination { display: flex; gap: 14px; margin: 16px 0 0; align-items: center; flex-wrap: wrap; }
.buddy-profile .profile-hero h1 { margin: 0; font-size: 24px; }
.buddy-profile .profile-hero .meta { margin: 5px 0; }
.buddy-profile .medal { margin: 4px 0 12px; }
.buddy-profile .stat .value { font-size: 24px; font-family: var(--display); color: var(--ink); }
.buddy-profile .stat small { display: block; color: var(--muted); font-weight: 800; }
.buddy-profile .skill-score { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.buddy-profile .history-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.buddy-profile .history-entry:last-child { border-bottom: 0; }
.buddy-profile .history-entry small { display: block; color: var(--muted); }
.buddy-room .session-tools { margin-bottom: 0; }
.buddy-room .session-clock { width: 100%; text-align: right; font-size: 13px; }
.buddy-room .status-pill { font-size: 16px; }
.buddy-room .chat p { font-size: 13px; margin: 6px 0 0; }
.buddy-room .type-row button { flex-shrink: 0; }
.buddy-room .buddy-recovery { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.buddy-room #transcript { list-style: none; margin: 0; }
.buddy-room .goal .muted { font-size: 12px; margin: 4px 0 0; }
.buddy-room .modal .controls a { text-align: center; }
.school-context { margin: -4px 0 18px; color: var(--muted); font-size: 13px; }
.school-footer { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; font-size: 13px; }
.school-report .week td { text-align: center; }
.school-report .week .completed { background: var(--green-soft); color: #137a54; }
.school-report .week .practised { background: var(--amber-soft); color: #8a5a00; }
.school-report .week .no-saved-activity { background: var(--red-soft); color: #a8282d; }
.school-report .week td span { display: inline-block; min-width: 42px; padding: 5px 6px; border-radius: 9px; }
.file-picker { max-width: 100%; display: block; margin: 12px 0; }
.level-distribution { display: flex; align-items: end; gap: 8px; min-height: 170px; padding: 16px 0 0; }
.level-column { flex: 1; min-width: 0; text-align: center; font-size: 12px; color: var(--muted); }
.level-column b { display: block; padding: 10px 0; color: var(--violet); background: var(--violet-soft); border-radius: 9px; }
.stat .ico { background: var(--sky-soft); }
.stat:nth-child(2) .ico { background: var(--green-soft); }
.stat:nth-child(3) .ico { background: var(--amber-soft); }
.session-item { color: var(--ink); text-decoration: none; }
.settings-goal { max-width: 520px; }
.settings-goal .form-row input[type="number"] { width: 100px; }
@media (max-width:640px) { .admin { padding: 16px 12px 48px; } .tabs { border-radius: 22px; max-width: 100%; } .tab { padding: 8px 11px; } .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; } .toolbar label { flex-wrap: wrap; } .toolbar input { max-width: 180px; } .card { min-width: 0; } .heading-row { align-items: flex-start; } .filters label { max-width: 100%; } }
