/* CSS overrides for lic_manager */
body {
    /* Background handled by bootstrap bg-light */
}

/* Make sure the login card is neatly centered */
#loginbox {
    margin-top: 10vh;
}

#loginbox .card {
    border-radius: 12px;
}

#loginbox .input-group-text {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

#loginbox .form-control {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

#loginbox .btn-primary {
    border-radius: 8px;
    transition: all 0.3s ease;
}

#loginbox .btn-primary:hover {
    background-color: #004085 !important;
    border-color: #004085 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 86, 179, 0.2);
}

/* Make material icons look better in inputs */
.material-icons.align-middle {
    font-size: 20px;
}

/* Navbar active states */
.nav-item .nav-link {
    color: #495057 !important;
    transition: color 0.2s ease;
}

.nav-item .nav-link:hover {
    color: #0056b3 !important;
}

.nav-item .nav-link.text-danger:hover {
    color: #bd2130 !important;
}

/* Toggle Sidebar layout styling */
#wrapper {
    overflow-x: hidden;
    display: flex;
    background-color: #f8f9fa;
    min-height: 100vh;
}

#sidebar-wrapper {
    min-height: calc(100vh - 65px);
    margin-left: -16rem;
    transition: margin .25s ease-out;
    background-color: #002b5c !important; /* Rich corporate royal navy blue */
    width: 16rem;
    z-index: 1040; /* High z-index to overlap the sticky top navbar */
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

#sidebar-wrapper .list-group {
    width: 16rem;
}

#sidebar-wrapper .list-group-item {
    background-color: transparent !important;
    color: #aeb9c2 !important;
    border: none;
    padding: 14px 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.2s ease-in-out;
    border-left: 4px solid transparent;
}

#sidebar-wrapper .list-group-item i {
    margin-right: 12px;
    font-size: 20px;
    color: #7f8c8d;
    transition: all 0.2s ease-in-out;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: #00336f !important; /* Corporate cobalt hover background */
    color: #ffffff !important;
    text-decoration: none !important; /* Suppress global link underline */
}

#sidebar-wrapper .list-group-item:hover i {
    color: #ffffff;
}

#sidebar-wrapper .list-group-item.active {
    background-color: #003e80 !important; /* Corporate active blue background */
    color: #ffffff !important;
    border-left: 4px solid #00c0ff; /* Bright cyan brand accent pop */
    text-decoration: none !important; /* Suppress global link underline */
}

#sidebar-wrapper .list-group-item.active i {
    color: #00c0ff;
}

/* Ensure no text-decoration ever gets applied to sidebar anchors */
#sidebar-wrapper a, 
#sidebar-wrapper a:hover, 
#sidebar-wrapper a:focus, 
#sidebar-wrapper a:active {
    text-decoration: none !important;
}

#page-content-wrapper {
    min-width: 100vw;
    transition: all .25s ease-out;
    background-color: #f8f9fa;
}

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

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

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


/* Custom Header Styling - 100% Robust */
.custom-top-header {
    height: 65px !important;
    background-color: #002b5c !important; /* Rich corporate royal navy blue */
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1050 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    padding: 0 20px !important;
}

/* Header Title - High Visibility */
.header-title {
    color: rgba(255, 255, 255, 0.75) !important; /* Light white/grey, extremely visible */
    font-weight: 700 !important;
    font-size: 13px !important;
    letter-spacing: 0.8px !important;
    margin-right: 24px !important;
    text-transform: uppercase !important;
}


/* Mathematically precise Left & Right wrapper groups */
.header-left-group {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.header-right-group {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

/* Toggle button styling with absolute priority override */
button.header-toggle-btn, .header-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    margin: 0 15px 0 0 !important; /* Exact spacing from the logo */
    outline: none !important;
    box-shadow: none !important;
}

button.header-toggle-btn:hover, .header-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.05) !important;
}

button.header-toggle-btn:active, .header-toggle-btn:active {
    transform: scale(0.95) !important;
}

button.header-toggle-btn i, .header-toggle-btn i {
    font-size: 24px !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mathematically centered white logo box */
.header-logo-container {
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ffffff !important;
    padding: 0 12px !important; /* Zero vertical padding, mathematically centers the image */
    border-radius: 6px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.header-logo-container img {
    height: 22px !important; /* Mathematically safe logo image height */
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    object-fit: contain !important;
}

/* Logout button styling with absolute priority override */
a.header-logout-btn, .header-logout-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 38px !important; /* Explicit centering height */
    padding: 0 16px !important; /* Zero vertical padding, mathematically centered */
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    background-color: #dc3545 !important;
    border: none !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    box-sizing: border-box !important;
}

a.header-logout-btn:hover, .header-logout-btn:hover {
    background-color: #c82333 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(220, 53, 69, 0.2) !important;
}

a.header-logout-btn i, .header-logout-btn i {
    font-size: 20px !important;
    color: #ffffff !important;
    margin: 0 4px 0 0 !important;
}

/* Ensure no margins or paddings conflict with top header */
body {
    margin-top: 0 !important;
    padding-top: 0 !important;
}





