/* Sidebar container */
#sidebar-wrapper {
    background-color: #343a40;
    /* Dark Bootstrap gray */
    border-right: 1px solid #212529;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Sidebar heading */
#sidebar-wrapper .sidebar-heading {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 15px;
}

/* Sidebar links */
#sidebar-wrapper .list-group-item {
    background-color: transparent;
    color: #adb5bd;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s, color 0.2s;
}

#sidebar-wrapper .list-group-item i {
    font-size: 18px;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: #495057;
    color: #fff;
}

/* Active link */
#sidebar-wrapper .list-group-item.active {
    background-color: #0d6efd;
    color: #fff;
}

/* Collapsed sidebar */
#wrapper.toggled #sidebar-wrapper {
    margin-left: -250px;
}

/* Topbar */
.navbar {
    border-bottom: 1px solid #dee2e6;
}

.navbar .nav-link {
    color: #495057;
}

.navbar .nav-link:hover {
    color: #0d6efd;
}

/* ========================= */
/* Dashboard Responsive UI   */
/* ========================= */

/* Grid for stat cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Individual card style */
.dashboard-card {
    flex: 1;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Tables and charts fill space */
.card .table-responsive,
.card canvas {
    width: 100% !important;
}

/* Chart height for large screens */


/* Make main content stretch to bottom */
#page-content-wrapper {
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}


/* for side bar and content style */
#wrapper {
    display: flex;
    width: 100%;
}

#sidebar-wrapper {
    min-width: 250px;
    max-width: 250px;
    transition: all 0.3s;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: -250px;
}

#page-content-wrapper {
    flex: 1;
}

:root {
    --sidebar-width: 250px;
}

/* Responsive breakpoint */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -250px;
        position: fixed;
        z-index: 1000;
        height: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        width: 100%;
        padding: 15px;
    }

    /* Hamburger menu styles */
    .navbar-toggler {
        display: block;
    }

    /* Overlay when sidebar is open on mobile */
    #wrapper.toggled::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
}

/* Responsive table adjustments */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Form responsiveness */
@media (max-width: 576px) {
    .form-group {
        margin-bottom: 1rem;
    }

    input.form-control,
    select.form-control,
    textarea.form-control {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .card {
        margin-bottom: 1rem;
    }
}

/* Improve table responsiveness on mobile */
@media (max-width: 768px) {
    .table-responsive table {
        display: block;
        width: 100%;
    }

    .dataTables_wrapper {
        overflow-x: auto;
    }

    .dataTables_length,
    .dataTables_filter {
        width: 100%;
        float: none;
        text-align: left;
        margin-bottom: 10px;
    }
}


/* footer */
.custom-footer {
    background-color: var(--sidebar-bg, #faf9f9);
    /* same as sidebar */
    color: black;
    padding: 15px 0;
    border-radius: 2px;
    /* rounded top corners */
    position: relative;
    z-index: 5;

}

.custom-footer small {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    opacity: 0.85;
    /* make text a bit softer */
}

@media (max-width: 768px) {
    .custom-footer {
        font-size: 0.8rem;
        padding: 12px 0;
        border-radius: 2px;
    }
}

/* amounts input style */
/* Universal: Larger font inside inputs without enlarging box */
form .form-control,
form input,
form select,
form textarea {
    font-size: 1.2rem;
    /* Larger text */
    font-weight: normal;
    /* Default normal weight */
}

/* Labels slightly bigger for consistency */
form label {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Special rule: amount-related fields bold */
input[name*="amount"],
input[id*="Amount"],
input[id*="claimTotal"],
input[id*="claimInterest"],
input[id*="claimPenalty"],
input[id*="viewPenalty"],
input[id*="viewInterest"],
input[id*="viewTotalPaid"],
input[id*="interestRateInput"],
input[id*="customInterestRateInput"],
input[name*="cash"],
input[name*="payment"] {
    font-weight: bold;
    /* Emphasize numbers */
    font-family: "Roboto Mono", monospace;
    text-align: left;
}




/* settings UI */
.theme-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.theme-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-card.active {
    border: 2px solid #0d6efd;
}







/* Custom responsive notification bar styles */
.navbar-nav {
    flex-direction: row;
}

.notification-dropdown {
    min-width: 300px;
    max-width: 500px;
    max-height: 400px;
    overflow-y: auto;
    white-space: normal;
}

/* Mobile-first responsive adjustments */
@media (max-width: 992px) {
    .notification-dropdown {
        width: 90vw;
        max-width: 90vw;
        left: 5vw !important;
        right: 5vw !important;
        transform: translate(0, 10px) !important;
    }

    .navbar-brand {
        margin-right: 0.5rem;
    }

    .fs-4 {
        font-size: 1.5rem !important;
    }

    .fs-5 {
        font-size: 1.2rem !important;
    }

    .notification-badge {
        font-size: 0.6rem;
        padding: 0.25em 0.5em;
    }

    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem;
    }

    .dropdown-item {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .dropdown-header {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-nav.ms-auto {
        margin-left: auto !important;
    }

    .me-3 {
        margin-right: 0.5rem !important;
    }

    .notification-dropdown {
        min-width: unset;
        width: 95vw !important;
        max-width: 95vw !important;
        left: 2.5vw !important;
        right: 2.5vw !important;
    }

    .dropdown-menu-end {
        left: 0 !important;
        right: 0 !important;
    }

    /* Hide user name on smallest screens */
    .user-name {
        display: none;
    }
}

/* Improve notification dropdown readability */
.notification-item {
    border-left: 3px solid transparent;
    margin-bottom: 0.25rem;
}

.notification-item.overdue {
    border-left-color: #dc3545;
}

.notification-item.nearing {
    border-left-color: #ffc107;
}

/* Better spacing for dropdown items */
.dropdown-item-text {
    line-height: 1.4;
}

/* Make the sidebar toggle more touch-friendly on mobile */
/* @media (max-width: 768px) {
            #sidebarToggleTop {
                padding: 0.5rem;
            }
        } */

/* Notification badge animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.notification-badge {
    animation: pulse 2s infinite;
}



/* custom alert design */

.custom-alert {
    min-width: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-left: 5px solid;
    animation: slideIn 0.4s ease;
    /* removed fadeOut */
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}