body {
    font-family: 'Poppins', 'Roboto', sans-serif;
    background-color: #fdfdfd;
}

.header-logo {
    max-height: 55px;
    margin-right: 1rem;
}

.export-buttons {
    margin-top: 0.5rem;
}
.table thead {
    background-color: #f0f4f8;
    position: sticky;
}

.table-hover tbody tr:hover {
    background-color: #f2f6fc;
}

.progress-bar.green {
    background-color: #28a745 !important;
}

header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background: #263A57;
    color: #fff;
    border-radius: 25px;
    padding: 9px 15px;
    border: 0;
}

.table thead th {
    background-color: #263A57;
    color: #fff;
    font-weight: 600;
    vertical-align: middle;
}

.bluebg {
    background: #263a57;
    color:#fff;
}

.bluebg .text-muted {
    color:#fff !important;
}

.bg-primary {
background-color: #47c1be91 !important;
}

.topbar {
    padding-bottom: 8px;
}


.overview-card {
    border: 1px solid #e9edf3;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: all 0.2s ease;
    background: #fff;
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.overview-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.overview-label {
    font-size: 14px;
    font-weight: 500;
    color: #7b8aa0;
    line-height: 1.2;
    margin-bottom: 6px;
}

/* The number scales with its card and its own length, so large values (e.g. 5,756,708) never
   get cut off on laptop-width screens while short ones stay at full size (42px max, 20px min).
   The card is a size container; 104px ≈ padding + icon + gap; a digit is ≈ 0.62em wide.
   --chars is the number's length (set by the card template; defaults to 7, e.g. "123,456"). */
.overview-card {
    container-type: inline-size;
}

.overview-card .card-body > :not(.overview-icon) {
    min-width: 0;
}

.overview-number {
    font-size: 42px;
    font-size: clamp(20px, calc((100cqi - 104px) / (var(--chars, 7) * 0.62)), 42px);
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

/* Very narrow cards (e.g. three per row on a tablet): put the icon above the text. */
@container (max-width: 200px) {
    .overview-card .card-body {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .overview-number {
        font-size: clamp(20px, calc((100cqi - 40px) / (var(--chars, 7) * 0.62)), 42px);
    }
}

.overview-subtext {
    font-size: 14px;
    color: #8b98ab;
    line-height: 1.3;
}

.section-label {
    font-size: 11px;
    font-weight: 500;
    color: #8a9eb0;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 12px;
}

.int-card {
    border-radius: 12px;
    padding: 16px 18px;
}

.int-label {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.int-card.amber {
    background: #fef6e7;
    border: 0.5px solid #f5d07a;
}

.int-value {
    font-size: 32px;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 4px;
}

.int-label.amber {
    color: #854f0b;
}

.int-value.a {
    color: #ba7517;
}

.int-card.orange {
    background: #fef0e4;
    border: 0.5px solid #f5b57a;
}

.int-label.orange {
    color: #993c1d;
}

.int-value.o {
    color: #d85a30;
}

.int-card.red {
    background: #fdeaea;
    border: 0.5px solid #f5a5a5;
}

.int-label.red {
    color: #a32d2d;
}

.int-value.r {
    color: #e24b4a;
}
/* Agency social form: platform multi-select pills show a tick only when selected */
.btn-check + .btn .platform-check { display: none; }
.btn-check:checked + .btn .platform-check { display: inline-block; }

/* Agency reporting list tables: compact uppercase header, roomier rows, aligned numbers */
.table-card {
    border-radius: 14px;
    overflow: hidden;
}

.data-table {
    font-size: 0.9rem;
}

.data-table thead th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    white-space: nowrap;
    border-bottom: 0;
}

.data-table tbody td {
    padding: 0.9rem 1rem;
    border-color: #eef1f6;
}

.data-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.data-table .cell-sub {
    font-size: 0.78rem;
    color: #7b8aa0;
    margin-top: 2px;
}

.data-table .unit {
    font-size: 0.72rem;
    color: #8b98ab;
    margin-left: 2px;
}

.data-table .row-chevron {
    color: #b4bfcf;
    transition: transform 0.15s ease, color 0.15s ease;
}

.data-table tbody tr:hover .row-chevron {
    color: #2F80ED;
    transform: translateX(3px);
}

.data-table .tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 999px;
    background: #EAF3FF;
    color: #2F80ED;
    margin: 2px 2px 0 0;
    white-space: nowrap;
}

.data-table .tag-muted {
    background: #f1f3f7;
    color: #5b6b82;
}

.data-table thead tr.group-head th {
    font-size: 0.66rem;
    padding-top: 0.55rem;
    padding-bottom: 0.15rem;
    color: #a9b8cc;
    background-color: #263A57;
}

.data-table .group-divider {
    border-left: 1px solid rgba(123, 138, 160, 0.35);
}

.data-table tfoot td {
    background: #f7f9fc;
    font-weight: 700;
    padding: 0.9rem 1rem;
    border-top: 2px solid #e3e8f0;
    border-bottom: 0;
}

.sentiment-bar {
    display: flex;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: #eef1f6;
}

.sentiment-bar span {
    display: block;
    height: 100%;
}

/* Weekly summary: units in headers, compact week chip, chart strip */
.data-table thead th .th-unit {
    font-size: 0.6rem;
    font-weight: 500;
    opacity: 0.65;
    margin-left: 2px;
}

.week-chip {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #7b8aa0;
    background: #f1f3f7;
    border-radius: 6px;
    padding: 1px 6px;
}

.sentiment-counts {
    display: flex;
    gap: 8px;
    font-size: 0.78rem;
    color: #5b6b82;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sentiment-counts i,
.chart-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}

.chart-row {
    border-top: 1px solid #eef1f6;
}

.chart-cell {
    padding: 1rem 1.25rem 0.75rem;
}

.chart-cell + .chart-cell {
    border-left: 1px solid #eef1f6;
}

@media (max-width: 991.98px) {
    .chart-cell + .chart-cell {
        border-left: 0;
        border-top: 1px solid #eef1f6;
    }
}

.chart-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
}

.chart-subtitle {
    font-size: 0.75rem;
    color: #7b8aa0;
}

.chart-legend {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: #5b6b82;
    white-space: nowrap;
}

.chart-box {
    position: relative;
    height: 190px;
    margin-top: 0.5rem;
}
