/* ============================================
   GLP Mitgliederbereich — Portal Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --cream:         #f7f4ee;
  --cream-dark:    #f0ece3;
  --green-glow:    #c8f0a0;
  --green-light:   #dff0c8;
  --green-mid:     #9ecf68;
  --green-deep:    #3a7225;
  --green-dark:    #1d4810;
  --text-primary:  #0e1a09;
  --text-secondary:#283d1c;
  --text-muted:    #5a7050;
  --border:        #d4e8bc;
  --border-strong: #a8c88a;
  --glass-bg:      rgba(247,244,238,0.72);
  --glass-border:  rgba(168,200,138,0.35);
  --terracotta:    #b87a5a;
  --terracotta-dark: #9a6145;

  --sidebar-width: 240px;
  --topbar-height: 64px;
  --shell-gap: 16px;
  --panel-gap: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

a { color: var(--green-deep); text-decoration: none; }

/* ---- Glass card ---- */
.glass-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.48), rgba(247,244,238,0.44));
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 22px;
  padding: 1.75rem;
  box-shadow:
    0 1px 1px rgba(255,255,255,0.6) inset,
    0 12px 32px rgba(29,72,16,0.08),
    0 2px 8px rgba(29,72,16,0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: inherit;
  padding: 0.85rem 1.75rem;
  border: none;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.2,.8,.2,1), box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.16) inset, 0 4px 14px rgba(29,72,16,0.2);
}

.btn-primary:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 8px 20px rgba(29,72,16,0.24);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 3px 8px rgba(29,72,16,0.18);
}

.btn-secondary {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 4px 12px rgba(29,72,16,0.06);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.7);
  transform: translateY(-1px);
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(200,240,160,0.35) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(223,240,200,0.35) 0%, transparent 35%),
    var(--cream);
}

.login-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  padding: 2.5rem 2.25rem;
}

.login-card img.logo {
  height: 48px;
  margin-bottom: 1.5rem;
}

.login-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.login-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

.btn-google {
  width: 100%;
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-google:hover {
  background: var(--cream-dark);
}

.btn-google svg { width: 18px; height: 18px; }

.login-status {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.login-status.error { color: var(--terracotta-dark); }

/* ============================================
   APP SHELL
   ============================================ */

.app-shell {
  display: flex;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(200,240,160,0.35) 0%, transparent 35%),
    radial-gradient(circle at 85% 90%, rgba(223,240,200,0.35) 0%, transparent 40%),
    var(--cream);
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 26px;
  box-shadow:
    0 1px 1px rgba(255,255,255,0.6) inset,
    0 16px 40px rgba(29,72,16,0.08);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.75rem;
  position: fixed;
  top: var(--shell-gap);
  left: var(--shell-gap);
  bottom: var(--shell-gap);
  overflow-y: auto;
  z-index: 20;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.75rem;
  margin-bottom: 1rem;
}

.sidebar-logo + .sidebar-divider { margin-top: 0; }

.sidebar-logo img { height: 58px; }

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.55);
  text-decoration: none;
}

.sidebar-nav a.active {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  color: var(--green-dark);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 4px 14px rgba(29,72,16,0.1);
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.75rem 0.9rem;
}

.sidebar-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.5rem 0.9rem 0.25rem;
  font-weight: 700;
}

/* ---- Top bar ---- */
.topbar {
  position: fixed;
  top: var(--shell-gap);
  left: calc(var(--sidebar-width) + var(--shell-gap) + var(--panel-gap));
  right: var(--shell-gap);
  height: var(--topbar-height);
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 22px;
  box-shadow:
    0 1px 1px rgba(255,255,255,0.6) inset,
    0 12px 32px rgba(29,72,16,0.07);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.75rem;
  z-index: 10;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-user img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.topbar-user span {
  font-weight: 600;
  font-size: 0.9rem;
}

.topbar-logout {
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 100px;
  padding: 0.45rem 1.1rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.18s ease, transform 0.18s ease;
}

.topbar-logout:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }

/* ---- Content area ---- */
.content {
  margin-left: calc(var(--sidebar-width) + var(--shell-gap) + var(--panel-gap));
  margin-top: calc(var(--shell-gap) + var(--topbar-height) + var(--panel-gap));
  margin-right: var(--shell-gap);
  margin-bottom: var(--shell-gap);
  padding: 0;
  width: 100%;
}

.content > .glass-card,
.content > h2 {
  width: 100%;
  box-sizing: border-box;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-120%);
    transition: transform 0.2s ease;
    width: 220px;
  }
  .sidebar.open { transform: translateX(0); }

  .topbar { left: var(--shell-gap); }
  .content { margin-left: var(--shell-gap); margin-right: var(--shell-gap); padding: 0; }

  .hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: transparent;
    margin-right: auto;
    cursor: pointer;
  }
}

@media (min-width: 769px) {
  .hamburger-btn { display: none; }
}

/* ============================================
   NETZWERK (member grid)
   ============================================ */

.content-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.network-section { margin-bottom: 1.5rem; }

.network-section:last-child { margin-bottom: 0; }

.network-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .network-grid { grid-template-columns: repeat(2, 1fr); }
}

.member-card {
  text-align: center;
  padding: 1.1rem 0.85rem;
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 18px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.member-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.65);
}

.member-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--green-light);
  margin-bottom: 0.65rem;
}

.member-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.member-card .member-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.member-card .member-contact {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
  word-break: break-word;
}

.member-card .member-contact a { color: var(--green-deep); }

/* ============================================
   PROFIL (edit own profile)
   ============================================ */

.profile-form {
  width: 100%;
}

.profile-avatar-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 2.25rem;
}

.profile-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.profile-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
  max-width: 760px;
}

@media (max-width: 640px) {
  .profile-fields-grid { grid-template-columns: 1fr; }
}

.profile-avatar-row img {
  width: 128px;
  height: 128px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: var(--green-light);
}

.profile-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-avatar-actions .btn {
  padding: 0.5rem 1.1rem;
  font-size: 0.8rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(168,200,138,0.4);
  background: rgba(255,255,255,0.6);
  color: var(--text-primary);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-group textarea {
  line-height: 1.55;
  resize: vertical;
  min-height: 5.5rem;
}

.form-group input:disabled {
  background: rgba(240,236,227,0.6);
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-mid);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 4px rgba(158,207,104,0.22);
}

.event-form { margin-bottom: 1.5rem; }

.admin-event-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-event-block {
  background: rgba(255,255,255,0.4);
  border-radius: 14px;
  overflow: hidden;
}

.admin-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
}

.admin-event-row-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.admin-event-edit-panel {
  display: none;
  padding: 0 1.25rem 1.25rem;
}

.admin-event-block.open .admin-event-edit-panel { display: block; }

.admin-library-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-library-block {
  background: rgba(255,255,255,0.4);
  border-radius: 14px;
  overflow: hidden;
}

.admin-library-edit-panel {
  display: none;
  padding: 0 1.25rem 1.25rem;
}

.admin-library-block.open .admin-library-edit-panel { display: block; }

.form-status {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--green-deep);
  font-weight: 600;
}

.form-status.error { color: var(--terracotta-dark); }

/* ============================================
   WORKSPACE
   ============================================ */

.workspace-intro { max-width: 560px; color: var(--text-muted); margin-bottom: 1.75rem; }

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 900px;
}

@media (max-width: 720px) {
  .workspace-grid { grid-template-columns: repeat(2, 1fr); }
}

.workspace-app-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  padding: 1.75rem;
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 18px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.workspace-app-card:hover {
  transform: translateY(-2px);
  text-decoration: none;
  background: rgba(255,255,255,0.65);
}

.workspace-app-card .app-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.workspace-app-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.workspace-app-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   ADMIN
   ============================================ */

.admin-member-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-member-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.4);
}

.admin-member-row img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--green-light);
  flex-shrink: 0;
}

.admin-member-info { flex: 1; min-width: 0; }

.admin-member-name { font-weight: 700; font-size: 0.9rem; }

.admin-member-email { font-size: 0.78rem; color: var(--text-muted); }

.admin-upload-btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.admin-member-block {
  background: rgba(255,255,255,0.4);
  border-radius: 14px;
  overflow: hidden;
}

.admin-member-block .admin-member-row { background: transparent; }

.admin-member-edit-panel {
  display: none;
  padding: 0 1.25rem 1.25rem;
}

.admin-member-block.open .admin-member-edit-panel { display: block; }

.admin-edit-photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--green-light);
  border: 1px solid var(--border-strong);
}

/* ============================================
   EVENTS / REGISTRATION
   ============================================ */

.event-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-card {
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
}

.event-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.event-card-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.event-category-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green-deep);
  background: rgba(158,207,104,0.25);
  border-radius: 100px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.4rem;
}

.event-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.event-description {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.event-attendees {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(168,200,138,0.3);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.event-register-btn,
.event-unregister-btn {
  padding: 0.55rem 1.25rem;
  font-size: 0.8rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-section-divider {
  border: none;
  border-top: 1px solid rgba(168,200,138,0.3);
  margin: 1.75rem 0;
}

/* ---- Member detail modal ---- */
.member-card { cursor: pointer; }

.member-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,26,9,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.member-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  text-align: center;
  background: rgba(247,244,238,0.92);
}

.member-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.6);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
}

.member-modal img {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--green-light);
  margin: 0 auto 0.9rem;
  display: block;
}

.member-modal h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }

.member-modal-email {
  display: inline-block;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.member-modal-fields {
  text-align: left;
  border-top: 1px solid rgba(168,200,138,0.3);
  padding-top: 1rem;
}

.member-modal-field {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  padding: 0.4rem 0;
}

.member-modal-label {
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================
   BIBLIOTHEK
   ============================================ */

.library-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.library-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 14px;
}

.library-item-icon { font-size: 1.5rem; flex-shrink: 0; }

.library-item-info { flex: 1; min-width: 0; }

.library-item-title { font-weight: 700; font-size: 0.9rem; }

.library-item-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }

.library-category-block { margin-bottom: 1.5rem; }

.library-category-block h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

/* ============================================
   NEWS & BEREICHE
   ============================================ */

.news-department-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
  .news-department-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
  .news-department-cards { grid-template-columns: repeat(2, 1fr); }
}

.news-department-card {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.45);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.news-department-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.65);
}

.news-feed {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.news-entry {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(168,200,138,0.25);
}

.news-entry:last-child { border-bottom: none; padding-bottom: 0; }

.news-entry-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.news-entry-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; }

.news-entry-body { font-size: 0.88rem; color: var(--text-secondary); }

/* ============================================
   MOBILE CONTENT FIXES
   ============================================ */

@media (max-width: 640px) {
  /* Bibliothek: title, description, then button — stacked, not squeezed into a row */
  .library-item {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 0.6rem;
  }

  .library-item-icon { display: none; }

  .library-item .btn { width: 100%; }

  /* Teams und Mitglieder: always 2 columns, never collapse to 1 */
  .network-grid { grid-template-columns: repeat(2, 1fr); }

  /* Event cards (registration pages + Mein Kalender): button under the text, title/meta get full width */
  .event-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .event-card-header .event-register-btn,
  .event-card-header .event-unregister-btn {
    width: 100%;
  }

  /* Admin rows: actions go under the text instead of overflowing */
  .admin-member-row,
  .admin-event-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .admin-event-row-actions { width: 100%; }

  .admin-event-row-actions .btn { flex: 1; }
}

/* ============================================
   RICH TEXT (news, event, library descriptions)
   ============================================ */

.news-entry-body p,
.event-description p,
.library-item-desc p {
  margin-bottom: 0.6rem;
}

.news-entry-body p:last-child,
.event-description p:last-child,
.library-item-desc p:last-child {
  margin-bottom: 0;
}

.rich-text-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
}

.rich-text-list:last-child { margin-bottom: 0; }

.rich-text-list li { margin-bottom: 0.3rem; }

.rich-text-list li:last-child { margin-bottom: 0; }

/* ============================================
   ADMIN BLOG
   ============================================ */

.blog-category-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem 1rem;
  background: rgba(255,255,255,0.4);
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.blog-category-checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
