/* Heaven Bound Care Groups — Public CSS */

:root {
    --hb-primary:   #1a3a6b;
    --hb-secondary: #2e6da4;
    --hb-button:    #e8a020;
    --hb-text:      #222;
    --hb-border:    #ccc;
    --hb-light-bg:  #f4f6f9;
}

.hb-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px;
    font-family: Arial, sans-serif;
    color: var(--hb-text);
}

/* Header */
.hb-header {
    background: var(--hb-primary);
    color: #fff;
    padding: 20px 24px;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
}

.hb-header h1 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #fff;
}

.hb-subtitle {
    margin: 0;
    opacity: .8;
    font-size: 13px;
}

.hb-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Back button */
.hb-back-btn {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: #fff !important;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,.3);
    transition: background .2s;
}

.hb-back-btn:hover {
    background: rgba(255,255,255,.25);
}

/* Print button */
.hb-print-btn {
    display: inline-block;
    background: var(--hb-button);
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}

.hb-print-btn:hover {
    opacity: .9;
}

/* Cards */
.hb-card {
    background: #fff;
    border: 1px solid var(--hb-border);
    border-top: none;
    padding: 20px 24px;
    margin-bottom: 0;
}

.hb-card + .hb-card {
    border-top: 1px solid var(--hb-border);
    margin-top: 0;
}

/* Section titles */
.hb-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
    padding: 8px 12px;
    background: var(--hb-primary);
    color: #fff;
    border-radius: 3px;
}

.hb-section-officers {
    background: var(--hb-secondary);
}

.hb-section-members {
    background: #3d7a55;
}

/* Tables */
.hb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.hb-table th {
    background: var(--hb-light-bg);
    color: var(--hb-primary);
    font-weight: 700;
    text-align: left;
    padding: 8px 10px;
    border: 1px solid var(--hb-border);
}

.hb-table td {
    padding: 7px 10px;
    border: 1px solid var(--hb-border);
    vertical-align: top;
}

.hb-table tbody tr:hover {
    background: #f9f9f9;
}

/* Details table */
.hb-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 0;
}

.hb-details-table th {
    width: 160px;
    background: var(--hb-light-bg);
    font-weight: 600;
    padding: 7px 12px;
    border: 1px solid var(--hb-border);
    color: var(--hb-primary);
    text-align: left;
}

.hb-details-table td {
    padding: 7px 12px;
    border: 1px solid var(--hb-border);
}

/* Button links */
.hb-btn {
    display: inline-block;
    background: var(--hb-button);
    color: #fff !important;
    text-decoration: none;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity .2s;
}

.hb-btn:hover {
    opacity: .85;
}

.hb-empty {
    text-align: center;
    color: #888;
    padding: 20px !important;
    font-style: italic;
}

/* Responsive */
@media (max-width: 640px) {
    .hb-table, .hb-table thead, .hb-table tbody, .hb-table th, .hb-table td, .hb-table tr {
        display: block;
    }
    .hb-table thead {
        display: none;
    }
    .hb-table td {
        border: none;
        border-bottom: 1px solid #eee;
        padding-left: 45%;
        position: relative;
    }
    .hb-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: 700;
        width: 40%;
    }
    .hb-header-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   v1.1.0 — Login Portal Styles
   ============================================================ */

.hb-login-wrap {
    max-width: 480px;
    margin: 40px auto;
}

.hb-login-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 36px 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.hb-login-title {
    font-size: 1.4em;
    color: var(--hb-primary, #1a3a6b);
    margin: 0 0 4px;
    text-align: center;
}

.hb-login-subtitle {
    text-align: center;
    color: #666;
    margin: 0 0 24px;
    font-size: 0.95em;
}

.hb-login-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    color: #b91c1c;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 0.92em;
}

.hb-login-form .hb-form-group {
    margin-bottom: 18px;
}

.hb-login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
    font-size: 0.93em;
}

.hb-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.hb-input:focus {
    outline: none;
    border-color: var(--hb-primary, #1a3a6b);
    box-shadow: 0 0 0 3px rgba(26,58,107,0.12);
}

.hb-remember-row {
    margin-top: 4px;
}

.hb-remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    color: #555;
    cursor: pointer;
}

.hb-btn-login {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-weight: 600;
    margin-top: 6px;
    background: var(--hb-button, #e8a020);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.hb-btn-login:hover {
    opacity: 0.88;
}

.hb-forgot-password {
    text-align: center;
    margin: 14px 0 0;
    font-size: 0.88em;
}

.hb-forgot-password a {
    color: var(--hb-secondary, #2e6da4);
    text-decoration: none;
}

/* Already logged-in state */
.hb-login-greeting {
    text-align: center;
    font-size: 1.05em;
    margin-bottom: 10px;
}

.hb-no-permission {
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 0.92em;
    margin-bottom: 16px;
}

.hb-login-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.hb-btn-logout {
    background: #6b7280;
    color: #fff;
    border-radius: 5px;
    padding: 9px 20px;
    text-decoration: none;
    font-size: 0.93em;
    display: inline-block;
}

.hb-btn-logout:hover {
    background: #4b5563;
    color: #fff;
}

/* v1.1.22 - Pill-style Login/Logout shortcode button */
.hb-auth-button {
    background-color: #1a8f54 !important;
    border-radius: 30px !important;
    color: #fff !important;
    display: inline-block !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    line-height: 1 !important;
    padding: 11px 22px !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.hb-auth-button:hover {
    background-color: #167a48 !important;
    color: #fff !important;
    opacity: 1 !important;
}

/* Protected caregroup notice */
.hb-protected-notice {
    background: #f0f4fb;
    border: 1px solid #c7d7f0;
    border-radius: 8px;
    padding: 32px 28px;
    text-align: center;
    margin: 20px 0;
}

.hb-protected-message {
    font-size: 1.05em;
    color: #374151;
    margin-bottom: 20px;
}

.hb-btn-login-cta {
    background: var(--hb-button, #e8a020);
    color: #fff;
    border-radius: 5px;
    padding: 12px 28px;
    text-decoration: none;
    font-size: 1em;
    font-weight: 600;
    display: inline-block;
    transition: opacity 0.15s;
}

.hb-btn-login-cta:hover {
    opacity: 0.88;
    color: #fff;
}

/* Count summary pill */
.hb-count-summary {
    color: var(--hb-secondary, #2e6da4);
    font-size: 0.9em;
    margin: 4px 0 8px;
}


/* ============================================================
   v1.1.0 — Care Group Dashboard Styles
   ============================================================ */

/* Wrap override for wider dashboard */
.hb-mgr-wrap {
    max-width: 1100px;
}

/* ── Manager header ────────────────────────────────────────── */
.hb-mgr-header {
    border-radius: 6px 6px 0 0;
}

.hb-mgr-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hb-mgr-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-top: 4px;
}

/* ── Notices ───────────────────────────────────────────────── */
.hb-mgr-notice {
    padding: 14px 18px;
    font-size: 0.95em;
    border-left: 4px solid;
    margin-bottom: 0;
}

.hb-mgr-notice--success {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
}

.hb-mgr-notice--info {
    background: #f0f6ff;
    border-color: var(--hb-secondary, #2e6da4);
    color: #1e4a8a;
    padding: 20px 24px;
    text-align: center;
}

.hb-mgr-notice--info .hb-btn {
    margin-top: 12px;
    display: inline-block;
}

.hb-mgr-notice--error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
    padding: 20px 24px;
    text-align: center;
}

/* v1.1.24 - Save confirmation popup */
.hb-mgr-popup-notice {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 15px 18px;
    background: #1a8f54;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(15, 47, 31, 0.22);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    animation: hbMgrPopupIn 0.22s ease-out;
}

.hb-mgr-popup-close {
    appearance: none;
    border: 0;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.hb-mgr-popup-notice.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes hbMgrPopupIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .hb-mgr-popup-notice {
        top: 14px;
        right: 14px;
        left: 14px;
        max-width: none;
    }
}

/* ── Selector card ─────────────────────────────────────────── */
.hb-mgr-selector-card {
    border-top: 3px solid var(--hb-primary, #1a3a6b);
    padding: 20px 24px;
}

.hb-mgr-section-heading {
    font-size: 15px;
    font-weight: 700;
    color: var(--hb-primary, #1a3a6b);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.hb-mgr-selector-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.hb-mgr-selector-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
    flex: 1;
}

.hb-mgr-selector-row label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hb-mgr-select {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
    background: #fff;
    color: #111827;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.15s;
}

.hb-mgr-select:focus {
    outline: none;
    border-color: var(--hb-primary, #1a3a6b);
    box-shadow: 0 0 0 3px rgba(26,58,107,0.1);
}

/* ── Section cards ─────────────────────────────────────────── */
.hb-mgr-section-card {
    padding: 0;
    overflow: hidden;
}

.hb-mgr-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.hb-mgr-section-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.hb-mgr-section-header--officers {
    background: var(--hb-secondary, #2e6da4);
}

.hb-mgr-section-header--members {
    background: #3d7a55;
}

/* ── Manager table ─────────────────────────────────────────── */
.hb-mgr-table {
    margin: 0;
    border-top: none;
}

.hb-mgr-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 8px 12px;
}

.hb-mgr-table td {
    font-size: 13px;
    padding: 9px 12px;
}

.hb-mgr-actions-cell {
    white-space: nowrap;
}

.hb-mgr-actions-cell .hb-btn {
    margin-right: 4px;
    font-size: 11px;
    padding: 4px 10px;
}

/* ── Button variants ───────────────────────────────────────── */
.hb-btn-add {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    font-size: 12px;
    padding: 6px 14px;
}

.hb-btn-add:hover {
    background: rgba(255,255,255,0.35);
}

.hb-btn-edit {
    background: var(--hb-secondary, #2e6da4);
    font-size: 11px;
    padding: 4px 10px;
}

.hb-btn-delete {
    background: #dc2626;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    transition: opacity 0.15s;
}

.hb-btn-delete:hover {
    opacity: 0.85;
}

.hb-btn-delete:disabled {
    opacity: 0.5;
    cursor: default;
}

.hb-btn-save {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
}

.hb-btn-save:hover {
    opacity: 0.88;
}

.hb-btn-cancel {
    background: #6b7280;
    color: #fff !important;
    padding: 10px 20px;
    font-size: 14px;
}

.hb-btn-go-manager {
    background: #16a34a;
    font-size: 14px;
    padding: 10px 22px;
}

/* ── Form ──────────────────────────────────────────────────── */
.hb-mgr-form-wrap {
    padding: 20px 24px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.hb-mgr-form-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--hb-primary, #1a3a6b);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.hb-mgr-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.hb-mgr-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hb-mgr-field--full {
    grid-column: 1 / -1;
}

.hb-mgr-field label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hb-mgr-field label .required {
    color: #dc2626;
    margin-left: 2px;
}

.hb-mgr-input {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.hb-mgr-input:focus {
    outline: none;
    border-color: var(--hb-primary, #1a3a6b);
    box-shadow: 0 0 0 3px rgba(26,58,107,0.1);
}

.hb-mgr-textarea {
    resize: vertical;
    min-height: 80px;
}

.hb-mgr-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
    .hb-mgr-header-top {
        flex-direction: column;
    }
    .hb-mgr-selector-form {
        flex-direction: column;
    }
    .hb-mgr-selector-row {
        min-width: 100%;
    }
    .hb-mgr-field-grid {
        grid-template-columns: 1fr;
    }
}

/* Care Group Dashboard structure management (v1.1.7) */
.hb-mgr-subsection {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(0,0,0,0.08);
}
.hb-mgr-subsection:first-of-type {
    margin-top: 8px;
}
.hb-mgr-subsection .hb-mgr-section-header h3 {
    margin: 0;
}

/* Care Group Dashboard guided hierarchy (v1.1.7) */
.hb-mgr-current-selection {
    margin: 8px 0 0;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #374151;
}

.hb-mgr-section-header .hb-mgr-actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .hb-mgr-section-header .hb-mgr-actions-cell {
        justify-content: flex-start;
        width: 100%;
    }
}


.hb-login-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 4px;
    color: #166534;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 0.92em;
}

.hb-print-note {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    color: #92400e;
    padding: 10px 14px;
    margin: 12px 0;
    font-size: 0.9em;
}

/* v1.1.16 — Hide numbering rows in stacked mobile table layout */
@media (max-width: 640px) {
    .hb-table td[data-label="#"],
    .hb-table td[data-label="No."],
    .hb-table td[data-label="No"] {
        display: none !important;
    }
}

/* v1.1.17 — Mobile card-style directory layout */
@media (max-width: 640px) {

    /*
     * Convert public directory tables into clean mobile cards.
     * Desktop keeps the normal table layout.
     */
    .hb-table {
        border-collapse: separate;
        border-spacing: 0 14px;
        background: transparent;
    }

    .hb-table tbody {
        display: block;
    }

    .hb-table tr {
        display: block;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 14px 16px;
        margin-bottom: 14px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .hb-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        border: none !important;
        border-bottom: 1px solid #f1f1f1 !important;
        padding: 8px 0 !important;
        position: static !important;
        min-height: 28px;
    }

    .hb-table td:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .hb-table td::before {
        content: attr(data-label);
        position: static !important;
        left: auto !important;
        width: auto !important;
        flex: 0 0 42%;
        max-width: 42%;
        font-weight: 700;
        color: #111827;
        line-height: 1.35;
    }

    /*
     * Hide numbering and repeated action labels on mobile.
     * The action buttons already explain themselves.
     */
    .hb-table td[data-label="#"],
    .hb-table td[data-label="No."],
    .hb-table td[data-label="No"] {
        display: none !important;
    }

    .hb-table td[data-label="Directory"],
    .hb-table td[data-label="Care Group Directory"],
    .hb-table td[data-label="Open"] {
        display: block !important;
        border-bottom: none !important;
        padding-top: 12px !important;
    }

    .hb-table td[data-label="Directory"]::before,
    .hb-table td[data-label="Care Group Directory"]::before,
    .hb-table td[data-label="Open"]::before {
        display: none !important;
        content: none !important;
    }

    /*
     * Make the primary item name feel like a card title.
     * This applies to Fellowship, Church, and Care Group Name rows.
     */
    .hb-table td[data-label="Fellowship"],
    .hb-table td[data-label="Church"],
    .hb-table td[data-label="Care Group Name"] {
        display: block !important;
        border-bottom: none !important;
        padding: 0 0 4px !important;
        font-size: 18px;
        font-weight: 700;
        color: #111827;
        line-height: 1.35;
    }

    .hb-table td[data-label="Fellowship"]::before,
    .hb-table td[data-label="Church"]::before,
    .hb-table td[data-label="Care Group Name"]::before {
        display: none !important;
        content: none !important;
    }

    .hb-table td[data-label="Care Groups"],
    .hb-table td[data-label="Churches"] {
        justify-content: flex-start;
        gap: 8px;
        color: #4b5563;
        font-size: 14px;
        padding-top: 0 !important;
    }

    .hb-table td[data-label="Care Groups"]::before,
    .hb-table td[data-label="Churches"]::before {
        flex: 0 0 auto;
        max-width: none;
        color: #6b7280;
        font-weight: 600;
    }

    /*
     * Keep cells that contain action buttons visible, but make the button full width.
     * Because some action columns are labeled "Care Group Directory" or "Open",
     * the specific link rule below restores the action button area.
     */
    .hb-table td:has(.hb-btn) {
        display: block !important;
        border-bottom: none !important;
        padding-top: 12px !important;
    }

    .hb-table td:has(.hb-btn)::before {
        display: none !important;
        content: none !important;
    }

    .hb-table td .hb-btn {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 11px 16px;
        font-size: 14px;
        border-radius: 8px;
    }

    .hb-empty {
        display: block !important;
        text-align: center;
        padding: 18px 12px !important;
    }
}

/*
 * Fallback for mobile browsers that do not support :has().
 * This keeps the action button visible by showing links as full-width buttons
 * even if the parent cell label is hidden.
 */
@media (max-width: 640px) {
    .hb-table td .hb-btn {
        min-width: 100%;
    }
}

.hb-password-reset-note {
    color: #6b7280;
    font-size: 0.88em;
    line-height: 1.45;
}

/* ============================================================
   v1.1.28 — Quarterly Care Group Monitoring
   ============================================================ */
.hb-mgr-section-header--monitoring {
    background: #f7fbff;
    border-bottom: 1px solid #d8e6f7;
}

.hb-mgr-monitoring-inner {
    padding: 20px 24px;
}

.hb-mgr-monitoring-tools,
.hb-mgr-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

.hb-mgr-monitoring-tools {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 18px;
}

.hb-mgr-inline-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
}

.hb-mgr-inline-form .hb-mgr-field {
    min-width: 170px;
    flex: 1;
}

.hb-mgr-inline-form .hb-mgr-field--button {
    flex: 0 0 auto;
    min-width: auto;
}

.hb-mgr-monitoring-heading {
    margin: 18px 0 14px;
}

.hb-mgr-monitoring-heading h3,
.hb-mgr-quarter-summary h3,
.hb-mgr-monitoring-group h4 {
    margin: 0 0 6px;
    color: var(--hb-primary, #1a3a6b);
}

.hb-mgr-monitoring-heading p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.hb-mgr-monitoring-group {
    margin: 18px 0;
    overflow-x: auto;
}

.hb-monitoring-record-table th,
.hb-monitoring-record-table td,
.hb-monitoring-summary-table th,
.hb-monitoring-summary-table td {
    font-size: 12px;
}

.hb-monitoring-check {
    text-align: center;
    vertical-align: middle;
}

.hb-monitoring-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.hb-monitoring-status-select {
    min-width: 130px;
    padding: 6px 8px;
    font-size: 12px;
}

.hb-monitoring-notes {
    min-width: 160px;
    padding: 7px 8px;
    font-size: 12px;
}

.hb-mgr-monitoring-actions {
    margin-top: 12px;
}

.hb-mgr-quarter-summary {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    overflow-x: auto;
}

.hb-print-quarter-selector {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 10px 0 12px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
}

.hb-print-quarter-selector select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .hb-mgr-inline-form,
    .hb-print-quarter-selector {
        display: block;
    }

    .hb-mgr-inline-form .hb-mgr-field,
    .hb-print-quarter-selector select {
        width: 100%;
        margin-top: 8px;
    }
}

/* v1.1.29 CG Leader Portal */
.hb-leader-wrap .hb-leader-small-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.hb-leader-wrap .hb-leader-small-summary span {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 12px;
}

.hb-leader-wrap .hb-leader-table-wrap {
    overflow-x: auto;
}

.hb-leader-wrap .hb-mgr-field--button {
    display: flex;
    align-items: end;
}

.print-only {
    display: none;
}

@media print {
    .print-only {
        display: block !important;
    }
    .hb-leader-wrap .no-print,
    .hb-leader-wrap .hb-mgr-monitoring-form .hb-mgr-monitoring-actions {
        display: none !important;
    }
    .hb-leader-wrap .hb-card,
    .hb-leader-wrap .hb-mgr-section-card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }
    .hb-leader-wrap .hb-monitoring-record-table input,
    .hb-leader-wrap .hb-monitoring-record-table select {
        border: none !important;
        background: transparent !important;
    }
}

/* v1.1.30 CG Leader Dashboard management tools */
.hb-leader-management-card {
    overflow: visible;
}

.hb-leader-management-section {
    border-top: 1px solid #e5e7eb;
}

.hb-leader-management-section:first-of-type {
    border-top: 0;
}

.hb-leader-subheader {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.hb-leader-subheader h3 {
    margin: 0;
    font-size: 14px;
    color: #111827;
}

.hb-leader-management-table {
    width: 100%;
}

.hb-leader-actions-cell {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.hb-inline-delete-form {
    display: inline;
    margin: 0;
}

.hb-inline-delete-form .hb-btn {
    margin-right: 0;
}

.hb-leader-form-wrap {
    border-top: 0;
}

@media screen and (max-width: 700px) {
    .hb-leader-actions-cell {
        justify-content: flex-start;
    }
}

/* v1.1.31 CG Leader Dashboard stability and clean layout */
.hb-mgr-notice--warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
    padding: 14px 18px;
}

.hb-leader-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 14px 36px;
    box-sizing: border-box;
}

.hb-leader-wrap *,
.hb-leader-wrap *::before,
.hb-leader-wrap *::after {
    box-sizing: border-box;
}

.hb-leader-wrap .hb-card,
.hb-leader-wrap .hb-mgr-section-card,
.hb-leader-wrap .hb-mgr-selector-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    margin: 16px 0;
    overflow: hidden;
}

.hb-leader-wrap .hb-mgr-section-header,
.hb-leader-wrap .hb-mgr-header-top {
    padding: 18px 20px;
}

.hb-leader-wrap .hb-mgr-section-header h2,
.hb-leader-wrap .hb-mgr-header h1 {
    line-height: 1.25;
}

.hb-leader-assignment-card {
    padding: 18px 20px;
}

.hb-leader-assignment-card .hb-mgr-section-heading {
    margin-top: 0;
    margin-bottom: 12px;
}

.hb-leader-hierarchy {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.hb-leader-hierarchy span {
    display: block;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-height: 58px;
}

.hb-leader-hierarchy strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 4px;
}

.hb-leader-wrap .hb-mgr-monitoring-inner,
.hb-leader-wrap .hb-leader-management-section,
.hb-leader-wrap .hb-mgr-quarter-summary {
    padding: 18px 20px;
}

.hb-leader-wrap .hb-mgr-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    padding: 14px;
    margin-bottom: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.hb-leader-wrap .hb-mgr-field {
    min-width: 170px;
}

.hb-leader-wrap .hb-mgr-input,
.hb-leader-wrap .hb-mgr-select,
.hb-leader-wrap textarea {
    max-width: 100%;
}

.hb-leader-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.hb-leader-wrap .hb-table th,
.hb-leader-wrap .hb-table td {
    vertical-align: middle;
}

.hb-leader-wrap .hb-leader-actions-cell .hb-btn,
.hb-leader-wrap .hb-mgr-actions-cell .hb-btn {
    padding: 6px 10px;
    line-height: 1.2;
    white-space: nowrap;
}

.hb-leader-wrap .hb-inline-delete-form {
    display: inline-flex;
}

@media screen and (max-width: 860px) {
    .hb-leader-hierarchy {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media screen and (max-width: 640px) {
    .hb-leader-wrap {
        padding: 10px 8px 24px;
    }
    .hb-leader-hierarchy {
        grid-template-columns: 1fr;
    }
    .hb-leader-wrap .hb-mgr-section-header,
    .hb-leader-wrap .hb-mgr-header-top,
    .hb-leader-wrap .hb-mgr-monitoring-inner,
    .hb-leader-wrap .hb-leader-management-section,
    .hb-leader-wrap .hb-mgr-quarter-summary {
        padding: 14px;
    }
    .hb-leader-wrap .hb-mgr-inline-form {
        display: block;
    }
    .hb-leader-wrap .hb-mgr-field {
        width: 100%;
        min-width: 0;
        margin-bottom: 10px;
    }
}

/* v1.1.34 — Sabbath calendar monitoring selector */
.hb-leader-wrap .hb-mgr-sabbath-calendar-form {
    align-items: flex-end;
}

.hb-leader-wrap .hb-calendar-help {
    flex-basis: 100%;
    margin: -4px 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

.hb-leader-wrap .hb-auto-monitoring-summary {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    background: #eef6ff;
    border: 1px solid #cfe3f9;
    color: #1a3a6b;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 0.95rem;
}


/* v1.1.35 — Compact Sabbath date selector */
.hb-leader-wrap .hb-mgr-sabbath-calendar-form .hb-mgr-field:first-of-type {
    flex: 0 0 240px;
    width: 240px;
    min-width: 220px;
    max-width: 260px;
}

.hb-leader-wrap .hb-mgr-sabbath-calendar-form input[type="date"] {
    width: 100%;
    max-width: 260px;
    cursor: pointer;
}

.hb-leader-wrap .hb-mgr-sabbath-calendar-form .hb-mgr-field--button {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
}

.hb-leader-wrap .hb-mgr-sabbath-calendar-form .hb-btn {
    white-space: nowrap;
}

@media screen and (max-width: 640px) {
    .hb-leader-wrap .hb-mgr-sabbath-calendar-form .hb-mgr-field:first-of-type,
    .hb-leader-wrap .hb-mgr-sabbath-calendar-form input[type="date"],
    .hb-leader-wrap .hb-mgr-sabbath-calendar-form .hb-mgr-field--button {
        width: 100%;
        max-width: 100%;
        flex-basis: 100%;
    }
}

/* v1.1.38 — Mobile inline Sabbath calendar selector */
.hb-leader-wrap .hb-inline-sabbath-calendar {
    display: none;
}

.hb-leader-wrap .hb-inline-calendar-fallback {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

@media screen and (max-width: 640px) {
    .hb-leader-wrap .hb-mgr-sabbath-calendar-form {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hb-leader-wrap .hb-mgr-sabbath-calendar-form.hb-has-inline-sabbath-calendar .hb-native-sabbath-date-field {
        display: none;
    }

    .hb-leader-wrap .hb-inline-sabbath-calendar.hb-inline-calendar-ready {
        display: block;
        width: 100%;
        background: #ffffff;
        border: 1px solid #dbe3ec;
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    }

    .hb-leader-wrap .hb-inline-calendar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 10px;
    }

    .hb-leader-wrap .hb-inline-calendar-controls {
        display: flex;
        gap: 8px;
        flex: 1 1 auto;
        min-width: 0;
    }

    .hb-leader-wrap .hb-inline-calendar-controls select {
        width: 100%;
        min-height: 40px;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        padding: 8px 10px;
        background: #ffffff;
        color: #1f2937;
        font-size: 0.95rem;
    }

    .hb-leader-wrap .hb-inline-calendar-nav {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        background: #f8fafc;
        color: #1a3a6b;
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
    }

    .hb-leader-wrap .hb-inline-calendar-nav:focus,
    .hb-leader-wrap .hb-inline-calendar-controls select:focus,
    .hb-leader-wrap .hb-inline-calendar-day:focus {
        outline: 2px solid #1a6d3b;
        outline-offset: 2px;
    }

    .hb-leader-wrap .hb-inline-calendar-weekdays,
    .hb-leader-wrap .hb-inline-calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 5px;
    }

    .hb-leader-wrap .hb-inline-calendar-weekdays {
        margin-bottom: 6px;
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 700;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .hb-leader-wrap .hb-inline-calendar-day,
    .hb-leader-wrap .hb-inline-calendar-empty {
        min-height: 40px;
        border-radius: 8px;
    }

    .hb-leader-wrap .hb-inline-calendar-day {
        border: 1px solid #e2e8f0;
        background: #f8fafc;
        color: #334155;
        font-weight: 700;
        cursor: not-allowed;
    }

    .hb-leader-wrap .hb-inline-calendar-day.is-sabbath {
        background: #eef8f0;
        border-color: #b8dec0;
        color: #1a6d3b;
        cursor: pointer;
    }

    .hb-leader-wrap .hb-inline-calendar-day.is-sabbath:hover {
        background: #dff1e4;
        border-color: #7fb68a;
    }

    .hb-leader-wrap .hb-inline-calendar-day.is-selected {
        background: #1a6d3b;
        border-color: #1a6d3b;
        color: #ffffff;
        box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
    }

    .hb-leader-wrap .hb-inline-calendar-day.is-disabled {
        opacity: 0.45;
    }

    .hb-leader-wrap .hb-inline-calendar-status {
        margin: 10px 0 0;
        padding: 8px 10px;
        background: #eef6ff;
        border: 1px solid #cfe3f9;
        border-radius: 8px;
        color: #1a3a6b;
        font-size: 0.88rem;
        line-height: 1.35;
    }

    .hb-leader-wrap .hb-mgr-sabbath-calendar-form .hb-mgr-field--button {
        width: 100%;
        margin: 0;
    }

    .hb-leader-wrap .hb-mgr-sabbath-calendar-form .hb-mgr-field--button .hb-btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        text-align: center;
    }

    .hb-leader-wrap .hb-calendar-help {
        margin: 0;
    }
}

/* v1.1.39 — Print orientation selector */
.hb-print-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hb-print-orientation-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
}

.hb-print-orientation-control select {
    min-width: 118px;
    padding: 6px 28px 6px 10px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    font-size: 13px;
    line-height: 1.2;
}

.hb-header .hb-print-orientation-control,
.hb-mgr-header .hb-print-orientation-control {
    color: #ffffff;
}

@media (max-width: 640px) {
    .hb-print-controls {
        width: 100%;
        align-items: stretch;
    }

    .hb-print-orientation-control,
    .hb-print-orientation-control select,
    .hb-print-controls .hb-print-btn {
        width: 100%;
    }

    .hb-print-orientation-control {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

/* v1.1.41 — Admin report type selector for Directory vs Quarterly Care Group Monitoring print. */
.hb-print-report-type-control select {
    min-width: 210px;
    padding: 6px 28px 6px 10px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    font-size: 13px;
    line-height: 1.2;
}

.hb-print-quarter-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
    padding: 10px 12px;
    border: 1px solid #d8dee8;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 13px;
}

.hb-print-quarter-selector label {
    font-weight: 700;
    color: var(--hb-primary);
}

.hb-print-quarter-selector select {
    min-width: 190px;
    padding: 6px 28px 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    font-size: 13px;
}

.hb-print-quarter-help {
    color: #64748b;
    font-size: 12px;
}

@media (max-width: 640px) {
    .hb-print-report-type-control select,
    .hb-print-quarter-selector,
    .hb-print-quarter-selector select {
        width: 100%;
    }

    .hb-print-quarter-selector {
        align-items: stretch;
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Version 1.2.1 — Member App, invitations, and daily engagement
   ═══════════════════════════════════════════════════════════════════════════ */

.hb-member-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px 56px;
    color: #172033;
}

.hb-member-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
    margin-bottom: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--hb-primary), var(--hb-secondary));
    color: #fff;
    box-shadow: 0 18px 45px rgba(15, 35, 68, .18);
}

.hb-member-hero h1,
.hb-member-hero p {
    color: inherit;
    margin-top: 0;
}

.hb-member-hero h1 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 42px); }
.hb-member-hero p:last-child { margin-bottom: 0; opacity: .9; }
.hb-member-eyebrow { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 800; opacity: .78; }

.hb-member-nav {
    position: sticky;
    top: 10px;
    z-index: 8;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    margin-bottom: 18px;
    border: 1px solid #e3e9f2;
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 8px 24px rgba(24, 39, 75, .08);
}

.hb-member-nav a {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--hb-primary);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.hb-member-nav a:hover,
.hb-member-nav a:focus { background: #edf4ff; }

.hb-member-card {
    position: relative;
    padding: 26px;
    margin-bottom: 18px;
    border: 1px solid #e3e9f2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(24, 39, 75, .07);
}

.hb-member-card h1,
.hb-member-card h2,
.hb-member-card h3 { color: #172033; }
.hb-member-card h2 { margin: 0 0 16px; font-size: 25px; }
.hb-member-card h3 { margin: 0 0 7px; }
.hb-member-card-heading { margin-bottom: 14px; }
.hb-member-card-icon { position: absolute; right: 24px; top: 22px; font-size: 32px; }
.hb-member-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.hb-member-grid .hb-member-card { margin-bottom: 18px; }

.hb-devotional-card blockquote {
    margin: 18px 0;
    padding: 16px 20px;
    border-left: 5px solid var(--hb-button);
    border-radius: 0 12px 12px 0;
    background: #fff9ec;
    color: #44320d;
    font-size: 18px;
    font-style: italic;
}

.hb-devotional-date { display: inline-block; margin-top: -8px; margin-bottom: 10px; color: #738095; font-size: 13px; font-weight: 700; }
.hb-verse-reference { color: var(--hb-secondary); font-weight: 800; }
.hb-devotional-message { line-height: 1.75; }
.hb-devotional-prayer { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #f1f6ff; }

.hb-member-form { display: grid; gap: 12px; }
.hb-member-form label { color: #354158; font-weight: 700; }
.hb-member-form input[type="text"],
.hb-member-form input[type="email"],
.hb-member-form input[type="password"],
.hb-member-form input[type="date"],
.hb-member-form input[type="datetime-local"],
.hb-member-form select,
.hb-member-form textarea,
.hb-member-filter select,
.hb-copy-source {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cfd8e6;
    border-radius: 11px;
    background: #fff;
    color: #172033;
    font: inherit;
}

.hb-member-form input:focus,
.hb-member-form select:focus,
.hb-member-form textarea:focus,
.hb-member-filter select:focus,
.hb-copy-source:focus {
    border-color: var(--hb-secondary);
    outline: 3px solid rgba(46,109,164,.14);
}

.hb-mood-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.hb-mood-option { cursor: pointer; }
.hb-mood-option input { position: absolute; opacity: 0; pointer-events: none; }
.hb-mood-option span {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid #d9e1ed;
    border-radius: 13px;
    background: #f8fafc;
    text-align: center;
    transition: .18s ease;
}
.hb-mood-option input:checked + span { border-color: var(--hb-secondary); background: #eaf3ff; box-shadow: 0 0 0 3px rgba(46,109,164,.12); }
.hb-member-checkbox { display: flex; gap: 8px; align-items: flex-start; font-weight: 500 !important; }
.hb-checkin-complete { padding: 10px 12px; border-radius: 10px; background: #eaf8ef; color: #17663b; font-weight: 700; }

.hb-prayer-list { display: grid; gap: 12px; margin-top: 22px; }
.hb-prayer-item { padding: 16px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fbfcfe; }
.hb-prayer-private { background: #fff9e8; }
.hb-prayer-meta, .hb-prayer-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hb-prayer-meta span, .hb-muted { color: #718096; font-size: 12px; }
.hb-prayer-actions form, .hb-inline-form { margin: 0; }
.hb-privacy-badge { display: inline-block; padding: 5px 9px; border-radius: 999px; background: #f7e6b6; color: #694f09; font-size: 12px; font-weight: 800; }

.hb-announcement-item { padding: 14px 0; border-top: 1px solid #e8edf4; }
.hb-announcement-item:first-of-type { border-top: 0; padding-top: 0; }
.hb-event-date { color: var(--hb-secondary); font-weight: 700; }
.hb-birthday-list { list-style: none; margin: 0; padding: 0; }
.hb-birthday-list li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf1f6; }
.hb-profile-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 0; }
.hb-profile-list div { padding: 14px; border-radius: 12px; background: #f7f9fc; }
.hb-profile-list dt { color: #6a7486; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.hb-profile-list dd { margin: 5px 0 0; font-weight: 700; }

.hb-member-notice { padding: 13px 16px; margin-bottom: 16px; border-radius: 12px; font-weight: 750; }
.hb-member-notice--success { background: #e9f8ef; color: #17663b; border: 1px solid #bde6cc; }
.hb-member-notice--error { background: #fff0f0; color: #8c2525; border: 1px solid #f1c2c2; }
.hb-member-empty { max-width: 620px; margin: 50px auto; text-align: center; }
.hb-member-empty-text { color: #768195; }
.hb-security-note { color: #667085; font-size: 13px; }
.hb-optional { color: #7b8492; font-size: 12px; font-weight: 500; }
.hb-activation-card { max-width: 600px; margin: 40px auto; }
.hb-activation-member { display: flex; flex-direction: column; padding: 14px; margin-bottom: 18px; border-radius: 12px; background: #f2f6fc; }
.hb-activation-member span { color: #677387; font-size: 13px; }

.hb-member-admin-actions,
.hb-invitation-actions,
.hb-member-account-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hb-invitation-ready { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 26px; }
.hb-copy-source { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.hb-qr-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; border-radius: 16px; background: #f4f7fb; text-align: center; }
.hb-qrcode { min-height: 220px; display: grid; place-items: center; }
.hb-qrcode svg { max-width: 100%; height: auto; border: 10px solid #fff; border-radius: 8px; }
.hb-activation-code-display { margin-top: 6px; color: var(--hb-primary); font-size: 28px; font-weight: 900; letter-spacing: .15em; }

.hb-member-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hb-member-filter { display: flex; align-items: end; gap: 10px; margin: 12px 0 18px; }
.hb-member-filter label { font-weight: 800; }
.hb-member-table-wrap { overflow-x: auto; }
.hb-member-admin-table { width: 100%; border-collapse: collapse; }
.hb-member-admin-table th,
.hb-member-admin-table td { padding: 12px 10px; border-bottom: 1px solid #e6ebf2; text-align: left; vertical-align: top; }
.hb-member-admin-table th { color: #536078; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.hb-member-admin-table td small { display: block; margin-top: 3px; color: #7b8492; }
.hb-account-status { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.hb-account-status--active { background: #dcf6e6; color: #16613a; }
.hb-account-status--pending { background: #fff1c9; color: #735408; }
.hb-account-status--expired, .hb-account-status--revoked { background: #f2f4f7; color: #667085; }
.hb-account-status--not-invited { background: #edf2f8; color: #526078; }
.hb-link-button { padding: 0; border: 0; background: transparent; color: var(--hb-secondary); cursor: pointer; font: inherit; font-size: 13px; font-weight: 750; text-decoration: underline; }
.hb-link-danger { color: #a52b2b; }
.hb-btn-small { padding: 8px 12px !important; min-height: 0 !important; font-size: 12px !important; }
.hb-btn-secondary { background: rgba(255,255,255,.15) !important; border: 1px solid rgba(255,255,255,.55) !important; color: #fff !important; }
.hb-member-card .hb-btn-secondary { background: #eef3f9 !important; border-color: #d7e0eb !important; color: #34425a !important; }

.hb-management-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.hb-management-grid > div { display: grid; gap: 7px; }
.hb-management-grid .hb-full { grid-column: 1 / -1; }
.hb-management-list { margin-top: 22px; border-top: 1px solid #e5eaf1; padding-top: 18px; }
.hb-management-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf1f5; }
.hb-management-list article div { display: grid; }
.hb-management-list article span { color: #798396; font-size: 12px; }
.hb-alert-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.hb-care-alert { padding: 14px; margin-bottom: 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fbfcfe; }
.hb-care-alert > span { display: block; color: #778195; font-size: 12px; }

@media (max-width: 820px) {
    .hb-member-grid,
    .hb-invitation-ready,
    .hb-alert-grid { grid-template-columns: 1fr; }
    .hb-mood-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .hb-profile-list { grid-template-columns: 1fr; }
    .hb-qr-panel { order: -1; }
}

@media (max-width: 640px) {
    .hb-member-wrap { padding: 12px 10px 40px; }
    .hb-member-hero { align-items: flex-start; flex-direction: column; padding: 22px 18px; border-radius: 17px; }
    .hb-member-card { padding: 20px 16px; border-radius: 16px; }
    .hb-member-nav { top: 4px; }
    .hb-mood-grid { grid-template-columns: 1fr; }
    .hb-management-grid { grid-template-columns: 1fr; }
    .hb-management-grid .hb-full { grid-column: auto; }
    .hb-member-filter { align-items: stretch; flex-direction: column; }
    .hb-member-admin-actions { width: 100%; }
    .hb-member-admin-actions .hb-btn { flex: 1 1 auto; text-align: center; }
    .hb-member-admin-table thead { display: none; }
    .hb-member-admin-table,
    .hb-member-admin-table tbody,
    .hb-member-admin-table tr,
    .hb-member-admin-table td { display: block; width: 100%; box-sizing: border-box; }
    .hb-member-admin-table tr { padding: 14px 0; border-bottom: 1px solid #dfe6ef; }
    .hb-member-admin-table td { padding: 6px 0; border: 0; }
    .hb-member-admin-table td::before { content: attr(data-label); display: block; color: #7b8492; font-size: 11px; font-weight: 800; text-transform: uppercase; }
    .hb-management-list article { align-items: flex-start; }
}


.hb-member-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.hb-install-app-help {
    flex-basis: 100%;
    max-width: 300px;
    margin: 0;
    padding: 9px 11px;
    border-radius: 10px;
    background: rgba(255,255,255,.14);
    font-size: 13px;
    line-height: 1.45;
}
.hb-install-app-help[hidden],
.hb-install-app-button[hidden] { display: none !important; }
@media (max-width: 700px) {
    .hb-member-hero-actions { width: 100%; justify-content: flex-start; }
    .hb-member-hero-actions .hb-btn { flex: 1 1 auto; text-align: center; }
    .hb-install-app-help { max-width: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Version 1.2.2 — Leader and officer account invitations
   ═══════════════════════════════════════════════════════════════════════════ */


.hb-responsive-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hb-staff-admin-wrap .hb-responsive-table table {
    min-width: 820px;
}

.hb-staff-audit-table td small {
    display: block;
    margin-top: 3px;
    color: #667085;
}

.hb-staff-admin-wrap .hb-member-account-table td:first-child small,
.hb-staff-admin-wrap .hb-member-account-table td:nth-child(2) small {
    display: block;
    margin-top: 4px;
    color: #667085;
}

.hb-staff-admin-wrap .hb-member-filter-form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.hb-staff-admin-wrap .hb-member-filter-form label {
    width: 100%;
    font-weight: 700;
}

.hb-staff-admin-wrap .hb-member-filter-form select {
    min-width: min(100%, 340px);
    padding: 10px 12px;
    border: 1px solid #cad4e2;
    border-radius: 10px;
    background: #fff;
}

.hb-officer-wrap .hb-profile-list {
    margin-bottom: 0;
}

body.wp-admin .hb-staff-admin-wrap {
    max-width: 1180px;
    margin-left: 0;
    padding-top: 20px;
}

@media screen and (max-width: 720px) {
    .hb-staff-admin-wrap .hb-member-filter-form > * {
        width: 100%;
    }

    .hb-staff-admin-wrap .hb-member-filter-form select {
        min-width: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Version 1.2.3 — Daily operations first + CG Secretary announcement tools
   ═══════════════════════════════════════════════════════════════════════════ */

#hb-daily-operations,
#hb-care-alerts,
#hb-announcement-manager,
#hb-devotional-manager,
#hb-member-account-list,
#hb-secretary-daily-tools {
    scroll-margin-top: 92px;
}

.hb-daily-operations-intro {
    padding: 20px 24px;
    border-left: 5px solid var(--hb-button);
    background: linear-gradient(135deg, #fffaf0 0%, #ffffff 68%);
}

.hb-daily-operations-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.hb-daily-operations-heading h2,
.hb-secretary-tools-intro h2 {
    margin-bottom: 7px;
}

.hb-daily-operations-heading p:last-child,
.hb-secretary-tools-intro p:last-child,
.hb-section-intro {
    margin-bottom: 0;
    color: #667085;
}

.hb-daily-alert-summary,
.hb-alert-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hb-daily-alert-summary span,
.hb-alert-counts span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border: 1px solid #ead7a7;
    border-radius: 999px;
    background: #fff8e6;
    color: #6d5208;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.hb-daily-alert-summary strong {
    font-size: 15px;
}

.hb-operations-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 17px;
    padding-top: 15px;
    border-top: 1px solid #eee4cd;
}

.hb-operations-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid #d9e1ec;
    border-radius: 999px;
    background: #ffffff;
    color: var(--hb-primary);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.hb-operations-nav a:hover,
.hb-operations-nav a:focus {
    border-color: var(--hb-secondary);
    background: #eef5ff;
}

.hb-operations-nav a span {
    display: inline-grid;
    min-width: 21px;
    min-height: 21px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #a52b2b;
    color: #ffffff;
    font-size: 11px;
}

.hb-priority-card {
    border-color: #eedfb8;
    box-shadow: 0 12px 34px rgba(94, 70, 10, .08);
}

.hb-care-alert-heading {
    margin-bottom: 15px;
}

.hb-care-alert-heading h2 {
    margin-bottom: 0;
}

.hb-announcement-manager-card {
    border-top: 4px solid var(--hb-secondary);
}

.hb-account-administration-card {
    border-top: 4px solid #8290a6;
}

.hb-secretary-tools-intro {
    padding: 20px 24px;
    border-left: 5px solid var(--hb-secondary);
    background: linear-gradient(135deg, #eef6ff 0%, #ffffff 72%);
}

.hb-secretary-wrap .hb-announcement-manager-card {
    margin-top: -2px;
}

.hb-officer-assignments-heading {
    padding-top: 20px;
    padding-bottom: 20px;
}

@media (max-width: 760px) {
    .hb-daily-operations-heading {
        flex-direction: column;
    }

    .hb-daily-alert-summary,
    .hb-alert-counts {
        width: 100%;
    }

    .hb-daily-alert-summary span,
    .hb-alert-counts span {
        flex: 1 1 auto;
        justify-content: center;
    }

    .hb-member-section-heading.hb-care-alert-heading,
    .hb-account-administration-card .hb-member-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .hb-daily-operations-intro,
    .hb-secretary-tools-intro {
        padding: 18px 16px;
    }

    .hb-operations-nav a {
        flex: 1 1 calc(50% - 9px);
        justify-content: center;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Version 1.2.4 — Mobile responsiveness improvements
   ═══════════════════════════════════════════════════════════════════════════ */

.hb-member-account-actions,
.hb-member-account-actions form,
.hb-staff-admin-wrap .hb-member-account-table td,
.hb-staff-admin-wrap .hb-staff-audit-table td,
.hb-mgr-header-actions .hb-btn,
.hb-member-admin-actions .hb-btn {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hb-staff-admin-wrap .hb-member-account-table td,
.hb-staff-admin-wrap .hb-staff-audit-table td {
    vertical-align: top;
}

.hb-staff-admin-wrap .hb-member-account-table td small,
.hb-staff-admin-wrap .hb-staff-audit-table td small {
    display: block;
    margin-top: 4px;
    color: #667085;
}

@media (max-width: 820px) {
    .hb-mgr-header-actions,
    .hb-member-admin-actions {
        width: 100%;
        gap: 8px;
    }

    .hb-mgr-header-actions .hb-btn,
    .hb-member-admin-actions .hb-btn {
        flex: 1 1 220px;
        min-width: 0;
        text-align: center;
        white-space: normal;
        line-height: 1.35;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

@media (max-width: 640px) {
    .hb-staff-admin-wrap .hb-responsive-table {
        overflow-x: visible;
    }

    .hb-staff-admin-wrap .hb-responsive-table table,
    .hb-staff-admin-wrap .hb-responsive-table thead,
    .hb-staff-admin-wrap .hb-responsive-table tbody,
    .hb-staff-admin-wrap .hb-responsive-table tr,
    .hb-staff-admin-wrap .hb-responsive-table th,
    .hb-staff-admin-wrap .hb-responsive-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .hb-staff-admin-wrap .hb-responsive-table table {
        min-width: 0 !important;
        border-collapse: separate;
        border-spacing: 0;
    }

    .hb-staff-admin-wrap .hb-responsive-table thead {
        display: none;
    }

    .hb-staff-admin-wrap .hb-responsive-table tbody {
        display: grid;
        gap: 14px;
    }

    .hb-staff-admin-wrap .hb-responsive-table tr {
        padding: 14px;
        border: 1px solid #e3e9f2;
        border-radius: 14px;
        background: #fbfcfe;
        box-shadow: 0 6px 18px rgba(24, 39, 75, .05);
    }

    .hb-staff-admin-wrap .hb-responsive-table td {
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid #edf1f5;
        white-space: normal;
    }

    .hb-staff-admin-wrap .hb-responsive-table td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .hb-staff-admin-wrap .hb-responsive-table td:first-child {
        padding-top: 0;
    }

    .hb-staff-admin-wrap .hb-responsive-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: #7b8492;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .hb-staff-admin-wrap .hb-member-account-actions,
    .hb-staff-admin-wrap .hb-member-account-actions form,
    .hb-staff-admin-wrap .hb-member-account-actions .hb-btn,
    .hb-staff-admin-wrap .hb-member-account-actions .hb-link-button {
        width: 100%;
    }

    .hb-staff-admin-wrap .hb-member-account-actions {
        display: grid;
        gap: 8px;
    }

    .hb-staff-admin-wrap .hb-member-account-actions form {
        margin: 0;
    }

    .hb-staff-admin-wrap .hb-member-account-actions .hb-btn,
    .hb-staff-admin-wrap .hb-member-account-actions .hb-link-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        text-align: center;
        white-space: normal;
    }

    .hb-staff-admin-wrap .hb-member-account-actions .hb-link-button {
        padding: 10px 12px;
        border: 1px solid #d7e0eb;
        border-radius: 10px;
        background: #f6f8fb;
        text-decoration: none;
    }

    .hb-staff-admin-wrap .hb-member-account-actions .hb-link-danger {
        color: #a52b2b;
    }

    .hb-mgr-header-actions,
    .hb-member-admin-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hb-mgr-header-actions .hb-btn,
    .hb-member-admin-actions .hb-btn {
        width: 100%;
        flex: 1 1 auto;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Version 1.2.5 — Second mobile polish pass
   ═══════════════════════════════════════════════════════════════════════════ */

.hb-btn,
.hb-link-button {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}

.hb-member-card p,
.hb-card p,
.hb-subtitle {
    line-height: 1.6;
}

@media (max-width: 820px) {
    .hb-wrap,
    .hb-member-wrap {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hb-mgr-wrap {
        max-width: 100%;
    }

    .hb-mgr-header,
    .hb-member-hero {
        border-radius: 20px 20px 0 0;
    }

    .hb-mgr-header,
    .hb-member-hero,
    .hb-member-card,
    .hb-card,
    .hb-daily-operations-intro,
    .hb-secretary-tools-intro {
        box-sizing: border-box;
    }

    .hb-mgr-header {
        padding: 20px 16px;
    }

    .hb-mgr-header h1 {
        font-size: clamp(28px, 5.8vw, 42px);
        line-height: 1.12;
        margin-bottom: 10px;
    }

    .hb-member-hero {
        padding: 22px 18px;
        gap: 16px;
    }

    .hb-member-hero h1 {
        font-size: clamp(22px, 6vw, 34px);
        line-height: 1.14;
        margin-bottom: 10px;
    }

    .hb-member-eyebrow {
        font-size: 11px;
        letter-spacing: .12em;
    }

    .hb-member-card,
    .hb-card,
    .hb-mgr-selector-card {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .hb-member-card h2,
    .hb-daily-operations-heading h2,
    .hb-secretary-tools-intro h2 {
        font-size: clamp(18px, 5vw, 24px);
        line-height: 1.2;
    }

    .hb-mgr-section-heading {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .hb-btn,
    .hb-link-button,
    .hb-btn-small,
    .hb-btn-save,
    .hb-btn-cancel,
    .hb-btn-go-manager,
    .hb-btn-delete {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 11px 14px;
        border-radius: 12px;
        font-size: 14px !important;
        line-height: 1.35;
        text-align: center;
        white-space: normal;
        box-sizing: border-box;
    }

    .hb-mgr-header-actions,
    .hb-member-admin-actions,
    .hb-member-hero-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding-top: 0;
    }

    .hb-mgr-header-actions .hb-btn,
    .hb-member-admin-actions .hb-btn,
    .hb-member-hero-actions .hb-btn,
    .hb-member-hero-actions button {
        width: 100%;
        margin: 0;
    }

    .hb-daily-alert-summary span,
    .hb-alert-counts span {
        min-height: 46px;
        width: 100%;
        justify-content: center;
        font-size: 14px;
        padding: 10px 14px;
    }

    .hb-operations-nav {
        gap: 10px;
    }

    .hb-operations-nav a {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 13px;
    }

    .hb-mgr-selector-form,
    .hb-member-filter,
    .hb-staff-admin-wrap .hb-member-filter-form {
        gap: 12px;
    }

    .hb-mgr-select,
    .hb-mgr-input,
    .hb-member-form input[type="text"],
    .hb-member-form input[type="email"],
    .hb-member-form input[type="password"],
    .hb-member-form input[type="date"],
    .hb-member-form input[type="datetime-local"],
    .hb-member-form select,
    .hb-member-form textarea,
    .hb-staff-admin-wrap .hb-member-filter-form select,
    .hb-copy-source {
        min-height: 46px;
        font-size: 16px;
        border-radius: 12px;
    }

    .hb-member-form textarea,
    .hb-copy-source {
        min-height: 120px;
    }

    .hb-management-grid,
    .hb-alert-grid,
    .hb-member-grid,
    .hb-invitation-ready {
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .hb-wrap,
    .hb-member-wrap {
        padding-left: 10px;
        padding-right: 10px;
    }

    .hb-mgr-header,
    .hb-member-hero {
        border-radius: 18px 18px 0 0;
    }

    .hb-mgr-header {
        padding: 18px 14px;
    }

    .hb-mgr-header h1 {
        font-size: clamp(22px, 7.5vw, 30px);
    }

    .hb-subtitle {
        font-size: 14px;
    }

    .hb-member-hero {
        padding: 20px 16px;
    }

    .hb-member-hero h1 {
        font-size: clamp(20px, 8vw, 30px);
    }

    .hb-member-card,
    .hb-card,
    .hb-daily-operations-intro,
    .hb-secretary-tools-intro,
    .hb-mgr-selector-card {
        padding: 16px 14px;
        border-radius: 16px;
    }

    .hb-member-card h2,
    .hb-daily-operations-heading h2,
    .hb-secretary-tools-intro h2 {
        font-size: clamp(17px, 7vw, 22px);
        margin-bottom: 12px;
    }

    .hb-mgr-section-heading {
        font-size: 13px;
    }

    .hb-profile-list div,
    .hb-prayer-item,
    .hb-care-alert {
        padding: 12px;
        border-radius: 12px;
    }

    .hb-officer-assignments-heading {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .hb-member-admin-table tr,
    .hb-staff-admin-wrap .hb-responsive-table tr {
        border-radius: 12px;
    }

    .hb-staff-admin-wrap .hb-member-account-actions,
    .hb-member-admin-actions,
    .hb-mgr-header-actions,
    .hb-member-hero-actions {
        gap: 8px;
    }

    .hb-operations-nav a {
        flex: 1 1 100%;
    }

    .hb-operations-nav a span {
        min-width: 22px;
        min-height: 22px;
    }

    .hb-daily-operations-intro,
    .hb-secretary-tools-intro {
        border-left-width: 4px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Version 1.2.6 — Unified role dashboard and directory access
   ═══════════════════════════════════════════════════════════════════════════ */

.hb-role-member-preview {
    border-top: 4px solid var(--hb-button);
}

.hb-role-member-preview--unlinked {
    background: #fffaf0;
}

.hb-role-member-preview-heading {
    margin-bottom: 18px;
}

.hb-role-member-preview-heading > div {
    min-width: 0;
}

.hb-role-member-preview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
    gap: 18px;
}

.hb-role-devotional-preview {
    padding: 18px;
    border: 1px solid #eadfbd;
    border-radius: 16px;
    background: #fffaf0;
}

.hb-role-devotional-preview h3 {
    margin: 0 0 10px;
    font-size: 21px;
}

.hb-role-devotional-preview blockquote {
    margin: 14px 0;
    padding: 12px 15px;
    border-left: 4px solid var(--hb-button);
    border-radius: 0 10px 10px 0;
    background: #fff;
    color: #44320d;
    font-style: italic;
}

.hb-role-member-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hb-role-member-status-grid a {
    display: flex;
    min-height: 92px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 13px;
    border: 1px solid #dce5f0;
    border-radius: 14px;
    background: #f7f9fc;
    color: #172033;
    text-align: center;
    text-decoration: none;
}

.hb-role-member-status-grid a:hover,
.hb-role-member-status-grid a:focus {
    border-color: var(--hb-secondary);
    background: #eef5ff;
}

.hb-role-member-status-grid strong {
    color: var(--hb-primary);
    font-size: 20px;
}

.hb-role-member-status-grid span {
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
    font-weight: 750;
}

.hb-role-latest-update {
    display: grid;
    gap: 3px;
    margin-top: 14px;
    padding: 13px 15px;
    border-radius: 12px;
    background: #eef5ff;
}

.hb-role-latest-update span {
    color: #526078;
}

.hb-staff-member-link-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.hb-staff-member-link-row {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.2fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e1e8f1;
    border-radius: 14px;
    background: #fafbfd;
}

.hb-staff-member-link-row > div:first-child {
    display: grid;
    gap: 3px;
}

.hb-staff-member-link-row > div:first-child span {
    color: #667085;
    font-size: 12px;
}

.hb-staff-member-link-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 9px;
    align-items: center;
    margin: 0;
}

.hb-staff-member-link-form select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cad4e2;
    border-radius: 10px;
    background: #fff;
}

.hb-directory-scope-note,
.hb-directory-summary-notice {
    margin: 0 0 16px;
    padding: 13px 15px;
    border-left: 4px solid var(--hb-secondary);
    border-radius: 8px;
    background: #eef5ff;
    color: #34425a;
}

.hb-my-dashboard-link {
    background: rgba(255,255,255,.2);
}

@media (max-width: 820px) {
    .hb-role-member-preview-grid,
    .hb-staff-member-link-row {
        grid-template-columns: 1fr;
    }

    .hb-role-member-preview-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .hb-role-member-preview-heading .hb-btn {
        width: 100%;
    }

    .hb-staff-member-link-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hb-role-member-status-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hb-role-member-status-grid a {
        min-height: 82px;
    }

    .hb-caregroup-view-wrap .hb-card {
        overflow-x: auto;
    }

    .hb-caregroup-view-wrap .hb-table,
    .hb-caregroup-view-wrap .hb-table thead,
    .hb-caregroup-view-wrap .hb-table tbody,
    .hb-caregroup-view-wrap .hb-table tr,
    .hb-caregroup-view-wrap .hb-table th,
    .hb-caregroup-view-wrap .hb-table td {
        display: table-cell;
        width: auto;
    }

    .hb-caregroup-view-wrap .hb-table {
        display: table;
        min-width: 520px;
    }

    .hb-caregroup-view-wrap .hb-table thead {
        display: table-header-group;
    }

    .hb-caregroup-view-wrap .hb-table tbody {
        display: table-row-group;
    }

    .hb-caregroup-view-wrap .hb-table tr {
        display: table-row;
    }

    .hb-caregroup-view-wrap .hb-table th,
    .hb-caregroup-view-wrap .hb-table td {
        padding: 9px 10px;
        border: 1px solid var(--hb-border);
    }

    .hb-caregroup-view-wrap .hb-table td::before {
        content: none;
    }

    .hb-header-actions .hb-my-dashboard-link,
    .hb-header-actions .hb-back-btn {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .hb-caregroup-view-wrap .hb-member-safe-directory-table,
    .hb-caregroup-view-wrap .hb-member-safe-directory-table thead,
    .hb-caregroup-view-wrap .hb-member-safe-directory-table tbody,
    .hb-caregroup-view-wrap .hb-member-safe-directory-table tr,
    .hb-caregroup-view-wrap .hb-member-safe-directory-table th,
    .hb-caregroup-view-wrap .hb-member-safe-directory-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .hb-caregroup-view-wrap .hb-member-safe-directory-table {
        min-width: 0;
    }

    .hb-caregroup-view-wrap .hb-member-safe-directory-table thead {
        display: none;
    }

    .hb-caregroup-view-wrap .hb-member-safe-directory-table tr {
        padding: 10px 0;
        border-bottom: 1px solid #e6ebf2;
    }

    .hb-caregroup-view-wrap .hb-member-safe-directory-table td {
        padding: 6px 0 6px 42%;
        border: 0;
        position: relative;
    }

    .hb-caregroup-view-wrap .hb-member-safe-directory-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 38%;
        color: #667085;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .hb-caregroup-view-wrap .hb-member-safe-directory-table .hb-empty {
        padding-left: 0;
        text-align: center;
    }

    .hb-caregroup-view-wrap .hb-member-safe-directory-table .hb-empty::before {
        content: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Version 1.2.10 — Devotional calendar, preview, drafts, and scheduling
   ═══════════════════════════════════════════════════════════════════════════ */

.hb-devotional-manager {
    border-top: 4px solid var(--hb-button);
}

.hb-devotional-manager-heading,
.hb-devotional-calendar-heading,
.hb-devotional-editor-heading,
.hb-devotional-preview-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.hb-timezone-note {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #d9e1ec;
    border-radius: 999px;
    background: #f7f9fc;
    color: #596579;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.hb-devotional-current-card,
.hb-devotional-selected-preview,
.hb-devotional-editor {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e1e7ef;
    border-radius: 16px;
    background: #fbfcfe;
}

.hb-devotional-current-card {
    border-color: #e7d5a5;
    background: linear-gradient(135deg, #fffaf0 0%, #ffffff 78%);
}

.hb-devotional-selected-preview {
    border-color: #bcd3ee;
    background: linear-gradient(135deg, #f2f7ff 0%, #ffffff 78%);
}

.hb-devotional-admin-preview h3,
.hb-devotional-calendar-heading h3,
.hb-devotional-editor h3,
.hb-devotional-history-grid h3 {
    margin: 0 0 8px;
    color: #172033;
}

.hb-devotional-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 12px 0 16px;
    color: #667085;
    font-size: 12px;
}

.hb-devotional-admin-preview blockquote {
    margin: 16px 0;
    padding: 14px 18px;
    border-left: 5px solid var(--hb-button);
    border-radius: 0 12px 12px 0;
    background: #fff9ec;
    color: #44320d;
    font-size: 17px;
    font-style: italic;
}

.hb-devotional-inline-actions,
.hb-devotional-editor-actions,
.hb-devotional-status-actions,
.hb-devotional-day-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.hb-devotional-inline-actions {
    margin-top: 16px;
}

.hb-devotional-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
}

.hb-devotional-status--draft {
    background: #fff1c9;
    color: #735408;
}

.hb-devotional-status--scheduled {
    background: #e3efff;
    color: #1d518c;
}

.hb-devotional-status--published {
    background: #dcf6e6;
    color: #16613a;
}

.hb-devotional-status--past {
    background: #edf2f8;
    color: #526078;
}

.hb-devotional-status--cancelled {
    background: #f6e4e4;
    color: #8c2525;
}

.hb-devotional-calendar-heading {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #e7ebf1;
}

.hb-devotional-calendar-heading p {
    margin: 0;
    color: #667085;
}

.hb-devotional-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 14px 0;
}

.hb-devotional-calendar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.hb-devotional-day-card {
    display: flex;
    min-height: 156px;
    flex-direction: column;
    gap: 9px;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #ffffff;
}

.hb-devotional-day-card--week {
    border-color: #c7d8ec;
    box-shadow: 0 6px 18px rgba(24, 39, 75, .06);
}

.hb-devotional-day-date {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: #596579;
}

.hb-devotional-day-date strong {
    color: var(--hb-primary);
    font-size: 12px;
    text-transform: uppercase;
}

.hb-devotional-day-card h4 {
    margin: 0;
    color: #172033;
    font-size: 14px;
    line-height: 1.35;
}

.hb-devotional-missing {
    color: #8a94a4;
    font-size: 13px;
}

.hb-devotional-day-actions {
    margin-top: auto;
}

.hb-devotional-day-actions a {
    color: var(--hb-secondary);
    font-size: 12px;
    font-weight: 750;
}

.hb-devotional-editor {
    margin-top: 26px;
    background: #f7f9fc;
}

.hb-devotional-editor-actions {
    margin-top: 4px;
}

.hb-devotional-record-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: 16px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #dde4ed;
}

.hb-devotional-duplicate-form {
    display: grid;
    gap: 8px;
}

.hb-devotional-duplicate-form label {
    color: #354158;
    font-size: 13px;
    font-weight: 750;
}

.hb-devotional-duplicate-form > div {
    display: flex;
    gap: 8px;
}

.hb-devotional-duplicate-form input[type="date"] {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #cfd8e6;
    border-radius: 10px;
    background: #fff;
    font: inherit;
}

.hb-devotional-status-actions {
    align-content: flex-start;
    justify-content: flex-end;
}

.hb-devotional-status-actions form {
    margin: 0;
}

.hb-devotional-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.hb-devotional-history-grid > section {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.hb-devotional-history-list {
    display: grid;
}

.hb-devotional-history-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #edf1f5;
}

.hb-devotional-history-list article:last-child {
    border-bottom: 0;
}

.hb-devotional-history-list article > div:first-child {
    display: grid;
    gap: 3px;
}

.hb-devotional-history-list span {
    color: #7a8495;
    font-size: 12px;
}

.hb-devotional-empty-state {
    text-align: center;
    padding: 12px 6px;
}

@media (max-width: 980px) {
    .hb-devotional-calendar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .hb-devotional-manager-heading,
    .hb-devotional-calendar-heading,
    .hb-devotional-editor-heading,
    .hb-devotional-preview-heading {
        flex-direction: column;
    }

    .hb-timezone-note {
        white-space: normal;
    }

    .hb-devotional-calendar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hb-devotional-record-actions,
    .hb-devotional-history-grid {
        grid-template-columns: 1fr;
    }

    .hb-devotional-status-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .hb-devotional-current-card,
    .hb-devotional-selected-preview,
    .hb-devotional-editor {
        padding: 15px;
        border-radius: 13px;
    }

    .hb-devotional-calendar {
        grid-template-columns: 1fr;
    }

    .hb-devotional-day-card {
        min-height: 0;
    }

    .hb-devotional-editor-actions,
    .hb-devotional-editor-actions .hb-btn,
    .hb-devotional-inline-actions .hb-btn,
    .hb-devotional-duplicate-form > div,
    .hb-devotional-status-actions,
    .hb-devotional-status-actions form,
    .hb-devotional-status-actions .hb-link-button {
        width: 100%;
    }

    .hb-devotional-editor-actions,
    .hb-devotional-inline-actions,
    .hb-devotional-duplicate-form > div,
    .hb-devotional-status-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hb-devotional-history-list article {
        align-items: flex-start;
        flex-direction: column;
    }
}

.hb-devotional-more-days {
    margin-top: 12px;
    border: 1px solid #dfe6ef;
    border-radius: 13px;
    background: #f8fafc;
}

.hb-devotional-more-days summary {
    cursor: pointer;
    padding: 13px 15px;
    color: var(--hb-primary);
    font-size: 13px;
    font-weight: 800;
}

.hb-devotional-more-days[open] summary {
    border-bottom: 1px solid #dfe6ef;
}

.hb-devotional-more-days .hb-devotional-calendar {
    padding: 12px;
}
