body {
    background-color: #f4f6f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* Navbar Styling */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 20px;
}

.navbar-brand img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 10px;
}

.navbar-brand span {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.nav-link {
    font-weight: 600;
    font-size: 0.85rem;
    color: #6c757d !important;
    margin: 0 5px;
    text-transform: uppercase;
}

.nav-link.active {
    color: #333 !important;
    border: 1px solid #bba337;
    border-radius: 20px;
    padding: 5px 15px !important;
}

.btn-sensei {
    border: 1px solid #bba337;
    color: #555;
    font-weight: 600;
    border-radius: 20px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
}

/* Top Toolbar */
.toolbar {
    background-color: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 25px;
}

/* Updated Date Picker Styling */
.date-picker {
    font-size: 0.85rem;
    color: #555;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    padding: 5px 10px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.date-picker:focus {
    border-color: #a69221;
    box-shadow: 0 0 0 0.2rem rgba(166, 146, 33, 0.25);
    background: #fff;
}

/* Apply Button Styling */
.btn-apply {
    background-color: #a69221;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.btn-apply:hover {
    background-color: #8a791a;
    color: white;
}

.search-input {
    border: none;
    outline: none;
    font-size: 0.9rem;
    width: 150px;
}

.search-wrapper {
    border-bottom: 1px solid #ccc;
    padding-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #888;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    height: 100%;
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 15px;
}

/* KPI Cards */
.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #222;
}

.kpi-icon {
    font-size: 2rem;
    color: #b18ced;
}

.segregation-icon {
    color: #b18ced;
    font-size: 1.2rem;
    margin-right: 2px;
}

.segregation-icon.female {
    color: #8cc4a4;
}

.segregation-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

/* Charts styling */
.chart-container {
    position: relative;
    height: 220px;
    width: 100%;
}

/* 1. Ensure the Drupal layout region uses flex so its children can stretch */
.layout--fourcol-section .layout__region {
    display: flex;
    flex-direction: column;
}

/* 2. Force the nested Drupal blocks, padding div, and Card to fill the 100% height */
.layout--fourcol-section .block-kphpuae-webforms,
.layout--fourcol-section .block-kphpuae-webforms>.p-2,
.layout--fourcol-section .block-kphpuae-webforms .card {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* 3. (Optional) Push the numbers and icons to the bottom so they align perfectly horizontally */
.layout--fourcol-section .block-kphpuae-webforms .card-body {
    display: flex;
    flex-direction: column;
}

.layout--fourcol-section .block-kphpuae-webforms .card-body>.d-flex.mt-2 {
    margin-top: auto !important;
}

/* 1. Normalize the Bootstrap Grid and Gutters */
.layout--threecol-section,
.layout--fourcol-section {
    margin-bottom: 0 !important;
}

/* 2. Standardize all Dashboard Cards */
.block-sdact-dashboard .card {
    margin-bottom: 15px !important;
    /* Consistent gap between blocks */
    height: 100% !important;
    /* Ensure registration and wellbeing blocks align */
}

/* 3. Remove the gap between stacked Transparency blocks (Red Box 1) */
[id^="block-sdact-dashboard-transparency-screening"] {
    margin-bottom: 0 !important;
}

[id^="block-sdact-dashboard-transparency-responses"] .card {
    margin-top: -10px !important;
    /* Pulls the second chart up into the canvas area */
}

/* 4. Fix Internal Padding */
.card-body {
    padding: 1rem !important;
    /* Reduces large internal gaps */
}

/* 5. Standardize Canvas Container Heights */
.chart-container {
    height: 280px !important;
    /* Standardize for all 3 columns */
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Standardize all card heights to ensure alignment across columns */
.block-sdact-dashboard .card,
.block-kphpuae-webforms .card {
    height: 100% !important;
    margin-bottom: 15px !important;
    /* Uniform gap for all other blocks */
}

/* Pull the second transparency chart closer to the first */
.block-sdact-dashboard-transparency-responses-pie-block {
    margin-top: -15px !important;
}


/* Standardize chart canvas heights for Registrations, Wellbeing, Worries, and Hobbies */
.chart-container,
[id^="chart"] {
    height: 280px !important;
    /* Consistent height for bar charts */
    width: 100%;
    position: relative;
}

/* Adjust card body padding to prevent stretching */
.card-body {
    padding: 1.25rem !important;
}


/* --- Header Logo Alignment --- */

/* Ensure the branding region aligns left and doesn't center */
.region-nav-branding {
    flex: 0 1 auto !important;
    display: flex !important;
    justify-content: flex-start !important;
    padding-left: 0 !important;
}

/* Force the navbar container to spread items to the edges */
header .navbar .container {
    display: flex !important;
    justify-content: space-between !important;
    max-width: 100% !important;
    padding: 0 30px !important;
}

/* Logo specific sizing to match image_2163c1.png */
.adminLogo {
    height: 55px !important;
    /* Slightly taller for the circular logo */
    width: auto;
}

.siteLogo img {
    height: 60px !important;
    /* Matches the text-based logo height */
    width: auto;
}

/* Remove default Bootstrap margins that might cause shifting */
.navbar-brand {
    margin-right: 0 !important;
}

/* --- Navigation Menu Items --- */
/* Matching the 'old header' link style */
.menu--account ul.nav {
    gap: 15px;
}

.menu--account .nav-link {
    font-weight: 500;
    color: #333 !important;
    font-size: 0.9rem;
    text-transform: uppercase;
}

#block-sdact-page-title {
    margin-top: 0 !important;
    padding-top: 10px !important;
}

#block-sdact-page-title h1 {
    margin-bottom: 5px !important;
    font-weight: 700;
    color: #212529;
}
