/* OxenEdu family workspace: OxenKoç shell and OxenDers workspace navigation. */
:root {
  font-family: 'DM Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  color: #f7f8fb;
  background: #202938;
  --ink: #f7f8fb;
  --navy: #14243a;
  --orange: #ffad77;
  --muted: #b8c5d5;
  --line: #ffffff25;
  --surface: #354154;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100dvh; font-size: 14px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Manrope, 'DM Sans', Inter, system-ui, sans-serif; letter-spacing: -.04em; }
p { line-height: 1.75; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:is(button, a, input, select, textarea):focus-visible { outline: 2px solid #ffbf94; outline-offset: 3px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 10001; padding: 12px 18px; border: 1px solid #596779; border-radius: 10px; background: #354154; color: #fff; }
.skip-link:focus { top: 12px; }
.initial-loading, .state-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; gap: 18px; padding: 32px; text-align: center; }
.initial-loading p, .state-page > p:not(.eyebrow) { color: var(--muted); }
.state-page > p:not(.eyebrow) { max-width: 560px; }
.state-page h1 { margin: 0; font-size: 32px; line-height: 1.3; }
.state-page > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.spinner { width: 25px; height: 25px; border: 2px solid #ffffff30; border-top-color: var(--orange); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-notice { padding: 12px; border: 1px solid #ebd0a5; border-radius: 10px; background: #fff0d7; color: #805726; font-size: 12px; }
.ox-auth__trust svg { width: 23px; height: 23px; }

.workspace { color-scheme: dark; }
.family-workspace {
  display: block;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px clamp(12px, 1.5vw, 32px) 52px;
  background: #202938;
  color: #f7f8fb;
}
.family-workspace__header, .family-workspace__nav {
  max-width: 1920px;
  margin-inline: auto;
  border: 1px solid #ffffff25;
  border-radius: 24px;
  background: linear-gradient(130deg, #3a485c, #344054);
  box-shadow: inset 0 1px 0 #ffffff12;
}
.family-workspace__header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 138px; padding: 22px 30px; }
.family-workspace__identity { display: flex; flex: 1; align-items: center; min-width: 0; gap: 18px; }
.family-workspace__avatar { display: grid; place-items: center; flex: none; width: 76px; height: 76px; border: 1px solid #ffffff24; border-radius: 20px; background: linear-gradient(145deg, #a9d6ff38, #a9d6ff12); color: #e4f4ff; font-size: 25px; font-weight: 800; text-transform: uppercase; }
.family-workspace__person { display: grid; min-width: 0; gap: 3px; }
.family-workspace__person > span { color: #ffad77; font-size: 12px; font-weight: 800; letter-spacing: .17em; }
.family-workspace__person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font: 800 clamp(24px, 2.25vw, 37px) Manrope, 'DM Sans', system-ui, sans-serif; letter-spacing: -.04em; }
.family-workspace__person small { color: #c2cbd7; font-size: 16px; overflow-wrap: anywhere; }
.family-workspace__actions { display: flex; flex: none; gap: 10px; }
.family-workspace__actions :is(a, button) { display: grid; place-items: center; width: 66px; height: 66px; padding: 0; border: 1px solid #ffffff24; border-radius: 17px; background: #ffffff0b; color: #f8f3ef; }
.family-workspace__actions :is(a, button):hover { border-color: #ffad7780; background: #ffad7721; }
.family-workspace__actions svg { width: 25px; height: 25px; }
.family-workspace__nav { display: flex; gap: 12px; margin-top: 18px; padding: 16px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #69788d transparent; }
.family-workspace__nav :is(a, button) { position: relative; display: flex; flex: 1 0 0; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 142px; min-height: 98px; padding: 12px 14px; border: 1px solid #ffffff32; border-radius: 17px; background: linear-gradient(145deg, #ffffff13, #ffffff05), #2836499c; color: #f1f4f8; font-size: 14px; font-weight: 750; line-height: 1.45; text-align: center; box-shadow: inset 0 1px 0 #ffffff17; }
.family-workspace__nav :is(a, button):not(.active):hover { border-color: #ffad7780; background: linear-gradient(145deg, #ffffff1b, #ffffff0b), #344257b8; }
.family-workspace__nav .active { border-color: #ffae758c; background: linear-gradient(180deg, #ffab7326, #ffab730b); color: #ffe0c8; box-shadow: inset 0 1px 0 #ffffff09; }
.family-workspace__nav .active:hover { border-color: #ffae75b3; background: linear-gradient(180deg, #ffab7330, #ffab7314); }
.family-workspace__nav svg { width: 23px; height: 23px; color: #cbd7e5; }
.family-workspace__nav .active svg { color: #ffbc8c; }
.family-workspace__nav small { position: absolute; top: 9px; right: 10px; min-width: 20px; padding: 2px 5px; border-radius: 6px; background: #ffad7736; font-size: 10px; }
.family-workspace__links { display: flex; justify-content: flex-end; gap: 18px; max-width: 1920px; margin: 10px auto 0; color: #aebed0; font-size: 12px; font-weight: 700; }
.family-workspace__links a:hover { color: #ffbf94; }
.main-content { max-width: 1920px; min-width: 0; margin-inline: auto; padding: 30px 0 40px; outline: none; }

/* The same dark card hierarchy as the teaching and coaching workspaces. */
.page-heading, .panel, .metric-card, .overview-card, .overview-intro {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff0b, #ffffff03), #323f52eb;
  box-shadow: inset 0 1px 0 #ffffff0e, 0 14px 32px #101a2a22;
}
.eyebrow { margin-bottom: 10px; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 132px; margin: 0 0 24px; padding: 26px 30px; }
.page-heading > div { min-width: 0; }
.page-heading h1 { margin: 7px 0 10px; color: #f7f8fb; font-size: clamp(32px, 3vw, 46px); line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.page-heading p:last-child { margin-bottom: 0; color: #bec8d6; font-size: 14px; }
.date-pill { display: inline-flex; flex-shrink: 0; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #ffffff25; border-radius: 10px; background: #ffffff09; color: #c4d0df; font-size: 12px; font-weight: 700; white-space: nowrap; }
.date-pill svg { width: 17px; height: 17px; color: var(--orange); }
.family-overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; margin-bottom: 24px; }
.overview-intro, .overview-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; padding: 26px 30px; }
.overview-intro h1 { margin: 7px 0 14px; font-size: clamp(32px, 3vw, 46px); font-weight: 800; line-height: 1.2; }
.overview-intro h2, .overview-card h2 { margin: 4px 0 14px; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.3; font-weight: 800; }
.overview-intro p, .overview-card p { max-width: 720px; margin-bottom: 18px; color: #bec8d6; font-size: 14px; }
.overview-intro p strong, .overview-card p strong { color: #f7f8fb; font-weight: 750; }
.overview-intro p:last-child, .overview-card p:last-child { margin-bottom: 0; }
.overview-card > svg { width: 31px; height: 31px; margin-bottom: 17px; color: var(--orange); }
.overview-card--accent { border-color: #ffad7742; background: linear-gradient(135deg, #ffad7716, #ffad7703), #354154; }
.overview-card--accent .eyebrow { color: #ffbd8c; }
.student-switcher { margin-bottom: 24px; }
.student-switcher > div { display: flex; flex-wrap: wrap; gap: 12px; }
.child-chip { display: flex; align-items: center; gap: 12px; min-height: 69px; min-width: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: #2d3b4f; color: #dce5ef; text-align: left; }
.child-chip.selected { border-color: #ffad7770; background: #3c495c; }
.child-chip strong { display: block; font-size: 14px; font-weight: 750; }
.child-chip small { display: block; margin-top: 4px; color: #b8c5d5; font-size: 12px; }
.child-chip > svg { width: 18px; height: 18px; margin-left: 12px; color: var(--orange); }
.lesson-open { margin-top: 12px; }
.lesson-loading { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 230px; }
.lesson-loading p { margin: 0; color: var(--muted); }
.lesson-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.lesson-details .panel { min-width: 0; }
.lesson-details p { margin-bottom: 0; }
.lesson-pdf-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.lesson-pdf-links h2 { margin-bottom: 8px; font-size: 22px; }
.lesson-pdf-links p { margin: 0; color: var(--muted); }
.lesson-page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.lesson-page-toolbar strong { color: #f7f8fb; text-align: center; }
.lesson-page-warning { padding: 12px 16px; border: 1px solid #ffad7742; border-radius: 12px; background: #ffad7710; color: #ffe0c8; font-size: 13px; }
.lesson-paper-scroll { max-width: 1000px; margin-inline: auto; overflow: auto; border: 1px solid #ffffff24; border-radius: 6px; background: #fff; }
#lesson-canvas { display: block; width: 100%; height: auto; background: #fff; }
.child-avatar, .teacher-avatar, .account-avatar { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border: 1px solid #a9d6ff25; border-radius: 12px; background: #8fbbff22; color: #c4deff; font-size: 13px; font-weight: 800; }
.tone-1 { border-color: #ffad7730; background: #ffad7722; color: #ffd7b7; }
.tone-2 { border-color: #82d6b630; background: #82d6b622; color: #bef5db; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 10px 16px; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 800; line-height: 1.5; }
.button svg { width: 18px; height: 18px; }
.primary { border-color: #ffab73; background: #ffab73; color: #291b14; box-shadow: 0 8px 20px #ffab731a; }
.primary:hover { background: #ffc08f; }
.secondary { border-color: #63758b; background: #273548; color: #f3f6fb; }
.secondary:hover { background: #40516a; }
.text-button { display: inline-flex; align-items: center; gap: 8px; padding: 5px 0; border: 0; background: none; color: #ffd0af; font-size: 12px; font-weight: 700; line-height: 1.6; }
.text-button:hover { text-decoration: underline; }
.text-button svg { width: 16px; height: 16px; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: #ffffff0b; color: #d7e1ee; }
.icon-button:hover { border-color: #ffad7780; color: #ffd0af; }
.muted { color: var(--muted); font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid #ffffff20; border-radius: 7px; background: #ffffff14; color: #c4d0df; font-size: 11px; font-weight: 750; line-height: 1.4; }
.pill.orange { border-color: #ffad7730; background: #ffad7726; color: #ffd0ab; }
.pill.green { border-color: #6ac79e30; background: #6ac79e26; color: #a3e7c3; }
.pill.red { border-color: #f39a9230; background: #f39a9226; color: #ffd0c8; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'title icon' 'value icon' 'hint hint'; align-items: center; min-width: 0; min-height: 180px; padding: 24px; color: #f7f8fb; text-align: left; transition: transform .15s, border-color .15s; }
.metric-card:hover { transform: translateY(-2px); border-color: #ffad7770; }
.metric-icon { grid-area: icon; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid #a9d6ff25; border-radius: 13px; background: #a9d6ff20; color: #cce9ff; }
.metric-icon svg { width: 24px; height: 24px; }
.metric-icon.wallet { border-color: #ffad7730; background: #ffad771c; color: #ffba8e; }
.metric-icon.book { border-color: #82d6b630; background: #82d6b620; color: #bef5db; }
.metric-icon.chart { border-color: #d9c1ff25; background: #d9c1ff20; color: #dfceff; }
.metric-card > span:not(.metric-icon) { grid-area: title; min-width: 0; padding-right: 8px; color: #c7d2e0; font-size: 13px; font-weight: 700; }
.metric-card > strong { grid-area: value; min-width: 0; margin: 9px 0; font: 800 32px Manrope, 'DM Sans', system-ui, sans-serif; letter-spacing: -.04em; overflow-wrap: anywhere; }
.metric-card > small { grid-area: hint; margin-top: 7px; padding-top: 14px; border-top: 1px solid #ffffff1c; color: #b8c5d5; font-size: 12px; line-height: 1.6; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 24px; }
.dashboard-grid > div, .dashboard-grid > aside { min-width: 0; }
.panel { min-width: 0; margin-bottom: 24px; padding: 26px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; color: #f7f8fb; font-size: 22px; font-weight: 750; line-height: 1.3; }
.panel-heading .text-button { flex-shrink: 0; }
.panel-copy { margin-top: 20px; color: #b8c5d5; font-size: 13px; line-height: 1.8; }
.homework-list { display: grid; gap: 16px; }
.homework-card { min-width: 0; padding: 20px; border: 1px solid #ffffff20; border-radius: 15px; background: #273548; }
.item-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.item-heading > small { color: #adbbce; font-size: 12px; }
.homework-card h3 { margin-bottom: 10px; font-size: 16px; font-weight: 750; line-height: 1.5; }
.homework-card p { margin-bottom: 0; color: #bec8d6; font-size: 14px; line-height: 1.8; }
.homework-card .muted { margin-bottom: 9px; color: #d5c3b5; font-size: 12px; }
.homework-card details { margin-top: 16px; color: #ffcfad; font-size: 13px; }
.homework-card summary { cursor: pointer; }
.homework-card details p { margin-top: 12px; }
.teacher-profile { display: flex; align-items: center; gap: 13px; }
.teacher-profile > div { min-width: 0; }
.teacher-profile h3 { margin-bottom: 5px; font-size: 15px; font-weight: 750; }
.teacher-profile p { margin: 0; color: #b8c5d5; font-size: 13px; }
.connection-status { display: flex; align-items: center; gap: 8px; padding-top: 18px; border-top: 1px solid #ffffff20; color: #b5dcc7; font-size: 12px; }
.connection-status svg { width: 17px; height: 17px; }
.family-note > svg { width: 28px; height: 28px; margin-bottom: 18px; color: var(--orange); }
.family-note h3 { margin-bottom: 16px; color: #f7f8fb; font-size: 27px; font-weight: 800; line-height: 1.3; }
.family-note p { margin-bottom: 0; color: #b8c5d5; font-size: 13px; line-height: 1.85; }

.exam-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid #ffffff20; }
.exam-row:first-child { padding-top: 0; }
.exam-row:last-child { padding-bottom: 0; border-bottom: 0; }
.exam-icon { display: grid; place-items: center; width: 40px; height: 42px; border-radius: 11px; background: #d9c1ff20; color: #dfceff; }
.exam-icon svg { width: 21px; height: 21px; }
.exam-row h3 { margin: 0 0 5px; font-size: 14px; font-weight: 750; line-height: 1.6; letter-spacing: -.02em; overflow-wrap: anywhere; }
.exam-row small { color: #adbbce; font-size: 12px; }
.exam-result { text-align: right; }
.exam-result strong { display: block; margin-bottom: 5px; color: #b5e4cc; font-size: 23px; font-weight: 800; }
.exam-result small { font-size: 11px; }
.exam-chart { display: flex; align-items: end; gap: 24px; height: 250px; padding: 20px 18px 0; border-bottom: 1px solid #ffffff25; }
.exam-chart > div { display: grid; flex: 1; grid-template-rows: 22px minmax(0, 1fr) 36px; align-items: end; gap: 10px; min-width: 0; height: 100%; text-align: center; }
.exam-chart span { color: #e7d3c4; font-size: 13px; }
.exam-chart i { width: 100%; max-width: 60px; height: var(--score); min-height: 2px; justify-self: center; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #ffbf91, #9f765c); }
.exam-chart > div:last-child i { background: linear-gradient(180deg, #bee6d0, #739f8b); }
.exam-chart small { align-self: center; color: #b8c5d5; font-size: 11px; line-height: 1.4; }
.chart-caption, .footnote { margin: 16px 0 0; color: #adbbce; font-size: 12px; line-height: 1.8; }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; min-width: 500px; border-collapse: collapse; font-size: 13px; text-align: left; }
thead th { padding: 14px 12px; border-bottom: 1px solid #ffffff25; color: #adbbce; font-size: 12px; font-weight: 750; white-space: nowrap; }
tbody :is(th, td) { padding: 18px 12px; border-bottom: 1px solid #ffffff20; line-height: 1.7; }
tbody th { min-width: 150px; font-weight: 750; }
tbody td { color: #c4d0df; }
tbody tr:last-child :is(th, td) { border-bottom: 0; }
.positive { color: #a3e7c3 !important; }
.topic-list > div { display: flex; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid #ffffff20; }
.topic-list > div:last-child { border-bottom: 0; }
.topic-state { display: grid; place-items: center; flex-shrink: 0; width: 31px; height: 31px; border: 1px solid #ffffff30; border-radius: 50%; color: #adbbce; }
.topic-state.done { border-color: #82d6b640; background: #82d6b620; color: #a3e7c3; }
.topic-state svg { width: 18px; height: 18px; }
.topic-list strong { display: block; font-size: 14px; font-weight: 750; line-height: 1.6; }
.topic-list small { display: block; margin-top: 4px; color: #adbbce; font-size: 12px; }
.topic-list .pill { flex-shrink: 0; margin-left: auto; white-space: nowrap; }
.goal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.goal-grid span { display: block; margin-bottom: 10px; color: #b8c5d5; font-size: 12px; }
.goal-grid strong { font-size: 15px; font-weight: 750; line-height: 1.7; }
.attendance-summary { display: flex; align-items: center; gap: 24px; margin-bottom: 10px; padding-bottom: 24px; border-bottom: 1px solid #ffffff20; }
.attendance-summary > strong { color: #b5e4cc; font-size: 44px; font-weight: 800; letter-spacing: -.04em; }
.attendance-summary > p { margin: 0; color: #b8c5d5; font-size: 14px; }
.attendance-list article { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid #ffffff20; }
.attendance-list article:last-child { border-bottom: 0; }
.date-tile { display: grid; place-items: center; flex-shrink: 0; width: 43px; height: 47px; border: 1px solid #a9d6ff30; border-radius: 11px; background: #a9d6ff16; color: #c9e7ff; }
.date-tile svg { width: 21px; height: 21px; }
.attendance-list h3 { margin: 0 0 6px; font-size: 15px; font-weight: 750; }
.attendance-list small { color: #b8c5d5; font-size: 12px; }
.attendance-list .pill { flex-shrink: 0; margin-left: auto; white-space: nowrap; }
.finance-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.finance-metrics .panel { display: flex; flex-direction: column; gap: 13px; }
.finance-metrics .panel > span { color: #c4d0df; font-size: 13px; }
.finance-metrics strong { font: 800 36px Manrope, 'DM Sans', system-ui, sans-serif; letter-spacing: -.04em; overflow-wrap: anywhere; }
.finance-metrics .balance-card { border-color: #ffad7740; background: linear-gradient(135deg, #ffad7716, #ffad7703), #354154; }
.balance-card strong { color: #ffd0ab; }
.balance-card small { color: #c4c7d0; font-size: 12px; line-height: 1.7; }

.empty-state { max-width: 590px; margin: auto; padding: 32px 16px; text-align: center; }
.empty-state > svg { width: 35px; height: 35px; margin-bottom: 17px; color: var(--orange); }
.empty-state h3 { margin-bottom: 12px; font-size: 20px; font-weight: 750; }
.empty-state p { margin: 0; color: #b8c5d5; font-size: 13px; line-height: 1.85; }
.connection-empty { padding: 44px 26px; }
.connection-empty > .muted { text-align: center; }
.account-card { display: flex; align-items: center; gap: 16px; }
.account-card .account-avatar { width: 48px; height: 48px; font-size: 16px; }
.account-card h3 { margin: 0 0 7px; font-size: 17px; }
.account-card p { margin: 0; color: #b8c5d5; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-grid.narrow { max-width: 440px; grid-template-columns: 1fr; }
.form-grid label, .created-invite label { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: #d8e2ed; font-size: 12px; font-weight: 750; }
.form-grid :is(input, select, textarea), .created-invite input { width: 100%; min-width: 0; min-height: 46px; padding: 12px 13px; border: 1px solid #617085; border-radius: 10px; background: #263246; color: #f7f8fb; font-size: 14px; line-height: 1.5; color-scheme: dark; }
.form-grid input::placeholder { color: #adbbce; font-size: 13px; font-weight: 400; }
.form-grid small { color: #adbbce; font-size: 12px; font-weight: 400; line-height: 1.7; }
.form-grid > .button { align-self: end; justify-self: start; }
.form-grid .checkbox-label { flex-direction: row; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; }
.form-grid .checkbox-label input { flex-shrink: 0; width: 17px; min-height: 17px; height: 17px; accent-color: #ffad77; }
.created-invite p { color: #b8c5d5; font-size: 14px; }
.created-invite .button { margin-top: 18px; }
.guardian-list article { display: flex; align-items: center; gap: 15px; padding: 18px 0; border-bottom: 1px solid #ffffff20; }
.guardian-list article:last-child { border-bottom: 0; }
.guardian-list article > div { min-width: 0; }
.guardian-list h3 { margin: 0 0 5px; font-size: 15px; }
.guardian-list p { margin: 0 0 5px; color: #b8c5d5; font-size: 13px; overflow-wrap: anywhere; }
.guardian-list small { color: #adbbce; font-size: 12px; }
.guardian-list .button { margin-left: auto; white-space: nowrap; }
.demo-banner, .error-banner, .invite-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding: 14px 18px; border-radius: 12px; font-size: 13px; line-height: 1.7; }
.demo-banner { border: 1px solid #ffad7740; background: #ffad7710; color: #d9c5b6; }
.demo-banner button { padding: 0; border: 0; background: none; color: #ffd0af; font-size: 12px; font-weight: 750; }
.error-banner { border: 1px solid #eaa8a245; background: #eaa8a20b; color: #f3c0bb; }
.error-banner p, .invite-banner p { margin: 0; }
.invite-banner { border: 1px solid #82d6b640; background: #82d6b610; }
.invite-banner > div { display: flex; align-items: center; gap: 14px; }
.invite-banner small { display: block; color: #b8c5d5; font-size: 12px; }
.loading-strip { margin-bottom: 20px; color: #c4d0df; font-size: 13px; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1920px; margin-inline: auto; padding: 8px 4px 0; color: #aebbc9; font-size: 12px; line-height: 1.7; }
.workspace-footer > span:first-child { font-size: 14px; color: #c4d0df; }
.workspace-footer b { color: var(--orange); font-weight: 750; }
.workspace-footer i { margin: 0 10px; color: #91a3bb; font-style: normal; }
.workspace-footer .text-button { font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 25px; }
dialog { width: calc(100% - 32px); max-width: 500px; padding: 28px; border: 1px solid #ffffff35; border-radius: 20px; background: linear-gradient(145deg, #3c4a60, #2d3b50); color: #f7f8fb; box-shadow: 0 24px 80px #0008; }
dialog::backdrop { background: #07111dd9; backdrop-filter: blur(7px); }
dialog h2 { font-size: 23px; font-weight: 800; line-height: 1.4; }
dialog p { color: #b8c5d5; font-size: 13px; line-height: 1.9; }

/* Shared bottom quick menu, matching the teaching workspace. */
.family-quick-menu { position: fixed; inset: auto 0 0; width: min(920px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 16px); margin: 0 auto; overflow: auto; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); border: 1px solid #ffffff35; border-radius: 24px 24px 0 0; background: linear-gradient(145deg, #354154, #202d40); color: #f7f8fb; box-shadow: 0 -20px 90px #060d18b8; }
.family-quick-menu[open] { animation: family-menu-rise 360ms cubic-bezier(.22, 1, .36, 1) both; }
.family-quick-menu::backdrop { background: #071320d9; backdrop-filter: blur(8px); }
@keyframes family-menu-rise { from { opacity: .65; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }
.family-quick-menu header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.family-quick-menu header span { color: var(--orange); font-size: 12px; font-weight: 800; letter-spacing: .17em; }
.family-quick-menu h2 { margin: 8px 0 5px; color: #fff; font-size: 27px; line-height: 1.2; }
.family-quick-menu p { margin: 0; color: #b9c5d3; font-size: 13px; }
.family-quick-menu header button { flex: none; width: 46px; height: 46px; padding: 0; border: 1px solid #ffffff28; border-radius: 13px; background: #ffffff0d; color: #e4eaf1; font-size: 28px; }
.family-quick-menu__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.family-quick-menu__grid :is(a, button) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 142px; padding: 14px 10px; border: 1px solid #ffffff20; border-radius: 18px; background: #18273bbb; color: #f7f8fb; text-align: center; }
.family-quick-menu__grid :is(a, button):hover { border-color: #ffad7780; background: #ffad7715; }
.family-quick-menu__grid i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #ffab7323; color: #ffb480; font-style: normal; }
.family-quick-menu__grid i svg { width: 24px; height: 24px; }
.family-quick-menu__grid strong { font-size: 14px; }
.family-quick-menu__grid small { color: #b1bece; font-size: 11px; line-height: 1.35; }
.family-quick-menu__dismiss { width: 100%; min-height: 48px; margin-top: 14px; border: 0; border-radius: 13px; background: linear-gradient(180deg, #ff9b5d, #ff730e); color: #192337; font-weight: 800; }

/* Common notification appearance and 5.5 second progress are preserved. */
.toast-root{position:fixed;z-index:10000;top:max(20px,env(safe-area-inset-top));right:max(20px,env(safe-area-inset-right));display:grid;gap:10px;width:min(380px,calc(100vw - 32px));pointer-events:none}.oxen-toast{--toast-accent:#9cbbff;position:relative;display:grid;grid-template-columns:22px minmax(0,1fr) 24px;gap:13px;overflow:hidden;min-height:76px;padding:17px 12px 20px 17px;border:1px solid #ffffff25;border-left:3px solid var(--toast-accent);border-radius:15px;background:#2b3749;color:#f7f8fb;box-shadow:0 12px 40px #050b164d;font:13px/1.55 'DM Sans',sans-serif;pointer-events:auto}.oxen-toast--success{--toast-accent:#69d9a5}.oxen-toast--warning{--toast-accent:#efc275}.oxen-toast--error{--toast-accent:#ff9696}.oxen-toast__symbol{display:grid;place-items:center;width:22px;height:22px;border:2px solid var(--toast-accent);border-radius:50%;color:var(--toast-accent);font-size:13px;font-weight:800;line-height:1}.oxen-toast__close{width:24px;height:24px;min-height:24px;padding:0;border:0;background:transparent;color:#d6deea;font-size:23px;line-height:1}.oxen-toast__copy{overflow-wrap:anywhere}.oxen-toast__progress{position:absolute;left:0;bottom:0;height:3px;background:var(--toast-accent);animation:toast-count 5.5s linear forwards}@keyframes toast-count{from{width:100%}to{width:0}}

@media (max-width: 1100px) {
  .metric-card { padding: 22px; }
  .metric-icon { width: 39px; height: 40px; }
  .metric-icon svg { width: 21px; height: 21px; }
  .metric-card > strong { font-size: 30px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 20px; }
  .family-overview { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 20px; }
  .finance-metrics strong { font-size: 30px; }
}

@media (max-width: 950px) {
  .family-workspace__header { min-height: 112px; padding: 16px 18px; }
  .family-workspace__avatar { width: 58px; height: 58px; font-size: 20px; }
  .family-workspace__actions :is(a, button) { width: 48px; height: 48px; }
  .family-workspace__nav { margin-top: 16px; }
  .family-workspace__person small { font-size: 14px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .family-overview, .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid > aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
  .panel { padding: 24px; }
  .form-grid { gap: 20px; }
  .goal-grid { gap: 20px; }
  .finance-metrics { gap: 16px; }
  .finance-metrics strong { font-size: 28px; }
}

@media (max-width: 600px) {
  .family-workspace { padding: 12px 12px 36px; }
  .family-workspace__header { gap: 10px; min-height: 86px; padding: 12px; border-radius: 18px; }
  .family-workspace__identity { gap: 9px; }
  .family-workspace__avatar { width: 43px; height: 43px; border-radius: 13px; font-size: 15px; }
  .family-workspace__person > span { font-size: 9px; }
  .family-workspace__person strong { font-size: 17px; }
  .family-workspace__person small { display: none; }
  .family-workspace__actions { gap: 5px; }
  .family-workspace__actions :is(a, button) { width: 37px; height: 37px; border-radius: 11px; }
  .family-workspace__actions svg { width: 19px; height: 19px; }
  .family-workspace__nav { gap: 7px; margin-top: 12px; padding: 8px; border-radius: 18px; }
  .family-workspace__nav :is(a, button) { flex-basis: 120px; min-width: 120px; min-height: 77px; padding: 7px; border-radius: 13px; font-size: 12px; }
  .family-workspace__nav svg { width: 19px; height: 19px; }
  .family-workspace__links { flex-wrap: wrap; gap: 12px; font-size: 11px; }
  .main-content { padding: 22px 0 30px; }
  .page-heading { flex-direction: column; align-items: start; min-height: 0; gap: 17px; margin-bottom: 20px; padding: 22px 19px; border-radius: 18px; }
  .page-heading h1 { font-size: 32px; }
  .page-heading .eyebrow { font-size: 10px; letter-spacing: .12em; }
  .page-heading p:last-child { font-size: 13px; }
  .page-heading > .button { width: 100%; }
  .family-overview { gap: 16px; margin-bottom: 20px; }
  .overview-card, .overview-intro { padding: 22px 19px; border-radius: 18px; }
  .overview-intro h1 { font-size: 32px; }
  .overview-card h2, .overview-intro h2 { font-size: 25px; }
  .overview-card p, .overview-intro p { font-size: 13px; }
  .student-switcher { margin-bottom: 20px; }
  .lesson-details { gap: 0; }
  .lesson-pages { padding: 12px; }
  .lesson-page-toolbar { gap: 6px; }
  .lesson-page-toolbar .button { padding-inline: 10px; font-size: 12px; }
  .lesson-page-toolbar strong { font-size: 12px; }
  .lesson-pdf-links .button { width: 100%; }
  .student-switcher > div { flex-wrap: nowrap; overflow-x: auto; gap: 10px; padding-bottom: 5px; }
  .child-chip { flex-shrink: 0; max-width: 100%; min-height: 64px; padding: 11px 12px; gap: 10px; }
  .child-chip strong { font-size: 13px; }
  .child-chip small { font-size: 11px; }
  .child-chip > svg { margin-left: 5px; }
  .child-avatar { width: 36px; height: 38px; font-size: 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
  .metric-card { grid-template-areas: 'title icon' 'value value' 'hint hint'; min-height: 166px; padding: 18px 15px 15px; border-radius: 18px; }
  .metric-card > span:not(.metric-icon) { font-size: 12px; }
  .metric-card > strong { margin-top: 12px; font-size: 29px; }
  .metric-card > small { padding-top: 11px; font-size: 11px; }
  .metric-icon { width: 31px; height: 33px; border-radius: 10px; }
  .metric-icon svg { width: 18px; height: 18px; }
  .dashboard-grid { gap: 0; }
  .dashboard-grid > aside { display: block; }
  .panel { margin-bottom: 20px; padding: 22px 19px; border-radius: 18px; }
  .panel-heading { align-items: start; gap: 12px; }
  .panel-heading h2 { font-size: 20px; }
  .panel-heading .text-button { font-size: 11px; white-space: nowrap; }
  .homework-card { padding: 18px 15px; }
  .homework-card h3 { font-size: 15px; }
  .homework-card p { font-size: 13px; }
  .item-heading > small { font-size: 11px; }
  .family-note h3 { font-size: 25px; }
  .exam-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; }
  .exam-icon { width: 33px; height: 36px; }
  .exam-icon svg { width: 18px; height: 18px; }
  .exam-row h3 { font-size: 13px; }
  .exam-row small { font-size: 11px; }
  .exam-result strong { font-size: 21px; }
  .exam-result small { font-size: 10px; }
  .exam-chart { height: 225px; gap: 9px; padding-inline: 0; }
  .exam-chart span { font-size: 11px; }
  .exam-chart small { font-size: 10px; }
  .topic-list > div { flex-wrap: wrap; gap: 10px; }
  .topic-list > div > span:nth-child(2) { flex: 1; min-width: 0; }
  .topic-list strong { font-size: 13px; }
  .topic-list small { font-size: 11px; }
  .topic-list .pill { margin-left: 41px; font-size: 10px; }
  .goal-grid, .finance-metrics, .form-grid { grid-template-columns: 1fr; }
  .finance-metrics { gap: 0; }
  .finance-metrics strong { font-size: 32px; }
  .attendance-summary { gap: 16px; }
  .attendance-summary > strong { font-size: 38px; }
  .attendance-summary > p { font-size: 13px; }
  .attendance-list article { gap: 10px; }
  .attendance-list h3 { font-size: 14px; }
  .attendance-list small { font-size: 11px; }
  .attendance-list .pill { font-size: 10px; }
  .date-tile { width: 37px; height: 42px; }
  .form-grid :is(input, select, textarea), .created-invite input { font-size: 16px; }
  .form-grid .checkbox-label { align-items: start; }
  .form-grid .checkbox-label input { margin-top: 3px; }
  .guardian-list article { flex-wrap: wrap; gap: 12px; }
  .guardian-list .button { margin-left: 54px; white-space: normal; text-align: left; }
  .demo-banner, .error-banner { align-items: start; gap: 14px; padding: 12px 14px; font-size: 12px; }
  .demo-banner button { flex-shrink: 0; max-width: 90px; font-size: 11px; text-align: right; }
  .invite-banner { flex-direction: column; align-items: stretch; }
  .invite-banner .button { width: 100%; }
  .workspace-footer { flex-wrap: wrap; gap: 14px; font-size: 11px; }
  .workspace-footer > span:last-child { display: none; }
  .workspace-footer .text-button { font-size: 11px; }
  .dialog-actions { flex-direction: column; }
  dialog { padding: 24px; }
  .family-quick-menu { width: 100vw; padding: 15px 15px calc(15px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
  .family-quick-menu__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .family-quick-menu__grid :is(a, button) { min-height: 118px; }
  .family-quick-menu h2 { font-size: 20px; }
  .toast-root { right: 16px; top: max(12px, env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .spinner { animation-duration: 2s; }
  .family-quick-menu[open], .oxen-toast__progress { animation: none; }
}
