/* Combined Admin page (admin.php) — tabs over the panels that used to
   live in two places: root admin.php (home page / requests) and the
   Family Tree header modals (users / email / activity / data).
   Light, plain CSS matching landing.css; no build step. */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.admin-tabs a {
    border: 1px solid #9ca3af;
    background: #fff;
    color: #111;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.admin-tabs a:hover { background: #f3f4f6; }
.admin-tabs a[aria-current="page"] {
    background: #111;
    border-color: #111;
    color: #fff;
}
.admin-tabs .tab-badge {
    display: inline-block;
    min-width: 20px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: #991b1b;
    color: #fff;
    font-size: 0.78rem;
    line-height: 20px;
    text-align: center;
    vertical-align: middle;
}
.admin-panel[hidden] { display: none !important; }
.admin-panel h2 { margin-top: 8px; }
.admin-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 9px 11px;
    font-size: 1rem;
    border: 1px solid #9ca3af;
    border-radius: 8px;
    background: #fff;
    color: #111;
}
.field .help { font-size: 0.82rem; color: #6b7280; }
.form-error { color: #991b1b; font-size: 0.9rem; margin: 6px 0; }
.form-note { color: #6b7280; font-size: 0.88rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}
.admin-table th { color: #6b7280; font-weight: 600; }
.badge {
    font-size: 0.75rem;
    border: 1px solid #9ca3af;
    border-radius: 999px;
    padding: 2px 8px;
    color: #6b7280;
    white-space: nowrap;
}
.badge.ok { color: #14532d; border-color: #86efac; }
.log-list { font-size: 0.9rem; }
.log-list .log-item { border-bottom: 1px solid #e5e7eb; padding: 8px 0; overflow-wrap: anywhere; }
.log-list .log-meta { color: #6b7280; font-size: 0.82rem; }
.btn {
    border: 1px solid #9ca3af;
    background: #fff;
    color: #111;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn:hover { background: #f3f4f6; }
.btn.primary { background: #111; border-color: #111; color: #fff; }
.btn.danger { color: #991b1b; border-color: #fca5a5; }
.btn.small { padding: 6px 10px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 90;
    background: #111;
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 92vw;
    text-align: center;
}
.toast[hidden] { display: none; }
/* Edit-user dialog only; every other panel is an inline tab section. */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 40;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 12px;
    overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
.modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: min(460px, 100%);
    padding: 18px 20px;
    position: relative;
}
.modal h2 { margin: 2px 0 10px; font-size: 1.2rem; }
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid #9ca3af;
    background: #fff;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
}
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.small { font-size: 0.85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
