/* Shared pieces for member and staff pages, after brand.css and pages.css. Each page adds its own small stylesheet after this one. */
:root { --app-wrap: 1320px; --panel-radius: 20px; --field-bg: rgba(244, 245, 239, .05); --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1.5 7 7.5l6-6' stroke='%23a9b29e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.app-wrap { width: min(var(--app-wrap), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.app-main { padding: clamp(100px, 8.4vw, 132px) 0 clamp(56px, 7vw, 96px); }
.app-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 32px; margin-bottom: clamp(20px, 2.6vw, 36px); }
.app-title h1 { font-size: clamp(38px, 5.6vw, 88px); overflow-wrap: anywhere; }
.app-title p { max-width: 62ch; margin-top: 12px; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.4; color: var(--muted); }

/* Header: the same bar as the public pages. */
.account-nav { flex-wrap: nowrap; white-space: nowrap; }
@media (max-width: 1240px) and (min-width: 901px) {
  .account-nav { flex-wrap: wrap; justify-content: flex-end; gap: 2px 16px; font-size: 15px; }
  .account-nav .nav-signout { min-height: 40px; }
  body:has(.staff-nav) .app-main { padding-top: 128px; }
}
.site-nav button.nav-signout { flex: none; }
@media (max-width: 900px) {
  .account-nav { flex-wrap: nowrap; white-space: normal; }
  .site-nav button.nav-signout { width: 100%; margin-top: 18px; min-height: 56px; font-size: 18px; letter-spacing: 0; }
}

/* Panels */
.member-panel { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 14px; min-width: 0; padding: clamp(20px, 2.4vw, 34px); border: 1px solid var(--hairline); border-radius: var(--panel-radius); background: linear-gradient(180deg, rgba(244, 245, 239, .05), rgba(244, 245, 239, .018)); }
.member-panel > * { min-width: 0; }
.member-panel > .button, .member-panel > .quiet-button { justify-self: start; }
.member-panel h2 { font-size: clamp(22px, 2.2vw, 32px); font-weight: 750; font-stretch: 118%; line-height: 1.08; letter-spacing: -.015em; }
.member-panel h3 { font-size: 19px; }
.member-panel-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 20px; }
.challenge-copy { max-width: 66ch; color: var(--muted); }
.member-muted { color: var(--muted); font-size: 15px; font-weight: 400; }

/* Small status labels */
.entry-status, .private-pill { display: inline-flex; align-items: center; flex: none; min-height: 30px; padding: 2px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 600; font-size: 14px; line-height: 1.2; white-space: nowrap; color: var(--fg); }
.entry-status.is-on { border-color: var(--lime); color: var(--lime); }
.private-pill { color: var(--muted); border-color: var(--hairline-strong); }

/* Secondary buttons */
.quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; justify-self: start; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: transparent; color: var(--fg); font-family: var(--display); font-weight: 600; font-stretch: 105%; font-size: 15px; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .18s, border-color .18s; }
.quiet-button:hover { background: rgba(244, 245, 239, .08); border-color: var(--bone); }
.quiet-button:disabled { opacity: .5; cursor: not-allowed; }
.button:disabled, .button:disabled:hover { background: transparent; border-color: var(--hairline-strong); color: var(--muted); opacity: 1; box-shadow: none; transform: none; cursor: not-allowed; }
.text-link { display: inline-flex; align-items: center; gap: 6px; }
.text-link:hover { color: var(--lime-soft); }

/* Notices */
.member-alert { max-width: 80ch; margin-bottom: 18px; padding: 14px 18px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-m); background: rgba(244, 245, 239, .03); line-height: 1.45; }
.member-alert.is-error, .form-message.is-error { color: var(--alert); }
.member-alert.is-error { border-color: rgba(255, 154, 133, .5); }
.member-retry { margin-bottom: 18px; }
.draft-banner { max-width: none; }
.entry-notice { display: grid; gap: 4px; padding: 14px 18px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-m); background: rgba(244, 245, 239, .03); line-height: 1.45; }
.entry-notice strong { font-weight: 650; }
.entry-notice p { color: var(--muted); }
.entry-notice.is-open { border-color: rgba(180, 246, 93, .5); background: rgba(180, 246, 93, .07); }
.entry-notice.is-open strong { color: var(--lime); }

/* Forms */
.workspace-form { display: grid; gap: 16px; }
.workspace-form > .button, .workspace-form > .quiet-button { justify-self: start; }
.workspace-form label:not(.check-row) { display: block; min-width: 0; font-weight: 500; font-size: 16px; }
.workspace-form label:not(.check-row) > :is(input, select, textarea) { display: block; margin-top: 8px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
input:not([type='checkbox'], [type='radio'], [type='range'], [type='file'], [type='submit']), select, textarea { width: 100%; min-width: 0; min-height: 52px; padding: 12px 14px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-m); background: var(--field-bg); color: var(--bone); font-size: 16px; line-height: 1.4; transition: border-color .18s, background-color .18s; }
textarea { display: block; min-height: 96px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 42px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 15px center; text-overflow: ellipsis; cursor: pointer; }
select option { background: var(--ink-raised); color: var(--bone); }
select option:disabled { color: #6e7766; }
input:hover:not(:disabled, [readonly], [type='checkbox'], [type='radio'], [type='range'], [type='file']), select:hover:not(:disabled), textarea:hover:not(:disabled, [readonly]) { border-color: rgba(244, 245, 239, .5); }
input:focus-visible:not([type='checkbox'], [type='radio'], [type='range'], [type='file']), select:focus-visible, textarea:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; border-color: transparent; background-color: rgba(244, 245, 239, .08); border-radius: var(--radius-m); }
input::placeholder, textarea::placeholder { color: #848d79; }
input:disabled, select:disabled, textarea:disabled, input[readonly], textarea[readonly] { opacity: .6; cursor: not-allowed; }
input[type='file'] { width: 100%; max-width: 100%; font-size: 15px; color: var(--muted); }
input[type='file']::file-selector-button { min-height: 44px; margin-right: 12px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: transparent; color: var(--bone); font-family: var(--display); font-weight: 600; font-size: 15px; cursor: pointer; }
.check-row { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; font-size: 16px; line-height: 1.4; cursor: pointer; }
.check-row input, input[type='checkbox'], input[type='radio'] { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--lime); cursor: pointer; }
.check-row a { color: var(--link); text-underline-offset: 3px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; font-weight: 650; font-stretch: 105%; }
.member-preferences { display: grid; gap: 14px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.member-preferences legend { float: left; width: 100%; margin-bottom: 2px; }
.member-preferences legend + * { clear: both; }
.field-help { line-height: 1.4; }
.member-count { justify-self: end; margin-top: -8px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* Two-column label and value lists */
.member-detail-list { display: grid; }
.member-detail-list > div { display: grid; grid-template-columns: minmax(120px, .42fr) 1fr; gap: 4px 16px; padding: 11px 0; border-top: 1px solid var(--hairline); }
.member-detail-list dt { color: var(--muted); font-size: 16px; }
.member-detail-list dd { overflow-wrap: anywhere; }

/* Tables */
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15.5px; }
th { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--hairline-strong); font-weight: 500; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }

/* A quiet entrance when a tab or section changes. */
@keyframes panel-rise { from { opacity: 0; transform: translateY(8px); } }
.member-tab-panel:not([hidden]) { animation: panel-rise .32s var(--ease-out) both; }

/* Footer */
.app-foot { padding: 28px 0 24px; border-top: 1px solid var(--hairline); font-size: 15px; color: var(--muted); }
.app-foot .app-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px clamp(18px, 3vw, 44px); }
.app-foot nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.app-foot a { color: var(--bone); text-decoration: none; font-weight: 500; }
.app-foot a:hover { color: var(--lime); }
.app-foot-note { grid-column: 1 / -1; order: 3; max-width: 90ch; font-size: 14.5px; }
.app-foot-note a { text-decoration: underline; text-underline-offset: 3px; }
.app-foot-social a { display: inline-flex; align-items: center; gap: 8px; }
.app-foot-social img { width: 18px; height: 18px; object-fit: contain; }
.app-foot-copy { order: 2; grid-column: 3; text-align: right; font-size: 14.5px; }
@media (max-width: 860px) {
  .app-foot .app-wrap { grid-template-columns: 1fr; }
  .app-foot-copy { grid-column: auto; text-align: left; }
}
