:root {
  color-scheme: light;
  --ink: #231a32;
  --muted: #665f73;
  --border: #e8e3ef;
  --bg: #f8f7fb;
  --surface: #fff;
  --brand: #5c319e;
  --brand-dark: #442477;
  --nav-bg: #f0eafb;
  --lime: #e6f8a0;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #7e47cd; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.13; letter-spacing: -.04em; }
h2 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: 1.1rem; line-height: 1.3; }
small { color: var(--muted); font-size: .875rem; }
.icon { display: block; flex: 0 0 auto; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 5; padding: .7rem; background: var(--surface); transform: translateY(-160%); }
.skip:focus { transform: none; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-self: start; position: sticky; top: 0; height: 100dvh; padding: 1.6rem 1rem 1rem; }
.brand { display: inline-flex; width: max-content; max-width: 100%; flex-direction: column; align-items: flex-start; gap: .25rem; }
.sidebar .brand { margin: 0 0 2.15rem .75rem; }
.brand-logo { width: 113px; height: 36px; object-fit: contain; object-position: left center; }
.brand span { color: var(--muted); font-weight: 650; font-size: .875rem; }
.sidebar nav { display: grid; gap: .3rem; }
.sidebar nav a, .sign-out { display: flex; align-items: center; gap: .72rem; font-size: .94rem; font-weight: 650; line-height: 1.3; padding: .75rem; border-radius: .65rem; color: var(--muted); }
.sidebar nav a:hover, .sign-out:hover { background: var(--bg); }
.sidebar nav a[aria-current] { color: var(--brand-dark); background: var(--nav-bg); }
.sidebar nav .icon, .sign-out .icon { width: 1.15rem; height: 1.15rem; }
.side-bottom { margin-top: auto; border-top: 1px solid var(--border); padding-top: .8rem; }
.identity { display: flex; align-items: center; min-width: 0; gap: .55rem; padding: .25rem .45rem .65rem; }
.identity > div { min-width: 0; overflow-wrap: anywhere; }
.identity strong, .identity small { display: block; }
.identity strong { font-size: .93rem; }
.avatar { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: 0 0 2.25rem; border-radius: 50%; background: #ece4fa; color: var(--brand-dark); font-weight: 750; }
.sign-out { background: none; border: 0; width: 100%; text-align: left; }
.workspace { min-width: 0; }
.topbar { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--border); background: var(--surface); padding: .7rem clamp(1rem, 3vw, 2.4rem); color: var(--muted); font-size: .9rem; font-weight: 600; }
.today { display: inline-flex; align-items: center; gap: .45rem; }
.today .icon { width: 1rem; height: 1rem; }
.main { max-width: 1480px; padding: clamp(1rem, 3vw, 2.4rem); margin: 0 auto; }
.notice { margin: 0 0 1rem; border-radius: .6rem; padding: .65rem .85rem; font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.notice.demo { background: #eee8f9; color: #523084; }
.notice.success { background: #e1f5e6; color: #195d3b; }
.notice.error { background: #ffe9eb; color: #912339; }
.auth { display: grid; min-height: 100dvh; grid-template-columns: minmax(380px, .95fr) 1.05fr; }
.auth-panel { display: flex; align-items: center; justify-content: center; background: var(--surface); padding: 2.2rem; }
.auth-content { width: min(100%, 430px); }
.auth .brand { margin-bottom: 2rem; }
.auth .brand-logo { width: 133px; height: 42px; }
.auth .muted { margin: .6rem 0 1.5rem; }
.auth .button.primary { width: 100%; }
.auth-help { color: var(--muted); font-size: .9rem; margin-top: 1.3rem; }
.demo-actions { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1rem; }
.auth-art { position: relative; display: grid; place-items: center; background: #512891; isolation: isolate; overflow: hidden; }
.art-orbit, .hero-orbit { position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; border: 1px solid #b596f1a1; box-shadow: 0 0 0 32px #b596f123, 0 0 0 70px #b596f119, 0 0 0 115px #b596f114; }
.art-orbit { width: min(64%, 390px); aspect-ratio: 1; }
.auth-art img { width: min(68%, 460px); max-height: 70vh; object-fit: contain; filter: drop-shadow(0 14px 20px #26123c54); }
.hero { background: #512891; color: #fff; border-radius: 1.05rem; position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 217px; padding: 1.55rem 1.8rem; }
.hero > div:first-child { max-width: 65%; }
.hero h1 { color: #fff; }
.hero-label { color: #ebdefe; font-size: .9rem; font-weight: 650; margin-bottom: .4rem; }
.hero-copy { margin: .58rem 0 1.05rem; color: #f5efff; }
.hero-orbit { right: 4%; top: -24%; width: clamp(180px, 29%, 340px); aspect-ratio: 1; }
.hero img { width: 28%; height: 98%; object-fit: contain; position: absolute; right: 6%; bottom: -4%; filter: drop-shadow(0 8px 10px #28133b65); pointer-events: none; }
.button { display: inline-flex; min-height: 2.55rem; justify-content: center; align-items: center; gap: .45rem; border-radius: .58rem; padding: .5rem .85rem; border: 1px solid transparent; font-size: .92rem; line-height: 1.25; font-weight: 700; white-space: normal; }
.button .icon { width: 1.05rem; height: 1.05rem; }
.primary { background: var(--brand); color: #fff; }
.primary:hover { background: var(--brand-dark); }
.secondary { background: var(--surface); color: var(--brand-dark); border-color: #dcd0eb; }
.secondary:hover { background: var(--nav-bg); }
.hero-button { color: #262e0e; background: var(--lime); }
.hero-button:hover { background: #f1ffc2; }
.hero-button:focus-visible { outline-color: var(--lime); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 1.05rem 0 1.2rem; }
.metric, .panel { border: 1px solid var(--border); background: var(--surface); min-width: 0; border-radius: .85rem; }
.metric { display: flex; align-items: center; gap: .65rem; padding: .85rem; min-height: 88px; }
.metric:hover { border-color: #bfabdb; }
.metric-caption { color: var(--muted); font-size: .88rem; font-weight: 600; line-height: 1.3; }
.metric strong { display: block; color: var(--ink); font-size: 1.6rem; line-height: 1.1; margin-top: .28rem; }
.tile-icon { width: 2.3rem; height: 2.3rem; flex: 0 0 2.3rem; display: grid; place-items: center; border-radius: .6rem; }
.tile-icon .icon { width: 1.2rem; height: 1.2rem; }
.waiting, .soon { background: #fff2d4; color: #78520a; }
.progress { background: #e9e1fa; color: #592e95; }
.current, .done { background: #e0f3e6; color: #19613a; }
.upcoming { background: #e6eefc; color: #264e8e; }
.off, .ended, .draft { background: #f0edf4; color: #60556e; }
.violet { background: #eee9fa; color: #593796; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.stack { min-width: 0; display: grid; gap: 1rem; align-content: start; }
.panel-heading { padding: .9rem 1rem .74rem; }
.panel-heading p { font-size: .9rem; color: var(--muted); margin-top: .35rem; }
.split { display: flex; align-items: baseline; justify-content: space-between; gap: .55rem; }
.split .text-link { flex-shrink: 0; }
.work-list, .small-list, .history, .compact-centers { list-style: none; padding: 0; margin: 0; }
.work-row, .small-list li { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; padding: .75rem 1rem; border-top: 1px solid #eeeaf2; }
.work-row:has(a):hover { background: #fbf9fe; }
.work-row:last-child { border-bottom-left-radius: .85rem; border-bottom-right-radius: .85rem; }
.row-title, .small-list li > div { min-width: 110px; flex: 1; overflow-wrap: anywhere; }
.row-title a, .row-title strong, .small-list strong { font-size: .96rem; font-weight: 700; }
.row-title a:hover { color: var(--brand); text-decoration: underline; }
.work-row small, .small-list small, .history small { display: block; margin-top: .1rem; }
.position { min-width: 2.35rem; text-align: center; color: var(--brand-dark); background: var(--nav-bg); border-radius: .4rem; font-weight: 750; font-variant-numeric: tabular-nums; padding: .34rem .4rem; }
.badge { display: inline-flex; min-height: 1.68rem; align-items: center; flex: 0 0 auto; border-radius: .38rem; font-size: .875rem; line-height: 1.25; font-weight: 650; padding: .24rem .52rem; }
.text-link { color: var(--brand-dark); text-decoration: underline; text-decoration-color: #bea9df; text-underline-offset: .22em; font-size: .9rem; font-weight: 700; }
.text-link:hover { text-decoration-color: currentColor; }
.empty { color: var(--muted); padding: .85rem 1rem 1rem; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: .4rem 0 1.3rem; overflow-wrap: anywhere; }
.page-heading p { color: var(--muted); margin-top: .45rem; }
.page-heading .button { flex-shrink: 0; margin-top: .25rem; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.filters a { padding: .37rem .68rem; border: 1px solid var(--border); background: var(--surface); border-radius: .5rem; font-weight: 650; font-size: .9rem; }
.filters a[aria-current] { background: var(--nav-bg); border-color: #d9caeb; color: var(--brand-dark); }
.form-panel, .detail { padding: clamp(1rem, 3vw, 1.45rem); }
.main > .form-panel, .detail + .form-panel { max-width: 850px; }
.form-panel h2, .detail h2 { margin-bottom: .85rem; }
.form-panel > .field, .form-panel > .form-actions { margin-top: .95rem; }
.form-grid { display: grid; gap: .85rem; min-width: 0; }
.field { display: grid; gap: .3rem; min-width: 0; font-size: .92rem; font-weight: 650; }
.field input, .field select, .field textarea { display: block; width: 100%; min-width: 0; color: var(--ink); background: var(--surface); border: 1px solid #cfc6dc; border-radius: .5rem; padding: .55rem .63rem; font-size: 1rem; font-weight: 400; }
.field textarea { resize: vertical; }
.field select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23665f73' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-position: right .5rem center; background-repeat: no-repeat; }
.fields-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.form-actions, .record-actions, .status-line, .inline { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }
.check { display: flex; align-items: baseline; gap: .45rem; font-size: .94rem; cursor: pointer; }
.check input { accent-color: var(--brand); margin: .2rem 0; }
.center-chooser { border: 1px solid var(--border); border-radius: .55rem; padding: .55rem .75rem .8rem; margin: 0; min-width: 0; }
.center-chooser legend { padding: 0 .25rem; font-size: .92rem; font-weight: 650; }
.center-chooser > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .35rem 1rem; }
.hint, .muted { color: var(--muted); }
.hint { font-size: .88rem; }
.back { display: inline-block; margin-bottom: .65rem; }
.dates { display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.dates dt { color: var(--muted); font-size: .875rem; }
.dates dd { margin: 0; font-weight: 650; }
.detail hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
.detail .text-link { display: inline-block; margin-top: .7rem; }
.pre-line { white-space: pre-line; overflow-wrap: anywhere; }
.history li { padding: .55rem 0; border-top: 1px solid var(--border); }
.card-grid { padding: .85rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: .75rem; }
.record { border: 1px solid var(--border); border-radius: .7rem; padding: .9rem; display: grid; align-content: start; justify-items: start; gap: .55rem; overflow-wrap: anywhere; }
.record-meta { color: var(--muted); font-size: .88rem; }
.record-actions { margin-top: .35rem; }
.access-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.access-lists { margin-top: 1rem; }
.compact-centers li { display: grid; grid-template-columns: minmax(3.5rem, 6rem) 1fr auto; align-items: baseline; gap: .75rem; border-top: 1px solid var(--border); padding: .6rem 1rem; overflow-wrap: anywhere; }
.small-button { border: 1px solid var(--border); background: var(--surface); color: var(--brand-dark); padding: .32rem .52rem; border-radius: .42rem; font-weight: 650; font-size: .875rem; min-height: 2rem; }
.small-button:hover { background: var(--nav-bg); }
@media (max-width: 1120px) {
  .layout { grid-template-columns: 192px minmax(0, 1fr); }
  .metric { padding: .6rem; gap: .5rem; }
  .overview-grid:not(.access-grid) { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--border); padding: .7rem 1rem .55rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
  .sidebar .brand { margin: 0; flex-direction: row; align-items: center; gap: .6rem; }
  .sidebar nav { grid-row: 2; grid-column: 1 / -1; display: flex; flex-wrap: wrap; }
  .sidebar nav a { gap: .35rem; padding: .5rem; }
  .sidebar nav .icon { width: 1rem; height: 1rem; }
  .side-bottom { display: flex; align-items: center; border: 0; padding: 0; margin: 0; }
  .identity { display: none; }
  .sign-out { padding: .45rem .25rem; }
  .topbar { min-height: 42px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-panel { padding: 1.35rem; }
}
@media (max-width: 630px) {
  .hero { min-height: 180px; padding: 1.2rem .95rem; }
  .hero img { width: 33%; right: .5%; bottom: -9%; height: 90%; }
  .hero-orbit { right: -20%; top: -5%; }
  .hero > div:first-child { max-width: 75%; }
  .hero-copy { font-size: .9rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 77px; }
  .overview-grid:not(.access-grid), .access-grid { grid-template-columns: minmax(0, 1fr); }
  .page-heading { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .sidebar nav a { font-size: .86rem; }
  .sidebar { padding-inline: .65rem; }
  .sidebar .brand-logo { width: 87px; height: 31px; }
  .fields-two { grid-template-columns: 1fr; }
}
