.admin-page { background: #f5f7f4; min-height: 100svh; font-size: 15px; }
.admin-header { min-height: 86px; background: white; border-bottom: 1px solid var(--border); padding: 20px 34px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.admin-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; font-size: 14px; }
.admin-header a:hover { text-decoration: underline; text-underline-offset: 4px; }
.access-panel { max-width: 650px; margin: 80px auto; padding: 35px; background: white; border: 1px solid var(--border); border-radius: 14px; line-height: 1.7; }
.access-panel h1 { font-size: 32px; margin-top: 0; }
.access-panel a { color: var(--forest); text-decoration: underline; }
.admin-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: calc(100svh - 86px); }
.admin-sidebar { background: white; padding: 30px 18px; border-right: 1px solid var(--border); }
.admin-sidebar h2 { margin: 0 14px 20px; font-size: 17px; }
.table-nav-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px; margin-bottom: 7px; border: 0; border-radius: 8px; background: white; color: #526459; font-size: 15px; text-align: left; }
.table-nav-button[aria-current="page"] { background: var(--sage); color: var(--forest); font-weight: 600; }
.table-nav-button:hover { background: #f3f6f1; }
.table-count { padding: 2px 8px; border-radius: 5px; background: #eef2eb; font-size: 12px; }
#admin-identity { margin: 30px 14px 0; color: var(--muted); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.admin-main { padding: 32px; min-width: 0; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 26px; }
.admin-heading h1 { font-size: 34px; letter-spacing: -.035em; line-height: 1.3; margin: 0; }
.admin-heading p { color: #6e7d72; margin: 9px 0 0; line-height: 1.6; }
.admin-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #cdd8cf; background: white; color: var(--ink); border-radius: 7px; padding: 10px 16px; min-height: 41px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.admin-button:hover { background: #edf2e9; }
.admin-button.primary { background: var(--forest); border-color: var(--forest); color: white; }
.admin-button.primary:hover { background: #193e2e; }
.admin-button.danger { background: #a53232; color: white; border-color: #a53232; }
.admin-button:disabled { opacity: .45; cursor: not-allowed; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin: 0 0 20px; }
.admin-toolbar label { min-width: 0; }
#queue-clinic-filter { max-width: min(360px, 100%); }
.admin-toolbar label { font-size: 13px; color: #687b6d; }
.admin-toolbar .admin-search { flex: 1; max-width: 460px; }
.admin-toolbar input, .admin-toolbar select { display: block; height: 42px; padding: 9px 12px; margin-top: 7px; background: white; border: 1px solid #cdd8cf; border-radius: 7px; font-size: 15px; color: var(--ink); width: 100%; }
.admin-table-wrap { overflow-x: auto; background: white; border: 1px solid var(--border); border-radius: 11px; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.admin-table th { white-space: nowrap; padding: 15px 17px; background: #eef3ec; font-weight: 600; border-bottom: 1px solid var(--border); color: #536859; }
.admin-table td { max-width: 310px; min-width: 80px; padding: 15px 17px; border-bottom: 1px solid #edf0eb; vertical-align: top; line-height: 1.65; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #fafcf9; }
.cell-text { min-width: 120px; max-width: 280px; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.admin-table td:first-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.row-actions { display: flex; gap: 9px; white-space: nowrap; }
.row-actions button { border: 0; border-radius: 4px; padding: 3px 2px; background: none; font-size: 14px; color: var(--forest); }
.row-actions button:hover { text-decoration: underline; }
.row-actions .delete-action { color: #a53232; }
.row-actions button:disabled { color: #a2a9a3; cursor: not-allowed; opacity: 1; }
.boolean-value { font-size: 12px; display: inline-block; padding: 3px 9px; border-radius: 5px; background: #edf3e9; color: #385e40; white-space: nowrap; }
.boolean-value.off { background: #f0f1ee; color: #7c837a; }
.null-value { color: #9a9f98; }
.table-empty { color: #748476; text-align: center; padding: 35px 20px; }
.admin-pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 19px; font-size: 14px; color: #687b6d; }
.admin-pagination > div { display: flex; gap: 10px; }
.admin-footnote { font-size: 12px; color: #7e8b80; line-height: 1.8; margin-top: 24px; }
.admin-error, .admin-notice { margin: 0 0 20px; padding: 12px 15px; line-height: 1.65; font-size: 14px; border-radius: 7px; white-space: pre-line; }
.admin-error { color: #9d3434; background: #fcf0ed; }
.admin-notice { color: #315b3c; background: #e9f3e6; }
.admin-dialog { width: min(760px, calc(100vw - 34px)); max-height: calc(100svh - 42px); border: 1px solid var(--border); padding: 28px; border-radius: 14px; background: white; color: var(--ink); overflow-y: auto; }
.admin-dialog::backdrop { background: #142c245e; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 24px; }
.dialog-heading h2, .delete-dialog h2 { font-size: 26px; letter-spacing: -.025em; margin: 0 0 6px; line-height: 1.4; }
.dialog-heading p { color: var(--muted); margin: 0; font-size: 13px; }
.close-dialog { background: none; border: none; padding: 0 3px; font-size: 30px; line-height: 1; color: #7c8b7f; }
.editor-grid { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.editor-field { display: flex; flex-direction: column; min-width: 0; gap: 8px; font-size: 14px; }
.editor-field label { font-weight: 600; }
.editor-field.full-width { grid-column: 1 / -1; }
.editor-field input:not([type="checkbox"]), .editor-field select, .editor-field textarea { min-width: 0; width: 100%; border: 1px solid #cdd8cf; padding: 11px 12px; border-radius: 7px; background: white; font: inherit; color: var(--ink); line-height: 1.5; }
.editor-field input:not([type="checkbox"]), .editor-field select { min-height: 46px; }
.editor-field textarea { resize: vertical; }
.editor-field small { color: var(--muted); line-height: 1.6; font-size: 12px; }
.editor-field.boolean-field { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px; padding: 10px 0; }
.editor-field.boolean-field small { flex-basis: 100%; }
.editor-field input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--forest); }
.dialog-actions { border-top: 1px solid var(--border); display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 26px; padding-top: 21px; }
.delete-dialog { max-width: 500px; }
.delete-dialog p { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.link-code-output { display: block; margin: 20px 0 10px; padding: 14px; background: #edf2e9; border: 1px solid var(--border); border-radius: 7px; font-size: 15px; white-space: normal; overflow-wrap: anywhere; user-select: all; }
.admin-heading-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.club-admin-section { margin-bottom: 28px; min-width: 0; }
.club-admin-section.clinic-outline { border: 2px solid #b2c7b6; border-radius: 13px; padding: 20px; background: #f1f6ed; }
.club-section-heading { margin-bottom: 16px; }
.club-section-heading h2 { font-size: 22px; margin: 0 0 6px; }
.club-section-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.membership-directory { display: grid; gap: 24px; min-width: 0; }
.membership-clinic { min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 18px; background: #f7faf5; }
.membership-clinic-heading { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; overflow-wrap: anywhere; }
summary.membership-clinic-heading { cursor: pointer; }
summary.membership-clinic-heading::before { content: "▸"; color: var(--forest); }
details[open] > summary.membership-clinic-heading::before { content: "▾"; }
.membership-clinic-heading h2, .membership-clinic-heading h3 { margin: 0; font-size: 23px; }
.membership-role { margin-top: 22px; padding: 18px; min-width: 0; background: white; border: 1px solid var(--border); border-radius: 9px; }
.membership-role h3 { margin: 0 0 14px; font-size: 19px; }
.membership-role .admin-pagination { justify-content: flex-start; gap: 10px; margin-top: 16px; }
.membership-role .admin-pagination span { margin-right: auto; }
.membership-role .table-empty { padding: 12px 0; }
.clinic-scheduler { width: min(1080px, calc(100vw - 34px)); }
.clinic-panel-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.clinic-rule-list, .clinic-session-list { display: grid; gap: 10px; }
.clinic-rule, .clinic-session { padding: 14px; background: #f7faf5; border: 1px solid #dce5d9; border-radius: 8px; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.clinic-rule strong, .clinic-session strong { font-size: 14px; line-height: 1.7; }
.clinic-rule p, .clinic-session p { font-size: 13px; color: #596e60; line-height: 1.7; margin: 3px 0; }
.clinic-session small { font-size: 12px; color: #6d7d71; }
.clinic-rule .admin-button, .clinic-session .admin-button { padding: 7px 10px; font-size: 12px; min-height: 36px; }
.clinic-muted { font-size: 14px; color: var(--muted); line-height: 1.7; }
.clinic-form { border-top: 1px solid var(--border); padding-top: 19px; margin-top: 21px; }
.clinic-form h3 { font-size: 17px; margin: 0 0 18px; }
.clinic-form > .clinic-panel-actions { margin-top: 20px; }
.admin-image-preview { display: block; width: 100%; max-height: 160px; object-fit: contain; background: #f2f5ee; border: 1px solid #d7e1d3; border-radius: 8px; margin-top: 12px; }
.admin-image-preview[hidden] { display: none; }
.admin-image-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.admin-image-controls .admin-button { font-size: 13px; padding: 8px 12px; }
@media (max-width: 850px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-sidebar { padding: 16px 20px; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-sidebar h2, #admin-identity { display: none; }
  #table-navigation { display: flex; gap: 8px; overflow-x: auto; }
  .table-nav-button { min-width: 145px; width: auto; margin: 0; padding: 12px; font-size: 14px; }
  .admin-main { padding: 25px 20px; }
  .admin-header { padding: 20px; }
  .admin-header nav { gap: 14px; font-size: 12px; }
}
@media (max-width: 550px) {
  .admin-header { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
  .admin-header .wordmark { font-size: 25px; }
  .admin-header nav { width: 100%; justify-content: space-between; }
  .admin-heading { align-items: flex-start; gap: 14px; }
  .admin-heading h1 { font-size: 28px; }
  .admin-heading p { font-size: 13px; }
  .admin-heading .admin-button { padding: 10px 12px; }
  .admin-toolbar { flex-wrap: wrap; gap: 12px; }
  .admin-toolbar .admin-search { flex-basis: 100%; max-width: none; }
  .admin-pagination { align-items: start; flex-wrap: wrap; font-size: 12px; }
  .admin-dialog { padding: 22px; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-heading { flex-wrap: wrap; }
  .admin-heading-actions { width: 100%; justify-content: flex-start; }
  .club-admin-section.clinic-outline { padding: 14px; }
  .clinic-rule, .clinic-session { align-items: stretch; flex-direction: column; }
}
.admin-report-dialog { width: min(720px, calc(100vw - 32px)); box-sizing: border-box; max-height: 90vh; overflow: auto; border: 1px solid #cdd8cf; border-radius: 12px; padding: 24px; color: var(--ink); }
.admin-report-dialog::backdrop { background: rgb(12 35 25 / 55%); }
.admin-report-dialog .report-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; margin: 24px 0; }
