:root {
  --admin-max-width: 760px;
  --admin-page-gutter: 18px;
  color: #17251d;
  background: #f3f6f2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { display: grid; grid-template-rows: auto 1fr auto; margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 6px; color: #54705f; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.admin-header { padding: 20px 0; color: white; background: rgb(31, 122, 85); }
.admin-header > div:first-child { width: min(var(--admin-max-width), calc(100vw - var(--admin-page-gutter) * 2)); min-width: 0; margin: 0 auto; }
.admin-header .eyebrow { margin-top: 8px; color: #a7c8b4; font-size: 14px; letter-spacing: 0; }
.admin-header h1 { margin: -6px 0 0; font-size: 32px; }
.admin-shell { width: min(var(--admin-max-width), calc(100% - var(--admin-page-gutter) * 2)); margin: 28px auto 64px; }
.notice-card, .club-card, .dialog-card { border: 1px solid #dce5de; border-radius: 20px; background: white; box-shadow: 0 12px 34px rgba(25, 55, 38, .08); }
.notice-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; }
.notice-card > div { min-width: 0; }
.notice-card > div:not(.notice-actions) { padding-right: 104px; }
.notice-actions { position: absolute; top: 20px; right: 20px; display: flex; gap: 8px; }
.notice-icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; padding: 0; border: 1px solid #bdd0c2; border-radius: 50%; color: #244c35; background: white; text-decoration: none; cursor: pointer; }
.notice-icon-button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
#logoutButton svg { transform: translateX(1px); }
.notice-card h2, .section-heading h2, .dialog-heading h2 { margin: 0; }
.notice-card p:last-child { margin-bottom: 0; color: #607066; }
#authMessage { margin-top: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 42px; padding: 8px 16px; border: 1px solid transparent; border-radius: 999px; font-weight: 750; line-height: 1.25; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; }
.button.primary { color: white; background: #1e6542; }
.button.secondary { color: #244c35; border-color: #bdd0c2; background: white; }
.admin-header .button.secondary { color: white; border-color: #5f806c; background: transparent; }
.button:disabled { opacity: .55; cursor: wait; }
.admin-content { margin-top: 32px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-heading > div { min-width: 0; }
.button.create-club-button { width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 50%; background: rgb(31, 122, 85); font-size: 28px; font-weight: 800; line-height: 1; }
.page-message, .form-message { min-height: 22px; margin: 10px 0; color: #52635a; }
.page-message:empty { display: none; }
.page-message.error, .form-message.error { color: #a52d2d; }
.club-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.club-card { min-width: 0; padding: 22px; }
.club-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.club-card-head > div { min-width: 0; }
.club-card h3 { margin: 0; overflow-wrap: anywhere; font-size: 21px; line-height: 1.3; }
.club-card .slug { margin: 6px 0 0; overflow-wrap: anywhere; color: #607066; }
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.badge { padding: 5px 9px; border-radius: 999px; color: #31513d; background: #edf3ee; font-size: 13px; font-weight: 700; }
.badge.archived { color: #7b3535; background: #f8e9e9; }
.club-meta { display: grid; gap: 7px; margin: 0 0 18px; color: #5a6b61; font-size: 14px; }
dialog { width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 22px; background: transparent; }
dialog::backdrop { background: rgba(12, 28, 19, .55); }
.dialog-card { max-height: calc(100dvh - 24px); padding: 24px; overflow: auto; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dialog-heading > div { min-width: 0; }
.icon-button { flex: 0 0 auto; width: 38px; height: 38px; border: 0; border-radius: 50%; color: #31513d; background: #edf3ee; font-size: 24px; cursor: pointer; }
label { display: grid; gap: 7px; margin-top: 15px; font-weight: 750; }
input, select { width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid #c6d4ca; border-radius: 11px; color: #17251d; background: white; }
small { color: #65756b; font-weight: 500; line-height: 1.45; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.slug-input { display: flex; align-items: center; border: 1px solid #c6d4ca; border-radius: 11px; overflow: hidden; background: #f6f8f6; }
.slug-input span { flex: 0 0 auto; padding-left: 12px; color: #65756b; white-space: nowrap; }
.slug-input input { min-width: 80px; border: 0; border-radius: 0; background: transparent; }
.toggle-field { grid-template-columns: auto 1fr; align-items: flex-start; padding: 14px; border: 1px solid #d6e0d8; border-radius: 14px; }
.toggle-field input { width: 20px; min-height: 20px; margin-top: 2px; }
.toggle-field span { display: grid; gap: 4px; }
.account-results { display: grid; gap: 7px; margin-top: 8px; }
.account-option, .selected-organizer { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid #d6e0d8; border-radius: 12px; background: #f8faf8; }
.account-option > span, .selected-organizer > span { min-width: 0; overflow-wrap: anywhere; }
.account-option { width: 100%; text-align: left; cursor: pointer; }
.account-option img, .selected-organizer img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #dfe8e1; }
.warning { margin-top: 14px; padding: 12px 14px; border-radius: 12px; color: #72531e; background: #fff5d9; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.site-footer { width: min(var(--admin-max-width), calc(100vw - var(--admin-page-gutter) * 2)); margin: 28px auto 24px; color: #9aaaa2; font-size: 12px; font-weight: 600; text-align: center; }

@media (max-width: 680px) {
  .notice-card { align-items: stretch; flex-direction: column; }
  .admin-shell { margin-top: 20px; }
  .notice-card, .club-card, .dialog-card { border-radius: 16px; }
  .notice-card, .club-card { padding: 18px; }
  .admin-content { margin-top: 24px; }
  .section-heading { gap: 14px; }
  .section-heading { align-items: center; flex-direction: row; }
  .notice-card > .button { width: 100%; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .club-card-head { gap: 12px; }
  .dialog-card { padding: 20px 18px; }
  .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
  :root { --admin-page-gutter: 12px; }
  .admin-header h1 { font-size: 28px; }
}

@media (max-width: 390px) {
  .dialog-actions { grid-template-columns: 1fr; }
  .dialog-actions .button { width: 100%; }
  .club-card-head { flex-direction: column; }
  .club-card-head .button { align-self: flex-start; }
  .slug-input { display: grid; }
  .slug-input span { padding: 9px 12px 0; }
}
