:root {
  --deep-teal: #003e46;
  --night-teal: #011a1d;
  --teal: #2c8f8e;
  --teal-dark: #237371;
  --mint: #81c8c7;
  --mint-pale: #e5f3f2;
  --ink: #18242f;
  --muted: #627079;
  --paper: #f6f8f7;
  --white: #fff;
  --gold: #c0a354;
  --coral: #c65c4b;
  --line: #dfe7e5;
  --shadow: 0 20px 50px rgba(1, 26, 29, .08);
  --radius: 20px;
  --header-height: 84px;
  color-scheme: light;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.55; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary, select { cursor: pointer; }
button:disabled, input[type="submit"]:disabled { cursor: wait; opacity: .68; }
img { display: block; max-width: 100%; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--deep-teal); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.06; letter-spacing: -.04em; }
h2 { margin-bottom: 8px; font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.2; letter-spacing: -.025em; }
h3 { margin-bottom: 8px; }
small { display: block; color: var(--muted); }
code { padding: 2px 5px; color: var(--deep-teal); background: var(--mint-pale); border-radius: 5px; font-size: .85em; overflow-wrap: anywhere; }

.app-progress { position: fixed; z-index: 200; top: 0; right: 0; left: 0; height: 3px; opacity: 0; overflow: hidden; pointer-events: none; transition: opacity .15s ease; }
.app-progress span { display: block; width: 35%; height: 100%; background: linear-gradient(90deg, var(--mint), var(--white), var(--mint)); transform: translateX(-120%); }
body.is-processing .app-progress { opacity: 1; }
body.is-processing .app-progress span { animation: app-progress 1.15s ease-in-out infinite; }
button.is-processing::before { display: inline-block; width: 13px; height: 13px; margin-right: 7px; content: ""; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: button-spin .7s linear infinite; }
@keyframes app-progress { 0% { transform: translateX(-120%); } 70%, 100% { transform: translateX(330%); } }
@keyframes button-spin { to { transform: rotate(360deg); } }

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  min-height: var(--header-height);
  padding: 12px clamp(20px, 4vw, 64px);
  color: var(--white);
  background: var(--deep-teal);
  box-shadow: 0 2px 0 rgba(255,255,255,.08);
}

.brand-lockup { display: flex; align-items: center; gap: 20px; width: fit-content; color: var(--white); }
.brand-lockup:hover { color: var(--white); }
.brand-lockup img { width: 174px; height: 58px; object-fit: contain; object-position: left center; }
.brand-lockup span { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.25); font-size: .9rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.desktop-nav { display: flex; align-items: center; gap: 26px; }
.desktop-nav a { position: relative; padding: 12px 0; color: rgba(255,255,255,.72); font-size: .78rem; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: var(--white); }
.desktop-nav a[aria-current="page"]::after { position: absolute; right: 0; bottom: 4px; left: 0; height: 2px; content: ""; background: var(--mint); }
.user-menu { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.user-account-link, .user-account-label { padding: 6px 8px; text-align: right; border-radius: 8px; }
.user-account-link { color: var(--white); transition: background .15s ease; }
.user-account-link:hover, .user-account-link:focus-visible { color: var(--white); background: rgba(255,255,255,.1); }
.user-account-link:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.user-menu strong { display: block; font-size: .85rem; }
.user-menu small { color: var(--mint); font-size: .72rem; text-transform: uppercase; }
.text-button { padding: 8px 0; color: rgba(255,255,255,.75); border: 0; background: transparent; font-size: .78rem; }
.impersonation-banner { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 10px 24px; color: var(--deep-teal); background: var(--mint); border-bottom: 1px solid rgba(1,26,29,.14); }
.impersonation-banner p { margin: 0; }
.impersonation-banner strong, .impersonation-banner span { display: block; }
.impersonation-banner strong { font-size: .8rem; }
.impersonation-banner span { font-size: .68rem; }
.impersonation-banner form { margin: 0; }
.impersonation-banner .button { min-height: 36px; padding: 7px 12px; }

.page-shell { width: min(1440px, calc(100% - 48px)); min-height: calc(100vh - var(--header-height)); margin: 0 auto; padding: clamp(36px, 5vw, 72px) 0 90px; }
.page-heading { max-width: 850px; margin-bottom: 42px; }
.page-heading > p:last-child { max-width: 740px; margin-bottom: 0; color: var(--muted); font-size: 1.04rem; }
.heading-with-action { display: flex; align-items: flex-end; justify-content: space-between; max-width: none; gap: 30px; }
.heading-with-action > div { max-width: 850px; }
.eyebrow { margin-bottom: 10px; color: var(--teal); font-size: .73rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.panel { padding: clamp(22px, 3vw, 36px); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.panel-heading h2, .panel-heading p, .section-heading h2, .section-heading p { margin-bottom: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.button-primary { color: var(--white); background: var(--teal); }
.button-primary:hover { color: var(--white); background: var(--teal-dark); }
.button-secondary { color: var(--deep-teal); background: var(--white); border-color: var(--teal); }
.button-secondary:hover { color: var(--white); background: var(--deep-teal); border-color: var(--deep-teal); }
.button-danger { color: var(--white); background: var(--coral); }
.button-danger:hover { color: var(--white); background: #a84335; }
.button-large { min-height: 54px; }
.chip-button { padding: 8px 13px; color: var(--deep-teal); border: 1px solid var(--mint); border-radius: 999px; background: var(--mint-pale); font-size: .73rem; font-weight: 600; }
.chip-muted { color: var(--muted); border-color: var(--line); background: var(--white); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.reviewed-request-heading { margin-top: 34px; }
.calendar-event-actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.calendar-event-actions form { margin: 0; }
.event-editor[open] > .form-popover { z-index: 25; right: 0; left: auto; width: min(430px, calc(100vw - 48px)); }

.flash-stack { position: fixed; z-index: 100; top: calc(var(--header-height) + 16px); right: 24px; display: grid; gap: 8px; width: min(380px, calc(100% - 48px)); }
.flash { padding: 14px 18px; background: var(--white); border-left: 4px solid var(--teal); border-radius: 8px; box-shadow: var(--shadow); font-weight: 500; }
.flash-error { border-left-color: var(--coral); }

.stat-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 16px; min-height: 142px; padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card-link { color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.stat-card-link:hover { color: var(--ink); border-color: var(--teal); transform: translateY(-2px); }
.stat-feature { color: var(--white); background: var(--deep-teal); border-color: var(--deep-teal); }
.stat-icon { grid-row: span 2; display: grid; place-items: center; width: 50px; height: 50px; color: var(--deep-teal); background: var(--mint-pale); border-radius: 50%; font-size: 1.4rem; }
.stat-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-card strong { align-self: end; font-size: 2.2rem; line-height: 1.1; }
.stat-card > span:last-child { align-self: start; color: var(--muted); font-size: .8rem; }
.stat-feature > span:last-child { color: var(--mint); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); gap: 28px; }
.dashboard-choirs { margin-bottom: 28px; }
.dashboard-choir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dashboard-choir-widget { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 15px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s ease, transform .15s ease; }
.dashboard-choir-widget:hover { color: var(--deep-teal); border-color: var(--choir-accent, var(--teal)); transform: translateY(-2px); }
.dashboard-choir-widget strong, .dashboard-choir-widget small { display: block; }
.dashboard-choir-icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--deep-teal); background: var(--mint-pale); border-radius: 11px; font-weight: 700; }
.event-list, .request-list, .history-list { display: grid; }
.event-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.event-row:first-child { border-top: 0; }
.event-row time { display: grid; place-items: center; width: 58px; height: 58px; color: var(--deep-teal); background: var(--mint-pale); border-radius: 12px; line-height: 1.05; }
.event-row time strong { font-size: .85rem; white-space: nowrap; }
.event-row time span { font-size: .6rem; }
.event-copy strong { display: block; color: var(--ink); }
.event-copy small { margin-top: 3px; }
.arrow { color: var(--teal); font-size: 1.5rem; transition: transform .2s; }
.event-row:hover .arrow { transform: translateX(4px); }
.request-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.request-row:first-child { border-top: 0; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; }
.status-pending { background: var(--gold); }
.empty-state { padding: 35px 20px; color: var(--muted); text-align: center; }
.success-empty { color: var(--teal-dark); background: var(--mint-pale); border-radius: 12px; }

.event-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.event-card { display: flex; flex-direction: column; min-height: 360px; padding: 28px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.event-card:hover { color: var(--ink); transform: translateY(-4px); box-shadow: 0 24px 60px rgba(1,26,29,.13); }
.event-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 34px; }
.event-card-top time { color: var(--muted); font-size: .8rem; }
.event-card h2 { margin-bottom: 8px; font-size: 1.65rem; }
.event-card > p { color: var(--teal-dark); }
.event-card dl { margin: auto 0 26px; }
.event-card dl div { display: grid; grid-template-columns: 80px 1fr; padding: 7px 0; border-top: 1px solid var(--line); }
.event-card dt { color: var(--muted); }
.event-card dd { margin: 0; font-weight: 500; }
.tag { display: inline-flex; align-items: center; width: fit-content; min-height: 25px; padding: 4px 9px; color: var(--deep-teal); background: var(--mint-pale); border-radius: 999px; font-size: .67rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.tag-pending { color: #745f25; background: #f3ecd6; }
.tag-approved, .tag-sent { color: #176661; background: #ddf1ef; }
.tag-declined, .tag-dismissed { color: #7b3c32; background: #f8e6e3; }
.tag-draft { color: #745f25; background: #f3ecd6; }
.matrix-total { color: var(--deep-teal); background: var(--mint-pale); font-weight: 700; text-align: center; }

.two-column-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; gap: 28px; }
.form-panel { position: sticky; top: calc(var(--header-height) + 24px); }
.form-grid { display: grid; gap: 18px; }
.form-grid label, .filter-bar label { display: grid; gap: 7px; color: var(--ink); font-size: .78rem; font-weight: 600; }
.form-grid input, .form-grid select, .form-grid textarea, .filter-bar input, .filter-bar select, table select {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  background: var(--white);
  border: 1px solid #cbd8d6;
  border-radius: 8px;
  outline: 0;
  font-weight: 400;
}
.form-grid textarea { resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .filter-bar input:focus, .filter-bar select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(44,143,142,.14); }
.required { color: var(--coral); font-size: .68rem; text-transform: uppercase; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
fieldset { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
legend { padding: 0 5px; font-size: .75rem; font-weight: 600; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkbox-grid label { display: flex; align-items: center; gap: 7px; }
.checkbox-grid input { width: auto; min-height: auto; }
.field-help { margin: 0 0 12px; color: var(--muted); font-size: .72rem; }
.account-singer-grid { max-height: 220px; overflow-y: auto; }
.account-create-note, .account-preserve-note { margin: 0; padding: 13px 15px; color: var(--teal-dark); background: var(--mint-pale); border-radius: 9px; font-size: .76rem; }
.parent-account-picker { display: grid; gap: 8px; }
.parent-account-picker > label { display: grid; gap: 7px; }
.parent-account-results { display: grid; gap: 7px; max-height: 210px; padding: 7px; overflow-y: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.parent-account-results[hidden], .parent-account-selected[hidden] { display: none; }
.parent-account-results[aria-busy="true"] { opacity: .7; }
.parent-search-option { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 11px 12px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; text-align: left; }
.parent-search-option:hover, .parent-search-option:focus-visible { border-color: var(--teal); background: var(--mint-pale); }
.parent-search-option strong, .parent-search-option small { display: block; }
.parent-search-option small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.parent-search-select-label { color: var(--teal-dark); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.parent-search-message { display: grid; gap: 3px; padding: 12px; color: var(--muted); font-size: .72rem; }
.parent-search-message strong { color: var(--ink); }
.parent-account-selected { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 14px; background: var(--mint-pale); border: 1px solid var(--mint); border-radius: 10px; }
.parent-account-selected small, .parent-account-selected strong, .parent-account-selected span { display: block; }
.parent-account-selected small { color: var(--teal-dark); font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.parent-account-selected span { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.notification-recipient-settings { display: grid; gap: 18px; }
.notification-recipient-picker { display: grid; gap: 8px; }
.notification-recipient-picker > label { display: grid; gap: 7px; }
.notification-recipient-results { display: grid; gap: 7px; max-height: 210px; padding: 7px; overflow-y: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.notification-recipient-results[hidden] { display: none; }
.notification-recipient-results[aria-busy="true"] { opacity: .7; }
.notification-recipient-selected { display: flex; flex-wrap: wrap; gap: 8px; }
.notification-recipient-chip { display: flex; align-items: center; gap: 9px; padding: 8px 9px 8px 11px; color: var(--teal-dark); background: var(--mint-pale); border: 1px solid var(--mint); border-radius: 9px; }
.notification-recipient-chip strong, .notification-recipient-chip small { display: block; }
.notification-recipient-chip small { margin-top: 1px; color: var(--muted); font-size: .64rem; }
.notification-recipient-chip button { width: 25px; height: 25px; padding: 0; color: var(--teal-dark); background: transparent; border: 0; border-radius: 50%; font-size: 1rem; }
.notification-recipient-chip button:hover, .notification-recipient-chip button:focus-visible { background: rgba(44,143,142,.14); }
.notification-recipient-empty { color: var(--muted); font-size: .7rem; }
.notification-recipient-empty[hidden] { display: none; }
.form-popover.account-create-form { position: fixed; top: calc(var(--header-height) + 24px); right: 24px; max-height: calc(100vh - var(--header-height) - 48px); }
.account-actions, .account-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.account-actions form { margin: 0; }
.account-delete { color: #a84335; font-weight: 700; text-decoration-thickness: 1.5px; }
.account-delete:hover { color: #963d31; }
.account-role-staff { color: #176661; background: #ddf1ef; }
.account-role-developer { color: var(--white); background: var(--deep-teal); }
.account-role-volunteer { color: #745f25; background: #f3ecd6; }
.account-detail-heading { align-items: flex-end; }
.account-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.account-heading-actions form { margin: 0; }
.account-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .34fr); align-items: start; gap: 28px; }
.account-detail-main { display: grid; gap: 28px; min-width: 0; }
.account-settings-panel, .account-singer-access { padding: clamp(24px, 4vw, 42px); }
.compact-section-heading { margin-bottom: 2px; }
.compact-section-heading h2 { margin-bottom: 0; }
.account-access-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.account-link-count { display: grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px; color: var(--white); background: var(--deep-teal); border-radius: 50%; font-size: 1.05rem; font-weight: 700; }
.linked-singer-list { display: grid; gap: 10px; }
.linked-singer-card, .singer-search-result { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.linked-singer-card strong, .linked-singer-card small, .singer-search-result strong, .singer-search-result small, .singer-search-result span { display: block; }
.linked-singer-card small, .singer-search-result small, .singer-search-result span { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.linked-singer-card form, .singer-search-result form { flex: 0 0 auto; margin: 0; }
.account-singer-search { display: grid; gap: 18px; margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.account-singer-search h3 { margin-bottom: 4px; }
.account-singer-search > div:first-child > p:last-child { margin: 0; color: var(--muted); font-size: .78rem; }
.account-search-form { display: grid; gap: 7px; }
.account-search-form > label { color: var(--ink); font-size: .78rem; font-weight: 600; }
.account-search-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.account-search-form input { width: 100%; min-height: 45px; padding: 10px 12px; background: var(--white); border: 1px solid #cbd8d6; border-radius: 8px; outline: 0; }
.account-search-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(44,143,142,.14); }
.singer-search-results { display: grid; gap: 10px; }
.singer-search-results[hidden] { display: none; }
.singer-search-results[aria-busy="true"] { opacity: .68; }
.singer-search-items { display: grid; gap: 10px; }
.singer-search-summary { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .72rem; }
.singer-search-summary strong { color: var(--ink); }
.account-empty-state { padding: 24px; border: 1px dashed var(--line); border-radius: 10px; }
.account-empty-state strong { display: block; color: var(--ink); }
.account-empty-state p { margin: 4px 0 0; }
.account-access-inactive { color: var(--muted); }
.account-access-inactive h2 { color: var(--ink); }
.login-as-history-list { display: grid; }
.login-as-history-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, auto); gap: 24px; padding: 17px 0; border-top: 1px solid var(--line); }
.login-as-history-row:first-child { border-top: 0; }
.login-as-history-row > div:last-child { text-align: right; }
.login-as-history-row strong, .login-as-history-row small { display: block; }
.login-as-history-row small { margin-top: 3px; color: var(--muted); font-size: .69rem; }
.danger-zone { border-color: rgba(198,92,75,.4); }
.danger-zone h2 { font-size: 1.25rem; }
.danger-zone p:not(.eyebrow) { color: var(--muted); font-size: .82rem; }
.back-link-dark { display: inline-block; margin-bottom: 24px; color: var(--teal-dark); font-size: .78rem; font-weight: 600; }
.record-detail-page { width: min(820px, 100%); margin: 0 auto; }
.absence-request-detail-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 0; overflow: hidden; }
.absence-request-detail-card > div { display: grid; gap: 5px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.absence-request-detail-card > div:nth-child(odd):not(.absence-request-detail-reason) { border-right: 1px solid var(--line); }
.absence-request-detail-card small { color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.absence-request-detail-reason { grid-column: 1 / -1; }
.absence-request-detail-reason p { margin: 0; white-space: pre-wrap; }
.history-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); }
.history-row:first-child { border-top: 0; }
.history-row p { grid-column: 1 / -1; margin: 0; color: var(--muted); }

.absence-layout { grid-template-columns: minmax(360px, .88fr) minmax(0, 1.12fr); }
.absence-form fieldset { display: grid; gap: 8px; }
.choice-cards label { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 11px; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.choice-cards label:has(input:checked) { border-color: var(--teal); background: var(--mint-pale); box-shadow: 0 0 0 2px rgba(44,143,142,.1); }
.choice-cards input, .confirmation-check input { width: 18px; min-height: 18px; margin-top: 2px; accent-color: var(--teal); }
.choice-cards strong, .choice-cards small, .confirmation-check strong, .confirmation-check small { display: block; }
.choice-cards small, .confirmation-check small { margin-top: 2px; color: var(--muted); font-size: .69rem; font-weight: 400; }
.notice-box { padding: 14px; color: var(--teal-dark); background: var(--mint-pale); border: 1px solid var(--mint); border-radius: 10px; }
.notice-box[hidden], [data-retreat-change][hidden], [data-absence-impact][hidden] { display: none; }
.confirmation-check { display: grid !important; grid-template-columns: auto 1fr; align-items: start; gap: 10px; cursor: pointer; }
.absence-history-row { display: block; }
.absence-history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.absence-history-heading strong, .absence-history-heading small { display: block; }
.absence-history-heading small { margin-top: 3px; color: var(--muted); }
.absence-kind { display: block; margin-bottom: 4px; color: var(--teal-dark); font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.absence-summary { display: grid; gap: 7px; margin: 14px 0 10px; }
.absence-summary div { display: grid; grid-template-columns: 86px 1fr; gap: 10px; }
.absence-summary dt { color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.absence-summary dd { margin: 0; color: var(--ink); font-size: .8rem; }
.absence-submitted { color: var(--muted); font-size: .68rem; }
.confirmation-note { color: var(--teal-dark); font-weight: 700; }

.section-tabs { position: sticky; z-index: 20; top: var(--header-height); display: flex; gap: 8px; margin: -18px 0 36px; padding: 8px; overflow-x: auto; background: rgba(246,248,247,.94); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(12px); scrollbar-width: thin; }
.section-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px; color: var(--muted); border-radius: 8px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.section-tabs a:hover { color: var(--deep-teal); background: var(--mint-pale); }
.section-tabs a[aria-selected="true"] { color: var(--white); background: var(--deep-teal); box-shadow: 0 5px 14px rgba(1,26,29,.16); }
.section-tabs a:focus-visible { outline: 3px solid rgba(44,143,142,.28); outline-offset: 2px; }
.section-tabs span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 5px; color: var(--white); background: var(--coral); border-radius: 50%; }
.utility-page .page-shell { padding-top: 30px; }
.utility-layout { display: grid; grid-template-columns: minmax(0, 1fr) 232px; align-items: start; gap: clamp(28px, 3vw, 48px); }
.utility-sidebar { position: sticky; grid-column: 2; grid-row: 1; top: calc(var(--header-height) + 24px); min-width: 0; padding-left: 22px; border-left: 1px solid var(--line); }
.utility-heading { margin-bottom: 22px; }
.utility-heading .eyebrow { margin-bottom: 7px; }
.utility-heading h1 { margin-bottom: 8px; font-size: clamp(1.65rem, 2.2vw, 2.15rem); }
.utility-heading > p:last-child { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.utility-section-nav { position: static; display: grid; gap: 5px; margin: 0; padding: 6px; overflow: visible; background: var(--white); border-radius: 11px; box-shadow: 0 10px 28px rgba(1,26,29,.05); backdrop-filter: none; }
.utility-section-nav a { justify-content: flex-start; width: 100%; min-height: 39px; padding: 8px 11px; font-size: .76rem; text-align: left; }
.utility-section-nav a[aria-selected="true"] { box-shadow: none; }
.utility-section-nav a[aria-current="page"] { color: var(--white); background: var(--deep-teal); box-shadow: none; }
.utility-section-nav span { margin-left: auto; }
.support-tab-list { display: contents; }
.utility-section-nav .feedback-sync-nav-link { margin-top: 3px; padding-left: 22px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.utility-workspace { grid-column: 1; grid-row: 1; min-width: 0; }
.utility-workspace > [role="tabpanel"]:first-child,
.utility-workspace[role="tabpanel"] { scroll-margin-top: calc(var(--header-height) + 20px); }
.section-tabs.manage-subtabs { position: static; top: auto; width: fit-content; max-width: 100%; margin: 0 0 24px; padding: 5px; overflow-x: auto; background: var(--white); backdrop-filter: none; }
.manage-subsection { outline: 0; }
.manage-section { min-height: 320px; outline: 0; }
.section-heading { margin-bottom: 20px; }
.section-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.section-description { margin: 4px 0 0; color: var(--muted); font-size: .84rem; }
.responsive-table { padding: 0; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 18px; color: var(--muted); background: #f0f5f4; font-size: .68rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 17px 18px; border-top: 1px solid var(--line); vertical-align: top; }
td strong { display: block; }
td small { margin-top: 3px; }
.row-muted { opacity: .55; background: #f4f4f4; }
.muted { color: var(--muted); }
.care-flag { color: var(--coral); font-size: .75rem; font-weight: 600; }
.singer-contact-details summary { display: flex; align-items: center; gap: 9px; width: fit-content; list-style: none; cursor: pointer; }
.singer-contact-details summary::-webkit-details-marker { display: none; }
.singer-contact-details summary small { color: var(--teal-dark); }
.singer-contact-details > div { display: grid; gap: 3px; min-width: 250px; margin-top: 9px; padding: 12px; color: var(--ink); background: var(--mint-pale); border-radius: 9px; }
.singer-contact-details > div b, .singer-contact-details > div a { display: block; }
.singer-avatar-image { width: 48px; height: 48px; object-fit: cover; object-position: center; border-radius: 50%; }
.singer-contact-details .singer-avatar-image { width: 38px; height: 38px; }
.singer-photo-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 10px; }
.singer-photo-form label { display: grid; gap: 5px; font-size: .68rem; font-weight: 600; }
.singer-photo-form input[type="file"] { max-width: 250px; font-size: .68rem; }
.parent-singer-photos { margin-bottom: 24px; }
.parent-singer-photo-list { display: grid; gap: 12px; }
.parent-singer-photo-list article { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.parent-singer-photo-list article:first-child { border-top: 0; }
.parent-singer-photo-list strong, .parent-singer-photo-list small { display: block; }
.parent-singer-photo-list small { margin-top: 3px; color: var(--muted); }
.singer-profile-photo { display: grid; place-items: center; width: 64px; height: 64px; object-fit: cover; object-position: center; border-radius: 50%; }
.singer-profile-placeholder { color: var(--deep-teal); background: var(--mint-pale); font-weight: 700; }
.popover-form { position: relative; }
.popover-form > summary { list-style: none; }
.popover-form > summary::-webkit-details-marker { display: none; }
.form-popover { position: absolute; z-index: 30; top: calc(100% + 10px); right: 0; width: min(440px, calc(100vw - 48px)); max-height: calc(100vh - 150px); padding: 24px; overflow: auto; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 25px 80px rgba(1,26,29,.22); }
.form-popover-wide { width: min(620px, calc(100vw - 48px)); }
.import-column-guide { display: grid; gap: 6px; padding: 14px; color: var(--ink); background: var(--mint-pale); border: 1px solid var(--mint); border-radius: 10px; }
.import-column-guide code { overflow-wrap: anywhere; color: var(--deep-teal); font-size: .74rem; line-height: 1.55; }
.import-column-guide small { color: var(--muted); }
.form-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.form-divider::before, .form-divider::after { flex: 1; height: 1px; content: ""; background: var(--line); }
.form-popover-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.form-popover-heading h3 { margin: 0; }
.popover-close { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 50%; font-size: 1.35rem; line-height: 1; }
.popover-close:hover { color: var(--deep-teal); border-color: var(--teal); }
.card-list { display: grid; gap: 10px; }
.list-control-bar { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(150px, .28fr) minmax(190px, .34fr); align-items: end; gap: 14px; margin-bottom: 16px; padding: 16px; }
.list-control-bar > label { display: grid; gap: 7px; color: var(--ink); font-size: .7rem; font-weight: 600; }
.list-control-bar input, .list-control-bar select, .multi-filter > summary { min-height: 42px; padding: 9px 12px; background: var(--white); border: 1px solid #cbd8d6; border-radius: 8px; font: inherit; }
.multi-filter { position: relative; }
.multi-filter > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; font-size: .72rem; font-weight: 600; }
.multi-filter > summary::-webkit-details-marker { display: none; }
.multi-filter > summary span { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 7px; color: var(--deep-teal); background: var(--mint-pale); border-radius: 999px; font-size: .64rem; }
.multi-filter-menu { position: absolute; z-index: 25; top: calc(100% + 6px); right: 0; display: grid; gap: 8px; width: min(330px, calc(100vw - 48px)); max-height: 310px; padding: 14px; overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 45px rgba(1,26,29,.16); }
.multi-filter-menu label { display: flex; align-items: center; gap: 8px; font-size: .72rem; }
.multi-filter-menu input { width: auto; min-height: auto; }
[data-list-item][hidden] { display: none; }
.list-card { display: grid; grid-template-columns: 160px 1fr auto; align-items: center; gap: 20px; padding: 20px 24px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.list-card time strong, .list-card time span { display: block; }
.list-card time span { color: var(--muted); font-size: .75rem; }
.list-card > div strong, .list-card > div small { display: block; }
.admin-list-controls { grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(165px, .3fr)); }
.admin-mobile-sort { display: none !important; }
.admin-table-wrap { overflow: visible; }
.admin-table th button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; color: inherit; background: transparent; border: 0; font: inherit; font-weight: 700; letter-spacing: inherit; text-align: left; text-transform: inherit; cursor: pointer; }
.admin-table th button:hover, .admin-table th[aria-sort="ascending"] button, .admin-table th[aria-sort="descending"] button { color: var(--deep-teal); }
.admin-table th button:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 2px; }
.admin-table th button span { color: var(--teal); font-size: .8rem; }
.admin-table td { vertical-align: middle; }
.admin-table tbody tr:not([data-list-empty]) { transition: background-color .15s ease; }
.admin-table tbody tr:not([data-list-empty]):hover { background: #f8fbfa; }
.admin-table-actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 180px; }
.admin-table-actions form { margin: 0; }
.choir-table-name { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.choir-table-name i { flex: 0 0 auto; width: 12px; height: 12px; background: var(--choir-accent, var(--mint)); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--choir-accent, var(--mint)) 22%, transparent); }
.choir-term-dates { min-width: 205px; }
.choir-term-dates span { display: block; white-space: nowrap; }
.choir-term-dates span + span { margin-top: 4px; }
.choir-term-dates strong { display: inline; margin-right: 4px; font-size: .66rem; text-transform: uppercase; }
.choir-table-actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 185px; }
.choir-table-actions form { margin: 0; }
.choir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.choir-card { position: relative; min-height: 210px; padding: 28px; overflow: hidden; background: var(--deep-teal); border-radius: var(--radius); color: var(--white); }
.choir-card::after { position: absolute; right: -45px; bottom: -75px; width: 180px; height: 180px; content: ""; background: var(--choir-accent, var(--mint)); border-radius: 50%; opacity: .75; pointer-events: none; }
.choir-card > * { position: relative; z-index: 1; }
.choir-card-heading { display: flex; align-items: center; justify-content: space-between; }
.choir-card h3 { margin-top: 35px; font-size: 1.4rem; }
.choir-card p { color: var(--mint); }
.choir-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; color: var(--deep-teal); background: var(--mint); border-radius: 50%; }
.choir-mark svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.choir-editor { margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.2); }
.choir-editor > summary { width: fit-content; color: var(--mint); font-size: .74rem; font-weight: 700; letter-spacing: .05em; list-style: none; text-transform: uppercase; }
.choir-editor > summary::-webkit-details-marker { display: none; }
.choir-editor > summary::after { margin-left: 7px; content: "＋"; }
.choir-editor[open] > summary::after { content: "−"; }
.choir-card h3 a { color: var(--white); }
.choir-card h3 a:hover { color: var(--mint); }
.choir-detail-heading { padding-left: 24px; border-left: 6px solid var(--choir-accent, var(--teal)); }
.choir-detail-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); align-items: start; gap: 28px; }
.choir-singer-list { display: grid; gap: 10px; }
.choir-singer-card { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); overflow: hidden; }
.choir-singer-card > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px; list-style: none; cursor: pointer; }
.choir-singer-card > summary::-webkit-details-marker { display: none; }
.choir-singer-card > summary strong, .choir-singer-card > summary small { display: block; }
.choir-singer-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px 16px; }
.choir-singer-contact > div { display: grid; gap: 3px; padding: 12px; background: var(--white); border-radius: 9px; }
.choir-singer-contact > div:last-child:nth-child(3) { grid-column: 1 / -1; }
.choir-edit-form { margin-top: 18px; padding: 18px; color: var(--ink); background: rgba(255,255,255,.97); border-radius: 12px; }
.checkbox-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 9px !important; }
.checkbox-label input { width: auto; min-height: auto; }
.choir-delete-form { margin-top: 14px; }
.danger-button { padding: 5px 0; color: #ffc3ba; background: transparent; border: 0; font-size: .7rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.danger-button:hover { color: var(--white); }
.add-card { color: var(--ink); background: var(--white); border: 1px dashed var(--teal); }
.add-card::after { display: none; }

.filter-bar { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr) auto; align-items: end; gap: 14px; margin-bottom: 30px; padding: 20px; }
.trend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.report-overview { margin-top: 38px; }
.report-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.report-summary-card { display: grid; align-content: center; min-height: 128px; padding: 22px; color: var(--deep-teal); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.report-summary-card strong { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.1; }
.report-summary-card span { margin-top: 5px; color: var(--muted); font-size: .76rem; }
.report-summary-feature { color: var(--white); background: var(--deep-teal); border-color: var(--deep-teal); }
.report-summary-feature span { color: var(--mint); }
.report-grid-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.matrix-table-wrap { max-width: 100%; padding: 0; overflow: auto; }
.matrix-table { min-width: max(760px, 100%); border-collapse: separate; border-spacing: 0; }
.matrix-table th, .matrix-table td { min-width: 145px; padding: 14px; text-align: center; vertical-align: middle; }
.matrix-table thead th { position: sticky; z-index: 2; top: 0; background: #f0f5f4; }
.matrix-table thead th small { max-width: 180px; margin: 4px auto 0; white-space: normal; }
.matrix-table .matrix-singer-column { position: sticky; z-index: 3; left: 0; min-width: 190px; text-align: left; background: var(--white); box-shadow: 1px 0 0 var(--line); }
.matrix-table thead .matrix-singer-column { z-index: 4; background: #f0f5f4; }
.matrix-cell .tag { white-space: nowrap; }
.matrix-cell.is-not-applicable { color: #aab4b8; background: #f4f5f5; }
.matrix-empty { color: var(--muted); font-size: .68rem; }
.trend-card { display: grid; grid-template-columns: 68px 1fr; align-items: center; gap: 16px; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.trend-card h2 { margin-bottom: 2px; font-size: 1.05rem; }
.trend-card p { margin: 0; color: var(--muted); font-size: .72rem; }
.trend-card dl { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 0; }
.trend-card dl div { padding: 8px; background: var(--paper); border-radius: 8px; text-align: center; }
.trend-card dt { color: var(--muted); font-size: .6rem; }
.trend-card dd { margin: 0; font-size: 1rem; font-weight: 700; }
.percentage-ring { display: grid; place-items: center; width: 66px; height: 66px; background: conic-gradient(var(--teal) calc(var(--percentage) * 1%), var(--mint-pale) 0); border-radius: 50%; }
.percentage-ring::before { grid-area: 1 / 1; width: 50px; height: 50px; content: ""; background: var(--white); border-radius: 50%; }
.percentage-ring strong { z-index: 1; grid-area: 1 / 1; font-size: .85rem; }
.status-present { color: #176661; background: #ddf1ef; }
.status-late { color: #745f25; background: #f3ecd6; }
.status-excused { color: var(--deep-teal); background: var(--mint-pale); }
.status-unexcused { color: #7b3c32; background: #f8e6e3; }
.communications-layout { grid-template-columns: 1.15fr .85fr; }
.message-card { padding: 20px 0; border-top: 1px solid var(--line); }
.message-card:first-child { border-top: 0; padding-top: 0; }
.message-heading { display: flex; justify-content: space-between; gap: 20px; }
.message-preview { margin: 14px 0; padding: 16px; background: var(--paper); border-left: 3px solid var(--mint); border-radius: 4px; font-size: .85rem; }
.message-preview p:last-child { margin-bottom: 0; }
.code-field { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }

.support-tab-panel { max-width: none; outline: 0; }
.support-panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.support-panel-heading h2, .support-panel-heading p { margin-bottom: 0; }
.support-panel-heading > div > p:last-child { max-width: 650px; margin-top: 4px; color: var(--muted); font-size: .82rem; }
.support-chat { padding: 0 0 128px; overflow: visible; }
.support-chat-header { display: flex; align-items: center; gap: 13px; padding: 20px 24px; color: var(--white); background: var(--deep-teal); border-radius: var(--radius) var(--radius) 0 0; }
.support-chat-header strong, .support-chat-header small { display: block; }
.support-chat-header small { color: var(--mint); }
.support-avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; color: var(--deep-teal); background: var(--mint); border-radius: 50%; font-weight: 700; }
.chat-feed { display: flex; flex-direction: column; gap: 14px; min-height: 430px; padding: 26px; background: linear-gradient(180deg, #f2f7f6, var(--white)); }
.chat-message { width: fit-content; max-width: min(78%, 760px); padding: 14px 17px; border: 1px solid var(--line); border-radius: 4px 18px 18px; background: var(--white); box-shadow: 0 8px 22px rgba(1,26,29,.06); scroll-margin-bottom: 140px; }
.chat-message p { margin: 4px 0 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-markdown { overflow-wrap: anywhere; }
.chat-markdown > :first-child { margin-top: 4px; }
.chat-markdown > :last-child { margin-bottom: 7px; }
.chat-markdown p { white-space: normal; }
.chat-markdown h1, .chat-markdown h2, .chat-markdown h3, .chat-markdown h4 { margin: 14px 0 6px; font-size: .94rem; line-height: 1.35; letter-spacing: 0; }
.chat-markdown ul, .chat-markdown ol { margin: 7px 0 10px; padding-left: 22px; }
.chat-markdown li + li { margin-top: 4px; }
.chat-markdown blockquote { margin: 8px 0; padding: 4px 0 4px 12px; color: var(--muted); border-left: 3px solid var(--mint); }
.chat-markdown pre { max-width: 100%; padding: 12px; overflow-x: auto; background: var(--paper); border-radius: 8px; white-space: pre; }
.chat-markdown code { font-size: .78em; }
.chat-markdown a { text-decoration: underline; text-underline-offset: 2px; }
.chat-markdown table { display: block; max-width: 100%; margin: 10px 0; overflow-x: auto; border-collapse: collapse; }
.chat-markdown th, .chat-markdown td { padding: 7px 9px; border: 1px solid var(--line); text-align: left; }
.chat-message time, .chat-author, .chat-message-timing { color: var(--muted); font-size: .65rem; }
.chat-author { font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.chat-user { align-self: flex-end; color: var(--white); background: var(--teal); border-color: var(--teal); border-radius: 18px 4px 18px 18px; }
.chat-user .chat-author, .chat-user time { color: rgba(255,255,255,.72); }
.chat-loading .chat-markdown { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.chat-loading-dots { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.chat-loading-dots i { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; animation: chat-thinking 1.2s ease-in-out infinite; }
.chat-loading-dots i:nth-child(2) { animation-delay: .16s; }
.chat-loading-dots i:nth-child(3) { animation-delay: .32s; }
.chat-error { color: #7b3c32; background: #f8e6e3; border-color: #e8c5bf; }
@keyframes chat-thinking { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-composer-dock { position: fixed; z-index: 40; right: calc(max(24px, calc((100vw - 1440px) / 2)) + 232px + clamp(28px, 3vw, 48px)); bottom: 0; left: max(24px, calc((100vw - 1440px) / 2)); background: rgba(255,255,255,.97); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -12px 34px rgba(1,26,29,.12); backdrop-filter: blur(14px); }
.chat-composer { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; padding: 14px 18px 7px; }
.chat-composer textarea { width: 100%; min-height: 52px; max-height: 180px; padding: 13px 15px; resize: vertical; border: 1px solid #cbd8d6; border-radius: 12px; outline: 0; }
.chat-composer textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(44,143,142,.14); }
.chat-keyboard-hint { grid-column: 1 / -1; margin-top: -7px; font-size: .64rem; }
.support-disclaimer { margin: 0; padding: 0 20px 16px; color: var(--muted); font-size: .67rem; }
.feedback-workspace-heading { align-items: flex-end; }
.feedback-workspace { width: 100%; }
.feedback-inbox { padding: 0; overflow: hidden; }
.feedback-inbox-toolbar { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, auto); align-items: center; gap: 18px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.feedback-search input { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid #cbd8d6; border-radius: 10px; outline: 0; }
.feedback-search input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(44,143,142,.14); }
.feedback-filter { display: grid; grid-template-columns: auto minmax(190px, 240px); align-items: center; gap: 10px; color: var(--muted); font-size: .69rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.feedback-filter select { min-height: 48px; padding: 10px 38px 10px 13px; color: var(--ink); background-color: var(--paper); border: 1px solid #cbd8d6; border-radius: 10px; font-size: .76rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.feedback-filter select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(44,143,142,.14); outline: 0; }
.feedback-inbox-list { display: grid; min-height: 280px; }
.feedback-list-header, .feedback-ticket-summary { display: grid; grid-template-columns: minmax(145px, .23fr) minmax(280px, 1fr) minmax(120px, .18fr) minmax(165px, .24fr); align-items: center; gap: 18px; }
.feedback-list-header { min-height: 48px; padding: 0 30px; color: var(--muted); background: var(--paper); border-bottom: 1px solid var(--line); }
.feedback-list-header button { display: flex; align-items: center; gap: 6px; padding: 8px 0; color: inherit; background: transparent; border: 0; font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.feedback-list-header button:hover, .feedback-list-header button[aria-sort="ascending"], .feedback-list-header button[aria-sort="descending"] { color: var(--deep-teal); }
.feedback-list-header button span { color: var(--teal); font-size: .8rem; }
.feedback-no-results[hidden] { display: none; }
.feedback-ticket { padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; scroll-margin-top: calc(var(--header-height) + 20px); }
.feedback-ticket:last-of-type { border-bottom: 0; }
.feedback-ticket[hidden] { display: none; }
.feedback-ticket-summary { position: relative; min-height: 76px; padding: 14px 30px; }
.feedback-record-cell { min-width: 0; }
.feedback-record-cell > small { display: none; }
.feedback-record-date time { color: var(--ink); font-size: .76rem; font-weight: 600; }
.feedback-record-title h3 { margin: 0; color: var(--ink); font-size: .84rem; line-height: 1.35; overflow-wrap: anywhere; }
.feedback-record-title h3 a { color: var(--ink); }
.feedback-record-title h3 a:hover { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.feedback-record-title > span { display: block; margin-top: 3px; color: var(--muted); font-size: .63rem; }
.feedback-record-priority { justify-self: start; }
.feedback-record-status { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.feedback-record-status > span { display: grid; justify-items: start; }
.feedback-record-status > span > small { display: none; }
.feedback-ticket-tags { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.feedback-scope-production { color: var(--white); background: var(--deep-teal); }
.feedback-scope-local { color: var(--muted); background: var(--paper); border: 1px solid var(--line); }
.feedback-priority-low { color: var(--muted); background: #edf1f0; }
.feedback-priority-medium { color: #745f25; background: #f3ecd6; }
.feedback-priority-high { color: #8f3f35; background: #f8e6e3; }
.feedback-ticket-conversation { padding: 2px 30px 30px; border-top: 1px solid var(--line); }
.feedback-conversation-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-top: 24px; }
.feedback-conversation-heading .eyebrow, .feedback-conversation-heading h2 { margin-bottom: 0; }
.feedback-conversation-heading small { font-size: .68rem; }
.feedback-detail-back { display: inline-flex; margin-bottom: 20px; color: var(--teal-dark); font-size: .76rem; font-weight: 700; }
.feedback-detail-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.feedback-detail-heading h1 { max-width: 900px; margin-bottom: 8px; font-size: clamp(1.7rem, 3vw, 2.7rem); }
.feedback-detail-heading p:last-child { margin: 0; color: var(--muted); font-size: .76rem; }
.feedback-detail-tags { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.feedback-detail-card { padding: 0; overflow: hidden; }
.feedback-detail-conversation { padding: 2px 30px 30px; border-top: 0; }
.feedback-form-heading { display: flex; align-items: center; gap: 13px; padding: 22px; }
.feedback-form-heading strong, .feedback-form-heading small { display: block; }
.feedback-avatar { color: var(--white); background: var(--teal); }
.feedback-status-submitted { color: #745f25; background: #f3ecd6; }
.feedback-status-ready-for-development { color: #58457a; background: #ece5f7; }
.feedback-status-in-progress { color: #235e79; background: #dfeff6; }
.feedback-status-completed { color: #176661; background: #ddf1ef; }
.feedback-status-cancelled { color: #7b3c32; background: #f8e6e3; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.attachment-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; color: var(--deep-teal); background: var(--mint-pale); border-radius: 8px; font-size: .76rem; font-weight: 600; }
.attachment-chip small { display: inline; font-size: .66rem; }
.feedback-attachment-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 260px)); gap: 10px; margin: 16px 0 4px; }
.feedback-attachment-gallery > .attachment-chip { align-self: start; justify-self: start; }
.feedback-image-attachment { display: grid; overflow: hidden; color: var(--deep-teal); background: var(--white); border: 1px solid var(--line); border-radius: 10px; cursor: zoom-in; font-size: .72rem; font-weight: 600; }
.feedback-image-attachment:hover { border-color: var(--teal); box-shadow: 0 5px 18px rgba(1, 64, 68, .1); }
.feedback-image-attachment img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--paper); }
.feedback-image-attachment span { padding: 8px 10px; overflow-wrap: anywhere; }
.feedback-image-attachment small { display: inline; margin-left: 4px; font-size: .62rem; font-weight: 400; }
.feedback-thread { display: grid; gap: 12px; margin-top: 18px; }
.feedback-thread-message { padding: 16px 18px; background: var(--paper); border-left: 3px solid var(--line); border-radius: 12px; }
.feedback-thread-message.is-original { border-left-color: var(--teal); }
.feedback-thread-message.is-developer { background: var(--mint-pale); border-left-color: var(--teal-dark); }
.feedback-thread-message header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 8px; }
.feedback-thread-author { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.feedback-thread-author strong { color: var(--ink); font-size: .82rem; }
.feedback-thread-author span { padding: 3px 7px; color: var(--deep-teal); background: var(--white); border: 1px solid rgba(44,143,142,.22); border-radius: 999px; font-size: .61rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.feedback-thread-message time { color: var(--muted); font-size: .68rem; white-space: nowrap; }
.feedback-message-timing { display: grid; justify-items: end; gap: 3px; color: var(--muted); text-align: right; }
.feedback-message-timing small { font-size: .62rem; }
.feedback-message-timing small time { font-size: inherit; }
.feedback-thread-message p { margin-bottom: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-thread-empty { margin: 0; color: var(--muted); font-size: .78rem; font-style: italic; }
.feedback-comment-editor { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(44,143,142,.18); }
.feedback-comment-editor > summary { width: fit-content; margin-left: auto; color: var(--teal-dark); font-size: .68rem; font-weight: 700; list-style: none; }
.feedback-comment-editor > summary::-webkit-details-marker { display: none; }
.feedback-comment-editor > summary::before { margin-right: 5px; content: "✎"; }
.feedback-comment-editor[open] > summary { color: var(--muted); }
.feedback-comment-editor form { gap: 10px; margin-top: 10px; }
.feedback-comment-editor textarea { width: 100%; min-height: 96px; padding: 12px 13px; resize: vertical; border: 1px solid #cbd8d6; border-radius: 9px; background: var(--white); }
.feedback-comment-editor-actions { display: flex; justify-content: flex-end; gap: 9px; }
.feedback-comment-editor-actions .button { min-height: 38px; padding: 8px 14px; }
.feedback-thread-actions { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.feedback-reply-form { gap: 14px; }
.feedback-reply-fields { display: grid; gap: 12px; min-width: 0; }
.feedback-reply-actions { display: flex; justify-content: flex-end; }
.feedback-production-note { padding: 11px 13px; color: var(--teal-dark); background: var(--mint-pale); border-radius: 8px; }
.feedback-developer-instructions { margin-top: 20px; padding: 0; overflow: hidden; border: 1px dashed rgba(0,62,70,.3); border-radius: 10px; background: #f7faf9; }
.feedback-developer-instructions summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; color: var(--deep-teal); cursor: pointer; font-size: .76rem; font-weight: 700; }
.feedback-developer-instructions summary small { color: var(--muted); font-size: .63rem; font-weight: 500; }
.feedback-developer-instructions[data-has-instructions] summary::after { width: 7px; height: 7px; margin-left: auto; content: ""; background: var(--teal); border-radius: 50%; }
.feedback-developer-instructions form, .feedback-developer-instructions > p { margin: 0; padding: 15px; border-top: 1px solid var(--line); }
.feedback-developer-instructions > p { color: var(--ink); font-size: .76rem; white-space: pre-wrap; }
.feedback-developer-instructions-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.feedback-developer-instructions-actions small { color: var(--muted); font-size: .67rem; }
.feedback-comment-attachment-field input { padding: 9px 11px; background: var(--white); }
.feedback-management { margin-top: 20px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.feedback-management-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.feedback-management-heading strong { color: var(--deep-teal); font-size: .78rem; }
.feedback-management-heading small { color: var(--muted); font-size: .66rem; }
.feedback-management-actions { display: grid; gap: 14px; padding: 16px; }
.feedback-status-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, 560px); }
.feedback-publish-form { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.feedback-publish-form strong, .feedback-publish-form small, .feedback-publish-complete strong, .feedback-publish-complete small { display: block; }
.feedback-publish-form strong, .feedback-publish-complete strong { color: var(--deep-teal); font-size: .76rem; }
.feedback-publish-form small, .feedback-publish-complete small { max-width: 660px; margin-top: 3px; color: var(--muted); font-size: .67rem; }
.feedback-publish-form .button { flex: 0 0 auto; white-space: nowrap; }
.feedback-publish-complete { padding: 13px 14px; color: var(--deep-teal); background: var(--mint-pale); border-radius: 9px; }
.feedback-delete-form { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.feedback-delete-form strong, .feedback-delete-form small { display: block; }
.feedback-delete-form strong { color: #8f3f35; font-size: .76rem; }
.feedback-delete-form small { max-width: 660px; margin-top: 3px; color: var(--muted); font-size: .67rem; }
.feedback-delete-form .button { flex: 0 0 auto; white-space: nowrap; }
.feedback-detail-card.is-cancelled { box-shadow: inset 4px 0 var(--coral), var(--shadow); }
.is-cancelled .feedback-thread-message.is-original { border-left-color: var(--coral); }
.feedback-closed-note { margin: 22px 0 0; padding: 14px 16px; color: var(--muted); background: var(--paper); border-radius: 9px; font-size: .75rem; }
.feedback-modal { width: min(760px, calc(100% - 32px)); max-height: min(860px, calc(100vh - 40px)); padding: 0; overflow: hidden; background: var(--white); border: 0; border-radius: 20px; box-shadow: 0 30px 90px rgba(1,26,29,.28); }
.feedback-modal::backdrop { background: rgba(1,26,29,.56); backdrop-filter: blur(4px); }
.feedback-modal-shell { max-height: min(860px, calc(100vh - 40px)); overflow-y: auto; }
.feedback-modal .feedback-form-heading { position: sticky; z-index: 2; top: 0; padding: 24px 28px; background: var(--white); border-bottom: 1px solid var(--line); }
.feedback-modal-close { display: grid; place-items: center; margin-left: auto; width: 38px; height: 38px; color: var(--muted); background: var(--paper); border: 0; border-radius: 50%; font-size: 1.35rem; }
.feedback-modal-form { padding: 26px 28px 30px; }
.feedback-sync-warning { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 18px; margin-bottom: 16px; }
.feedback-sync-warning strong, .feedback-sync-warning span { display: block; }
.feedback-sync-warning span { color: var(--muted); font-size: .74rem; }
.feedback-sync-warning a { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: .74rem; font-weight: 700; }
.feedback-local-notice { margin: 0; }
.feedback-local-notice strong, .feedback-local-notice span { display: block; }
.feedback-local-notice span { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.feedback-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.feedback-image-modal { width: min(1200px, calc(100% - 32px)); max-width: none; height: min(900px, calc(100vh - 32px)); max-height: none; padding: 0; overflow: hidden; background: #f5f8f7; border: 0; border-radius: 16px; box-shadow: 0 30px 90px rgba(1,26,29,.34); }
.feedback-image-modal::backdrop { background: rgba(1,26,29,.76); backdrop-filter: blur(5px); }
.feedback-image-modal-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.feedback-image-modal header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 16px 13px 20px; background: var(--white); border-bottom: 1px solid var(--line); }
.feedback-image-modal header strong { min-width: 0; overflow: hidden; color: var(--ink); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.feedback-image-modal-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.feedback-image-modal-actions a, .feedback-image-modal-actions button { display: grid; place-items: center; width: 40px; height: 40px; color: var(--deep-teal); background: var(--paper); border: 1px solid var(--line); border-radius: 9px; }
.feedback-image-modal-actions a:hover, .feedback-image-modal-actions button:hover { color: var(--white); background: var(--deep-teal); }
.feedback-image-modal-actions svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.feedback-image-modal-actions button { padding: 0; font-size: 1.45rem; line-height: 1; }
.feedback-image-modal-stage { display: grid; place-items: center; min-height: 0; padding: 18px; overflow: auto; }
.feedback-image-modal-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 35px rgba(1,26,29,.15); }
.support-faq { margin-top: 34px; }
.faq-category-list { display: grid; gap: 30px; }
.faq-category-heading { margin-bottom: 13px; }
.faq-category-heading h3 { margin: 0; color: var(--ink); font-size: 1.08rem; }
.faq-category-heading p { max-width: 760px; margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.faq-list { display: grid; gap: 12px; }
.faq-list .panel { padding: 0; }
.faq-list summary { padding: 18px 22px; color: var(--deep-teal); font-weight: 700; cursor: pointer; }
.faq-list > p { margin: 0; padding: 0 22px 20px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.faq-answer { padding: 0 22px 20px; color: var(--muted); overflow-wrap: anywhere; }
.faq-answer > :first-child { margin-top: 0; }
.faq-answer > :last-child { margin-bottom: 0; }
.faq-answer p { margin: 0 0 11px; }
.faq-answer ol, .faq-answer ul { margin: 0 0 13px; padding-left: 24px; }
.faq-answer li + li { margin-top: 8px; }
.faq-answer a { color: var(--teal-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.faq-admin-list { display: grid; gap: 20px; }
.faq-admin-category { padding: 0; overflow: visible; }
.faq-admin-category-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.faq-admin-category-header > div:first-child { min-width: 0; }
.faq-admin-category-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.faq-admin-category-title h3 { margin: 0; color: var(--ink); font-size: 1.15rem; overflow-wrap: anywhere; }
.faq-admin-category-header p { max-width: 760px; margin: 6px 0 0; font-size: .77rem; }
.faq-admin-category-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 14px; }
.faq-admin-category-actions .danger-button,
.faq-admin-delete-entry .danger-button { color: #a64134; }
.faq-admin-category-actions .danger-button:hover,
.faq-admin-delete-entry .danger-button:hover { color: #7b2e25; }
.faq-admin-category-body { padding: 22px 26px 26px; }
.faq-admin-entry-list { display: grid; gap: 10px; }
.faq-admin-entry { overflow: hidden; background: #fbfdfc; border: 1px solid var(--line); border-radius: 11px; }
.faq-admin-entry > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; color: var(--ink); font-size: .82rem; font-weight: 700; list-style: none; cursor: pointer; }
.faq-admin-entry > summary::-webkit-details-marker { display: none; }
.faq-admin-entry > summary small { flex: 0 0 auto; color: var(--teal-dark); font-size: .67rem; }
.faq-admin-entry[open] > summary { color: var(--deep-teal); background: var(--mint-pale); }
.faq-admin-entry-editor { padding: 20px; border-top: 1px solid var(--line); }
.faq-admin-entry-answer { margin: 0 0 20px; padding: 15px 16px; color: var(--muted); background: var(--paper); border-radius: 9px; font-size: .78rem; overflow-wrap: anywhere; }
.faq-admin-entry-actions { display: flex; justify-content: flex-end; }
.faq-admin-delete-entry { margin-top: 12px; text-align: right; }
.faq-admin-add-entry { margin-top: 16px; }
.faq-admin-add-entry > summary { width: fit-content; list-style: none; }
.faq-admin-add-entry > summary::-webkit-details-marker { display: none; }
.faq-admin-add-entry-form { margin-top: 14px; padding: 20px; background: var(--mint-pale); border: 1px solid var(--mint); border-radius: 11px; }
.sample-data-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.sample-data-total { display: grid; flex: 0 0 auto; justify-items: end; }
.sample-data-total strong { color: var(--deep-teal); font-size: 2rem; line-height: 1; }
.sample-data-total span { margin-top: 5px; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sample-data-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 20px; padding: 0; overflow: hidden; background: var(--line); }
.sample-data-status div { display: grid; gap: 5px; padding: 18px 20px; background: var(--white); }
.sample-data-status small { font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; }
.sample-data-status strong { color: var(--deep-teal); font-size: .78rem; }
.sample-data-form { gap: 22px; }
.sample-data-form-heading h3, .sample-data-form-heading p { margin-bottom: 0; }
.sample-data-form-heading p { margin-top: 4px; font-size: .78rem; }
.sample-data-count-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sample-data-count-card { display: grid; grid-template-columns: minmax(0, 1fr) 82px; align-items: center; gap: 12px; padding: 13px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; }
.sample-data-count-card span, .sample-data-count-card strong, .sample-data-count-card small { display: block; }
.sample-data-count-card strong { font-size: .76rem; }
.sample-data-count-card small { margin-top: 3px; font-size: .62rem; font-weight: 400; }
.sample-data-count-card input { min-height: 40px; padding: 8px; text-align: right; }
.sample-data-guidance { padding: 15px 17px; color: var(--teal-dark); background: var(--mint-pale); border-radius: 9px; }
.sample-data-guidance strong, .sample-data-guidance p { margin: 0; }
.sample-data-guidance p { margin-top: 4px; font-size: .74rem; }
.sample-data-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.sample-data-actions small { max-width: 470px; text-align: right; }
.sample-data-clear { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 20px; border-color: #e8c5bf; }
.sample-data-clear h3, .sample-data-clear p { margin: 0; }
.sample-data-clear p { margin-top: 4px; font-size: .76rem; }
.sample-data-clear .danger-button:disabled { opacity: .45; cursor: not-allowed; }
.sync-page-heading { display: flex; align-items: flex-end; justify-content: space-between; max-width: none; gap: 24px; }
.sync-page-heading > div { max-width: 900px; }
.sync-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 24px; padding: 26px; }
.sync-toolbar h2 { margin-bottom: 5px; font-size: 1.15rem; overflow-wrap: anywhere; }
.sync-toolbar p:last-child { max-width: 820px; margin: 0; color: var(--muted); font-size: .78rem; }
.sync-toolbar-actions, .sync-operation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sync-toolbar-actions form, .sync-operation-actions form { margin: 0; }
.sync-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.sync-stat-grid .panel { display: grid; gap: 5px; min-height: 104px; padding: 20px; }
.sync-stat-grid small { color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sync-stat-grid strong { color: var(--deep-teal); font-size: 1.15rem; overflow-wrap: anywhere; }
.sync-outbox, .sync-audit { margin-bottom: 34px; padding: 26px; }
.sync-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.sync-operation { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.sync-operation > div:first-child { min-width: 0; }
.sync-operation strong, .sync-operation small { display: block; }
.sync-operation small { margin-top: 3px; color: var(--muted); }
.sync-operation p { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sync-operation-conflict { margin-inline: -12px; padding-inline: 12px; background: #fff7e3; border-radius: 10px; }
.sync-operation-error { color: #8b372d; font-weight: 600; }
.sync-feedback-list { display: grid; gap: 13px; }
.sync-feedback-list > .section-heading { margin-bottom: 5px; }
.sync-feedback-ticket { padding: 0; overflow: hidden; }
.sync-feedback-ticket > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 24px; list-style: none; cursor: pointer; }
.sync-feedback-ticket > summary::-webkit-details-marker { display: none; }
.sync-feedback-ticket > summary h3 { margin-bottom: 3px; font-size: 1rem; }
.sync-feedback-ticket > summary small { color: var(--muted); }
.sync-feedback-ticket[open] > summary { background: var(--mint-pale); border-bottom: 1px solid var(--line); }
.sync-feedback-body { display: grid; gap: 22px; padding: 24px; }
.sync-queue-form { grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(2, minmax(150px, .25fr)) auto; align-items: end; padding-top: 22px; border-top: 1px solid var(--line); }
.sync-audit-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; border-top: 1px solid var(--line); }
.sync-audit-row strong, .sync-audit-row small { display: block; }
.sync-audit-row small, .sync-audit-row > span { color: var(--muted); font-size: .7rem; }
.sync-disabled { max-width: 760px; padding: 36px; }

.about-overview { margin: 0; }
.permission-table-wrap { max-width: none; }
.permission-table th:first-child { width: 30%; }
.permission-table th:not(:first-child), .permission-table td:not(:first-child) { text-align: center; }
.permission-table td { vertical-align: middle; }
.permission-table td:first-child small { max-width: 300px; }
.permission-yes, .permission-limited, .permission-no { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 5px 9px; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.permission-yes { color: #176661; background: #ddf1ef; }
.permission-limited { color: #745f25; background: #f3ecd6; }
.permission-no { color: var(--muted); background: var(--paper); }
.role-guide { max-width: none; }
.role-tabs { position: static; margin: 0 0 24px; }
.role-tabs a { flex: 1; justify-content: center; text-align: center; }
.role-panel { max-width: none; min-height: 390px; }
.role-panel-header { display: flex; align-items: flex-start; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.role-panel-header h2 { margin-bottom: 5px; }
.role-panel-header p:last-child { max-width: 700px; margin-bottom: 0; color: var(--muted); }
.role-icon { display: grid; place-items: center; flex: 0 0 auto; width: 56px; height: 56px; color: var(--deep-teal); background: var(--mint-pale); border-radius: 16px; font-size: 1.5rem; font-weight: 700; }
.role-detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: start; gap: 32px; padding-top: 28px; }
.role-detail-grid h3 { margin-bottom: 14px; font-size: .88rem; }
.capability-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.capability-list li { position: relative; padding-left: 28px; }
.capability-list li::before { position: absolute; top: 1px; left: 0; display: grid; place-items: center; width: 19px; height: 19px; content: "✓"; color: var(--white); background: var(--teal); border-radius: 50%; font-size: .65rem; font-weight: 700; }
.role-boundary { padding: 20px; color: var(--deep-teal); background: var(--mint-pale); border-left: 3px solid var(--teal); border-radius: 12px; }
.role-boundary p { margin-bottom: 0; font-size: .8rem; }

.auth-shell { width: 100%; min-height: 100vh; padding: 0; }
.login-page { min-height: 100vh; background: var(--deep-teal); }
.login-card { display: grid; grid-template-columns: minmax(390px, 1.2fr) minmax(380px, .8fr); min-height: 100vh; }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(48px, 8vw, 110px); overflow: hidden; color: var(--white); background: var(--deep-teal); }
.login-brand::before, .login-brand::after { position: absolute; content: ""; border: 1px solid rgba(129,200,199,.27); transform: rotate(45deg); }
.login-brand::before { top: -20vw; left: -10vw; width: 56vw; height: 56vw; }
.login-brand::after { top: -5vw; left: 18vw; width: 32vw; height: 32vw; }
.login-brand img { position: absolute; z-index: 1; top: 55px; left: clamp(48px, 8vw, 110px); width: 260px; height: 110px; object-fit: contain; }
.login-brand > * { position: relative; z-index: 1; }
.login-brand .eyebrow { color: var(--mint); }
.login-brand h1 { max-width: 700px; font-size: clamp(4rem, 9vw, 8.5rem); }
.login-brand > p:last-child { max-width: 650px; color: var(--mint); font-size: clamp(1rem, 1.5vw, 1.3rem); }
.login-form { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(40px, 7vw, 95px); background: var(--white); }
.login-form label { display: grid; gap: 8px; font-size: .8rem; font-weight: 600; }
.login-form input { min-height: 54px; padding: 13px 15px; border: 1px solid #cbd8d6; border-radius: 9px; }
.login-status-stack { display: grid; gap: 10px; width: min(520px, 100%); }
.login-status { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 12px; padding: 15px 16px; background: var(--mint-pale); border: 1px solid rgba(44,143,142,.28); border-radius: 12px; }
.login-status-error, .login-status-access-declined { background: #fff5f3; border-color: rgba(198,92,75,.3); }
.login-status-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--deep-teal); background: var(--white); border: 1px solid rgba(44,143,142,.25); border-radius: 50%; }
.login-status-error .login-status-icon, .login-status-access-declined .login-status-icon { color: var(--coral); border-color: rgba(198,92,75,.28); }
.login-status-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-status > div > strong { display: block; margin-top: 1px; font-size: .84rem; }
.login-status p { margin: 3px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.55; }
.login-method-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.login-method-tabs button { min-height: 45px; padding: 9px 14px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.login-method-tabs button[aria-selected="true"] { color: var(--white); background: var(--deep-teal); box-shadow: 0 4px 12px rgba(1,26,29,.14); }
.login-method-tabs button:focus-visible { outline: 3px solid rgba(44,143,142,.28); outline-offset: 2px; }
.login-method-panel { min-height: 220px; }
.email-login-form { display: grid; gap: 18px; }
.google-sign-in-wrap { display: grid; justify-items: center; gap: 9px; }
.google-sign-in-wrap > div { max-width: 100%; }
.google-sign-in-wrap .g_id_signin:empty { display: grid; place-items: center; width: min(400px, 100%); min-height: 44px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; font-size: .76rem; }
.google-sign-in-wrap .g_id_signin:empty::before { content: "Loading Google Login…"; }
.access-review-form { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.access-review-form select { min-width: 180px; min-height: 38px; padding: 7px 30px 7px 9px; }
.google-auth-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 24px; padding: 0; overflow: hidden; }
.google-auth-status > div { display: grid; gap: 5px; padding: 20px; background: var(--white); }
.google-auth-status small, .google-auth-guidance small { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.google-auth-form { gap: 24px; }
.email-notification-form { gap: 22px; margin-bottom: 24px; }
.email-notification-form fieldset { display: grid; gap: 14px; }
.email-notification-log { padding: 24px; }
.settings-toggle { display: grid !important; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px !important; padding: 18px 20px; color: var(--deep-teal); background: var(--mint-pale); border: 1px solid rgba(44,143,142,.3); border-radius: 12px; cursor: pointer; }
.settings-toggle input { width: 22px; min-height: 22px; accent-color: var(--teal); }
.settings-toggle strong, .settings-toggle small { display: block; }
.settings-toggle small { margin-top: 3px; color: var(--muted); font-size: .72rem; font-weight: 400; }
.google-auth-form fieldset { display: grid; gap: 12px; }
.google-auth-form input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; }
.google-auth-setup { display: grid; gap: 12px; }
.google-auth-setup .section-heading { margin-bottom: 0; }
.google-auth-config-table code, .google-auth-shared-table code { overflow-wrap: anywhere; font-size: .75rem; }
.google-auth-config-table td:first-child, .google-auth-shared-table td:first-child { width: 24%; }
.google-auth-config-table td small { display: block; max-width: 520px; color: var(--muted); line-height: 1.45; }
.google-auth-guidance { display: grid; gap: 12px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.google-auth-guidance > div { display: grid; gap: 5px; }
.google-auth-guidance code { overflow-wrap: anywhere; }
.google-auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.google-auth-actions small { color: var(--muted); }
.google-auth-build-settings dl { display: grid; gap: 9px; margin: 12px 0 0; }
.google-auth-build-settings dl div { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1fr); gap: 16px; }
.google-auth-build-settings dt, .google-auth-build-settings dd { margin: 0; }
.google-auth-build-settings dd { font-size: .8rem; }
.google-auth-reference-links { margin: 0; color: var(--muted); font-size: .76rem; }
.google-auth-reference-links a { font-weight: 700; }

.mobile-nav { display: none; }

@media (max-width: 1350px) {
  .app-header { grid-template-columns: 1fr auto; }
  .desktop-nav { order: 3; grid-column: 1 / -1; justify-content: center; margin: 8px -30px -12px; padding: 5px 20px; background: rgba(0,0,0,.13); }
  .user-menu { grid-column: 2; grid-row: 1; }
  .page-shell { padding-top: 48px; }
  .utility-page .page-shell { padding-top: 30px; }
  .utility-sidebar { top: 148px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .trend-grid { grid-template-columns: repeat(2, 1fr); }
  .event-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-choir-grid, .report-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  .utility-layout { grid-template-columns: 1fr; gap: 24px; }
  .utility-sidebar { position: static; grid-column: auto; grid-row: auto; display: grid; grid-template-columns: minmax(190px, .35fr) minmax(0, 1fr); align-items: end; gap: 24px; padding: 0 0 20px; border-bottom: 1px solid var(--line); border-left: 0; }
  .utility-workspace { grid-column: auto; grid-row: auto; }
  .chat-composer-dock { right: 24px; left: 24px; }
  .utility-heading { margin: 0; }
  .utility-section-nav { display: flex; overflow-x: auto; }
  .utility-section-nav a { justify-content: center; width: auto; flex: 1 0 auto; }
  .utility-section-nav span { margin-left: 5px; }
  .sample-data-count-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --header-height: 70px; }
  body { padding-bottom: 72px; }
  .app-header { min-height: var(--header-height); padding: 8px 18px; }
  .brand-lockup img { width: 138px; height: 48px; }
  .brand-lockup span, .desktop-nav, .user-account-link, .user-account-label { display: none; }
  .text-button { padding: 9px; }
  .page-shell { width: min(100% - 28px, 680px); min-height: calc(100vh - var(--header-height)); padding: 30px 0 45px; }
  .utility-page .page-shell { padding-top: 20px; }
  .utility-layout { gap: 20px; }
  .utility-sidebar { grid-template-columns: 1fr; align-items: stretch; gap: 16px; padding-bottom: 16px; }
  .utility-heading h1 { font-size: 1.65rem; }
  .utility-heading > p:last-child { font-size: .72rem; }
  .utility-sidebar .utility-section-nav { margin: 0; padding: 5px; }
  .utility-section-nav a { min-height: 40px; padding-inline: 13px; }
  .page-heading { margin-bottom: 28px; }
  .heading-with-action { align-items: flex-start; flex-direction: column; }
  .heading-with-action .button { width: 100%; }
  .section-heading-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .list-control-bar { grid-template-columns: 1fr; }
  .admin-mobile-sort { display: grid !important; }
  .parent-singer-photo-list article { grid-template-columns: auto 1fr; }
  .parent-singer-photo-list article form { grid-column: 1 / -1; }
  .absence-request-detail-card { grid-template-columns: 1fr; }
  .absence-request-detail-card > div:nth-child(odd):not(.absence-request-detail-reason) { border-right: 0; }
  .stat-grid, .dashboard-grid, .dashboard-choir-grid, .event-card-grid, .two-column-layout, .communications-layout, .trend-grid, .choir-grid, .choir-detail-layout, .account-edit-layout { grid-template-columns: 1fr; }
  .stat-card { min-height: 112px; }
  .form-panel { position: static; }
  .event-card { min-height: 315px; }
  .field-pair, .checkbox-grid { grid-template-columns: 1fr; }
  .support-chat { padding-bottom: 190px; }
  .chat-feed { min-height: 360px; padding: 16px; }
  .chat-message { max-width: 90%; }
  .chat-composer-dock { right: 14px; bottom: calc(66px + env(safe-area-inset-bottom)); left: 14px; }
  .chat-composer { grid-template-columns: 1fr; }
  .chat-composer .button { width: 100%; }
  .support-panel-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .support-panel-heading .button { width: 100%; }
  .sample-data-heading, .sample-data-actions, .sample-data-clear { align-items: flex-start; flex-direction: column; }
  .sample-data-total { justify-items: start; }
  .sample-data-status, .sample-data-count-grid { grid-template-columns: 1fr; }
  .google-auth-status { grid-template-columns: 1fr; }
  .google-auth-actions { align-items: stretch; flex-direction: column; }
  .google-auth-actions .button { width: 100%; }
  .google-auth-build-settings dl div { grid-template-columns: 1fr; gap: 3px; }
  .impersonation-banner { align-items: stretch; flex-direction: column; gap: 8px; }
  .impersonation-banner .button { width: 100%; }
  .account-heading-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .account-heading-actions .button { width: 100%; }
  .login-as-history-row { grid-template-columns: 1fr; gap: 8px; }
  .login-as-history-row > div:last-child { text-align: left; }
  .sample-data-actions .button, .sample-data-clear form, .sample-data-clear .danger-button { width: 100%; }
  .sample-data-actions small { text-align: left; }
  .feedback-workspace-heading button { width: 100%; }
  .feedback-inbox-toolbar { grid-template-columns: 1fr; padding: 16px; }
  .feedback-filter { grid-template-columns: auto minmax(0, 1fr); }
  .feedback-list-header { display: none; }
  .feedback-ticket-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; padding: 18px; }
  .feedback-record-cell > small, .feedback-record-status > span > small { display: block; margin-bottom: 5px; color: var(--muted); font-size: .58rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .feedback-record-title { grid-column: 1 / -1; grid-row: 1; }
  .feedback-record-title > small { display: none; }
  .feedback-record-title h3 { font-size: .92rem; }
  .feedback-record-date { grid-column: 1; }
  .feedback-record-priority { grid-column: 2; justify-self: start; }
  .feedback-record-status { grid-column: 1 / -1; }
  .feedback-ticket-tags { justify-content: flex-start; }
  .feedback-ticket-conversation { padding: 2px 18px 22px; }
  .feedback-detail-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .feedback-detail-tags { justify-content: flex-start; }
  .feedback-conversation-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .feedback-developer-instructions-actions { align-items: stretch; flex-direction: column; }
  .feedback-publish-form, .feedback-delete-form, .feedback-management-heading { align-items: stretch; flex-direction: column; }
  .feedback-status-form { grid-template-columns: 1fr; }
  .feedback-publish-form .button, .feedback-delete-form .button { width: 100%; }
  .feedback-thread-message header { flex-direction: column; gap: 5px; }
  .feedback-attachment-gallery { grid-template-columns: 1fr; }
  .feedback-message-timing { justify-items: start; text-align: left; }
  .feedback-comment-editor-actions { flex-direction: column-reverse; }
  .feedback-comment-editor-actions .button { width: 100%; }
  .feedback-modal { width: calc(100% - 20px); max-height: calc(100vh - 20px); }
  .feedback-modal-shell { max-height: calc(100vh - 20px); }
  .feedback-modal .feedback-form-heading, .feedback-modal-form { padding-right: 20px; padding-left: 20px; }
  .feedback-modal-actions { flex-direction: column-reverse; }
  .feedback-modal-actions .button { width: 100%; }
  .feedback-image-modal { width: calc(100% - 16px); height: calc(100vh - 16px); }
  .feedback-image-modal header { padding: 10px 10px 10px 14px; }
  .feedback-image-modal-stage { padding: 8px; }
  .feedback-sync-warning { grid-template-columns: 1fr; }
  .feedback-sync-warning a { grid-column: auto; grid-row: auto; margin-top: 7px; }
  .report-summary-grid, .choir-singer-contact { grid-template-columns: 1fr; }
  .report-grid-heading { align-items: flex-start; flex-direction: column; }
  .report-grid-heading .button { width: 100%; }
  .faq-admin-category-header { flex-direction: column; padding: 20px; }
  .faq-admin-category-actions { width: 100%; flex-wrap: wrap; }
  .faq-admin-category-actions .popover-form { flex: 1 1 180px; }
  .faq-admin-category-actions .chip-button { width: 100%; }
  .faq-admin-category-body { padding: 18px 20px 20px; }
  .faq-admin-entry > summary { align-items: flex-start; flex-direction: column; gap: 6px; }
  .faq-admin-entry-editor { padding: 16px; }
  .faq-admin-entry-actions .button { width: 100%; }
  .faq-admin-add-entry > summary { width: 100%; }
  .role-detail-grid { grid-template-columns: 1fr; }
  .sync-page-heading, .sync-toolbar, .sync-section-heading, .sync-operation, .sync-feedback-ticket > summary, .sync-audit-row { align-items: flex-start; flex-direction: column; }
  .sync-stat-grid, .sync-queue-form { grid-template-columns: 1fr; }
  .sync-toolbar-actions, .sync-operation-actions, .sync-toolbar-actions form, .sync-operation-actions form, .sync-toolbar-actions .button, .sync-operation-actions .button, .sync-queue-form .button { width: 100%; }
  .role-panel { min-height: 0; }
  .role-panel-header { gap: 14px; }
  .permission-table th:not(:first-child), .permission-table td:not(:first-child) { text-align: left; }
  .section-tabs { top: var(--header-height); margin-top: -10px; }
  .section-tabs a { flex: 0 0 auto; min-height: 44px; padding-inline: 14px; }
  .account-detail-layout { grid-template-columns: 1fr; }
  .account-detail-heading { align-items: flex-start; }
  .account-access-heading, .singer-search-summary { align-items: flex-start; }
  .linked-singer-card, .singer-search-result { align-items: flex-start; flex-direction: column; }
  .linked-singer-card form, .singer-search-result form, .linked-singer-card button, .singer-search-result button { width: 100%; }
  .account-search-form > div { grid-template-columns: 1fr; }
  .account-search-form .button { width: 100%; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar label:first-child, .filter-bar .button { grid-column: 1 / -1; }
  .list-card { grid-template-columns: 1fr auto; }
  .list-card > div { grid-column: 1 / -1; grid-row: 2; }
  .responsive-table { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; clip: rect(0 0 0 0); overflow: hidden; }
  tbody { display: grid; gap: 14px; }
  tr { padding: 10px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
  td { display: grid; grid-template-columns: 100px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
  td:first-child { border-top: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  td[colspan] { display: block; }
  .choir-table-actions { min-width: 0; }
  .admin-table-actions { min-width: 0; }
  .choir-term-dates { min-width: 0; }
  .popover-form { width: 100%; }
  .popover-form > summary { width: 100%; }
  .form-popover { position: fixed; inset: auto 14px 86px; width: auto; max-height: calc(100vh - 120px); }
  .mobile-nav { position: fixed; z-index: 80; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-around; min-height: 66px; padding: 7px max(10px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); background: rgba(0,62,70,.97); backdrop-filter: blur(14px); }
  .mobile-nav a { display: grid; place-items: center; gap: 0; color: rgba(255,255,255,.8); font-size: .57rem; text-transform: uppercase; }
  .mobile-nav a[aria-current="page"] { color: var(--white); }
  .mobile-nav span { font-size: 1.25rem; line-height: 1; }
  .login-card { grid-template-columns: 1fr; }
  .login-brand { min-height: 330px; padding: 36px 28px; }
  .login-brand img { top: 25px; left: 28px; width: 190px; height: 80px; }
  .login-brand h1 { margin-bottom: 6px; font-size: 3.6rem; }
  .login-form { padding: 38px 28px 60px; }
  .login-status { grid-template-columns: 32px minmax(0, 1fr); gap: 11px; padding: 13px 14px; }
  .login-status-icon { width: 32px; height: 32px; }
  .flash-stack { top: calc(var(--header-height) + 10px); right: 14px; width: calc(100% - 28px); }
}

@media (max-width: 760px) {
  .matrix-table { display: table; min-width: 760px; }
  .matrix-table thead { position: static; display: table-header-group; width: auto; height: auto; overflow: visible; clip: auto; }
  .matrix-table tbody { display: table-row-group; gap: 0; }
  .matrix-table tr { display: table-row; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  .matrix-table th, .matrix-table td { display: table-cell; grid-template-columns: none; gap: 0; padding: 12px; border-top: 1px solid var(--line); }
  .matrix-table td::before { display: none; content: none; }
}

@media (prefers-reduced-motion: reduce) {
  .app-progress span, button.is-processing::before { animation: none; }
  .app-progress span { width: 100%; transform: none; }
  .chat-loading-dots i { animation: none; opacity: .7; }
}
