:root {
  color-scheme: light;
  --ink: #222a24; --muted: #606a62; --soft: #748076; --line: #e4e8e0;
  --canvas: #f6f7f3; --panel: #fff; --green: #284b3e; --green-dark: #203c32;
  --lime: #e4eccf; --green-wash: #edf3e9; --ring: #72916c;
  --shadow: 0 1px 2px rgb(36 57 43 / 3%); --radius: 15px; --sidebar: 238px;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 300px; background: var(--canvas); }
body { margin: 0; color: var(--ink); font: 500 1rem/1.5 var(--sans); }
body:has(dialog[open]), body:has(.nav-open) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl { margin: 0; }
svg { flex: none; vertical-align: middle; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; top: 8px; left: 12px; z-index: 10; background: white; border: 1px solid var(--green); border-radius: 8px; padding: 9px 15px; transform: translateY(-160%); }
.skip:focus { transform: translateY(0); }

.admin { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: var(--sidebar); padding: 26px 15px 14px; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); scrollbar-width: thin; }
.sidebar .wordmark { margin: 0 5px 28px 8px; }
.wordmark { display: inline-flex; align-items: center; align-self: flex-start; gap: 10px; width: fit-content; color: #203f32; }
.brand-mark { width: 39px; height: 39px; border-radius: 10px; overflow: hidden; flex: 0 0 auto; }
.wordmark strong, .wordmark small { display: block; }
.wordmark strong { font-size: 1.28rem; line-height: 1.03; font-weight: 800; letter-spacing: -.075em; }
.wordmark small { margin-top: 5px; font-size: .63rem; line-height: 1; letter-spacing: .25em; font-weight: 750; }
.nav-group + .nav-group { margin-top: 16px; }
.nav-label { margin: 0 10px 5px; color: var(--soft); font-size: .68rem; font-weight: 760; letter-spacing: .115em; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 39px; padding: 7px 10px; border-radius: 8px; color: #4c5a50; font-size: .875rem; font-weight: 625; line-height: 1.2; white-space: nowrap; }
.nav-link + .nav-link { margin-top: 2px; }
.nav-link:hover { background: #f2f5ef; color: var(--green-dark); }
.nav-link.selected { color: #284736; background: #e9f0e3; font-weight: 760; }
.nav-link.selected::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #567853; }
.nav-link svg { color: #64766a; }
.nav-link.selected svg { color: var(--green); }
.sidebar-tail { margin-top: auto; padding-top: 12px; }
.studio-link { margin-bottom: 9px; }
.studio-account { border-top: 1px solid var(--line); margin: 0 1px; padding: 13px 6px 0; display: flex; align-items: center; gap: 9px; }
.studio-account strong, .studio-account small { display: block; line-height: 1.35; }
.studio-account strong { font-size: .8rem; font-weight: 760; }
.studio-account small { font-size: .72rem; color: var(--muted); }
.scrim, .button.mobile-menu { display: none; }
.workspace { min-width: 0; margin-left: var(--sidebar); }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 15px; padding: 10px 31px; background: var(--panel); border-bottom: 1px solid var(--line); }
.breadcrumb, .top-tools, .top-date { display: flex; align-items: center; gap: 11px; min-width: 0; }
.breadcrumb { font-size: .85rem; color: var(--muted); }
.breadcrumb strong { color: var(--ink); font-weight: 740; }
.breadcrumb svg { color: #79847a; }
.top-date { font-size: .83rem; color: #4e5d53; white-space: nowrap; margin-right: 7px; gap: 7px; }
.top-date:first-letter { text-transform: uppercase; }

.content { max-width: 1610px; margin: 0 auto; padding: 25px 31px 35px; }
.content:focus, .portal-content:focus { outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-heading h1 { font-size: clamp(1.62rem, 3vw, 2.05rem); line-height: 1.18; font-weight: 800; letter-spacing: -.055em; }
.page-heading p { margin-top: 5px; color: var(--muted); font-size: .93rem; }
.actions { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); white-space: nowrap; line-height: 1.22; font-size: .835rem; font-weight: 735; cursor: pointer; transition: background-color .14s, border-color .14s, color .14s; }
.button.primary { background: var(--green); color: white; border-color: var(--green); }
.button.primary:hover { background: #1d3a30; border-color: #1d3a30; }
.button.secondary { background: #fff; border-color: #dce3da; color: #344a3d; }
.button.secondary:hover, .button.ghost:hover { background: #f0f4ed; border-color: #d5dfd4; }
.button.danger { color: #963931; border-color: #ead1cc; background: #fff6f4; }
.button.danger:hover { background: #f9e6e2; }
.button.compact { min-height: 34px; padding: 6px 10px; font-size: .8rem; }
.button.icon-button { width: 39px; padding: 0; flex: none; }
.button.text-link { color: #365c48; padding: 4px 0; min-height: 30px; }
.button.text-link:hover { text-decoration: underline; }
.text-button { padding: 0; text-align: left; background: transparent; border: 0; color: var(--green); font-weight: 750; }
.text-button:hover { text-decoration: underline; }

.hero, .public-hero { overflow: hidden; position: relative; isolation: isolate; background-color: #1f3b2f; background-image: linear-gradient(90deg,#203b30 0%,#203b30 30%,rgb(32 59 48 / 91%) 44%,rgb(27 51 40 / 35%) 75%,rgb(14 31 21 / 26%) 100%), url("./studio.jpg"); background-position: center, center 58%; background-size: cover, cover; color: white; }
.hero { min-height: 218px; display: flex; align-items: center; border-radius: 17px; margin-bottom: 20px; }
.hero-copy { position: relative; z-index: 1; padding: 25px 35px 27px; }
.hero-label { display: flex; align-items: center; gap: 8px; min-height: 21px; color: #e7efd6; font-size: .78rem; font-weight: 650; }
.hero-label span { width: 6px; height: 6px; border-radius: 50%; background: #d9e8bc; }
.hero h2, .public-hero h1, .portal-hero h1 { color: #fbfcf6; font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 4vw, 3.28rem); letter-spacing: -.04em; line-height: 1.04; }
.hero h2 { margin: 9px 0 8px; }
.hero p, .public-hero p, .portal-hero p { color: #e0e8dc; font-size: .92rem; }
.button.hero-button { margin-top: 19px; min-height: 38px; padding-inline: 13px; color: #233f30; background: #e5edcf; border-color: #e5edcf; }
.button.hero-button:hover { background: #f2f7e6; border-color: #f2f7e6; }

.card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.content > .card + .card, .content > .tile-grid + .card, .content > .settings-grid + .card, .portal-content > .card + .card { margin-top: 19px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 18px 20px 13px; }
.card-head > div { min-width: 0; }
.card-head h2 { font-size: 1.07rem; line-height: 1.3; color: #25322a; font-weight: 790; letter-spacing: -.025em; }
.card-head p { font-size: .81rem; line-height: 1.4; color: var(--muted); margin-top: 4px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 19px; }
.metric { min-height: 118px; padding: 13px 15px; }
.metric-top { display: flex; gap: 9px; align-items: center; color: #536157; font-size: .83rem; font-weight: 680; }
.metric-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 9px; }
.metric-icon.green { color: #49674d; background: #edf2e3; }
.metric-icon.sand { color: #89673e; background: #f7eddf; }
.metric-icon.lilac { color: #745c87; background: #f2eaf5; }
.metric-icon.mint { color: #427769; background: #e8f4ed; }
.metric > strong { display: block; margin: 6px 0 1px; line-height: 1.15; font-size: clamp(1.65rem, 2.55vw, 2.05rem); letter-spacing: -.047em; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric > small { font-size: .75rem; color: var(--muted); }
.metric-highlight { color: #38644b; font-weight: 750; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: stretch; gap: 15px; margin-bottom: 19px; }
.segmented { display: inline-flex; width: fit-content; padding: 3px; gap: 1px; border: 1px solid var(--line); border-radius: 8px; background: #f5f7f3; }
.segmented button { padding: 5px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: .76rem; font-weight: 690; white-space: nowrap; }
.segmented button[aria-pressed="true"] { color: var(--green); background: white; box-shadow: 0 1px 3px #2630201a; }
.chart-summary { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 0 21px 8px; }
.chart-summary > strong { font-size: 1.63rem; font-weight: 800; letter-spacing: -.05em; }
.chart-key { display: flex; gap: 6px; align-items: center; font-size: .72rem; color: var(--muted); }
.chart-key i { width: 8px; height: 8px; border-radius: 2px; background: #789678; }
.chart { display: grid; grid-template-columns: 44px 1fr; gap: 6px; margin: 0 19px 19px; min-height: 187px; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding: 1px 3px 24px 0; color: #68756a; font-size: .68rem; white-space: nowrap; }
.chart-plot { position: relative; height: 187px; padding-top: 7px; }
.chart-lines { position: absolute; inset: 9px 0 26px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-lines i { border-top: 1px dashed #e1e7df; }
.chart-bars { position: relative; z-index: 1; height: 100%; display: flex; gap: 7px; justify-content: space-around; }
.chart-column { display: flex; flex: 1 0 0; min-width: 0; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 4px; }
.chart-column small { min-height: 20px; font-size: .69rem; line-height: 1.35; white-space: nowrap; color: var(--muted); }
.chart-bar { position: relative; width: 73%; max-width: 44px; height: var(--height); max-height: calc(100% - 26px); min-height: 3px; border-radius: 6px 6px 2px 2px; background: #9eb299; cursor: default; }
.chart-bar.best, .chart-bar:hover, .chart-bar:focus-visible { background: #40664e; }
.chart-bar span { display: none; position: absolute; bottom: calc(100% + 3px); left: 50%; z-index: 3; transform: translateX(-50%); padding: 4px 6px; border-radius: 4px; color: white; background: #2b4636; font-size: .72rem; white-space: nowrap; }
.chart-bar:hover span, .chart-bar:focus-visible span { display: block; }

.lesson-list { padding: 0 17px 9px; }
.lesson-row { display: grid; grid-template-columns: 45px minmax(0,1fr) auto; align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 6px 2px; background: transparent; border: 0; border-top: 1px solid #edf0ea; text-align: left; }
.lesson-row:hover { background: #f7f9f5; }
.lesson-row time { font-size: .83rem; font-weight: 760; color: #31483a; font-variant-numeric: tabular-nums; }
.lesson-row strong { display: block; font-size: .84rem; font-weight: 745; line-height: 1.25; overflow-wrap: anywhere; }
.lesson-row small, .subtext { display: block; color: var(--muted); font-size: .76rem; line-height: 1.38; margin-top: 2px; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 6px; white-space: nowrap; font-size: .71rem; font-weight: 760; line-height: 1.15; }
.badge-green { color: #385840; background: #eaf2e7; }
.badge-amber { color: #785923; background: #f8edda; }
.badge-rose { color: #8f3f3d; background: #f7e5e4; }
.badge-neutral { color: #5b655d; background: #eef0ec; }
.avatar { flex: none; display: inline-flex; justify-content: center; align-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: .77rem; font-weight: 800; }
.avatar-0 { color: #395743; background: #e9f0e4; }
.avatar-1 { color: #825d43; background: #f2e8de; }
.avatar-2 { color: #65527e; background: #eee9f4; }
.avatar-3 { color: #7b515b; background: #f6e9eb; }
.avatar-4 { color: #41636b; background: #e6f0f0; }
.person { display: flex; gap: 9px; align-items: center; min-width: 0; }
.person strong { font-size: .875rem; font-weight: 745; overflow-wrap: anywhere; }
.recent-members { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 0 14px 14px; gap: 8px; }
.recent-member { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 8px 7px; border: 1px solid var(--line); border-radius: 9px; background: transparent; text-align: left; }
.recent-member:hover { background: #f2f6ef; }

.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .86rem; }
th { padding: 10px 15px; color: #526155; background: #f5f7f3; font-size: .77rem; font-weight: 760; white-space: nowrap; }
td { border-top: 1px solid #edf0eb; padding: 9px 15px; min-height: 44px; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
tbody tr:hover { background: #fbfcfa; }
.empty { display: flex; flex-direction: column; align-items: center; padding: 31px 15px; text-align: center; color: #34463a; }
.empty span { display: inline-grid; place-items: center; width: 43px; height: 43px; border-radius: 11px; background: #eef3eb; color: #4b6b52; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-top: 4px; font-size: .86rem; }
.filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 0 19px 15px; }
.filters .field { min-width: 150px; }
.search-field { display: inline-flex; align-items: center; min-width: 220px; min-height: 40px; max-width: 410px; flex: 1; gap: 8px; padding: 0 10px; border: 1px solid #dce4dc; border-radius: 8px; color: var(--muted); background: #fff; }
.search-field:focus-within { border-color: var(--ring); }
.search-field input { width: 100%; padding: 7px 0; border: 0; outline: 0; color: var(--ink); font-size: .87rem; background: transparent; }
.search-field input:focus-visible { outline: none; }

.tile-grid { display: grid; gap: 15px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.tile { display: flex; flex-direction: column; padding: 17px; min-height: 155px; }
.tile-top, .tile-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.tile h2, .tile h3 { font-size: 1.09rem; line-height: 1.3; letter-spacing: -.02em; margin: 10px 0 3px; overflow-wrap: anywhere; }
.tile p { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.tile-bottom { margin-top: auto; padding-top: 13px; }
.tile-bottom > strong { font-size: 1.23rem; letter-spacing: -.025em; }
.tile > .actions { margin-top: auto; padding-top: 12px; }
.rate-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 14px; }
.rate-list > div { display: flex; justify-content: space-between; gap: 5px; background: #f3f6f0; border-radius: 7px; padding: 7px; font-size: .8rem; }
.rate-list dd { margin: 0; font-weight: 750; }
.price-line { margin-top: 8px; }
.price-line strong { color: var(--green); margin-left: 5px; font-size: 1.1rem; }
.progress { display: inline-block; width: min(70px,8vw); margin-right: 7px; height: 7px; vertical-align: middle; background: #edf0ea; border-radius: 8px; overflow: hidden; }
.progress i { display: block; width: var(--progress); height: 100%; background: #719973; border-radius: 8px; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.details-list { padding: 0 20px 11px; }
.details-list > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .86rem; }
.details-list dt { color: var(--muted); }
.details-list dd { text-align: right; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.settings-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 0 20px 16px; color: var(--muted); font-size: .87rem; }
.settings-inline strong { margin-left: 8px; color: #385141; }

.calendar-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; padding: 17px 18px; }
.calendar-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.calendar-controls h2 { margin-left: 5px; font-size: 1rem; }
.calendar-controls .field { display: flex; align-items: center; gap: 7px; }
.calendar-controls .field > span { font-size: .76rem; color: var(--muted); }
.week-grid { display: grid; grid-template-columns: repeat(7,minmax(108px,1fr)); border-top: 1px solid var(--line); overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
.week-day { min-width: 0; min-height: 250px; border-right: 1px solid var(--line); }
.week-day:last-child { border-right: 0; }
.week-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px; border: 0; border-bottom: 1px solid var(--line); background: #f5f7f2; text-align: left; }
.week-head strong { font-size: 1.05rem; }
.week-head small { color: var(--muted); font-weight: 750; }
.week-head.current { background: #eaf0e4; color: #335840; }
.week-head:hover { background: #e6efe2; }
.week-slots { display: grid; align-content: start; gap: 5px; padding: 6px; }
.week-slot { padding: 7px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; border: 1px solid transparent; border-radius: 7px; background: #edf2e7; color: #365440; text-align: left; }
.week-slot.room-1 { background: #f6efe3; color: #6c5333; }
.week-slot.room-2 { background: #f0ebf4; color: #604c70; }
.week-slot.canceled-slot { background: #f8e8e7; color: #874641; }
.week-slot strong { font-size: .84rem; overflow-wrap: anywhere; }
.week-slot small { font-size: .73rem; max-width: 100%; overflow-wrap: anywhere; }
.week-slot:hover { border-color: currentColor; }
.no-slot { color: var(--muted); font-size: .8rem; margin: 7px 0; }
.month-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); margin: 0 17px 16px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.month-weekday { text-align: center; padding: 7px 1px; background: #f5f8f3; color: var(--muted); font-size: .77rem; font-weight: 740; }
.month-date { display: grid; place-content: center; gap: 2px; min-height: 54px; padding: 4px; background: #fff; border: 0; border-right: 1px solid var(--line); border-top: 1px solid var(--line); line-height: 1.1; }
.month-date:nth-child(7n) { border-right: 0; }
.month-date.outside { background: #f8faf6; color: #858f84; }
.month-date.current, .month-date:hover { background: #eaf1e5; color: #335540; }
.month-date small { font-size: .72rem; }
.room-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 0 17px 17px; }
.room-list { padding: 9px; border-radius: 9px; border: 1px solid var(--line); }
.room-list header { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-bottom: 6px; }
.room-list header h3 { font-size: .95rem; }

.field { display: grid; align-content: start; gap: 5px; color: #3e4c42; font-size: .86rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 39px; padding: 7px 9px; border: 1px solid #dce4dc; border-radius: 8px; color: var(--ink); background-color: white; font-size: .89rem; font-weight: 540; }
.field input, .field select { min-width: 0; }
.field select { appearance: none; padding-right: 27px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23546c59' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field textarea { resize: vertical; vertical-align: top; min-height: 74px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--ring); box-shadow: 0 0 0 3px #e7efe3; }
.check-field { display: flex; align-items: center; gap: 8px; color: #3e4c42; font-size: .87rem; font-weight: 690; }
.check-field input { width: 17px; height: 17px; accent-color: var(--green); }
.info { display: flex; align-items: flex-start; gap: 8px; grid-column: 1/-1; padding: 9px 10px; border: 1px solid #dfe9dc; border-radius: 8px; background: #f1f6ed; color: #3f5847; font-size: .86rem; }
.info svg { margin-top: 2px; }
dialog { z-index: 8; color: var(--ink); width: min(96vw, 550px); max-height: 90dvh; padding: 0; overflow: auto; border: 1px solid #dfe8df; border-radius: 15px; background: white; box-shadow: 0 22px 70px #1c312545; }
dialog.dialog-wide { width: min(96vw, 740px); }
dialog::backdrop { background: rgb(25 42 32 / 52%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.25rem; font-weight: 790; line-height: 1.25; letter-spacing: -.03em; overflow-wrap: anywhere; }
.dialog-body { padding: 14px 17px 15px; }
.dialog-body > p + p { margin-top: 10px; }
.dialog-foot, .form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.dialog-foot { padding: 11px 17px 14px; border-top: 1px solid var(--line); }
.dialog-foot:empty { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 11px; }
.form-grid .wide { grid-column: 1/-1; }
.form-actions { margin-top: 16px; }
.form-message { margin-top: 10px; padding: 8px; background: #faeae9; color: #8e3834; border-radius: 7px; font-size: .84rem; }
.record-header { display: flex; align-items: center; gap: 10px; padding: 9px; margin-bottom: 11px; background: #f4f7f3; border-radius: 8px; overflow-wrap: anywhere; }
.record-header > div { min-width: 0; }
.record-header > .badge { margin-left: auto; }
.dialog-sections { display: grid; gap: 13px; }
.dialog-sections h3 { font-size: .95rem; margin-bottom: 4px; }
.dialog-sections p { font-size: .87rem; color: var(--muted); overflow-wrap: anywhere; }
.dialog-sections .empty { padding: 14px 10px; }
.dialog-sections .empty > span { display: none; }
.detail-balance strong { font-size: 1.15rem; color: var(--ink); }
.toast { position: fixed; z-index: 9; bottom: max(17px, env(safe-area-inset-bottom)); right: 20px; padding: 11px 14px; max-width: min(410px, calc(100vw - 40px)); border-radius: 9px; background: #294637; color: white; box-shadow: 0 6px 24px #223b2c30; font-size: .92rem; }
.toast.error { background: #843e39; }
.notification-list { display: grid; gap: 8px; padding: 0 17px 16px; }
.notification-list > div { background: #f5f8f3; border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
.notification-list p { font-size: .87rem; color: var(--muted); }

.public-header, .public-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: min(100%,1210px); margin: 0 auto; padding: 15px 23px; }
.public-site, .portal { min-height: 100dvh; }
.public-header { min-height: 68px; }
.public-hero { min-height: clamp(325px,48vw,515px); display: grid; align-items: center; border-block: 1px solid #294837; }
.public-hero > div { width: min(100%,1210px); margin: 0 auto; padding: 28px 24px; }
.public-hero h1 { font-size: clamp(2.85rem, 7vw, 6rem); margin-bottom: 9px; }
.public-hero p { font-size: 1.05rem; }
.public-content { max-width: 1210px; margin: 0 auto; padding: 24px 23px; }
.public-section h2 { margin: 0 0 11px; font-size: clamp(1.45rem,3vw,2rem); letter-spacing: -.04em; }
.public-section + .public-section { margin-top: 24px; }
.contact-list { display: grid; gap: 7px; }
.contact-list p { display: flex; gap: 7px; align-items: center; }
.public-footer { border-top: 1px solid var(--line); }
.portal { background: #f5f7f3; }
.portal .public-header { max-width: 980px; }
.portal-content { max-width: 980px; margin: 0 auto; padding: 0 23px 33px; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 54px; padding: 8px 13px; margin-bottom: 13px; border: 1px solid #e4e9df; border-radius: 9px; background: #edf2e8; }
.preview-bar strong, .preview-bar small { display: block; line-height: 1.35; }
.preview-bar strong { font-size: .84rem; }
.preview-bar small { color: var(--muted); font-size: .72rem; }
.preview-bar .field { display: flex; align-items: center; gap: 8px; }
.preview-bar select { min-height: 36px; }
.portal-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; margin-bottom: 15px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.portal-tab { display: inline-flex; justify-content: center; align-items: center; gap: 5px; min-height: 42px; min-width: 0; padding: 5px 3px; border: 0; border-radius: 7px; background: transparent; font-size: .87rem; font-weight: 700; color: #536356; }
.portal-tab[aria-pressed="true"], .portal-tab:hover { color: #31543f; background: #e9f1e4; }
.portal-hero { padding: 23px 25px; border-radius: 13px; margin-bottom: 14px; background: linear-gradient(105deg,#203b30,#355646); }
.portal-hero h1 { margin: 7px 0 4px; font-size: clamp(2.2rem,4vw,3.3rem); }
.portal .metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.portal-lesson-list { padding: 0 16px 11px; }
.portal-lesson { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px 2px; border-top: 1px solid var(--line); }
.portal-lesson > div { min-width: 0; }
.portal-lesson strong { overflow-wrap: anywhere; }
.session-time { font-weight: 780; color: #385e47; min-width: 34px; }
.portal-dates { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; padding: 0 15px 12px; }
.portal-dates button { display: grid; place-content: center; gap: 3px; padding: 7px 2px; border: 1px solid var(--line); border-radius: 8px; background: #f7faf5; color: #3f5947; }
.portal-dates button[aria-pressed="true"], .portal-dates button:hover { border-color: #abc0aa; background: #e6f0e3; }
.portal-dates small { color: #4d6254; font-size: .73rem; }
.portal .tile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }

@media (max-width: 1100px) {
  :root { --sidebar: 205px; }
  .sidebar { padding-inline: 11px; }
  .topbar, .content { padding-inline: 21px; }
  .dashboard-grid { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); }
  .metric { padding-inline: 11px; }
  .metrics { gap: 9px; }
  .tile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 850px) {
  .sidebar { width: min(260px, 83vw); transform: translateX(-103%); visibility: hidden; transition: transform .2s ease-out, visibility .2s; padding-inline: 15px; }
  .nav-open .sidebar { transform: translateX(0); visibility: visible; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; background: #182c2180; border: 0; }
  .workspace { margin-left: 0; }
  .button.mobile-menu { display: inline-flex; }
  .breadcrumb { gap: 7px; }
  .content { padding-top: 19px; }
}

@media (max-width: 640px) {
  .topbar, .content { padding-inline: 13px; }
  .topbar { min-height: 58px; gap: 3px; }
  .breadcrumb { font-size: .8rem; }
  .breadcrumb > svg:first-of-type, .crumb-root, .top-date { display: none; }
  .top-tools { gap: 5px; }
  .top-tools .button { padding-inline: 8px; min-height: 35px; font-size: .76rem; }
  .top-tools .icon-button { width: 34px; }
  .top-tools .member-switch svg { display: none; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  .page-heading p { font-size: .84rem; }
  .content > .page-heading .button { min-height: 35px; }
  .hero, .public-hero { background-image: linear-gradient(90deg,#203b30 0%,rgb(32 59 48 / 95%) 25%,rgb(27 51 40 / 64%) 77%,rgb(22 45 34 / 52%) 100%), url("./studio.jpg"); }
  .hero { min-height: 186px; margin-bottom: 12px; border-radius: 12px; }
  .hero-copy { padding: 16px; }
  .hero h2 { font-size: clamp(2rem,8vw,2.7rem); }
  .hero p { font-size: .84rem; }
  .hero .hero-button { margin-top: 14px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 12px; }
  .metric { min-height: 105px; padding: 8px; }
  .metric-top { gap: 6px; font-size: .77rem; }
  .metric-icon { width: 32px; height: 32px; }
  .metric > strong { font-size: 1.61rem; }
  .metric > small { font-size: .72rem; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); gap: 11px; margin-bottom: 12px; }
  .recent-members { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-head { padding: 13px 12px 10px; align-items: flex-start; }
  .table-wrap table { min-width: 485px; }
  .table-wrap th, .table-wrap td { padding-inline: 9px; }
  .tile-grid, .settings-grid { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .tile { padding: 12px; }
  .content > .card + .card, .content > .tile-grid + .card, .content > .settings-grid + .card, .portal-content > .card + .card { margin-top: 12px; }
  .calendar-toolbar { padding: 9px; }
  .calendar-controls .button { min-height: 32px; }
  .calendar-controls .button.icon-button { width: 32px; }
  .calendar-controls h2 { font-size: .86rem; }
  .room-grid { grid-template-columns: minmax(0,1fr); padding: 0 9px 9px; }
  .month-grid { margin: 0 9px 9px; }
  .month-date { min-height: 46px; }
  .month-date small { font-size: .66rem; }
  .filters { padding: 0 10px 9px; }
  .search-field { min-width: 175px; }
  .public-header, .public-footer { padding: 9px 12px; }
  .public-header .wordmark strong { font-size: 1.07rem; }
  .public-header .wordmark { gap: 6px; }
  .public-header .brand-mark { width: 33px; height: 33px; }
  .public-header .actions { gap: 4px; justify-content: flex-end; }
  .public-header .button { padding: 6px; min-height: 35px; font-size: .72rem; }
  .public-header .button svg { display: none; }
  .portal-content, .public-content { padding-inline: 12px; }
  .portal-tab { flex-direction: column; min-height: 49px; font-size: .72rem; }
  .portal-hero { padding: 16px; }
  .portal .metrics { gap: 5px; }
  .portal .metric { min-height: 88px; }
  .portal .metric-top { font-size: .68rem; min-height: 32px; line-height: 1.1; }
  .portal .metric-icon { width: 24px; height: 24px; }
  .portal .metric-icon svg { width: 16px; height: 16px; }
  .portal .metric > small { display: none; }
  .portal .tile-grid { grid-template-columns: minmax(0,1fr); }
  .portal .table-wrap table, .dialog-body .table-wrap table { min-width: 100%; }
  .portal-lesson { gap: 6px; }
  .portal-lesson strong { font-size: .85rem; }
  .portal-lesson .button.compact { font-size: .72rem; padding-inline: 6px; }
}

@media (max-width: 365px) {
  .breadcrumb > strong { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .portal .metric-icon { display: none; }
  .portal-tab { font-size: .64rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Account entry and role-specific views */
.button:disabled { opacity: .65; cursor: wait; }
.account-logout.button.icon-button { width: 31px; min-height: 34px; margin-left: auto; }
.studio-account { gap: 7px; }
.studio-account .avatar { width: 32px; height: 32px; }
.studio-account strong { white-space: nowrap; }
.wordmark strong { letter-spacing: -.06em; white-space: nowrap; }

.login-layout { display: grid; grid-template-columns: minmax(405px, .94fr) minmax(0, 1.06fr); min-height: 100dvh; background: #fbfcf8; }
.login-main { display: grid; grid-template-rows: auto 1fr; align-items: start; min-width: 0; padding: 31px clamp(23px, 5vw, 74px); }
.login-main > .wordmark { align-self: start; }
.login-card { align-self: center; justify-self: center; width: min(100%, 410px); margin-block: 27px 34px; }
.login-heading { margin-bottom: 22px; }
.login-heading h1 { color: var(--green-dark); font-family: var(--serif); font-size: clamp(2.5rem, 5.6vw, 4.25rem); font-weight: 500; line-height: 1; letter-spacing: -.065em; }
.login-form { display: grid; gap: 13px; }
.login-form .field input { min-height: 47px; padding-inline: 12px; border-radius: 9px; font-size: .94rem; }
.login-form .button { min-height: 46px; margin-top: 2px; font-size: .93rem; }
.login-form .form-message { margin: 0; }
.login-catalog { display: flex; align-items: center; margin-top: 15px; border-top: 1px solid var(--line); padding-top: 9px; }
.login-image { position: relative; isolation: isolate; display: flex; align-items: flex-end; padding: clamp(29px, 5.2vw, 74px); color: white; background: #344637 linear-gradient(0deg, #152e25dc 0%, #203b3052 44%, #243c2f12 100%); }
.login-image::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #152e25e0 0%, #203b3040 55%, #243c2f06 100%), url("./studio.jpg") center / cover; }
.login-image span { color: #edf2df; font-size: .79rem; font-weight: 725; letter-spacing: .12em; }
.login-image h2 { color: #fffdf3; font: 500 clamp(2.4rem, 5.6vw, 5.3rem)/.98 var(--serif); letter-spacing: -.065em; margin-top: 9px; }
.trainer-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trainer-portal .page-heading { margin-top: 8px; }
.section-switch { margin-bottom: 14px; }
.section-switch button { padding: 8px 12px; font-size: .85rem; }
.monthly-card > .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: 14px; }
.commission-footer { padding-top: 12px; justify-content: flex-end; }
.dialog-body .monthly-card { border: 0; box-shadow: none; }
.dialog-body .monthly-card > .card-head, .dialog-body .commission-footer { padding-inline: 0; }
.dialog-body .monthly-card > .metrics { margin-inline: 0; }
.notification-list p { white-space: pre-wrap; }

.lesson-row { grid-template-columns: 89px minmax(0, 1fr) auto; }
.lesson-row time, .session-time, .slot-range { white-space: nowrap; font-size: .8rem; font-variant-numeric: tabular-nums; }
.room-timeline { border-top: 1px solid var(--line); }
.room-timeline h3 { font-size: .94rem; padding: 13px 18px; }
.room-timeline td:not(:first-child) { width: 28%; }
.room-timeline td { height: 42px; }
.room-capacity { font-weight: 550; color: var(--muted); }
.room-lesson { display: block; width: 100%; min-height: 36px; padding: 5px 8px; border: 1px solid #e0ebdc; border-radius: 7px; color: #365440; background: #edf4e9; text-align: left; }
.room-lesson:hover { border-color: #b5c8b2; }
.room-lesson-canceled { color: #874641; background: #faefee; border-color: #f1dad6; }

.catalog-site { background: #fcf9f3; }
.catalog-site .public-hero { min-height: clamp(290px, 42vw, 455px); }
.catalog-section-head { margin-bottom: 14px; }
.catalog-section-head h2 { margin-bottom: 3px; }
.catalog-section-head p { color: #5e6c60; font-size: .88rem; }
.catalog-pricing { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(230px, .65fr); gap: 16px; align-items: center; }
.catalog-pricing-live { grid-template-columns: minmax(0, 1fr); }
.catalog-updated { margin-top: 8px; }
.catalog-prices { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.catalog-price { padding: 15px; border: 1px solid #eadbca; border-radius: 12px; background: #fff; }
.catalog-price h3 { font-size: clamp(.94rem, 1.6vw, 1.08rem); color: #49382a; line-height: 1.25; margin-bottom: 12px; min-height: 2.5em; }
.catalog-price dl > div { display: flex; justify-content: space-between; align-items: center; gap: 7px; padding: 7px 0; border-top: 1px solid #f1e8de; }
.catalog-price dt { font-size: .86rem; color: #62574d; }
.catalog-price dd { margin: 0; font-size: 1.02rem; color: var(--green-dark); font-weight: 775; white-space: nowrap; }
.price-poster { display: block; border: 1px solid #e7d8c9; border-radius: 12px; overflow: hidden; justify-self: center; width: min(100%, 280px); }
.price-poster img { width: 100%; height: auto; }
.catalog-training { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.catalog-training article { padding: 12px 13px; }
.catalog-training h3 { margin-bottom: 3px; font-size: 1rem; }
.catalog-training p { color: var(--muted); font-size: .85rem; }
.catalog-site .contact-list a { text-decoration: underline; text-decoration-color: #879c87; text-underline-offset: 3px; }

@media (max-width: 850px) {
  .login-layout { grid-template-columns: minmax(365px, 1.15fr) minmax(0, .85fr); }
  .login-image { padding-inline: 28px; }
  .catalog-training { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .login-layout { display: block; }
  .login-main { min-height: 100dvh; padding: 19px clamp(16px, 5vw, 30px) 9px; }
  .login-image { display: none; }
  .login-card { margin-block: 22px; }
  .login-heading h1 { font-size: clamp(2.62rem, 12vw, 4.15rem); }
  .login-form .field input { font-size: 1rem; }
  .lesson-row { grid-template-columns: 73px minmax(0, 1fr) auto; gap: 5px; }
  .lesson-row time, .session-time { font-size: .72rem; }
  .trainer-portal .metric > strong { overflow-wrap: anywhere; }
  .trainer-portal .portal-tab { flex-direction: row; }
  .catalog-pricing { grid-template-columns: minmax(0, 1fr); }
  .catalog-prices { gap: 7px; }
  .catalog-price { padding: 8px; }
  .catalog-price h3 { min-height: 3em; }
  .catalog-price dd { font-size: .9rem; }
  .catalog-site .public-hero { min-height: 261px; }
}

@media (max-width: 365px) {
  .member-switch { font-size: .7rem !important; }
  .catalog-training { grid-template-columns: minmax(0, 1fr); }
}
