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;
}

/* 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;
}
