body {
    background: #f6f8fb;
}

.panel {
    background: #ffffff;
    border: 1px solid #e6eaf2;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 2px rgba(15, 30, 60, 0.04);
}
.panel.h-100 { display: flex; flex-direction: column; }
.panel-header { margin-bottom: 14px; }
.panel-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    color: #9aa3b3;
    margin-bottom: 12px;
}

.stat-strip {
    display: flex;
    background: #ffffff;
    border: 1px solid #e6eaf2;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 30, 60, 0.04);
}
.stat-strip-item {
    flex: 1 1 0;
    padding: 14px 20px;
    border-right: 1px solid #f0f3f7;
    min-width: 0;
}
.stat-strip-item:last-child { border-right: none; }
.stat-strip-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #9aa3b3;
    font-weight: 600;
    margin-bottom: 6px;
}
.stat-strip-value {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.05;
    letter-spacing: -0.4px;
}

.column-header-name {
    padding-left: 14px !important;
}

.column-header--sort {
    opacity: 0.35;
    transition: opacity 0.15s ease, color 0.15s ease;
}
th:hover .column-header--sort {
    opacity: 0.85 !important;
}

.column-header--sort:has(.fa-sort-up),
.column-header--sort:has(.fa-sort-down) {
    opacity: 1 !important;
    color: #BCA33B !important;
}
.column-header--sort:has(.fa-sort-up) svg,
.column-header--sort:has(.fa-sort-down) svg {
    color: #BCA33B !important;
    transform: scale(1.15);
}

.dash-spreadsheet-inner table thead th {
    padding: 10px 14px !important;
    line-height: 1.3 !important;
}

.dash-spreadsheet-inner table tbody td {
    padding: 9px 14px !important;
}

input[type="text"].form-control:focus {
    box-shadow: 0 0 0 .15rem rgba(188, 163, 59, .15);
    border-color: #BCA33B;
}

.dash-cell a {
    text-decoration: none;
    color: #BCA33B;
}
.dash-cell a:hover {
    text-decoration: underline;
}

.sigbd-segmented {
    display: flex;
    background: #f1f4f9;
    border-radius: 8px;
    padding: 3px;
    margin: 4px 0 10px;
    gap: 0;
}
.sigbd-seg {
    flex: 1 1 0;
    min-width: 0;
    padding: 5px 6px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    color: #6b7480;
    background: transparent;
    border: none;
    border-radius: 6px;
    letter-spacing: 0.1px;
    transition: background 0.12s ease, color 0.12s ease;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sigbd-seg:hover {
    background: rgba(188, 163, 59, 0.06);
    color: #BCA33B;
}
.sigbd-seg.is-active {
    background: #ffffff;
    color: #a89232;
    box-shadow: 0 1px 3px rgba(15, 30, 60, 0.08);
    font-weight: 600;
}

.sigbd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e8dba8;
    background: #fbf6e6;
    color: #a89232;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease,
                box-shadow 0.12s ease, transform 0.06s ease;
    line-height: 1;
}
.sigbd-chip:hover {
    background: #f5ecc8;
    border-color: #d4c178;
    box-shadow: 0 1px 3px rgba(188, 163, 59, 0.18);
}
.sigbd-chip:active {
    transform: translateY(1px);
}
.sigbd-chip i {
    font-size: 10px;
    opacity: 0.75;
}

body.app-loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(188, 163, 59, 0)    0%,
        rgba(188, 163, 59, 0.7) 30%,
        rgba(212, 186, 78, 1)   50%,
        rgba(188, 163, 59, 0.7) 70%,
        rgba(188, 163, 59, 0)  100%
    );
    background-size: 50% 100%;
    background-repeat: no-repeat;
    z-index: 10001;
    pointer-events: none;
    animation: sigbd-scan 1.05s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes sigbd-scan {
    0%   { background-position: -50% 0; }
    100% { background-position: 150% 0; }
}

body.app-loading #contacts-table,
body.app-loading #companies-table {
    transition: opacity 0.2s ease;
    opacity: 0.55;
}

/* Bootstrap primary override — Signatric gold instead of Flatly blue.
   The login modal "Sign in" and any other btn-primary become brand-aligned. */
.btn-primary {
    background-color: #BCA33B;
    border-color: #BCA33B;
    color: #1a1a1a;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #a89232 !important;
    border-color: #a89232 !important;
    color: #1a1a1a !important;
}
.btn-primary:focus {
    box-shadow: 0 0 0 .2rem rgba(188, 163, 59, .4) !important;
}

/* Engaged stat: subtle hint when zero, gold accent when active */
.stat-strip-hint {
    font-size: 10.5px;
    color: #a0a8b3;
    margin-top: 4px;
    font-style: italic;
    line-height: 1.2;
}
.stat-strip-value--accent {
    color: #BCA33B;
}

/* Outreach performance table */
.camp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.camp-table thead th {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    color: #9aa3b3;
    text-align: right;
    padding: 0 12px 8px 12px;
    border-bottom: 1px solid #e3e7ee;
    white-space: nowrap;
}
.camp-table thead th:first-child { text-align: left; }
.camp-table tbody td {
    padding: 9px 12px;
    color: #1f2937;
    border-bottom: 1px solid #f0f2f6;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.camp-table .camp-name {
    text-align: left;
    font-weight: 500;
}
.camp-table .camp-num { text-align: right; }
.camp-table .camp-seg {
    text-align: left;
    color: #4b5563;
    font-size: 0.86em;
    white-space: nowrap;
}
.camp-table .camp-dates {
    text-align: left;
    color: #6b7280;
    font-size: 0.86em;
    white-space: nowrap;
}
.camp-table .camp-pct--warn { color: #c2410c; font-weight: 600; }
.camp-table .camp-total-row td {
    border-top: 1px solid #e3e7ee;
    border-bottom: none;
    font-weight: 600;
    color: #1f2937;
}
.camp-table tbody tr:last-child td { border-bottom: none; }
.camp-foot {
    margin-top: 12px;
    font-size: 12px;
    color: #6b7480;
}
.camp-foot-sep { color: #cdd5e0; }

/* Saved-views leader text */
.saved-views-leader {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    color: #9aa3b3;
}

/* "More filters" toggle button — match dropdown row visually */
#more-filters-toggle {
    border-color: #e3e7ee;
    color: #4a5568;
    font-size: 13px;
    font-weight: 500;
}
#more-filters-toggle:hover {
    background: #f5edcc;
    border-color: #d4c178;
    color: #6d5a14;
}

/* Em-dash placeholder for visually empty cells (background pseudo-fill) */
.dash-cell-value:empty::before {
    content: '—';
    color: #cdd5e0;
}

/* Empty-state pills — show what's filtered when results are 0 */
.empty-state-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}
.empty-state-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    background: #fbf6e6;
    border: 1px solid #e8dba8;
    color: #6d5a14;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
}

/* Activity feed: single-line ellipsis on description, hover shows full text */
.activity-feed-text {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* Stat-strip rhythm: subtle shadow consistent with the panels below */
.stat-strip {
    box-shadow: 0 1px 2px rgba(15, 30, 60, 0.04);
}
.stat-strip-item {
    transition: background 0.15s ease;
}
.stat-strip-item:hover {
    background: #fafbfd;
}

/* "More filters" button gains a gold rule when its panel is open */
#more-filters-toggle .fa-chevron-up {
    color: #BCA33B;
}

.camp-hero {
    box-shadow: none;
    background: #fbfcfe;
}
.camp-hero .stat-strip-item { padding: 12px 16px; }
.stat-strip-value--muted {
    color: #b6bdc8;
    font-weight: 500;
}
.camp-brand-seg .sigbd-segmented,
.camp-metric-seg .sigbd-segmented { margin: 0; }
.camp-brand-seg { width: 300px; max-width: 100%; }
.camp-metric-seg { width: 190px; }
.camp-chart {
    border: 1px solid #eef1f5;
    border-radius: 8px;
    padding: 12px 14px 4px;
    height: 100%;
}
.camp-chart-title {
    font-size: 12px;
    font-weight: 600;
    color: #475066;
}
.camp-chart-empty {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #9aa3b3;
}
.camp-table-wrap { overflow-x: auto; }
.camp-table .camp-na { color: #c3c9d3; }
.camp-table .camp-subject {
    font-size: 0.82em;
    font-weight: 400;
    color: #8a93a2;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.camp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

@media (max-width: 767px) {
    .camp-hero { flex-wrap: wrap; }
    .camp-hero .stat-strip-item {
        flex: 1 1 33%;
        border-bottom: 1px solid #f0f3f7;
    }
    .camp-metric-seg { width: 160px; }
}
.camp-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
}
.geo-region-seg { width: 300px; max-width: 100%; }
.geo-weight-seg { width: 210px; max-width: 100%; }
.geo-region-seg .sigbd-segmented,
.geo-weight-seg .sigbd-segmented { margin: 0; }
.geo-map {
    border: 1px solid #eef1f5;
    border-radius: 8px;
    overflow: hidden;
}
.geo-total {
    font-size: 11px;
    color: #9aa3b3;
}
.geo-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 52px;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #f3f5f8;
}
.geo-row:last-child { border-bottom: none; }
.geo-label {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.geo-place {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.geo-country {
    font-size: 11px;
    color: #9aa3b3;
}
.geo-bar {
    height: 6px;
    background: #f1f4f9;
    border-radius: 3px;
}
.geo-bar-fill {
    height: 100%;
    background: #2a78d6;
    border-radius: 3px;
}
.geo-num {
    text-align: right;
    font-size: 13px;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}
.save-list-msg {
    font-size: 12px;
    color: #6b7480;
    min-height: 0;
}
.save-list-msg:empty { display: none; }
.header-controls .sigbd-segmented { margin: 0; }
.brand-seg { width: 250px; max-width: 100%; }
.view-seg { width: 130px; }
.view-seg .sigbd-seg.is-active { background: #2a78d6; color: #ffffff; }
.bi-tabs { flex: 1 1 560px; max-width: 680px; }
.bi-tabs .sigbd-segmented,
.bi-range-seg .sigbd-segmented,
.bi-loc-seg .sigbd-segmented { margin: 0; }
.bi-range-seg { width: 260px; max-width: 100%; }
.bi-loc-seg { width: 170px; }
.bi-month { width: 200px; font-size: 13px; }
.bi-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: -0.3px;
}
.bi-sub { font-size: 12.5px; color: #6b7480; }
.bi-chart-sub { font-size: 11.5px; color: #6b7480; font-variant-numeric: tabular-nums; }
.bi-note {
    font-size: 12.5px;
    color: #6b7480;
    background: #f6f8fb;
    border-radius: 6px;
    padding: 8px 12px;
}
.bi-up { color: #15803d; }
.bi-down { color: #c2410c; }
.bi-flat { color: #9aa3b3; }
.bi-muted { color: #9aa3b3; }
.bi-tiles .stat-strip-hint { font-variant-numeric: tabular-nums; }
.bi-table td, .bi-table th { white-space: nowrap; }
.bi-table td { font-variant-numeric: tabular-nums; }
.bi-table td span { font-size: 0.9em; }
.bi-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1.4fr) minmax(0, 1fr) 64px 70px;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f3f5f8;
}
.bi-row-head {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    color: #9aa3b3;
    padding-top: 0;
}
.bi-row-head .geo-num { font-size: 10.5px; color: #9aa3b3; }
.bi-rank { font-size: 11px; color: #9aa3b3; text-align: right; font-variant-numeric: tabular-nums; }
.bi-report { max-width: 820px; font-size: 14.5px; line-height: 1.75; color: #2b3443; }
.bi-report-title { font-size: 19px; font-weight: 600; color: #1f2937; margin: 0 0 18px; }
.bi-report-h { font-size: 15px; font-weight: 600; color: #2a78d6; margin: 26px 0 10px; }
.bi-report p { margin: 0 0 14px; word-break: keep-all; }
.bi-report-list { padding-left: 18px; margin: 0 0 14px; }
.bi-report-list li { margin: 4px 0; word-break: keep-all; }
.bi-report-rule { margin: 26px 0 6px; border-color: #e6eaf2; opacity: 1; }
@media (max-width: 767px) {
    .bi-tiles { flex-wrap: wrap; }
    .bi-tiles .stat-strip-item { flex: 1 1 50%; border-bottom: 1px solid #f0f3f7; }
    .bi-row { grid-template-columns: 22px minmax(0, 1.4fr) minmax(0, 0.8fr) 56px 62px; gap: 8px; }
    .brand-seg { width: 220px; }
}
.bi-table td:first-child,
.bi-table th:first-child { text-align: left; }
.bi-tabs { min-width: 0; }
@media (max-width: 767px) {
    .bi-tabs { flex: 1 1 100%; max-width: 100%; }
    .bi-tabs .sigbd-segmented { overflow-x: auto; }
    .bi-tabs .sigbd-seg { flex: 0 0 auto; padding: 5px 10px; overflow: visible; }
}
