.chfc-form {
    background: #fffdf8;
    border: 1px solid rgba(179, 154, 28, 0.28);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(20, 28, 60, 0.08);
    display: grid;
    gap: 18px;
    padding: clamp(20px, 3vw, 32px);
}

.chfc-form label,
.chfc-choice-group {
    color: #17204b;
    display: grid;
    font-weight: 700;
    gap: 8px;
}

.chfc-form input,
.chfc-form select,
.chfc-form textarea {
    background: #ffffff;
    border: 1px solid rgba(23, 32, 75, 0.2);
    border-radius: 6px;
    color: #17204b;
    font: inherit;
    min-height: 46px;
    padding: 10px 12px;
    width: 100%;
}

.chfc-form textarea {
    min-height: 110px;
}

.chfc-form__grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.chfc-choice-group {
    border: 1px solid rgba(23, 32, 75, 0.16);
    border-radius: 8px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    padding: 16px;
}

.chfc-choice-group legend {
    color: #b39a1c;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0 8px;
    text-transform: uppercase;
}

.chfc-choice-group label,
.chfc-check {
    align-items: center;
    display: flex;
    font-weight: 650;
    gap: 10px;
}

.chfc-choice-group input,
.chfc-check input {
    min-height: auto;
    width: auto;
}

.chfc-hp {
    left: -9999px;
    position: absolute;
}

.chfc-notice {
    background: #eff8f0;
    border-left: 5px solid #2f8f57;
    border-radius: 6px;
    color: #17204b;
    font-weight: 800;
    margin: 0 0 18px;
    padding: 14px 16px;
}

.chfc-button {
    justify-self: start;
}

.chfc-admin .chfc-admin-search {
    align-items: center;
    display: flex;
    gap: 10px;
    margin: 16px 0;
}

.chfc-admin-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.chfc-admin-card {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-left: 6px solid #b39a1c;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(20, 28, 60, 0.06);
    display: grid;
    gap: 12px;
    padding: 18px;
}

.chfc-admin-card h2 {
    color: #17204b;
    font-size: 1.2rem;
    margin: 8px 0;
}

.chfc-admin-card p {
    margin: 4px 0;
}

.chfc-pill {
    background: #17204b;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 6px 10px;
    text-transform: uppercase;
}

.chfc-pill.is-positive {
    background: #237a4d;
}

.chfc-pill.is-muted {
    background: #69707a;
}

.chfc-pill--tag {
    background: #eef2f7;
    color: #17204b;
}

.chfc-tool-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 14px 0 18px;
}

.chfc-tool-header h1 {
    margin-bottom: 6px;
}

.chfc-tool-header p {
    color: #50575e;
    font-size: 14px;
    margin: 0;
}

.chfc-tool-stats {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin: 0 0 14px;
}

.chfc-tool-stat {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    display: grid;
    gap: 3px;
    min-height: 94px;
    padding: 14px;
}

.chfc-tool-stat span {
    color: #50575e;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.chfc-tool-stat strong {
    color: #17204b;
    font-size: 28px;
    line-height: 1.1;
}

.chfc-tool-stat small {
    color: #646970;
}

.chfc-tool-filters {
    align-items: end;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin: 0 0 16px;
    padding: 14px;
}

.chfc-tool-filters label {
    display: grid;
    gap: 5px;
}

.chfc-tool-filters label span {
    color: #1d2327;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.chfc-tool-filters input,
.chfc-tool-filters select {
    max-width: none;
    width: 100%;
}

.chfc-tool-filters__actions {
    display: flex;
    gap: 8px;
}

.chfc-tool-layout {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(300px, 0.95fr) minmax(440px, 1.45fr);
}

.chfc-contact-table-panel {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
}

.chfc-table-scroll {
    overflow-x: auto;
}

.chfc-contact-table {
    border: 0;
    table-layout: fixed;
}

.chfc-contact-table th,
.chfc-contact-table td {
    vertical-align: top;
}

.chfc-contact-table th {
    background: #f6f7f7;
    color: #17204b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.chfc-contact-table th a {
    color: #17204b;
    display: inline-flex;
    text-decoration: none;
}

.chfc-contact-table th a[aria-current="true"] {
    color: #9a7d00;
}

.chfc-contact-table__row > td {
    padding: 0;
}

.chfc-contact-expand {
    display: block;
}

.chfc-contact-expand summary {
    list-style: none;
}

.chfc-contact-expand summary::-webkit-details-marker {
    display: none;
}

.chfc-contact-summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1.35fr) minmax(190px, 1fr) minmax(92px, 0.5fr) minmax(220px, 1.2fr) minmax(140px, 0.75fr) minmax(128px, 0.72fr) minmax(132px, 0.68fr);
    min-height: 72px;
    padding: 14px 16px;
}

.chfc-contact-summary:hover,
.chfc-contact-summary:focus {
    background: #f7fbff;
}

.chfc-contact-expand[open] .chfc-contact-summary {
    background: #fffdf4;
    border-bottom: 1px solid #e8dfb5;
}

.chfc-contact-summary__cell {
    color: #2c3338;
    min-width: 0;
    overflow-wrap: anywhere;
}

.chfc-contact-summary__name {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 18px minmax(0, 1fr);
}

.chfc-contact-summary__name strong {
    color: #17204b;
    display: block;
}

.chfc-contact-summary__name small {
    color: #646970;
    display: block;
    font-size: 12px;
    margin-top: 3px;
}

.chfc-expand-marker {
    border-color: transparent transparent transparent #17204b;
    border-style: solid;
    border-width: 5px 0 5px 7px;
    height: 0;
    transition: transform 0.16s ease;
    width: 0;
}

.chfc-contact-expand[open] .chfc-expand-marker {
    transform: rotate(90deg);
}

.chfc-contact-summary__chips {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chfc-muted-text {
    color: #646970;
    font-size: 12px;
}

.chfc-contact-expanded {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.chfc-contact-expanded__grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chfc-detail-head--compact {
    border: 0;
    padding-bottom: 0;
}

.chfc-contact-browser,
.chfc-contact-detail {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
}

.chfc-panel-heading {
    align-items: baseline;
    border-bottom: 1px solid #dcdcde;
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
}

.chfc-panel-heading h2 {
    color: #17204b;
    font-size: 16px;
    margin: 0;
}

.chfc-panel-heading span {
    color: #646970;
    font-size: 12px;
}

.chfc-contact-list {
    display: grid;
}

.chfc-contact-row {
    border-left: 4px solid transparent;
    border-top: 1px solid #f0f0f1;
    color: #1d2327;
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    text-decoration: none;
}

.chfc-contact-row:first-child {
    border-top: 0;
}

.chfc-contact-row:hover,
.chfc-contact-row:focus {
    background: #f6f7f7;
    color: #17204b;
}

.chfc-contact-row.is-active {
    background: #f7fbff;
    border-left-color: #b39a1c;
}

.chfc-contact-row__main {
    display: grid;
    gap: 2px;
}

.chfc-contact-row__main strong {
    color: #17204b;
}

.chfc-contact-row__main span,
.chfc-contact-row__date {
    color: #646970;
    font-size: 12px;
}

.chfc-contact-row__meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chfc-contact-row__meta > span:not(.chfc-pill) {
    color: #50575e;
    font-size: 12px;
}

.chfc-contact-detail {
    padding: 18px;
}

.chfc-detail-head {
    border-bottom: 1px solid #dcdcde;
    display: grid;
    gap: 8px;
    padding-bottom: 16px;
}

.chfc-detail-head h2 {
    color: #17204b;
    font-size: 24px;
    line-height: 1.15;
    margin: 0;
}

.chfc-detail-head p {
    color: #50575e;
    margin: 0;
}

.chfc-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.chfc-detail-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 16px 0;
}

.chfc-detail-grid div {
    background: #f6f7f7;
    border: 1px solid #e6e7e9;
    border-radius: 6px;
    padding: 10px;
}

.chfc-detail-grid dt {
    color: #646970;
    font-size: 11px;
    font-weight: 800;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.chfc-detail-grid dd {
    color: #1d2327;
    font-weight: 700;
    margin: 0;
}

.chfc-detail-section {
    border-top: 1px solid #f0f0f1;
    padding: 16px 0 0;
}

.chfc-detail-section h3 {
    color: #17204b;
    font-size: 15px;
    margin: 0 0 10px;
}

.chfc-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chfc-chip-list span {
    background: #f7f1d9;
    border: 1px solid #d8c46a;
    border-radius: 999px;
    color: #17204b;
    font-weight: 700;
    padding: 6px 10px;
}

.chfc-chip-list--compact span {
    font-size: 12px;
    padding: 4px 8px;
}

.chfc-mini-table td,
.chfc-mini-table th {
    vertical-align: top;
}

.chfc-linked-list {
    display: grid;
    gap: 10px;
}

.chfc-linked-list article {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    display: grid;
    gap: 4px;
    padding: 10px;
}

.chfc-linked-list strong {
    color: #17204b;
}

.chfc-linked-list span,
.chfc-linked-list small {
    color: #646970;
}

.chfc-linked-list p {
    margin: 4px 0 0;
}

.chfc-empty-state {
    align-items: flex-start;
    color: #50575e;
    display: grid;
    gap: 10px;
    padding: 18px;
}

.chfc-empty-state strong {
    color: #17204b;
}

@media (max-width: 1280px) {
    .chfc-tool-stats,
    .chfc-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chfc-tool-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .chfc-tool-filters__actions {
        align-self: end;
    }

    .chfc-contact-summary {
        grid-template-columns: minmax(220px, 1.25fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(130px, 0.7fr);
    }

    .chfc-contact-summary__cell:nth-child(3),
    .chfc-contact-summary__cell:nth-child(5),
    .chfc-contact-summary__cell:nth-child(6) {
        display: none;
    }
}

@media (max-width: 960px) {
    .chfc-tool-header,
    .chfc-panel-heading {
        align-items: flex-start;
        display: grid;
    }

    .chfc-tool-layout,
    .chfc-tool-filters,
    .chfc-tool-stats,
    .chfc-detail-grid,
    .chfc-contact-expanded__grid {
        grid-template-columns: 1fr;
    }

    .chfc-contact-table thead {
        display: none;
    }

    .chfc-contact-summary {
        align-items: start;
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .chfc-contact-summary__cell:nth-child(3),
    .chfc-contact-summary__cell:nth-child(5),
    .chfc-contact-summary__cell:nth-child(6) {
        display: block;
    }

    .chfc-contact-summary__name {
        grid-template-columns: 18px minmax(0, 1fr);
    }
}
.chfc-mailing-panel { max-width: 1180px; margin: 24px 0 30px; overflow: hidden; background: #f4f6f9; border: 1px solid #d7dde7; border-radius: 12px; box-shadow: 0 8px 28px rgba(27,39,73,.1); color: #26314b; }
.chfc-mailing-panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 26px 30px; background: #fff; border-bottom: 1px solid #dfe4ec; }
.chfc-mailing-panel__header h2 { margin: 3px 0 5px; color: #20283a; font-size: 25px; line-height: 1.2; }
.chfc-mailing-panel__header p { margin: 0; color: #687386; font-size: 14px; }
.chfc-mailing-eyebrow { color: #54658f; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.chfc-mailing-connection { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; margin-top: 4px; padding: 7px 10px; background: #edf8f1; border: 1px solid #bfe1ca; border-radius: 999px; color: #22633a; font-size: 12px; font-weight: 600; }
.chfc-mailing-connection > span { width: 8px; height: 8px; background: #31a05a; border-radius: 50%; box-shadow: 0 0 0 3px rgba(49,160,90,.13); }
.chfc-mailing-panel form { display: grid; gap: 18px; padding: 22px; }
.chfc-mailing-panel label { display: grid; align-content: start; gap: 7px; min-width: 0; font-weight: 600; }
.chfc-mailing-panel label > span { color: #303b55; }
.chfc-mailing-panel input[type="text"], .chfc-mailing-panel input[type="search"], .chfc-mailing-panel select, .chfc-mailing-panel textarea { width: 100%; min-height: 42px; box-sizing: border-box; border-color: #b8c0ce; border-radius: 5px; box-shadow: none; }
.chfc-mailing-panel input:focus, .chfc-mailing-panel select:focus, .chfc-mailing-panel textarea:focus { border-color: #4864d7; box-shadow: 0 0 0 2px rgba(72,100,215,.14); }
.chfc-mailing-step { display: grid; gap: 18px; padding: 22px; background: #fff; border: 1px solid #dbe0e8; border-radius: 8px; }
.chfc-mailing-step__header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.chfc-mailing-step__header > div, .chfc-mailing-send > div { display: flex; align-items: flex-start; gap: 12px; }
.chfc-mailing-step__header h3, .chfc-mailing-send h3 { margin: 0 0 3px; color: #222c43; font-size: 17px; }
.chfc-mailing-step__header p { margin: 0; color: #737d8f; font-size: 12px; }
.chfc-mailing-step__number { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; background: #2f427f; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700; }
.chfc-mailing-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; padding: 14px; background: #f6f7fa; border: 1px solid #e1e5ec; border-radius: 7px; }
.chfc-mailing-audience { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.75fr); gap: 14px; align-items: stretch; }
.chfc-mailing-recipient-preview { overflow: hidden; background: #fff; border: 1px solid #d9dfe8; border-radius: 7px; }
.chfc-mailing-recipient-preview__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #f6f8fb; border-bottom: 1px solid #dfe4eb; color: #2f3851; }
.chfc-mailing-recipient-preview__heading > div { display: grid; gap: 2px; }
.chfc-mailing-recipient-preview__heading small { color: #7a8495; font-size: 11px; font-weight: 400; }
.chfc-mailing-recipient-preview__heading > span { min-width: 27px; padding: 2px 7px; background: #2f427f; border-radius: 999px; color: #fff; font-size: 11px; line-height: 20px; text-align: center; }
.chfc-mailing-recipient-preview__list { height: 238px; overflow-y: auto; }
.chfc-mailing-recipient-preview__row { display: grid; grid-template-columns: minmax(120px,.8fr) minmax(150px,1.25fr) auto; gap: 10px; align-items: center; min-height: 34px; padding: 5px 10px 5px 13px; border-bottom: 1px solid #edf0f4; font-size: 12px; line-height: 1.25; }
.chfc-mailing-recipient-preview__row:hover { background: #f8faff; }
.chfc-mailing-recipient-preview__row:last-child { border-bottom: 0; }
.chfc-mailing-recipient-preview__name { overflow: hidden; color: #252d42; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.chfc-mailing-recipient-preview__email { overflow: hidden; color: #697386; text-overflow: ellipsis; white-space: nowrap; }
.chfc-mailing-recipient-preview__exclude { padding: 3px 7px; border: 0; background: transparent; color: #667085; cursor: pointer; font-size: 11px; text-decoration: underline; }
.chfc-mailing-recipient-preview__exclude:hover { color: #b42318; }
.chfc-mailing-recipient-preview__empty { margin: 0; padding: 18px 14px; color: #697386; font-size: 12px; }
.chfc-mailing-exclusion { display: grid; align-content: start; gap: 11px; padding: 14px; background: #fffaf0; border: 1px solid #e8d79a; border-radius: 7px; }
.chfc-mailing-exclusion h4 { margin: 0; color: #3d3a2d; font-size: 14px; }
.chfc-mailing-exclusion > p { margin: -5px 0 2px; color: #786f50; font-size: 11px; }
.chfc-mailing-exclusion label { font-size: 12px; }
.chfc-mailing-exclusion textarea { min-height: 78px; resize: vertical; font: inherit; line-height: 1.4; }
.chfc-mailing-audience-total { display: flex; align-items: center; gap: 7px; padding: 10px 12px; background: #eef2ff; border: 1px solid #ced7fb; border-radius: 6px; color: #3f4d70; font-size: 13px; }
.chfc-mailing-audience-total .dashicons { color: #4257aa; }
.chfc-mailing-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chfc-mailing-label-row small { color: #7a8495; font-size: 11px; font-weight: 400; }
.chfc-mailing-message-field { display: grid; gap: 7px; }
.chfc-mailing-merge-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 9px; background: #f7f8fa; border: 1px solid #dfe3ea; border-bottom: 0; border-radius: 6px 6px 0 0; }
.chfc-mailing-merge-tools > span { margin-right: 2px; color: #697386; font-size: 11px; font-weight: 600; }
.chfc-mailing-merge-tools button { padding: 3px 7px; background: #fff; border: 1px solid #cfd5df; border-radius: 4px; color: #3d4c75; cursor: pointer; font: 11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace; }
.chfc-mailing-merge-tools button:hover { border-color: #6377c6; background: #f3f5ff; }
.chfc-mailing-message-field textarea { min-height: 230px; margin-top: -7px; border-radius: 0 0 6px 6px; font-family: inherit; line-height: 1.55; resize: vertical; }
.chfc-mailing-attachment__control { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #f8f9fb; border: 1px dashed #aeb8c7; border-radius: 6px; }
.chfc-mailing-attachment__control input { width: auto; max-width: 260px; }
.chfc-mailing-attachment__control > span { display: grid; gap: 2px; }
.chfc-mailing-attachment__control small { color: #737d8f; font-size: 11px; font-weight: 400; }
.chfc-mailing-send { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; background: #fff; border: 1px solid #dbe0e8; border-radius: 8px; }
.chfc-mailing-confirm { display: grid !important; grid-template-columns: auto minmax(0,1fr) !important; align-items: start; gap: 8px !important; margin-top: 7px; font-size: 12px; font-weight: 500 !important; }
.chfc-mailing-confirm input { margin-top: 2px; }
.chfc-mailing-send .button-primary { display: inline-flex; align-items: center; gap: 7px; min-width: 155px; justify-content: center; }
.chfc-mailing-send .button-primary .dashicons { margin-top: 3px; }
@media (max-width: 1000px) { .chfc-mailing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .chfc-mailing-audience { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .chfc-mailing-panel__header, .chfc-mailing-step__header, .chfc-mailing-send { align-items: stretch; flex-direction: column; } .chfc-mailing-panel__header { padding: 22px; } .chfc-mailing-panel form { padding: 14px; } .chfc-mailing-step { padding: 16px; } .chfc-mailing-grid { grid-template-columns: 1fr; } .chfc-mailing-attachment__control { align-items: flex-start; flex-direction: column; } .chfc-mailing-send .button-primary { width: 100%; } }
