td, th {
    padding: 5px 10px!important;
}
/* Main content and navigation */
#private_main {
    padding-left: 201px;
    transition: padding 0.3s linear;
    margin-top: 30px;
}

/* Hide toggler by default and show it only on smaller screens */
#toggler {
    display: none;
}

@media (max-width: 1400px) {
    #private_main {
        padding-left: 0;
    }

    #toggler {
        display: block;
    }
}

.bg-primary-important {
    background-color: rgba(59, 113, 202, 0.2) !important;
    color: #242526!important;
}
.bg-secondary-important {
    background-color: rgba(159, 166, 178, 0.2) !important;
    color: #242526!important;
}
.bg-success-important {
    background-color: rgba(20, 164, 77, 0.2) !important;
    color: #242526!important;
}
.bg-danger-important {
    background-color: rgba(220, 76, 100, 0.1) !important;
    color: #242526!important;
}
.bg-danger-dark-important {
    background-color: rgba(220, 76, 100, 0.4) !important;
    color: #242526!important;
}
.bg-rie-important {
    background-color: rgb(255, 153, 153) !important;
    color: #242526!important;
}
.bg-warning-important {
    background-color: rgba(228, 161, 27, 0.2) !important;
    color: #242526!important;
}
.bg-info-important {
    background-color: rgba(84, 180, 211, 0.2) !important;
    color: #242526!important;
}
.bg-light-important {
    background-color: rgba(251, 251, 251, 0.2) !important;
    color: #242526!important;
}
.bg-dark-important {
    background-color: rgba(51, 45, 45, 0.2) !important;
}

.bg-dark {
    --mdb-bg-opacity: 1;
    background: linear-gradient(to bottom, #0488c1, #62abbf) !important;
}

#private_body {
    background-color: #e8e8e8;
}

/* Sidenav styling */
.sidenav {
    width: 240px;
    transition: transform 0.3s linear;
}

/* Fix for sidenav positioning */
.sidenav-1[data-mdb-hidden='false'] {
    transform: translateX(0);
}

.sidenav-1[data-mdb-hidden='true'] {
    transform: translateX(-100%);
}

/* Navbar styling */
.navbar {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding-top: 2px!important;
}

/* Ensure in-page anchors like #chapter0 don't get hidden under the fixed navbar */
#chapter0,
[id^="chapter"] {
    /* This does not change layout; it only affects scroll-to-anchor offset */
    scroll-margin-top: 40px;
}

/* Logo styling */
#logo {
    height: 115px;
}

/* Additional styling for sidenav items */
.sidenav-link {
    color: #ffffff!important;
}
.sidenav-link i {
    color: #ffffff;
}
.sidenav-item:hover {
    background-color: #2681c3;
    color: #fafafa;
}

.sidenav-item.active {
    background-color: #93b7cc;
    border-style: solid;
    border-width: 0 0 0 4px;
    border-color: #000;
    color: #fff;
}
.sidenav-item.active > .sidenav-link {
    margin-left: -3px;
}
.text-success {
    --mdb-text-opacity: 1;
    color: #fff!important;
}

/* Cursor styles */
.cursor-pointer {
    cursor: pointer !important;
}
.cursor-default {
    cursor: default !important;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

/* Body styling */
body {
    height: 100vh;
    overflow: hidden;
    /*line-height: 0.2;*/
}

main {
    height: 100vh;
    overflow: hidden;
    overflow-y: auto;
    /* Ensure consistent spacing below fixed navbar across all templates */
    margin-top: 30px;
}

.lh-smaller {
    line-height: 1.4;
}

/* Ensure no other elements have rounded corners */
/*[class*="rounded"] {*/
/*    border-radius: 0 !important;*/
/*}*/

/* Remove rounded corners */
.card,
/*.btn,*/
.modal-content,
.rounded-6,
/*.rounded-pill,*/
.badge,
.navbar,
.rounded,
.rounded-bottom {
    border-radius: 0 !important;
}

.modal-header {
    background-color: rgb(80, 168, 230);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.modal-header.pdf {
    /*background-color: rgb(80, 168, 230);*/
}
/* dropdown-menu */
.navbar-nav .dropdown-menu {
    line-height: 1.5;
    background-color: #0488c1;
}
.navbar-nav .dropdown-menu li {
    margin: 10px;
}
.navbar-nav .dropdown-menu li:first-child .dropdown-item {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.navbar-nav .dropdown-menu li:last-child .dropdown-item {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/*
!* btn *!
.btn-group-sm>.btn, .btn-sm {
    --mdb-btn-padding-top: 0.3rem;
    --mdb-btn-padding-bottom: 0.3rem;
    --mdb-btn-padding-x: 1rem;
    --mdb-btn-font-size: 0.75rem;
    --mdb-btn-line-height: 1;
}
*/

/* Chapter menu styling */
.btn-chaptermenu.active {
    color: #3f7ae4 !important;
    /*font-weight: bold;*/
    text-decoration: underline !important;
}

/* alert-info */
.alert-info {
    background-color: #def1f7;
    color: #1c657d;
    line-height: 1.5;
}

/*!* smartpdfswitches margin fix *!*/
/*#\30_smartpdfswitches {*/
/*    margin-top: 0;*/
/*    margin-left:90px;*/
/*    margin-bottom: 30px;*/
/*}*/

/* Sticky headers for list fragments */
.table.sticky-header thead {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 5; /* ensure header stays above body rows */
}

/* Ensure header cells keep an opaque background */
.table.sticky-header thead th {
    background: #ffffff;
}

/* Optional subtle separator when header is stuck */
.table.sticky-header thead tr:last-child th {
    border-bottom: 1px solid #e0e0e0;
}

/* Fix 1px gap between filter row and header row in sticky list tables */
.table.sticky-header {
    border-collapse: separate; /* keep sticky working reliably */
    border-spacing: 0;          /* remove inter-row spacing that can show scroll */
}

.table.sticky-header thead tr {
    background: #ffffff;        /* ensure no transparency between the header rows */
}

/* Remove border between the two header rows to avoid a visual line/gap */
.table.sticky-header thead tr:first-child th {
    border-bottom: 0;
}
.table.sticky-header thead tr + tr th {
    border-top: 0;
}

/* Gray-out history rows or cells */
tr.history td,
td.history,
tr.history {
    color: #9aa0a6 !important; /* subtle gray text */
}

/* Optionally dim badges/links inside history */
td.history a,
tr.history td a {
    color: #9aa0a6 !important;
    text-decoration-color: #9aa0a6 !important;
}

.badge-primary {
    background-color: transparent!important;
}

.badge-station {
    background-color: #6a6aff!important;
    color: white!important;
    border-radius: 7px!important;
}

td, th {
    padding: 5px 10px!important;
}
/* Main content and navigation */
#private_main {
    padding-left: 201px;
    transition: padding 0.3s linear;
    margin-top: 30px;
}

/* Hide toggler by default and show it only on smaller screens */
#toggler {
    display: none;
}

@media (max-width: 1400px) {
    #private_main {
        padding-left: 0;
    }

    #toggler {
        display: block;
    }
}

.bg-primary-important {
    background-color: rgba(59, 113, 202, 0.2) !important;
    color: #242526!important;
}
.bg-secondary-important {
    background-color: rgba(159, 166, 178, 0.2) !important;
    color: #242526!important;
}
.bg-success-important {
    background-color: rgba(20, 164, 77, 0.2) !important;
    color: #242526!important;
}
.bg-danger-important {
    background-color: rgba(220, 76, 100, 0.1) !important;
    color: #242526!important;
}
.bg-danger-dark-important {
    background-color: rgba(220, 76, 100, 0.4) !important;
    color: #242526!important;
}
.bg-rie-important {
    background-color: rgb(255, 153, 153) !important;
    color: #242526!important;
}
.bg-warning-important {
    background-color: rgba(228, 161, 27, 0.2) !important;
    color: #242526!important;
}
.bg-info-important {
    background-color: rgba(84, 180, 211, 0.2) !important;
    color: #242526!important;
}
.bg-light-important {
    background-color: rgba(251, 251, 251, 0.2) !important;
    color: #242526!important;
}
.bg-dark-important {
    background-color: rgba(51, 45, 45, 0.2) !important;
}

.bg-dark {
    --mdb-bg-opacity: 1;
    background: linear-gradient(to bottom, #0488c1, #62abbf) !important;
}

#private_body {
    background-color: #e8e8e8;
}

/* Sidenav styling */
.sidenav {
    width: 240px;
    transition: transform 0.3s linear;
}

/* Fix for sidenav positioning */
.sidenav-1[data-mdb-hidden='false'] {
    transform: translateX(0);
}

.sidenav-1[data-mdb-hidden='true'] {
    transform: translateX(-100%);
}

/* Navbar styling */
.navbar {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding-top: 2px!important;
}

/* Ensure in-page anchors like #chapter0 don't get hidden under the fixed navbar */
#chapter0,
[id^="chapter"] {
    /* This does not change layout; it only affects scroll-to-anchor offset */
    scroll-margin-top: 40px;
}

/* Logo styling */
#logo {
    height: 115px;
}

/* Additional styling for sidenav items */
.sidenav-link {
    
}

/* Body styling */
body {
    height: 100vh;
    overflow: hidden;
    /*line-height: 0.2;*/
}

main {
    height: 100vh;
    overflow: hidden;
    overflow-y: auto;
    /* Ensure consistent spacing below fixed navbar across all templates */
    margin-top: 30px;
}

.lh-smaller {
    line-height: 1.4;
}

/* Ensure no other elements have rounded corners */
/*[class*="rounded"] {*/
/*    border-radius: 0 !important;*/
/*}*/

/* Remove rounded corners */
.card,
/*.btn,*/
.modal-content,
.rounded-6,
/*.rounded-pill,*/
.badge,
.navbar,
.rounded,
.rounded-bottom {
    border-radius: 0 !important;
}

.modal-header {
    background-color: rgb(80, 168, 230);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.modal-header.pdf {
    /*background-color: rgb(80, 168, 230);*/
}
/* dropdown-menu */
.navbar-nav .dropdown-menu {
    line-height: 1.5;
    background-color: #0488c1;
}
.navbar-nav .dropdown-menu li {
    margin: 10px;
}
.navbar-nav .dropdown-menu li:first-child .dropdown-item {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.navbar-nav .dropdown-menu li:last-child .dropdown-item {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/*
!* btn *!
.btn-group-sm>.btn, .btn-sm {
    --mdb-btn-padding-top: 0.3rem;
    --mdb-btn-padding-bottom: 0.3rem;
    --mdb-btn-padding-x: 1rem;
    --mdb-btn-font-size: 0.75rem;
    --mdb-btn-line-height: 1;
}
*/

/* Chapter menu styling */
.btn-chaptermenu.active {
    color: #3f7ae4 !important;
    /*font-weight: bold;*/
    text-decoration: underline !important;
}

/* alert-info */
.alert-info {
    background-color: #def1f7;
    color: #1c657d;
    line-height: 1.5;
}

/*!* smartpdfswitches margin fix *!*/
/*#\30_smartpdfswitches {*/
/*    margin-top: 0;*/
/*    margin-left:90px;*/
/*    margin-bottom: 30px;*/
/*}*/

/* Sticky headers for list fragments */
.table.sticky-header thead {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 5; /* ensure header stays above body rows */
}

/* Ensure header cells keep an opaque background */
.table.sticky-header thead th {
    background: #ffffff;
}

/* Optional subtle separator when header is stuck */
.table.sticky-header thead tr:last-child th {
    border-bottom: 1px solid #e0e0e0;
}

/* Fix 1px gap between filter row and header row in sticky list tables */
.table.sticky-header {
    border-collapse: separate; /* keep sticky working reliably */
    border-spacing: 0;          /* remove inter-row spacing that can show scroll */
}

.table.sticky-header thead tr {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
}

/* When the header sticks, ensure filter row stays visually connected */
.table.sticky-header thead tr:nth-child(2) th {
    border-top: 1px solid #e0e0e0;
}

/* Click-through for pdf modal container, keep dialog interactive */
.modal.pdf {
    pointer-events: none;
}
.modal.pdf .modal-dialog,
.modal.pdf .modal-content {
    pointer-events: auto;
}
