.bfsp-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.bfsp-card-item {
    border: 1px solid #ddd;
    padding: 12px 14px;
    border-radius: 4px;
    background: #fff;
}
.bfsp-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}
.bfsp-card-meta {
    margin-bottom: 0.5rem;
}
.bfsp-chip {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 4px 4px 0;
    border-radius: 999px;
    background: #f1f1f1;
    font-size: 11px;
}
.bfsp-chip-class {
    background: #222;
    color: #fff;
}

.bfsp-map-list {
    list-style: disc;
    margin-left: 1.5rem;
}
.bfsp-stats-list {
    list-style: none;
    padding: 0;
}
.bfsp-stats-list li {
    margin: 4px 0;
}
.bfsp-stats-count {
    margin-left: 8px;
    font-weight: bold;
}
.bfsp-submit-form form p {
    margin-bottom: 0.75rem;
}
.bfsp-submit-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}
.bfsp-submit-form input[type="text"],
.bfsp-submit-form input[type="email"],
.bfsp-submit-form input[type="date"],
.bfsp-submit-form input[type="number"],
.bfsp-submit-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.bfsp-inline {
    display: flex;
    gap: 1rem;
}
.bfsp-inline > span {
    flex: 1;
}
.bfsp-btn {
    padding: 6px 16px;
    border-radius: 3px;
    border: none;
    background: #0073aa;
    color: #fff;
    cursor: pointer;
}
.bfsp-btn:hover {
    background: #006097;
}
.bfsp-notice {
    padding: 8px 10px;
    margin-bottom: 10px;
    border-radius: 3px;
}
.bfsp-notice-success {
    background: #e5f5e0;
    border: 1px solid #4caf50;
}
.bfsp-notice-error {
    background: #fdecea;
    border: 1px solid #f44336;
}
.bfsp-comments-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.bfsp-comments-list li {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}
.bfsp-comment-meta {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
}
.bfsp-comment-body {
    font-size: 14px;
}

/* Directory filters + view modes */
.bfsp-directory-filters {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    background: #fafafa;
}
.bfsp-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 8px;
}
.bfsp-filter-row > div {
    flex: 1;
    min-width: 160px;
}
.bfsp-filter-search {
    flex: 2;
}
.bfsp-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    justify-content: flex-start;
}
.bfsp-view-toggle {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.bfsp-view-btn {
    padding: 4px 10px;
    border-radius: 3px;
    border: 1px solid #ddd;
    background: #f1f1f1;
    cursor: pointer;
    font-size: 12px;
}
.bfsp-view-btn.is-active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.bfsp-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.bfsp-directory-grid.bfsp-view-mode-list {
    display: block;
}
.bfsp-directory-grid.bfsp-view-mode-list .bfsp-card-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}
.bfsp-card-item {
    border: 1px solid #ddd;
    padding: 12px 14px;
    border-radius: 4px;
    background: #fff;
    position: relative;
}
.bfsp-card-main {
    margin-bottom: 6px;
}
.bfsp-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}
.bfsp-card-meta {
    margin-bottom: 0.5rem;
}
.bfsp-card-excerpt {
    margin: 0;
}
.bfsp-card-actions {
    margin-top: 4px;
}
.bfsp-link {
    background: none;
    border: none;
    padding: 0;
    color: #0073aa;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
}
.bfsp-card-detail-container {
    margin-top: 8px;
    display: none;
}
.bfsp-card-detail {
    border-top: 1px solid #eee;
    padding-top: 8px;
    font-size: 13px;
}
.bfsp-card-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.bfsp-detail-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}
.bfsp-card-detail-columns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 4px;
}
.bfsp-card-detail-col {
    flex: 1;
    min-width: 180px;
}
.bfsp-card-detail-col h4 {
    margin: 4px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.bfsp-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.bfsp-muted {
    color: #777;
    font-size: 12px;
    margin: 0;
}
.bfsp-chip-env {
    background: #e3f2fd;
}
.bfsp-chip-ground {
    background: #e8f5e9;
}
.bfsp-chip-season {
    background: #fff3cd;
}
.bfsp-chip-witnesses {
    background: #f1f1f1;
}
.bfsp-detail-loading,
.bfsp-detail-error {
    font-size: 13px;
    padding: 6px 8px;
    background: #f9f9f9;
    border-radius: 3px;
    border: 1px solid #eee;
}

/* Map styling */
.bfsp-map-canvas {
    background: #f7f7f7;
    padding: 0;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    height: 400px;
}
.bfsp-map-detail {
    margin-bottom: 1rem;
}
.bfsp-map-popup-location {
    font-size: 11px;
    color: #555;
}

/* Stats mini charts */
.bfsp-stats-wrapper {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 14px;
    background: #fff;
    margin: 1rem 0;
}
.bfsp-stats-summary {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}
.bfsp-stats-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}
.bfsp-stats-total-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
}
.bfsp-stats-total-value {
    font-size: 20px;
    font-weight: 600;
}
.bfsp-stats-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bfsp-stats-row {
    font-size: 12px;
}
.bfsp-stats-row-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}
.bfsp-stats-label {
    font-weight: 500;
}
.bfsp-stats-count {
    color: #555;
}
.bfsp-stats-bar-outer {
    background: #f1f1f1;
    border-radius: 999px;
    overflow: hidden;
    height: 8px;
}
.bfsp-stats-bar-inner {
    height: 8px;
    background: #0073aa;
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* Submit wizard styling */
.bfsp-wizard-form {
    border: 1px solid #ddd;
    padding: 14px;
    border-radius: 4px;
    background: #fff;
}
.bfsp-wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 4px;
}
.bfsp-wizard-step-circle {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: #666;
}
.bfsp-wizard-step-circle span {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    border: 2px solid #ccc;
    margin-bottom: 3px;
    font-weight: 600;
}
.bfsp-wizard-step-circle.is-active span {
    border-color: #0073aa;
    background: #0073aa;
    color: #fff;
}
.bfsp-wizard-step-circle small {
    display: block;
}
.bfsp-wizard-step {
    display: none;
    margin-bottom: 12px;
}
.bfsp-wizard-step.is-active {
    display: block;
}
.bfsp-wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}
.bfsp-witnesses-field input {
    max-width: 80px;
}
.bfsp-fieldset {
    border: 1px solid #eee;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.bfsp-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 6px;
}
.bfsp-checkbox-grid label {
    font-size: 12px;
}
.bfsp-checkbox-grid input[type="checkbox"] {
    margin-right: 4px;
}
.bfsp-review-note {
    font-size: 13px;
    color: #555;
}

/* Photo display in details */
.bfsp-card-detail-photo {
    margin: 6px 0 10px;
}
.bfsp-card-detail-photo img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    border: 1px solid #ddd;
}
.bfsp-chip-photo {
    background: #e0f7fa;
}
.bfsp-help {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}


/* BFSP Stats mini charts */
.bfsp-stats-wrapper {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.bfsp-stats-summary {
    margin-bottom: 1rem;
}
.bfsp-stats-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.bfsp-stats-total-label {
    font-size: 0.95rem;
    color: #4a5568;
}
.bfsp-stats-total-value {
    font-size: 1.3rem;
    font-weight: 700;
}
.bfsp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.bfsp-stats-card {
    padding: 0.75rem 0.9rem;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.bfsp-stats-card h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}
.bfsp-mini-chart {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Advanced stats: mini pie charts */
.bfsp-stats-card-pie {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
}

.bfsp-mini-pie {
    display: flex;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.bfsp-mini-pie svg {
    width: 60px;
    height: 60px;
}

.bfsp-mini-pie-slice {
    fill: transparent;
    stroke-width: 6;
    stroke-linecap: butt;
}

/* Use currentColor for slices; each slice will inherit from card's text color */
.bfsp-stats-card-pie .bfsp-mini-pie-slice {
    stroke: currentColor;
    opacity: 0.18;
}

.bfsp-mini-pie-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
}

.bfsp-mini-pie-legend li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.15rem;
}

.bfsp-mini-pie-label {
    max-width: 65%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bfsp-mini-pie-value small {
    margin-left: 0.25rem;
    color: #718096;
    font-size: 0.7rem;
}

.bfsp-mini-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 3fr) auto;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.84rem;
    margin-bottom: 0.25rem;
}
.bfsp-mini-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bfsp-mini-bar-wrap {
    position: relative;
    height: 0.55rem;
    background: #edf2f7;
    border-radius: 999px;
    overflow: hidden;
}
.bfsp-mini-bar {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #3182ce;
}
.bfsp-mini-count {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.bfsp-mini-count small {
    display: block;
    font-size: 0.7rem;
    color: #718096;
}


.bfsp-map-wrapper {
    margin-bottom: 2rem;
}

.bfsp-map-filters {
    margin-bottom: 1rem;
}

.bfsp-map-filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: flex-end;
}

.bfsp-map-filters-form > div {
    display: flex;
    flex-direction: column;
}

.bfsp-map-filters-form label {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* Map detail block highlight + loading */
#bfsp-map-detail.bfsp-detail-highlight {
    box-shadow: 0 0 0 2px rgba(56, 178, 172, 0.7);
    transition: box-shadow 0.3s ease;
}

.bfsp-detail-loading {
    padding: 0.75rem 0;
    font-size: 0.9rem;
    color: #4a5568;
}

.bfsp-detail-error {
    padding: 0.75rem 0;
    font-size: 0.9rem;
    color: #c53030;
}


.bfsp-recent {
    margin: 1.5rem 0;
}

.bfsp-recent-subtitle {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.bfsp-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bfsp-recent-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #edf2f7;
}

.bfsp-recent-item:last-child {
    border-bottom: none;
}

.bfsp-recent-main {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.bfsp-recent-date {
    font-size: 0.85rem;
    color: #718096;
    min-width: 7rem;
}

.bfsp-recent-title {
    font-weight: 600;
}

.bfsp-recent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}


.bfsp-digest-subscribe {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.bfsp-digest-subtitle {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.bfsp-digest-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
}

.bfsp-digest-form label {
    flex: 1 0 100%;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.bfsp-digest-form input[type="email"] {
    flex: 1 0 220px;
    max-width: 320px;
}

.bfsp-digest-actions {
    display: flex;
    gap: 0.5rem;
}

.bfsp-digest-notice {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.bfsp-digest-notice--success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #22543d;
}

.bfsp-digest-notice--error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #742a2a;
}

/* Custom map marker icon */
.bfsp-map-marker-inner {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #e53e3e;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 0 10px rgba(229,62,62,0.6);
}

/* Map view toggle */
.bfsp-map-view-toggle {
    margin-bottom: 0.75rem;
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid #cbd5e0;
    overflow: hidden;
}

.bfsp-map-view-btn {
    border: none;
    background: transparent;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: #4a5568;
}

.bfsp-map-view-btn.is-active {
    background: #2b6cb0;
    color: #fff;
}


.bfsp-similar-sightings {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.bfsp-similar-sightings h3 {
    margin-bottom: 0.5rem;
}

.bfsp-similar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bfsp-similar-item {
    padding: 0.35rem 0;
    border-bottom: 1px dashed #edf2f7;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
}

.bfsp-similar-item:last-child {
    border-bottom: none;
}

.bfsp-similar-date {
    font-size: 0.8rem;
    color: #718096;
    min-width: 6.5rem;
}

.bfsp-similar-title {
    font-weight: 600;
    margin-right: 0.5rem;
}


.bfsp-map-cluster-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #2b6cb0;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.9),
                0 0 12px rgba(43,108,176,0.6);
}

.bfsp-map-cluster-popup {
    font-size: 0.85rem;
}


/* Letterhead style for inline sighting details */
.bfsp-detail-letterhead {
    background: #faf7f1;
    border: 1px solid #cbb79a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 18px 22px 20px;
    margin: 12px 0;
    font-family: "Georgia", "Times New Roman", serif;
    position: relative;
}

.bfsp-letterhead-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d8c7aa;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.bfsp-letterhead-logo-wrap {
    flex: 0 0 auto;
    margin-right: 12px;
}

.bfsp-letterhead-logo {
    max-width: 64px;
    height: auto;
    display: block;
}

.bfsp-letterhead-text {
    flex: 1;
}

.bfsp-letterhead-title {
    font-size: 20px;
    margin: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bfsp-letterhead-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b5842;
}

.bfsp-detail-close {
    flex: 0 0 auto;
    margin-left: auto;
    border: none;
    background: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #7b5a3a;
}

.bfsp-detail-close:hover {
    color: #3b2414;
}

.bfsp-letterhead-body {
    font-size: 14px;
    line-height: 1.5;
}

.bfsp-detail-section {
    margin-bottom: 14px;
}

.bfsp-detail-section h3 {
    font-size: 14px;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4b3522;
}

.bfsp-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bfsp-detail-table th {
    text-align: left;
    width: 32%;
    padding: 2px 6px 2px 0;
    color: #5b4631;
    font-weight: 600;
}

.bfsp-detail-table td {
    padding: 2px 0;
}

.bfsp-detail-description,
.bfsp-detail-admin-comments {
    background: rgba(255,255,255,0.6);
    border: 1px solid #e1d3b9;
    padding: 8px 10px;
    border-radius: 2px;
}

.bfsp-detail-photo-wrap {
    background: #fff;
    border: 1px solid #e1d3b9;
    padding: 6px;
    display: inline-block;
}

.bfsp-detail-photo {
    max-width: 100%;
    height: auto;
    display: block;
}


/* Submit form map */
.bfsp-location-map {
    width: 100%;
    height: 320px;
    margin: 10px 0 15px;
    border-radius: 4px;
    overflow: hidden;
}


/* Directory list vs cards */
.bfsp-directory-results.is-list {
    display: block;
}
.bfsp-directory-results.is-list .bfsp-card-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}
.bfsp-directory-results.is-list .bfsp-card-main {
    flex: 1;
}
.bfsp-directory-results.is-list .bfsp-card-actions {
    margin-left: 1rem;
}

/* Step 6 review layout */
.bfsp-review-summary {
    margin: 1rem 0 1.5rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    background: #f9fafb;
}
.bfsp-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.bfsp-review-group h5 {
    margin: 0 0 0.5rem;
}
.bfsp-review-group p {
    margin: 0 0 0.25rem;
}

/* Print button in detail header */
.bfsp-detail-print {
    margin-left: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
}

/* Simple print-friendly tweaks */
@media print {
    .bfsp-detail-close,
    .bfsp-detail-print,
    .bfsp-directory-filters,
    .bfsp-view-toggle,
    .bfsp-card-actions {
        display: none !important;
    }
}


/* Mini map under details */
.bfsp-detail-section-mini-map {
    margin-top: 1.5rem;
}
.bfsp-detail-mini-map {
    width: 100%;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
}


/* Advanced stats layout */
.bfsp-stats-wrapper.bfsp-stats-advanced {
    margin-top: 1.25rem;
}

.bfsp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.9rem;
    margin-top: 0.75rem;
}

.bfsp-stats-card-wide {
    grid-column: 1 / -1;
}

.bfsp-mini-line-chart {
    width: 100%;
    max-width: 480px;
    margin-top: 0.5rem;
}

.bfsp-mini-line-chart svg {
    width: 100%;
    height: 40px;
    color: #3182ce;
    background: #f7fafc;
    border-radius: 3px;
}

.bfsp-mini-line-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-top: 0.25rem;
    color: #4a5568;
}


/* Multi-color pie slices */
.bfsp-stats-card-pie .bfsp-mini-pie-slice:nth-of-type(1) { stroke: #e53e3e; opacity: 0.75; }
.bfsp-stats-card-pie .bfsp-mini-pie-slice:nth-of-type(2) { stroke: #dd6b20; opacity: 0.8; }
.bfsp-stats-card-pie .bfsp-mini-pie-slice:nth-of-type(3) { stroke: #d69e2e; opacity: 0.85; }
.bfsp-stats-card-pie .bfsp-mini-pie-slice:nth-of-type(4) { stroke: #38a169; opacity: 0.85; }
.bfsp-stats-card-pie .bfsp-mini-pie-slice:nth-of-type(5) { stroke: #3182ce; opacity: 0.85; }
.bfsp-stats-card-pie .bfsp-mini-pie-slice:nth-of-type(6) { stroke: #805ad5; opacity: 0.9; }
.bfsp-stats-card-pie .bfsp-mini-pie-slice:nth-of-type(7) { stroke: #d53f8c; opacity: 0.9; }

/* Trend indicator card */
.bfsp-stats-card-trend .bfsp-trend-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.bfsp-trend-icon {
    font-size: 1.3rem;
}

.bfsp-trend-up .bfsp-trend-icon {
    color: #38a169;
}

.bfsp-trend-down .bfsp-trend-icon {
    color: #e53e3e;
}

.bfsp-trend-flat .bfsp-trend-icon {
    color: #718096;
}

/* Stacked class distribution bar */
.bfsp-stats-card-stacked .bfsp-stacked-bar {
    display: flex;
    width: 100%;
    height: 16px;
    border-radius: 999px;
    overflow: hidden;
    background: #edf2f7;
    margin-top: 0.4rem;
}

.bfsp-stacked-seg {
    display: block;
    position: relative;
}

.bfsp-stacked-seg-inner {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

.bfsp-stacked-seg-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    color: #1a202c;
    white-space: nowrap;
}

/* Simple color scheme by class label */
.bfsp-stacked-class-a .bfsp-stacked-seg-inner,
.bfsp-stacked-class-a-b .bfsp-stacked-seg-inner {
    background: #3182ce;
}
.bfsp-stacked-class-b .bfsp-stacked-seg-inner {
    background: #38a169;
}
.bfsp-stacked-class-c .bfsp-stacked-seg-inner {
    background: #dd6b20;
}
.bfsp-stacked-unknown .bfsp-stacked-seg-inner {
    background: #a0aec0;
}

/* Column chart for months */
.bfsp-stats-card-columns .bfsp-mini-columns {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    padding: 4px 2px 0;
}

.bfsp-mini-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.65rem;
}

.bfsp-mini-col-bar {
    width: 70%;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(to top, #2b6cb0, #63b3ed);
}

.bfsp-mini-col-count {
    margin-top: 2px;
    font-size: 0.7rem;
    color: #2d3748;
}

.bfsp-mini-col-label {
    margin-top: 1px;
    color: #718096;
}

/* Heatmap: month x time of day */
.bfsp-stats-card-heatmap .bfsp-heatmap {
    margin-top: 0.3rem;
    overflow-x: auto;
}

.bfsp-heatmap-header,
.bfsp-heatmap-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(40px, 1fr);
    align-items: center;
    column-gap: 2px;
    font-size: 0.7rem;
}

.bfsp-heatmap-header {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 4px;
}

.bfsp-heatmap-corner {
    width: 70px;
}

.bfsp-heatmap-col-label {
    text-align: center;
}

.bfsp-heatmap-row {
    margin-bottom: 2px;
}

.bfsp-heatmap-row-label {
    width: 70px;
    font-weight: 500;
    color: #4a5568;
}

.bfsp-heatmap-cell {
    text-align: center;
    padding: 2px 0;
    border-radius: 2px;
    background: rgba(56, 161, 105, var(--bfsp-heat, 0));
    color: #1a202c;
}

.bfsp-heatmap-cell[data-count="0"] {
    background: #edf2f7;
    color: #a0aec0;
}
