:root {
  --yd-navy: #153d5f;
  --yd-navy-deep: #0d2b43;
  --yd-blue: #2d7ff9;
  --yd-teal: #18a88f;
  --yd-green: #16834c;
  --yd-purple: #7557c8;
  --yd-orange: #e08a2e;
  --yd-ink: #233647;
  --yd-muted: #687b8c;
  --yd-line: #dce6ed;
  --yd-bg: #f3f7fa;
  --yd-white: #ffffff;
  --yd-shadow: 0 14px 36px rgba(20, 58, 88, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { border: 0; }

.yd-body { min-width: 320px; background: var(--yd-bg); color: var(--yd-ink); font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif; }
.yd-body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 85% 0%, rgba(45,127,249,.08), transparent 30rem), var(--yd-bg); }
.yd-demo-notice { position: relative; z-index: 60; display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 1rem; background: #fff6dc; color: #674b0f; padding: .55rem 1.25rem; font-size: .78rem; box-shadow: 0 2px 8px rgba(50,40,10,.08); }
.yd-demo-notice > div { display: flex; flex-wrap: wrap; gap: .35rem .65rem; }
.yd-demo-notice strong { color: #4f390a; }
.yd-demo-notice a { flex: 0 0 auto; color: var(--yd-navy); font-weight: 800; text-decoration: none; }
.yd-demo-notice a:hover { text-decoration: underline; }

.yd-app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100vh - 42px); }
.yd-sidebar { position: sticky; top: 0; z-index: 40; display: flex; height: calc(100vh - 42px); flex-direction: column; align-self: start; overflow-y: auto; background: linear-gradient(180deg, var(--yd-navy-deep), #123b5b 62%, #164a6e); color: #fff; padding: 1.3rem 1rem 1rem; box-shadow: 7px 0 24px rgba(13,43,67,.12); }
.yd-brand { display: flex; align-items: center; gap: .75rem; padding: .15rem .45rem 1.4rem; }
.yd-brand-mark { display: inline-flex; width: 2.65rem; height: 2.65rem; flex: 0 0 auto; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.28); border-radius: .75rem; background: rgba(255,255,255,.12); font-size: .72rem; font-weight: 900; letter-spacing: .06em; box-shadow: inset 0 1px rgba(255,255,255,.1); }
.yd-brand div { display: flex; min-width: 0; flex-direction: column; }
.yd-brand strong { font-size: .83rem; letter-spacing: .055em; }
.yd-brand small { margin-top: .15rem; color: rgba(255,255,255,.66); font-size: .72rem; }
.yd-nav { display: grid; gap: .35rem; }
.yd-nav-item { position: relative; display: grid; grid-template-columns: 1.55rem 1fr auto; width: 100%; align-items: center; gap: .55rem; border-radius: .65rem; background: transparent; color: rgba(255,255,255,.76); padding: .72rem .75rem; text-align: left; font-size: .84rem; font-weight: 720; transition: background .16s ease, color .16s ease, transform .16s ease; }
.yd-nav-item > span:first-child { display: inline-flex; width: 1.45rem; height: 1.45rem; align-items: center; justify-content: center; border-radius: .4rem; background: rgba(255,255,255,.08); font-size: .9rem; }
.yd-nav-item em { min-width: 1.5rem; border-radius: 999px; background: rgba(255,255,255,.12); padding: .15rem .38rem; text-align: center; font-size: .65rem; font-style: normal; }
.yd-nav-item:hover, .yd-nav-item:focus-visible { background: rgba(255,255,255,.1); color: #fff; transform: translateX(2px); outline: none; }
.yd-nav-item.is-active { background: linear-gradient(90deg, rgba(45,127,249,.88), rgba(24,168,143,.78)); color: #fff; box-shadow: 0 8px 18px rgba(5,25,39,.18); }
.yd-nav-item.is-active::before { content: ""; position: absolute; top: 25%; bottom: 25%; left: -.98rem; width: 3px; border-radius: 0 4px 4px 0; background: #8de7d8; }
.yd-sidebar-note { margin-top: auto; border: 1px solid rgba(255,255,255,.14); border-radius: .75rem; background: rgba(255,255,255,.07); padding: .85rem; }
.yd-sidebar-note strong { font-size: .76rem; }
.yd-sidebar-note p { margin: .35rem 0 0; color: rgba(255,255,255,.64); font-size: .68rem; line-height: 1.45; }
.yd-reset { margin-top: .65rem; border: 1px solid rgba(255,255,255,.16); border-radius: .55rem; background: transparent; color: rgba(255,255,255,.74); padding: .55rem; font-size: .7rem; font-weight: 800; }
.yd-reset:hover, .yd-reset:focus-visible { background: rgba(255,255,255,.09); color: #fff; outline: none; }

.yd-main-shell { min-width: 0; }
.yd-app-header { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: minmax(12rem,1fr) auto auto; min-height: 74px; align-items: center; gap: 1rem; border-bottom: 1px solid var(--yd-line); background: rgba(255,255,255,.94); padding: .75rem 1.5rem; backdrop-filter: blur(14px); }
.yd-menu-toggle { display: none; width: 2.5rem; height: 2.5rem; border-radius: .55rem; background: #edf4f9; color: var(--yd-navy); font-weight: 900; }
.yd-app-context { display: flex; min-width: 0; flex-direction: column; }
.yd-app-context small { color: var(--yd-muted); font-size: .65rem; }
.yd-app-context strong { overflow: hidden; color: var(--yd-navy); font-size: .98rem; text-overflow: ellipsis; white-space: nowrap; }
.yd-area-switcher { display: flex; align-items: center; gap: .5rem; color: var(--yd-muted); font-size: .68rem; font-weight: 800; }
.yd-area-switcher select, .yd-period-select select, .yd-toolbar select, .yd-report-controls select { min-height: 2.45rem; border: 1px solid var(--yd-line); border-radius: .55rem; background: #fff; color: var(--yd-ink); padding: .45rem 2rem .45rem .65rem; font-size: .76rem; font-weight: 700; }
.yd-user { display: flex; align-items: center; gap: .55rem; }
.yd-user > span { display: inline-flex; width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; border-radius: 999px; background: linear-gradient(145deg, var(--yd-blue), var(--yd-teal)); color: #fff; font-size: .68rem; font-weight: 900; }
.yd-user div { display: flex; flex-direction: column; }
.yd-user strong { color: var(--yd-navy); font-size: .75rem; }
.yd-user small { color: var(--yd-muted); font-size: .62rem; }

.yd-content { max-width: 1500px; margin: 0 auto; padding: 1.5rem; }
.yd-view[hidden] { display: none; }
.yd-view.is-active { animation: yd-fade .2s ease both; }
@keyframes yd-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.yd-page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.yd-page-intro h1 { margin: .18rem 0 .25rem; color: var(--yd-navy); font-size: clamp(1.55rem,2.4vw,2.1rem); line-height: 1.12; }
.yd-page-intro p { max-width: 46rem; margin: 0; color: var(--yd-muted); font-size: .88rem; line-height: 1.5; }
.yd-eyebrow { color: var(--yd-blue); font-size: .65rem; font-weight: 900; letter-spacing: .1em; }
.yd-period-select { display: grid; gap: .3rem; color: var(--yd-muted); font-size: .68rem; font-weight: 800; }

.yd-kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .85rem; margin-bottom: 1rem; }
.yd-kpi { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .72rem; min-width: 0; border: 1px solid var(--yd-line); border-radius: .85rem; background: #fff; padding: .95rem; box-shadow: 0 8px 20px rgba(20,58,88,.05); }
.yd-kpi-icon { display: inline-flex; width: 2.35rem; height: 2.35rem; align-items: center; justify-content: center; border-radius: .65rem; font-size: .72rem; font-weight: 900; }
.yd-kpi-icon.is-blue { background: #e8f2ff; color: #175fae; }
.yd-kpi-icon.is-green { background: #e5f7ef; color: var(--yd-green); }
.yd-kpi-icon.is-purple { background: #f0ecff; color: var(--yd-purple); }
.yd-kpi-icon.is-orange { background: #fff1df; color: #ad5f12; }
.yd-kpi div { display: flex; min-width: 0; flex-direction: column; }
.yd-kpi small { overflow: hidden; color: var(--yd-muted); font-size: .68rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.yd-kpi strong { margin: .05rem 0; color: var(--yd-navy); font-size: 1.55rem; line-height: 1.1; }
.yd-kpi em { color: var(--yd-green); font-size: .62rem; font-style: normal; font-weight: 800; }

.yd-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(15rem,.75fr); gap: 1rem; margin-bottom: 1rem; }
.yd-card { min-width: 0; border: 1px solid var(--yd-line); border-radius: .9rem; background: #fff; box-shadow: var(--yd-shadow); }
.yd-card-heading { display: flex; min-height: 4.1rem; align-items: center; justify-content: space-between; gap: .75rem; border-bottom: 1px solid #e9eff3; padding: .85rem 1rem; }
.yd-card-heading > div { display: flex; flex-direction: column; }
.yd-card-heading small { color: var(--yd-blue); font-size: .61rem; font-weight: 900; letter-spacing: .09em; }
.yd-card-heading h2 { margin: .12rem 0 0; color: var(--yd-navy); font-size: .98rem; }
.yd-live-pill { color: var(--yd-muted); font-size: .64rem; font-weight: 750; white-space: nowrap; }
.yd-live-pill i { display: inline-block; width: .45rem; height: .45rem; margin-right: .25rem; border-radius: 999px; background: var(--yd-teal); box-shadow: 0 0 0 3px rgba(24,168,143,.12); }
.yd-text-button { background: transparent; color: var(--yd-blue); font-size: .72rem; font-weight: 850; }

.yd-trend-chart { display: flex; min-height: 14rem; align-items: flex-end; gap: .8rem; background: repeating-linear-gradient(to bottom,transparent 0,transparent calc(25% - 1px),#eaf0f4 25%); padding: 1.1rem 1rem .8rem; }
.yd-trend-column { display: flex; height: 11.6rem; flex: 1; flex-direction: column; justify-content: flex-end; text-align: center; }
.yd-trend-column b { margin-bottom: .28rem; color: var(--yd-navy); font-size: .68rem; }
.yd-trend-column i { display: block; height: var(--yd-height); min-height: .75rem; border-radius: .45rem .45rem .1rem .1rem; background: linear-gradient(180deg,var(--yd-blue),#155b91); box-shadow: 0 7px 14px rgba(21,91,145,.13); transition: height .25s ease; }
.yd-trend-column small { margin-top: .38rem; color: var(--yd-muted); font-size: .66rem; font-weight: 800; }
.yd-program-card > [data-yd-program-mix] { display: grid; gap: .85rem; padding: 1rem; }
.yd-program-row { display: grid; grid-template-columns: 1fr auto; gap: .35rem .75rem; }
.yd-program-row strong { color: var(--yd-navy); font-size: .75rem; }
.yd-program-row span { color: var(--yd-muted); font-size: .7rem; font-weight: 800; }
.yd-program-row i { grid-column: 1/-1; height: .48rem; overflow: hidden; border-radius: 999px; background: #e9eff4; }
.yd-program-row i::before { content: ""; display: block; width: var(--yd-width); height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--yd-blue),var(--yd-teal)); }

.yd-table-card { overflow: hidden; }
.yd-table-wrap { width: 100%; overflow-x: auto; }
.yd-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.yd-table th { background: #f5f8fa; color: var(--yd-muted); padding: .72rem .85rem; text-align: left; font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.yd-table td { border-top: 1px solid #e8eef2; color: #405466; padding: .72rem .85rem; font-size: .72rem; }
.yd-table tbody tr:hover { background: #f8fbfd; }
.yd-table td:first-child { color: var(--yd-navy); font-weight: 800; }
.yd-person { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.yd-status { display: inline-flex; align-items: center; gap: .28rem; border-radius: 999px; padding: .25rem .5rem; font-size: .62rem; font-weight: 850; white-space: nowrap; }
.yd-status::before { content: ""; width: .35rem; height: .35rem; border-radius: 999px; background: currentColor; }
.yd-status.is-active, .yd-status.is-complete { background: #e5f7ef; color: #117044; }
.yd-status.is-pending, .yd-status.is-scheduled { background: #fff3df; color: #a35e13; }
.yd-status.is-inactive { background: #edf1f4; color: #687885; }

.yd-toolbar { display: grid; grid-template-columns: minmax(15rem,1fr) auto auto; align-items: end; gap: .75rem; margin-bottom: .85rem; border: 1px solid var(--yd-line); border-radius: .8rem; background: #fff; padding: .75rem; }
.yd-search { display: flex; min-height: 2.45rem; align-items: center; gap: .5rem; border: 1px solid var(--yd-line); border-radius: .55rem; background: #fff; padding: 0 .7rem; }
.yd-search span { color: var(--yd-muted); font-size: 1rem; }
.yd-search input { width: 100%; border: 0; outline: 0; color: var(--yd-ink); }
.yd-toolbar > label:not(.yd-search) { display: grid; gap: .28rem; color: var(--yd-muted); font-size: .65rem; font-weight: 800; }
.yd-record-count { align-self: center; color: var(--yd-muted); font-size: .7rem; }
.yd-record-count strong { color: var(--yd-navy); }
.yd-primary-action, .yd-excel-action { display: inline-flex; min-height: 2.65rem; align-items: center; justify-content: center; border-radius: .6rem; background: linear-gradient(100deg,#256ec0,var(--yd-blue)); color: #fff; padding: .65rem 1rem; font-size: .75rem; font-weight: 850; text-decoration: none; box-shadow: 0 8px 18px rgba(45,127,249,.18); transition: transform .15s ease, box-shadow .15s ease; }
.yd-primary-action:hover, .yd-primary-action:focus-visible, .yd-excel-action:hover, .yd-excel-action:focus-visible { transform: translateY(-1px); box-shadow: 0 11px 22px rgba(45,127,249,.24); outline: none; }
.yd-excel-action { background: linear-gradient(100deg,#106b3e,#16834c); box-shadow: 0 8px 18px rgba(16,107,62,.16); }
.yd-secondary-action { min-height: 2.65rem; border: 1px solid var(--yd-line); border-radius: .6rem; background: #fff; color: var(--yd-navy); padding: .65rem 1rem; font-size: .75rem; font-weight: 850; }

.yd-activity-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; margin-bottom: .9rem; }
.yd-activity-summary article { display: flex; flex-direction: column; border-left: 3px solid var(--yd-blue); border-radius: .65rem; background: #fff; padding: .85rem 1rem; box-shadow: 0 7px 16px rgba(20,58,88,.06); }
.yd-activity-summary article:nth-child(2) { border-color: var(--yd-teal); }
.yd-activity-summary article:nth-child(3) { border-color: var(--yd-purple); }
.yd-activity-summary article:nth-child(4) { border-color: var(--yd-orange); }
.yd-activity-summary small { color: var(--yd-muted); font-size: .65rem; font-weight: 750; }
.yd-activity-summary strong { color: var(--yd-navy); font-size: 1.35rem; }

.yd-attendance-layout { display: grid; grid-template-columns: minmax(14rem,.62fr) minmax(0,1.38fr); gap: 1rem; }
.yd-session-list { overflow: hidden; }
.yd-session-list > [data-yd-session-list] { display: grid; gap: .5rem; padding: .8rem; }
.yd-session-button { width: 100%; border: 1px solid var(--yd-line); border-radius: .65rem; background: #fff; padding: .75rem; text-align: left; }
.yd-session-button:hover, .yd-session-button:focus-visible, .yd-session-button.is-active { border-color: rgba(45,127,249,.45); background: #edf5ff; outline: none; }
.yd-session-button strong, .yd-session-button span { display: block; }
.yd-session-button strong { color: var(--yd-navy); font-size: .75rem; }
.yd-session-button span { margin-top: .22rem; color: var(--yd-muted); font-size: .65rem; }
.yd-roster-card { padding: 1rem; }
.yd-roster-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--yd-line); padding-bottom: .8rem; }
.yd-roster-heading small { color: var(--yd-blue); font-size: .61rem; font-weight: 900; letter-spacing: .08em; }
.yd-roster-heading h2 { margin: .1rem 0; color: var(--yd-navy); font-size: 1.1rem; }
.yd-roster-heading p { margin: 0; color: var(--yd-muted); font-size: .7rem; }
.yd-attendance-total { display: flex; flex-direction: column; text-align: right; }
.yd-attendance-total strong { color: var(--yd-teal); font-size: 1.55rem; }
.yd-attendance-total small { color: var(--yd-muted); font-size: .63rem; }
.yd-roster { display: grid; grid-template-columns: repeat(2,1fr); gap: .55rem; padding: .85rem 0; }
.yd-roster label { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: .55rem; border: 1px solid var(--yd-line); border-radius: .65rem; padding: .65rem; cursor: pointer; }
.yd-roster input { width: 1rem; height: 1rem; accent-color: var(--yd-teal); }
.yd-avatar { display: inline-flex; width: 1.85rem; height: 1.85rem; align-items: center; justify-content: center; border-radius: .5rem; background: #e9f3fc; color: var(--yd-navy); font-size: .62rem; font-weight: 900; }
.yd-roster label > span:not(.yd-avatar) { display: flex; flex-direction: column; }
.yd-roster label strong { color: var(--yd-navy); font-size: .72rem; }
.yd-roster label small { color: var(--yd-muted); font-size: .61rem; }
.yd-roster label em { color: var(--yd-green); font-size: .61rem; font-style: normal; font-weight: 850; }
.yd-save-attendance { width: 100%; }

.yd-report-controls { display: grid; grid-template-columns: 1fr 1fr minmax(11rem,.65fr); align-items: end; gap: .75rem; margin-bottom: 1rem; border: 1px solid var(--yd-line); border-radius: .8rem; background: #fff; padding: .85rem; }
.yd-report-controls label { display: grid; gap: .3rem; color: var(--yd-muted); font-size: .65rem; font-weight: 850; }
.yd-report-controls > div { display: flex; flex-direction: column; border-radius: .6rem; background: #eaf7f0; padding: .55rem .75rem; }
.yd-report-controls > div small { color: var(--yd-muted); font-size: .6rem; }
.yd-report-controls > div strong { color: var(--yd-green); font-size: .72rem; }
.yd-report-preview { overflow: hidden; border: 1px solid #cfe0d6; border-radius: 1rem; background: #fff; box-shadow: 0 20px 42px rgba(18,73,48,.1); }
.yd-report-preview > header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .85rem; background: linear-gradient(105deg,#123f63,#176b64); color: #fff; padding: 1.15rem; }
.yd-report-wordmark { display: inline-flex; width: 5.5rem; height: 3rem; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.28); border-radius: .65rem; background: rgba(255,255,255,.1); text-align: center; font-size: .55rem; font-weight: 900; letter-spacing: .06em; line-height: 1.15; }
.yd-report-preview > header div:nth-child(2) { display: flex; flex-direction: column; }
.yd-report-preview > header small { color: #98eadb; font-size: .61rem; font-weight: 900; letter-spacing: .09em; }
.yd-report-preview > header h2 { margin: .08rem 0; font-size: 1.15rem; }
.yd-report-preview > header p { margin: 0; color: rgba(255,255,255,.7); font-size: .68rem; }
.yd-report-preview > header > span { border-radius: 999px; background: rgba(255,255,255,.13); padding: .38rem .65rem; font-size: .65rem; font-weight: 850; }
.yd-report-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; padding: 1rem; }
.yd-report-kpis > div { display: flex; flex-direction: column; border: 1px solid var(--yd-line); border-radius: .7rem; background: #f8fbfa; padding: .75rem; }
.yd-report-kpis small { color: var(--yd-muted); font-size: .63rem; font-weight: 750; }
.yd-report-kpis strong { color: var(--yd-navy); font-size: 1.35rem; }
.yd-report-table { width: calc(100% - 2rem); min-width: 700px; margin: 0 1rem 1rem; border-collapse: collapse; }
.yd-report-table th { background: #e8f4ed; color: #115b38; padding: .7rem; text-align: left; font-size: .62rem; text-transform: uppercase; }
.yd-report-table td { border-bottom: 1px solid #e0e9e4; padding: .72rem; color: #465c50; font-size: .72rem; }
.yd-report-table th:not(:first-child), .yd-report-table td:not(:first-child) { text-align: right; }
.yd-report-table tr:last-child td { border-top: 2px solid var(--yd-green); background: #edf8f2; color: #115b38; font-weight: 900; }
.yd-report-preview footer { display: flex; justify-content: space-between; gap: 1rem; background: #f3f7f5; color: var(--yd-muted); padding: .65rem 1rem; font-size: .63rem; font-weight: 700; }

.yd-dialog { width: min(42rem,calc(100% - 2rem)); border: 0; border-radius: 1rem; color: var(--yd-ink); padding: 0; box-shadow: 0 30px 80px rgba(12,40,60,.28); }
.yd-dialog::backdrop { background: rgba(8,30,46,.58); backdrop-filter: blur(3px); }
.yd-dialog form { padding: 1.15rem; }
.yd-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.yd-dialog-head small { color: var(--yd-blue); font-size: .62rem; font-weight: 900; letter-spacing: .08em; }
.yd-dialog-head h2 { margin: .1rem 0; color: var(--yd-navy); font-size: 1.35rem; }
.yd-dialog-head button { width: 2rem; height: 2rem; border-radius: .5rem; background: #eef3f6; color: var(--yd-navy); font-size: 1.25rem; }
.yd-dialog-note { border-left: 3px solid var(--yd-orange); background: #fff7e9; color: #74531e; padding: .65rem .75rem; font-size: .7rem; }
.yd-form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .8rem; margin: 1rem 0; }
.yd-form-grid label { display: grid; gap: .32rem; color: var(--yd-navy); font-size: .68rem; font-weight: 850; }
.yd-form-grid label.is-wide { grid-column: 1/-1; }
.yd-form-grid input, .yd-form-grid select { width: 100%; min-height: 2.6rem; border: 1px solid var(--yd-line); border-radius: .55rem; color: var(--yd-ink); padding: .5rem .65rem; }
.yd-dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.yd-toast { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 80; max-width: 24rem; border-left: 4px solid var(--yd-teal); border-radius: .65rem; background: var(--yd-navy-deep); color: #fff; padding: .8rem 1rem; font-size: .72rem; font-weight: 750; box-shadow: 0 16px 36px rgba(8,30,46,.24); opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .18s ease, transform .18s ease; }
.yd-toast.is-visible { opacity: 1; transform: translateY(0); }
.yd-sidebar-scrim { display: none; }

@media (max-width: 1050px) {
  .yd-app { grid-template-columns: 220px minmax(0,1fr); }
  .yd-kpi-grid { grid-template-columns: repeat(2,1fr); }
  .yd-app-header { grid-template-columns: minmax(10rem,1fr) auto; }
  .yd-user { display: none; }
  .yd-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .yd-demo-notice { align-items: flex-start; padding: .55rem .8rem; }
  .yd-demo-notice > div span { display: none; }
  .yd-app { display: block; }
  .yd-sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 70; width: min(18rem,84vw); height: 100vh; transform: translateX(-105%); transition: transform .2s ease; }
  .yd-app.is-menu-open .yd-sidebar { transform: translateX(0); }
  .yd-sidebar-scrim { position: fixed; inset: 0; z-index: 65; background: rgba(7,26,40,.5); }
  .yd-app.is-menu-open .yd-sidebar-scrim { display: block; }
  .yd-app-header { grid-template-columns: auto minmax(0,1fr) auto; min-height: 66px; gap: .7rem; padding: .65rem .8rem; }
  .yd-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .yd-area-switcher { font-size: 0; }
  .yd-area-switcher select { max-width: 10rem; font-size: .7rem; }
  .yd-content { padding: 1rem .8rem; }
  .yd-page-intro { align-items: flex-start; flex-direction: column; }
  .yd-page-intro .yd-primary-action, .yd-page-intro .yd-excel-action { width: 100%; }
  .yd-dashboard-grid, .yd-attendance-layout { grid-template-columns: 1fr; }
  .yd-roster { grid-template-columns: 1fr; }
  .yd-activity-summary, .yd-report-kpis { grid-template-columns: repeat(2,1fr); }
  .yd-toolbar, .yd-report-controls { grid-template-columns: 1fr; }
  .yd-record-count { padding: .25rem; }
  .yd-report-preview > header { grid-template-columns: 1fr; }
  .yd-report-preview > header > span { justify-self: start; }
  .yd-report-preview footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .yd-app-context small { display: none; }
  .yd-app-context strong { font-size: .82rem; }
  .yd-area-switcher select { width: 8rem; }
  .yd-kpi-grid { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .yd-kpi { grid-template-columns: 1fr; gap: .45rem; padding: .75rem; }
  .yd-kpi-icon { width: 1.85rem; height: 1.85rem; }
  .yd-kpi small { white-space: normal; }
  .yd-activity-summary { grid-template-columns: 1fr 1fr; }
  .yd-form-grid { grid-template-columns: 1fr; }
  .yd-form-grid label.is-wide { grid-column: auto; }
  .yd-trend-chart { gap: .42rem; padding-inline: .65rem; }
  .yd-dialog-actions { flex-direction: column-reverse; }
  .yd-dialog-actions button { width: 100%; }
  .yd-toast { right: .7rem; bottom: .7rem; left: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Traditional application navigation and data-review screens */
.yd-app { display: block; min-height: calc(100vh - 42px); }
.yd-primary-nav { position: sticky; top: 0; z-index: 55; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; min-height: 82px; align-items: center; gap: 1rem; border-bottom: 3px solid var(--yd-teal); background: #fff; padding: .55rem 1.25rem .55rem .7rem; box-shadow: 0 7px 22px rgba(18,55,82,.13); }
.yd-primary-nav .yd-brand { min-width: 18.5rem; align-self: stretch; gap: .85rem; border-radius: .8rem; background: linear-gradient(135deg,var(--yd-navy-deep),var(--yd-navy)); color: #fff; padding: .55rem .8rem; box-shadow: 0 7px 18px rgba(13,43,67,.2); }
.yd-primary-nav .yd-brand-mark { display: grid; width: 3.8rem; height: 3.8rem; place-content: center; gap: 0; border: 2px dashed rgba(255,255,255,.58); border-radius: .7rem; background: rgba(255,255,255,.1); color: #fff; line-height: 1; text-align: center; }
.yd-primary-nav .yd-brand-mark strong { font-size: .77rem; letter-spacing: .08em; }
.yd-primary-nav .yd-brand-mark small { margin: 0; color: rgba(255,255,255,.75); font-size: .43rem; font-weight: 850; letter-spacing: .12em; }
.yd-primary-nav .yd-brand-copy { display: flex; min-width: 0; flex-direction: column; }
.yd-primary-nav .yd-brand-copy > span { margin-bottom: .13rem; color: #8edbcf; font-size: .49rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.yd-primary-nav .yd-brand-copy strong { color: #fff; font-size: .93rem; letter-spacing: .045em; }
.yd-primary-nav .yd-brand-copy small { margin-top: .18rem; color: rgba(255,255,255,.7); font-size: .65rem; }
.yd-menu-panel { display: flex; min-width: 0; align-items: center; gap: .28rem; border: 1px solid #d8e6ef; border-radius: .72rem; background: #f7fafc; padding: .28rem; }
.yd-menu-label { align-self: stretch; display: inline-flex; align-items: center; border-radius: .48rem; background: var(--yd-navy); color: #fff; padding: 0 .62rem; font-size: .59rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.yd-top-link, .yd-menu-group > summary { position: relative; display: flex; min-height: 2.75rem; align-items: center; gap: .35rem; border-radius: .55rem; background: transparent; color: #2c475d; padding: .65rem .8rem; font-size: .77rem; font-weight: 850; list-style: none; white-space: nowrap; transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease; }
.yd-menu-group > summary::-webkit-details-marker { display: none; }
.yd-top-link:hover, .yd-top-link:focus-visible, .yd-menu-group > summary:hover, .yd-menu-group > summary:focus-visible { background: #fff; color: var(--yd-navy); outline: none; box-shadow: 0 5px 12px rgba(13,43,67,.11); transform: translateY(-1px); }
.yd-top-link.is-active, .yd-menu-group[open] > summary, .yd-menu-group.is-section-active > summary { background: #dff3f0; color: var(--yd-navy); outline: none; box-shadow: inset 0 0 0 1px rgba(22,142,125,.2); }
.yd-top-link.is-active::after { content: ""; position: absolute; right: .75rem; bottom: .2rem; left: .75rem; height: 2px; border-radius: 4px; background: linear-gradient(90deg,var(--yd-blue),var(--yd-teal)); }
.yd-menu-group { position: relative; }
.yd-menu-group > summary span { color: var(--yd-muted); font-size: .65rem; }
.yd-dropdown-menu { position: absolute; top: calc(100% + .45rem); left: 0; z-index: 80; display: grid; width: 22rem; max-height: calc(100vh - 8rem); gap: .2rem; overflow-y: auto; border: 1px solid var(--yd-line); border-radius: .75rem; background: #fff; padding: .65rem; box-shadow: 0 18px 44px rgba(13,43,67,.18); }
.yd-dropdown-menu-right { right: 0; left: auto; }
.yd-dropdown-menu > strong { color: var(--yd-muted); padding: .4rem .55rem .25rem; font-size: .59rem; letter-spacing: .08em; text-transform: uppercase; }
.yd-dropdown-menu > button { display: flex; width: 100%; flex-direction: column; border-radius: .55rem; background: transparent; padding: .58rem .65rem; text-align: left; }
.yd-dropdown-menu > button:hover, .yd-dropdown-menu > button:focus-visible { background: #edf5fb; outline: none; }
.yd-dropdown-menu > button span { color: var(--yd-navy); font-size: .75rem; font-weight: 850; }
.yd-dropdown-menu > button small { margin-top: .12rem; color: var(--yd-muted); font-size: .62rem; }
.yd-dropdown-menu hr { width: 100%; margin: .35rem 0; border: 0; border-top: 1px solid var(--yd-line); }
.yd-nav-context { display: flex; max-width: 12rem; flex-direction: column; border-left: 1px solid var(--yd-line); padding-left: .9rem; }
.yd-nav-context strong { color: var(--yd-navy); font-size: .72rem; }
.yd-nav-context small { overflow: hidden; color: var(--yd-muted); font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.yd-primary-nav .yd-reset { margin: 0; border-color: var(--yd-line); color: var(--yd-navy); padding: .55rem .7rem; white-space: nowrap; }
.yd-primary-nav .yd-reset:hover, .yd-primary-nav .yd-reset:focus-visible { background: #edf5fb; color: var(--yd-navy); }
.yd-primary-nav .yd-menu-toggle { display: none; }
.yd-app-header { top: 82px; }

.yd-review-controls { display: grid; grid-template-columns: 1fr .75fr 1.1fr minmax(13rem,1.3fr) auto; align-items: end; gap: .7rem; margin-bottom: .9rem; border: 1px solid var(--yd-line); border-radius: .8rem; background: #fff; padding: .8rem; box-shadow: 0 8px 20px rgba(20,58,88,.05); }
.yd-review-controls label { display: grid; gap: .28rem; color: var(--yd-muted); font-size: .63rem; font-weight: 850; }
.yd-review-controls select, .yd-review-controls input { width: 100%; min-height: 2.5rem; border: 1px solid var(--yd-line); border-radius: .55rem; background: #fff; color: var(--yd-ink); padding: .5rem .65rem; font-size: .72rem; }
.yd-review-card { overflow: hidden; }
.yd-review-table { min-width: 880px; }
.yd-review-table td:last-child, .yd-review-table th:last-child { text-align: right; }
.yd-grid-action { border: 1px solid #cfdce5; border-radius: .45rem; background: #fff; color: var(--yd-blue); padding: .3rem .55rem; font-size: .63rem; font-weight: 850; }
.yd-grid-action:hover, .yd-grid-action:focus-visible { border-color: var(--yd-blue); background: #edf5ff; outline: none; }
.yd-grid-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--yd-line); background: #f7f9fb; color: var(--yd-muted); padding: .65rem .85rem; font-size: .64rem; }
.yd-grid-footer div { display: flex; align-items: center; gap: .45rem; }
.yd-grid-footer button { border: 1px solid var(--yd-line); border-radius: .4rem; background: #fff; color: var(--yd-muted); padding: .3rem .5rem; font-size: .61rem; }

.yd-help-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .85rem; margin-bottom: 1rem; }
.yd-help-card { display: grid; grid-template-columns: auto 1fr; gap: .75rem; border: 1px solid var(--yd-line); border-radius: .85rem; background: #fff; padding: 1rem; box-shadow: var(--yd-shadow); }
.yd-help-card > span { display: inline-flex; width: 2.2rem; height: 2.2rem; align-items: center; justify-content: center; border-radius: .6rem; background: #e8f2ff; color: var(--yd-blue); font-size: .65rem; font-weight: 900; }
.yd-help-card:nth-child(2) > span { background: #e5f7ef; color: var(--yd-green); }
.yd-help-card:nth-child(3) > span { background: #fff1df; color: #ad5f12; }
.yd-help-card div { display: flex; flex-direction: column; }
.yd-help-card small { color: var(--yd-blue); font-size: .58rem; font-weight: 900; letter-spacing: .08em; }
.yd-help-card h2 { margin: .1rem 0 .35rem; color: var(--yd-navy); font-size: 1rem; }
.yd-help-card p { margin: 0; color: var(--yd-muted); font-size: .7rem; line-height: 1.5; }
.yd-help-card button { align-self: flex-start; margin-top: auto; background: transparent; color: var(--yd-blue); padding: .75rem 0 0; font-size: .68rem; font-weight: 850; }
.yd-help-checklist { overflow: hidden; }
.yd-help-checklist ol { display: grid; grid-template-columns: repeat(5,1fr); margin: 0; padding: 1rem; list-style: none; counter-reset: yd-help-step; }
.yd-help-checklist li { position: relative; display: flex; min-width: 0; flex-direction: column; border-right: 1px solid var(--yd-line); padding: .2rem .85rem .2rem 2.2rem; counter-increment: yd-help-step; }
.yd-help-checklist li:last-child { border-right: 0; }
.yd-help-checklist li::before { content: counter(yd-help-step); position: absolute; top: .05rem; left: .2rem; display: inline-flex; width: 1.5rem; height: 1.5rem; align-items: center; justify-content: center; border-radius: 999px; background: var(--yd-navy); color: #fff; font-size: .61rem; font-weight: 900; }
.yd-help-checklist strong { color: var(--yd-navy); font-size: .7rem; }
.yd-help-checklist span { margin-top: .25rem; color: var(--yd-muted); font-size: .62rem; line-height: 1.4; }

@media (max-width: 1060px) {
  .yd-primary-nav { grid-template-columns: auto minmax(0,1fr) auto; }
  .yd-primary-nav .yd-brand { min-width: 15.5rem; }
  .yd-menu-label { display: none; }
  .yd-nav-context { display: none; }
  .yd-review-controls { grid-template-columns: repeat(2,1fr); }
  .yd-review-controls .yd-primary-action { grid-column: 1/-1; }
  .yd-help-checklist ol { grid-template-columns: 1fr; gap: .75rem; }
  .yd-help-checklist li { min-height: 2.8rem; border-right: 0; border-bottom: 1px solid var(--yd-line); }
  .yd-help-checklist li:last-child { border-bottom: 0; }
}

@media (max-width: 780px) {
  .yd-primary-nav { grid-template-columns: minmax(0,1fr) auto auto; min-height: 76px; gap: .5rem; padding: .45rem .65rem; }
  .yd-primary-nav .yd-brand { min-width: 0; }
  .yd-primary-nav .yd-brand-copy > span { display: none; }
  .yd-primary-nav .yd-brand-copy strong { font-size: .72rem; }
  .yd-primary-nav .yd-brand-copy small { font-size: .56rem; }
  .yd-primary-nav .yd-brand-mark { width: 3rem; height: 3rem; }
  .yd-primary-nav .yd-brand-mark strong { font-size: .62rem; }
  .yd-primary-nav .yd-menu-toggle { display: inline-flex; align-items: center; justify-content: center; order: 2; }
  .yd-primary-nav .yd-reset { order: 3; font-size: .62rem; }
  .yd-menu-panel { position: absolute; top: 100%; right: .55rem; left: .55rem; display: none; max-height: calc(100vh - 7rem); align-items: stretch; overflow-y: auto; border: 1px solid var(--yd-line); border-top: 4px solid var(--yd-teal); border-radius: 0 0 .8rem .8rem; background: #fff; padding: .6rem; box-shadow: 0 16px 30px rgba(13,43,67,.2); }
  .yd-app.is-menu-open .yd-menu-panel { display: grid; }
  .yd-menu-label { display: flex; min-height: 2.1rem; justify-content: center; }
  .yd-top-link, .yd-menu-group > summary { width: 100%; justify-content: space-between; }
  .yd-dropdown-menu, .yd-dropdown-menu-right { position: static; width: 100%; max-height: none; margin: .15rem 0 .45rem; border-radius: .55rem; background: #f7f9fb; box-shadow: none; }
  .yd-app-header { top: 76px; grid-template-columns: minmax(0,1fr) auto; }
  .yd-app-header > .yd-menu-toggle { display: none; }
  .yd-help-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .yd-review-controls { grid-template-columns: 1fr; }
  .yd-review-controls .yd-primary-action { grid-column: auto; }
  .yd-primary-nav .yd-reset { display: none; }
  .yd-primary-nav { grid-template-columns: minmax(0,1fr) auto; }
}
