.admin-shell {
  padding-bottom: 48px;
}

.login-card,
.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(22px, 5vw, 36px);
}

.login-card {
  max-width: 480px;
  margin: clamp(28px, 7vw, 80px) auto 0;
}

.login-card h1 {
  font-size: clamp(25px, 5vw, 32px);
  font-weight: 400;
  letter-spacing: -.04em;
  margin: 0 0 26px;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form[hidden] {
  display: none;
}

.login-form label {
  font-size: 15px;
}

.login-form input {
  width: 100%;
  min-height: 49px;
  margin: 0 0 10px;
  border: 1px solid #cec4b3;
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.login-form input:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

.login-form .primary-button {
  margin-top: 6px;
}

.login-error {
  color: #793b31;
  line-height: 1.55;
}

.logout-button {
  min-height: 44px;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}

.admin-grid .icon-box {
  font-size: 23px;
}

.section-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 480px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid .section-card {
    min-height: 128px;
  }
}

.task-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.task-row h2 {
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.task-row p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.task-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.task-actions .danger {
  color: #793b31;
}

.task-editor {
  max-width: 680px;
}

.task-editor textarea,
.task-editor select {
  width: 100%;
  border: 1px solid #cec4b3;
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  margin-bottom: 10px;
}

.task-editor input,
.task-editor select,
.task-editor textarea {
  min-width: 0;
}

.task-editor textarea {
  resize: vertical;
}

.task-editor .task-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-editor .task-checkbox input {
  width: auto;
  min-height: 24px;
  margin: 0;
}

.task-preview {
  width: min(100%, 240px);
  max-height: 180px;
  object-fit: contain;
  object-position: left;
  border-radius: 12px;
}

.ritual-period {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
}

.ritual-period label {
  display: block;
  margin-bottom: 9px;
}

.ritual-files {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 10px;
}

.ritual-files ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ritual-files li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.ritual-files a {
  overflow-wrap: anywhere;
}

#ritual-help {
  font-size: .85rem;
  margin-bottom: 12px;
}

.news-link-fields,
.news-editor-field {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 10px;
}

.news-link-fields summary {
  cursor: pointer;
}

.news-link-fields fieldset {
  margin: 12px 0 0;
}

.news-link-fields input {
  margin-top: 6px;
}

.news-previews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.meditation-order {
  display: flex;
  flex-wrap: wrap;
}

.meditation-order .text-button:disabled {
  color: var(--muted);
  opacity: .5;
}

.club-search { margin-block: 22px; }
.club-participant-list, .club-events { display: grid; gap: 10px; list-style: none; padding: 0; }
.club-participant-list .admin-card { margin: 0; overflow-wrap: anywhere; }
.club-participant-list .member-facts { margin-block: 10px 0; }
.club-participant-list h3, .club-events p { margin: 0; }
.club-events li { padding: 10px 0; border-bottom: 1px solid var(--line); }

/* Owner membership controls remain visible before forms and participant cards. */
.member-add { margin: 0 0 20px; }
.member-add > summary { list-style: none; cursor: pointer; }
.member-add > summary::-webkit-details-marker { display: none; }
.member-add-trigger { background: #876b3b; color: #fff; min-height: 52px; font-weight: 500; margin: 0 0 16px; }
.member-add-trigger:hover { background: #6c542d; }
.member-add[open] > .admin-card { margin-top: 4px; }
.member-add .login-form select { width: 100%; min-height: 44px; font: inherit; }
@media (max-width: 600px) { .member-add-trigger { width: 100%; } }
