/* =============================================================
   KH Board — Frontend Stylesheet
   Accent: #439bc0  |  Prefix: .khb-
   Matches KH Events / member directory design system
   ============================================================= */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --khb-accent:        #439bc0;
    --khb-accent-dark:   #2d7ea3;
    --khb-accent-light:  #e8f4f9;
    --khb-text:          #2c3338;
    --khb-text-muted:    #646970;
    --khb-border:        rgba(0, 0, 0, 0.08);
    --khb-border-hover:  rgba(67, 155, 192, 0.4);
    --khb-bg:            #f0f2f5;
    --khb-card-bg:       #ffffff;
    --khb-radius:        12px;
    --khb-radius-sm:     8px;
    --khb-shadow:        0 2px 8px rgba(0, 0, 0, 0.07);
    --khb-shadow-hover:  0 6px 20px rgba(0, 0, 0, 0.12);
    --khb-transition:    all 0.18s ease;
    --khb-font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.khb-wrap {
    font-family: var(--khb-font);
    color: var(--khb-text);
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

/* ── Board Header ───────────────────────────────────────────── */
.khb-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 24px;
}

.khb-board-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--khb-text);
    margin: 0;
    line-height: 1.2;
}

/* ── Post Button ────────────────────────────────────────────── */
.khb-post-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--khb-accent);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--khb-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--khb-transition);
    white-space: nowrap;
}

.khb-post-btn:hover {
    background: var(--khb-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 155, 192, 0.35);
}

.khb-post-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ── Filter Bar ─────────────────────────────────────────────── */
.khb-filters {
    background: #f0f1f3;
    border: 1px solid #e0e2e5;
    border-radius: var(--khb-radius);
    padding: 20px 24px 16px;
    margin-bottom: 20px;
}

/* Legacy row helpers kept for dashboard forms */
.khb-filter-row { display: grid; gap: 12px; margin-bottom: 12px; }
.khb-filter-row:last-child { margin-bottom: 0; }
.khb-cols-2   { grid-template-columns: 1fr 1fr; }
.khb-cols-2-1 { grid-template-columns: 2fr 1fr; }
.khb-cols-3   { grid-template-columns: 1fr 1fr 1fr; }

/* ── Labeled filter grid (Events-style) ─────────────────────── */
.khb-filter-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.khb-filter-grid:last-of-type { margin-bottom: 0; }

.khb-fg-4 { grid-template-columns: 2fr 1fr 1fr 1fr; }
.khb-fg-3 { grid-template-columns: 2fr 1fr 1fr; }
.khb-fg-2 { grid-template-columns: 1fr 1fr; }

.khb-filter-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.khb-filter-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Search with icon */
.khb-filter-search-wrap {
    position: relative;
}

.khb-filter-search-wrap .khb-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a8b0;
    font-size: 16px;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.khb-filter-search-wrap .khb-filter-input { padding-left: 32px; }

/* Filter footer */
.khb-filter-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e0e2e5;
}

.khb-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--khb-accent);
    color: #fff;
    border: none;
    border-radius: var(--khb-radius-sm);
    padding: 9px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--khb-transition);
}

.khb-apply-btn:hover { background: var(--khb-accent-dark); }

.khb-reset-link {
    font-size: 0.875rem;
    color: #646970;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

.khb-reset-link:hover { color: var(--khb-accent); text-decoration: underline; }

.khb-filter-sort-right {
    margin-left: auto;
}

.khb-filter-sort-right .khb-filter-input {
    font-size: 0.82rem;
}

.khb-filter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dde0e4;
    border-radius: var(--khb-radius-sm);
    font-size: 0.875rem;
    color: var(--khb-text);
    background: #fafbfc;
    box-sizing: border-box;
    transition: var(--khb-transition);
    -webkit-appearance: none;
    appearance: none;
}

.khb-filter-input:focus {
    outline: none;
    border-color: var(--khb-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(67, 155, 192, 0.15);
}

select.khb-filter-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23646970' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.khb-filter-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

/* Responsive filter grid */
@media ( max-width: 900px ) {
    .khb-fg-4 { grid-template-columns: 1fr 1fr; }
    .khb-fg-3 { grid-template-columns: 1fr 1fr; }
}
@media ( max-width: 600px ) {
    .khb-fg-4, .khb-fg-3, .khb-fg-2 { grid-template-columns: 1fr; }
}

.khb-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--khb-accent);
    color: #fff;
    border: none;
    border-radius: var(--khb-radius-sm);
    padding: 10px 22px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--khb-transition);
}

.khb-search-btn:hover {
    background: var(--khb-accent-dark);
}

.khb-search-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ── Results Bar ────────────────────────────────────────────── */
.khb-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.khb-results-count {
    font-size: 0.875rem;
    color: var(--khb-text-muted);
}

.khb-sort-select select {
    font-size: 0.875rem;
    padding: 6px 10px;
    border: 1px solid #dde0e4;
    border-radius: 6px;
    background: #fff;
    color: var(--khb-text);
    cursor: pointer;
}

/* ── Card Grid ──────────────────────────────────────────────── */
.khb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ── Card ───────────────────────────────────────────────────── */
.khb-card {
    background: var(--khb-card-bg);
    border: 1px solid var(--khb-border);
    border-radius: var(--khb-radius);
    box-shadow: var(--khb-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--khb-transition);
}

.khb-card-link {
    text-decoration: none !important;
    color: inherit !important;
}

.khb-card-link:hover,
.khb-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--khb-shadow-hover);
    border-color: var(--khb-border-hover);
}

.khb-card-img {
    width: 100%;
    height: 160px;
    background: var(--khb-accent-light);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.khb-card-img .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--khb-accent);
    opacity: 0.5;
}

.khb-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.khb-card-title {
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--khb-text);
    margin: 0;
    line-height: 1.35;
}

.khb-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--khb-text-muted);
}

.khb-card-meta span {
    display: inline-flex;
    align-items: center;
}

.khb-card-meta span + span::before {
    content: '·';
    margin-right: 6px;
}

.khb-card-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--khb-accent);
    margin: 0;
}

.khb-card-price.khb-price-free {
    color: #3a8a5c;
}

.khb-card-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 8px;
    background: var(--khb-accent-light);
    color: var(--khb-accent-dark);
    border-radius: 20px;
    font-weight: 500;
}

/* ── Manage Card ────────────────────────────────────────────── */
.khb-manage-card {
    cursor: default;
}

.khb-manage-card:hover {
    transform: none;
    box-shadow: var(--khb-shadow);
    border-color: var(--khb-border);
}

.khb-status-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
    margin-bottom: 4px;
}

.khb-status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.khb-status-filled {
    background: #e3f2fd;
    color: #1565c0;
}

.khb-status-closed {
    background: #f5f5f5;
    color: #757575;
}

.khb-manage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.khb-action-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 12px;
    border: 1px solid #dde0e4;
    border-radius: 6px;
    background: #fff;
    color: var(--khb-text);
    text-decoration: none !important;
    cursor: pointer;
    transition: var(--khb-transition);
    white-space: nowrap;
    line-height: 1.4;
}

.khb-action-btn:hover {
    border-color: var(--khb-accent);
    color: var(--khb-accent);
    background: var(--khb-accent-light);
}

.khb-btn-danger {
    color: #c0392b !important;
    border-color: #fde8e6 !important;
}

.khb-btn-danger:hover {
    background: #fde8e6 !important;
    border-color: #c0392b !important;
    color: #c0392b !important;
}

/* ── No Results ─────────────────────────────────────────────── */
.khb-no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--khb-text-muted);
    font-size: 0.95rem;
}

.khb-no-results a {
    color: var(--khb-accent);
}

/* ── Pagination ─────────────────────────────────────────────── */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    margin: 0 3px;
    border: 1px solid #dde0e4;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--khb-text);
    text-decoration: none;
    transition: var(--khb-transition);
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--khb-accent);
    border-color: var(--khb-accent);
    color: #fff !important;
}

.khb-wrap .page-numbers {
    margin-top: 28px;
}

/* ── Single Post ────────────────────────────────────────────── */
.khb-single-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    font-family: var(--khb-font);
}

.khb-status-banner {
    padding: 12px 18px;
    border-radius: var(--khb-radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.khb-status-banner-filled {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.khb-status-banner-closed {
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
}

.khb-single-header-img {
    border-radius: var(--khb-radius);
    overflow: hidden;
    margin-bottom: 28px;
}

.khb-single-header-img img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.khb-single-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--khb-text);
    margin: 0 0 20px;
    line-height: 1.25;
}

.khb-single-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 28px;
}

.khb-gallery-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--khb-radius-sm);
    display: block;
}

.khb-single-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fafbfc;
    border: 1px solid var(--khb-border);
    border-radius: var(--khb-radius-sm);
    margin-bottom: 24px;
}

.khb-author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.khb-by {
    font-size: 0.8rem;
    color: var(--khb-text-muted);
    margin-right: 4px;
}

.khb-author-name {
    font-weight: 600;
    color: var(--khb-accent);
    text-decoration: none;
}

.khb-author-name:hover {
    text-decoration: underline;
}

.khb-pub-date {
    font-size: 0.8rem;
    color: var(--khb-text-muted);
}

/* ── Meta Box ───────────────────────────────────────────────── */
.khb-single-meta-box {
    background: var(--khb-card-bg);
    border: 1px solid var(--khb-border);
    border-radius: var(--khb-radius);
    padding: 4px 0;
    margin-bottom: 28px;
}

.khb-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    border-bottom: 1px solid #f0f2f4;
}

.khb-meta-row:last-child {
    border-bottom: none;
}

.khb-meta-icon {
    flex-shrink: 0;
    color: var(--khb-accent);
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.khb-meta-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--khb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex: 0 0 150px;
    padding-top: 1px;
}

.khb-meta-value {
    font-size: 0.875rem;
    color: var(--khb-text);
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.khb-tax-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--khb-accent-light);
    color: var(--khb-accent-dark);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.khb-link {
    color: var(--khb-accent);
    text-decoration: none;
    word-break: break-all;
}

.khb-link:hover {
    text-decoration: underline;
}

/* ── Description ────────────────────────────────────────────── */
.khb-single-description {
    margin-bottom: 28px;
}

.khb-single-description h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--khb-text);
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--khb-accent-light);
}

.khb-description-body {
    font-size: 0.925rem;
    line-height: 1.75;
    color: var(--khb-text);
}

.khb-description-body p {
    margin-bottom: 1em;
}

/* ── Single CTA ─────────────────────────────────────────────── */
.khb-single-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--khb-border);
}

.khb-msg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--khb-accent);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: var(--khb-radius-sm);
    transition: var(--khb-transition);
}

.khb-msg-btn:hover {
    background: var(--khb-accent-dark);
    transform: translateY(-1px);
}

.khb-msg-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ── Dashboard / Form Header ────────────────────────────────── */
.khb-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.khb-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--khb-accent);
    text-decoration: none;
    font-weight: 500;
}

.khb-back-link:hover {
    color: var(--khb-accent-dark);
    text-decoration: underline;
}

.khb-form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Post Form ──────────────────────────────────────────────── */
.khb-form {
    background: var(--khb-card-bg);
    border: 1px solid var(--khb-border);
    border-radius: var(--khb-radius);
    box-shadow: var(--khb-shadow);
    overflow: hidden;
}

.khb-form-section {
    padding: 24px 28px;
    border-bottom: 1px solid #f0f2f4;
}

.khb-form-section:last-child {
    border-bottom: none;
}

.khb-form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--khb-text);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--khb-accent-light);
}

.khb-form-account {
    background: var(--khb-accent-light);
    border-radius: var(--khb-radius-sm);
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--khb-accent-dark);
    margin-bottom: 16px;
}

.khb-form-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.khb-form-row:last-child {
    margin-bottom: 0;
}

.khb-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.khb-field:last-child {
    margin-bottom: 0;
}

.khb-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--khb-text);
}

.khb-required {
    color: #c0392b;
}

.khb-input {
    padding: 10px 14px;
    border: 1px solid #dde0e4;
    border-radius: var(--khb-radius-sm);
    font-size: 0.875rem;
    color: var(--khb-text);
    background: #fafbfc;
    width: 100%;
    box-sizing: border-box;
    transition: var(--khb-transition);
    -webkit-appearance: none;
    appearance: none;
}

.khb-input:focus {
    outline: none;
    border-color: var(--khb-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(67, 155, 192, 0.15);
}

select.khb-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23646970' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.khb-textarea {
    padding: 10px 14px;
    border: 1px solid #dde0e4;
    border-radius: var(--khb-radius-sm);
    font-size: 0.875rem;
    color: var(--khb-text);
    background: #fafbfc;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    font-family: var(--khb-font);
    line-height: 1.6;
    transition: var(--khb-transition);
}

.khb-textarea:focus {
    outline: none;
    border-color: var(--khb-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(67, 155, 192, 0.15);
}

/* ── Checkbox Group ─────────────────────────────────────────── */
.khb-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.khb-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--khb-text);
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid #dde0e4;
    border-radius: 20px;
    background: #fafbfc;
    transition: var(--khb-transition);
    user-select: none;
}

.khb-checkbox-label:hover {
    border-color: var(--khb-accent);
    color: var(--khb-accent);
}

.khb-checkbox-label input[type="checkbox"] {
    accent-color: var(--khb-accent);
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}

/* ── Gallery Upload ─────────────────────────────────────────── */
.khb-gallery-wrap,
.khb-single-img-wrap,
.khb-doc-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.khb-gallery-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.khb-gallery-thumb {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dde0e4;
}

.khb-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.khb-gallery-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.khb-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f2f5;
    color: var(--khb-text);
    border: 1px dashed #c0c4c8;
    border-radius: var(--khb-radius-sm);
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--khb-transition);
    align-self: flex-start;
}

.khb-upload-btn:hover {
    background: var(--khb-accent-light);
    border-color: var(--khb-accent);
    color: var(--khb-accent-dark);
}

.khb-upload-btn .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
}

/* ── Single Image (Jobs) ────────────────────────────────────── */
.khb-img-preview {
    max-width: 300px;
    max-height: 200px;
    border-radius: var(--khb-radius-sm);
    object-fit: cover;
    border: 1px solid #dde0e4;
}

.khb-img-remove,
.khb-doc-remove {
    display: inline-block;
    font-size: 0.8rem;
    color: #c0392b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    margin-left: 8px;
    text-decoration: underline;
}

.khb-doc-link {
    font-size: 0.875rem;
    color: var(--khb-accent);
    word-break: break-all;
}

/* ── Form Submit ────────────────────────────────────────────── */
.khb-form-submit {
    padding: 20px 28px;
    background: #fafbfc;
    border-top: 1px solid var(--khb-border);
}

.khb-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--khb-accent);
    color: #fff;
    border: none;
    border-radius: var(--khb-radius-sm);
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: var(--khb-transition);
}

.khb-submit-btn:hover {
    background: var(--khb-accent-dark);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(67, 155, 192, 0.35);
}

/* ── Notice ─────────────────────────────────────────────────── */
.khb-notice {
    background: var(--khb-accent-light);
    border: 1px solid rgba(67, 155, 192, 0.3);
    border-radius: var(--khb-radius-sm);
    padding: 14px 18px;
    color: var(--khb-text);
    font-size: 0.9rem;
}

.khb-notice a {
    color: var(--khb-accent);
    font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media ( max-width: 780px ) {
    .khb-cols-2,
    .khb-cols-2-1,
    .khb-cols-3 {
        grid-template-columns: 1fr;
    }

    .khb-board-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .khb-grid {
        grid-template-columns: 1fr;
    }

    .khb-meta-label {
        flex: 0 0 120px;
    }

    .khb-form-section {
        padding: 18px 16px;
    }

    .khb-single-wrap {
        padding: 20px 16px 48px;
    }

    .khb-single-title {
        font-size: 1.5rem;
    }

    .khb-meta-row {
        flex-wrap: wrap;
    }

    .khb-meta-label {
        flex: 0 0 100%;
        margin-bottom: 2px;
    }

    .khb-single-gallery {
        grid-template-columns: 1fr 1fr;
    }
}

@media ( max-width: 480px ) {
    .khb-filter-actions {
        justify-content: stretch;
    }

    .khb-search-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================================
   View Picker + Map — v1.2.0
   ============================================================= */

/* ── Output wrapper ─────────────────────────────────────────── */
.khb-output {
    /* view state managed via data-view attribute */
}

/* ── Board map wrap (shown in map view) ─────────────────────── */
.khb-board-map-wrap {
    display: none;
    border-radius: var(--khb-radius);
    overflow: hidden;
    border: 1px solid var(--khb-border);
    box-shadow: var(--khb-shadow);
    margin-bottom: 16px;
}

.khb-map-shell {
    width: 100%;
    background: #e8eaed;
}

.khb-map-shell .leaflet-container {
    font-family: var(--khb-font);
}

/* ── Results label (below map in map view) ──────────────────── */
.khb-map-results-label {
    display: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--khb-text-muted);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── View states ─────────────────────────────────────────────── */

/* Grid */
.khb-output[data-view="grid"] .khb-board-map-wrap    { display: none; }
.khb-output[data-view="grid"] .khb-map-results-label { display: none; }
.khb-output[data-view="grid"] .khb-grid              { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.khb-output[data-view="grid"] .khb-card              { flex-direction: column; }

/* List */
.khb-output[data-view="list"] .khb-board-map-wrap   { display: none; }
.khb-output[data-view="list"] .khb-map-results-label{ display: none; }
.khb-output[data-view="list"] .khb-grid             { display: grid; grid-template-columns: 1fr; gap: 10px; }
.khb-output[data-view="list"] .khb-card             { flex-direction: row; align-items: stretch; }
.khb-output[data-view="list"] .khb-card-img         { width: 120px; min-width: 120px; height: auto; min-height: 90px; border-radius: var(--khb-radius) 0 0 var(--khb-radius); }
.khb-output[data-view="list"] .khb-card-body        { padding: 14px 18px; justify-content: flex-start; }

/* Map */
.khb-output[data-view="map"] .khb-board-map-wrap     { display: block; }
.khb-output[data-view="map"] .khb-map-results-label  { display: block; }
.khb-output[data-view="map"] .khb-grid               { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.khb-output[data-view="map"] .khb-card               { flex-direction: column; }

/* ── Map popup ──────────────────────────────────────────────── */
.khb-map-popup {
    min-width: 180px;
    max-width: 230px;
}

.khb-popup-thumb {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin-bottom: 8px;
}

.khb-popup-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--khb-accent);
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 4px;
}

.khb-popup-title:hover { text-decoration: underline; }

.khb-popup-loc {
    font-size: 0.78rem;
    color: var(--khb-text-muted);
    margin: 0;
}

/* ── Single listing map ─────────────────────────────────────── */
.khb-single-map-wrap { margin-bottom: 28px; }

.khb-single-map-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--khb-text);
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--khb-accent-light);
}

.khb-single-map {
    width: 100%;
    border-radius: var(--khb-radius);
    overflow: hidden;
    border: 1px solid var(--khb-border);
}

/* ── Filter sort inline ─────────────────────────────────────── */
.khb-filter-sort { max-width: 200px; }

@media ( max-width: 600px ) {
    .khb-filter-sort { max-width: 100%; }
    .khb-view-picker { gap: 4px; }
    .khb-output[data-view="list"] .khb-card { flex-direction: column; }
    .khb-output[data-view="list"] .khb-card-img { width: 100%; min-height: 140px; border-radius: var(--khb-radius) var(--khb-radius) 0 0; }
}

/* ── Card author ────────────────────────────────────────────── */
.khb-card-author {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.khb-card-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.khb-card-author-name {
    font-size: 0.78rem;
    color: var(--khb-text-muted);
    text-decoration: none;
}

/* ── Contact CTA box ────────────────────────────────────────── */
.khb-contact-cta {
    background: var(--khb-accent-light);
    border: 1px solid rgba(67, 155, 192, 0.25);
    border-radius: var(--khb-radius);
    padding: 20px 24px;
    margin-top: 32px;
}

.khb-contact-cta-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--khb-text);
    margin: 0 0 14px;
}

.khb-contact-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.khb-email-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: var(--khb-accent) !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--khb-radius-sm);
    border: 1px solid var(--khb-accent);
    transition: var(--khb-transition);
}

.khb-email-btn:hover {
    background: var(--khb-accent);
    color: #fff !important;
}

.khb-email-btn .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
}

/* ── Field hint ─────────────────────────────────────────────── */
.khb-field-hint {
    font-size: 0.78rem;
    color: var(--khb-text-muted);
    margin-top: 4px;
    display: block;
}

/* =============================================================
   Multiselect Dropdown — v1.3.2
   ============================================================= */

.khb-multiselect {
    position: relative;
    width: 100%;
}

.khb-multiselect-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #dde0e4;
    border-radius: var(--khb-radius-sm);
    background: #fafbfc;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--khb-text);
    user-select: none;
    transition: var(--khb-transition);
    box-sizing: border-box;
}

.khb-multiselect-trigger:focus,
.khb-multiselect.open .khb-multiselect-trigger {
    outline: none;
    border-color: var(--khb-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(67, 155, 192, 0.15);
}

.khb-multiselect-placeholder {
    flex: 1;
    color: #a0a8b0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.khb-multiselect.has-value .khb-multiselect-placeholder {
    color: var(--khb-text);
}

.khb-ms-arrow {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: var(--khb-text-muted);
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.khb-multiselect.open .khb-ms-arrow {
    transform: rotate(180deg);
}

.khb-multiselect-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--khb-accent);
    border-radius: var(--khb-radius-sm);
    max-height: 230px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.khb-multiselect.open .khb-multiselect-dropdown {
    display: block;
}

.khb-ms-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    font-size: 0.875rem;
    color: var(--khb-text);
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.12s;
    user-select: none;
}

.khb-ms-option:last-child { border-bottom: none; }

.khb-ms-option:hover { background: var(--khb-accent-light); }

.khb-ms-option input[type="checkbox"] {
    accent-color: var(--khb-accent);
    width: 15px;
    height: 15px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

/* Child / sub-category items */
.khb-ms-child {
    padding-left: 32px;
    color: var(--khb-text-muted);
    font-size: 0.84rem;
    background: #fdfdfd;
}

.khb-ms-child:hover { background: var(--khb-accent-light); }

/* =============================================================
   kh-search-ui — Exact spec from KH Events Style Guide
   Filter bar and view switcher share these scoped tokens.
   ============================================================= */

.kh-search-ui {
    --kh-accent:        #439bc0;
    --kh-accent-hover:  #3286a8;
    --kh-bg:            #ffffff;
    --kh-surface:       #f9fafb;
    --kh-border:        #e5e7eb;
    --kh-text:          #111827;
    --kh-text-muted:    #6b7280;
    --kh-radius:        8px;
    --kh-radius-lg:     12px;
    --kh-shadow:        0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --kh-shadow-hover:  0 10px 25px rgba(0,0,0,.12);
    --kh-transition:    0.2s ease;
}

/* ── View toggle ────────────────────────────────────────────── */
.kh-view-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius);
    padding: 4px;
    width: fit-content;
}
.kh-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: none;
    border-radius: calc(var(--kh-radius) - 2px);
    background: transparent;
    color: var(--kh-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--kh-transition), color var(--kh-transition), box-shadow var(--kh-transition);
}
.kh-view-btn svg { width: 15px; height: 15px; }
.kh-view-btn.active {
    background: var(--kh-bg);
    color: #439bc0;
    box-shadow: var(--kh-shadow);
}
.kh-view-btn:not(.active):hover { color: var(--kh-text); }

/* ── Filter bar ─────────────────────────────────────────────── */
.kh-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius-lg);
    padding: 18px 20px;
    margin-bottom: 20px;
}

.kh-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 160px;
}
.kh-filter-search { flex: 1 1 220px; }

.kh-filter-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--kh-text-muted);
}

.kh-input-wrap { position: relative; }
.kh-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--kh-text-muted);
    pointer-events: none;
}
.kh-input, .kh-select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius);
    background: var(--kh-bg);
    font-size: 14px;
    color: var(--kh-text);
    outline: none;
    width: 100%;
    transition: border-color var(--kh-transition), box-shadow var(--kh-transition);
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}
.kh-input:focus, .kh-select:focus {
    border-color: var(--kh-accent);
    box-shadow: 0 0 0 3px rgba(67,155,192,.15);
}
.kh-filter-search .kh-input { padding-left: 34px; }
.kh-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 32px;
    cursor: pointer;
}

.kh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border-radius: var(--kh-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background var(--kh-transition), color var(--kh-transition);
    white-space: nowrap;
    text-decoration: none;
}
.kh-btn--primary { background: var(--kh-accent); color: #fff; }
.kh-btn--primary:hover { background: var(--kh-accent-hover); color: #fff; }
.kh-btn--ghost {
    background: transparent;
    color: var(--kh-text-muted);
    border: 1px solid var(--kh-border);
}
.kh-btn--ghost:hover { background: var(--kh-border); color: var(--kh-text); }

/* ── More-filters expandable row ────────────────────────────── */
.kh-filters .khe-filter-more {
    width: 100%;
    display: none;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid var(--kh-border);
}
.kh-filters .khe-filter-more.open { display: flex !important; }

/* ── Filter actions row ─────────────────────────────────────── */
.kh-filter-actions {
    width: 100%;
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--kh-border);
    margin-top: 4px;
}

/* ── Results bar ────────────────────────────────────────────── */

/* ── Location Autocomplete ──────────────────────────────────── */
.khb-location-wrap {
    position: relative;
}
.khb-location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--khb-accent);
    border-top: none;
    border-radius: 0 0 var(--khb-radius-sm) var(--khb-radius-sm);
    max-height: 220px;
    overflow-y: auto;
    z-index: 300;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    display: none;
}
.khb-location-suggestions li {
    padding: 9px 14px;
    font-size: 0.875rem;
    color: var(--khb-text);
    cursor: pointer;
    border-bottom: 1px solid #f0f2f4;
    transition: background 0.12s;
}
.khb-location-suggestions li:last-child { border-bottom: none; }
.khb-location-suggestions li:hover,
.khb-location-suggestions li.khb-ac-active {
    background: var(--khb-accent-light);
    color: var(--khb-accent-dark);
}

/* ── My Location button ─────────────────────────────────────── */
.khb-location-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.khb-my-location-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--khb-accent);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}
.khb-my-location-btn:hover { color: var(--khb-accent-dark); text-decoration: underline; }
.khb-my-location-btn:disabled { opacity: 0.6; cursor: wait; text-decoration: none; }
.khb-my-location-btn .dashicons { font-size: 14px; width: 14px; height: 14px; }

/* ── Job posting status badges ──────────────────────────────── */
.khb-status-badge { display: inline-block; font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.khb-status-open   { background: #e8f5ec; color: #1e6e3a; }
.khb-status-draft  { background: #f3f4f6; color: #6b7280; }
.khb-status-closed { background: #fee2e2; color: #991b1b; }

/* ── Status banner on single posts ──────────────────────────── */
.khb-status-banner { padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 0.875rem; }
.khb-status-banner-closed    { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.khb-status-banner-fulfilled { background: #e8f5ec; color: #1e6e3a; border: 1px solid #86efac; }

/* ── Expired date text ───────────────────────────────────────── */
.khb-expired { color: #991b1b; }

/* =============================================================
   Application System — v1.8.0
   ============================================================= */

/* ── Radio group (app method) ───────────────────────────────── */
.khb-radio-group { display: flex; flex-direction: column; gap: 10px; }
.khb-radio-label {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.9rem; cursor: pointer; user-select: none;
}
.khb-radio-label input[type="radio"] { accent-color: var(--khb-accent); width: 16px; height: 16px; cursor: pointer; }
.khb-optional { font-size: 0.75rem; color: var(--khb-text-muted); font-weight: 400; }

/* ── Applied / closed badges on single page ─────────────────── */
.khb-applied-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #e8f5ec; color: #1e6e3a;
    border: 1px solid #86efac; border-radius: 999px;
    padding: 8px 16px; font-size: 0.875rem; font-weight: 600;
}
.khb-closed-badge {
    display: inline-flex; align-items: center;
    background: #fee2e2; color: #991b1b;
    border: 1px solid #fca5a5; border-radius: 999px;
    padding: 8px 16px; font-size: 0.875rem; font-weight: 600;
}

/* ── Applicants count badge on dashboard ─────────────────────── */
.khb-count-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--khb-accent); color: #fff;
    border-radius: 999px; width: 18px; height: 18px;
    font-size: 0.7rem; font-weight: 700; margin-left: 4px;
}

/* ── Applicants list ────────────────────────────────────────── */
.khba-job-title { font-size: 1.1rem; font-weight: 600; margin: 0; }
.khba-list-wrap {
    background: #fff; border: 1px solid var(--khb-border);
    border-radius: var(--khb-radius); overflow: hidden;
    margin-top: 16px;
}
.khba-list-header, .khba-list-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px; align-items: center;
    padding: 12px 20px;
}
.khba-list-header {
    background: var(--khb-bg-light, #f9fafb);
    font-size: 0.75rem; font-weight: 700; color: var(--khb-text-muted);
    text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 1px solid var(--khb-border);
}
.khba-list-row { border-bottom: 1px solid var(--khb-border); }
.khba-list-row:last-child { border-bottom: none; }
.khba-list-applicant { display: flex; align-items: center; gap: 10px; }
.khba-list-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.khba-list-name { font-weight: 600; font-size: 0.875rem; }
.khba-list-date { font-size: 0.8rem; color: var(--khb-text-muted); }
.khba-list-score { font-size: 0.875rem; font-weight: 600; color: var(--khb-accent); }

/* ── Status pills ───────────────────────────────────────────── */
.khba-status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.khba-status-applied   { background: #e8f3f8; color: #357c9b; }
.khba-status-in_review { background: #fff4e0; color: #b45309; }
.khba-status-accepted  { background: #e8f5ec; color: #1e6e3a; }
.khba-status-rejected  { background: #fee2e2; color: #991b1b; }

/* ── Modal overlay ──────────────────────────────────────────── */
.khba-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.khba-modal {
    background: #fff; border-radius: 12px;
    width: 100%; max-width: 640px; max-height: 90vh;
    overflow-y: auto; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    padding: 28px;
}
.khba-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; font-size: 1.4rem;
    cursor: pointer; color: var(--khb-text-muted); line-height: 1;
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.khba-modal-close:hover { background: #f3f4f6; color: var(--khb-text); }
.khba-modal-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 20px; padding-right: 28px; }
.khba-modal-loading { text-align: center; padding: 40px; color: var(--khb-text-muted); }

/* ── Detail modal content ───────────────────────────────────── */
.khba-detail-header {
    display: flex; align-items: flex-start; gap: 14px;
    padding-bottom: 20px; margin-bottom: 20px;
    border-bottom: 1px solid var(--khb-border);
}
.khba-detail-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.khba-detail-meta { flex: 1; }
.khba-detail-name { font-size: 1rem; font-weight: 700; margin: 0 0 2px; }
.khba-detail-name a { color: inherit; text-decoration: none; }
.khba-detail-name a:hover { color: var(--khb-accent); }
.khba-detail-email, .khba-detail-applied { display: block; font-size: 0.8rem; color: var(--khb-text-muted); }
.khba-detail-status-wrap { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.khba-avg-score-badge {
    display: inline-block; background: var(--khb-accent-light, #e8f3f8);
    color: var(--khb-accent); border-radius: 999px; font-size: 0.75rem;
    font-weight: 700; padding: 3px 10px; text-align: center;
}

.khba-section { margin-bottom: 24px; }
.khba-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.khba-section-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--khb-text-muted); margin: 0 0 10px; }
.khba-section-head .khba-section-title { margin: 0; }
.khba-file-link { display: inline-flex; align-items: center; gap: 6px; color: var(--khb-accent); font-size: 0.875rem; text-decoration: none; font-weight: 600; }
.khba-file-link:hover { text-decoration: underline; }
.khba-cover-letter { font-size: 0.875rem; line-height: 1.6; color: var(--khb-text); background: #f9fafb; border-radius: 6px; padding: 12px; }
.khba-notes-field { width: 100%; resize: vertical; }
.khba-notes-saved { font-size: 0.78rem; color: #1e6e3a; margin-top: 4px; }

/* ── Interview cards ────────────────────────────────────────── */
.khba-interview-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.khba-interview-card { border: 1px solid var(--khb-border); border-radius: 8px; padding: 14px; }
.khba-interview-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.khba-in-title { flex: 1; }
.khba-in-score-wrap { display: flex; align-items: center; gap: 5px; flex-shrink: 0; font-size: 0.8rem; color: var(--khb-text-muted); }
.khba-in-score { width: 60px !important; text-align: center; }
.khba-in-body { width: 100%; resize: vertical; margin-bottom: 10px; }
.khba-in-footer { display: flex; align-items: center; justify-content: space-between; }
.khba-in-date { font-size: 0.75rem; color: var(--khb-text-muted); }
.khb-btn-icon { background: none; border: none; cursor: pointer; color: var(--khb-text-muted); padding: 2px; }
.khb-btn-icon:hover { color: #b00020; }
.khba-avg-score-row { font-size: 0.875rem; color: var(--khb-text-muted); padding-top: 10px; border-top: 1px solid var(--khb-border); }
.khba-avg-score-val { color: var(--khb-accent); }

/* ── Apply modal form ───────────────────────────────────────── */
.khba-apply-user { display: flex; align-items: center; gap: 10px; background: #f9fafb; border-radius: 8px; padding: 12px; margin-bottom: 16px; }
.khba-apply-avatar { width: 36px; height: 36px; border-radius: 50%; }
.khba-apply-user strong { display: block; font-size: 0.875rem; }
.khba-apply-user span { font-size: 0.8rem; color: var(--khb-text-muted); }
.khba-apply-footer { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.khba-apply-msg { font-size: 0.875rem; }
.khba-apply-msg.success { color: #1e6e3a; }
.khba-apply-msg.error   { color: #b00020; }

@media ( max-width: 600px ) {
    .khba-list-header { display: none; }
    .khba-list-row { grid-template-columns: 1fr 1fr; gap: 8px; }
    .khba-list-applicant { grid-column: 1 / -1; }
    .khba-detail-header { flex-direction: column; }
    .khba-detail-status-wrap { width: 100%; }
}

/* =============================================================
   v1.9.0 fixes
   ============================================================= */

/* ── Force button styles inside plugin — BuddyBoss overrides ── */
.khb-wrap .kh-btn--primary,
.khba-modal .kh-btn--primary,
.khba-modal-overlay .kh-btn--primary {
    background: #439bc0 !important;
    color: #fff !important;
    border: none !important;
    opacity: 1 !important;
}
.khb-wrap .kh-btn--primary:hover,
.khba-modal .kh-btn--primary:hover {
    background: #3286a8 !important;
    color: #fff !important;
}
.khb-wrap .kh-btn--ghost,
.khba-modal .kh-btn--ghost {
    background: transparent !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
}
.khb-wrap .kh-btn--ghost:hover,
.khba-modal .kh-btn--ghost:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}

/* ── Single job page CTA buttons — consistent height + style ── */
.khb-contact-cta { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; margin-top: 24px; }
.khb-contact-cta-label { font-size: 1rem; font-weight: 600; margin: 0 0 14px; }
.khb-contact-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.khb-contact-cta-actions a,
.khb-contact-cta-actions button,
.khb-contact-cta-actions span.khb-applied-badge,
.khb-contact-cta-actions span.khb-closed-badge {
    height: 42px !important;
    padding: 0 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}
/* Apply / primary */
.khb-submit-btn,
#khba-apply-btn {
    background: #439bc0 !important;
    color: #fff !important;
    border: none !important;
}
.khb-submit-btn:hover, #khba-apply-btn:hover { background: #3286a8 !important; color: #fff !important; }
/* Message */
.khb-msg-btn { background: #fff !important; color: #439bc0 !important; border: 1px solid #439bc0 !important; }
.khb-msg-btn:hover { background: #e8f3f8 !important; }
/* Email */
.khb-email-btn { background: #fff !important; color: #439bc0 !important; border: 1px solid #439bc0 !important; }
.khb-email-btn:hover { background: #e8f3f8 !important; }

/* ── Score input — no spinners, decimal allowed ─────────────── */
.khba-in-score {
    -moz-appearance: textfield !important;
    width: 64px !important;
    text-align: center;
}
.khba-in-score::-webkit-inner-spin-button,
.khba-in-score::-webkit-outer-spin-button { -webkit-appearance: none !important; margin: 0 !important; }
.khba-in-score-wrap label { font-size: 0.8rem; color: #6b7280; white-space: nowrap; }

/* ── Applicant list — fixed column grid ──────────────────────── */
.khba-list-header,
.khba-list-row {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1.2fr 0.8fr 90px;
    gap: 12px;
    align-items: center;
    padding: 12px 20px;
}

/* ── Custom file input ───────────────────────────────────────── */
.khb-file-wrap { display: flex; align-items: center; gap: 10px; }
.khb-file-input-real { display: none !important; }
.khb-file-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 8px 14px; font-size: 0.875rem; font-weight: 600;
    color: #439bc0; cursor: pointer; white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.khb-file-btn:hover { background: #e8f3f8; border-color: #439bc0; }
.khb-file-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }
.khb-file-name { font-size: 0.8rem; color: #6b7280; }
.khb-file-name.has-file { color: #111827; font-weight: 500; }

/* ── Loading spinner on apply submit ─────────────────────────── */
.khba-spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff; border-radius: 50%;
    animation: khba-spin 0.7s linear infinite;
    vertical-align: middle; margin-right: 4px;
}
@keyframes khba-spin { to { transform: rotate(360deg); } }

/* ── Legal auth section ──────────────────────────────────────── */
.khba-legal-section { background: #f9fafb; border-radius: 8px; padding: 14px; margin-bottom: 14px; }
.khba-legal-section .khb-checkbox-label { font-size: 0.875rem; font-weight: 500; }
.khba-visa-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e5e7eb; }
.khba-visa-row label { font-size: 0.875rem; margin-bottom: 6px; display: block; font-weight: 500; }
.khba-visa-radios { display: flex; gap: 16px; }
.khba-visa-radios label { display: flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 400; cursor: pointer; margin: 0; }

/* ── Custom screening questions ──────────────────────────────── */
.khb-question-slot { border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.khb-question-slot-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.khb-question-slot-head .khb-checkbox-label { font-weight: 600; font-size: 0.875rem; white-space: nowrap; }
.khb-question-fields { display: none; }
.khb-question-fields.active { display: flex; flex-direction: column; gap: 8px; }
.khb-question-required-row { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: #6b7280; }
.khba-screening-section { margin-bottom: 20px; }
.khba-screening-q { margin-bottom: 14px; }
.khba-screening-q strong { display: block; font-size: 0.875rem; margin-bottom: 4px; }
.khba-screening-q p { font-size: 0.875rem; color: #374151; background: #f9fafb; border-radius: 6px; padding: 10px; margin: 0; }

/* ── Applicants filter bar ───────────────────────────────────── */
.khba-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    background: var(--kh-surface, #f9fafb);
    border: 1px solid var(--kh-border, #e5e7eb);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 16px;
    margin-top: 8px;
}
.khba-filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.khba-count-label { font-size: 0.8rem; color: #6b7280; align-self: center; margin-left: auto; }
