:root {
    --navy-900: #0b1220;
    --navy-800: #111c33;
    --navy-700: #16223d;
    --navy-border: #24314d;
    --bg-light: #eef1f6;
    --card-white: #ffffff;
    --border-light: #e2e8f0;
    --text-dark: #1a2233;
    --text-gray: #64748b;
    --accent-red: #e11d48;
    --accent-blue: #2563eb;
    --accent-green: #10b981;
    --accent-amber: #d97706; /* High contrast readable amber */
    --accent-purple: #8b5cf6;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
}

/* ===== CONTENT WRAPPER ===== */
.content-wrap {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 24px 40px;
}

.section-heading {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

/* ===== KPI ROW & CARDS ===== */
.kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.kpi-card {
    background: var(--card-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    width: 220px;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.kpi-card .kpi-label {
    color: var(--text-gray);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-card .kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-top: 2px;
    line-height: 1.1;
}

.kpi-accent {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ===== WHITE CARD & TABLE CONTAINER ===== */
.white-card {
    background: var(--card-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    width: 100%;
}

.feed-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    background: #fff;
}

.feed-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.feed-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* ===== MATRIX TABLE STYLING ===== */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.matrix-table th {
    background: #f8fafc;
    color: var(--text-gray);
    font-weight: 700;
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.matrix-table th.block-title-header {
    width: 160px;
    min-width: 160px;
    text-align: left;
    padding-left: 16px;
    background: #f1f5f9;
}

.matrix-table th.slot-group-header {
    border-bottom: 1px solid #cbd5e1;
    color: var(--text-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

/* Color specific headers */
.matrix-table th.th-done { color: var(--accent-green); min-width: 65px; }
.matrix-table th.th-pending { color: var(--accent-red); min-width: 65px; }
.matrix-table th.th-notfound { color: var(--accent-purple); min-width: 75px; }
.matrix-table th.th-total { color: var(--accent-blue); min-width: 65px; }

.matrix-table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    border-right: 1px solid #f1f5f9;
    white-space: nowrap;
}

.matrix-table tr:hover td {
    background-color: #f8fafc;
}

.block-title {
    text-align: left !important;
    font-weight: 700;
    color: var(--text-dark);
    padding-left: 16px !important;
    background: #fff;
    border-right: 2px solid var(--border-light) !important;
}

/* Cell Badges */
.cell-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.78rem;
    display: inline-block;
    min-width: 36px;
}

.cell-badge.done {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
}

.cell-badge.pending {
    background: rgba(225, 29, 72, 0.1);
    color: var(--accent-red);
}

.cell-badge.not-found{
    background: rgba(217, 119, 6, 0.12);
    color: var(--accent-purple);
}

.cell-badge.total {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-blue);
}

.empty-note {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
}

/* sticky first column so the matrix table stays readable while scrolling */
.matrix-table th.block-title-header, .matrix-table td.block-title {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}
.matrix-table th.block-title-header { background: #f1f5f9; z-index: 3; }

@media (max-width: 991px) {
    .content-wrap { padding: 18px 16px 40px; }
}

@media (max-width: 767px) {
    .content-wrap { padding: 14px 16px 40px; }
    .kpi-row { flex-direction: column; }
    .kpi-card { width: 100%; }
    .matrix-table { font-size: 0.74rem; }
    .matrix-table th, .matrix-table td { padding: 6px 5px; }
    .matrix-table th.block-title-header, .block-title { min-width: 110px; width: 110px; }
    .cell-badge { padding: 3px 6px; font-size: 0.7rem; min-width: 28px; }
}

@media (max-width: 480px) {
    .content-wrap { padding: 12px 12px 40px; }
    .kpi-card .kpi-value { font-size: 1.5rem; }
}