/* Scoped public auth presentation; no application behavior depends on this stylesheet. */
body:has(.auth-page) {
  background-color: #dcebdd;
  background:
    linear-gradient(118deg, rgba(236, 244, 235, .44) 0%, rgba(244, 247, 240, .33) 48%, rgba(211, 228, 210, .40) 100%),
    linear-gradient(180deg, rgba(23, 57, 31, .07), rgba(23, 57, 31, .14)),
    url("../images/auth-golf-course.jpg");
  background-position: center, center, 58% 52%;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Avoid a second action for the page the visitor is already completing. */
body:has(.auth-page-register) .header-actions a[href="/register"],
body:has(.auth-page-pending) .header-actions a[href="/login"] {
  display: none;
}

.auth-page {
  box-sizing: border-box;
  max-width: 46rem;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

.auth-page-wide { max-width: 62rem; }
.auth-page-dashboard { max-width: min(96vw, 92rem); }

.auth-card {
  box-sizing: border-box;
  width: 100%;
  background: #fff;
  border: 1px solid #d7e0d4;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(34, 62, 39, 0.13);
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.auth-card-compact { max-width: 30rem; margin: 0 auto; }

/* Stage 09 admin shell: static presentation only; no operational controls. */
.admin-shell { border-bottom: 1px solid #d7e0d4; margin-bottom: 1.25rem; padding-bottom: 1rem; }
.admin-shell-heading { min-width: 0; }
.admin-shell-kicker { color: #405144; font-size: .8rem; font-weight: 700; letter-spacing: .04em; margin: 0 0 .25rem; text-transform: uppercase; }
.admin-shell h1 { margin: 0; text-align: left; }
.admin-shell-subtitle { color: #405144; line-height: 1.4; margin: .35rem 0 0; }
.admin-shell-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: .85rem 0; }
.admin-shell-badge { background: #edf3ec; border: 1px solid #7ca184; border-radius: 999px; color: #205d36; font-size: .82rem; font-weight: 700; padding: .2rem .55rem; }
.admin-shell-navigation { margin: .8rem 0; }.admin-shell-navigation h2 { font-size: .9rem; margin: 0 0 .4rem; }.admin-shell-nav { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; }
.admin-shell-nav a, .admin-shell-nav-unavailable { border: 1px solid #9db59f; border-radius: 6px; box-sizing: border-box; color: #1e653a; font-size: .92rem; font-weight: 700; min-height: 2.5rem; padding: .55rem .7rem; text-decoration: none; }
.admin-shell-nav a[aria-current="page"] { background: #e4f0e5; border-color: #287141; color: #17391f; }
.admin-shell-nav-unavailable { border-color: #b9c2ba; color: #526356; cursor: default; }
.admin-shell-nav-unavailable span { display: block; font-size: .76rem; font-weight: 400; }
.admin-shell-dashboard-link { margin: .85rem 0; }
.admin-shell-current-page { font-weight: 700; margin: 0 0 1rem; }
.admin-sections { background: #f5f8f4; border: 1px solid #d6e1d4; border-radius: 7px; margin: 0 0 1rem; padding: .7rem .85rem; }
.admin-sections h3 { margin: 0 0 .4rem; }
.admin-sections ul { display: grid; gap: .35rem; margin: 0; padding-left: 1.2rem; }
.admin-shell-legend { background: #f5f8f4; border: 1px solid #d6e1d4; border-radius: 7px; padding: .7rem .85rem; }
.admin-shell-legend h2 { font-size: .9rem; margin: 0 0 .35rem; }
.admin-shell-legend ul { display: flex; flex-wrap: wrap; gap: .3rem .8rem; list-style: none; margin: 0; padding: 0; }
.admin-shell-legend li { font-size: .82rem; }
.admin-shell a:focus-visible, .admin-shell-nav a:focus-visible { outline: 3px solid rgba(40, 113, 65, .5); outline-offset: 2px; }

/* Stage 09 Phase 7 overview cards: present prepared evidence only. */
.admin-overview-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-overview-card { border: 1px solid #d7e0d4; border-radius: 8px; min-width: 0; padding: 1rem; }
.admin-overview-card h3 { color: #1d3d2a; font-size: 1rem; margin: 0 0 .5rem; }
.admin-overview-card > p { line-height: 1.4; margin: .45rem 0; overflow-wrap: anywhere; }
.admin-overview-card dl { display: grid; gap: .3rem; margin: .65rem 0; }
.admin-overview-card dt { color: #405144; font-size: .86rem; font-weight: 700; }
.admin-overview-card dd { margin: 0; overflow-wrap: anywhere; }

.auth-back-home {
  align-items: center;
  display: inline-flex;
  font-size: .9rem;
  line-height: 1.25;
  margin: -.35rem 0 1.15rem;
  min-height: 2.75rem;
  padding: .35rem .25rem;
}
.auth-page h1, .auth-page h2 { color: #1d3d2a; }
.auth-page h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.15; margin: 0 0 1rem; text-align: center; }
.auth-page-register h1 span { display: block; }
.auth-page h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.auth-intro { color: #405144; line-height: 1.5; margin: .45rem 0; }
.auth-value-proposition { color: #405144; font-size: .94rem; line-height: 1.42; margin: 0 0 .65rem; }
.auth-value-proposition-lead { font-weight: 700; margin: 0 0 .25rem; }
.auth-value-proposition ul { margin: .25rem 0 .5rem; padding-left: 1.2rem; }
.auth-value-proposition li + li { margin-top: .15rem; }
.auth-value-proposition p:last-child { margin: 0; }
.auth-form, .verification-form { display: flex; flex-direction: column; gap: .75rem; }
.auth-form { margin-top: 1.5rem; }
.auth-name-row, .auth-contact-row, .auth-password-row { display: grid; gap: 1rem; }
.auth-name-row, .auth-password-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-contact-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.auth-field { display: flex; flex-direction: column; gap: .35rem; }
.auth-field label, .verification-form label { color: #273b2d; font-size: .94rem; font-weight: 650; }
.auth-field input:not([type="checkbox"]), .verification-form input {
  box-sizing: border-box; width: 100%; min-height: 2.8rem; padding: .65rem .75rem;
  background: #fff; border: 1px solid #aebdaf; border-radius: 7px; color: #1d2b20; font-size: 16px;
}
.auth-field input:not([type="checkbox"]):focus, .verification-form input:focus, .auth-details summary:focus {
  border-color: #287141; outline: 3px solid rgba(40, 113, 65, .26); outline-offset: 1px;
}
.auth-help { color: #526356; font-size: .88rem; line-height: 1.35; margin: 0; }
.auth-details { color: #3f5144; font-size: .88rem; line-height: 1.4; }
.auth-details summary { color: #205d36; cursor: pointer; font-weight: 650; padding: .2rem 0; }
.auth-details p { margin: .45rem 0 0; }
.auth-checkbox { margin-top: .15rem; }
.auth-checkbox label { align-items: flex-start; color: #3c4c40; display: flex; font-size: .86rem; font-weight: 400; gap: .6rem; line-height: 1.45; }
.auth-consent-copy { display: inline; }
.auth-checkbox input[type="checkbox"] { accent-color: #287141; flex: 0 0 auto; height: 1.15rem; margin-top: .12rem; width: 1.15rem; }
.auth-page a { color: #1e653a; text-decoration: underline; text-underline-offset: 2px; }
.auth-page a:focus { outline: 3px solid rgba(40, 113, 65, .34); outline-offset: 2px; }
.auth-actions { margin-top: .4rem; }
.auth-submit, .auth-secondary { border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-size: 1rem; font-weight: 700; min-height: 2.9rem; padding: .7rem 1rem; width: 100%; }
.auth-submit { background: #287141; color: #fff; }
.auth-submit:hover { background: #1f5d35; }
.auth-secondary { background: #f7faf6; border-color: #7da287; color: #205d36; }
.auth-submit:focus, .auth-secondary:focus { outline: 3px solid rgba(40, 113, 65, .36); outline-offset: 2px; }
.auth-error, .auth-message, .auth-notice, .auth-unavailable { border-radius: 7px; font-size: .92rem; line-height: 1.4; margin: 1rem 0; padding: .8rem .9rem; }
.auth-error { background: #fff3f2; border: 1px solid #ca4e43; color: #84251e; }
.auth-message { background: #eff8f0; border: 1px solid #6d9e78; color: #1c5330; }
.auth-notice { background: #fff8df; border: 1px solid #b28a20; color: #5c4710; font-weight: 600; }
.auth-unavailable { background: #f4f5f3; border: 1px solid #b9c2ba; color: #3e4b40; }
.auth-field-error { color: #8b2c25; font-size: .86rem; margin: 0; }
.auth-alt { font-size: .92rem; margin: 1.25rem 0 0; text-align: center; }
.auth-login-action { background: #287141; border-radius: 7px; color: #fff !important; display: inline-flex; font-weight: 700; justify-content: center; min-height: 2.9rem; padding: .7rem 1rem; text-decoration: none !important; width: min(100%, 20rem); }
.auth-login-action:hover { background: #1f5d35; }
.auth-page-dashboard .auth-card { padding: clamp(1rem, 2vw, 1.75rem); }
.dashboard-top-grid { align-items: start; display: grid; gap: 1rem; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
.dashboard-top-grid > .dashboard-tile { margin: 0; }
.dashboard-tile { border: 1px solid #d7e0d4; border-radius: 10px; margin: 1rem 0; padding: .9rem; }
.dashboard-tile-head { display: flex; gap: 1rem; justify-content: space-between; }
.dashboard-tile-head p { margin: .25rem 0; }
.tile-toggle, .day-edit { width: auto; }
.tile-panel { border-top: 1px solid #d7e0d4; margin-top: 1rem; padding-top: 1rem; }
.dashboard-dl { display: grid; gap: .4rem 1rem; grid-template-columns: minmax(10rem, 1fr) 2fr; }
.dashboard-dl dt { font-weight: 700; }.dashboard-dl dd { margin: 0; }
.account-status { color: #111; font-weight: 700; white-space: nowrap; }
.status-indicator { display: inline-block; font-size: 1.8em; line-height: .55; margin-left: .18rem; vertical-align: -.12em; }
.account-status .state-green { color: #176b32; }.account-status .state-yellow { color: #9a6100; }.account-status .state-red { color: #a12621; }
.account-tile-toggle, .schedule-display .day-edit { font-size: .88rem; min-height: 2.5rem; min-width: 0; padding: .4rem .6rem; }
.account-tile-toggle { align-self: center; line-height: 1.15; width: auto; }
.account-actions { margin-top: .8rem; }.account-actions .auth-secondary { display: inline-flex; min-height: 2.5rem; padding: .4rem .6rem; text-decoration: none; width: auto; }
.state { font-weight: 700; }.state::before { content: '● '; }.state-incomplete::before { content: '⊘ '; }.state-green { color: #176b32; }.state-yellow { color: #805d00; }.state-red { color: #a12621; }
.schedule-day { border-top: 1px solid #d7e0d4; padding: .9rem 0; }.schedule-day h3 { margin: 0; }
.schedule-editor { margin-top: .8rem; }.schedule-editor fieldset { border: 0; display: grid; gap: .75rem; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }.schedule-editor label { display: grid; gap: .25rem; font-weight: 650; }.schedule-editor select { min-height: 2.5rem; }.schedule-editor select[multiple] { min-height: 6rem; }.editor-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }.editor-actions button { width: auto; }
.schedule-title-row { align-items: center; }.schedule-title-row h2 { margin: 0; }.schedule-info-toggle { font-size: .88rem; min-height: 2.5rem; padding: .4rem .6rem; width: auto; }.schedule-info { border-top: 1px solid #d7e0d4; margin-top: .65rem; padding-top: .65rem; }.schedule-info h3 { font-size: .95rem; margin: 0; }.schedule-info ul { font-size: .9rem; line-height: 1.35; margin: .4rem 0; padding-left: 1.2rem; }.schedule-grid { margin-top: .85rem; }.schedule-head,.schedule-display { align-items: center; display: grid; gap: .6rem; grid-template-columns: 6rem 7rem minmax(5rem,1fr) minmax(7rem,1fr) 5rem 4rem; }.schedule-head { border-bottom: 1px solid #d7e0d4; font-size: .82rem; font-weight: 700; padding: .4rem 0; }.schedule-head span:nth-child(4), .schedule-head span:nth-child(5), .schedule-time, .schedule-group { text-align: center; }.schedule-day { border-top: 0; padding: .55rem 0; }.schedule-day + .schedule-day { border-top: 1px solid #e5ebe3; }.schedule-status { color: #111; font-weight: 700; white-space: nowrap; }.schedule-display .day-edit { width: 100%; }.schedule-editor select { box-sizing: border-box; max-width: 9rem; padding: .35rem; }.schedule-editor select[name="group_size"] { max-width: 4rem; }.schedule-editor select[multiple] { max-width: none; }.day-name-short { display: none; }.sr-only { clip: rect(0,0,0,0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

.verification-status { background: #f5f8f4; border: 1px solid #d6e1d4; border-radius: 9px; margin: 1.5rem 0; padding: 1rem; }
.verification-status dl { display: grid; gap: .65rem; margin: 0; }
.verification-status dl div { align-items: baseline; display: flex; gap: .75rem; justify-content: space-between; }
.verification-status dt { color: #425346; font-weight: 600; }
.verification-status dd { color: #1e3123; margin: 0; text-align: right; }
.status-badge { background: #e4f0e5; border: 1px solid #7ca184; border-radius: 999px; color: #205d36; display: inline-block; font-size: .82rem; font-weight: 700; padding: .15rem .55rem; }
.verification-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.verification-card { border: 1px solid #d7e0d4; border-radius: 9px; padding: 1rem; }
.verification-card > p { color: #4d5d50; font-size: .9rem; line-height: 1.4; margin: 0 0 .8rem; }
.verification-card .auth-details { margin-bottom: 1rem; }
.verification-card .verification-form + .verification-form { margin-top: .9rem; }
.availability-tile { overflow: hidden; }.availability-tile h2 { margin-bottom: .2rem; }.availability-scan { font-size: .88rem; margin: .25rem 0; }.availability-matrix { --availability-grid-columns: minmax(7.5rem,1.4fr) repeat(var(--availability-date-count),minmax(4rem,1fr)); margin-top: .7rem; min-width: 0; overflow-x: visible; }.availability-head,.availability-row { display: grid; gap: .35rem; grid-template-columns: var(--availability-grid-columns); min-width: calc(7.5rem + var(--availability-date-count) * 4rem); }.availability-head { border-bottom: 1px solid #d7e0d4; font-size: .8rem; font-weight: 700; padding: .4rem 0; }.availability-head > span:first-child { text-align: left; }.availability-head > span:not(:first-child) { text-align: center; }.availability-group-header { background: #edf3ec; border-bottom: 1px solid #cbdacb; border-top: 1px solid #cbdacb; color: #254a31; font-size: .82rem; font-weight: 750; margin-top: .55rem; padding: .35rem .45rem; }.availability-section { scroll-margin-top: 1rem; }.availability-section-nav { display: flex; flex-wrap: wrap; gap: .35rem .75rem; margin: .55rem .25rem; }.availability-section-nav a { color: #205d36; font-size: .82rem; font-weight: 700; }.availability-row { border-bottom: 1px solid #e5ebe3; padding: .4rem 0; }.availability-row > strong { min-width: 0; overflow-wrap: anywhere; white-space: normal; }.availability-cell { align-items: center; display: grid; justify-content: end; min-height: 3.9rem; text-align: right; }.availability-period { align-items: center; color: #111; display: inline-flex; font-size: .76rem; justify-content: end; line-height: 1.25; min-width: 100%; white-space: nowrap; }.availability-status-light { font-size: .8rem; margin-left: .18rem; }.availability-period-label { color: #111; }.availability-count { color: #111; font-size: .9rem; font-weight: 750; }.availability-cell a { font-weight: 700; padding: .1rem .15rem; text-decoration-thickness: 1px; }.availability-unavailable { color: #84251e; font-size: .78rem; }.availability-closed { color: #3e4b40; font-size: .78rem; }.availability-cell.availability-closure-cell { display: flex; justify-content: center; text-align: center; }.availability-closure { align-items: center; display: flex; flex-direction: column; inline-size: 100%; max-width: 100%; text-align: center; }.availability-closure-label { display: block; }.availability-closure-reason { display: block; max-width: 100%; overflow-wrap: anywhere; }.availability-detail-contact { align-items: baseline; display: flex; flex-wrap: wrap; gap: .25rem; margin: .55rem 0; }.availability-detail-contact a { font-weight: 650; }

@media (max-width: 720px) {
  /* Only the matrix scrolls when its readable eight-date grid cannot fit. */
  .availability-matrix { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 767px) {
  .dashboard-top-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body:has(.auth-page) {
    background-position: center, center, 66% 52%;
  }

  .auth-page { margin: 1rem auto 1.5rem; padding: 0 .65rem; }
  .admin-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-shell-nav { gap: .4rem; }
  .admin-shell-nav a, .admin-shell-nav-unavailable { flex: 1 1 8rem; }
  .auth-card { border-radius: 10px; padding: 1.15rem; }
  .auth-name-row, .auth-contact-row, .auth-password-row, .verification-grid { grid-template-columns: 1fr; }
  .verification-status dl div { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .verification-status dd { text-align: left; }
  .auth-page-register h1 { font-size: clamp(1.55rem, 7vw, 1.9rem); margin-bottom: .7rem; }
  .auth-page-login .auth-intro { margin-top: .15rem; text-align: center; }
  .auth-page-login .auth-form { margin-top: 1rem; }
  /* This scroller is local to the matrix: the page itself never gains a
     horizontal overflow, and each course/date header remains in the grid. */
  .dashboard-tile-head { align-items: flex-start; flex-direction: column; }.schedule-title-row { align-items: center; flex-direction: row; }.dashboard-dl { grid-template-columns: 1fr; }.schedule-editor fieldset { grid-template-columns: 1fr; }.tile-toggle { width: 100%; }.account-tile-toggle { align-self: center; width: auto; }.schedule-head { display: none; }.schedule-display { align-items: start; grid-template-columns: 5.5rem 1fr; }.schedule-display > span:nth-of-type(1)::before { content: 'Status: '; font-weight: 700; }.schedule-display > span:nth-of-type(2)::before { content: 'Courses: '; font-weight: 700; }.schedule-display > span:nth-of-type(3)::before { content: 'Time: '; font-weight: 700; }.schedule-display > span:nth-of-type(4)::before { content: 'Group: '; font-weight: 700; }.schedule-display .day-edit { grid-column: 1 / -1; width: auto; }.schedule-editor select { max-width: 100%; }.day-name-full { clip: rect(0,0,0,0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }.day-name-short { display: inline; }
}

/* Stage 09 Phase 9 detail pages: read-only presentation only. */
.admin-report section { border-top: 1px solid #d7e0d4; margin-top: 1rem; padding-top: 1rem; }
.admin-report section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.admin-report-dl { display: grid; gap: .35rem 1rem; grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr); }
.admin-report-dl dt { color: #405144; font-weight: 700; }.admin-report-dl dd { margin: 0; overflow-wrap: anywhere; }
.admin-report-triage { background: #f5f8f4; border: 1px solid #d6e1d4 !important; border-radius: 8px; padding: .85rem; }
.admin-finding { border: 1px solid #d7e0d4; border-left: .35rem solid #a56c00; border-radius: 7px; margin: .65rem 0; padding: .7rem .85rem; }
.admin-finding-red { border-left-color: #a12621; }.admin-finding-yellow { border-left-color: #a56c00; }
.admin-finding h4 { margin: 0 0 .45rem; }.admin-report-source { color: #405144; font-size: .9rem; }
.admin-report-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-report-table-wrap table { border-collapse: collapse; min-width: 48rem; width: 100%; }
.admin-report-table-wrap th, .admin-report-table-wrap td { border-bottom: 1px solid #d7e0d4; padding: .5rem; text-align: left; vertical-align: top; }
.admin-course-ok td { color: #2d4433; }
@media (max-width: 640px) { .admin-report-dl { grid-template-columns: 1fr; gap: .15rem; }.admin-report-dl dd { margin-bottom: .5rem; } }
.admin-detail-page .admin-detail-summary { background: #f5f8f4; border: 1px solid #d6e1d4; border-radius: 8px; margin: 0 0 1rem; padding: .85rem 1rem; }
.admin-detail-page .admin-detail-summary h3 { font-size: 1rem; margin: 0 0 .45rem; }
.admin-detail-page .admin-detail-summary dl, .admin-detail-page .admin-detail-dl { display: grid; gap: .35rem 1rem; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); margin: .55rem 0; }
.admin-detail-page .admin-detail-summary dt, .admin-detail-page .admin-detail-dl dt { color: #405144; font-size: .88rem; font-weight: 700; }
.admin-detail-page .admin-detail-summary dd, .admin-detail-page .admin-detail-dl dd { margin: 0; overflow-wrap: anywhere; }
.admin-detail-page .admin-detail-links { display: flex; flex-wrap: wrap; gap: .7rem 1rem; margin: .7rem 0 0; }

/* Header and body grids must begin on the same course/date columns. */
.availability-group-header { padding-inline: 0; }

/* Date labels and closure blocks share the center of each dynamic grid track. */
.availability-head > span:not(:first-child) { text-align: center; }

/* Every date cell shares the header's centered track axis. */
.availability-cell { align-items: center; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.availability-period { box-sizing: border-box; inline-size: 100%; justify-content: center; min-width: 0; }
.availability-cell a { padding: .1rem 0; }

/* Keep fragment-target headings clear of the sticky site header. */
.availability-section { scroll-margin-top: 11rem; }
.admin-detail-page .admin-detail-table-wrap { margin-top: .75rem; max-width: 100%; }
