/* Admin dashboard (/admin) + account email screens. Uses the portal's brand variables. */
.admin-main { max-width: 1180px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.admin-head h1 { margin: 6px 0 10px; font-size: clamp(40px, 6vw, 68px); line-height: .95; letter-spacing: -.04em; }
.admin-head p { margin: 0; color: var(--muted); max-width: 460px; }
.admin-tabs { display: flex; gap: 6px; padding: 5px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; overflow-x: auto; background: #fff; }
.admin-tab { padding: 10px 18px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.admin-tab b { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: rgba(3, 4, 8, .07); font-size: 11px; }
.admin-tab.is-active { background: var(--ink); color: #fff; }
.admin-tab.is-active b { background: rgba(255, 255, 255, .18); }
.admin-banner { margin: 0 0 18px; padding: 13px 16px; border: 1px solid rgba(3, 4, 8, .12); border-left: 4px solid var(--ink); border-radius: 12px; background: #fff; font-size: 14px; }
.admin-banner.is-error { border-left-color: var(--blue-dark); background: #fff1e8; color: #8b2d10; }
.admin-toolbar { display: flex; gap: 10px; margin-bottom: 18px; }
.admin-search, .admin-filter { max-width: 360px; margin: 0; background: #fff; }
.admin-empty { padding: 48px 24px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); background: #fff; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.admin-client { display: flex; flex-direction: column; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 12px 30px rgba(3, 4, 8, .05); }
.admin-client header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.admin-client h3, .admin-client-name { margin: 0 0 4px; font-size: 19px; letter-spacing: -.02em; }
.admin-client small { color: var(--muted); }
.admin-client .btn { align-self: flex-start; }
.admin-pill { flex: none; padding: 5px 10px; border-radius: 999px; background: rgba(3, 4, 8, .07); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.admin-pill.is-on { background: #e7e393; color: #4c490c; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; }
.admin-stats div { padding: 10px; border-radius: 12px; background: #fafaf8; border: 1px solid #ecebe6; }
.admin-stats div.is-full { background: #fff1e8; border-color: rgba(255, 90, 38, .35); }
.admin-stats dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-stats dd { margin: 4px 0 0; font-size: 15px; font-weight: 700; }

.admin-requests { display: grid; gap: 8px; }
.admin-request { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.admin-request-copy { display: grid; gap: 3px; min-width: 0; }
.admin-request-copy small { color: var(--muted); }
.admin-link { color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.admin-link:hover { color: var(--blue-dark); }

.admin-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.admin-panel h2 { margin: 0 0 6px; }
.admin-people { margin: 14px 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.admin-people li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #ecebe6; border-radius: 12px; background: #fafaf8; }
.admin-people li div { display: grid; gap: 2px; min-width: 0; }
.admin-people strong { overflow-wrap: anywhere; }
.admin-people small { color: var(--muted); }
.admin-text-btn { flex: none; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: #a9410e; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.admin-text-btn:hover { background: #fff1e8; }
.admin-inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-inline-form .input { flex: 1 1 200px; margin: 0; background: #fff; }
.admin-inline-form select.input { flex: 0 1 150px; }

/* Manage-client sheet: centered dialog on desktop, bottom sheet on phones */
.admin-sheet-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 40px 16px; background: rgba(3, 4, 8, .45); overflow-y: auto; }
.admin-sheet { width: min(720px, 100%); padding: 26px; border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(3, 4, 8, .3); }
.admin-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.admin-sheet-head h2 { margin: 4px 0 0; font-size: 28px; letter-spacing: -.03em; }
.admin-close { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.admin-section { padding: 20px 0; border-top: 1px solid #ecebe6; }
.admin-section h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 16px; }
.admin-section h3 > span:not(.admin-pill) { color: var(--muted); font-weight: 600; }
.admin-section .subtle { margin: 0 0 12px; }
.admin-form .row { margin-bottom: 0; }
.admin-form .field { margin-bottom: 14px; }
.admin-narrow { max-width: 260px; }
.admin-check { display: flex; align-items: center; gap: 10px; align-self: center; padding-top: 18px; font-weight: 600; cursor: pointer; }
.admin-check input { width: 20px; height: 20px; accent-color: var(--ink); }
.admin-copy { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-copy .input { margin: 0; font-size: 13px; background: #fafaf8; }
.admin-danger .btn-primary { background: #b3330c; border-color: #b3330c; }

/* Account email screens */
.auth-forgot { display: block; width: 100%; margin-top: 10px; padding: 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.auth-forgot:hover { color: var(--ink); }

@media (max-width: 760px) {
  .admin-head { flex-direction: column; align-items: flex-start; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-request { grid-template-columns: 1fr auto; }
  .admin-request .admin-link { grid-column: 1 / -1; }
  .admin-sheet-backdrop { align-items: flex-end; padding: 0; }
  .admin-sheet { max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 22px 18px 32px; }
  .admin-check { padding-top: 0; margin-bottom: 14px; }
  .admin-copy { flex-direction: column; }
}
.admin-check-wide { padding-top: 0; margin: 4px 0 6px; }
.admin-hint { font-size: 13px; }
.admin-sheet-head .admin-link { display: inline-block; margin-top: 6px; }

.admin-pill.is-alert { background: #fff1e8; color: #8b2d10; }

/* Onboarding */
.admin-pill.is-waiting { background: #e8efff; color: #1d3f8f; }
.admin-answers { display: grid; gap: 10px; margin: 14px 0 0; }
.admin-answers > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 13px; line-height: 1.45; }
.admin-answers dt { color: var(--muted); font-weight: 600; }
.admin-answers dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.admin-warn { color: #8b2d10; }
@media (max-width: 560px) { .admin-answers > div { grid-template-columns: 1fr; gap: 2px; } }
.admin-section h3 .admin-pill { letter-spacing: 0; }

/* Dark mode: admin cards, panels and the manage sheet stay white, so their text stays dark;
   only what sits straight on the black page switches to light colors. */
.admin-tabs, .admin-banner, .admin-empty, .admin-client, .admin-request, .admin-panel, .admin-sheet, .admin-search, .admin-filter { color: var(--studio-ink, #030408); }
.admin-client .btn-ghost, .admin-sheet .btn-ghost, .admin-panel .btn-ghost { color: var(--studio-ink, #030408); }
:root[data-theme="dark"] .admin-head .eyebrow { color: var(--studio-orange); }
:root[data-theme="dark"] .admin-head p { color: #b9b7af; }
:root[data-theme="dark"] .admin-toolbar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
:root[data-theme="dark"] .admin-toolbar .btn-ghost:hover { background: rgba(255, 255, 255, .08); }

/* Plan dropdown: custom plan name box under "Other…" */
.admin-plan-other { margin-top: 8px; }
.admin-plan-other[hidden] { display: none; }
.admin-form .field { align-content: start; } /* keep inputs their normal height when a neighbour has a hint */
/* Shown when a new church is put on a board it already has: nothing on that board changes. */
.admin-note { margin: 4px 0 12px; padding: 12px 14px; border-left: 3px solid var(--accent, #ff5a1f); border-radius: 8px; background: color-mix(in srgb, var(--accent, #ff5a1f) 7%, transparent); font-size: 14px; line-height: 1.5; }
.admin-note[hidden] { display: none; }
