@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

[hidden] { display: none !important; }
.booting .app-shell,
.booting #public-root { visibility: hidden; }
.boot-loader {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 16px;
  color: #d6e2dc;
  background: #111e11;
  font-family: 'DM Sans', system-ui, sans-serif;
  text-align: center;
}
.boot-loader-mark {
  position: relative;
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border: 2px solid rgba(215, 229, 221, .28);
  border-radius: 50%;
  animation: boot-loader-spin 1.05s linear infinite;
}
.boot-loader-mark::before,
.boot-loader-mark::after,
.boot-loader-mark span {
  position: absolute;
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c5a65e;
}
.boot-loader-mark::before { top: -4px; left: 12px; }
.boot-loader-mark::after { right: -4px; bottom: 5px; opacity: .72; }
.boot-loader-mark span { bottom: -4px; left: 6px; opacity: .46; }
.boot-loader-text { color: rgba(229, 240, 234, .72); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
@keyframes boot-loader-spin { to { transform: rotate(360deg); } }
.public-mode { background: #f5f8f5; }
.public-site, .login-page { color: #1c2b1d; font-family: Manrope, system-ui, sans-serif; }
.public-header, .login-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 92px; padding: 24px 6%; background: #fff; }
.public-brand { display: inline-flex; align-items: center; gap: 12px; color: #17351d; text-decoration: none; font-size: 14px; font-weight: 800; letter-spacing: 0; }
.public-brand .brand-dot { width: 23px; height: 23px; border-color: #3d7149; }
.public-brand .brand-dot::after { background: #3d7149; top: 6px; left: 6px; }
.public-nav { display: flex; align-items: center; gap: 32px; }
.public-nav a { color: #5d6f61; font-size: 12px; font-weight: 600; text-decoration: none; }
.public-nav a:hover { color: #3d7149; }
.public-login { display: inline-flex; align-items: center; gap: 16px; min-height: 42px; padding: 0 17px; color: #2f6040; border: 1px solid #cadbcd; border-radius: 5px; text-decoration: none; font-size: 12px; font-weight: 700; }
.public-login span { font-size: 18px; }
.public-account-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 1; min-width: 0; }
.public-register { color: #234b30; text-decoration: none; font-size: 12px; font-weight: 700; }
.registration-link { text-align: center; font-size: 13px; line-height: 1.7; margin: 22px 0 0; color: #6a766d; }
.registration-link a, .registration-intro-link { color: #2e5738; }
.registration-intro-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 14px; }
.registration-intro-link svg { width: 16px; }
.login-main.registration-main { align-items: start; gap: 80px; padding-top: 48px; }
.registration-main .login-intro { padding-top: 24px; }
.registration-main .login-intro h1 { font-size: 32px; }
.registration-form .login-form-top { margin-bottom: 22px; }
.registration-form .form-field { margin-bottom: 16px; }
.application-gender { border: 0; padding: 0; margin: 0 0 18px; display: flex; gap: 18px; }
.application-gender legend { color: #365648; font-size: 11px; font-weight: 700; margin-bottom: 10px; }
.application-gender label { display: flex; gap: 7px; align-items: center; font-size: 13px; cursor: pointer; }
.application-gender input { accent-color: #2d5435; width: 16px; height: 16px; }
.registration-form input[readonly] { color: #55715d; background: #f0f5f1; cursor: not-allowed; }
.callback-form { width: min(100%, 360px); min-width: 0; display: grid; gap: 16px; }
.callback-form .login-submit { display: flex; align-items: center; justify-content: center; gap: 10px; }
.callback-form .login-submit svg { width: 18px; height: 18px; }
.callback-form .login-submit, .registration-form .login-submit { background: #31573c; }
.callback-form .login-submit:hover, .registration-form .login-submit:hover { background: #25432e; }
.public-callout { gap: 48px; }
.public-callout > div { flex: 1; min-width: 0; }
.public-callout .form-field label { font-size: 12px; color: #d5dfd5; }
.public-callout input { color: #192d1e; background: #fff; }
.public-callout .login-error { color: #ffd0c8; }
.application-success { padding: 24px 0; }
.application-success > svg { width: 32px; height: 32px; color: #3c7651; margin-bottom: 16px; }
.application-success h2 { font-size: 22px; line-height: 1.35; margin: 0 0 12px; }
.application-success p { font-size: 14px; line-height: 1.6; }
.application-success .button-secondary { display: inline-flex; margin-top: 20px; text-decoration: none; }
.request-filters { display: grid; grid-template-columns: minmax(180px, 1fr) 190px 180px; gap: 16px; align-items: end; margin: 0 0 20px; }
.request-filters .client-search-box { width: 100%; height: 42px; }
.request-filters .client-search-box svg { width: 17px; flex-shrink: 0; }
.request-filters .form-field > span { font-size: 12px; color: var(--muted); }
.request-name { color: var(--ink); text-decoration: none; }
.request-name:hover { text-decoration: underline; }
#request-results a, .client-info-grid dd a, .referral-sharing a, .referral-clients a { color: var(--ink); text-underline-offset: 3px; }
#request-results a:hover, .client-info-grid dd a:hover, .referral-sharing a:hover, .referral-clients a:hover { color: var(--teal); }
.request-detail-actions { display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 16px; flex-wrap: wrap; }
.request-detail-actions svg { width: 17px; height: 17px; }
.request-detail-actions .button-primary, .request-detail-actions .button-secondary { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.referral-share-row { display: flex; align-items: stretch; gap: 10px; margin: 20px 0 12px; }
.referral-share-row input { flex: 1; width: 0; min-width: 0; border: 1px solid var(--line); border-radius: 5px; padding: 12px; color: var(--ink); font-size: 13px; background: white; }
.referral-share-row button { width: 44px; padding: 0; display: grid; place-items: center; flex-shrink: 0; }
.referral-share-row svg { width: 18px; }
.referral-sharing h2 { font-size: 18px; }
.referral-sharing p { font-size: 13px; line-height: 1.6; }
.referral-clients { margin-top: 20px; }
.referral-program-card { margin-top: 18px; padding: 24px; border: 1px solid var(--line); background: var(--card); }
.referral-program-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 28px; align-items: start; }
.referral-program-head h2 { margin: 5px 0 10px; font-size: 22px; }
.referral-program-head p { max-width: 650px; margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.referral-share-box { padding: 16px; border: 1px solid var(--line); background: var(--soft); }
.referral-share-box h3 { margin: 0; font-size: 13px; }
.referral-share-box small { color: var(--muted); font-size: 11px; }
.referral-inviter { margin: 17px 0 0; color: var(--muted); font-size: 12px; }
.referral-stats { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.referral-program-card a, .referral-tab-panel a { color: var(--ink); text-underline-offset: 3px; }
.referral-program-card + .referral-stats ~ .admin-table-card { margin-top: 18px; }
.referral-balance-card, .referral-stat-card { min-width: 0; padding: 18px; }
.referral-balance-card { background: #edf3ed; }
.referral-balance-card strong { display: block; margin: 8px 0 4px; color: var(--ink); font: 700 25px Manrope, sans-serif; }
.referral-balance-card small, .referral-stat-card span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.referral-stat-card strong { display: block; margin-top: 13px; color: var(--ink); font: 700 21px Manrope, sans-serif; }
.referral-registration-breakdown { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.referral-actions { display: flex; justify-content: flex-end; margin: 16px 0 0; }
.referral-how-card { margin-top: 18px; padding: 22px 24px; border: 1px solid var(--line); background: var(--soft); }
.referral-how-card h2 { margin: 0 0 12px; font-size: 18px; }
.referral-how-card ol { margin: 0; padding-left: 20px; color: var(--ink); font-size: 13px; line-height: 1.65; }
.referral-how-card li + li { margin-top: 4px; }
.referral-example { margin: 16px 0 6px; padding: 12px 14px; border-left: 3px solid var(--teal); background: var(--card); color: var(--ink); font-size: 13px; line-height: 1.55; }
.referral-how-card > .muted { display: block; margin: 0; font-size: 11px; line-height: 1.5; }
.referral-tabs { margin-top: 22px; }
.referral-tab-panel { margin-top: 12px; }
.referral-level-badge { display: inline-block; padding: 4px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 10px; white-space: nowrap; }
.referral-indent { display: inline-block; width: 20px; color: var(--muted); }
.money-positive { color: #28734f; }
.money-negative { color: #9e3d47; }
.table-link-button { display: inline; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.table-link-button:hover { color: var(--teal); }
.invoice-items-editor { margin-top: 20px; padding: 16px; border: 1px solid var(--line); background: var(--soft); }
.invoice-items-editor .section-label { margin-bottom: 12px; }
.modal.modal-wide, .modal:has(.invoice-form-layout), .modal:has(.invoice-detail-columns), .modal:has(.invoice-confirmation) { width: min(920px, 100%); }
.invoice-form-layout, .invoice-detail-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); gap: 24px; }
.invoice-form-main, .invoice-form-side, .invoice-modal-section { min-width: 0; }
.invoice-form-client { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.invoice-form-kicker { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.invoice-form-client strong { display: block; color: var(--ink); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.invoice-form-client > .muted { flex: 0 0 auto; font-size: 11px; font-variant-numeric: tabular-nums; }
.invoice-form-main > .form-field { margin-top: 16px; }
.invoice-form-main .form-field label, .invoice-form-side .form-field label { font-size: 10px; }
.invoice-form-main .form-field input, .invoice-form-side .form-field input, .invoice-form-side .form-field select { height: 37px; font-size: 12px; }
.invoice-form-layout .form-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.invoice-item-head, .invoice-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 68px 112px 32px; gap: 7px; align-items: center; }
.invoice-item-head { padding: 0 4px 7px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.invoice-item-row + .invoice-item-row { margin-top: 8px; }
.invoice-item-row input { width: 100%; min-width: 0; min-height: 36px; border: 1px solid var(--line); border-radius: 5px; padding: 0 9px; color: var(--ink); background: var(--card); font: inherit; font-size: 12px; }
.invoice-item-row .icon-button { width: 34px; height: 34px; }
.invoice-total-row { display: flex; justify-content: flex-end; gap: 20px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.invoice-total-row strong { color: var(--ink); font-size: 17px; }
.invoice-modal-section { margin-top: 0; padding: 17px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); }
.invoice-modal-section h3, .invoice-payment-box h3 { margin: 0 0 10px; font-size: 13px; }
.invoice-modal-section tfoot th { padding: 12px 13px 0; border-top: 1px solid var(--line); text-align: left; }
.invoice-payment-box { margin-top: 18px; padding: 16px; border: 1px solid var(--line); background: var(--soft); }
.invoice-payment-box .form-field > span { color: var(--muted); font-size: 10px; font-weight: 600; }
.invoice-payment-help { margin-top: 12px; padding: 12px; border-left: 3px solid var(--teal); background: var(--card); color: var(--muted); font-size: 12px; line-height: 1.6; }
.invoice-methods { padding: 17px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }
.invoice-methods h3 { margin: 0; font-size: 14px; }
.invoice-methods > .muted { margin: 6px 0 14px; font-size: 11px; line-height: 1.45; }
.invoice-method-options { display: grid; gap: 8px; }
.invoice-method-option { display: flex; align-items: center; gap: 9px; min-height: 32px; color: var(--ink); font-size: 12px; cursor: pointer; }
.invoice-method-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--teal); }
.invoice-form-note { margin: 12px 3px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.invoice-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.invoice-detail-heading h2 { margin: 0 0 5px; }
.invoice-detail-heading p { margin: 0; font-size: 11px; }
.invoice-detail-columns { margin-top: 20px; }
.invoice-detail-table, .invoice-payment-table { table-layout: fixed; }
.invoice-detail-table th, .invoice-detail-table td, .invoice-payment-table th, .invoice-payment-table td { padding: 11px 8px; font-size: 11px; }
.invoice-detail-table th:first-child, .invoice-detail-table td:first-child { width: auto; }
.invoice-payment-table th:last-child, .invoice-payment-table td:last-child { text-align: right; }
.invoice-allowed-methods { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 15px 0 0; color: var(--muted); font-size: 10px; }
.invoice-allowed-methods > span { width: 100%; margin-bottom: 2px; }
.invoice-allowed-methods b { border-radius: 4px; padding: 4px 7px; background: var(--soft); color: var(--ink); font-size: 10px; font-weight: 600; }
.payment-cancelled { color: #b24752; }
.danger-outline { color: #a64d56 !important; border: 1px solid #e6c5c8 !important; background: #fff7f7 !important; }
.invoice-row { cursor: pointer; }
.invoice-row:hover { background: var(--soft); }
.payment-success { margin: 18px 0 0; color: #28734f; font-weight: 700; }
@media (max-width: 1100px) {
  .public-header .public-nav { display: none; }
  .request-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .request-filters .client-search-box { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .request-filters { grid-template-columns: 1fr 1fr; gap: 12px; }
  .request-filters .client-search-box { grid-column: 1 / -1; }
  .login-main.registration-main { gap: 24px; }
  .registration-main .login-intro { padding-top: 0; }
  .registration-main .login-intro h1 { font-size: 28px; }
  .public-callout { flex-direction: column; align-items: stretch; gap: 28px; }
  .callback-form { width: 100%; }
}
@media (max-width: 420px) {
  .public-account-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .public-header .public-brand { font-size: 14px; gap: 7px; }
  .public-header .public-register { font-size: 11px; }
  .public-header .public-login { font-size: 10px; padding: 0 8px; gap: 5px; }
  .request-detail-actions > * { width: 100%; justify-content: center; }
}
.public-hero { position: relative; display: flex; align-items: center; min-height: 410px; height: min(700px, calc(100svh - 220px)); overflow: hidden; color: #fff; background: #1d3821 url('/assets/nature.jpg') center 54% / cover; }
.public-hero-overlay { position: absolute; inset: 0; background: rgba(5, 17, 7, .45); }
.public-hero-content { position: relative; z-index: 1; max-width: 670px; margin-left: 10%; padding: 70px 0 110px; }
.public-kicker { margin: 0 0 18px; color: #3d7149; font-size: 11px; line-height: 1.5; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.public-hero .public-kicker { color: #dce9e1; }
.public-hero h1 { margin: 0 0 24px; font-size: 52px; line-height: 1.18; letter-spacing: 0; font-weight: 600; }
.public-hero-copy { max-width: 480px; margin: 0 0 36px; color: #eff5f0; font-size: 18px; line-height: 1.7; }
.public-hero-cta { display: inline-flex; align-items: center; justify-content: space-between; gap: 34px; min-height: 51px; padding: 0 22px; border-radius: 5px; background: #fff; color: #1a3c22; font-size: 12px; font-weight: 800; text-decoration: none; }
.public-hero-cta:hover { background: #e8f2ec; }
.public-hero-cta span { font-size: 19px; }
.public-hero-note { position: absolute; z-index: 1; left: 10%; bottom: 38px; display: flex; align-items: center; gap: 13px; font-size: 11px; color: #e5efe8; }
.public-note-line { width: 46px; height: 1px; background: #d9e8de; }
.public-section { width: min(1130px, calc(100% - 12%)); margin: 0 auto; padding: 88px 0; }
.public-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 85px; align-items: start; padding-top: 46px; }
.public-section-heading h2 { max-width: 460px; margin: 0; font-size: 31px; line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.public-intro-copy { padding-top: 31px; }
.public-intro-copy p { color: #627263; font-size: 14px; line-height: 1.85; margin-bottom: 19px; }
.public-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 23px; color: #74887c; font-size: 11px; }
.public-sources a { display: inline-flex; gap: 4px; align-items: center; color: #316c5b; text-decoration: none; border-bottom: 1px solid #c6d8ce; }
.public-site svg, .login-page svg { display: block; width: 18px; height: 18px; flex-shrink: 0; }
.public-sources svg { width: 13px; height: 13px; }
.public-process-list article:nth-child(2) > span { color: #b76550; }
.public-process-list article:nth-child(3) > span { color: #9b792c; }
.public-process { border-top: 1px solid #d8e4df; }
.public-process .public-section-heading { margin-bottom: 43px; }
.public-process-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.public-process-list article { border-top: 1px solid #becfc6; padding-top: 20px; }
.public-process-list article > span { display: block; margin-bottom: 24px; color: #398476; font-size: 12px; font-weight: 700; }
.public-process-list h3 { margin: 0 0 13px; font-size: 17px; font-weight: 700; }
.public-process-list p { margin: 0; color: #687d76; font-size: 13px; line-height: 1.8; }
.public-color-band { background: #e9eeed; }
.public-color, .public-questions { display: grid; grid-template-columns: 1fr 1fr; gap: 85px; }
.public-section-heading > p:last-child:not(.public-kicker) { margin: 22px 0 0; max-width: 410px; color: #627263; font-size: 13px; line-height: 1.85; }
.public-color-list { display: grid; gap: 24px; }
.public-color-list article { display: flex; align-items: start; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid #cfdbd4; }
.public-color-list article:last-child { padding-bottom: 0; border: 0; }
.public-color-list article > svg { width: 22px; height: 22px; color: #2d7668; margin-top: 2px; }
.public-color-list article:nth-child(2) > svg { color: #b76550; }
.public-color-list article:nth-child(3) > svg { color: #98782d; }
.public-color-list h3 { font-size: 15px; margin: 0 0 9px; }
.public-color-list p { font-size: 12px; line-height: 1.85; margin: 0; color: #627263; }
.public-faq details { border-bottom: 1px solid #d8e4df; }
.public-faq details:first-child { border-top: 1px solid #d8e4df; }
.public-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; cursor: pointer; list-style: none; font-size: 13px; line-height: 1.65; font-weight: 700; }
.public-faq summary::-webkit-details-marker { display: none; }
.public-faq summary:focus-visible { outline: 2px solid #327c70; outline-offset: 4px; }
.public-faq details[open] summary svg { transform: rotate(45deg); }
.public-faq details p { margin: 0 0 22px; color: #627263; font-size: 12px; line-height: 1.85; }
.public-callout > svg { width: 48px; height: 48px; color: #a8d1bf; }
.public-footer .public-sources { margin: 0; }
.public-callout { display: flex; justify-content: space-between; align-items: center; gap: 42px; padding: 66px max(6%, calc((100% - 1130px) / 2)); color: #fff; background: #1b2d1d; }
.public-callout .public-kicker { color: #a8d1bf; }
.public-callout h2 { max-width: 590px; margin: 0 0 15px; color: #fff; font-size: 29px; line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.public-callout p:not(.public-kicker) { max-width: 520px; margin: 0; color: #c5dfd2; font-size: 13px; line-height: 1.8; }
.public-callout .public-hero-cta { flex-shrink: 0; }
.public-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 31px 6%; background: #fff; }
.public-footer > span { color: #73877e; font-size: 10px; }
.login-page { min-height: 100vh; display: flex; flex-direction: column; background: #f4f7f5; }
.login-header { background: transparent; }
.login-header > a:last-child, .login-footer a { color: #526d60; font-size: 11px; font-weight: 600; text-decoration: none; }
.login-header > a:last-child span { margin-left: 9px; font-size: 17px; }
.login-main { width: min(960px, calc(100% - 12%)); flex: 1; display: grid; grid-template-columns: 1fr 420px; gap: 110px; align-items: center; margin: 0 auto; padding: 64px 0 100px; }
.login-intro h1 { max-width: 390px; margin: 0 0 21px; font-size: 38px; line-height: 1.35; letter-spacing: 0; font-weight: 600; }
.login-intro > p:last-child { max-width: 320px; margin: 0; color: #6c7e74; font-size: 13px; line-height: 1.8; }
.login-form { padding: 33px; border: 1px solid #dce7e0; border-radius: 8px; background: #fff; box-shadow: 0 12px 42px rgba(39, 80, 62, .05); }
.login-form-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 31px; }
.login-form-label { color: #234d40; font-size: 14px; font-weight: 700; }
.login-form-mark { color: #abc0b3; font-size: 10px; font-weight: 700; }
.login-form .form-field { margin-bottom: 22px; gap: 9px; }
.login-form .form-field label { color: #365648; font-size: 11px; font-weight: 700; }
.password-field { position: relative; }
.login-form .password-field input { padding-right: 48px; }
.password-field button { position: absolute; right: 3px; top: 3px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 4px; color: #6b8578; background: transparent; cursor: pointer; }
.password-field button:hover { background: #eff4f0; }
.login-header > a:last-child { display: inline-flex; align-items: center; gap: 8px; }
.login-form .form-field input { height: 46px; padding: 0 13px; font-size: 13px; border-color: #d9e4dc; }
.login-form .password-field input { padding-right: 48px; }
.login-form .form-field small { color: #91a297; font-size: 10px; }
.login-submit { width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-top: 28px; padding: 0 16px; color: #fff; background: #2b6f5d; border: 0; border-radius: 5px; font-size: 12px; font-weight: 700; cursor: pointer; }
.login-submit:disabled { opacity: .6; cursor: wait; }
.login-submit span { font-size: 19px; }
.login-help { margin: 19px 0 0; color: #829288; font-size: 10px; line-height: 1.8; }
.login-error { color: #a34233; background: #fbeee9; border-radius: 4px; padding: 11px; font-size: 11px; line-height: 1.6; }
.login-footer { display: flex; justify-content: space-between; gap: 22px; padding: 24px 6%; border-top: 1px solid #e0e8e2; }
.login-footer span { color: #8b9b90; font-size: 10px; }

@media (max-width: 800px) {
  .public-header, .login-header { min-height: 76px; padding: 19px 6%; }
  .public-nav { display: none; }
  .public-hero { min-height: 410px; height: calc(100svh - 180px); max-height: 750px; }
  .public-hero-content { max-width: 80%; margin-left: 7%; }
  .public-hero h1 { font-size: 43px; }
  .public-hero-note { left: 7%; }
  .public-intro { gap: 38px; }
  .public-color, .public-questions { gap: 38px; }
  .public-section-heading h2 { font-size: 26px; }
  .public-process-list { gap: 24px; }
  .public-callout { align-items: flex-start; flex-direction: column; }
  .login-main { grid-template-columns: 1fr 1fr; gap: 40px; }
  .login-intro h1 { font-size: 30px; }
  .login-form { padding: 25px; }
  .login-form .form-field input { font-size: 16px; }
}
@media (max-width: 540px) {
  .public-header, .login-header { gap: 14px; padding: 17px 5%; }
  .public-brand { gap: 9px; font-size: 11px; }
  .public-login { min-height: 38px; padding: 0 11px; gap: 10px; font-size: 10px; }
  .public-hero { min-height: 390px; height: calc(100svh - 170px); max-height: 690px; background-position: 62% center; }
  .public-hero-content { max-width: 86%; padding: 65px 0 105px; }
  .public-hero h1 { font-size: 31px; }
  .public-hero-copy { max-width: 330px; font-size: 15px; line-height: 1.8; }
  .public-kicker { font-size: 9px; }
  .public-hero-cta { min-height: 48px; padding: 0 17px; gap: 24px; font-size: 11px; }
  .public-hero-note { bottom: 27px; font-size: 9px; }
  .public-section { width: 88%; padding: 52px 0; }
  .public-intro { grid-template-columns: 1fr; gap: 20px; }
  .public-color, .public-questions { grid-template-columns: 1fr; gap: 30px; }
  .public-section-heading > p:last-child:not(.public-kicker) { font-size: 12px; }
  .public-section-heading h2 { font-size: 25px; line-height: 1.45; }
  .public-intro-copy { padding-top: 0; }
  .public-intro-copy p { font-size: 12px; line-height: 1.9; }
  .public-process-list { grid-template-columns: 1fr; gap: 26px; }
  .public-process-list article { display: grid; grid-template-columns: 35px 1fr; gap: 7px 12px; }
  .public-process-list article > span { grid-row: span 2; margin: 3px 0 0; }
  .public-process-list h3 { margin: 0; font-size: 15px; }
  .public-process-list p { font-size: 12px; }
  .public-callout { padding: 46px 6%; gap: 27px; }
  .public-callout h2 { font-size: 25px; }
  .public-callout p:not(.public-kicker) { font-size: 12px; }
  .public-footer { flex-wrap: wrap; gap: 17px; padding: 25px 6%; }
  .public-footer > span:nth-child(2) { flex-basis: 100%; order: 3; }
  .public-footer .public-sources { flex-basis: 100%; order: 3; }
  .login-header > a:last-child { font-size: 9px; }
  .login-header > a:last-child span { display: none; }
  .login-main { grid-template-columns: 1fr; width: 88%; padding: 33px 0 50px; gap: 29px; align-content: start; }
  .login-intro h1 { max-width: 330px; font-size: 28px; }
  .login-intro > p:last-child { max-width: 320px; font-size: 12px; }
  .login-form { padding: 25px; }
  .login-footer { flex-direction: column; gap: 12px; padding: 20px 6%; }
  .login-footer span { max-width: 280px; font-size: 9px; line-height: 1.7; }
}

@media (max-height: 640px) {
  .public-header { min-height: 64px; padding-top: 12px; padding-bottom: 12px; }
  .public-hero { min-height: 300px; }
  .public-hero-content { padding: 22px 0 55px; }
  .public-hero h1 { font-size: 31px; margin-bottom: 12px; }
  .public-hero-copy { margin-bottom: 20px; font-size: 14px; }
  .public-hero-note { bottom: 17px; }
  .public-hero .public-kicker { margin-bottom: 10px; }
}
@media (max-height: 440px) {
  .public-hero { min-height: 240px; height: calc(100svh - 140px); }
  .public-hero-content { padding: 16px 0; }
  .public-hero h1 { font-size: 26px; margin-bottom: 8px; }
  .public-hero-copy { font-size: 12px; line-height: 1.5; margin-bottom: 12px; }
  .public-hero-cta { min-height: 42px; }
  .public-hero-note { display: none; }
  .public-intro { padding-top: 25px; }
}

:root {
  --ink: #1c2b1d;
  --muted: #6d796f;
  --soft: #e9f0e9;
  --line: #d8e3d9;
  --canvas: #f5f8f5;
  --card: #ffffff;
  --teal: #3d7149;
  --teal-dark: #111e11;
  --teal-soft: #deebdf;
  --gold: #b98536;
  --gold-soft: #fbf1df;
  --coral: #c56451;
  --coral-soft: #fae8e3;
  --shadow: 0 12px 34px rgba(17, 30, 17, .07);
}

* { box-sizing: border-box; }
html { min-height: 100%; scrollbar-gutter: stable; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: 'DM Sans', system-ui, sans-serif; }

/* The admin workspace uses a denser, darker shell so it is immediately distinct from the client cabinet. */
body.admin-mode {
  --canvas: #eef1ef;
  --card: #fbfcfb;
  --line: #d7ded9;
  --ink: #252b28;
  --muted: #68736d;
  --teal: #7b3048;
  --teal-dark: #23141c;
  --teal-soft: #e7eeea;
  --soft: #f1f4f2;
  --shadow: 0 8px 24px rgba(34, 45, 39, .07);
  background: var(--canvas);
}
body.admin-mode .sidebar {
  background: #23141c;
  border-right: 1px solid #593441;
}
body.admin-mode .brand-mark { color: #fbf4f5; }
body.admin-mode .brand-dot { border-color: #d5b46d; }
body.admin-mode .brand-dot::after { background: #d5b46d; }
body.admin-mode .brand-context { color: #d7bfc7; }
body.admin-mode .sidebar-profile { padding-bottom: 23px; border-bottom: 1px solid rgba(255, 235, 241, .12); }
body.admin-mode .sidebar-profile span:not(.avatar) { color: #c6aeb7; }
body.admin-mode .nav-item { color: #d0b9c0; }
body.admin-mode .nav-item:hover { background: rgba(255,255,255,.08); color: #fff9fa; }
body.admin-mode .nav-item.active { background: #5b293b; color: #fff; box-shadow: inset 3px 0 0 #d5b46d; }
body.admin-mode .nav-item.active .nav-icon { color: #e5c980; }
body.admin-mode .sidebar-footer { border-top-color: rgba(255, 235, 241, .14); }
body.admin-mode .topbar { background: #f7f9f7; border-bottom-color: #d7ded9; }
body.admin-mode .breadcrumb #section-kicker { color: #432631; font-size: 14px; font-weight: 800; }
body.admin-mode .breadcrumb #section-title { color: #432631; font-size: 12px; font-weight: 500; }
body.admin-mode .breadcrumb #section-detail { color: #6f5a62; font-size: 12px; font-weight: 500; }
body.admin-mode .page-content { padding-top: 39px; }
body.admin-mode .page-heading .eyebrow { color: #8f5a32; }
body.admin-mode .card { box-shadow: 0 7px 20px rgba(34, 45, 39, .06); }
body.admin-mode .admin-table-card { background: #fbfcfb; }
body.admin-mode .admin-table-card .section-label { padding-bottom: 15px; border-bottom: 1px solid #d7ded9; }
body.admin-mode .data-table th { color: #6d7972; }
body.admin-mode .data-table tbody tr:hover { background: #f1f4f2; }
body.admin-mode .data-table .table-link { color: #1e181b; }
body.admin-mode .status.done { background: #e2f1e5; color: #2f7140; }
body.admin-mode .status.cancelled { background: #fae3e6; color: #b24752; }
body.admin-mode .button-primary { background: #7b3048; }
body.admin-mode .button-primary:hover { background: #64253a; }
body.admin-mode .button-secondary { background: #e7eeea; color: #7b3048; }
body.admin-mode .button-secondary:hover { background: #dce7e1; }
body.admin-mode .button-link { color: #7b3048; }
body.admin-mode .stat-symbol { background: #e7eeea; }
body.admin-mode .stat-symbol.gold { background: #f2e8cf; }
body.admin-mode .stat-symbol.coral { background: #f5dfda; }
body.admin-mode .calendar-workspace .card,
body.admin-mode .calendar-day-feed,
body.admin-mode .file-check-card { border-color: #d8cbd0; }
body.admin-mode .modal-backdrop { background: rgb(0 0 0 / 68%); }
body.admin-mode .inline-toggle { color: #765864; }
body.admin-mode .boot-loader,
body.admin-login-mode .boot-loader { background: #23141c; }
body.admin-login-mode .login-page { background: #eee8ea; }
body.admin-login-mode .login-form { border-color: #d2c0c7; border-top: 3px solid #c7a35d; box-shadow: 0 14px 42px rgba(67, 32, 45, .11); }
body.admin-login-mode .login-form-label { color: #57283a; }
body.admin-login-mode .login-submit { background: #7b3048; }
body.admin-login-mode .public-brand { color: #57283a; }
body.admin-login-mode .public-brand .brand-dot { border-color: #7b3048; }
body.admin-login-mode .public-brand .brand-dot::after { background: #7b3048; }
body.admin-login-mode .public-kicker { color: #8f5a32; }
body.admin-login-mode .admin-login-brand-context { color: #8f5a32; font-family: 'DM Sans', system-ui, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
body.admin-mode button:focus-visible,
body.admin-mode a:focus-visible,
body.admin-login-mode button:focus-visible,
body.admin-login-mode a:focus-visible { outline-color: rgba(123, 48, 72, .38); }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(61, 113, 73, .35); outline-offset: 2px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 260px; flex: 0 0 260px; display: flex; flex-direction: column; background: var(--teal-dark); color: #e7f0ec; padding: 27px 17px 20px; }
.brand-mark { display: grid; justify-items: start; gap: 8px; width: max-content; padding: 0 15px; font-family: Manrope, sans-serif; }
.brand-identity { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .16em; }
.brand-name { line-height: 1; }
.brand-context { display: block; margin-left: 29px; color: #9fb5ae; font-family: 'DM Sans', system-ui, sans-serif; font-size: 10px; font-weight: 600; line-height: 1.1; letter-spacing: .02em; white-space: nowrap; }
.brand-dot { width: 19px; height: 19px; border: 3px solid #d9bd7c; border-radius: 50%; position: relative; }
.brand-dot::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #d9bd7c; top: 4px; left: 4px; }
.sidebar-profile { margin: 41px 8px 25px; display: flex; gap: 11px; align-items: center; }
.sidebar-profile strong { display: block; font-size: 13px; font-weight: 600; }
.sidebar-profile span:not(.avatar) { display: block; margin-top: 4px; color: #92aaa6; font-size: 11px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 39px; height: 39px; border-radius: 50%; background: #d7e9de; color: var(--teal-dark); font-weight: 700; font-size: 12px; }
.avatar.small { width: 31px; height: 31px; font-size: 10px; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-item { border: 0; border-radius: 8px; background: transparent; color: #a9bfba; min-height: 46px; padding: 0 13px; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; font-size: 13px; transition: .18s ease; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { box-shadow: inset 3px 0 0 #d8b66e; }
.nav-icon { width: 17px; text-align: center; color: #8da9a4; font-size: 16px; }
.nav-item.active .nav-icon { color: #e6ca84; }
.nav-count { margin-left: auto; border-radius: 20px; background: #c56451; color: #fff; padding: 2px 7px; font-size: 10px; }
.sidebar-footer { margin-top: auto; display: grid; gap: 16px; padding: 20px 14px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.text-button, .sidebar-logout { border: 0; padding: 0; background: transparent; color: #a9bfba; text-align: left; cursor: pointer; font-size: 11px; }
.text-button span, .sidebar-logout span { float: right; font-size: 15px; }
.text-button:hover, .sidebar-logout:hover { color: #fff; }

.main-area { min-width: 0; flex: 1; }
.topbar { height: 79px; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.78); }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 12px; line-height: 1.2; }
.breadcrumb-link { border: 0; padding: 0; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.breadcrumb-link:disabled { cursor: default; }
.breadcrumb-link:not(:disabled):hover { text-decoration: underline; }
.breadcrumb strong { color: var(--ink); font-size: 13px; font-weight: 700; }
.breadcrumb-link, .breadcrumb #section-detail { line-height: 1.2; }
.breadcrumb #section-detail { font-family: inherit; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breadcrumb-separator { color: #b4c2bc; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.icon-button, .profile-chip, .mobile-menu { border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.notification-button { position: relative; font-size: 24px; line-height: 1; }
.notification-button i { position: absolute; right: 0; top: 1px; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.profile-chip { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.chevron { color: var(--muted); font-size: 16px; margin-left: 2px; }
.mobile-menu { display: none; font-size: 21px; }

.page-content { width: min(1160px, calc(100% - 84px)); margin: 0 auto; padding: 43px 0 64px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.administrator-detail-heading { align-items: flex-start; }
.admin-back-link { display: inline-flex; margin-bottom: 12px; font-size: 12px; }
.eyebrow { margin: 0 0 9px; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-family: Manrope, sans-serif; font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -.02em; overflow-wrap: anywhere; }
h2 { margin-bottom: 0; font-family: Manrope, sans-serif; font-size: 20px; letter-spacing: -.015em; }
h3 { margin-bottom: 7px; font-family: Manrope, sans-serif; font-size: 14px; }
.page-heading > p, .heading-copy { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }
.heading-copy { max-width: 510px; }
.button-primary, .button-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 0; border-radius: 6px; padding: 0 16px; cursor: pointer; font-size: 12px; font-weight: 700; transition: .18s ease; }
.button-primary { color: #fff; background: var(--teal); text-decoration: none; }
.button-primary:hover { background: #315b3b; transform: translateY(-1px); }
.button-secondary { color: var(--teal); background: var(--teal-soft); text-decoration: none; }
.button-secondary:hover { background: #cfdfd0; }
.button-secondary:disabled { opacity: .5; cursor: default; }
.button-link { border: 0; background: transparent; padding: 0; color: var(--teal); cursor: pointer; font-size: 12px; font-weight: 700; }
.button-link:hover { text-decoration: underline; }

.grid { display: grid; gap: 18px; }
.grid > *, .finance-grid > *, .referral-hero > *, .calendar-workspace > * { min-width: 0; }
.grid.two { grid-template-columns: minmax(0, 1.4fr) minmax(280px, .9fr); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 19px; }
.section-label h2 { font-size: 17px; }
.section-label p { color: var(--muted); margin: 0; font-size: 12px; }
.stat-card { padding: 21px 22px; min-height: 121px; }
.stat-card .stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; margin-top: 14px; font-family: Manrope, sans-serif; font-size: 25px; }
.stat-card .stat-note { margin-top: 5px; color: var(--muted); font-size: 11px; }
.stat-symbol { display: inline-flex; width: 27px; height: 27px; align-items: center; justify-content: center; border-radius: 6px; background: var(--teal-soft); color: var(--teal); font-size: 15px; font-weight: 700; }
.stat-symbol.gold { background: var(--gold-soft); color: var(--gold); }
.stat-symbol.coral { background: var(--coral-soft); color: var(--coral); }

.hero-card { position: relative; overflow: hidden; min-height: 275px; padding: 30px; background: var(--teal-dark); color: #f2f6f3; }
.hero-card::after { content: ''; position: absolute; pointer-events: none; width: 280px; height: 280px; right: -84px; bottom: -145px; border: 1px solid rgba(219, 192, 122, .4); border-radius: 50%; box-shadow: 0 0 0 22px rgba(219,192,122,.06), 0 0 0 43px rgba(219,192,122,.04); }
.hero-card .eyebrow { color: #dabb72; }
.hero-card h2 { max-width: 460px; color: #fff; font-size: 24px; }
.hero-card p { max-width: 500px; margin: 10px 0 25px; color: #a9c2bc; font-size: 13px; line-height: 1.6; }
.hero-card .button-secondary { margin-top: 20px; background: rgba(255,255,255,.12); color: #fff; }
.hero-card .button-secondary:hover { background: rgba(255,255,255,.2); }
.progress-track { height: 7px; overflow: hidden; border-radius: 20px; background: #dfe7e1; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.hero-progress { max-width: 450px; }
.hero-progress .progress-track { background: rgba(255,255,255,.17); }
.hero-progress .progress-track span { background: #dbb969; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 8px; color: #a8c2bc; font-size: 11px; }
.progress-meta strong { color: #fff; font-weight: 600; }

.appointment { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.appointment:last-child { padding-bottom: 0; border-bottom: 0; }
.date-tile { width: 47px; min-width: 47px; text-align: center; border-radius: 6px; background: var(--teal-soft); overflow: hidden; }
.date-tile span { display: block; padding: 4px 0; color: var(--teal); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.date-tile strong { display: block; padding: 5px 0 7px; color: var(--ink); font-family: Manrope, sans-serif; font-size: 18px; background: #fff; }
.appointment-main { min-width: 0; flex: 1; }
.appointment-main strong { display: block; font-size: 13px; }
.appointment-main span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.status { display: inline-flex; align-items: center; min-height: 23px; border-radius: 20px; padding: 0 9px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status.upcoming { background: var(--gold-soft); color: #98702d; }
.status.done { background: var(--teal-soft); color: var(--teal); }
.status.cancelled { background: var(--coral-soft); color: var(--coral); }

.course-summary { padding: 23px; }
.course-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.course-title { display: flex; gap: 12px; align-items: flex-start; }
.course-symbol { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 8px; background: var(--gold-soft); color: var(--gold); font-size: 18px; }
.course-title h3 { margin: 1px 0 5px; }
.course-title p { margin: 0; color: var(--muted); font-size: 11px; }
.course-summary .progress-track { margin-top: 22px; }
.course-details { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 11px; }
.course-details strong { color: var(--ink); }
.course-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 19px; margin-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.course-footer strong { color: var(--ink); }

.referral-callout { position: relative; min-height: 195px; overflow: hidden; padding: 24px; background: #e9f1e9; }
.referral-callout::after { display: none; }
.referral-callout h2 { max-width: 220px; font-size: 18px; }
.referral-callout p { max-width: 265px; margin: 11px 0 19px; color: #637c73; font-size: 12px; line-height: 1.55; }
.balance-value { margin-top: 9px; color: var(--teal); font-family: Manrope, sans-serif; font-size: 28px; font-weight: 800; }
.balance-caption { color: var(--muted); font-size: 11px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 0 13px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: .08em; }
.data-table td { padding: 16px 13px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr.clickable-row { cursor: pointer; }
.data-table tbody tr.clickable-row:hover { background: var(--soft); }
.table-link { color: var(--teal); font-weight: 700; }
.client-directory-toolbar { display: flex; justify-content: flex-end; margin: -2px 0 18px; }
.client-list-header { align-items: center; }
.client-list-header .client-directory-toolbar { margin: 0; }
.client-search-box { display: flex; align-items: center; gap: 9px; width: min(100%, 360px); min-height: 40px; border: 1px solid var(--line); border-radius: 7px; padding: 0 12px; background: var(--soft); color: var(--muted); }
.client-search-box:focus-within { border-color: var(--teal); background: var(--card); box-shadow: 0 0 0 3px rgba(31, 111, 98, .08); }
.client-search-icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--muted); stroke-width: 2; }
.client-search-box input { min-width: 0; width: 100%; border: 0; outline: 0; padding: 0; color: var(--ink); background: transparent; font: inherit; font-size: 12px; }
.client-search-box input::placeholder { color: #91a19a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.client-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 13px; margin-top: 18px; color: var(--muted); font-size: 11px; }
.client-pagination .button-secondary { min-height: 32px; padding: 0 11px; font-size: 11px; }
.client-pagination .button-secondary:disabled { cursor: default; }
.client-list-meta { display: flex; justify-content: flex-end; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.client-password-value { border: 0; border-bottom: 1px dashed currentColor; padding: 0 0 2px; color: var(--teal); background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.client-password-value:hover { color: var(--ink); }
.client-feed-card { margin-top: 18px; }
.client-feed-header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 20px; }
.client-feed-header > span { margin-left: auto; padding-bottom: 12px; font-size: 11px; white-space: nowrap; }
.client-feed-tabs { display: flex; align-items: stretch; flex: 1 1 230px; gap: 14px; min-width: 0; border-bottom: 1px solid var(--line); }
.client-feed-tabs .tab { flex: 0 1 auto; margin-right: 0; padding-top: 3px; font-size: 13px; line-height: 1.5; text-align: left; white-space: normal; }
.client-feed-tabs .tab:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.client-main-info-card .section-label { padding-bottom: 17px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.client-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.client-info-grid > div { min-width: 0; padding: 17px 0; border-bottom: 1px solid var(--line); }
.client-info-grid dt { margin-bottom: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.client-info-grid dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
.client-placeholder-card { min-height: 220px; }
.client-courses { --course-content-padding: 23px; min-width: 0; }
.my-course-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 0 0 24px; border-bottom: 1px solid var(--line); }
.my-course-summary > div { min-width: 0; }
.my-course-summary h1 { margin: 0 0 12px; font-size: 28px; line-height: 1.35; overflow-wrap: anywhere; }
.my-course-stats { display: flex; flex-wrap: wrap; gap: 16px 32px; margin: 20px 0 0; }
.my-course-stats dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.my-course-stats dd { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.5; }
.my-course-summary p { margin: 6px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.my-course-summary a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.my-course-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.my-course-actions button { gap: 8px; }
.my-course-actions .button-primary:disabled { background: var(--teal); opacity: .45; cursor: default; transform: none; }
.my-course-summary .my-course-availability { margin: 0; }
.my-course-summary .my-course-download { gap: 6px; max-width: 100%; color: var(--teal-dark); font-size: 11px; font-weight: 400; line-height: 1.5; text-align: center; }
.my-course-download svg { flex-shrink: 0; }
.desktop-download-warning { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.desktop-download-warning > svg { width: 20px; height: 20px; flex-shrink: 0; color: #9e6335; margin-top: 2px; }
.desktop-download-warning p { margin: 8px 0 0; color: var(--muted); }
.desktop-download-notice { display: flex; gap: 12px; padding-top: 16px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.desktop-download-notice > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.desktop-download-notice strong { color: var(--ink); font-weight: 600; }
.desktop-download-notice p { margin: 6px 0 0; }
.desktop-download-message { margin-top: 16px !important; color: #9e3f35 !important; }
[data-desktop-confirm] { gap: 8px; }
[data-desktop-confirm] svg { width: 16px; height: 16px; }
[data-desktop-confirm]:disabled { opacity: .6; cursor: wait; }
.desktop-download-spinner { animation: boot-loader-spin 1s linear infinite; }
.my-course-summary svg { width: 16px; height: 16px; }
.course-session.course-session-readonly, .course-session-readonly * { cursor: default; }
.course-session-readonly > svg { flex: 0 0 15px; width: 15px; height: 15px; margin-top: 1px; color: #929995; }
.course-session-readonly.is-completed > svg { color: #2f7140; }
.course-playback-page { margin: 0; min-height: 100dvh; background: #f4f6f4; color: #17241a; }
.course-playback-document { scrollbar-gutter: auto; scrollbar-width: none; background: #f4f6f4; }
.course-playback-document::-webkit-scrollbar { display: none; }
.course-playback-document:has(.session-running) { overflow: hidden; background: #000; }
.session-preparation { width: min(720px, 100%); min-height: 100dvh; margin: 0 auto; padding: 36px 28px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; box-sizing: border-box; }
.session-preparation h1 { margin: 10px 0 18px; font-size: 28px; line-height: 1.3; overflow-wrap: anywhere; }
.session-preparation > p { font-size: 14px; line-height: 1.7; }
.session-header { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; margin-bottom: 20px; }
.session-brand { display: inline-flex; color: #17241a; font-weight: 700; text-decoration: none; font-size: 14px; }
.session-client-name { margin: 0; color: #66736a; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.session-department-title { width: 100%; margin-bottom: 22px; }
.session-department-title h1 { margin-bottom: 4px; }
.session-department-title p { margin: 0; color: #66736a; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.session-preparation .eyebrow { margin: 0; color: #66736a; }
.session-facts { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 20px 24px; width: 100%; margin: 0 0 26px; padding: 0 0 22px; border-bottom: 1px solid #d5dcd5; }
.session-facts > div { min-width: 0; }
.session-facts dt { color: #66736a; font-size: 12px; margin-bottom: 7px; }
.session-facts dd { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.5; }
.session-facts dd span { font-size: 14px; font-weight: 400; color: #66736a; }
.session-preparation .session-warning { display: flex; align-items: flex-start; gap: 12px; margin: 0; color: #b32732; font-size: 14px; line-height: 1.7; }
.session-warning > svg { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; }
.session-warning p { margin: 0; }
.session-result-icon { width: 48px; height: 48px; margin-bottom: 24px; color: #3d7149; flex-shrink: 0; }
.session-result-icon.is-saving { animation: boot-loader-spin 1s linear infinite; }
.session-result-icon.is-error { color: #9e3f35; }
.session-preparation .session-result-lead { margin: 0 0 12px; font-size: 18px; }
.session-preparation .session-result-details { margin: 0 0 22px; color: #66736a; }
.session-partial-progress { display: grid; gap: 10px; width: 100%; margin-bottom: 18px; }
.session-partial-progress strong { font-size: 18px; }
.session-partial-progress progress { width: 100%; height: 8px; accent-color: #496d50; }
.session-preparation .session-message { margin: 10px 0; color: #9e3f35; font-size: 12px; }
.session-actions { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; margin-top: 12px; }
.session-actions button, .session-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.session-actions svg { width: 17px; height: 17px; }
.session-screen { position: fixed; inset: 0; overflow: hidden; background: #000; cursor: none; }
.session-running { overflow: hidden; background: #000; }
.session-running #session-preparation { display: none; }
.session-screen, .session-screen * { transition: none !important; animation: none !important; }
@media (max-width: 540px) {
  .session-preparation { padding: 24px 20px; }
  .session-preparation h1 { font-size: 23px; }
  .session-facts { gap: 10px; }
  .session-facts dt { font-size: 10px; min-height: 30px; line-height: 1.5; }
  .session-facts dd { font-size: 14px; }
  .session-facts dd span { font-size: 12px; }
  .my-course-summary h1 { font-size: 24px; }
  .session-actions > * { width: 100%; }
}
.client-course-summary.admin-info-card { padding: var(--course-content-padding); }
.client-courses button svg { width: 15px; height: 15px; flex: 0 0 auto; }
.client-courses .button-secondary, .client-courses .button-primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.client-course-summary .section-label { flex-wrap: wrap; align-items: flex-start; }
.course-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.course-title-line { min-width: 0; }
.course-title-line h2 { margin: 0; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.course-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); }
.course-summary-grid > div { min-width: 0; }
.course-summary-grid dt { color: var(--muted); font-size: 11px; }
.course-summary-grid dd { margin: 6px 0 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.course-summary-files { grid-column: 1 / -1; }
.course-summary-files dd { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.course-file-link { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; padding: 5px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.course-file-link span { overflow-wrap: anywhere; min-width: 0; }
.course-file-link > svg:first-child { color: var(--muted); }
.course-file-link > svg:last-child { color: var(--teal); }
.course-file-link:hover span { text-decoration: underline; }
.course-progress-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 20px; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.course-progress-grid > div { min-width: 0; }
.course-progress-grid dt { color: var(--muted); font-size: 11px; line-height: 1.5; }
.course-progress-grid dd { margin: 6px 0 0; font-size: 19px; font-weight: 700; line-height: 1.5; }
.course-progress-grid dd span { color: var(--muted); font-size: 12px; font-weight: 400; }
.course-progress-grid .course-last-session { font-size: 13px; font-weight: 600; }
.course-controls { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.modal:has(.course-file-details) { width: min(840px, 100%); }
.course-file-details h2 { overflow-wrap: anywhere; }
.course-file-metadata { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 22px 0; }
.course-file-metadata > div:first-child { grid-column: 1 / -1; }
.course-file-metadata dt { color: var(--muted); font-size: 11px; }
.course-file-metadata dd { margin: 5px 0 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.course-file-details summary { cursor: pointer; font-size: 12px; line-height: 1.6; }
.course-calculation { padding: 14px 0; border-block: 1px solid var(--line); }
.course-calculation h3 { margin: 0; font-size: 12px; font-weight: 700; line-height: 1.6; }
.course-calculation dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 16px 0; }
.course-calculation dt { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.course-calculation dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.course-calculation code { font-size: 11px; }
.course-calculation p { margin: 12px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.course-file-record { padding: 15px 0; border-bottom: 1px solid var(--line); }
.course-file-record > summary > span { display: block; margin: 4px 0 0 16px; color: var(--muted); font-size: 11px; }
.course-file-record-body { margin-top: 15px; min-width: 0; }
.course-phase-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 11px; }
.course-phase-table th, .course-phase-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.course-phase-table th { color: var(--muted); font-size: 10px; font-weight: 400; }
.course-phase-table small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.course-detail-color { display: flex; align-items: center; gap: 7px; }
.course-file-details .modal-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.course-file-details .modal-actions svg { width: 15px; height: 15px; }
.course-file-section { min-width: 0; margin-top: 20px; padding-inline: calc(var(--course-content-padding) + 1px); }
.course-file-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0 0 15px; border-bottom: 1px solid var(--line); }
.course-file-heading > div { min-width: 0; }
.course-file-heading h2 { font-size: 16px; overflow-wrap: anywhere; }
.course-file-heading span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.course-file-heading button { flex: 0 0 auto; }
.course-department { padding: 16px 0; border-bottom: 1px solid var(--line); }
.course-department-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 10px; }
.course-department-label { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.course-department-heading h3 { min-width: 0; margin: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.course-session-duration { color: #737373; font-family: Manrope, sans-serif; font-size: 11px; font-weight: 400; line-height: 1.5; white-space: nowrap; }
.course-colors { display: flex; flex: 0 0 auto; gap: 5px; }
.course-color-dot { display: block; flex: 0 0 12px; width: 12px; height: 12px; border: 1px solid rgb(0 0 0 / 12%); border-radius: 50%; }
.course-session-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px 12px; }
.course-session { display: flex; align-items: flex-start; gap: 7px; min-width: 0; min-height: 40px; padding: 4px 0; cursor: pointer; }
.course-session > span { min-width: 0; }
.course-session input { flex: 0 0 15px; width: 15px; height: 15px; margin: 1px 0 0; accent-color: #7b3048; }
.course-session:has(input:disabled) { opacity: .65; cursor: progress; }
.course-session strong, .course-session small, .course-session-date { display: block; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.course-session small, .course-session-date { color: var(--muted); font-size: 10px; }
.course-session.is-completed strong { color: #2f7140; }
.course-session-date { font-variant-numeric: tabular-nums; }
.course-history-action { margin-top: 20px; padding-inline: calc(var(--course-content-padding) + 1px); }
.course-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.course-empty h2 { font-size: 17px; }
.status.course-completed { color: #555e59; background: #e7ece9; }
.course-upload { min-width: 0; padding: 18px; border: 1px dashed #bdc5c1; border-radius: 6px; background: #f6f8f7; }
.course-upload.is-dragging { border-color: var(--teal); background: #edf1ef; }
.course-upload-heading { display: flex; align-items: center; gap: 12px; }
.course-upload-heading > svg { width: 26px; height: 26px; flex: 0 0 auto; color: var(--teal); }
.course-upload-heading > div { min-width: 0; }
.course-upload-heading strong { display: block; font-size: 13px; line-height: 1.5; }
.course-upload-heading span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.course-upload-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 16px; }
.course-upload-actions .button-secondary { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-width: 155px; min-height: 38px; }
.course-upload-actions button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.course-upload-actions > span { color: var(--muted); font-size: 11px; }
.course-draft-files { display: grid; gap: 10px; }
.course-draft-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.course-draft-file > div:first-child { min-width: 0; }
.course-draft-file strong, .course-draft-file span, .course-draft-file small { display: block; overflow-wrap: anywhere; font-size: 12px; }
.course-draft-file span, .course-draft-file small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.course-draft-actions { display: flex; flex: 0 0 auto; gap: 3px; }
.course-draft-actions .icon-button { width: 30px; height: 30px; }
.course-draft-actions svg { width: 15px; height: 15px; }
.course-form-error { margin-top: 15px; color: #b24752; font-size: 12px; line-height: 1.5; }
@media (max-width: 1020px) {
  .course-session-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .client-courses { --course-content-padding: 16px; }
  .course-summary-grid { grid-template-columns: 1fr; gap: 14px; }
  .course-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .course-progress-grid > div:last-child { grid-column: 1 / -1; }
  .course-calculation dl { grid-template-columns: 1fr; }
  .course-session-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
  .course-session { min-height: 44px; }
  .course-department-heading { flex-wrap: wrap; }
  .course-file-heading { flex-wrap: wrap; }
  .course-title-line h2 { font-size: 15px; }
  .course-empty { align-items: stretch; flex-direction: column; }
}
.data-table td:first-child, .data-table th:first-child { padding-left: 0; }
.data-table td:last-child, .data-table th:last-child { padding-right: 0; text-align: right; }
.muted { color: var(--muted); }
.table-primary { display: block; margin-bottom: 4px; font-weight: 700; }
.table-secondary { display: block; color: var(--muted); font-size: 11px; }
.money-positive { color: var(--teal); font-weight: 700; }
.money-pending { color: var(--gold); font-weight: 700; }
.empty-state { padding: 35px 15px; color: var(--muted); text-align: center; font-size: 13px; }
.finance-client-invoices { margin-top: 24px; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 23px; }
.client-detail-tabs { margin-top: 24px; }
.client-detail-tab-content { min-width: 0; }
.calendar-day-feed { margin-top: 18px; padding: 22px; }
.event-feed { display: grid; }
.feed-composer { margin-bottom: 22px; }
.feed-composer .form-field textarea { min-height: 90px; }
.feed-composer-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.feed-item { display: flex; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.feed-item:first-child { border-top: 0; padding-top: 0; }
.feed-icon { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 6px; background: var(--soft); color: var(--muted); font-size: 14px; }
.feed-item.is-note .feed-icon { background: var(--gold-soft); color: var(--gold); }
.feed-body { min-width: 0; flex: 1; }
.feed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; }
.feed-meta strong { font-size: 12px; }
.feed-meta time { color: var(--muted); font-size: 11px; }
.feed-delete-button { margin-left: auto; font-size: 11px; }
.feed-body p { margin: 7px 0 0; color: var(--ink); font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.client-feed-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 17px; color: var(--muted); font-size: 11px; }
.client-feed-pagination .button-secondary { min-height: 32px; padding: 0 11px; font-size: 11px; }
.client-feed-pagination .button-secondary:disabled { cursor: default; opacity: .55; }
.section-label:has(+ .event-feed) { flex-wrap: wrap; }
.form-field textarea { width: 100%; min-height: 120px; resize: vertical; padding: 11px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; font: inherit; font-size: 13px; line-height: 1.5; }
.form-field textarea:focus { outline: 2px solid var(--teal-soft); border-color: var(--teal); }
.tab { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0 0 13px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 600; }
.tab.active { border-color: var(--teal); color: var(--teal); }
.course-list { display: grid; gap: 14px; }
.course-detail-card { padding: 24px; }
.course-detail-card .course-header { align-items: center; }
.course-detail-hero { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }
.course-detail-hero h3 { color: #fff; font-size: 17px; }
.course-detail-hero p { margin: 6px 0 0; color: #a9c2bc; font-size: 12px; }
.course-detail-hero-actions { display: flex; align-items: center; gap: 12px; }
.course-detail-hero .button-secondary { background: #d7e9de; color: var(--teal-dark); }
.session-block { padding: 17px 20px; }
.session-block .section-label { margin-bottom: 10px; }
.session-block .section-label h2 { font-size: 14px; }
.session-block .section-label p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.session-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.session-item { min-width: 0; min-height: 28px; padding: 5px 3px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.session-item strong { color: var(--ink); font-weight: 700; }
.session-status { overflow-wrap: anywhere; }
.session-status.passed { color: var(--teal); }
.session-status.not-passed { color: var(--gold); }
.block-list { display: grid; gap: 0; margin-top: 25px; }
.block-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 100px; align-items: center; gap: 13px; padding: 15px 0; border-top: 1px solid var(--line); }
.block-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 700; }
.block-row.completed .block-number { background: var(--teal); color: #fff; }
.block-row.current .block-number { background: var(--gold); color: #fff; }
.block-row strong { font-size: 12px; }
.block-row span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.block-progress { text-align: right; color: var(--muted); font-size: 11px; }

.knowledge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.article-card { padding: 21px; min-height: 185px; transition: .18s ease; cursor: pointer; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(26,53,49,.1); }
.article-tag { display: inline-block; margin-bottom: 28px; color: var(--teal); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.article-card h3 { max-width: 230px; font-size: 15px; line-height: 1.35; }
.article-card p { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.article-card footer { margin-top: 17px; color: var(--muted); font-size: 10px; }
.knowledge-search { min-width: 225px; position: relative; }
.knowledge-search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; background: #fff; color: var(--ink); outline: 0; font: inherit; font-size: 12px; }
.knowledge-search input:focus { border-color: var(--teal); }

.finance-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.balance-card { padding: 25px; background: var(--teal-dark); color: #fff; }
.balance-card .eyebrow { color: #dabb72; }
.balance-card h2 { margin-top: 24px; font-size: 31px; }
.balance-card p { margin: 7px 0 22px; color: #a9c2bc; font-size: 11px; }
.balance-card .button-secondary { background: #d7e9de; color: var(--teal-dark); }
.balance-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.finance-tabs { display: flex; gap: 22px; margin-top: 24px; border-bottom: 1px solid var(--line); }
.finance-tab-panel { margin-top: 18px; }
.invoice-status { min-width: 77px; justify-content: center; }

.referral-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.referral-link { display: flex; align-items: center; gap: 10px; margin-top: 23px; padding: 11px 13px; background: var(--soft); border-radius: 6px; }
.referral-link code { min-width: 0; flex: 1; overflow: hidden; color: var(--teal); font: 600 11px 'DM Sans', sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { border: 0; background: transparent; color: var(--teal); cursor: pointer; font-size: 11px; font-weight: 700; }
.referral-levels { display: grid; gap: 9px; margin-top: 21px; }
.level-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 13px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.level-row span { color: var(--muted); }
.level-row strong { color: var(--teal); }
.referral-how { background: #f4f8f4; }
.referral-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.referral-steps > div { position: relative; padding-left: 39px; }
.referral-steps strong { display: block; font-size: 12px; }
.referral-steps p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.step-number { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 11px; font-weight: 800; }
.referral-tree { display: grid; gap: 0; }
.referral-person { display: flex; align-items: center; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.referral-person:last-child { border-bottom: 0; }
.referral-person .avatar { width: 31px; height: 31px; background: var(--soft); font-size: 10px; }
.referral-person main { flex: 1; }
.referral-person strong { display: block; font-size: 12px; }
.referral-amount { margin-left: 6px; color: var(--teal); font-size: 11px; font-style: normal; font-weight: 800; white-space: nowrap; }
.referral-person span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.referral-person > b { color: var(--teal); font-size: 12px; }
.referral-tree-detailed { margin-top: 5px; }
.referral-person.referral-root { align-items: flex-start; }
.referral-root > main { min-width: 0; }
.referral-income { margin-top: 7px; color: var(--muted); font-size: 11px; }
.referral-income b { color: var(--teal); }
.subreferrals { margin-top: 10px; padding-left: 13px; border-left: 2px solid var(--teal-soft); }
.subreferrals .referral-person { padding: 9px 0; border-bottom: 0; }
.subreferrals .avatar { width: 27px; height: 27px; font-size: 9px; }
.referral-level-2 { position: relative; }
.referral-level-3 { margin-top: 0; margin-left: 0; padding: 9px 0 !important; border: 0 !important; border-radius: 0; background: transparent; }

.admin-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; padding: 14px 18px; border: 1px solid #e2d6b8; border-radius: 7px; background: #fff9eb; color: #7c6336; font-size: 12px; }
.admin-banner strong { color: #5f4b27; }
.admin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.client-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-table-card { padding: 23px; }
.admin-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.admin-detail-grid > .card { min-width: 0; }
.admin-info-card, .admin-feed-card { padding: 23px; }
.admin-detail-list { display: grid; gap: 0; margin: 0; }
.admin-detail-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-detail-list dt { color: var(--muted); font-size: 11px; }
.admin-detail-list dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: 700; text-align: right; }
.admin-permission-toggle { display: flex; align-items: center; gap: 9px; margin-top: 18px; color: var(--ink); font-size: 12px; font-weight: 700; }
.admin-permission-toggle input { width: 16px; height: 16px; accent-color: var(--teal); }
.admin-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.admin-detail-actions .danger-link { color: var(--coral); }
.admin-actions { display: flex; gap: 8px; }
.admin-actions .button-secondary, .admin-actions .button-primary { min-height: 34px; padding: 0 12px; font-size: 11px; }
.admin-badge { border-radius: 4px; padding: 4px 7px; background: var(--teal-soft); color: var(--teal); font-size: 10px; font-weight: 700; }
.admin-calendar { overflow: hidden; padding: 0; }
.calendar-workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .85fr); gap: 18px; align-items: start; }
.calendar-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.calendar-metrics > div { display: grid; gap: 5px; min-height: 73px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.calendar-metrics strong { color: var(--ink); font-family: Manrope, sans-serif; font-size: 21px; }
.calendar-metrics span { color: var(--muted); font-size: 10px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.calendar-toolbar > div:nth-child(2) { flex: 1; text-align: center; }
.calendar-toolbar h2 { min-width: 150px; text-align: center; font-size: 17px; }
.calendar-toolbar p { margin-top: 4px; color: var(--muted); font-size: 10px; }
.calendar-toolbar-nav { display: flex; align-items: center; gap: 8px; }
.calendar-today-button { min-height: 31px; padding: 0 10px; font-size: 10px; }
.calendar-legend { display: grid; gap: 6px; min-width: 108px; color: var(--muted); font-size: 10px; }
.calendar-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.legend-dot.remote { background: #c59c46; }
.calendar-toolbar .icon-button { width: 31px; height: 31px; border-radius: 5px; background: var(--soft); color: var(--teal); font-size: 22px; line-height: 1; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { border-bottom: 1px solid var(--line); background: #fbfcfa; }
.calendar-weekdays span { padding: 11px 12px; color: var(--muted); font-size: 10px; font-weight: 700; text-align: right; text-transform: uppercase; }
.calendar-day { min-height: 125px; padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-empty { background: #fafbf9; }
.calendar-day.is-today { background: #f1f7f2; }
.calendar-day.is-selected { box-shadow: inset 0 3px 0 var(--teal); background: #edf7f2; }
.calendar-date-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 8px; border: 0; padding: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; text-align: left; }
.calendar-date-button b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 9px; }
.is-today .calendar-date-button { color: var(--teal); }
.calendar-event-list { display: grid; gap: 5px; }
.calendar-event { display: grid; width: 100%; margin: 0 0 5px; border: 0; border-left: 3px solid var(--teal); border-radius: 3px; padding: 6px 6px 6px 7px; background: var(--teal-soft); color: var(--ink); cursor: pointer; text-align: left; }
.calendar-event.is-remote { border-left-color: #c59c46; background: #fbf5e7; }
.calendar-event.is-cancelled { border-left-color: var(--coral); background: var(--coral-soft); opacity: .8; }
.calendar-event:hover { background: #cfe4db; }
.calendar-event.is-remote:hover { background: #f5eacc; }
.calendar-event strong { color: var(--teal); font-size: 10px; }
.calendar-event.is-remote strong { color: #98702d; }
.calendar-event span { overflow: hidden; margin-top: 3px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.calendar-more { border: 0; padding: 1px 0; background: transparent; color: var(--teal); cursor: pointer; font-size: 10px; text-align: left; }
.calendar-agenda { min-height: 100%; padding: 22px; }
.agenda-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.agenda-header h2 { margin-top: 3px; font-size: 18px; text-transform: capitalize; }
.agenda-header > div > span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.agenda-header .button-secondary { min-height: 31px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
.agenda-slots { margin-top: 9px; }
.agenda-slot { display: grid; grid-template-columns: 45px minmax(0, 1fr); gap: 12px; min-height: 58px; padding: 10px 0; border-bottom: 1px solid #edf0ec; }
.agenda-slot:last-child { border-bottom: 0; }
.agenda-slot time { padding-top: 3px; color: var(--muted); font-family: Manrope, sans-serif; font-size: 11px; }
.agenda-event { display: flex; justify-content: space-between; gap: 10px; min-width: 0; padding: 9px 10px; border-left: 3px solid var(--teal); border-radius: 4px; background: var(--teal-soft); }
.agenda-event.is-done { border-left-color: #8ca89d; background: #f1f5f1; }
.agenda-event.is-cancelled { border-left-color: var(--coral); background: var(--coral-soft); }
.agenda-event-main { min-width: 0; }
.agenda-event-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.agenda-event-heading strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.agenda-event-heading .status { flex: 0 0 auto; min-height: 19px; padding: 0 6px; font-size: 9px; }
.agenda-event-main p { margin-top: 5px; color: var(--muted); font-size: 10px; }
.agenda-event-main small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.agenda-event-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; }
.agenda-event-actions .button-link { font-size: 10px; }
.agenda-free { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 10px; border: 1px dashed #dce5df; border-radius: 4px; color: #9aa9a1; font-size: 10px; }
.agenda-free .button-link { font-size: 10px; }
.form-grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calendar-modal-actions { align-items: center; }
.calendar-modal-actions > span { flex: 1; }
.danger-link { color: var(--coral); }
.client-form b { color: var(--coral); font-weight: 700; }
.client-access-card .section-label { align-items: flex-start; }
.client-access-card .section-label .button-secondary { flex: 0 0 auto; }
.client-channels { display: grid; gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 6px; }
.client-channels legend { padding: 0 5px; color: var(--muted); font-size: 11px; }
.client-channels label { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 12px; }
.client-channels input { width: 16px; height: 16px; accent-color: var(--teal); }
.client-credential-note { max-width: 310px; margin-top: 20px; line-height: 1.7; }
.credential-box { display: grid; gap: 6px; padding: 16px; border: 1px solid #d5e2da; border-radius: 6px; background: #f3f8f4; }
.credential-box span { color: var(--muted); font-size: 10px; }
.credential-box strong { color: var(--ink); font-family: Manrope, sans-serif; font-size: 19px; letter-spacing: .04em; }
.client-profile-detail { display: flex; align-items: flex-start; gap: 15px; }
.avatar.large { width: 58px; height: 58px; font-size: 16px; }
.client-profile-detail h3 { margin: 2px 0 8px; font-size: 16px; }
.client-profile-detail p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.client-referral-summary strong { display: block; color: var(--teal); font-family: Manrope, sans-serif; font-size: 28px; }
.client-referral-summary span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.client-referral-summary p { margin: 20px 0 0; color: var(--muted); font-size: 11px; }

.file-check-format { display: inline-flex; align-items: center; min-height: 30px; border: 1px solid var(--line); border-radius: 5px; padding: 0 10px; color: var(--muted); font-size: 10px; font-weight: 700; }
.file-check-upload { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 360px); align-items: center; gap: 28px; padding: 24px; }
.file-check-upload-copy { display: flex; align-items: flex-start; gap: 14px; }
.file-check-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 7px; background: var(--teal-soft); color: var(--teal); font-size: 24px; }
.file-check-upload h2 { margin-bottom: 7px; font-size: 18px; }
.file-check-upload p { max-width: 530px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.file-dropzone { display: grid; justify-items: center; gap: 5px; min-height: 132px; border: 1px dashed #aec7ba; border-radius: 7px; padding: 20px; background: #f7fbf8; color: var(--muted); cursor: pointer; text-align: center; transition: border-color .18s ease, background .18s ease; }
.file-dropzone:hover, .file-dropzone:focus-within, .file-dropzone.is-dragover { border-color: var(--teal); background: #eff8f2; }
.file-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-dropzone strong { color: var(--teal); font-size: 12px; }
.file-dropzone span { font-size: 11px; }
.file-dropzone small { margin-top: 5px; color: #9aa9a1; font-size: 10px; }
.file-check-empty { display: grid; gap: 6px; margin-top: 18px; padding: 25px; color: var(--muted); }
.file-check-empty strong { color: var(--ink); font-size: 13px; }
.file-check-empty span { font-size: 11px; }
.file-check-error, .file-check-warning { margin-top: 16px; border: 1px solid #ecd8b0; border-radius: 6px; padding: 12px 14px; background: #fff8e9; color: #8e6c2d; font-size: 11px; line-height: 1.5; }
.file-check-error { border-color: #e7bdb8; background: #fff2f0; color: #a65048; }
.session-dates { display: grid; gap: 8px; }
.session-dates > span { display: grid; gap: 3px; }
.session-dates strong { color: var(--muted); font-size: 10px; font-weight: 600; }
.file-check-results { margin-top: 18px; }
.file-check-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 4px 2px; }
.file-check-summary h2 { margin: 3px 0 6px; font-size: 20px; overflow-wrap: anywhere; }
.file-check-summary p:not(.eyebrow) { color: var(--muted); font-size: 11px; }
.file-patient { min-width: 210px; border-left: 2px solid var(--teal); padding-left: 12px; }
.file-patient span { display: block; color: var(--muted); font-size: 10px; }
.file-patient strong { display: block; margin-top: 4px; color: var(--ink); font-size: 13px; }
.file-check-table th:first-child, .file-check-table td:first-child { width: 190px; min-width: 170px; }
.file-check-table th:last-child, .file-check-table td:last-child { min-width: 900px; }
.file-check-table td:first-child { vertical-align: top; }
.color-list { display: grid; gap: 6px; }
.file-color { display: inline-flex; align-items: center; gap: 8px; min-height: 25px; color: var(--ink); font-size: 10px; }
.file-color i { display: block; width: 18px; height: 18px; border: 1px solid rgba(16,42,43,.14); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.file-color small { display: inline-block; margin-left: 6px; color: var(--muted); font-size: 9px; }
.file-check-method { margin-bottom: 16px; padding: 20px 22px; background: #d9dddb; }
.file-method-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.file-method-grid > span { display: grid; gap: 6px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfdfb; }
.file-method-grid b { color: var(--muted); font-size: 10px; font-weight: 700; }
.file-method-grid code { overflow-wrap: anywhere; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.file-method-note { margin-top: 13px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.timing-help-label { display: inline-flex; align-items: center; gap: 5px; }
.timing-help-button { display: inline-grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; padding: 0; border: 1px solid #89928f; border-radius: 50%; background: transparent; color: #485550; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; vertical-align: middle; }
.timing-help-button:hover, .timing-help-button[aria-expanded="true"] { border-color: #26332e; background: #e3e8e5; color: #18251f; }
.timing-help-button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.timing-help-popover { position: fixed; z-index: 1000; width: min(390px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 16px; border: 1px solid #424a46; border-radius: 6px; background: #171c19; color: #e8ede9; box-shadow: 0 8px 28px rgba(0,0,0,.2); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.timing-help-popover > strong { display: block; color: #fff; font-size: 14px; }
.timing-help-popover p { margin: 10px 0 0; }
.timing-help-popover .timing-help-example { padding-top: 10px; border-top: 1px solid #424a46; color: #d0e6d7; }
.file-phase-list { display: grid; gap: 8px; min-width: 820px; }
.file-phase-row { display: grid; grid-template-columns: minmax(190px, 1.45fr) repeat(4, minmax(100px, .8fr)); align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fbfdfb; }
.file-phase-row > span:not(.file-phase-name) { display: grid; gap: 3px; }
.file-phase-row b { color: var(--ink); font-size: 11px; font-weight: 700; }
.file-phase-row small { color: var(--muted); font-size: 9px; line-height: 1.25; }
.file-phase-name { display: grid; grid-template-columns: 18px auto; column-gap: 8px; align-items: center; min-width: 0; }
.file-phase-name i { grid-row: span 2; display: block; width: 18px; height: 18px; border: 1px solid rgba(16,42,43,.14); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.file-phase-name strong { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.file-phase-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-offset-note { display: block; margin-top: 5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.file-flicker-cycle { display: grid; gap: 4px; margin-top: 10px; padding: 9px 10px; border-left: 2px solid var(--teal); background: var(--teal-soft); }
.file-flicker-cycle span, .file-flicker-cycle small { color: var(--muted); font-size: 9px; }
.file-flicker-cycle strong { color: var(--ink); font-size: 10px; }
.file-information { display: grid; gap: 12px; min-width: 0; }
.file-session-section { display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.file-session-heading { color: var(--ink); font-size: 10px; font-weight: 700; }
.file-session-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; }
.file-session-list > span { display: grid; gap: 2px; min-width: 0; padding: 6px 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.file-session-list strong { color: var(--ink); font-size: 9px; font-weight: 700; }
.file-session-list small { overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.file-preview-button { width: 100%; margin-top: 14px; min-height: 34px; padding: 0 10px; font-size: 10px; }
.table-scroll { overflow-x: auto; }

.preview-page { overflow-x: hidden; background: #000; }
.preview-page *, .preview-page *::before, .preview-page *::after { transition: none !important; animation: none !important; }
.preview-page .sidebar, .preview-page .topbar { display: none; }
.preview-page .main-area { width: 100%; }
.preview-page .page-content { width: 100%; max-width: none; margin: 0; padding: 0; }
.therapy-preview-empty { display: grid; min-height: 100vh; place-content: center; justify-items: center; gap: 10px; padding: 24px; color: #fff; text-align: center; }
.therapy-preview-empty h1 { margin: 0; font-size: 23px; }
.therapy-preview-empty p { margin: 0 0 8px; color: #b6c8c3; font-size: 12px; }
.therapy-preview { min-height: 100vh; }
.therapy-preview-screen { position: relative; display: grid; min-height: 100vh; place-items: center; overflow: hidden; background: #000; transition: none; }
.therapy-preview-surface { position: absolute; pointer-events: none; background: #000; }
.therapy-preview-panel { position: relative; z-index: 1; width: min(540px, calc(100% - 32px)); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 30px; background: rgba(8, 18, 18, .94); color: #fff; box-shadow: 0 20px 80px rgba(0,0,0,.32); }
.therapy-preview-panel .eyebrow { color: #98b4ae; }
.therapy-preview-panel h1 { margin: 7px 0 10px; color: #fff; font-size: 25px; overflow-wrap: anywhere; }
.therapy-preview-copy { max-width: 460px; color: #b6c8c3; font-size: 12px; line-height: 1.55; }
.therapy-preview-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 24px 0 16px; }
.therapy-preview-phases > span { display: grid; grid-template-columns: 18px 1fr; column-gap: 7px; align-items: center; min-width: 0; padding: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; background: rgba(255,255,255,.05); }
.therapy-preview-phases i { grid-row: span 2; width: 18px; height: 18px; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; }
.therapy-preview-phases strong { overflow: hidden; color: #fff; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.therapy-preview-phases small { color: #9eb2ad; font-size: 9px; }
.therapy-preview-message { min-height: 18px; color: #b6c8c3; font-size: 11px; }
.therapy-preview-actions { display: flex; gap: 9px; margin-top: 20px; }
.therapy-preview-actions .button-primary, .therapy-preview-actions .button-secondary { flex: 1; }
.therapy-preview-controls { position: absolute; right: 22px; bottom: 20px; left: 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.therapy-preview-controls span { color: rgba(255,255,255,.72); font-size: 11px; text-shadow: 0 1px 4px #000; }
.therapy-preview-controls .button-secondary { min-height: 34px; padding: 0 12px; font-size: 10px; opacity: .86; }

.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(16,42,43,.42); }
[hidden] { display: none !important; }
.modal { position: relative; width: min(500px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 9px; padding: 28px; background: #fff; box-shadow: 0 25px 70px rgba(13, 33, 32, .23); }
.modal-close { position: absolute; right: 16px; top: 13px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 25px; }
.modal h2 { margin-bottom: 7px; padding-right: 25px; }
.modal > div > p { margin: 0 0 21px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.form-grid { display: grid; gap: 14px; }
.form-field { display: grid; gap: 6px; }
.form-field label { color: var(--muted); font-size: 11px; font-weight: 600; }
.form-field input, .form-field select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 5px; padding: 0 11px; color: var(--ink); background: #fff; font: inherit; font-size: 12px; outline: 0; }
.form-field input:focus, .form-field select:focus { border-color: var(--teal); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.modal-actions .button-secondary { background: var(--soft); }

.toast { position: fixed; right: 25px; bottom: 25px; z-index: 20; max-width: 320px; transform: translateY(20px); border-radius: 6px; padding: 13px 16px; background: var(--teal-dark); color: #fff; box-shadow: 0 12px 25px rgba(10,30,30,.2); opacity: 0; pointer-events: none; transition: .22s ease; font-size: 12px; }
.toast.visible { transform: translateY(0); opacity: 1; }

.admin-device-request { position: fixed; right: 25px; bottom: 25px; z-index: 1100; width: min(360px, calc(100vw - 32px)); padding: 18px; border: 1px solid #d8c2ca; border-radius: 8px; background: #fff; box-shadow: 0 18px 45px rgba(25, 20, 22, .2); }
.admin-device-request-title { color: #23141c; font-size: 14px; font-weight: 700; }
.admin-device-request p { margin: 8px 0 15px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.admin-device-request-actions { display: flex; justify-content: flex-end; gap: 8px; }
.admin-device-request-actions button { min-height: 34px; padding: 0 12px; }

@media (max-width: 1020px) {
  .sidebar { width: 230px; flex-basis: 230px; }
  .page-content { width: min(100% - 46px, 900px); }
  .grid.two, .finance-grid, .referral-hero, .referral-program-head { grid-template-columns: 1fr; }
  .referral-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .referral-balance-card { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .client-info-grid { grid-template-columns: 1fr; }
  .client-info-grid > div { padding: 13px 0; }
  :root { --mobile-gutter: 16px; }
  body { overflow-x: hidden; }
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 8; left: 0; top: 0; bottom: 0; width: min(286px, 88vw); transform: translateX(-100%); transition: transform .22s ease; box-shadow: 15px 0 35px rgba(16,42,43,.18); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-profile { margin-top: 33px; }
  .topbar { height: 64px; padding: 0 var(--mobile-gutter); }
  .mobile-menu { display: grid; place-items: center; width: 40px; height: 40px; margin-left: -8px; border-radius: 6px; font-size: 20px; }
  .mobile-menu:active { background: var(--soft); }
  .breadcrumb { min-width: 0; margin-right: auto; margin-left: 9px; gap: 7px; font-size: 10px; }
  .breadcrumb-link, .breadcrumb strong { overflow: hidden; max-width: 42vw; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .breadcrumb-separator { display: none; }
  .topbar-actions { gap: 5px; }
  .notification-button { width: 38px; height: 38px; font-size: 20px; }
  .profile-chip { width: 38px; height: 38px; justify-content: center; }
  .profile-chip-name, .profile-chip .chevron { display: none; }
  .page-content { width: auto; margin: 0; padding: 24px var(--mobile-gutter) 40px; }
  .page-heading { display: block; margin-bottom: 20px; }
  .eyebrow { margin-bottom: 7px; font-size: 10px; letter-spacing: .1em; }
  h1 { margin-bottom: 8px; font-size: 26px; line-height: 1.15; letter-spacing: -.015em; }
  h2 { font-size: 18px; line-height: 1.25; }
  h3 { font-size: 13px; line-height: 1.35; }
  .page-heading > p, .heading-copy { font-size: 12px; line-height: 1.5; }
  .page-heading > .button-primary, .page-heading > .button-secondary, .page-heading > div:last-child > .button-primary, .page-heading > div:last-child > .button-secondary { display: flex; width: 100%; margin-top: 15px; }
  .button-primary, .button-secondary { min-height: 42px; padding: 0 14px; font-size: 12px; white-space: normal; text-align: center; }
  .button-link { min-height: 36px; padding: 8px 0; font-size: 12px; }
  .grid, .grid.two, .grid.three, .finance-grid, .referral-hero, .referral-program-head { grid-template-columns: 1fr; gap: 14px; }
  .referral-program-card { padding: 18px; }
  .referral-how-card { padding: 18px; }
  .referral-stats { grid-template-columns: 1fr 1fr; gap: 9px; }
  .referral-balance-card { grid-column: 1 / -1; }
  .referral-actions .button-primary { width: 100%; }
  .invoice-item-head { display: none; }
  .invoice-form-layout, .invoice-detail-columns { grid-template-columns: 1fr; gap: 14px; }
  .invoice-form-client { align-items: flex-start; flex-direction: column; gap: 6px; }
  .invoice-item-row { grid-template-columns: minmax(0, 1fr) 58px 92px 30px; gap: 5px; }
  .invoice-items-editor { padding: 12px; }
  .invoice-item-row input { padding: 0 7px; font-size: 11px; }
  .invoice-detail-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .invoice-modal-section { padding: 13px; }
  .invoice-payment-box { margin-top: 14px; padding: 13px; }
  .invoice-methods { padding: 14px; }
  .card { border-radius: 7px; }
  .card-pad, .course-summary, .course-detail-card, .admin-table-card { padding: 16px; }
  .admin-detail-grid { grid-template-columns: 1fr; }
  .admin-info-card, .admin-feed-card { padding: 16px; }
  .admin-detail-list > div { gap: 12px; }
  .admin-detail-list dd { max-width: 55%; }
  .admin-detail-actions { align-items: stretch; flex-direction: column; }
  .admin-detail-actions > * { width: 100%; }
  .section-label { align-items: flex-start; margin-bottom: 15px; }
  .section-label h2 { font-size: 16px; }
  .section-label p { font-size: 11px; }
  .client-directory-toolbar { justify-content: stretch; }
  .client-list-header { flex-wrap: wrap; }
  .client-list-header .client-directory-toolbar { width: 100%; }
  .client-search-box { width: 100%; }
  .stat-card { min-height: 104px; padding: 16px; }
  .stat-card strong { margin-top: 10px; font-size: 23px; }
  .hero-card { min-height: 0; padding: 22px 18px; }
  .hero-card h2 { max-width: none; font-size: 20px; }
  .hero-card p { margin: 9px 0 19px; font-size: 12px; }
  .hero-card .button-secondary { width: 100%; margin-top: 20px; }
  .progress-meta { font-size: 10px; }
  .appointment { align-items: flex-start; gap: 10px; padding: 13px 0; }
  .date-tile { width: 43px; min-width: 43px; }
  .date-tile strong { font-size: 17px; }
  .appointment-main strong { font-size: 12px; line-height: 1.35; }
  .appointment-main span { font-size: 10px; line-height: 1.4; }
  .appointment .status { margin-left: auto; }
  .status { min-height: 22px; padding: 0 8px; font-size: 9px; }
  .course-header { align-items: flex-start; gap: 10px; }
  .course-title { gap: 9px; min-width: 0; }
  .course-symbol { width: 34px; height: 34px; min-width: 34px; font-size: 16px; }
  .course-title h3 { margin-top: 0; font-size: 13px; }
  .course-title p { font-size: 10px; line-height: 1.4; }
  .course-details { gap: 8px; margin-top: 9px; font-size: 10px; }
  .course-footer { align-items: flex-start; flex-direction: column; gap: 12px; padding-top: 14px; margin-top: 15px; font-size: 10px; }
  .course-footer .admin-actions { width: 100%; }
  .course-footer .admin-actions > * { flex: 1; }
  .admin-actions { display: flex; flex-wrap: wrap; gap: 7px; }
  .admin-actions .button-secondary, .admin-actions .button-primary { min-height: 40px; padding: 0 10px; font-size: 11px; }
  .referral-callout { min-height: 0; padding: 19px; }
  .referral-callout h2 { max-width: none; font-size: 17px; }
  .referral-callout p { max-width: none; margin: 9px 0 15px; font-size: 11px; }
  .referral-callout .button-primary { width: 100%; }
  .tabs, .finance-tabs { gap: 0; margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; align-items: flex-end; scrollbar-width: none; }
  .tabs::-webkit-scrollbar, .finance-tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; min-height: 40px; padding: 0 3px 10px; margin-right: 19px; font-size: 11px; white-space: nowrap; }
  .client-detail-tabs { height: 41px; }
  .data-table { display: table; width: 100%; table-layout: fixed; white-space: normal; }
  .data-table th { padding: 0 5px 9px; font-size: 8px; letter-spacing: .045em; line-height: 1.25; overflow-wrap: anywhere; }
  .data-table td { padding: 12px 5px; font-size: 10px; line-height: 1.35; vertical-align: top; overflow-wrap: anywhere; }
  .data-table td:first-child, .data-table th:first-child { padding-left: 0; }
  .data-table td:last-child, .data-table th:last-child { padding-right: 0; }
  .data-table .table-primary { margin-bottom: 3px; font-size: 10px; line-height: 1.35; }
  .data-table .table-secondary { font-size: 9px; line-height: 1.35; }
  .data-table .button-link { min-height: 30px; padding: 4px 0; font-size: 10px; }
  .empty-state { padding: 26px 10px; font-size: 12px; }
  .finance-tab-panel { margin-top: 14px; }
  .balance-card { padding: 20px 18px; }
  .balance-card h2 { margin-top: 18px; font-size: 28px; }
  .balance-card p { margin-bottom: 18px; font-size: 10px; }
  .balance-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .balance-actions > * { width: 100%; }
  .referral-link { align-items: center; margin-top: 17px; padding: 10px; }
  .referral-link code { flex-basis: 100%; font-size: 10px; line-height: 1.4; }
  .copy-button { min-height: 32px; padding: 6px 0; }
  .level-row { align-items: flex-start; gap: 8px; padding: 10px; font-size: 11px; }
  .level-row strong { white-space: nowrap; }
  .referral-steps { grid-template-columns: 1fr; gap: 12px; }
  .referral-steps > div { min-height: 35px; }
  .referral-person { align-items: flex-start; gap: 9px; padding: 12px 0; }
  .referral-person strong { font-size: 11px; line-height: 1.35; }
  .referral-person span, .referral-income { font-size: 10px; line-height: 1.4; }
  .referral-person > b { font-size: 11px; white-space: nowrap; }
  .subreferrals { padding-left: 10px; }
  .block-row { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px 0; }
  .block-progress { grid-column: 2; margin-top: -6px; text-align: left; }
  .session-block { padding: 13px; }
  .session-block .section-label { display: block; }
  .session-block .section-label .status { margin-top: 9px; }
  .session-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 10px; }
  .session-item { min-height: 28px; padding: 5px 2px; font-size: 9px; line-height: 1.3; }
  .course-detail-hero { padding: 16px; }
  .course-detail-hero .course-header { display: block; }
  .course-detail-hero-actions { justify-content: flex-start; margin-top: 13px; }
  .course-detail-hero-actions .button-secondary { width: 100%; }
  .knowledge-search { min-width: 0; margin-top: 14px; }
  .knowledge-search input { height: 42px; font-size: 12px; }
  .article-card { min-height: 0; padding: 17px; }
  .article-tag { margin-bottom: 18px; font-size: 9px; }
  .article-card h3 { max-width: none; font-size: 14px; }
  .article-card p { font-size: 10px; }
  .admin-banner { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 16px; padding: 12px 14px; font-size: 11px; }
  .file-check-upload { grid-template-columns: 1fr; gap: 18px; padding: 17px; }
  .file-check-upload h2 { font-size: 16px; }
  .file-check-upload p { font-size: 11px; }
  .file-check-summary { display: block; }
  .file-check-summary h2 { font-size: 17px; }
  .file-patient { min-width: 0; margin-top: 14px; padding: 9px 0 0 10px; }
  .file-check-method { padding: 16px; }
  .file-method-grid { grid-template-columns: 1fr 1fr; }
  .file-check-table { min-width: 690px; }
  .file-check-table th:first-child, .file-check-table td:first-child { width: 150px; min-width: 140px; }
  .file-check-table th:last-child, .file-check-table td:last-child { min-width: 900px; }
  .therapy-preview-panel { padding: 22px 17px; }
  .therapy-preview-panel h1 { font-size: 21px; }
  .therapy-preview-phases { gap: 5px; }
  .therapy-preview-phases > span { grid-template-columns: 14px 1fr; column-gap: 5px; padding: 6px 5px; }
  .therapy-preview-phases i { width: 14px; height: 14px; }
  .therapy-preview-phases strong { font-size: 9px; }
  .therapy-preview-phases small { font-size: 8px; }
  .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
  .client-kpis { grid-template-columns: 1fr; }
  .admin-kpis .stat-card { min-height: 94px; }
  .admin-calendar { overflow: hidden; }
  .calendar-workspace { grid-template-columns: 1fr; gap: 14px; }
  .calendar-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .calendar-metrics > div { min-height: 65px; padding: 11px; }
  .calendar-metrics strong { font-size: 18px; }
  .calendar-metrics span { font-size: 9px; line-height: 1.25; }
  .calendar-toolbar { min-width: 0; justify-content: space-between; gap: 6px; padding: 12px 9px; }
  .calendar-toolbar h2 { min-width: 0; font-size: 13px; }
  .calendar-toolbar p, .calendar-legend { display: none; }
  .calendar-toolbar-nav { gap: 3px; }
  .calendar-toolbar .icon-button { width: 30px; height: 30px; font-size: 17px; }
  .calendar-today-button { min-height: 30px; padding: 0 6px; font-size: 9px; }
  .calendar-weekdays, .calendar-grid { min-width: 0; }
  .calendar-weekdays span { padding: 7px 1px; font-size: 8px; text-align: center; }
  .calendar-day { min-height: 70px; padding: 4px 2px; }
  .calendar-date-button { margin-bottom: 4px; font-size: 9px; }
  .calendar-date-button b { min-width: 13px; height: 13px; font-size: 7px; }
  .calendar-event-list { gap: 2px; }
  .calendar-event { overflow: hidden; margin-bottom: 0; border-left-width: 2px; padding: 3px 2px 3px 3px; }
  .calendar-event strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .calendar-event span, .calendar-event small { display: none; }
  .calendar-more { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .calendar-agenda { padding: 16px; }
  .agenda-header { gap: 8px; padding-bottom: 14px; }
  .agenda-header h2 { font-size: 16px; }
  .agenda-header > div > span { font-size: 10px; }
  .agenda-header .button-secondary { min-height: 36px; padding: 0 9px; font-size: 10px; }
  .agenda-slot { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; min-height: 52px; padding: 8px 0; }
  .agenda-slot time { font-size: 10px; }
  .agenda-event { display: block; padding: 8px; }
  .agenda-event-heading { display: block; }
  .agenda-event-heading strong { display: block; font-size: 11px; white-space: normal; }
  .agenda-event-heading .status { margin-top: 5px; }
  .agenda-event-main p { margin-top: 5px; font-size: 9px; line-height: 1.35; }
  .agenda-event-main small { font-size: 9px; line-height: 1.35; }
  .agenda-event-actions { display: flex; flex-direction: row; align-items: center; gap: 12px; margin-top: 5px; }
  .agenda-event-actions .button-link { min-height: 28px; font-size: 10px; }
  .agenda-free { align-items: flex-start; flex-direction: column; gap: 6px; min-height: 52px; padding: 8px; font-size: 10px; }
  .calendar-day-feed { margin-top: 14px; padding: 16px; }
  .feed-composer { margin-bottom: 16px; }
  .feed-composer .form-field textarea { min-height: 82px; font-size: 12px; }
  .feed-composer-actions { margin-top: 8px; }
  .feed-composer-actions .button-primary { width: 100%; }
  .feed-item { gap: 9px; padding: 14px 0; }
  .feed-icon { flex-basis: 28px; height: 28px; font-size: 12px; }
  .feed-meta strong { font-size: 11px; }
  .feed-meta time { font-size: 10px; }
  .feed-delete-button { margin-left: 0; font-size: 10px; }
  .feed-body p { font-size: 11px; line-height: 1.5; }
  .client-feed-pagination { justify-content: space-between; gap: 7px; font-size: 10px; }
  .client-feed-pagination .button-secondary { min-height: 30px; padding: 0 8px; font-size: 10px; }
  .client-profile-detail { gap: 11px; }
  .avatar.large { width: 50px; height: 50px; font-size: 14px; }
  .client-profile-detail h3 { font-size: 14px; }
  .client-profile-detail p { font-size: 10px; line-height: 1.4; }
  .client-detail-tabs { margin-top: 17px; }
  .client-access-card .section-label { align-items: flex-start; }
  .client-access-card .section-label .button-secondary { width: 100%; }
  .form-grid-two { grid-template-columns: 1fr; gap: 12px; }
  .modal-backdrop { place-items: end center; padding: 10px; }
  .modal { width: 100%; max-height: calc(100vh - 20px); border-radius: 10px; padding: 21px 17px 17px; }
  .modal h2 { font-size: 18px; }
  .modal > div > p { margin-bottom: 17px; font-size: 11px; }
  .form-grid { gap: 12px; }
  .form-field input, .form-field select { height: 42px; font-size: 12px; }
  .form-field textarea { font-size: 12px; }
  .modal-actions { flex-wrap: wrap; gap: 8px; margin-top: 18px; }
  .modal-actions > * { flex: 1 1 130px; }
  .modal-actions > span { display: none; }
  .toast { right: 12px; bottom: 12px; left: 12px; max-width: none; padding: 12px 14px; font-size: 11px; }
  .admin-device-request { right: 12px; bottom: 12px; }
}

@media (max-width: 380px) {
  :root { --mobile-gutter: 13px; }
  .page-content { padding-left: var(--mobile-gutter); padding-right: var(--mobile-gutter); }
  h1 { font-size: 24px; }
  .calendar-metrics > div { padding: 9px; }
  .calendar-metrics strong { font-size: 17px; }
  .calendar-day { min-height: 63px; }
  .calendar-event strong { font-size: 7px; }
  .session-grid { gap: 0 7px; }
  .session-item { font-size: 9px; }
}
