:root {
  --ink: #143d2d;
  --ink-strong: #082d20;
  --muted: #557065;
  --surface: #ffffff;
  --surface-soft: #f4faf7;
  --line: #bfd7ca;
  --green: #0c8c52;
  --green-dark: #076b3e;
  --green-light: #d9f5e6;
  --yellow: #f4c84f;
  --yellow-dark: #795800;
  --crimson: #b4233a;
  --crimson-light: #fde6e9;
  --shadow: 0 12px 32px rgba(8, 61, 42, .1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef8f3;
  font-size: 18px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(160deg, #e4f7ed 0%, #f8fcfa 48%, #fff8dd 100%); color: var(--ink); line-height: 1.5; }
a { color: var(--green-dark); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 1000; background: var(--ink-strong); color: white; padding: .7rem 1rem; }
.skip-link:focus { top: 1rem; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem clamp(1rem, 4vw, 3rem); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink-strong); text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.brand-mark { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--green-light); color: var(--green-dark); }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .35rem; }
.main-nav a, .nav-button { min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; padding: .55rem .75rem; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); text-decoration: none; font-weight: 700; cursor: pointer; }
.main-nav a:hover, .main-nav a:focus-visible, .nav-button:hover { background: var(--surface-soft); border-color: var(--line); }
.main-nav svg, .button svg, .brand svg, .simple-card > svg, .flash svg { width: 1.15rem; height: 1.15rem; }
.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.4rem; }
h1, h2 { color: var(--ink-strong); line-height: 1.2; }
h1 { margin: 0 0 .5rem; font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: 1.25rem; }
p { margin-top: .35rem; }
.eyebrow { margin: 0 0 .25rem; color: var(--green-dark); font-size: .84rem; font-weight: 800; text-transform: uppercase; }
.lead { max-width: 42rem; font-size: 1.2rem; color: var(--muted); }
.welcome-band { min-height: min(660px, calc(100vh - 10rem)); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); align-items: center; gap: 3rem; }
.welcome-visual { display: grid; gap: .75rem; }
.welcome-visual div { display: grid; grid-template-columns: 3rem 1fr; column-gap: .8rem; align-items: center; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.welcome-visual svg { grid-row: span 2; width: 2.2rem; height: 2.2rem; color: var(--green); }
.welcome-visual strong, .welcome-visual span { grid-column: 2; min-width: 0; }
.welcome-visual span { color: var(--muted); font-size: .92rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1rem; border: 1px solid transparent; border-radius: 6px; font-weight: 800; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--green); color: white; box-shadow: 0 7px 18px rgba(12,140,82,.22); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { background: var(--surface-soft); color: var(--ink); border-color: var(--line); }
.button.danger { background: var(--crimson); color: white; }
.button.support, .support-nav { background: #ffdb72; color: #3f3500; border-color: #e6b933; box-shadow: 0 7px 18px rgba(194, 145, 0, .18); }
.button.support:hover, .support-nav:hover { background: var(--yellow); }
.button.small { min-height: 42px; padding: .45rem .75rem; font-size: .9rem; }
.button.full { width: 100%; }
.auth-layout { min-height: 68vh; display: grid; place-items: center; }
.auth-panel, .content-band, .form-band, .family-band { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.1rem, 3vw, 2rem); }
.auth-panel { width: min(100%, 480px); box-shadow: var(--shadow); }
.narrow { max-width: 740px; margin-inline: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.span-2 { grid-column: span 2; }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 750; }
.field input, .field select, .field textarea, .copy-box input { width: 100%; min-height: 48px; border: 1px solid #9bb7aa; border-radius: 6px; padding: .65rem .75rem; color: var(--ink-strong); background: white; }
.field textarea { min-height: 7rem; resize: vertical; }
.field select[multiple] { min-height: 10rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(12,140,82,.2); border-color: var(--green); }
.field-error { color: var(--crimson); font-weight: 700; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 3.2rem; }
.password-wrap .icon-button { position: absolute; top: 2px; right: 2px; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.icon-button:hover { background: var(--green-light); }
.check-field { display: flex; align-items: flex-start; gap: .55rem; margin: .75rem 0 1rem; font-weight: 650; }
.check-field input { width: 1.3rem; height: 1.3rem; flex: 0 0 auto; }
.text-link { display: inline-block; margin: .75rem 0; }
.notice { padding: .75rem; background: var(--green-light); border-left: 4px solid var(--green); }
.danger-notice { background: var(--crimson-light); border-color: var(--crimson); }
.flash-stack { position: fixed; z-index: 100; top: 4.8rem; left: 50%; width: min(720px, calc(100% - 1.5rem)); transform: translateX(-50%); display: grid; gap: .5rem; }
.flash { display: flex; align-items: center; gap: .7rem; min-height: 54px; padding: .55rem .65rem .55rem 1rem; border: 1px solid var(--line); border-radius: 6px; background: #e2f7eb; color: var(--green-dark); box-shadow: var(--shadow); font-weight: 700; }
.flash-error { background: var(--crimson-light); color: #83162a; border-color: #ee9cab; }
.flash-warning { background: #fff1c7; color: var(--yellow-dark); border-color: #edcf73; }
.flash span { flex: 1; }
.schedule-list, .notification-list { display: grid; gap: .7rem; }
.appointment-item, .notification-item { display: grid; grid-template-columns: 5rem 1fr auto; align-items: center; gap: 1rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: 6px; }
.appointment-item > time { display: grid; text-align: center; padding-right: 1rem; border-right: 1px solid var(--line); }
.appointment-main h2 { margin: 0; }
.appointment-main h2 a { color: var(--ink-strong); }
.participant-summary { display: flex; flex-wrap: wrap; gap: .35rem; }
.status-pill { display: inline-flex; padding: .2rem .45rem; border-radius: 999px; background: #edf2ef; font-size: .78rem; }
.status-confirmed { background: var(--green-light); color: var(--green-dark); }
.status-declined { background: var(--crimson-light); color: var(--crimson); }
.status-proposed_new_time { background: #fff1c7; color: var(--yellow-dark); }
.status-cancelled { opacity: .7; border-left-color: #9da9a3; }
.empty-state { min-height: 18rem; display: grid; place-items: center; align-content: center; gap: .4rem; text-align: center; padding: 2rem; background: var(--surface); border: 1px dashed var(--line); border-radius: 6px; }
.empty-state > svg { width: 3rem; height: 3rem; color: var(--green); }
.item-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.simple-card { padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.simple-card > svg { width: 2rem; height: 2rem; color: var(--green); }
.family-band { margin-bottom: 1rem; }
.section-title, .person-row, .proposal-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.people-list { display: grid; gap: .5rem; }
.person-row { padding: .7rem 0; border-top: 1px solid #e2ece7; }
.person-row > span:nth-child(2) { flex: 1; }
.person-row small { display: block; color: var(--muted); }
.avatar { width: 2.7rem; height: 2.7rem; display: grid; place-items: center; border-radius: 50%; background: var(--green-light); color: var(--green-dark); font-weight: 900; }
.copy-box { display: flex; gap: .5rem; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.proposal-row { padding: .8rem 0; border-top: 1px solid var(--line); }
.notification-item { grid-template-columns: auto 1fr auto; border-left-width: 1px; }
.notification-item.unread { border-left-width: 5px; background: #f7fffa; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: .75rem; text-align: left; border-bottom: 1px solid #e2ece7; }
th { background: #edf5f1; }
.pagination { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-top: 1rem; }
.qr-code { width: min(280px, 100%); border: 1px solid var(--line); }
.secret-code, .recovery-codes { display: block; padding: 1rem; background: #f1f5f3; overflow-wrap: anywhere; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; margin: 1rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.support-panel, .support-form { display: grid; gap: 1rem; }
.support-frequency { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0; padding: 0; border: 0; }
.support-frequency-option { display: flex; align-items: flex-start; gap: .65rem; padding: 1rem; border: 1px solid var(--line); border-radius: 6px; background: white; cursor: pointer; }
.support-frequency-option:has(input:checked) { border-color: var(--green); background: var(--green-light); }
.support-frequency-option span { display: grid; gap: .2rem; }
.support-frequency-option small { color: var(--muted); }
.support-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .65rem; }
.support-custom { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: .75rem; align-items: end; padding: 1rem; border: 1px dashed var(--line); border-radius: 6px; }
.support-custom .field { margin: 0; }
.support-notice { margin-bottom: 0; }
.support-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.support-kpis > div { display: grid; gap: .25rem; min-height: 100px; padding: 1rem; background: var(--green-light); border: 1px solid #8ed5af; border-radius: 6px; }
.support-kpis span { font-size: 1.3rem; color: var(--green-dark); }
.admin-section { margin-bottom: 1rem; }
.support-settings-form { align-items: end; }
.outcome-icon { width: 3rem; height: 3rem; }
.success-icon { color: var(--green); }
.warning-icon { color: var(--yellow-dark); }
.danger-icon { color: var(--crimson); }
.steps li { margin-bottom: .6rem; }
.prose { max-width: 840px; margin-inline: auto; }
footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; padding: 1.5rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.7); }
@media (max-width: 820px) {
  :root { font-size: 17px; }
  .topbar { position: static; align-items: flex-start; flex-direction: column; }
  .main-nav { width: 100%; justify-content: flex-start; }
  .main-nav a span, .nav-button span { display: none; }
  .main-nav a, .nav-button { width: 48px; justify-content: center; }
  .welcome-band, .two-columns { grid-template-columns: 1fr; }
  .support-frequency, .support-custom { grid-template-columns: 1fr; }
  .welcome-band { min-height: auto; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .appointment-item { grid-template-columns: 4rem 1fr; }
  .appointment-item > .icon-button { display: none; }
  .copy-box, .proposal-row { align-items: stretch; flex-direction: column; }
}
@media (max-width: 480px) {
  .page-shell { width: min(100% - 1rem, 1180px); padding-top: 1rem; }
  h1 { font-size: 2rem; }
  .auth-panel, .content-band, .form-band, .family-band { padding: 1rem; }
  .appointment-item { gap: .65rem; padding: .75rem; }
  .participant-summary { display: grid; }
  .button-row .button { width: 100%; }
  .recovery-codes { grid-template-columns: 1fr; }
}
