/* =========================================================================
   HOPE-PHC Admin backend — additional styles (layered on style.css)
   ========================================================================= */

.admin-topbar { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.admin-tabs { display: flex; gap: 6px; margin: 20px 0 0; border-bottom: 1px solid var(--gray-200); }
.admin-tab {
  background: none; border: none; padding: 10px 4px; margin-bottom: -1px;
  font-size: 13.5px; font-weight: 800; color: var(--ink-soft); cursor: pointer;
  border-bottom: 2.5px solid transparent;
}
.admin-tab + .admin-tab { margin-left: 14px; }
.admin-tab:hover { color: var(--ink); }
.admin-tab.active { color: var(--green-dark); border-bottom-color: var(--green-dark); }

.admin-stats { display: flex; gap: 14px; margin: 22px 0 18px; flex-wrap: wrap; }
.admin-stat {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  padding: 14px 20px; min-width: 160px; box-shadow: var(--shadow-card);
}
.admin-stat b { display: block; font-size: 22px; font-weight: 800; }
.admin-stat span { font-size: 11.5px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.3px; }

.admin-filters { display: flex; gap: 12px; flex-wrap: wrap; }

.admin-list { display: flex; flex-direction: column; gap: 12px; }

details.admin-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); overflow: hidden;
}
details.admin-card[open] { box-shadow: var(--shadow-card-hover); }
details.admin-card summary {
  list-style: none; cursor: pointer; padding: 14px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
details.admin-card summary::-webkit-details-marker { display: none; }
.admin-card-rank { color: var(--ink-soft); font-size: 12.5px; font-weight: 800; width: 26px; }
.admin-card-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(155deg, var(--blue), #16265c); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12.5px; flex: none; }
.admin-card-name { font-weight: 800; font-size: 14.5px; }
.admin-card-meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.admin-card-chev { margin-left: auto; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.admin-card-score { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--gray-100); color: var(--ink-soft); }
.override-flag { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--blue-light); color: var(--blue); }

.admin-form { padding: 4px 20px 22px; border-top: 1px solid var(--gray-100); }
.admin-form-section { margin-top: 18px; }
.admin-form-section h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-soft); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .admin-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 11.5px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 5px; }
.field input[type="text"], .field input[type="email"] {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; color: var(--ink); background: var(--white);
}
.field input:focus { outline: none; border-color: var(--green-dark); box-shadow: 0 0 0 3px var(--green-light); }
.contact-block { border: 1px dashed var(--gray-200); border-radius: var(--radius-sm); padding: 12px; }
.contact-block-role { font-size: 12.5px; font-weight: 800; margin-bottom: 8px; color: var(--ink); }

.topic-field-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.topic-field-row:last-child { border-bottom: none; }
.topic-field-row label { font-size: 13px; font-weight: 700; }
.topic-field-row select { min-width: 150px; }

.sub-checklist-editor { border: 1px dashed var(--gray-200); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; }
.sub-checklist-editor:last-child { margin-bottom: 0; }
.sub-checklist-editor-title { font-size: 12.5px; font-weight: 800; margin-bottom: 4px; color: var(--ink); }
.sub-checklist-editor .topic-field-row label { font-weight: 500; color: var(--ink-soft); }

.admin-textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; color: var(--ink); background: var(--white); resize: vertical;
}
.admin-textarea:focus { outline: none; border-color: var(--green-dark); box-shadow: 0 0 0 3px var(--green-light); }

.steps-editor { display: flex; flex-direction: column; gap: 8px; }
.step-row { display: flex; align-items: center; gap: 8px; }
.step-row input[type="text"] { flex: 1; }
.step-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.step-row .icon-btn { flex: none; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--gray-200); background: var(--white);
  color: var(--ink-soft); display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--red-light); color: var(--red); border-color: #f3c9c5; }

.admin-form-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.save-flash { font-size: 12.5px; font-weight: 800; color: var(--green-dark); opacity: 0; transition: opacity .2s; }
.save-flash.show { opacity: 1; }
.updated-note { font-size: 11.5px; color: var(--ink-soft); margin-left: auto; }
