smallhtml {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 0;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --sidebar-width: 250px;
    --sidebar-bg: #454545;
    --header-height: 60px;
    --sidebar-collapsed-width: 70px;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: white;
    padding: 18px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: scroll; 
    overflow-x: hidden;    
    scrollbar-width:  none; 
}

    /* Collapsed Sidebar */
    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
        overflow: hidden scroll;
    }

        .sidebar.collapsed .brand-text,
        .sidebar.collapsed .sidebar-header span:not(.badge),
        .sidebar.collapsed .sidebar-date,
        .sidebar.collapsed .nav-item .text-uppercase,
        .sidebar.collapsed .nav-link span:not(.badge) {
            display: none;
        }

        .sidebar.collapsed .nav-link {
            justify-content: center;
            padding: 11px 4px;
        }

            .sidebar.collapsed .nav-link i {
                margin-right: 0;
                font-size: 1.2rem;
            }

        .sidebar.collapsed .sidebar-header {
            justify-content: center;
        }

            .sidebar.collapsed .sidebar-header i {
                margin-right: 0;
            }

        .sidebar.collapsed hr {
            margin: 10px 5px;
        }

        /* Tooltip for collapsed sidebar items */
        .sidebar.collapsed .nav-link {
            position: relative;
        }

            .sidebar.collapsed .nav-link::after {
                content: attr(title);
                position: absolute;
                left: 100%;
                top: 50%;
                transform: translateY(-50%);
                background: #333;
                color: white;
                padding: 6px 12px;
                border-radius: 4px;
                white-space: nowrap;
                opacity: 0;
                visibility: hidden;
                transition: opacity 0.3s;
                font-size: 0.875rem;
                z-index: 1000;
                margin-left: 10px;
                pointer-events: none;
            }

            .sidebar.collapsed .nav-link:hover::after {
                opacity: 1;
                visibility: visible;
            }

/* Sidebar Elements */
.sidebar-header {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.sidebar-date {
    font-size: 0.8rem;
    margin-bottom: 30px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

    .sidebar .nav-link:hover,
    .sidebar .nav-link.active {
        color: white;
        background-color: rgba(255, 255, 255, 0.1);
    }

.sidebar-footer {
    display: flex;
    justify-content: center;
    padding-top: 20px;
}

/* Image Size Control */
.image-small {
    height: 100px;
    width: 120px;
    transition: all 0.4s ease;
    object-fit: contain;
}

.image-small-owt {
    height: 60px;
    width: 70px;
    transition: all 0.4s ease;
    object-fit: contain;
    display: block;
    margin: -35px auto 0 auto; /* Adjust -15px to match exact spacing */
}

/* When toggle is checked (blue theme), make image smaller */
.sidebar.collapsed .image-small {
    height: 40px; /* Smaller height */
    width: 40px; /* Smaller width */
    opacity: 0.8;
}

/* Hamburger Toggle Button */
.hamburger-toggle {
    position: absolute;
    right: -15px;
    top: 10px;
    background: white;
    color: black;
    border: 2px solid white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display:  flex ;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

    .hamburger-toggle:hover {
        background: #595959;
        transform: scale(1.05);
        color: white;
    }

.body-blue-bg .hamburger-toggle:hover {
    background: #0D6EFD;
    transform: scale(1.05);
    color: white;
}

.sidebar.collapsed .hamburger-toggle {
    margin: 2px;
    transform: rotate(0deg);
    position: unset;
    width: 30px;
    height: 30px;
    background: white;
    color: black;
}

    .sidebar.collapsed .hamburger-toggle:hover {
        transform: rotate(0deg) scale(1.05);
        background: #595959;
        color: white;
    }

.body-blue-bg .sidebar.collapsed .hamburger-toggle:hover {
    transform: rotate(0deg) scale(1.05);
    background: #0D6EFD;
    color: white;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    padding-bottom: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

    .main-content.collapsed {
        margin-left: var(--sidebar-collapsed-width);
    }

    /* Let the page content grow so the footer stays at the bottom */
    .main-content > main {
        flex: 1 0 auto;
    }

/* Scrollable table body (~10 visible rows) with sticky header */
.table-scroll {
    max-height: 600px;
    overflow-y: auto;
}

    .table-scroll thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background-color: #212529; /* matches .table-dark */
    }

/* Top Header */
.top-header {
    background-color: #e9ecef;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    margin-left: 5px;
    margin-right: 5px;
    padding-left: 40px;
    padding-right: 40px;
    border-radius:5px;
}

.footer {
    background-color: #e9ecef;
}

    /* Adjust top header when sidebar is collapsed */
    .main-content.collapsed .top-header {
    margin-left: calc(var(--sidebar-collapsed-width) - 65px);
}

/* Cards */
.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 100%;
    border-left: 5px solid transparent;
}

.dashboard-card-one {
    border-radius: 8px;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 100%;
    border-left: 2px solid transparent;
}


    .dashboard-card.blue {
        border-left-color: #0D6EFD;
    }

    .dashboard-card.cyan {
        border-left-color: #0dcaf0;
    }

    .dashboard-card.green {
        border-left-color: #198754;
    }

    .dashboard-card.yellow {
        border-left-color: #ffc107;
    }

.card-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: bold;
    margin-bottom: 10px;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    color: #212529;
}

.card-icon {
    font-size: 2rem;
    color: #dee2e6;
    float: right;
    margin-top: -40px;
}

.animated-glow {
    color: #fff;
    animation: pulse-glow 2s infinite alternate;
    /* Apply the animation */
}

@keyframes pulse-glow {
    0% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.8), 0 0 10px #1B6FC9, 0 0 20px #1B6FC9;
    }

    100% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.8), 0 0 15px #1B6FC9, 0 0 25px #1B6FC9;
    }
}

.default-avatar {
    width: 200px;
    height: 200px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
}
