body {
    min-height: 100vh;
    margin: 0;
    background: var(--light-bg);
    overflow-x: hidden;
    padding-bottom: var(--footer-height);
    position: relative;


}

.roboto-regular {
    font-family: "Roboto", serif;
    font-weight: 400;
    font-style: normal;
}

.custom-tabs {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

.nav-tabs {
    border: none;
    gap: 10px;
    padding: 6px;
    background: #f8f9fd;
    border-radius: 12px;
    padding: 12px !important;
}

.nav-link {
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    z-index: -1;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::before {
    transform: translateY(0);
}

.nav-link.active {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* DASHBOARD CARDS*/
/* Apply same glowing gradient style as leave cards */
.dashboard-cards {
    position: relative;
    border: none !important;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    min-height: 150px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-cards:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Decorative glow corners (top-right & bottom-left) */
.dashboard-cards::before,
.dashboard-cards::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 5px;
    transform: rotate(45deg);
    transition: transform 0.35s ease, opacity 0.35s ease;
    z-index: 0;
}

/* top-right soft glow */
.dashboard-cards::before {
    top: -95px;
    right: -95px;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.1);
}

/* bottom-left soft glow */
.dashboard-cards::after {
    bottom: -105px;
    left: -105px;
    width: 200px;
    height: 140px;
    background: rgba(255, 255, 255, 0.1);
}

.dashboard-cards:hover::before {
    transform: translate(-4px, 4px) rotate(45deg) scale(1.05);
    opacity: 0.25;
}

.dashboard-cards:hover::after {
    transform: translate(4px, -4px) rotate(45deg) scale(1.05);
    opacity: 0.3;
}

/* Ensure inner text stays above glow */
.dashboard-cards .card-body {
    position: relative;
    z-index: 1;
}

/* Pulse animation for numbers */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.dashboard-cards span.display-4 {
    animation: pulse 2s infinite;
}

/* Add Bus Tab Styling */
#family-tab {
    background: linear-gradient(135deg, #FF6B6B, #FFE66D);
    color: #fff;
}

#family-tab:not(.active) {
    background: #fff;
    color: #FF6B6B;
}

#family-tab:hover:not(.active) {
    background: linear-gradient(135deg, #FF6B6B, #FFE66D);
    color: #fff;
}

/* Edit Bus Tab Styling */
#family-main-tab {
    background: linear-gradient(135deg, #4E65FF, #92EFFD);
    color: #fff;
}

#family-main-tab:not(.active) {
    background: #fff;
    color: #4E65FF;
}

#family-main-tab:hover:not(.active) {
    background: linear-gradient(135deg, #4E65FF, #92EFFD);
    color: #fff;
}


#high-alert-tab {
    /* Active and Hover State */
    background: linear-gradient(135deg, #E74C3C, #F1C40F);
    /* Red to Yellow/Gold */
    color: #fff;
}

#high-alert-tab:not(.active) {
    /* Inactive State */
    background: #fff;
    color: #E74C3C;
    /* Alert Red border/text when inactive */

}

#high-alert-tab:hover:not(.active) {
    /* Hover Inactive State */
    background: linear-gradient(135deg, #E74C3C, #F1C40F);
    color: #fff;
    /* Alert Red border/text when inactive */

}
/* style for validate tab */ 
#validated-tab {
    /* Active and Hover State */
    background: linear-gradient(135deg, #FC466B, #3F5EFB);
    /* Red to Yellow/Gold */
    color: #fff;
}

#validated-tab:not(.active) {
    /* Inactive State */
    background: #fff;
    color: #FC466B;
    /* Alert Red border/text when inactive */

}

#validated-tab:hover:not(.active) {
    /* Hover Inactive State */
    background: linear-gradient(135deg, #FC466B, #3F5EFB);
    color: #fff;
    /* Alert Red border/text when inactive */

}

/* style for issue, staff, timing tabs */

#issue-main-tab {
    /* Active and Hover State */
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    /* Red to Yellow/Gold */
    color: #fff;
}

#issue-main-tab:not(.active) {
    /* Inactive State */
    background: #fff;
    color:#FF9800;
    /* Alert Red border/text when inactive */

}

#issue-main-tab:hover:not(.active) {
    /* Hover Inactive State */
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    color: #fff;
    /* Alert Red border/text when inactive */

}

#staff-main-tab {
    /* Active and Hover State */
    background: linear-gradient(135deg, #E91E63, #F06292);
    /* Red to Yellow/Gold */
    color: #fff;
}

#staff-main-tab:not(.active) {
    /* Inactive State */
    background: #fff;
    color: #E91E63;
    /* Alert Red border/text when inactive */

}

#staff-main-tab:hover:not(.active) {
    /* Hover Inactive State */
    background: linear-gradient(135deg, #E91E63, #F06292);
    color: #fff;
    /* Alert Red border/text when inactive */

}

#timing-main-tab {
    /* Active and Hover State */
    background: linear-gradient(135deg, #607D8B, #90A4AE);
    /* Red to Yellow/Gold */
    color: #fff;
}

#timing-main-tab:not(.active) {
    /* Inactive State */
    background: #fff;
    color: #607D8B;
    /* Alert Red border/text when inactive */

}

#timing-main-tab:hover:not(.active) {
    /* Hover Inactive State */
    background: linear-gradient(135deg, #607D8B, #90A4AE);
    color: #fff;
    /* Alert Red border/text when inactive */

}

#report-tab {
    background: linear-gradient(135deg, #11998E, #38EF7D);
    color: #fff;
}

#report-tab:not(.active) {
    background: #fff;
    color: #11998E;

}

#report-tab:hover:not(.active) {
    color: #fff;
    background: linear-gradient(135deg, #11998E, #38EF7D);
}

#search-tab {
    background: linear-gradient(135deg, #7F00FF, #E100FF);
    color: #fff;
}

#search-tab:not(.active) {
    background: #fff;
    color: #7F00FF;
}

#search-tab:hover:not(.active) {
    color: #fff;
    background: linear-gradient(135deg, #7F00FF, #E100FF);
}

.tab-icon {
    margin-right: 8px;
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.nav-link:hover .tab-icon {
    transform: rotate(15deg) scale(1.1);
}

.nav-link.active .tab-icon {
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-2px);
    }
}

.tab-content {
    padding: 20px;
    margin-top: 15px;
    background: #fff;
    border-radius: 12px;
    min-height: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.tab-pane {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease-out;
}

.tab-pane.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glowing effect on active tab */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: inherit;
    border-radius: 6px;
    filter: blur(2px);
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.6;
        width: 40%;
    }

    to {
        opacity: 1;
        width: 55%;
    }
}

.modal {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-dialog {
    transition: all 0.3s ease-in-out;
    transform: scale(0.7);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

.modal-content {
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    border: none;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 15px 20px;
    border-bottom: none;
}

.modal-header .modal-title {
    font-weight: 200;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-header .btn-close {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 1;
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e");
    background-size: 30%;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.modal-header .btn-close:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.modal-header .btn-close:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    outline: none;
}

.modal-body {
    padding: 20px;
    background: #f8f9fa;
}

.modal-body p {
    margin-bottom: 10px;
    color: #333;
}

.modal-body p strong {
    color: #2575fc;
}

.modal-body .badge {
    font-size: 0.9em;
    padding: 5px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* chart styles */
.chart-container {
    position: relative;
    width: 100%;
    /* Use aspect-ratio to make height responsive to width */
    aspect-ratio: 16 / 9;
    min-height: 180px;
    max-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;

    display: block;
}

/* Smaller screens: taller charts for readability */
@media (max-width: 768px) {
    .chart-container {
        aspect-ratio: 4 / 3;
        min-height: 220px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        aspect-ratio: 3 / 2;
        min-height: 260px;
    }
}

/* Animate entrance */
@keyframes modalEnter {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal.show .modal-dialog {
    animation: modalEnter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--light-bg);
    overflow-x: hidden;
    padding-bottom: var(--footer-height);
    position: relative;


}

.roboto-regular {
    font-family: "Roboto", serif;
    font-weight: 400;
    font-style: normal;
}

.custom-tabs {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

.nav-tabs {
    border: none;
    gap: 10px;
    padding: 6px;
    background: #f8f9fd;
    border-radius: 12px;
}

.nav-link {
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    z-index: -1;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::before {
    transform: translateY(0);
}

.nav-link.active {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Add Bus Tab Styling */
#family-tab {
    background: linear-gradient(135deg, #FF6B6B, #FFE66D);
    color: #fff;
}

#family-tab:not(.active) {
    background: #fff;
    color: #FF6B6B;
}

#family-tab:hover:not(.active) {
    background: linear-gradient(135deg, #FF6B6B, #FFE66D);
    color: #fff;
}

/* Edit Bus Tab Styling */
#family-main-tab {
    background: linear-gradient(135deg, #4E65FF, #92EFFD);
    color: #fff;
}

#family-main-tab:not(.active) {
    background: #fff;
    color: #4E65FF;
}

#family-main-tab:hover:not(.active) {
    background: linear-gradient(135deg, #4E65FF, #92EFFD);
    color: #fff;
}

.tab-icon {
    margin-right: 8px;
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.nav-link:hover .tab-icon {
    transform: rotate(15deg) scale(1.1);
}

.nav-link.active .tab-icon {
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-2px);
    }
}

.tab-content {
    padding: 20px;
    margin-top: 15px;
    background: #fff;
    border-radius: 12px;
    min-height: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.tab-pane {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s ease-out;
}

.tab-pane.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glowing effect on active tab */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: inherit;
    border-radius: 6px;
    filter: blur(2px);
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.6;
        width: 40%;
    }

    to {
        opacity: 1;
        width: 55%;
    }
}

.modal {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-dialog {
    transition: all 0.3s ease-in-out;
    transform: scale(0.7);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

.modal-content {
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    border: none;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 15px 20px;
    border-bottom: none;
}

.modal-header .modal-title {
    font-weight: 200;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-header .btn-close {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 1;
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e");
    background-size: 30%;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.modal-header .btn-close:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.modal-header .btn-close:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    outline: none;
}

.modal-body {
    padding: 20px;
    background: #f8f9fa;
}

.modal-body p {
    margin-bottom: 10px;
    color: #333;
}

.modal-body p strong {
    color: #2575fc;
}

.modal-body .badge {
    font-size: 0.9em;
    padding: 5px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Animate entrance */
@keyframes modalEnter {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal.show .modal-dialog {
    animation: modalEnter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}