/* main container */
.dashboard {
    max-width: 1300px;
    margin: 0 auto;
}

/* header section with crisp modern style */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e9f2;
    padding-bottom: 0.75rem;
}

/* --- NEW: Logo + Brand inline --- */
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo img {
    height: 75px;
    width: auto;
    display: block;
    border-right: 2px solid #e2e9f2;
    padding-right: 20px;
}

.brand h1 {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1F3A5F, #2D5A7B);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 0.2rem;
}

.brand p {
    font-size: 0.85rem;
    color: #5c6f87;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.logo-text {
    line-height: 1.2;
}

.logo-text .org {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #1F3A5F, #2D5A7B);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin: 0;
}

.logo-text .tagline {
    font-size: 0.7rem;
    color: #5c6f87;
    font-weight: 500;
    letter-spacing: 0.2px;
    margin: 0;
}

.brand-divider {
    width: 1px;
    height: 40px;
    background: #e2e9f2;
    margin: 0 0.25rem;
}

.site-badge {
    background: #f0f4fa;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1f3a5f;
    white-space: nowrap;
}

.user-welcome {
    background: white;
    padding: 0.8rem 1.2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    border: 1px solid #e0e8f0;
    color: #1f3a5f;
    white-space: nowrap;
}

.user-welcome span {
    font-weight: 400;
    color: #2c5a7a;
}

/* stat cards grid - "highlighted red areas" as requested but with elegant crimson accents */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
    margin-bottom: 3rem;
    justify-content: space-between;
}

/* each aggregate box */
.stat-card {
    /*flex: 1;*/
    min-width: 180px;
    background: #ffffff;
    border-radius: 28px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02), 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #ecf3fa;
    backdrop-filter: blur(0px);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.1);
    border-color: #ffe0e0;
}

.dropdown-card {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
}

.site-selector {
    width: 100%;
    background: #fffdf9;
    border: 1.5px solid #ffe0cc;
    border-radius: 48px;
    padding: 0.7rem 1rem;
    font-family: 'Inter', monospace;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2d3e5c;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
    text-align: center;
    text-align-last: center;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23c55a2a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.site-selector:hover {
    border-color: #e07c4a;
    background-color: white;
}

/* highlight red area: using deep red / crimson for numbers + accent border */
.stat-highlight {
    background: linear-gradient(145deg, #fff9f9, #ffffff);
    border-top: 4px solid #e03a3a;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #5b6e8c;
    margin-bottom: 0.7rem;
}

.stat-number {
    font-size: 3.3rem;
    font-weight: 800;
    line-height: 1.1;
    color: #c52a2a;   /* vibrant red for high visibility */
    text-shadow: 0 1px 1px rgba(0,0,0,0.02);
    letter-spacing: -0.02em;
}

.stat-unit {
    font-size: 1rem;
    font-weight: 500;
    color: #b13b3b;
    margin-left: 2px;
}

.stat-sub {
    font-size: 0.75rem;
    color: #7e8b9f;
    margin-top: 0.6rem;
    font-weight: 500;
}

/* site selection & table area */
.site-section {
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid #eef3fc;
    overflow: hidden;
    margin-top: 1rem;
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: #fbfdff;
    border-bottom: 1px solid #eef2f8;
}

.site-header h3 {
    font-weight: 700;
    font-size: 1.3rem;
    color: #1f3a5f;
    letter-spacing: -0.2px;
}

.site-header h3 small {
    font-weight: 400;
    font-size: 0.8rem;
    background: #f0eef9;
    padding: 0.2rem 0.7rem;
    border-radius: 40px;
    margin-left: 0.8rem;
    color: #4e6580;
}

.select-dropdown {
    background: #f8fafd;
    border: 1px solid #dce5ef;
    border-radius: 60px;
    padding: 0.5rem 1.2rem;
    font-family: 'Inter', monospace;
    font-weight: 500;
    font-size: 0.9rem;
    color: #1e2f44;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
}

.select-dropdown:hover {
    border-color: #cbdae6;
    background: white;
}

/* table wrapper */
.table-wrapper {
    overflow-x: auto;
    padding: 0 0 1.5rem 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 550px;
}

.data-table th {
    text-align: left;
    padding: 1.2rem 1.5rem;
    background-color: #fafcff;
    font-weight: 600;
    color: #2b4b74;
    border-bottom: 1px solid #e6edf4;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f4fa;
    color: #2d4259;
    font-weight: 500;
}

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

.data-table tr:hover td {
    background-color: #fef8f0;
}

.site-name {
    font-weight: 700;
    color: #1f3a5f;
}

.badge-number {
    background: #fff0f0;
    color: #b12e2e;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-size: 0.8rem;
    display: inline-block;
}

.insight-note {
    background: #fef7e0;
    margin-top: 2rem;
    padding: 1rem 1.8rem;
    border-radius: 60px;
    font-size: 0.8rem;
    color: #7a6a3a;
    text-align: center;
    border: 1px solid #ffefc0;
}

.highlight-red-area {
    background: #fff0f0;
    padding: 0.65rem 1.2rem;
    border-radius: 60px;
    border: 1.5px solid #ff4d4d;
    box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.2);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.highlight-red-area label {
    font-weight: 700;
    color: #b91c1c;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    background: #ffe3e3;
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
}

/* custom modern dropdown */
.custom-dropdown {
    background: white;
    border: 1px solid #ffb3b3;
    border-radius: 40px;
    padding: 0.5rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
    min-width: 160px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.custom-dropdown:hover {
    border-color: #e63946;
    background: #fffafa;
}

.custom-dropdown:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.2);
}

/* Target the Highcharts data table container */
.highcharts-data-table {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Table styling */
.highcharts-data-table table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
}

/* Header styling */
.highcharts-data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    border: none;
}

/* Cell styling */
.highcharts-data-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

/* Row hover effect */
.highcharts-data-table tr:hover td {
    background-color: #f5f5f5;
    transition: background-color 0.3s ease;
}

/* Alternate row colors */
.highcharts-data-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.highcharts-data-table tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Caption styling */
.highcharts-data-table caption {
    padding: 10px;
    font-weight: bold;
    background-color: #f0f0f0;
    caption-side: top;
}

footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.7rem;
    color: #8c9ab0;
}

.highcharts-drilldown-axis-label {
    fill: unset!important;
    text-decoration: none!important;
}

.m-25 {
    margin: 25px;
}

ul.pagination {
    display: flex;
    justify-content: center;
    padding-left: 0;
    list-style: none;
    border-radius: 0.25rem;
    padding-left: 20px;
}

@media (max-width: 700px) {
    body {
        padding: 1rem;
    }
    .stat-number {
        font-size: 2.5rem;
    }
    .site-header {
        flex-direction: column;
        align-items: start;
        gap: 0.8rem;
    }
    .stats-grid {
        gap: 1rem;
    }
    .brand {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }
}

.card {
    max-width: 560px;
    width: 100%;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 48px;
    padding: 40px 36px 44px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
}

/* ─── header ─── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tooth-icon {
    font-size: 20px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.15));
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.title {
    font-size: 20px;
    font-weight: 300;
    color: #000000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.title span {
    font-weight: 300;
    opacity: 0.6;
}

.badge-year {
    backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}