/* ===========================================================
   🌟 DBT DASHBOARD THEME — FINAL UNIQUE & OPTIMIZED VERSION
   Author: Sanjay Chaudhary
   =========================================================== */

/* ======= GLOBAL RESET ======= */
body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: #eef2f7;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: scroll;
}

header {
    background: #812286;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

header .datetime {
    font-weight: bold;
    letter-spacing: 1px;
    padding-left: inherit;
}

/* ==========================================================
       SECTION HEADER (HR Capacity Building)
        ========================================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #bcbcbc;
    padding: 10px 20px;
    border-radius: 12px;
    margin: 20px 40px 0;
    font-family: "Segoe UI", Arial, sans-serif;
}

.left-items {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    flex-grow: 1;
}

.right-links a {
    color: #0047FF;
    font-weight: 600;
    text-decoration: none;
    margin-left: 6px;
}

.right-links a:hover {
    text-decoration: underline;
}

/* ==========================================================
       MAIN CONTENT
        ========================================================== */
.main-content {
    min-height: 400px;
    padding: 40px;
    text-align: center;
    background: #fff;
    color: #444;
    border-radius: 8px;
    margin: 20px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ==========================================================
       FOOTER SECTION
        ========================================================== */
footer {
    background: #1b1b1b;
    color: #bbb;
    font-size: 14px;
    text-align: center;
    padding: 20px 10px;
}

footer a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    color: #fff;
}

.nic-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f0f0f;
    color: #888;
    padding: 10px 30px;
    font-size: 13px;
    border-top: 1px solid #222;
}

.nic-strip img {
    height: 35px;
}

/* ==== TABLE WRAPPER ==== */
.dash-table-wrapper {
    /* margin: 30px auto; */
    margin: 20px 40px;
    max-width: 95%;
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    font-family: "Segoe UI", Arial, sans-serif;
}

/* ==== TABLE ==== */
.dash-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.dash-table th,
.dash-table td {
    padding: 10px 14px;
    text-align: center;
    border-bottom: 1px solid #eaeaea;
    font-size: 14px;
}

/* ==== HEADER ==== */
.dash-table thead th {
    background: linear-gradient(to right, #3a73ff, #7aa8ff);
    color: #fff;
    font-weight: 600;
    text-transform: capitalize;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ==== BODY ==== */
.dash-table tbody tr:nth-child(even) {
    background: #f7f9fc;
}

.dash-table tbody tr:hover {
    background: #e9f1ff;
    transition: 0.2s ease;
}

/* ==== FIRST COLUMN ==== */
.dash-table td:first-child {
    font-weight: 600;
    color: #333;
}

.section-header-bar {
    background: #e6f4e7;
    /* light green shade */
    border-radius: 10px;
    text-align: center;
    /* padding: 10px 0; */
    margin: 20px 40px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: bold;
    color: #111;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ==========================================================
       FILTER BAR (Graph Filter Section)
        ========================================================== */
.filter-bar {
    background: #7d9b99;
    padding: 10px 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 47px;
    flex-wrap: wrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    margin: 20px 40px;
}

.filter-bar select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #fff;
    font-size: 14px;
    min-width: 140px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-bar select:focus {
    border-color: #005fff;
}

.label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

.label img {
    width: 16px;
    height: 16px;
}

.btn {
    background: #001aff;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 18px;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background: #0034ff;
    transform: translateY(-1px);
}

/* ======= TOP BANNER (Animated Header) ======= */
.dbt-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: linear-gradient(90deg, #812286, #4d4bb3);
    color: #fff;
    padding: 18px 36px;
    width: 100%;
    box-sizing: border-box;
    animation: dbtBannerMove 8s ease-in-out infinite;
    background-size: 200% 200%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

@keyframes dbtBannerMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ======= LEFT SIDE (Emblem + Text) ======= */
.dbt-banner-left {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #fff;
    cursor: pointer;
}

.dbt-banner-left img {
    height: 85px;
    width: auto;
    flex-shrink: 0;
}

.dbt-banner-dept {
    text-align: left;
}

.dbt-banner-dept h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.dbt-banner-dept h2 {
    margin: 4px 0 0;
    font-size: 15px;
    font-weight: 400;
    color: #ddd;
}

/* ======= RIGHT SIDE (Logos) ======= */
.dbt-banner-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dbt-banner-right img {
    height: 56px;
    width: auto;
}

/* ======= DASHBOARD GRID ======= */
.dbt-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
    padding: 40px;
    align-content: start;
    min-height: calc(100vh - 250px);
}

/* ======= DASHBOARD CARD ======= */
.dbt-card {
    position: relative;
    border-radius: 16px;
    padding: 22px;
    color: #fff;
    text-align: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    background: linear-gradient(135deg, #777, #555);
}

.dbt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.dbt-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.dbt-card .dbt-number {
    font-size: 30px;
    margin: 10px 0;
    font-weight: bold;
}

.dbt-card .dbt-footer {
    font-size: 14px;
    opacity: 0.9;
}

.dbt-card .dbt-more {
    position: absolute;
    bottom: 10px;
    right: 15px;
    color: #fff;
    font-size: 12px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.dbt-card .dbt-more:hover {
    opacity: 0.8;
}

/* ======= CARD COLOR THEMES ======= */
.dbt-orange {
    background: linear-gradient(135deg, #ffb878, #ff8143);
}

.dbt-blue {
    background: linear-gradient(135deg, #7aa8ff, #3a73ff);
}

.dbt-green {
    background: linear-gradient(135deg, #5add92, #28b463);
}

.dbt-pink {
    background: linear-gradient(135deg, #ff97d4, #f54ba3);
}

.dbt-brown {
    background: linear-gradient(135deg, #d4a47c, #b47a3c);
}

.dbt-purple {
    background: linear-gradient(135deg, #b388eb, #8e44ad);
}

.dbt-teal {
    background: linear-gradient(135deg, #6bcaba, #1abc9c);
}

/* ======= SECTION HEADER & FILTER BAR ======= */
.dbt-section-header,
.dbt-filter-bar {
    width: 65vw;
    margin: 10px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

/* ======= NIC STRIP (Above Footer) ======= */
.dbt-nic-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #812286, #4d4bb3);
    color: #fff;
    padding: 10px 30px;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.dbt-nic-strip .dbt-left-text {
    text-align: left;
}

.dbt-nic-strip .dbt-right-logo img {
    height: 35px;
}

/* ======= FOOTER ======= */
footer.dbt-footer {
    background: linear-gradient(90deg, #5a178f, #4d4bb3);
    color: #fff;
    text-align: center;
    padding: 20px 10px;
    font-size: 14px;
    margin-top: auto;
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.2);
}

footer.dbt-footer a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer.dbt-footer a:hover {
    color: #fff;
}

/* ======= RESPONSIVE DESIGN ======= */
@media (max-width: 1200px) {
    .dbt-dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 22px;
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .dbt-banner {
        flex-direction: column;
        text-align: center;
        padding: 14px 18px;
        gap: 10px;
    }

    .dbt-banner-left {
        flex-direction: column;
        text-align: center;
    }

    .dbt-banner-left img {
        height: 70px;
    }

    .dbt-banner-right img {
        height: 46px;
    }

    .dbt-banner-dept h1 {
        font-size: 18px;
    }

    .dbt-dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
        padding: 20px;
    }

    .dbt-card .dbt-number {
        font-size: 24px;
    }

    .dbt-nic-strip {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .dbt-dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .dbt-card h3 {
        font-size: 16px;
    }

    .dbt-card .dbt-number {
        font-size: 22px;
    }
}

/* ======= ACCESSIBILITY / PREFERS REDUCED MOTION ======= */
@media (prefers-reduced-motion: reduce) {
    .dbt-banner {
        animation: none;
    }
}

/* Fix table borders for DataTables */
table.dataTable {
    border-collapse: collapse !important;
    width: 100%;
}

table.dataTable th,
table.dataTable td {
    border: 1px solid #d0d0d0 !important;
    padding: 8px 12px;
    vertical-align: middle;
}

table.dataTable thead th {
    background-color: #f2f6ff;
    font-weight: 600;
    border-bottom: 2px solid #a5b3d0 !important;
}

table.dataTable tbody tr:nth-child(even) {
    background-color: #fafafa;
}

table.dataTable tbody tr:hover {
    background-color: #f1f7ff;
}

table.dataTable.no-footer {
    border-bottom: 2px solid #a5b3d0 !important;
}

/* Optional: spacing for pagination info */
.dataTables_wrapper .dataTables_info {
    margin-top: 5px;
    font-size: 13px;
}



/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {

    .dash-table th,
    .dash-table td {
        font-size: 12px;
        padding: 8px;
    }
}

/* ==========================================================
       RESPONSIVE DESIGN
        ========================================================== */
@media (max-width: 768px) {
    .top-banner {
        flex-direction: column;
        text-align: center;
    }

    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
        margin: 15px;
    }

    .main-content {
        margin: 15px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin: 15px;
    }

    .nic-strip {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}