/* =========================================================
   CB Camera Club - Members Area
   ========================================================= */

.members-content {
  max-width: none;
  width: 100%;
  margin: 0 0 40px;
  padding: 34px 40px;
}

.members-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #dce8f5;
}

.members-heading-main h1,
.members-heading h1 {
  margin: 0;
  color: var(--cb-blue);
  font-size: 2rem;
  line-height: 1.2;
}

.members-heading-main p,
.members-heading p {
  margin: 4px 0 0;
  color: var(--cb-muted-text);
}

.members-heading-side {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.member-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

.member-pill {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #eaf1fb;
  color: var(--cb-blue);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
}

.member-login-panel,
.member-password-panel {
  max-width: 560px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.member-form-row {
  margin-bottom: 15px;
}

.member-form-row label {
  display: block;
  margin-bottom: 5px;
  color: var(--cb-text);
  font-weight: 700;
}

.member-form-row input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ccd6e0;
  border-radius: 7px;
  background: #ffffff;
  color: var(--cb-text);
  font-size: 1rem;
}

.member-form-row input:focus {
  border-color: var(--cb-blue);
  outline: 3px solid rgba(0, 91, 170, 0.15);
}

.member-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid var(--cb-blue);
  border-radius: 8px;
  background: var(--cb-blue);
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.member-button:hover {
  background: var(--cb-deep-blue);
  border-color: var(--cb-deep-blue);
  color: #ffffff;
  text-decoration: none;
}

.member-button-secondary {
  border-color: var(--cb-blue);
  background: #ffffff;
  color: var(--cb-blue);
}

.member-button-secondary:hover {
  background: var(--cb-blue);
  color: #ffffff;
}

.member-message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 700;
}

.member-message.error {
  border: 1px solid #f0b8b8;
  background: #fff1f1;
  color: #9b1c1c;
}

.member-message.success {
  border: 1px solid #b7dfc2;
  background: #eef9f1;
  color: #1c6b33;
}

.member-message.info {
  border: 1px solid #c9ddec;
  background: #f2f7fc;
  color: var(--cb-deep-blue);
}

.password-rules {
  margin: 0 0 16px;
  color: var(--cb-muted-text);
  font-size: 0.95rem;
}

/* Dashboard cards */

.member-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.member-dashboard-card {
  position: relative;
  display: flex;
  min-height: 190px;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-dashboard-card::before {
  content: "";
  position: absolute;
  top: -42px;
  right: -42px;
  width: 115px;
  height: 115px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.member-dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.10);
}

.member-dashboard-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: #0e1b2a;
  font-size: 1.25rem;
  line-height: 1.25;
}

.member-dashboard-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #334155;
}

.member-dashboard-card-footer {
  position: relative;
  z-index: 1;
  margin-top: 22px;
}

.member-dashboard-card-footer span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: #0e1b2a;
  font-size: 0.82rem;
  font-weight: 800;
}

.card-documents {
  background: linear-gradient(135deg, #fdf2d0, #fff8e6);
}

.card-notices {
  background: linear-gradient(135deg, #dbeafe, #eef6ff);
}

.card-tea {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
}

.card-youtube {
  background: linear-gradient(135deg, #ffe4e6, #fff1f2);
}

.card-admin {
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
}

/* Responsive */

@media (max-width: 900px) {
  .members-heading {
    display: block;
  }

  .members-heading-side {
    margin-top: 16px;
    justify-content: flex-start;
  }

  .member-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .members-content {
    padding: 28px 22px;
  }

  .members-heading-main h1,
  .members-heading h1 {
    font-size: 1.65rem;
  }

  .member-login-panel,
  .member-password-panel {
    padding: 22px 18px;
  }

  .member-button {
    width: 100%;
  }

  .members-heading-side {
    align-items: stretch;
    flex-direction: column;
  }

  .member-meta {
    width: 100%;
  }

  .member-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Members Admin Area
   ========================================================= */

.admin-panel,
.admin-form-panel {
  padding: 24px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.admin-panel h2,
.admin-role-panel h2 {
  margin: 0 0 14px;
  color: var(--cb-deep-blue);
  font-size: 1.35rem;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-users-table th,
.admin-users-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf0f2;
  text-align: left;
  vertical-align: top;
}

.admin-users-table th {
  color: var(--cb-blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-users-table tr:last-child td {
  border-bottom: 0;
}

.admin-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-status.is-active {
  background: #dcfce7;
  color: #166534;
}

.admin-status.is-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.admin-status.must-change {
  background: #fef3c7;
  color: #92400e;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

.member-form-row select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ccd6e0;
  border-radius: 7px;
  background: #ffffff;
  color: var(--cb-text);
  font-size: 1rem;
}

.admin-active-row {
  display: flex;
  align-items: end;
}

.admin-active-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  font-weight: 800;
}

.admin-active-row input {
  width: auto;
  min-height: 0;
}

.admin-role-panel {
  margin: 10px 0 22px;
  padding: 20px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fbff;
}

.admin-role-panel p {
  margin: 0 0 14px;
  color: var(--cb-muted-text);
}

.admin-role-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.admin-role-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dce8f5;
  border-radius: 10px;
  background: #ffffff;
  font-weight: 700;
}

.admin-role-checkbox input {
  width: auto;
  min-height: 0;
}

@media (max-width: 850px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-users-table,
  .admin-users-table thead,
  .admin-users-table tbody,
  .admin-users-table th,
  .admin-users-table td,
  .admin-users-table tr {
    display: block;
  }

  .admin-users-table thead {
    display: none;
  }

  .admin-users-table tr {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #edf0f2;
    border-radius: 12px;
  }

  .admin-users-table td {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .admin-users-table td:last-child {
    border-bottom: 0;
  }

  .admin-users-table td::before {
    content: attr(data-label);
    color: var(--cb-blue);
    font-weight: 800;
  }
}

/* =========================================================
   Admin search, edit and delete tools
   ========================================================= */

.admin-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.admin-search-wrap {
  width: 420px;
  max-width: 100%;
}

.admin-search-wrap label {
  display: block;
  margin-bottom: 5px;
  color: var(--cb-text);
  font-weight: 800;
}

.admin-search-wrap input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ccd6e0;
  border-radius: 7px;
  background: #ffffff;
  color: var(--cb-text);
  font-size: 1rem;
}

.admin-search-wrap input:focus {
  border-color: var(--cb-blue);
  outline: 3px solid rgba(0, 91, 170, 0.15);
}

.admin-no-results {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--cb-deep-blue);
  font-weight: 800;
  text-align: center;
}

.admin-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--cb-blue);
  border-radius: 8px;
  background: #ffffff;
  color: var(--cb-blue);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.admin-action-link:hover {
  background: var(--cb-blue);
  color: #ffffff;
  text-decoration: none;
}

.admin-password-panel {
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid #dce8f5;
  border-radius: 12px;
  background: #f8fbff;
}

.admin-password-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.admin-password-panel input {
  width: auto;
}

.admin-danger-panel {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid #f0b8b8;
  border-radius: 14px;
  background: #fff7f7;
}

.admin-danger-panel h2 {
  margin: 0 0 10px;
  color: #9b1c1c;
  font-size: 1.25rem;
}

.admin-danger-panel p {
  margin: 0 0 16px;
  color: #6b1c1c;
}

.member-button-danger {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #ffffff;
}

.member-button-danger:hover {
  border-color: #7f1d1d;
  background: #7f1d1d;
  color: #ffffff;
}

.member-form-row input[readonly] {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
}

@media (max-width: 850px) {
  .admin-panel-heading {
    display: block;
  }

  .admin-search-wrap {
    width: 100%;
    margin-top: 14px;
  }
}

/* =========================================================
   Clickable dashboard cards and Club Documents
   ========================================================= */

.member-dashboard-card-link {
  color: inherit;
  text-decoration: none;
}

.member-dashboard-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.member-dashboard-card-link:hover .member-dashboard-card-footer span {
  background: rgba(255, 255, 255, 0.9);
}

.member-dashboard-card-disabled {
  opacity: 0.92;
}

.documents-intro-panel {
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fbff;
}

.documents-intro-panel h2 {
  margin: 0 0 8px;
  color: var(--cb-deep-blue);
  font-size: 1.3rem;
}

.documents-intro-panel p {
  margin: 0;
  color: var(--cb-muted-text);
}

.documents-section {
  margin-top: 26px;
}

.documents-section h2 {
  margin: 0 0 16px;
  color: var(--cb-blue);
  font-size: 1.45rem;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.document-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.document-card h3 {
  margin: 0 0 10px;
  color: var(--cb-deep-blue);
  font-size: 1.18rem;
}

.document-card p {
  margin: 0;
  color: var(--cb-muted-text);
}

.document-card-footer {
  margin-top: 20px;
}

.document-status {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 700px) {
  .documents-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Dynamic Club Documents PDF viewer
   ========================================================= */

.documents-viewer-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.documents-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 760px;
  padding-right: 4px;
}

.document-selector-card {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  color: #0e1b2a;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.document-selector-card::before {
  content: "";
  position: absolute;
  top: -38px;
  right: -38px;
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.document-selector-card:hover,
.document-selector-card.active {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}

.document-selector-card.active {
  border-color: var(--cb-blue);
}

.document-selector-category,
.document-selector-title,
.document-selector-description,
.document-selector-status {
  position: relative;
  z-index: 1;
}

.document-selector-category {
  display: block;
  margin-bottom: 8px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.document-selector-title {
  display: block;
  margin-bottom: 8px;
  color: #0e1b2a;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.25;
}

.document-selector-description {
  display: block;
  margin-bottom: 14px;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
}

.document-selector-status {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: #0e1b2a;
  font-size: 0.78rem;
  font-weight: 900;
}

.document-selector-status.is-ready {
  background: rgba(255, 255, 255, 0.85);
  color: #166534;
}

.document-selector-status.is-missing {
  background: #fef3c7;
  color: #92400e;
}

.document-accent-blue {
  background: linear-gradient(135deg, #dbeafe, #eef6ff);
}

.document-accent-yellow {
  background: linear-gradient(135deg, #fdf2d0, #fff8e6);
}

.document-accent-green {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
}

.document-accent-purple {
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
}

.document-accent-pink {
  background: linear-gradient(135deg, #ffe4e6, #fff1f2);
}

.document-accent-orange {
  background: linear-gradient(135deg, #ffedd5, #fff7ed);
}

.documents-pdf-panel {
  display: flex;
  min-height: 760px;
  flex-direction: column;
  border: 1px solid #e6e8ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.documents-pdf-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid #e6e8ec;
  background: #f8fbff;
}

.documents-pdf-heading h2 {
  margin: 0 0 6px;
  color: var(--cb-deep-blue);
  font-size: 1.35rem;
}

.documents-pdf-heading p {
  margin: 0;
  color: var(--cb-muted-text);
}

.documents-pdf-frame-wrap {
  flex: 1;
  min-height: 680px;
  background: #f1f5f9;
}

.documents-pdf-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 680px;
  border: 0;
  background: #ffffff;
}

.documents-empty-state {
  display: flex;
  min-height: 680px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px;
  text-align: center;
}

.documents-empty-state h3 {
  margin: 0 0 10px;
  color: var(--cb-deep-blue);
  font-size: 1.4rem;
}

.documents-empty-state p {
  max-width: 520px;
  margin: 0;
  color: var(--cb-muted-text);
}

@media (max-width: 1000px) {
  .documents-viewer-layout {
    grid-template-columns: 1fr;
  }

  .documents-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .documents-pdf-panel {
    min-height: 640px;
  }

  .documents-pdf-frame-wrap,
  .documents-pdf-frame-wrap iframe,
  .documents-empty-state {
    min-height: 560px;
  }
}

@media (max-width: 700px) {
  .documents-pdf-heading {
    display: block;
  }

  .documents-pdf-heading .member-button {
    width: 100%;
    margin-top: 14px;
  }
}

/* =========================================================
   Club Documents tidy-up / wider PDF viewer
   ========================================================= */

.documents-viewer-layout-wide {
  grid-template-columns: minmax(230px, 28%) minmax(0, 72%);
  gap: 26px;
}

.documents-viewer-layout-wide .documents-sidebar {
  max-height: 760px;
  overflow-y: auto;
  padding: 4px 6px 4px 0;
}

.documents-viewer-layout-wide .document-selector-card {
  min-height: 148px;
  padding: 20px 18px;
  border-radius: 18px;
}

.documents-viewer-layout-wide .document-selector-card::before {
  top: -44px;
  right: -44px;
  width: 105px;
  height: 105px;
}

.documents-viewer-layout-wide .document-selector-title {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.documents-viewer-layout-wide .document-selector-description {
  margin-bottom: 18px;
  font-size: 0.9rem;
}

.documents-viewer-layout-wide .document-selector-description p {
  margin: 0 0 8px;
}

.documents-viewer-layout-wide .document-selector-description p:last-child {
  margin-bottom: 0;
}

.documents-viewer-layout-wide .document-selector-status {
  margin-top: auto;
}

.documents-viewer-layout-wide .documents-pdf-panel {
  min-height: 790px;
}

.documents-viewer-layout-wide .documents-pdf-frame-wrap,
.documents-viewer-layout-wide .documents-pdf-frame-wrap iframe,
.documents-viewer-layout-wide .documents-empty-state {
  min-height: 705px;
}

@media (max-width: 1100px) {
  .documents-viewer-layout-wide {
    grid-template-columns: minmax(220px, 32%) minmax(0, 68%);
  }
}

@media (max-width: 900px) {
  .documents-viewer-layout-wide {
    grid-template-columns: 1fr;
  }

  .documents-viewer-layout-wide .documents-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .documents-viewer-layout-wide .documents-pdf-panel {
    min-height: 640px;
  }

  .documents-viewer-layout-wide .documents-pdf-frame-wrap,
  .documents-viewer-layout-wide .documents-pdf-frame-wrap iframe,
  .documents-viewer-layout-wide .documents-empty-state {
    min-height: 560px;
  }
}

/* =========================================================
   Member Notices
   ========================================================= */

.notices-intro-panel,
.notice-editor-panel,
.notice-admin-list-panel {
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.notices-intro-panel h2,
.notice-editor-panel h2,
.notice-admin-list-panel h2 {
  margin: 0 0 8px;
  color: var(--cb-deep-blue);
  font-size: 1.35rem;
}

.notices-intro-panel p,
.notice-editor-panel p,
.notice-admin-list-panel p {
  margin: 0;
  color: var(--cb-muted-text);
}

.member-notices-list {
  display: grid;
  gap: 20px;
}

.member-notice-card {
  padding: 24px;
  border: 1px solid #e6e8ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.member-notice-card.notice-important {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.member-notice-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f2;
}

.member-notice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.member-notice-card h2 {
  margin: 0;
  color: var(--cb-deep-blue);
  font-size: 1.45rem;
}

.member-notice-date {
  color: var(--cb-muted-text);
  font-weight: 800;
  white-space: nowrap;
}

.member-notice-body {
  color: var(--cb-text);
  line-height: 1.7;
}

.member-notice-body p {
  margin: 0 0 12px;
}

.member-notice-body ul,
.member-notice-body ol {
  margin: 0 0 12px 22px;
}

.member-notice-body a {
  color: var(--cb-blue);
  font-weight: 700;
}

.member-notice-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #edf0f2;
  color: var(--cb-muted-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.notice-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eaf1fb;
  color: var(--cb-blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.notice-pill-pinned {
  background: #ede9fe;
  color: #5b21b6;
}

.notice-pill-important {
  background: #fef3c7;
  color: #92400e;
}

.notice-pill-inactive {
  background: #fee2e2;
  color: #991b1b;
}

/* Notice admin */

.notice-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.member-form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd6e0;
  border-radius: 7px;
  background: #ffffff;
  color: var(--cb-text);
  font-size: 1rem;
  resize: vertical;
}

.member-form-row textarea:focus {
  border-color: var(--cb-blue);
  outline: 3px solid rgba(0, 91, 170, 0.15);
}

.notice-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.notice-option-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid #dce8f5;
  border-radius: 12px;
  background: #ffffff;
  font-weight: 800;
}

.notice-option-card input {
  width: auto;
}

.notice-future-panel {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px dashed #c9ddec;
  border-radius: 12px;
  background: #ffffff;
}

.notice-future-panel h3 {
  margin: 0 0 8px;
  color: var(--cb-deep-blue);
  font-size: 1.05rem;
}

.notice-future-panel p {
  margin: 0;
  color: var(--cb-muted-text);
}

.notice-admin-list {
  display: grid;
  gap: 14px;
}

.notice-admin-item {
  padding: 16px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #ffffff;
}

.notice-admin-item.is-inactive {
  opacity: 0.7;
  background: #f8fafc;
}

.notice-admin-item h3 {
  margin: 0 0 6px;
  color: var(--cb-deep-blue);
  font-size: 1.1rem;
}

.notice-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.admin-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--cb-blue);
  border-radius: 8px;
  background: #ffffff;
  color: var(--cb-blue);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.admin-action-button:hover {
  background: var(--cb-blue);
  color: #ffffff;
}

.form-help {
  margin-top: 5px;
  color: var(--cb-muted-text);
  font-size: 0.88rem;
}

@media (max-width: 1000px) {
  .notice-admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .member-notice-header {
    display: block;
  }

  .member-notice-date {
    margin-top: 10px;
  }
}

/* =========================================================
   Notice email delivery
   ========================================================= */

.notice-option-card-email {
  background: #eef6ff;
  border-color: #c9ddec;
}

.notice-email-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.notice-email-preview,
.notice-email-confirm-panel {
  padding: 22px 24px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.notice-email-preview h2,
.notice-email-confirm-panel h2 {
  margin: 0 0 14px;
  color: var(--cb-deep-blue);
  font-size: 1.35rem;
}

.notice-email-preview-card {
  padding: 22px;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  background: #ffffff;
}

.notice-email-preview-card h3 {
  margin: 12px 0 14px;
  color: var(--cb-deep-blue);
  font-size: 1.35rem;
}

.notice-email-confirm-panel p {
  margin: 0 0 12px;
  color: var(--cb-muted-text);
}

.notice-email-recipient-count {
  margin: 12px 0;
  color: var(--cb-blue);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 900px) {
  .notice-email-layout {
    grid-template-columns: 1fr;
  }
}

.notice-rich-editor {
  min-height: 230px;
  padding: 13px 14px;
  border: 1px solid #ccd6e0;
  border-radius: 9px;
  background: #ffffff;
  color: var(--cb-text);
  font-size: 1rem;
  line-height: 1.65;
  outline: none;
  overflow-y: auto;
}

.notice-rich-editor:focus {
  border-color: var(--cb-blue);
  outline: 3px solid rgba(0, 91, 170, 0.15);
}

.notice-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
}

.notice-editor-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
}

.notice-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.notice-editor-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #c9ddec;
  border-radius: 8px;
  background: #ffffff;
  color: var(--cb-blue);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.notice-editor-toolbar button:hover {
  background: var(--cb-blue);
  border-color: var(--cb-blue);
  color: #ffffff;
}

/* =========================================================
   Notices pagination
   ========================================================= */

.notice-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  padding: 18px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.notice-pagination-side {
  display: flex;
  justify-content: flex-start;
  min-height: 40px;
}

.notice-pagination-side-right {
  justify-content: flex-end;
}

.notice-page-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eaf1fb;
  color: var(--cb-deep-blue);
  font-size: 0.95rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.notice-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid var(--cb-blue);
  border-radius: 8px;
  background: #ffffff;
  color: var(--cb-blue);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.notice-page-link:hover {
  background: var(--cb-blue);
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 700px) {
  .notice-pagination {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .notice-pagination-side,
  .notice-pagination-side-right {
    justify-content: center;
  }

  .notice-page-link {
    width: 100%;
  }

  .notice-page-status {
    width: 100%;
  }
}

/* =========================================================
   Notice admin email status tidy-up
   ========================================================= */

.notice-admin-email-summary {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  background: #f8fbff;
}

.notice-admin-email-summary-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.notice-email-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.notice-email-status-not-sent {
  background: #f1f5f9;
  color: #475569;
}

.notice-email-status-test {
  background: #fff7ed;
  color: #92400e;
}

.notice-email-status-sent {
  background: #dcfce7;
  color: #166534;
}

.notice-email-status-warning {
  background: #fef3c7;
  color: #92400e;
}

.notice-email-status-failed {
  background: #fee2e2;
  color: #991b1b;
}

.notice-email-mode {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eaf1fb;
  color: var(--cb-blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.notice-admin-email-detail {
  margin-top: 4px;
  color: var(--cb-muted-text);
  font-size: 0.88rem;
  line-height: 1.4;
}

.notice-admin-email-detail strong {
  color: var(--cb-text);
}

/* =========================================================
   Tea Rota
   ========================================================= */

.tea-next-panel {
  margin-bottom: 26px;
  padding: 30px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(187, 247, 208, 0.85), transparent 34%),
    linear-gradient(135deg, #eff6ff, #ffffff);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
}

.tea-next-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tea-next-panel h2 {
  margin: 0 0 18px;
  color: var(--cb-deep-blue);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.tea-duty-members {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tea-duty-members span {
  display: inline-flex;
  padding: 12px 16px;
  border-radius: 14px;
  background: #ffffff;
  color: var(--cb-deep-blue);
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.tea-duty-notes {
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--cb-text);
  line-height: 1.65;
}

.tea-duty-notes p,
.tea-rota-notes p {
  margin: 0 0 10px;
}

.tea-duty-notes p:last-child,
.tea-rota-notes p:last-child {
  margin-bottom: 0;
}

.tea-upcoming-panel,
.tea-editor-panel,
.tea-admin-list-panel {
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.tea-upcoming-panel h2,
.tea-editor-panel h2,
.tea-admin-list-panel h2 {
  margin: 0 0 16px;
  color: var(--cb-deep-blue);
  font-size: 1.35rem;
}

.tea-empty-note {
  margin: 0;
  color: var(--cb-muted-text);
}

.tea-rota-list {
  display: grid;
  gap: 14px;
}

.tea-rota-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.6fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  background: #ffffff;
}

.tea-rota-item h3 {
  margin: 0 0 6px;
  color: var(--cb-deep-blue);
  font-size: 1.15rem;
}

.tea-rota-members {
  color: var(--cb-text);
  font-weight: 900;
}

.tea-rota-members span {
  margin: 0 6px;
  color: var(--cb-muted-text);
}

.tea-rota-notes {
  color: var(--cb-muted-text);
  line-height: 1.55;
}

/* Tea rota admin */

.tea-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.member-form-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd6e0;
  border-radius: 7px;
  background: #ffffff;
  color: var(--cb-text);
  font-size: 1rem;
}

.member-form-row select:focus {
  border-color: var(--cb-blue);
  outline: 3px solid rgba(0, 91, 170, 0.15);
}

.tea-admin-list {
  display: grid;
  gap: 14px;
}

.tea-admin-item {
  padding: 16px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #ffffff;
}

.tea-admin-item.is-past {
  background: #f8fafc;
}

.tea-admin-item.is-inactive {
  opacity: 0.7;
}

.tea-admin-item h3 {
  margin: 0 0 6px;
  color: var(--cb-deep-blue);
  font-size: 1.1rem;
}

.tea-admin-item p {
  margin: 0;
  color: var(--cb-text);
  font-weight: 800;
}

.tea-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.admin-action-button.danger {
  border-color: #b91c1c;
  color: #b91c1c;
}

.admin-action-button.danger:hover {
  background: #b91c1c;
  color: #ffffff;
}

@media (max-width: 1000px) {
  .tea-admin-layout,
  .tea-rota-item {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Tea Rota minor amendments
   ========================================================= */

.tea-member-row {
  margin-top: 0;
}

.tea-bulk-delete-panel {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
}

.tea-bulk-delete-panel h3 {
  margin: 0 0 8px;
  color: #991b1b;
  font-size: 1.05rem;
}

.tea-bulk-delete-panel p {
  margin: 0 0 12px;
  color: #7f1d1d;
  line-height: 1.5;
}

/* =========================================================
   YouTube Tutorials
   ========================================================= */

.tutorial-player-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
  padding: 26px;
  border: 1px solid #e6e8ec;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(219, 234, 254, 0.95), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
}

.tutorial-player-label {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tutorial-player-panel h2 {
  margin: 0 0 12px;
  color: var(--cb-deep-blue);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.tutorial-player-panel p {
  margin: 0;
  color: var(--cb-muted-text);
  line-height: 1.6;
}

.tutorial-video-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #111827;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.15);
}

.tutorial-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tutorial-controls-panel {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  background: #ffffff;
}

.tutorial-search-wrap {
  margin-bottom: 16px;
}

.tutorial-search-wrap label {
  display: block;
  margin-bottom: 7px;
  color: var(--cb-text);
  font-weight: 900;
}

.tutorial-search-wrap input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #ccd6e0;
  border-radius: 9px;
  background: #ffffff;
  color: var(--cb-text);
  font-size: 1rem;
}

.tutorial-search-wrap input:focus {
  border-color: var(--cb-blue);
  outline: 3px solid rgba(0, 91, 170, 0.15);
}

.tutorial-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tutorial-filter {
  padding: 8px 13px;
  border: 1px solid #dce8f5;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--cb-blue);
  font-weight: 900;
  cursor: pointer;
}

.tutorial-filter:hover,
.tutorial-filter.active {
  border-color: var(--cb-blue);
  background: var(--cb-blue);
  color: #ffffff;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tutorial-card {
  overflow: hidden;
  border: 1px solid #e6e8ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tutorial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 28px rgba(0, 0, 0, 0.09);
}

.tutorial-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111827;
}

.tutorial-card-thumb::after {
  content: "▶";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cb-blue);
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.tutorial-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tutorial-card-body {
  padding: 18px;
}

.tutorial-category-pill {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eaf1fb;
  color: var(--cb-blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.tutorial-card h2 {
  margin: 0 0 9px;
  color: var(--cb-deep-blue);
  font-size: 1.15rem;
}

.tutorial-card p {
  margin: 0 0 15px;
  color: var(--cb-muted-text);
  line-height: 1.5;
}

.tutorial-play-button {
  pointer-events: none;
}

.tutorial-no-results {
  margin-top: 20px;
}

@media (max-width: 900px) {
  .tutorial-player-panel {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   YouTube Tutorials Admin
   ========================================================= */

.tutorial-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.tutorial-editor-panel,
.tutorial-admin-list-panel {
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.tutorial-editor-panel h2,
.tutorial-admin-list-panel h2 {
  margin: 0 0 16px;
  color: var(--cb-deep-blue);
  font-size: 1.35rem;
}

.tutorial-admin-list {
  display: grid;
  gap: 14px;
}

.tutorial-admin-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  background: #ffffff;
}

.tutorial-admin-item.is-inactive {
  opacity: 0.7;
  background: #f8fafc;
}

.tutorial-admin-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #111827;
}

.tutorial-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tutorial-admin-details h3 {
  margin: 0 0 8px;
  color: var(--cb-deep-blue);
  font-size: 1.1rem;
}

.tutorial-admin-details p {
  margin: 0;
  color: var(--cb-muted-text);
  line-height: 1.45;
}

.tutorial-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 1050px) {
  .tutorial-admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .tutorial-admin-item {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Members Dashboard polished photography-style cards
   ========================================================= */

.members-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
  padding: 30px;
  border: 1px solid #e6e8ec;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.members-dashboard-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--cb-blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.members-dashboard-hero h1 {
  margin: 0 0 10px;
  color: var(--cb-deep-blue);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
}

.members-dashboard-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--cb-muted-text);
  font-size: 1.05rem;
  line-height: 1.65;
}

.members-dashboard-profile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid #e6e8ec;
  border-radius: 20px;
  background: #ffffff;
}

.members-dashboard-profile-title {
  color: var(--cb-deep-blue);
  font-weight: 900;
  font-size: 1.05rem;
}

.members-profile-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.members-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 24px;
}

.members-feature-card {
  --dashboard-card-bg:
    radial-gradient(circle at 18% 0%, rgba(219, 234, 254, 0.62), transparent 34%),
    linear-gradient(135deg, #f8fbff, #ffffff);
  --dashboard-card-accent: var(--cb-blue);
  --dashboard-card-text: #17324d;
  --dashboard-card-border: rgba(0, 91, 170, 0.16);
  --dashboard-card-badge-bg: rgba(255, 255, 255, 0.84);
  --dashboard-card-badge-text: var(--dashboard-card-accent);
  --dashboard-card-orb: rgba(255, 255, 255, 0.46);

  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 285px;
  overflow: hidden;
  padding: 24px 22px;
  border: 1px solid var(--dashboard-card-border);
  border-radius: 24px;
  background: var(--dashboard-card-bg);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.members-feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
  border-color: var(--dashboard-card-accent);
  text-decoration: none;
}

.members-feature-card::before {
  content: "";
  position: absolute;
  inset: auto -35px -55px auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: var(--dashboard-card-orb);
  z-index: -1;
}

.members-feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 42%),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.58), transparent 18%);
  z-index: -2;
}

.members-feature-orb {
  position: absolute;
  right: -34px;
  top: -34px;
  width: 124px;
  height: 124px;
  border-radius: 999px;
  border: 18px solid rgba(255, 255, 255, 0.24);
  z-index: -1;
}

.members-feature-badge-row {
  display: flex;
  justify-content: flex-end;
  min-height: 33px;
  margin-bottom: 12px;
}

.members-feature-badge {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: var(--dashboard-card-badge-bg);
  color: var(--dashboard-card-badge-text);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.members-feature-card h2 {
  margin: 0 0 14px;
  color: var(--dashboard-card-accent);
  font-size: 1.45rem;
  line-height: 1.15;
}

.members-feature-card p {
  margin: 0 0 24px;
  color: var(--dashboard-card-text);
  line-height: 1.65;
}

.members-feature-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
}

.members-feature-graphic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--dashboard-card-accent);
  opacity: 0.95;
  flex-shrink: 0;
}

.members-feature-graphic svg {
  width: 42px;
  height: 42px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.members-feature-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--dashboard-card-accent);
  flex-shrink: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.members-feature-arrow svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.members-feature-card:hover .members-feature-arrow {
  transform: translateX(4px);
  opacity: 0.9;
}

@media (max-width: 1180px) {
  .members-dashboard-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 850px) {
  .members-dashboard-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .members-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .members-feature-card {
    min-height: 245px;
  }
}

/* =========================================================
   CB News Admin
   ========================================================= */

.cbnews-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: 24px;
  align-items: start;
}

.cbnews-editor-panel,
.cbnews-admin-list-panel,
.cbnews-upload-panel {
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.cbnews-upload-panel {
  background: #ffffff;
}

.cbnews-editor-panel h2,
.cbnews-admin-list-panel h2,
.cbnews-upload-panel h3 {
  margin: 0 0 16px;
  color: var(--cb-deep-blue);
}

.cbnews-editor-panel h2,
.cbnews-admin-list-panel h2 {
  font-size: 1.35rem;
}

.cbnews-upload-panel h3 {
  font-size: 1.15rem;
}

.cbnews-image-library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  margin: 14px 0 20px;
  padding: 12px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #ffffff;
}

.cbnews-image-option {
  position: relative;
  display: block;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
}

.cbnews-image-option input {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
}

.cbnews-image-option img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cbnews-image-option span {
  display: block;
  padding: 7px 8px;
  color: var(--cb-muted-text);
  font-size: 0.74rem;
  font-weight: 800;
  word-break: break-word;
}

.cbnews-image-option:has(input:checked) {
  border-color: var(--cb-blue);
  box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.12);
}

.cbnews-admin-list {
  display: grid;
  gap: 14px;
}

.cbnews-admin-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  background: #ffffff;
}

.cbnews-admin-item.is-inactive {
  opacity: 0.72;
  background: #f8fafc;
}

.cbnews-admin-thumb {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: #111827;
}

.cbnews-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cbnews-admin-details h3 {
  margin: 0 0 8px;
  color: var(--cb-deep-blue);
  font-size: 1.1rem;
}

.cbnews-admin-details p {
  margin: 0;
  color: var(--cb-muted-text);
  line-height: 1.45;
}

.cbnews-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .cbnews-admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .cbnews-admin-item {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Member Galleries Admin
   ========================================================= */

.member-gallery-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.member-gallery-editor-panel,
.member-gallery-admin-list-panel,
.member-gallery-upload-panel {
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.member-gallery-upload-panel {
  background: #ffffff;
}

.member-gallery-editor-panel h2,
.member-gallery-admin-list-panel h2,
.member-gallery-upload-panel h3 {
  margin: 0 0 16px;
  color: var(--cb-deep-blue);
}

.member-gallery-editor-panel h2,
.member-gallery-admin-list-panel h2 {
  font-size: 1.35rem;
}

.member-gallery-upload-panel h3 {
  font-size: 1.15rem;
}

.member-gallery-current-thumb {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fafc;
}

.member-gallery-current-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #111827;
}

.member-gallery-current-thumb span {
  color: var(--cb-muted-text);
  font-size: 0.85rem;
  font-weight: 800;
  word-break: break-word;
}

.member-gallery-admin-list {
  display: grid;
  gap: 14px;
}

.member-gallery-admin-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  background: #ffffff;
}

.member-gallery-admin-item.is-inactive {
  opacity: 0.72;
  background: #f8fafc;
}

.member-gallery-admin-thumb {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: #111827;
}

.member-gallery-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-gallery-admin-details h3 {
  margin: 0 0 8px;
  color: var(--cb-deep-blue);
  font-size: 1.1rem;
}

.member-gallery-admin-details p {
  margin: 0;
  color: var(--cb-muted-text);
  line-height: 1.45;
}

.member-gallery-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .member-gallery-admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .member-gallery-admin-item,
  .member-gallery-current-thumb {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   My Gallery
   ========================================================= */

.my-gallery-overview,
.my-gallery-editor-panel,
.my-gallery-upload-panel,
.my-gallery-images-panel {
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.my-gallery-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: center;
  background: #ffffff;
}

.my-gallery-overview h2,
.my-gallery-editor-panel h2,
.my-gallery-upload-panel h2,
.my-gallery-images-panel h2 {
  margin: 12px 0 10px;
  color: var(--cb-deep-blue);
}

.my-gallery-overview p {
  margin: 0;
  color: var(--cb-muted-text);
}

.my-gallery-thumbnail {
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
  aspect-ratio: 4 / 3;
}

.my-gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.rich-text-toolbar button {
  padding: 7px 11px;
  border: 1px solid #c9ddec;
  border-radius: 8px;
  background: #ffffff;
  color: var(--cb-blue);
  font-weight: 900;
  cursor: pointer;
}

.rich-text-toolbar button:hover {
  background: var(--cb-blue);
  color: #ffffff;
}

.gallery-links-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.gallery-link-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.4fr) auto;
  gap: 10px;
  align-items: center;
}

.gallery-link-row input {
  width: 100%;
}

.my-gallery-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.my-gallery-image-card {
  overflow: hidden;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  background: #ffffff;
}

.my-gallery-image-preview {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #111827;
}

.my-gallery-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-gallery-image-tools {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.my-gallery-image-tools form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.my-gallery-image-tools input[type="file"] {
  max-width: 100%;
  font-size: 0.85rem;
}

.admin-action-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 950px) {
  .my-gallery-layout,
  .my-gallery-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .gallery-link-row {
    grid-template-columns: 1fr;
  }

  .my-gallery-image-tools form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* =========================================================
   My Gallery upload loading indicator
   ========================================================= */

.gallery-upload-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
  color: var(--cb-deep-blue);
}

.gallery-upload-loading[hidden] {
  display: none;
}

.gallery-upload-loading strong {
  display: block;
  margin-bottom: 3px;
  color: var(--cb-deep-blue);
}

.gallery-upload-loading p {
  margin: 0;
  color: var(--cb-muted-text);
  line-height: 1.45;
}

.gallery-upload-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #bfdbfe;
  border-top-color: var(--cb-blue);
  border-radius: 999px;
  flex-shrink: 0;
  animation: galleryUploadSpin 0.8s linear infinite;
}

@keyframes galleryUploadSpin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   My Gallery replace image controls
   ========================================================= */

.gallery-replace-form {
  display: grid !important;
  gap: 9px;
  padding: 10px;
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  background: #f8fafc;
}

.gallery-replace-label {
  color: var(--cb-deep-blue);
  font-size: 0.88rem;
  font-weight: 900;
}

.gallery-replace-form input[type="file"] {
  width: 100%;
  font-size: 0.85rem;
}

.gallery-replace-button {
  justify-self: start;
}

.gallery-replace-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--cb-deep-blue);
}

.gallery-replace-loading[hidden] {
  display: none;
}

.gallery-replace-loading strong {
  display: block;
  margin-bottom: 2px;
  color: var(--cb-deep-blue);
}

.gallery-replace-loading p {
  margin: 0;
  color: var(--cb-muted-text);
  font-size: 0.86rem;
  line-height: 1.4;
}

.gallery-replace-button[hidden] {
  display: none !important;
}

.my-gallery-image-card {
  scroll-margin-top: 110px;
}

.my-gallery-image-card:target {
  box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.18), 0 8px 26px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   My Gallery drag-and-drop image ordering
   ========================================================= */

.my-gallery-order-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
}

.my-gallery-order-toolbar[hidden] {
  display: none;
}

.my-gallery-order-toolbar strong {
  display: block;
  margin-bottom: 3px;
  color: var(--cb-deep-blue);
}

.my-gallery-order-toolbar p {
  margin: 0;
  color: var(--cb-muted-text);
  line-height: 1.45;
}

.my-gallery-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 11px;
  border: 1px dashed #b7c7d8;
  border-radius: 10px;
  background: #ffffff;
  color: var(--cb-blue);
  font-size: 0.86rem;
  font-weight: 900;
  cursor: grab;
  user-select: none;
}

.my-gallery-drag-handle::before {
  content: "↕";
  margin-right: 7px;
  font-size: 1rem;
}

.my-gallery-drag-handle:active {
  cursor: grabbing;
}

.my-gallery-sortable-ghost {
  opacity: 0.35;
}

.my-gallery-sortable-chosen {
  box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.18), 0 10px 28px rgba(0, 0, 0, 0.12);
}

.my-gallery-sortable-drag {
  transform: rotate(1deg);
}

.my-gallery-image-card {
  scroll-margin-top: 110px;
}

.my-gallery-image-card:target {
  box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.18), 0 8px 26px rgba(0, 0, 0, 0.08);
}

@media (max-width: 700px) {
  .my-gallery-order-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

/* =========================================================
   Homepage slider admin
   ========================================================= */

.home-slider-admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.5fr);
  gap: 22px;
  align-items: start;
}

.home-slider-editor-panel,
.home-slider-list-panel {
  padding: 22px;
  border: 1px solid #e6e8ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.home-slider-editor-panel h2,
.home-slider-list-panel h2 {
  margin-top: 0;
  color: var(--cb-deep-blue);
}

.home-slider-admin-list {
  display: grid;
  gap: 18px;
}

.home-slider-admin-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  background: #f8fafc;
  scroll-margin-top: 110px;
}

.home-slider-admin-card:target {
  box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.18), 0 8px 26px rgba(0, 0, 0, 0.08);
}

.home-slider-preview {
  overflow: hidden;
  border-radius: 13px;
  background: #111827;
  aspect-ratio: 4 / 3;
}

.home-slider-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-slider-card-form {
  display: grid;
  gap: 12px;
}

.home-slider-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-slider-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--cb-deep-blue);
}

@media (max-width: 900px) {
  .home-slider-admin-layout {
    grid-template-columns: 1fr;
  }

  .home-slider-admin-card {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   My Gallery thumbnail replacement
   ========================================================= */

.my-gallery-thumbnail-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: center;
  margin: 22px 0;
  padding: 22px;
  border: 1px solid #e6e8ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  scroll-margin-top: 110px;
}

.my-gallery-thumbnail-panel h2 {
  margin-top: 0;
  color: var(--cb-deep-blue);
}

.gallery-thumbnail-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.my-gallery-thumbnail-current {
  overflow: hidden;
  border: 10px solid #eef2ff;
  border-radius: 16px;
  background: #111827;
  aspect-ratio: 16 / 10;
}

.my-gallery-thumbnail-current img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-gallery-thumbnail-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  color: #64748b;
  background: #e2e8f0;
  font-size: 0.9rem;
  text-align: center;
}

.gallery-thumbnail-button[hidden],
.gallery-thumbnail-loading[hidden] {
  display: none !important;
}

.gallery-thumbnail-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--cb-deep-blue);
}

.gallery-thumbnail-loading strong {
  display: block;
  margin-bottom: 2px;
}

.gallery-thumbnail-loading p {
  margin: 0;
  color: var(--cb-muted-text);
  font-size: 0.86rem;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .my-gallery-thumbnail-panel {
    grid-template-columns: 1fr;
  }

  .my-gallery-thumbnail-current {
    max-width: 320px;
  }
}

/* =========================================================
   My Gallery thumbnail cropper
   ========================================================= */

.thumbnail-cropper-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
}

.thumbnail-cropper-panel[hidden] {
  display: none;
}

.thumbnail-cropper-heading strong {
  display: block;
  margin-bottom: 3px;
  color: var(--cb-deep-blue);
}

.thumbnail-cropper-heading p {
  margin: 0;
  color: var(--cb-muted-text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.thumbnail-cropper-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 520px;
  border: 10px solid #eef2ff;
  border-radius: 16px;
  background: #111827;
  aspect-ratio: 16 / 10;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.thumbnail-cropper-frame:active {
  cursor: grabbing;
}

.thumbnail-cropper-frame img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  max-width: none !important;
  max-height: none !important;
  user-select: none;
  pointer-events: none;
  transform-origin: top left;
}

.thumbnail-cropper-controls {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.thumbnail-cropper-controls label {
  color: var(--cb-deep-blue);
  font-weight: 900;
}

.thumbnail-cropper-controls input[type="range"] {
  width: 100%;
}

/* =========================================================
   Member admin count cards
   ========================================================= */

.member-count-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.member-count-card {
  padding: 18px;
  border: 1px solid #e6e8ec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.member-count-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--cb-muted-text);
  font-size: 0.9rem;
  font-weight: 800;
}

.member-count-card strong {
  display: block;
  color: var(--cb-deep-blue);
  font-size: 2rem;
  line-height: 1;
}

.member-count-total {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.member-count-advanced {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}

.member-count-intermediate {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.member-count-beginner {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

@media (max-width: 900px) {
  .member-count-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 560px) {
  .member-count-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   Members Dashboard cohesive card palette
   =========================================================
   This final palette deliberately overrides older card colour
   rules so the dashboard reads as one designed set of tiles.
   ========================================================= */

.dashboard-card-documents {
  --dashboard-card-bg:
    radial-gradient(circle at 20% 0%, rgba(253, 230, 138, 0.62), transparent 34%),
    linear-gradient(135deg, #fff7d6, #fffdf4);
  --dashboard-card-accent: #b45309;
  --dashboard-card-text: #3f2f12;
  --dashboard-card-border: rgba(180, 83, 9, 0.24);
  --dashboard-card-badge-text: #92400e;
}

.dashboard-card-notices {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(196, 181, 253, 0.54), transparent 34%),
    linear-gradient(135deg, #f2edff, #fffaff);
  --dashboard-card-accent: #5b21b6;
  --dashboard-card-text: #2f2357;
  --dashboard-card-border: rgba(91, 33, 182, 0.22);
  --dashboard-card-badge-text: #5b21b6;
}

.dashboard-card-my-gallery {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(125, 211, 252, 0.54), transparent 34%),
    linear-gradient(135deg, #e8f8ff, #fbfeff);
  --dashboard-card-accent: #0369a1;
  --dashboard-card-text: #11354a;
  --dashboard-card-border: rgba(3, 105, 161, 0.22);
  --dashboard-card-badge-text: #0369a1;
}

.dashboard-card-youtube {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(167, 243, 208, 0.62), transparent 34%),
    linear-gradient(135deg, #e9fff4, #fbfffd);
  --dashboard-card-accent: #047857;
  --dashboard-card-text: #13392f;
  --dashboard-card-border: rgba(4, 120, 87, 0.22);
  --dashboard-card-badge-text: #047857;
}

.dashboard-card-tea {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(254, 202, 202, 0.62), transparent 34%),
    linear-gradient(135deg, #fff0f0, #fffafa);
  --dashboard-card-accent: #be123c;
  --dashboard-card-text: #4a1624;
  --dashboard-card-border: rgba(190, 18, 60, 0.20);
  --dashboard-card-badge-text: #be123c;
}

.dashboard-card-competition-entry {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(253, 186, 116, 0.54), transparent 34%),
    linear-gradient(135deg, #fff2df, #fffaf2);
  --dashboard-card-accent: #c2410c;
  --dashboard-card-text: #4a2813;
  --dashboard-card-border: rgba(194, 65, 12, 0.22);
  --dashboard-card-badge-text: #c2410c;
}

.dashboard-card-gallery-admin {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(240, 171, 252, 0.48), transparent 34%),
    linear-gradient(135deg, #fdf0ff, #fffaff);
  --dashboard-card-accent: #7e22ce;
  --dashboard-card-text: #3d1f54;
  --dashboard-card-border: rgba(126, 34, 206, 0.22);
  --dashboard-card-badge-text: #7e22ce;
}

.dashboard-card-cbnews {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(147, 197, 253, 0.50), transparent 34%),
    linear-gradient(135deg, #eaf4ff, #fbfdff);
  --dashboard-card-accent: #1d4ed8;
  --dashboard-card-text: #17345f;
  --dashboard-card-border: rgba(29, 78, 216, 0.20);
  --dashboard-card-badge-text: #1d4ed8;
}

.dashboard-card-competitions {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(251, 113, 133, 0.48), transparent 34%),
    linear-gradient(135deg, #fff0f3, #fff8f8);
  --dashboard-card-accent: #be123c;
  --dashboard-card-text: #4d1725;
  --dashboard-card-border: rgba(190, 18, 60, 0.23);
  --dashboard-card-badge-text: #be123c;
}

.dashboard-card-add-member-entry {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(94, 234, 212, 0.46), transparent 34%),
    linear-gradient(135deg, #eafffb, #fbfffd);
  --dashboard-card-accent: #0f766e;
  --dashboard-card-text: #123f3b;
  --dashboard-card-border: rgba(15, 118, 110, 0.22);
  --dashboard-card-badge-text: #0f766e;
}

.dashboard-card-competition-submissions {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(252, 211, 77, 0.54), transparent 34%),
    linear-gradient(135deg, #fff8dc, #fffdf4);
  --dashboard-card-accent: #a16207;
  --dashboard-card-text: #44310f;
  --dashboard-card-border: rgba(161, 98, 7, 0.22);
  --dashboard-card-badge-text: #a16207;
}

.dashboard-card-judging-display {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(165, 180, 252, 0.58), transparent 34%),
    linear-gradient(135deg, #eef2ff, #fbfbff);
  --dashboard-card-accent: #4338ca;
  --dashboard-card-text: #26255e;
  --dashboard-card-border: rgba(67, 56, 202, 0.22);
  --dashboard-card-badge-text: #4338ca;
}

.dashboard-card-competition-results {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(134, 239, 172, 0.54), transparent 34%),
    linear-gradient(135deg, #eafff1, #fbfffd);
  --dashboard-card-accent: #15803d;
  --dashboard-card-text: #163d24;
  --dashboard-card-border: rgba(21, 128, 61, 0.22);
  --dashboard-card-badge-text: #15803d;
}

.dashboard-card-nipa-results {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(253, 224, 71, 0.48), transparent 34%),
    linear-gradient(135deg, #fffbe3, #fffdf4);
  --dashboard-card-accent: #a16207;
  --dashboard-card-text: #44340e;
  --dashboard-card-border: rgba(161, 98, 7, 0.22);
  --dashboard-card-badge-text: #a16207;
}

.dashboard-card-programme {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(187, 247, 208, 0.54), transparent 34%),
    linear-gradient(135deg, #ecfff2, #fbfffd);
  --dashboard-card-accent: #15803d;
  --dashboard-card-text: #163d24;
  --dashboard-card-border: rgba(21, 128, 61, 0.20);
  --dashboard-card-badge-text: #15803d;
}

.dashboard-card-home-slider {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(251, 146, 60, 0.46), transparent 34%),
    linear-gradient(135deg, #fff1df, #fffaf4);
  --dashboard-card-accent: #c2410c;
  --dashboard-card-text: #4c2813;
  --dashboard-card-border: rgba(194, 65, 12, 0.22);
  --dashboard-card-badge-text: #c2410c;
}

.dashboard-card-contact-enquiries {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(103, 232, 249, 0.46), transparent 34%),
    linear-gradient(135deg, #e8fdff, #fbffff);
  --dashboard-card-accent: #0e7490;
  --dashboard-card-text: #123c48;
  --dashboard-card-border: rgba(14, 116, 144, 0.22);
  --dashboard-card-badge-text: #0e7490;
}

.dashboard-card-admin {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(209, 213, 219, 0.54), transparent 34%),
    linear-gradient(135deg, #f2f4f8, #ffffff);
  --dashboard-card-accent: #334155;
  --dashboard-card-text: #1f2937;
  --dashboard-card-border: rgba(51, 65, 85, 0.18);
  --dashboard-card-badge-text: #334155;
}

.dashboard-card-results-archive {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(165, 180, 252, 0.48), transparent 34%),
    linear-gradient(135deg, #eef2ff, #fbfbff);
  --dashboard-card-accent: #4338ca;
  --dashboard-card-text: #26255e;
  --dashboard-card-border: rgba(67, 56, 202, 0.22);
  --dashboard-card-badge-text: #4338ca;
}

.dashboard-card-nipa-rankings {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(125, 211, 252, 0.48), transparent 34%),
    linear-gradient(135deg, #eaf8ff, #fbfdff);
  --dashboard-card-accent: #0369a1;
  --dashboard-card-text: #12374f;
  --dashboard-card-border: rgba(3, 105, 161, 0.22);
  --dashboard-card-badge-text: #0369a1;
}

/* Unread contact enquiry alert state */

.dashboard-card-contact-enquiries.has-unread-enquiries {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(252, 165, 165, 0.52), transparent 34%),
    linear-gradient(135deg, #fff1f2, #fee2e2);
  --dashboard-card-accent: #b91c1c;
  --dashboard-card-text: #7f1d1d;
  --dashboard-card-border: #dc2626;
  --dashboard-card-badge-bg: #dc2626;
  --dashboard-card-badge-text: #ffffff;

  border-width: 2px;
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.22);
  animation: contactEnquiryPulse 1.8s ease-in-out infinite;
}

.dashboard-card-contact-enquiries.has-unread-enquiries::before,
.dashboard-card-contact-enquiries.has-unread-enquiries::after {
  display: none !important;
  content: none !important;
}

.dashboard-card-contact-enquiries.has-unread-enquiries .members-feature-badge {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.28);
}

.dashboard-card-contact-enquiries.has-unread-enquiries p {
  color: #7f1d1d;
  font-weight: 900;
}

@keyframes contactEnquiryPulse {
  0% {
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.18);
    transform: translateY(0);
  }

  50% {
    box-shadow: 0 18px 42px rgba(220, 38, 38, 0.38);
    transform: translateY(-3px);
  }

  100% {
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.18);
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-card-contact-enquiries.has-unread-enquiries {
    animation: none;
  }
}


/* =========================================================
   Members Dashboard - Minimal club column palette
   =========================================================

   The dashboard cards are now coloured by their live column
   position rather than by individual feature. Because cards are
   only rendered when a user has permission to see them, nth-child
   naturally recalculates for each role/member view.

   Desktop 4-column layout:
   Column 1 = deep club blue wash
   Column 2 = white
   Column 3 = light club blue wash
   Column 4 = white

   Site Management is intentionally excluded so it keeps its own
   quiet grey admin styling.
   ========================================================= */

.members-dashboard-grid {
  --club-dashboard-deep-blue: #005baa;
  --club-dashboard-navy: #003f7d;
  --club-dashboard-light-blue: #dff1ff;
  --club-dashboard-soft-blue: #f3f9ff;
  --club-dashboard-white: #ffffff;
}

.members-feature-card:not(.dashboard-card-admin) {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.members-feature-card:not(.dashboard-card-admin):hover {
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10);
}

.members-feature-card:not(.dashboard-card-admin)::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 44%),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.50), transparent 18%);
}

.members-feature-card:not(.dashboard-card-admin) .members-feature-badge {
  border-color: rgba(0, 91, 170, 0.08);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035);
}

@media (min-width: 1181px) {
  .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(4n + 1) {
    --dashboard-card-bg:
      radial-gradient(circle at 18% 0%, rgba(0, 91, 170, 0.10), transparent 34%),
      linear-gradient(135deg, #eaf3fb, #f8fbff);
    --dashboard-card-accent: var(--club-dashboard-deep-blue);
    --dashboard-card-text: #153553;
    --dashboard-card-border: rgba(0, 91, 170, 0.24);
    --dashboard-card-badge-bg: rgba(255, 255, 255, 0.88);
    --dashboard-card-badge-text: var(--club-dashboard-navy);
    --dashboard-card-orb: rgba(255, 255, 255, 0.42);
  }

  .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(4n + 2) {
    --dashboard-card-bg:
      radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.56), transparent 34%),
      linear-gradient(135deg, #ffffff, #fbfdff);
    --dashboard-card-accent: var(--club-dashboard-navy);
    --dashboard-card-text: #17324d;
    --dashboard-card-border: rgba(0, 63, 125, 0.14);
    --dashboard-card-badge-bg: #f3f9ff;
    --dashboard-card-badge-text: var(--club-dashboard-navy);
    --dashboard-card-orb: rgba(0, 91, 170, 0.035);
  }

  .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(4n + 3) {
    --dashboard-card-bg:
      radial-gradient(circle at 18% 0%, rgba(0, 91, 170, 0.08), transparent 34%),
      linear-gradient(135deg, #eef8ff, #dff1ff);
    --dashboard-card-accent: #006eb8;
    --dashboard-card-text: #12344f;
    --dashboard-card-border: rgba(0, 110, 184, 0.22);
    --dashboard-card-badge-bg: rgba(255, 255, 255, 0.86);
    --dashboard-card-badge-text: #005baa;
    --dashboard-card-orb: rgba(255, 255, 255, 0.40);
  }

  .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(4n) {
    --dashboard-card-bg:
      radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.56), transparent 34%),
      linear-gradient(135deg, #ffffff, #f8fbff);
    --dashboard-card-accent: var(--club-dashboard-navy);
    --dashboard-card-text: #17324d;
    --dashboard-card-border: rgba(0, 63, 125, 0.14);
    --dashboard-card-badge-bg: #f3f9ff;
    --dashboard-card-badge-text: var(--club-dashboard-navy);
    --dashboard-card-orb: rgba(0, 91, 170, 0.035);
  }
}

/* Two-column dashboard view: left column blue, right column white. */
@media (max-width: 1180px) and (min-width: 851px) {
  .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(odd) {
    --dashboard-card-bg:
      radial-gradient(circle at 18% 0%, rgba(0, 91, 170, 0.10), transparent 34%),
      linear-gradient(135deg, #eaf3fb, #f8fbff);
    --dashboard-card-accent: var(--club-dashboard-deep-blue);
    --dashboard-card-text: #153553;
    --dashboard-card-border: rgba(0, 91, 170, 0.24);
    --dashboard-card-badge-bg: rgba(255, 255, 255, 0.88);
    --dashboard-card-badge-text: var(--club-dashboard-navy);
    --dashboard-card-orb: rgba(255, 255, 255, 0.42);
  }

  .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(even) {
    --dashboard-card-bg:
      radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.56), transparent 34%),
      linear-gradient(135deg, #ffffff, #fbfdff);
    --dashboard-card-accent: var(--club-dashboard-navy);
    --dashboard-card-text: #17324d;
    --dashboard-card-border: rgba(0, 63, 125, 0.14);
    --dashboard-card-badge-bg: #f3f9ff;
    --dashboard-card-badge-text: var(--club-dashboard-navy);
    --dashboard-card-orb: rgba(0, 91, 170, 0.035);
  }
}

/* Single-column mobile view: very quiet alternating blue/white cards. */
@media (max-width: 850px) {
  .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(odd) {
    --dashboard-card-bg:
      radial-gradient(circle at 18% 0%, rgba(0, 91, 170, 0.08), transparent 34%),
      linear-gradient(135deg, #f0f7ff, #ffffff);
    --dashboard-card-accent: var(--club-dashboard-deep-blue);
    --dashboard-card-text: #153553;
    --dashboard-card-border: rgba(0, 91, 170, 0.18);
    --dashboard-card-badge-bg: rgba(255, 255, 255, 0.88);
    --dashboard-card-badge-text: var(--club-dashboard-navy);
    --dashboard-card-orb: rgba(255, 255, 255, 0.42);
  }

  .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(even) {
    --dashboard-card-bg:
      radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.56), transparent 34%),
      linear-gradient(135deg, #ffffff, #fbfdff);
    --dashboard-card-accent: var(--club-dashboard-navy);
    --dashboard-card-text: #17324d;
    --dashboard-card-border: rgba(0, 63, 125, 0.14);
    --dashboard-card-badge-bg: #f3f9ff;
    --dashboard-card-badge-text: var(--club-dashboard-navy);
    --dashboard-card-orb: rgba(0, 91, 170, 0.035);
  }
}

/* Keep Site Management exactly as the quiet grey admin tile. */
.members-dashboard-grid > .members-feature-card.dashboard-card-admin {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(209, 213, 219, 0.54), transparent 34%),
    linear-gradient(135deg, #f2f4f8, #ffffff);
  --dashboard-card-accent: #334155;
  --dashboard-card-text: #1f2937;
  --dashboard-card-border: rgba(51, 65, 85, 0.18);
  --dashboard-card-badge-bg: rgba(255, 255, 255, 0.84);
  --dashboard-card-badge-text: #334155;
  --dashboard-card-orb: rgba(255, 255, 255, 0.46);
}

/* Keep unread Contact Enquiries as a genuine alert, regardless of column. */
.members-dashboard-grid > .dashboard-card-contact-enquiries.has-unread-enquiries {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(252, 165, 165, 0.52), transparent 34%),
    linear-gradient(135deg, #fff1f2, #fee2e2);
  --dashboard-card-accent: #b91c1c;
  --dashboard-card-text: #7f1d1d;
  --dashboard-card-border: #dc2626;
  --dashboard-card-badge-bg: #dc2626;
  --dashboard-card-badge-text: #ffffff;

  border-width: 2px;
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.22);
  animation: contactEnquiryPulse 1.8s ease-in-out infinite;
}

.members-dashboard-grid > .dashboard-card-contact-enquiries.has-unread-enquiries .members-feature-badge {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.28);
}


/* =========================================================
   Members Area - Light / Dark mode
   ========================================================= */

html[data-theme="dark"] .members-content,
html[data-theme="dark"] .members-dashboard-hero,
html[data-theme="dark"] .members-dashboard-profile,
html[data-theme="dark"] .member-login-panel,
html[data-theme="dark"] .member-password-panel,
html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .admin-form-panel,
html[data-theme="dark"] .admin-role-panel,
html[data-theme="dark"] .documents-intro-panel,
html[data-theme="dark"] .documents-pdf-panel,
html[data-theme="dark"] .documents-pdf-heading,
html[data-theme="dark"] .notice-editor-panel,
html[data-theme="dark"] .notice-admin-list-panel,
html[data-theme="dark"] .notice-email-preview,
html[data-theme="dark"] .notice-email-confirm-panel,
html[data-theme="dark"] .notice-email-preview-card,
html[data-theme="dark"] .notice-admin-email-summary,
html[data-theme="dark"] .notices-intro-panel,
html[data-theme="dark"] .member-notice-card,
html[data-theme="dark"] .notice-future-panel,
html[data-theme="dark"] .notice-option-card,
html[data-theme="dark"] .notice-admin-item,
html[data-theme="dark"] .notice-pagination,
html[data-theme="dark"] .tea-next-panel,
html[data-theme="dark"] .tea-upcoming-panel,
html[data-theme="dark"] .tea-editor-panel,
html[data-theme="dark"] .tea-admin-list-panel,
html[data-theme="dark"] .tea-rota-item,
html[data-theme="dark"] .tea-admin-item,
html[data-theme="dark"] .tutorial-player-panel,
html[data-theme="dark"] .tutorial-controls-panel,
html[data-theme="dark"] .tutorial-card,
html[data-theme="dark"] .tutorial-editor-panel,
html[data-theme="dark"] .tutorial-admin-list-panel,
html[data-theme="dark"] .tutorial-admin-item,
html[data-theme="dark"] .cbnews-editor-panel,
html[data-theme="dark"] .cbnews-admin-list-panel,
html[data-theme="dark"] .cbnews-upload-panel,
html[data-theme="dark"] .cbnews-admin-item,
html[data-theme="dark"] .cbnews-image-library,
html[data-theme="dark"] .cbnews-image-option,
html[data-theme="dark"] .member-gallery-editor-panel,
html[data-theme="dark"] .member-gallery-admin-list-panel,
html[data-theme="dark"] .member-gallery-upload-panel,
html[data-theme="dark"] .member-gallery-current-thumb,
html[data-theme="dark"] .member-gallery-admin-item,
html[data-theme="dark"] .my-gallery-overview,
html[data-theme="dark"] .my-gallery-editor-panel,
html[data-theme="dark"] .my-gallery-upload-panel,
html[data-theme="dark"] .my-gallery-images-panel,
html[data-theme="dark"] .my-gallery-thumbnail-panel,
html[data-theme="dark"] .my-gallery-image-card,
html[data-theme="dark"] .gallery-replace-form,
html[data-theme="dark"] .gallery-replace-loading,
html[data-theme="dark"] .gallery-upload-loading,
html[data-theme="dark"] .my-gallery-order-toolbar,
html[data-theme="dark"] .thumbnail-cropper-panel,
html[data-theme="dark"] .home-slider-editor-panel,
html[data-theme="dark"] .home-slider-list-panel,
html[data-theme="dark"] .home-slider-admin-card,
html[data-theme="dark"] .member-count-card {
  border-color: var(--cb-border);
  background: #161b22;
  color: var(--cb-text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .members-heading {
  border-bottom-color: var(--cb-border);
}

html[data-theme="dark"] .members-heading-main h1,
html[data-theme="dark"] .members-heading h1,
html[data-theme="dark"] .admin-panel h2,
html[data-theme="dark"] .admin-role-panel h2,
html[data-theme="dark"] .documents-intro-panel h2,
html[data-theme="dark"] .documents-pdf-heading h2,
html[data-theme="dark"] .documents-empty-state h3,
html[data-theme="dark"] .notices-intro-panel h2,
html[data-theme="dark"] .notice-editor-panel h2,
html[data-theme="dark"] .notice-admin-list-panel h2,
html[data-theme="dark"] .notice-email-preview h2,
html[data-theme="dark"] .notice-email-confirm-panel h2,
html[data-theme="dark"] .notice-email-preview-card h3,
html[data-theme="dark"] .member-notice-card h2,
html[data-theme="dark"] .notice-future-panel h3,
html[data-theme="dark"] .notice-admin-item h3,
html[data-theme="dark"] .tea-next-panel h2,
html[data-theme="dark"] .tea-upcoming-panel h2,
html[data-theme="dark"] .tea-editor-panel h2,
html[data-theme="dark"] .tea-admin-list-panel h2,
html[data-theme="dark"] .tea-rota-item h3,
html[data-theme="dark"] .tea-admin-item h3,
html[data-theme="dark"] .tutorial-player-panel h2,
html[data-theme="dark"] .tutorial-card h2,
html[data-theme="dark"] .tutorial-editor-panel h2,
html[data-theme="dark"] .tutorial-admin-list-panel h2,
html[data-theme="dark"] .tutorial-admin-details h3,
html[data-theme="dark"] .cbnews-editor-panel h2,
html[data-theme="dark"] .cbnews-admin-list-panel h2,
html[data-theme="dark"] .cbnews-upload-panel h3,
html[data-theme="dark"] .cbnews-admin-details h3,
html[data-theme="dark"] .member-gallery-editor-panel h2,
html[data-theme="dark"] .member-gallery-admin-list-panel h2,
html[data-theme="dark"] .member-gallery-upload-panel h3,
html[data-theme="dark"] .member-gallery-admin-details h3,
html[data-theme="dark"] .my-gallery-overview h2,
html[data-theme="dark"] .my-gallery-editor-panel h2,
html[data-theme="dark"] .my-gallery-upload-panel h2,
html[data-theme="dark"] .my-gallery-images-panel h2,
html[data-theme="dark"] .my-gallery-thumbnail-panel h2,
html[data-theme="dark"] .thumbnail-cropper-heading strong,
html[data-theme="dark"] .members-dashboard-hero h1,
html[data-theme="dark"] .members-dashboard-profile-title,
html[data-theme="dark"] .member-count-card strong,
html[data-theme="dark"] .document-selector-title {
  color: var(--cb-blue);
}

html[data-theme="dark"] .members-heading-main p,
html[data-theme="dark"] .members-heading p,
html[data-theme="dark"] .password-rules,
html[data-theme="dark"] .documents-intro-panel p,
html[data-theme="dark"] .documents-pdf-heading p,
html[data-theme="dark"] .documents-empty-state p,
html[data-theme="dark"] .member-notice-date,
html[data-theme="dark"] .member-notice-footer,
html[data-theme="dark"] .notice-admin-email-detail,
html[data-theme="dark"] .notice-future-panel p,
html[data-theme="dark"] .form-help,
html[data-theme="dark"] .tea-empty-note,
html[data-theme="dark"] .tea-rota-notes,
html[data-theme="dark"] .tutorial-player-panel p,
html[data-theme="dark"] .tutorial-card p,
html[data-theme="dark"] .tutorial-admin-details p,
html[data-theme="dark"] .cbnews-admin-details p,
html[data-theme="dark"] .member-gallery-admin-details p,
html[data-theme="dark"] .member-gallery-current-thumb span,
html[data-theme="dark"] .my-gallery-overview p,
html[data-theme="dark"] .gallery-replace-loading p,
html[data-theme="dark"] .gallery-upload-loading p,
html[data-theme="dark"] .my-gallery-order-toolbar p,
html[data-theme="dark"] .thumbnail-cropper-heading p,
html[data-theme="dark"] .members-dashboard-hero p,
html[data-theme="dark"] .member-count-card span,
html[data-theme="dark"] .document-selector-description,
html[data-theme="dark"] .document-selector-category {
  color: var(--cb-muted-text);
}

html[data-theme="dark"] .member-form-row label,
html[data-theme="dark"] .admin-search-wrap label,
html[data-theme="dark"] .tutorial-search-wrap label,
html[data-theme="dark"] .checkbox-row label,
html[data-theme="dark"] .thumbnail-cropper-controls label,
html[data-theme="dark"] .tea-rota-members,
html[data-theme="dark"] .tea-admin-item p,
html[data-theme="dark"] .member-notice-body,
html[data-theme="dark"] .notice-admin-email-detail strong {
  color: var(--cb-text);
}

html[data-theme="dark"] .member-form-row input,
html[data-theme="dark"] .member-form-row select,
html[data-theme="dark"] .member-form-row textarea,
html[data-theme="dark"] .admin-search-wrap input,
html[data-theme="dark"] .tutorial-search-wrap input,
html[data-theme="dark"] .notice-rich-editor {
  border-color: var(--cb-border);
  background: #0d1117;
  color: var(--cb-text);
}

html[data-theme="dark"] .member-form-row input[readonly] {
  background: #101a27;
  color: #8b949e;
}

html[data-theme="dark"] .member-pill,
html[data-theme="dark"] .notice-pill,
html[data-theme="dark"] .notice-page-status,
html[data-theme="dark"] .notice-email-mode,
html[data-theme="dark"] .tutorial-category-pill {
  background: #10243a;
  color: var(--cb-blue);
}

html[data-theme="dark"] .member-button-secondary,
html[data-theme="dark"] .admin-action-link,
html[data-theme="dark"] .admin-action-button,
html[data-theme="dark"] .notice-page-link,
html[data-theme="dark"] .rich-text-toolbar button,
html[data-theme="dark"] .notice-editor-toolbar button,
html[data-theme="dark"] .tutorial-filter {
  border-color: var(--cb-blue);
  background: #0d1117;
  color: var(--cb-blue);
}

html[data-theme="dark"] .member-button-secondary:hover,
html[data-theme="dark"] .admin-action-link:hover,
html[data-theme="dark"] .admin-action-button:hover,
html[data-theme="dark"] .notice-page-link:hover,
html[data-theme="dark"] .rich-text-toolbar button:hover,
html[data-theme="dark"] .notice-editor-toolbar button:hover,
html[data-theme="dark"] .tutorial-filter:hover,
html[data-theme="dark"] .tutorial-filter.active {
  background: var(--cb-blue);
  border-color: var(--cb-blue);
  color: #07101c;
}

html[data-theme="dark"] .member-message.info {
  border-color: #244b72;
  background: #10243a;
  color: var(--cb-blue);
}

html[data-theme="dark"] .member-message.success,
html[data-theme="dark"] .notice-email-status-sent,
html[data-theme="dark"] .admin-status.is-active {
  border-color: #14532d;
  background: #092513;
  color: #7ee787;
}

html[data-theme="dark"] .member-message.error,
html[data-theme="dark"] .notice-email-status-failed,
html[data-theme="dark"] .admin-status.is-inactive,
html[data-theme="dark"] .notice-pill-inactive {
  border-color: #7f1d1d;
  background: #2a1111;
  color: #ff9b9b;
}

html[data-theme="dark"] .notice-pill-important,
html[data-theme="dark"] .notice-email-status-warning,
html[data-theme="dark"] .document-selector-status.is-missing,
html[data-theme="dark"] .admin-status.must-change,
html[data-theme="dark"] .document-status {
  background: #332400;
  color: #ffd166;
}

html[data-theme="dark"] .notice-pill-pinned {
  background: #24144d;
  color: #c9b6ff;
}

html[data-theme="dark"] .documents-pdf-frame-wrap {
  background: #0d1117;
}

html[data-theme="dark"] .documents-pdf-frame-wrap iframe {
  background: #ffffff;
}

html[data-theme="dark"] .document-selector-card {
  border-color: var(--cb-border);
  background: linear-gradient(135deg, #101a27, #161b22);
  color: var(--cb-text);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30);
}

html[data-theme="dark"] .document-selector-card::before,
html[data-theme="dark"] .members-feature-card::before,
html[data-theme="dark"] .members-feature-card::after {
  opacity: 0.28;
}

html[data-theme="dark"] .document-selector-card.active {
  border-color: var(--cb-blue);
}

html[data-theme="dark"] .document-selector-status,
html[data-theme="dark"] .document-selector-status.is-ready {
  background: #0d2b18;
  color: #7ee787;
}

html[data-theme="dark"] .document-accent-blue,
html[data-theme="dark"] .document-accent-yellow,
html[data-theme="dark"] .document-accent-green,
html[data-theme="dark"] .document-accent-purple,
html[data-theme="dark"] .document-accent-pink,
html[data-theme="dark"] .document-accent-orange {
  background: linear-gradient(135deg, #101a27, #161b22);
}

html[data-theme="dark"] .admin-users-table th {
  color: var(--cb-blue);
}

html[data-theme="dark"] .admin-users-table th,
html[data-theme="dark"] .admin-users-table td,
html[data-theme="dark"] .member-notice-header,
html[data-theme="dark"] .member-notice-footer {
  border-color: var(--cb-border);
}

html[data-theme="dark"] .admin-users-table tr {
  border-color: var(--cb-border);
}

html[data-theme="dark"] .notice-admin-item.is-inactive,
html[data-theme="dark"] .tea-admin-item.is-past,
html[data-theme="dark"] .tea-admin-item.is-inactive,
html[data-theme="dark"] .tutorial-admin-item.is-inactive,
html[data-theme="dark"] .cbnews-admin-item.is-inactive,
html[data-theme="dark"] .member-gallery-admin-item.is-inactive {
  background: #101a27;
}

html[data-theme="dark"] .tea-next-panel,
html[data-theme="dark"] .tutorial-player-panel {
  background:
    radial-gradient(circle at top right, rgba(0, 91, 170, 0.20), transparent 34%),
    linear-gradient(135deg, #161b22, #101a27);
}

html[data-theme="dark"] .tea-duty-members span,
html[data-theme="dark"] .tea-duty-notes {
  background: rgba(13, 17, 23, 0.78);
  color: var(--cb-text);
}

html[data-theme="dark"] .tutorial-card-thumb::after {
  background: rgba(13, 17, 23, 0.92);
  color: var(--cb-blue);
}

html[data-theme="dark"] .gallery-replace-form,
html[data-theme="dark"] .my-gallery-drag-handle {
  background: #0d1117;
  border-color: var(--cb-border);
}

html[data-theme="dark"] .gallery-replace-label {
  color: var(--cb-blue);
}

html[data-theme="dark"] .thumbnail-cropper-frame,
html[data-theme="dark"] .my-gallery-thumbnail-current {
  border-color: #101a27;
}

html[data-theme="dark"] .my-gallery-thumbnail-empty {
  background: #0d1117;
  color: var(--cb-muted-text);
}

html[data-theme="dark"] .member-count-total,
html[data-theme="dark"] .member-count-advanced,
html[data-theme="dark"] .member-count-intermediate,
html[data-theme="dark"] .member-count-beginner {
  background: linear-gradient(135deg, #161b22, #101a27);
}

html[data-theme="dark"] .members-feature-card:not(.dashboard-card-admin),
html[data-theme="dark"] .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(4n + 1),
html[data-theme="dark"] .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(4n + 2),
html[data-theme="dark"] .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(4n + 3),
html[data-theme="dark"] .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(4n),
html[data-theme="dark"] .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(odd),
html[data-theme="dark"] .members-dashboard-grid > .members-feature-card:not(.dashboard-card-admin):nth-child(even) {
  --dashboard-card-bg:
    radial-gradient(circle at 18% 0%, rgba(0, 91, 170, 0.17), transparent 34%),
    linear-gradient(135deg, #161b22, #101a27);
  --dashboard-card-accent: var(--cb-blue);
  --dashboard-card-text: var(--cb-muted-text);
  --dashboard-card-border: var(--cb-border);
  --dashboard-card-badge-bg: #10243a;
  --dashboard-card-badge-text: var(--cb-blue);
  --dashboard-card-orb: rgba(255, 255, 255, 0.08);

  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .members-dashboard-grid > .members-feature-card.dashboard-card-admin {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(139, 148, 158, 0.16), transparent 34%),
    linear-gradient(135deg, #161b22, #101a27);
  --dashboard-card-accent: #c9d1d9;
  --dashboard-card-text: #aeb9c5;
  --dashboard-card-border: var(--cb-border);
  --dashboard-card-badge-bg: #21262d;
  --dashboard-card-badge-text: #c9d1d9;
  --dashboard-card-orb: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .members-feature-card p {
  color: var(--dashboard-card-text);
}

html[data-theme="dark"] .members-feature-badge {
  border-color: var(--cb-border);
}

html[data-theme="dark"] .dashboard-card-contact-enquiries.has-unread-enquiries,
html[data-theme="dark"] .members-dashboard-grid > .dashboard-card-contact-enquiries.has-unread-enquiries {
  --dashboard-card-bg:
    radial-gradient(circle at 22% 0%, rgba(220, 38, 38, 0.24), transparent 34%),
    linear-gradient(135deg, #2a1111, #161b22);
  --dashboard-card-accent: #ff9b9b;
  --dashboard-card-text: #ffb4b4;
  --dashboard-card-border: #dc2626;
}

html[data-theme="dark"] .dashboard-card-contact-enquiries.has-unread-enquiries p {
  color: #ffb4b4;
}

html[data-theme="dark"] .admin-danger-panel,
html[data-theme="dark"] .tea-bulk-delete-panel {
  border-color: #7f1d1d;
  background: #2a1111;
}

html[data-theme="dark"] .admin-danger-panel h2,
html[data-theme="dark"] .tea-bulk-delete-panel h3 {
  color: #ff9b9b;
}

html[data-theme="dark"] .admin-danger-panel p,
html[data-theme="dark"] .tea-bulk-delete-panel p {
  color: #ffb4b4;
}

/* =========================================================
   Dark mode cleanup - Members Area
   Append to the bottom of /public_html/members/css/members.css
   ========================================================= */

html[data-theme="dark"] {
  --cb-blue: #58a6ff;
  --cb-deep-blue: #79c0ff;
  --cb-text: #e6edf3;
  --cb-muted-text: #9fb0c3;
  --cb-page-background: #0d1117;
  --cb-white: #161b22;
  --cb-border: #30363d;
  --cb-soft-blue: #111d2e;

  --cb-dark-bg: #0d1117;
  --cb-dark-surface: #161b22;
  --cb-dark-surface-soft: #111820;
  --cb-dark-surface-lift: #1c2330;
  --cb-dark-border: #30363d;
  --cb-dark-input: #0d1117;
}

html[data-theme="dark"] .members-content {
  border: 1px solid var(--cb-dark-border) !important;
  background: var(--cb-dark-surface) !important;
  color: var(--cb-text) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42) !important;
}

html[data-theme="dark"] .members-heading {
  border-bottom-color: var(--cb-dark-border) !important;
}

html[data-theme="dark"] .members-heading h1,
html[data-theme="dark"] .members-heading-main h1,
html[data-theme="dark"] .members-dashboard-hero h1,
html[data-theme="dark"] .members-dashboard-profile-title {
  color: var(--cb-blue) !important;
}

html[data-theme="dark"] .members-heading p,
html[data-theme="dark"] .members-heading-main p,
html[data-theme="dark"] .members-dashboard-hero p {
  color: var(--cb-muted-text) !important;
}

html[data-theme="dark"] .member-pill,
html[data-theme="dark"] .notice-pill,
html[data-theme="dark"] .tutorial-category-pill,
html[data-theme="dark"] .notice-page-status,
html[data-theme="dark"] .notice-email-mode {
  background: #10233b !important;
  color: var(--cb-blue) !important;
}

html[data-theme="dark"] .notice-pill-important,
html[data-theme="dark"] .notice-email-status-warning {
  background: #3b2e12 !important;
  color: #ffd166 !important;
}

html[data-theme="dark"] .notice-pill-inactive,
html[data-theme="dark"] .notice-pill-important.notice-pill-inactive {
  background: #3b1723 !important;
  color: #ffb4bc !important;
}

html[data-theme="dark"] .notice-pill-pinned {
  background: #291f45 !important;
  color: #c4b5fd !important;
}

/* Members buttons */

html[data-theme="dark"] .member-button {
  border-color: #58a6ff !important;
  background: #1f6feb !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .member-button:hover {
  background: #388bfd !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .member-button-secondary,
html[data-theme="dark"] .admin-action-link,
html[data-theme="dark"] .admin-action-button,
html[data-theme="dark"] .notice-page-link {
  border-color: #58a6ff !important;
  background: var(--cb-dark-surface) !important;
  color: var(--cb-blue) !important;
}

html[data-theme="dark"] .member-button-secondary:hover,
html[data-theme="dark"] .admin-action-link:hover,
html[data-theme="dark"] .admin-action-button:hover,
html[data-theme="dark"] .notice-page-link:hover {
  background: #1f6feb !important;
  color: #ffffff !important;
}

/* General members panels/cards */

html[data-theme="dark"] .member-login-panel,
html[data-theme="dark"] .member-password-panel,
html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .admin-form-panel,
html[data-theme="dark"] .admin-role-panel,
html[data-theme="dark"] .admin-password-panel,
html[data-theme="dark"] .documents-intro-panel,
html[data-theme="dark"] .documents-pdf-panel,
html[data-theme="dark"] .documents-pdf-heading,
html[data-theme="dark"] .notices-intro-panel,
html[data-theme="dark"] .notice-editor-panel,
html[data-theme="dark"] .notice-admin-list-panel,
html[data-theme="dark"] .member-notice-card,
html[data-theme="dark"] .notice-email-preview,
html[data-theme="dark"] .notice-email-confirm-panel,
html[data-theme="dark"] .notice-email-preview-card,
html[data-theme="dark"] .notice-admin-email-summary,
html[data-theme="dark"] .tea-upcoming-panel,
html[data-theme="dark"] .tea-editor-panel,
html[data-theme="dark"] .tea-admin-list-panel,
html[data-theme="dark"] .tea-rota-item,
html[data-theme="dark"] .tea-admin-item,
html[data-theme="dark"] .tutorial-controls-panel,
html[data-theme="dark"] .tutorial-card,
html[data-theme="dark"] .tutorial-editor-panel,
html[data-theme="dark"] .tutorial-admin-list-panel,
html[data-theme="dark"] .tutorial-admin-item,
html[data-theme="dark"] .cbnews-editor-panel,
html[data-theme="dark"] .cbnews-admin-list-panel,
html[data-theme="dark"] .cbnews-upload-panel,
html[data-theme="dark"] .cbnews-admin-item,
html[data-theme="dark"] .member-gallery-editor-panel,
html[data-theme="dark"] .member-gallery-admin-list-panel,
html[data-theme="dark"] .member-gallery-upload-panel,
html[data-theme="dark"] .member-gallery-admin-item,
html[data-theme="dark"] .member-gallery-current-thumb,
html[data-theme="dark"] .my-gallery-overview,
html[data-theme="dark"] .my-gallery-editor-panel,
html[data-theme="dark"] .my-gallery-upload-panel,
html[data-theme="dark"] .my-gallery-images-panel,
html[data-theme="dark"] .my-gallery-image-card,
html[data-theme="dark"] .gallery-replace-form,
html[data-theme="dark"] .my-gallery-thumbnail-panel,
html[data-theme="dark"] .thumbnail-cropper-panel,
html[data-theme="dark"] .member-count-card,
html[data-theme="dark"] .home-slider-editor-panel,
html[data-theme="dark"] .home-slider-list-panel,
html[data-theme="dark"] .home-slider-admin-card {
  border-color: var(--cb-dark-border) !important;
  background: var(--cb-dark-surface-soft) !important;
  color: var(--cb-text) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34) !important;
}

html[data-theme="dark"] .documents-pdf-frame-wrap,
html[data-theme="dark"] .documents-empty-state,
html[data-theme="dark"] .admin-no-results,
html[data-theme="dark"] .my-gallery-thumbnail-empty {
  background: var(--cb-dark-bg) !important;
  color: var(--cb-muted-text) !important;
}

/* Form controls in members/admin pages */

html[data-theme="dark"] .member-form-row label,
html[data-theme="dark"] .admin-search-wrap label,
html[data-theme="dark"] .tutorial-search-wrap label,
html[data-theme="dark"] .thumbnail-cropper-controls label,
html[data-theme="dark"] .checkbox-row label,
html[data-theme="dark"] .gallery-replace-label {
  color: var(--cb-text) !important;
}

html[data-theme="dark"] .member-form-row input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html[data-theme="dark"] .member-form-row textarea,
html[data-theme="dark"] .member-form-row select,
html[data-theme="dark"] .admin-search-wrap input,
html[data-theme="dark"] .tutorial-search-wrap input,
html[data-theme="dark"] .notice-rich-editor,
html[data-theme="dark"] .gallery-link-row input {
  border-color: #3d4956 !important;
  background: var(--cb-dark-input) !important;
  color: var(--cb-text) !important;
}

html[data-theme="dark"] .member-form-row input::placeholder,
html[data-theme="dark"] .member-form-row textarea::placeholder,
html[data-theme="dark"] .admin-search-wrap input::placeholder,
html[data-theme="dark"] .tutorial-search-wrap input::placeholder {
  color: #7d8fa4 !important;
}

html[data-theme="dark"] .member-form-row input[readonly] {
  background: #111820 !important;
  color: #7d8fa4 !important;
}

/* Tables */

html[data-theme="dark"] .admin-users-table th {
  color: var(--cb-blue) !important;
}

html[data-theme="dark"] .admin-users-table td,
html[data-theme="dark"] .admin-users-table th,
html[data-theme="dark"] .member-notice-header,
html[data-theme="dark"] .member-notice-footer,
html[data-theme="dark"] .competition-entry-card-header,
html[data-theme="dark"] .competition-entry-update-form,
html[data-theme="dark"] .competition-entry-locked-note {
  border-color: var(--cb-dark-border) !important;
}

/* Dashboard */

html[data-theme="dark"] .members-dashboard-hero,
html[data-theme="dark"] .members-dashboard-profile {
  border-color: var(--cb-dark-border) !important;
  background: var(--cb-dark-surface-soft) !important;
  color: var(--cb-text) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36) !important;
}

html[data-theme="dark"] .members-feature-card:not(.dashboard-card-contact-enquiries.has-unread-enquiries) {
  --dashboard-card-bg:
    radial-gradient(circle at 18% 0%, rgba(88, 166, 255, 0.10), transparent 34%),
    linear-gradient(135deg, #111820, #161b22);
  --dashboard-card-accent: #58a6ff;
  --dashboard-card-text: #c9d1d9;
  --dashboard-card-border: #30363d;
  --dashboard-card-badge-bg: #10233b;
  --dashboard-card-badge-text: #79c0ff;
  --dashboard-card-orb: rgba(88, 166, 255, 0.08);
}

html[data-theme="dark"] .members-feature-card h2 {
  color: var(--dashboard-card-accent) !important;
}

html[data-theme="dark"] .members-feature-card p {
  color: var(--dashboard-card-text) !important;
}

html[data-theme="dark"] .members-feature-badge {
  border-color: #30363d !important;
}

/* Club Documents */

html[data-theme="dark"] .document-card,
html[data-theme="dark"] .document-selector-card {
  border-color: var(--cb-dark-border) !important;
  background: linear-gradient(135deg, #111820, #161b22) !important;
  color: var(--cb-text) !important;
}

html[data-theme="dark"] .document-selector-card.active {
  border-color: var(--cb-blue) !important;
}

html[data-theme="dark"] .document-selector-title,
html[data-theme="dark"] .document-card h3,
html[data-theme="dark"] .documents-intro-panel h2,
html[data-theme="dark"] .documents-pdf-heading h2,
html[data-theme="dark"] .documents-empty-state h3 {
  color: var(--cb-blue) !important;
}

html[data-theme="dark"] .document-selector-description,
html[data-theme="dark"] .document-card p,
html[data-theme="dark"] .documents-intro-panel p,
html[data-theme="dark"] .documents-pdf-heading p,
html[data-theme="dark"] .documents-empty-state p {
  color: var(--cb-muted-text) !important;
}

html[data-theme="dark"] .documents-pdf-frame-wrap iframe {
  background: #ffffff !important;
}

/* Member notices */

html[data-theme="dark"] .member-notice-card.notice-important {
  border-color: #d29922 !important;
  background: linear-gradient(135deg, rgba(210, 153, 34, 0.12), #111820) !important;
}

html[data-theme="dark"] .member-notice-card h2,
html[data-theme="dark"] .member-notice-body,
html[data-theme="dark"] .notice-admin-item h3,
html[data-theme="dark"] .notice-email-preview-card h3 {
  color: var(--cb-text) !important;
}

html[data-theme="dark"] .member-notice-date,
html[data-theme="dark"] .member-notice-footer,
html[data-theme="dark"] .notice-admin-email-detail,
html[data-theme="dark"] .form-help,
html[data-theme="dark"] .password-rules {
  color: var(--cb-muted-text) !important;
}

/* Tea rota */

html[data-theme="dark"] .tea-next-panel {
  border-color: var(--cb-dark-border) !important;
  background:
    radial-gradient(circle at top right, rgba(46, 160, 67, 0.18), transparent 34%),
    linear-gradient(135deg, #111820, #161b22) !important;
}

html[data-theme="dark"] .tea-duty-members span,
html[data-theme="dark"] .tea-duty-notes {
  background: var(--cb-dark-surface) !important;
  color: var(--cb-text) !important;
}

/* Tutorials */

html[data-theme="dark"] .tutorial-player-panel {
  border-color: var(--cb-dark-border) !important;
  background:
    radial-gradient(circle at top right, rgba(88, 166, 255, 0.16), transparent 34%),
    linear-gradient(135deg, #111820, #161b22) !important;
}

html[data-theme="dark"] .tutorial-filter {
  border-color: var(--cb-dark-border) !important;
  background: var(--cb-dark-surface) !important;
  color: var(--cb-blue) !important;
}

html[data-theme="dark"] .tutorial-filter:hover,
html[data-theme="dark"] .tutorial-filter.active {
  border-color: var(--cb-blue) !important;
  background: #1f6feb !important;
  color: #ffffff !important;
}

/* Competition Entries */

html[data-theme="dark"] .competition-entry-summary-card,
html[data-theme="dark"] .competition-entry-card,
html[data-theme="dark"] .competition-upload-row,
html[data-theme="dark"] .competition-existing-entry {
  border-color: var(--cb-dark-border) !important;
  background: var(--cb-dark-surface-soft) !important;
  color: var(--cb-text) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34) !important;
}

html[data-theme="dark"] .competition-upload-form {
  border-color: #25415f !important;
  background: #102033 !important;
}

html[data-theme="dark"] .competition-upload-help,
html[data-theme="dark"] .competition-upload-loading {
  border-color: var(--cb-dark-border) !important;
  background: var(--cb-dark-surface) !important;
  color: var(--cb-muted-text) !important;
}

html[data-theme="dark"] .competition-entry-summary-card span,
html[data-theme="dark"] .competition-entry-card-title p,
html[data-theme="dark"] .competition-existing-entry span,
html[data-theme="dark"] .competition-entry-locked-note,
html[data-theme="dark"] .competition-upload-loading p {
  color: var(--cb-muted-text) !important;
}

html[data-theme="dark"] .competition-entry-summary-card strong,
html[data-theme="dark"] .competition-entry-card-title h2,
html[data-theme="dark"] .competition-existing-list h2,
html[data-theme="dark"] .competition-upload-row h3,
html[data-theme="dark"] .competition-upload-help strong,
html[data-theme="dark"] .competition-existing-entry strong {
  color: var(--cb-blue) !important;
}

html[data-theme="dark"] .competition-entry-date-pill {
  background: #17203a !important;
  color: #a5b4fc !important;
}

html[data-theme="dark"] .competition-existing-entry-preview {
  border-color: var(--cb-dark-border) !important;
  background-color: var(--cb-dark-bg) !important;
}

html[data-theme="dark"] .competition-existing-entry-preview::before {
  color: var(--cb-muted-text) !important;
}

/* Status/error/success blocks */

html[data-theme="dark"] .member-message.info {
  border-color: #25415f !important;
  background: #102033 !important;
  color: #79c0ff !important;
}

html[data-theme="dark"] .member-message.success,
html[data-theme="dark"] .notice-email-status-sent,
html[data-theme="dark"] .admin-status.is-active {
  border-color: #2ea043 !important;
  background: rgba(46, 160, 67, 0.16) !important;
  color: #7ee787 !important;
}

html[data-theme="dark"] .member-message.error,
html[data-theme="dark"] .notice-email-status-failed,
html[data-theme="dark"] .admin-status.is-inactive {
  border-color: #f85149 !important;
  background: rgba(248, 81, 73, 0.14) !important;
  color: #ffb3ad !important;
}

html[data-theme="dark"] .admin-status,
html[data-theme="dark"] .notice-email-status-not-sent {
  background: #1c2330 !important;
  color: var(--cb-muted-text) !important;
}

/* Danger panels */

html[data-theme="dark"] .admin-danger-panel,
html[data-theme="dark"] .tea-bulk-delete-panel {
  border-color: #f85149 !important;
  background: rgba(248, 81, 73, 0.10) !important;
}

html[data-theme="dark"] .admin-danger-panel h2,
html[data-theme="dark"] .tea-bulk-delete-panel h3 {
  color: #ffb3ad !important;
}

html[data-theme="dark"] .admin-danger-panel p,
html[data-theme="dark"] .tea-bulk-delete-panel p {
  color: #ffd8d5 !important;
}

/* =========================================================
   Member Notice Attachments
   Append to the bottom of /public_html/members/css/members.css
   ========================================================= */

.notice-pill-attachment {
  background: #dbeafe;
  color: #1d4ed8;
}

.member-notice-attachments {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.member-notice-attachments h3 {
  margin: 0 0 12px;
  color: var(--cb-deep-blue);
  font-size: 1.05rem;
}

.member-notice-attachment-list {
  display: grid;
  gap: 10px;
}

.member-notice-attachment-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #c9ddec;
  border-radius: 12px;
  background: #ffffff;
  color: var(--cb-blue);
  font-weight: 900;
  line-height: 1.35;
  text-decoration: none;
}

.member-notice-attachment-link:hover {
  border-color: var(--cb-blue);
  background: #eff6ff;
  color: var(--cb-deep-blue);
  text-decoration: none;
}

.member-notice-attachment-link small {
  color: var(--cb-muted-text);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.notice-attachment-upload-panel,
.notice-attachment-admin-panel {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.notice-attachment-upload-panel h3,
.notice-attachment-admin-panel h3 {
  margin: 0 0 8px;
  color: var(--cb-deep-blue);
  font-size: 1.05rem;
}

.notice-attachment-upload-panel p {
  margin: 0 0 14px;
  color: var(--cb-muted-text);
  line-height: 1.5;
}

.notice-attachment-admin-list {
  display: grid;
  gap: 10px;
}

.notice-attachment-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e6e8ec;
  border-radius: 12px;
  background: #ffffff;
}

.notice-attachment-admin-item strong,
.notice-attachment-admin-item span {
  display: block;
}

.notice-attachment-admin-item strong {
  color: var(--cb-deep-blue);
}

.notice-attachment-admin-item span {
  margin-top: 3px;
  color: var(--cb-muted-text);
  font-size: 0.85rem;
  font-weight: 800;
}

.notice-attachment-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 700px) {
  .member-notice-attachment-link,
  .notice-attachment-admin-item {
    display: grid;
    grid-template-columns: 1fr;
  }

  .notice-attachment-admin-actions {
    justify-content: flex-start;
  }
}

html[data-theme="dark"] .notice-pill-attachment {
  background: #10233b !important;
  color: #58a6ff !important;
}

html[data-theme="dark"] .member-notice-attachments,
html[data-theme="dark"] .notice-attachment-upload-panel,
html[data-theme="dark"] .notice-attachment-admin-panel {
  border-color: var(--cb-dark-border) !important;
  background: var(--cb-dark-surface) !important;
  color: var(--cb-text) !important;
}

html[data-theme="dark"] .member-notice-attachments h3,
html[data-theme="dark"] .notice-attachment-upload-panel h3,
html[data-theme="dark"] .notice-attachment-admin-panel h3,
html[data-theme="dark"] .notice-attachment-admin-item strong {
  color: var(--cb-blue) !important;
}

html[data-theme="dark"] .notice-attachment-upload-panel p,
html[data-theme="dark"] .notice-attachment-admin-item span,
html[data-theme="dark"] .member-notice-attachment-link small {
  color: var(--cb-muted-text) !important;
}

html[data-theme="dark"] .member-notice-attachment-link,
html[data-theme="dark"] .notice-attachment-admin-item {
  border-color: var(--cb-dark-border) !important;
  background: var(--cb-dark-surface-soft) !important;
  color: var(--cb-blue) !important;
}

html[data-theme="dark"] .member-notice-attachment-link:hover {
  border-color: var(--cb-blue) !important;
  background: #10233b !important;
  color: #79c0ff !important;
}