﻿html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
}

/* Toggle buttons */
.navbar-toggle {
    margin-top: 12px;
    padding: 6px 6px;
    border-width: 1px;
}

    .navbar-toggle .icon-bar {
        height: 2px;
        width: 18px;
    }

/* Primary nav toggle button */
.nav-primary .navbar-toggle {
    border-color: #ffffff;
    background-color: #336699;
}

    .nav-primary .navbar-toggle:hover {
        border-color: #336699;
        background-color: #ffffff;
    }

    .nav-primary .navbar-toggle .icon-bar {
        background-color: #ffffff;
    }

    .nav-primary .navbar-toggle:hover .icon-bar {
        background-color: #336699;
    }

/* Secondary nav toggle button */
.nav-secondary .navbar-toggle {
    border-color: #336699;
    background-color: #ffffff;
}

    .nav-secondary .navbar-toggle:hover {
        border-color: #ffffff;
        background-color: #336699;
    }

    .nav-secondary .navbar-toggle .icon-bar {
        background-color: #336699;
    }

    .nav-secondary .navbar-toggle:hover .icon-bar {
        background-color: #ffffff;
    }

/* Header container */
.header-container {
    display: flex;
    flex: 0 0 auto;
}

/* Left panel */
.left-panel {
    width: 120px;
    background-color: #336699;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 15px;
    border-bottom-right-radius: 10px;
}

    .left-panel img {
        height: 70px;
        width: auto;
    }

/* Right panel */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #336699;
}

/* Primary navbar */
.nav-primary .navbar {
    background-color: #336699;
    border: none;
    border-radius: 0;
    margin: 0;
}

.nav-primary .navbar-nav > li > a {
    color: #FFFFFF !important;
}

    .nav-primary .navbar-nav > li > a:hover,
    .nav-primary .navbar-nav > .open > a {
        background-color: #285580 !important;
        /*color: #FFFFFF !important;*/
    }

.nav-primary .navbar-collapse.in .dropdown-menu > li > a {
    color: #ffffff !important;
}

    .nav-primary .navbar-collapse.in .dropdown-menu > li > a:hover {
        background-color: #285580 !important;
        color: #ffffff !important;
    }

/* Secondary navbar */
.nav-secondary .navbar {
    background-color: #FFFFFF;
    border: none;
    border-radius: 0;
    border-top-left-radius: 10px;
    margin: 0;
}

.nav-secondary .navbar-nav > li > a {
    color: #336699 !important;
}

    .nav-secondary .navbar-nav > li > a:hover,
    .nav-secondary .navbar-nav > .open > a {
        background-color: #E6F0FF !important;
        color: #336699 !important;
    }

.nav-secondary .navbar-collapse {
    border: 0;
}

/* Main content */
.main-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 15px;
    margin: 20px 0 0 0;
}

/* Footer */
.footer {
    height: 40px;
    background-color: #336699;
    border-top: 5px solid #ffffff;
    color: white;
    line-height: 35px;
    text-align: center;
    flex: 0 0 auto;
}

    .footer img {
        height: 15px;
        margin-right: 5px;
    }


/* =========================================================
   GLOBAL SMALL FORM CONTROLS for Bootstrap 3.3.6
   Makes all inputs, selects, buttons, checkboxes, radios, etc. smaller
   ========================================================= */

.form-control {
    height: 30px;
    padding: 3px 6px !important;
    font-size: 16px;
}

/*======================================================== */

#globalLoaderOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: rgba(0, 0, 0, 0.3);*/ /* semi-transparent overlay */
    z-index: 9999;
}

#loaderContent {
    padding: 20px;
    background-color: #336699;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    border-radius: 7px;
}

#loaderGif {
    width: 80px;
    display: block;
    margin: 0 auto;
}

#loaderPercent {
    margin-top: 10px;
    font-size: 14px;
    color: #ffffff;
    font-weight: bold;
}

/* Target text input fields inside .has-error */
.has-error .form-control {
    /*border-color: #ffc8c8;*/ /* your custom border color */
    background-color: #fee9e9; /* optional, subtle highlight */
    /*box-shadow: 0 0 5px rgba(255, 136, 0, 0.5);*/ /* optional glow */
}

/* Optional: change label color as well */
.has-error label {
    /*color: #ff0000;*/
}

/* error message styling */
.field-error {
    color: #c9302c; /* bootstrap danger-ish */
    font-size: 10px;
    margin: 3px 0 0 0;
    display: block;
}

/* MODAL SETTINGS */

/* Center the modal vertically (Bootstrap 3 fix) */
.modal {
    text-align: center;
    padding: 0 !important;
}

    .modal:before {
        content: '';
        display: inline-block;
        height: 100%;
        vertical-align: middle;
        margin-right: -4px; /* adjust for inline-block spacing */
    }

.modal-dialog {
    display: inline-block;
    text-align: left;
    vertical-align: middle;
}

/* Dimmed background */
.modal-backdrop {
    background-color: rgba(0,0,0,0.5);
}

.modal-header {
    flex: 0 0 auto;
    padding-bottom: 10px;
    background-color: #336699;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    color: #ffffff !important;
}

/* SCROLLABLE MODALS */

/* Limit modal width to max 90% of browser */
.modalScrollable .modal-dialog {
    max-width: 90%;
    margin: 30px auto;
}

/* Modal body fixed and scrollable container inside */
.modalScrollable .modal-body {
    overflow: hidden;
    position: relative;
}

.modalScrollable .scrollable-container {
    display: block;
    width: auto; /* allow horizontal scroll */
    overflow-y: auto; /* vertical scrollbar always */
    overflow-x: auto; /* horizontal scrollbar always */
    box-sizing: border-box;
    padding-right: 2px; /* avoid scrollbar clipping */
}


/* SYSTEM TABS */
.nav-tabs_systabs {
    margin-top: 5px; /* slightly less top space */
}

/* Active tab border and text color */
.nav-tabs_systabs > li.active > a,
.nav-tabs_systabs > li.active > a:focus,
.nav-tabs_systabs > li.active > a:hover {
    /*border: 1px solid #336699;*/
    border-bottom-color: transparent; /* hide bottom border for seamless content area */
    color: #ffffff;
    background-color: rgba(51, 102, 153, 1.0);
}

/* Non-active tabs */
.nav-tabs_systabs > li > a {
    /*border: 1px solid #336699;*/ /* default border for others */
    border: 1px solid rgba(51, 102, 153, 0.4); /* default border for others */
    color: rgba(51, 102, 153, 0.7);
    background-color: rgba(51, 102, 153, 0.1);
}

    /* When hovering over a non-active tab */
    .nav-tabs_systabs > li > a:hover {
        /*border-color: #336699;*/
        color: #336699;
    }

.nav-tabs_systabs > li > a {
    padding: 6px 10px; /* smaller height and width */
    font-size: 14px; /* smaller text */
    line-height: 1.2; /* tighter spacing */
}

