/* BISFF Executive Presentation Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    color-scheme: light;
    --fc-surface: #faf8f5;
    --fc-surface-elevated: #ffffff;
    --fc-foreground: #1c1917;
    --fc-foreground-muted: #6b645c;
    --fc-foreground-subtle: #948c82;
    --fc-border: #e6dfd5;
    --fc-border-muted: #f0eae1;
    --fc-brand: #b93b3b;
    --fc-brand-muted: rgba(185, 59, 59, 0.12);
    --fc-success: #2b7d5a;
    --fc-success-muted: rgba(43, 125, 90, 0.14);
    --fc-warning: #c28723;
    --fc-warning-muted: rgba(194, 135, 35, 0.14);
    --fc-info: #2d6fa8;
    --fc-info-muted: rgba(45, 111, 168, 0.14);
    --fc-highlight: #178998;
    --fc-highlight-muted: rgba(23, 137, 152, 0.14);
    --fc-destructive: #b93b3b;
    --fc-destructive-muted: rgba(185, 59, 59, 0.14);
    --fc-overlay: rgba(28, 25, 23, 0.4);
    --fc-brand-badge: #8c2525;
    --fc-brand-badge-bg: #fbe6e4;
    --fc-info-badge: #1d3e66;
    --fc-info-badge-bg: #dbe7f6;
    --fc-warning-badge: #73531a;
    --fc-warning-badge-bg: #faedd2;
    --fc-success-badge: #195034;
    --fc-success-badge-bg: #d6f0e2;
    --fc-highlight-badge: #164a50;
    --fc-highlight-badge-bg: #d2eaee;
    --fc-destructive-badge: #7a2525;
    --fc-destructive-badge-bg: #f8d7d7;
    --fc-neutral-badge: #4a443b;
    --fc-neutral-badge-bg: #f2ece5;
    --fc-star: #d9911e;
    --fc-star-muted: #d0c7ba;
    --lightningcss-light: initial;
    --lightningcss-dark: ;

    --bg: var(--fc-surface);
    --card: var(--fc-surface-elevated);
    --border: var(--fc-border);
    --text: var(--fc-foreground);
    --muted: var(--fc-foreground-muted);
    --muted-dark: var(--fc-foreground-subtle);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/*scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    display: none;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #faf8f5;
    color: var(--text);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100dvh;
    width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* App Header Navigation */
.app-header {
    min-height: 56px;
    padding: 10px 16px;
    background: #ffffff;
    border-bottom: 1px solid var(--fc-border);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 100;
}

.brand-logo-badge {
    background: var(--fc-brand-badge-bg);
    color: var(--fc-brand-badge);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 999px;
    letter-spacing: 0.8px;
    border: 1px solid #f2beba;
}

.brand-title {
    font-size: 14px;
    letter-spacing: 0.3px;
    line-height: 1.35;
    color: var(--fc-foreground-muted);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

.btn-icon {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.btn-icon:hover {
    background: #f7f3ec;
    border-color: #d8cebf;
    transform: translateY(-1px);
}

/* Presentation Container */
.presentation-container {
    flex: 1;
    min-height: 0;
    height: auto;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 14px 14px 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(18px) scale(0.99);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
}

.slide-header {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

}

.slide-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slide-tag {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--fc-brand);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.slide-title {
    font-size: 22px;
    line-height: 1.2;
}

.slide-subtitle {
    font-size: 14px;
    color: var(--muted);
}

.slide-body {
    flex: 1;
    display: flex;
    gap: 12px;
    flex-direction: column;
    min-height: 0;
}

/* Common Layout Components */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

/* Card Styling */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(40, 30, 20, 0.04);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    border-color: #d6cbbe;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* KPI Hero Cards */
.kpi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(40, 30, 20, 0.04);
}


.kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin: 10px 0 4px 0;
    line-height: 1;
}

.kpi-highlight {
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.kpi-sub {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

/* Chart Canvas Wrapper */
.chart-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.turnout-chart-container {
    min-height: 360px;
}

.venue-comparison-chart-container {
    min-height: 380px;
}

.verification-chart-container {
    min-height: 320px;
}

/* Data Tables */
.data-table-wrapper {
    width: 100%;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.data-table th {
    background-color: #f6f2ec;
    color: var(--fc-foreground);
    padding: 12px 10px;
    position: sticky;
    top: 0;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 8px 10px;
    color: var(--fc-foreground);
    border-bottom: 1px solid var(--fc-border-muted);
}

.data-table tbody tr:nth-child(even) {
    background-color: #fdfbf8;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

.badge-success {
    background: var(--fc-success-badge-bg);
    color: var(--fc-success-badge);
    border: 1px solid var(--fc-success-muted);
}

.badge-warning {
    background: var(--fc-warning-badge-bg);
    color: var(--fc-warning-badge);
    border: 1px solid var(--fc-warning-muted);
}

.badge-brand {
    background: var(--fc-brand-badge-bg);
    color: var(--fc-brand-badge);
    border: 1px solid var(--fc-brand-muted);
}

.badge-neutral {
    background: var(--fc-neutral-badge-bg);
    color: var(--fc-neutral-badge);
    border: 1px solid var(--fc-border-muted);
}

.badge-info {
    background: var(--fc-info-badge-bg);
    color: var(--fc-info-badge);
    border: 1px solid var(--fc-info-muted);
}

.badge-highlight {
    background: var(--fc-highlight-badge-bg);
    color: var(--fc-highlight-badge);
    border: 1px solid var(--fc-highlight-muted);
}

.badge-destructive {
    background: var(--fc-destructive-badge-bg);
    color: var(--fc-destructive-badge);
    border: 1px solid var(--fc-destructive-muted);
}

.code-badge {
    background: var(--fc-border-muted);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text);
    font-family: monospace;
    font-size: 13px;
}

.btn-tab {
    background: #ffffff;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tab:hover {
    background: #f7f3ec;
    color: var(--text);
}

.btn-tab.active {
    background: var(--fc-brand-badge-bg);
    color: var(--fc-brand-badge);
    border-color: #f0beba;
    box-shadow: none;
}


/* Footer Controls & Progress */
.app-footer {
    min-height: 56px;
    margin-top: 10px;
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid var(--fc-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.slide-progress-dots {
    display: flex;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.dot {
    width: 9px;
    height: 10px;
    border-radius: 50%;
    background: #e6dfd5;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #ddd5c9;
}

.dot.active {
    background: var(--fc-brand);
    width: 30px;
    border-radius: 5px;
    border-color: var(--fc-brand);
    box-shadow: 0 2px 8px rgba(185, 59, 59, 0.25);
}

.footer-nav-controls {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer-nav-controls .btn-icon {
    min-width: 104px;
    justify-content: center;
}

@media (max-width: 767px) {
    .data-table-wrapper {
        overflow-x: auto;
        overflow-y: auto;
    }

    .data-table.mobile-cards {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 10px;
        font-size: 13px;
    }

    .data-table.mobile-cards thead {
        display: none;
    }

    .data-table.mobile-cards tbody tr,
    .data-table.mobile-cards tbody tr:nth-child(even) {
        display: block;
        background: rgba(255, 255, 255, 0.045);
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
        overflow: hidden;
    }

    .data-table.mobile-cards td {
        display: grid;
        grid-template-columns: minmax(96px, 38%) 1fr;
        align-items: start;
        gap: 10px;
        padding: 10px 12px;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
        line-height: 1.35;
    }

    .data-table.mobile-cards td:last-child {
        border-bottom: none;
    }

    .data-table.mobile-cards td::before {
        content: attr(data-label);
        color: #c8ced9;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.7px;
        text-transform: uppercase;
    }

    .data-table.mobile-cards td .badge {
        justify-self: start;
    }
}

@media (min-width: 768px) {
    .app-header {
        height: 64px;
        padding: 0 20px;
        align-items: center;
        justify-content: space-between;
        flex-direction: row;
        gap: 12px;
    }

    .brand-title {
        font-size: 14px;
    }

    .nav-controls {
        width: auto;
        flex-wrap: nowrap;
        gap: 12px;
    }

    .btn-icon {
        padding: 8px 14px;
        font-size: 13px;
    }

    .slide {
        padding: 22px 24px;
    }

    .slide-title {
        font-size: 26px;
    }

    .slide-body {
        gap: 20px;
    }

    .grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        height: 100%;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .card,
    .kpi-card {
        padding: 20px;
    }

    .kpi-value {
        font-size: 38px;
    }

    .chart-container {
        min-height: 250px;
    }

    .turnout-chart-container {
        min-height: 430px;
    }

    .verification-chart-container {
        min-height: 430px;
    }

    .venue-comparison-chart-container {
        min-height: 460px;
    }

    .app-footer {
        min-height: 56px;
        padding: 8px 20px;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .slide-progress-dots {
        width: auto;
        justify-content: flex-start;
    }

    .footer-nav-controls {
        width: auto;
        justify-content: flex-end;
        gap: 10px;
    }

    .footer-nav-controls .btn-icon {
        min-width: 112px;
    }
}

@media (min-width: 1120px) {
    .slide {
        padding: 28px 40px;
    }

    .slide-title {
        font-size: 28px;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .turnout-chart-container {
        min-height: 470px;
    }

    .verification-chart-container {
        min-height: 470px;
    }

    .venue-comparison-chart-container {
        min-height: 500px;
    }
}

/* Zero Check-ins Compact Section (Slide 8) */
.zero-checkins-section {
    margin-top: 10px;
    background: #fbf8f4;
    border: 1px solid var(--fc-border-muted);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.zero-checkins-label {
    font-size: 11.5px;
    font-weight: 700;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--fc-destructive);
    white-space: nowrap;
}

.zero-checkins-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    align-items: center;
}

.zero-checkin-tag {
    background: #ffffff;
    border: 1px solid #e5ded4;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    color: var(--fc-foreground-muted);
    line-height: 1.35;
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.zero-checkin-tag:hover {
    border-color: var(--fc-brand);
    color: var(--fc-foreground);
}