/**
 * AP Family Archive - Brand Administration Styles
 *
 * Applies the AncestorPress brand system (Ink, Paper, Verdant, Stone, Amber)
 * to all plugin admin pages. Loaded only on AncestorPress screens via
 * apfaar_Admin::enqueue_brand_styles().
 *
 * Colour palette:
 *   Ink:     #1A1A18  primary near-black
 *   Paper:   #F4F2EC  warm off-white background
 *   Verdant: #2F4A3F  deep forest green, primary brand colour
 *   Stone:   #6B6E6C  muted grey, supporting use
 *   Amber:   #C4831A  accent - CTAs, highlights, badges only
 *
 * Typography:
 *   Headings: Libre Baskerville Bold when locally available, else Georgia/serif
 *   UI:       Inter when locally available, else the system sans stack
 *   (No remote font loading - the stacks below fall back gracefully.)
 */

/* â”€â”€ Variables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin {
    --apfa-ink:        #1A1A18;
    --apfa-paper:      #F4F2EC;
    --apfa-verdant:    #2F4A3F;
    --apfa-stone:      #6B6E6C;
    --apfa-amber:      #C4831A;
    --apfa-border:     rgba(26, 26, 24, 0.10);
    --apfa-border-med: rgba(26, 26, 24, 0.18);
    --apfa-white:      #ffffff;
}

/* â”€â”€ Page wrapper â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin {
    background: var(--apfa-paper);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--apfa-ink);
}

/* â”€â”€ Plugin header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.apfa-plugin-header {
    background: var(--apfa-ink);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 2px solid var(--apfa-amber);
    /* Fill the wrap's natural width exactly - no breakout.
       WordPress .wrap has margin: 10px 20px 0 2px so pulling to
       its edges gives consistent equal alignment with all page content. */
    width: 100%;
    box-sizing: border-box;
    margin-top: -10px;
    margin-bottom: 24px;
    padding: 0 22px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
}

.apfa-ph-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.apfa-ph-icon {
    width: 32px;
    height: 32px;
    background: var(--apfa-verdant);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
}

.apfa-ph-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.apfa-ph-wordmark {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--apfa-paper);
    letter-spacing: -0.02em;
    display: block;
}

.apfa-ph-tagline {
    font-size: 9px;
    color: rgba(244, 242, 236, 0.60);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: block;
}

.apfa-ph-plan {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 10px;
}

.apfa-ph-plan-label {
    color: rgba(244, 242, 236, 0.70);
}

.apfa-ph-plan-unlimited {
    color: var(--apfa-amber);
    font-weight: 500;
}

.apfa-ph-help {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(244, 242, 236, 0.65);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border: 1px solid rgba(244, 242, 236, 0.22);
    border-radius: 3px;
    cursor: pointer;
    background: transparent;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

.apfa-ph-help:hover {
    color: var(--apfa-paper);
    border-color: rgba(244, 242, 236, 0.45);
    background: rgba(244, 242, 236, 0.07);
}

.apfa-ph-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.apfa-ph-upgrade {
    color: var(--apfa-amber);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
}

.apfa-ph-upgrade:hover {
    text-decoration: underline;
    color: var(--apfa-amber);
}

/* â”€â”€ Page heading â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .wp-heading-inline {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 21px;
    color: var(--apfa-ink);
    letter-spacing: -0.025em;
}

.wrap.apfa-admin .wp-header-end {
    margin-bottom: 16px;
    border-top-color: var(--apfa-border-med);
}

.wrap.apfa-admin h2 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    color: var(--apfa-ink);
    letter-spacing: -0.02em;
}

/* â”€â”€ Postboxes (cards) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .postbox {
    border: 1px solid var(--apfa-border-med);
    border-radius: 5px;
    box-shadow: none;
    background: var(--apfa-white);
}

.wrap.apfa-admin .postbox .postbox-header {
    background: var(--apfa-verdant);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 0;
    min-height: 0;
}

.wrap.apfa-admin .postbox .postbox-header h2.hndle {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 12px;
    color: var(--apfa-paper);
    letter-spacing: -0.01em;
    padding: 10px 16px;
    cursor: default;
    width: 100%;
}

.wrap.apfa-admin .postbox .postbox-header .hndle-settings {
    display: none;
}

.wrap.apfa-admin .postbox .inside {
    padding: 16px;
    margin: 0;
}

/* â”€â”€ Tables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin table.widefat,
.wrap.apfa-admin .apfa-data-table {
    border: none;
    box-shadow: none;
    background: var(--apfa-white);
}

.wrap.apfa-admin table.widefat th,
.wrap.apfa-admin .apfa-data-table th {
    background: var(--apfa-paper);
    color: var(--apfa-stone);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 9px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 8px 12px;
    border-bottom: 1px solid var(--apfa-border-med);
    white-space: nowrap;
}

.wrap.apfa-admin table.widefat th abbr,
.wrap.apfa-admin .apfa-data-table th abbr {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: help;
}

.wrap.apfa-admin table.widefat td,
.wrap.apfa-admin .apfa-data-table td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(26, 26, 24, 0.05);
    color: var(--apfa-ink);
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    vertical-align: middle;
    background: transparent;
}

.wrap.apfa-admin table.widefat tr:last-child td,
.wrap.apfa-admin .apfa-data-table tr:last-child td {
    border-bottom: none;
}

.wrap.apfa-admin table.widefat tr:hover td,
.wrap.apfa-admin .apfa-data-table tr:hover td {
    background: rgba(47, 74, 63, 0.03);
}

/* â”€â”€ GEDCOM reference monospace chips â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-gedcom-ref {
    font-family: monospace;
    font-size: 10px;
    color: var(--apfa-stone);
    background: var(--apfa-paper);
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid var(--apfa-border);
}

/* â”€â”€ Living person dot â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-living-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--apfa-amber);
    vertical-align: middle;
}

/* â”€â”€ Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .button-primary,
.wrap.apfa-admin input[type="submit"].button-primary {
    background: var(--apfa-verdant);
    border-color: var(--apfa-verdant);
    color: var(--apfa-paper);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-shadow: none;
    box-shadow: none;
    border-radius: 4px;
}

.wrap.apfa-admin .button-primary:hover,
.wrap.apfa-admin input[type="submit"].button-primary:hover {
    background: #243d33;
    border-color: #243d33;
    color: var(--apfa-paper);
    box-shadow: none;
}

.wrap.apfa-admin .button-primary:focus,
.wrap.apfa-admin input[type="submit"].button-primary:focus {
    box-shadow: 0 0 0 2px rgba(47, 74, 63, 0.35);
    border-color: var(--apfa-verdant);
    outline: none;
}

.wrap.apfa-admin .button-secondary {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border-radius: 4px;
    background: transparent;
    border-color: var(--apfa-border-med);
    color: var(--apfa-ink);
}

.wrap.apfa-admin .button-secondary:hover {
    background: rgba(26, 26, 24, 0.04);
    border-color: var(--apfa-stone);
    color: var(--apfa-ink);
}

/* â”€â”€ Form inputs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin input[type="text"],
.wrap.apfa-admin input[type="number"],
.wrap.apfa-admin input[type="email"],
.wrap.apfa-admin input[type="url"],
.wrap.apfa-admin input[type="search"],
.wrap.apfa-admin input[type="file"],
.wrap.apfa-admin select,
.wrap.apfa-admin textarea {
    font-family: 'Inter', sans-serif;
    border-color: var(--apfa-border-med);
    background: var(--apfa-white);
    color: var(--apfa-ink);
    border-radius: 4px;
}

.wrap.apfa-admin input[type="text"]:focus,
.wrap.apfa-admin input[type="number"]:focus,
.wrap.apfa-admin select:focus,
.wrap.apfa-admin textarea:focus {
    border-color: var(--apfa-verdant);
    box-shadow: 0 0 0 2px rgba(47, 74, 63, 0.15);
    outline: none;
}

.wrap.apfa-admin .form-table th {
    color: var(--apfa-ink);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.wrap.apfa-admin .form-table .description,
.wrap.apfa-admin p.description {
    color: var(--apfa-stone);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
}

/* â”€â”€ Filter bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--apfa-white);
    border: 1px solid var(--apfa-border-med);
    border-radius: 5px;
}

.wrap.apfa-admin .apfa-filter-bar select,
.wrap.apfa-admin .apfa-filter-bar input[type="text"],
.wrap.apfa-admin .apfa-filter-bar input[type="search"] {
    font-size: 11px;
    padding: 5px 8px;
    background: var(--apfa-paper);
}

.wrap.apfa-admin .apfa-filter-bar select {
    min-width: 180px;
}

.wrap.apfa-admin .apfa-filter-count {
    margin-left: auto;
    font-size: 10px;
    color: var(--apfa-stone);
    font-family: 'Inter', sans-serif;
}

/* â”€â”€ Notices â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-notice-verdant {
    background: rgba(47, 74, 63, 0.07);
    border: none;
    border-left: 3px solid var(--apfa-verdant);
    border-radius: 0 4px 4px 0;
    padding: 9px 14px;
    font-size: 11px;
    color: var(--apfa-verdant);
    font-weight: 500;
    margin-bottom: 14px;
    box-shadow: none;
}

.wrap.apfa-admin .apfa-notice-amber {
    background: rgba(196, 131, 26, 0.08);
    border: none;
    border-left: 3px solid var(--apfa-amber);
    border-radius: 0 4px 4px 0;
    padding: 9px 14px;
    font-size: 11px;
    color: #7a5410;
    margin-bottom: 14px;
    box-shadow: none;
}

/* â”€â”€ Section dividers â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 14px;
}

.wrap.apfa-admin .apfa-section-divider span {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--apfa-stone);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .apfa-section-divider hr {
    flex: 1;
    border: none;
    border-top: 1px solid var(--apfa-border-med);
    margin: 0;
}

/* â”€â”€ Migration Tools specifics â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-migrate-summary.widefat {
    width: auto;
    margin-bottom: 16px;
}

.wrap.apfa-admin .apfa-migrate-summary th,
.wrap.apfa-admin .apfa-migrate-summary td {
    text-align: center;
    padding: 8px 20px;
}

.wrap.apfa-admin .apfa-migration-stat-grid {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    max-width: 360px;
}

.wrap.apfa-admin .apfa-migration-stat {
    flex: 1;
    background: var(--apfa-paper);
    border: 1px solid var(--apfa-border-med);
    border-radius: 5px;
    padding: 10px 12px;
    text-align: center;
}

.wrap.apfa-admin .apfa-migration-stat .n {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--apfa-ink);
    display: block;
    line-height: 1.2;
}

.wrap.apfa-admin .apfa-migration-stat .l {
    font-size: 9px;
    color: var(--apfa-stone);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

/* â”€â”€ Action links in tables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-action-edit {
    color: var(--apfa-verdant);
    font-weight: 500;
    font-size: 11px;
}

.wrap.apfa-admin .apfa-action-edit:hover {
    color: #243d33;
}

.wrap.apfa-admin .apfa-action-delete {
    color: #b33;
    font-size: 11px;
}

/* â”€â”€ Member edit save bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-save-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 0 0;
    border-top: 1px solid var(--apfa-border-med);
    margin-top: 8px;
    flex-wrap: wrap;
}

.wrap.apfa-admin .apfa-save-bar .apfa-ref-meta {
    margin-left: auto;
    font-size: 10px;
    color: var(--apfa-stone);
    font-family: 'Inter', sans-serif;
}

/* â”€â”€ Checkbox rows â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin input[type="checkbox"] {
    accent-color: var(--apfa-verdant);
}

/* â”€â”€ Navigation tabs (Migration Tools) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .nav-tab-wrapper {
    border-bottom-color: var(--apfa-border-med);
    background: transparent;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wrap.apfa-admin .nav-tab {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--apfa-stone);
    border-color: transparent;
    background: transparent;
    margin-bottom: -1px;
}

.wrap.apfa-admin .nav-tab:hover {
    color: var(--apfa-ink);
    background: transparent;
}

.wrap.apfa-admin .nav-tab-active,
.wrap.apfa-admin .nav-tab-active:hover {
    color: var(--apfa-verdant);
    border-bottom-color: var(--apfa-verdant);
    background: transparent;
}

/* â”€â”€ Upgrade badge (Unlimited) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-unlimited-badge {
    display: inline-block;
    background: var(--apfa-amber);
    color: #fff;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

/* â”€â”€ Tab content padding â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-tab-content {
    padding-top: 18px;
}

/* â”€â”€ Hide the WordPress native Help button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Our plugin header provides a Help button that opens the same panel.
   Hiding the native WP button prevents duplication. Loaded only on
   AncestorPress screens via enqueue_brand_styles(). */
#contextual-help-link-wrap {
    display: none !important;
}

/* â”€â”€ Section cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Clean white bordered cards. Section headings (.apfa-section-heading) sit
   above the card as plain h2 elements - no Verdant header bar inside the card.
   Postboxes (Edit Member etc.) keep their Verdant header treatment separately. */

.wrap.apfa-admin .apfa-section-card {
    background: var(--apfa-white);
    border: 1px solid var(--apfa-border-med);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.wrap.apfa-admin .apfa-table-card {
    padding: 0;
    overflow: hidden;
}

.wrap.apfa-admin .apfa-section-heading {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--apfa-ink);
    letter-spacing: -0.02em;
    margin: 20px 0 10px;
}

.wrap.apfa-admin .apfa-section-card .form-table {
    margin: 0;
}

.wrap.apfa-admin .apfa-section-card .form-table th {
    padding-left: 0;
    width: 160px;
}

.wrap.apfa-admin .apfa-section-card .form-table tr {
    border-bottom: 1px solid rgba(26,26,24,0.06);
}

.wrap.apfa-admin .apfa-section-card .form-table tr:last-child {
    border-bottom: none;
}

/* â”€â”€ Intro card (icon + description) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-intro-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--apfa-white);
    border: 1px solid var(--apfa-border-med);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.wrap.apfa-admin .apfa-intro-icon {
    width: 52px;
    height: 52px;
    background: var(--apfa-verdant);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wrap.apfa-admin .apfa-intro-card p {
    margin: 0;
    font-size: 13px;
    color: var(--apfa-stone);
    line-height: 1.6;
}

/* â”€â”€ Stacked field layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-field-group {
    margin-bottom: 18px;
}

.wrap.apfa-admin .apfa-field-group:last-of-type {
    margin-bottom: 0;
}

.wrap.apfa-admin .apfa-field-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: var(--apfa-ink);
    margin-bottom: 6px;
}

.wrap.apfa-admin .apfa-field-input {
    display: block;
    width: 100%;
    max-width: 480px;
    padding: 7px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    border: 1px solid var(--apfa-border-med);
    border-radius: 4px;
    background: var(--apfa-white);
    color: var(--apfa-ink);
}

.wrap.apfa-admin .apfa-field-input:focus {
    border-color: var(--apfa-verdant);
    box-shadow: 0 0 0 2px rgba(47,74,63,0.15);
    outline: none;
}

.wrap.apfa-admin input.apfa-file-input {
    display: block;
    max-width: 480px;
    padding: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    border: 1px solid var(--apfa-border-med);
    border-radius: 4px;
    background: var(--apfa-white);
    width: 100%;
    box-sizing: border-box;
}

.wrap.apfa-admin .apfa-field-desc {
    font-size: 11px;
    color: var(--apfa-stone);
    margin: 5px 0 0;
}

/* â”€â”€ Button with icon â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
}

/* â”€â”€ Tips card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-tips-card {
    background: var(--apfa-paper);
    border: 1px solid var(--apfa-border-med);
    border-radius: 6px;
    padding: 16px 20px;
    margin-top: 16px;
}

.wrap.apfa-admin .apfa-tips-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.wrap.apfa-admin .apfa-tips-circle-i {
    width: 22px;
    height: 22px;
    background: var(--apfa-verdant);
    color: var(--apfa-paper);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

.wrap.apfa-admin .apfa-tips-card-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--apfa-ink);
    letter-spacing: -0.01em;
}

.wrap.apfa-admin .apfa-tips-check-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wrap.apfa-admin .apfa-tips-check-list li {
    display: flex;
    align-items: baseline;
    gap: 9px;
    font-size: 12px;
    color: var(--apfa-stone);
    margin-bottom: 7px;
    line-height: 1.5;
}

.wrap.apfa-admin .apfa-tips-check-list li::before {
    content: '\2713';
    color: var(--apfa-verdant);
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

/* â”€â”€ Nav tabs: increase specificity to override WP defaults â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

#wpbody .wrap.apfa-admin .nav-tab-wrapper .nav-tab-active,
#wpbody .wrap.apfa-admin .nav-tab-wrapper .nav-tab-active:hover {
    color: var(--apfa-verdant);
    border-bottom: 2px solid var(--apfa-verdant);
    background: transparent;
    outline: none;
}

/* â”€â”€ All Members filter bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin form.apfa-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--apfa-white);
    border: 1px solid var(--apfa-border-med);
    border-radius: 5px;
    margin-bottom: 8px !important;
}

.wrap.apfa-admin form.apfa-filter-bar select,
.wrap.apfa-admin form.apfa-filter-bar input[type="search"],
.wrap.apfa-admin form.apfa-filter-bar input[type="text"] {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    padding: 5px 9px;
    border-color: var(--apfa-border-med);
    background: var(--apfa-paper);
    color: var(--apfa-ink);
    border-radius: 4px;
}

/* â”€â”€ Charts: table inside section card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-section-card .wp-list-table.widefat {
    border: none;
    border-radius: 0;
    margin: 0;
}

/* â”€â”€ Filter card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Replaces the old .apfa-filter-bar. Labels sit above each field. */

.wrap.apfa-admin .apfa-filter-card {
    background: var(--apfa-white);
    border: 1px solid var(--apfa-border-med);
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.wrap.apfa-admin .apfa-filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wrap.apfa-admin .apfa-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--apfa-ink);
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .apfa-filter-field select {
    min-width: 200px;
    padding: 7px 10px;
    font-size: 12px;
    border: 1px solid var(--apfa-border-med);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    background: var(--apfa-white);
    color: var(--apfa-ink);
}

.wrap.apfa-admin .apfa-filter-search {
    flex: 1;
}

.wrap.apfa-admin .apfa-search-wrap {
    position: relative;
}

.wrap.apfa-admin .apfa-search-wrap svg {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--apfa-stone);
    pointer-events: none;
}

.wrap.apfa-admin .apfa-search-wrap input {
    width: 100%;
    padding: 7px 10px 7px 30px;
    font-size: 12px;
    border: 1px solid var(--apfa-border-med);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    background: var(--apfa-white);
    color: var(--apfa-ink);
    box-sizing: border-box;
}

.wrap.apfa-admin .apfa-filter-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 7px 16px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* â”€â”€ Count row â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Icon circle + "X found" summary line. */

.wrap.apfa-admin .apfa-count-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.wrap.apfa-admin .apfa-count-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(47, 74, 63, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--apfa-verdant);
}

.wrap.apfa-admin .apfa-count-strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--apfa-ink);
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .apfa-count-sub {
    font-size: 12px;
    color: var(--apfa-stone);
    margin-left: 6px;
    font-family: 'Inter', sans-serif;
}

/* â”€â”€ Page title action button (primary style) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin a.page-title-action.apfa-btn-primary {
    background: var(--apfa-verdant);
    border: 1px solid var(--apfa-verdant);
    color: var(--apfa-paper);
    text-shadow: none;
    box-shadow: none;
    border-radius: 4px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    vertical-align: middle;
}

.wrap.apfa-admin a.page-title-action.apfa-btn-primary:hover {
    background: #243d33;
    border-color: #243d33;
    color: var(--apfa-paper);
}

/* â”€â”€ Options cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-options-card {
    background: var(--apfa-white);
    border: 1px solid var(--apfa-border-med);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 16px;
}

.wrap.apfa-admin .apfa-options-section-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--apfa-ink);
    letter-spacing: -0.02em;
    margin: 0 0 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--apfa-border);
}

.wrap.apfa-admin .apfa-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid var(--apfa-border);
    gap: 20px;
}

.wrap.apfa-admin .apfa-options-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wrap.apfa-admin .apfa-options-label-wrap {
    flex: 1;
    min-width: 0;
}

.wrap.apfa-admin .apfa-options-label {
    font-size: 13px;
    color: var(--apfa-ink);
    font-family: 'Inter', sans-serif;
    display: block;
}

.wrap.apfa-admin .apfa-options-desc {
    font-size: 11px;
    color: var(--apfa-stone);
    margin-top: 3px;
    display: block;
    line-height: 1.5;
}

/* â”€â”€ Toggle switch â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.wrap.apfa-admin .apfa-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.wrap.apfa-admin .apfa-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.25s;
}

.wrap.apfa-admin .apfa-toggle-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.wrap.apfa-admin .apfa-toggle input:checked + .apfa-toggle-slider {
    background: var(--apfa-verdant);
}

.wrap.apfa-admin .apfa-toggle input:checked + .apfa-toggle-slider::before {
    transform: translateX(20px);
}

.wrap.apfa-admin .apfa-toggle input:focus + .apfa-toggle-slider {
    box-shadow: 0 0 0 2px rgba(47, 74, 63, 0.3);
}

/* â”€â”€ Shortcode reference rows â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-shortcode-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--apfa-border);
}

.wrap.apfa-admin .apfa-shortcode-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wrap.apfa-admin .apfa-shortcode-label {
    font-size: 12px;
    color: var(--apfa-stone);
    min-width: 200px;
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .apfa-shortcode-field {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.wrap.apfa-admin input.apfa-shortcode-input {
    flex: 1;
    font-family: monospace;
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid var(--apfa-border-med);
    border-radius: 4px;
    background: var(--apfa-paper);
    color: var(--apfa-ink);
    cursor: text;
}

.wrap.apfa-admin .apfa-copy-btn {
    background: transparent;
    border: 1px solid var(--apfa-border-med);
    border-radius: 4px;
    padding: 5px 7px;
    cursor: pointer;
    color: var(--apfa-stone);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.wrap.apfa-admin .apfa-copy-btn:hover {
    border-color: var(--apfa-verdant);
    color: var(--apfa-verdant);
}

/* â”€â”€ Freemius page header (appears via admin_notices) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.apfa-freemius-header {
    --apfa-ink:     #1A1A18;
    --apfa-paper:   #F4F2EC;
    --apfa-verdant: #2F4A3F;
    --apfa-stone:   #6B6E6C;
    --apfa-amber:   #C4831A;
    margin: -5px -20px 0;
}

.apfa-freemius-header .apfa-plugin-header {
    width: 100%;
    margin: 0;
}

/* â”€â”€ Dashboard â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-dashboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.wrap.apfa-admin .apfa-dashboard-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 26px;
    color: var(--apfa-ink);
    letter-spacing: -0.03em;
    margin: 0;
}

.wrap.apfa-admin .apfa-btn-lg {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* Tree overview card */
.wrap.apfa-admin .apfa-tree-overview-card {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.wrap.apfa-admin .apfa-tree-overview-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    flex: 2;
}

.wrap.apfa-admin .apfa-tree-overview-identity > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wrap.apfa-admin .apfa-tree-overview-name {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 17px;
    color: var(--apfa-ink);
    letter-spacing: -0.02em;
    font-weight: 700;
}

.wrap.apfa-admin .apfa-tree-overview-date {
    font-size: 11px;
    color: var(--apfa-stone);
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .apfa-tree-overview-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 20px 24px;
    border-left: 1px solid var(--apfa-border);
    flex: 1;
}

.wrap.apfa-admin .apfa-tree-overview-shortcode {
    flex: 2.5;
}

.wrap.apfa-admin .apfa-stat-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--apfa-stone);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .apfa-stat-number {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 28px;
    color: var(--apfa-ink);
    letter-spacing: -0.03em;
    line-height: 1;
}

/* Dashboard two-column grid */
.wrap.apfa-admin .apfa-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

/* Quick start steps */
.wrap.apfa-admin .apfa-quickstart-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    font-size: 13px;
    color: var(--apfa-ink);
    line-height: 1.5;
}

.wrap.apfa-admin .apfa-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--apfa-paper);
    border: 1px solid var(--apfa-border-med);
    color: var(--apfa-stone);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .apfa-quickstart-divider {
    height: 1px;
    background: var(--apfa-border);
    margin: 0;
}

.wrap.apfa-admin .apfa-doc-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 12px;
    color: var(--apfa-verdant);
    text-decoration: none;
    font-weight: 500;
}

.wrap.apfa-admin .apfa-doc-link:hover {
    text-decoration: underline;
    color: var(--apfa-verdant);
}

/* Quick actions */
.wrap.apfa-admin .apfa-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.wrap.apfa-admin .apfa-quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--apfa-paper);
    border: 1px solid var(--apfa-border-med);
    border-radius: 6px;
    text-decoration: none;
    font-size: 11px;
    color: var(--apfa-ink);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    transition: all 0.15s;
}

.wrap.apfa-admin .apfa-quick-action-btn svg {
    color: var(--apfa-verdant);
}

.wrap.apfa-admin .apfa-quick-action-btn:hover {
    background: var(--apfa-white);
    border-color: var(--apfa-verdant);
    color: var(--apfa-verdant);
}

/* Tip box inside Quick actions */
.wrap.apfa-admin .apfa-tip-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--apfa-paper);
    border: 1px solid var(--apfa-border-med);
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 12px;
    color: var(--apfa-stone);
    line-height: 1.6;
}

.wrap.apfa-admin .apfa-tip-box .apfa-tips-circle-i {
    flex-shrink: 0;
    margin-top: 1px;
}

.wrap.apfa-admin .apfa-tip-box p {
    margin: 0;
}

.wrap.apfa-admin .apfa-tip-box a {
    color: var(--apfa-verdant);
    text-decoration: none;
    font-weight: 500;
}

/* â”€â”€ All Trees enhancements â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wrap.apfa-admin .apfa-tree-badges {
    display: flex;
    gap: 6px;
    margin-top: 5px;
}

.wrap.apfa-admin .apfa-tree-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--apfa-stone);
    background: var(--apfa-paper);
    border: 1px solid var(--apfa-border);
    border-radius: 10px;
    padding: 2px 7px;
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .apfa-status-active {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--apfa-verdant);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .apfa-info-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--apfa-stone);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

/* â”€â”€ Two-column form grid (Charts, Edit Member) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Responsive: single column below 640px, two/three columns above. */

.wrap.apfa-admin .apfa-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
    align-items: start;
}

.wrap.apfa-admin .apfa-form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0 24px;
    align-items: start;
}

.wrap.apfa-admin .apfa-form-col {
    min-width: 0;
}

/* form-table inside a grid column - remove WP's min-width so it fits */
.wrap.apfa-admin .apfa-form-col .form-table {
    width: 100%;
}

.wrap.apfa-admin .apfa-form-col .form-table th {
    width: auto;
    padding-left: 0;
    padding-right: 12px;
}

/* Row spanning - for fields that should take full width */
.wrap.apfa-admin .apfa-col-span-2 {
    grid-column: span 2;
}

/* Responsive collapse */
@media (max-width: 720px) {
    .wrap.apfa-admin .apfa-form-grid-2,
    .wrap.apfa-admin .apfa-form-grid-3 {
        grid-template-columns: 1fr;
    }
    .wrap.apfa-admin .apfa-col-span-2 {
        grid-column: span 1;
    }
}

/* Fieldset-style group within a postbox - replaces form-table rows */
.wrap.apfa-admin .apfa-field-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(26,26,24,0.06);
    font-size: 13px;
}

.wrap.apfa-admin .apfa-field-row:last-child {
    border-bottom: none;
}

.wrap.apfa-admin .apfa-field-row-label {
    flex: 0 0 160px;
    font-weight: 500;
    color: var(--apfa-ink);
    padding-top: 6px;
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .apfa-field-row-control {
    flex: 1;
    min-width: 0;
}

.wrap.apfa-admin .apfa-field-row-control input[type="text"],
.wrap.apfa-admin .apfa-field-row-control input[type="number"],
.wrap.apfa-admin .apfa-field-row-control select {
    width: 100%;
    max-width: 360px;
}

/* Compact checkbox row */
.wrap.apfa-admin .apfa-check-label {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 13px;
    color: var(--apfa-ink);
    cursor: pointer;
    margin-bottom: 6px;
    line-height: 1.4;
}

.wrap.apfa-admin .apfa-check-label:last-child {
    margin-bottom: 0;
}

.wrap.apfa-admin .apfa-check-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .wrap.apfa-admin .apfa-field-row {
        flex-direction: column;
        gap: 4px;
    }
    .wrap.apfa-admin .apfa-field-row-label {
        flex: none;
        padding-top: 0;
    }
}

/* â”€â”€ Family Archive additions (on top of the ported suite standard) â”€â”€â”€â”€â”€â”€â”€ */

/* Plain h1 on study pages gets the display treatment too. */
.wrap.apfa-admin h1 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--apfa-ink);
    letter-spacing: -0.03em;
}

/* Sub-view links (Distribution: Table | Map | Assign). */
.wrap.apfa-admin .subsubsub a {
    color: var(--apfa-stone);
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin .subsubsub a.current {
    color: var(--apfa-verdant);
    font-weight: 600;
}

/* Add study: primary action. */
.wrap.apfa-admin a.page-title-action {
    background: var(--apfa-verdant);
    border: 1px solid var(--apfa-verdant);
    color: var(--apfa-paper);
    text-shadow: none;
    box-shadow: none;
    border-radius: 4px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.wrap.apfa-admin a.page-title-action:hover {
    background: #243d33;
    border-color: #243d33;
    color: var(--apfa-paper);
}

/* Occurrence entry grid inherits the brand type + colours. */
.wrap.apfa-admin .apfa-occ-grid label {
    font-family: 'Inter', sans-serif;
    color: var(--apfa-ink);
}

.wrap.apfa-admin .apfa-occ-grid .description {
    color: var(--apfa-stone);
}

/* Variant/deviant badges recoloured to the palette. */
.wrap.apfa-admin .apfa-badge-variant {
    background: rgba(47, 74, 63, 0.12);
    color: var(--apfa-verdant);
}

.wrap.apfa-admin .apfa-badge-deviant {
    background: rgba(196, 131, 26, 0.14);
    color: #7a5410;
}

.wrap.apfa-admin .apfa-delete-link {
    color: #b33;
}

/* Import guide steps (inside the tips card). */
.wrap.apfa-admin .apfa-guide-steps {
    margin: 0;
    padding-left: 20px;
}

.wrap.apfa-admin .apfa-guide-steps li {
    font-size: 12px;
    color: var(--apfa-stone);
    line-height: 1.6;
    margin-bottom: 10px;
}

.wrap.apfa-admin .apfa-guide-steps li strong {
    color: var(--apfa-ink);
}
