/* ===============================
   GLOBAL BASE
================================ */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: #f4f6f9;
    font-size: 0.95rem;
    margin-bottom: 60px;
}

/* Bootstrap focus fix */
.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;
}


/* ===============================
   LOGIN-PAGE
================================ */

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    animation: fadeIn 0.3s ease-in;
}

.login-card {
    max-width: 420px;
    border-radius: 15px;
}

.login-logo {
    max-height: 500px;
}

.pointer {
    cursor: pointer;
}

/* ===============================
   NAVBAR
================================ */
.navbar {
    background: linear-gradient(90deg, #0d6efd, #0b5ed7);
    padding: 10px 20px;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 600;
    color: #fff !important;
}

.nav-link {
    color: rgba(255,255,255,0.85) !important;
    margin-right: 10px;
}

    .nav-link:hover,
    .nav-link.active {
        color: #fff !important;
        border-bottom: 2px solid #fff;
    }

/* ===============================
   LAYOUT
================================ */
.layout-wrapper {
    display: flex;
}

/* ===============================
   SIDEBAR VARIABLES
================================ */
:root {
    --sidebar-width: 240px;
    --tab-width: 18px;
    --tab-height: 64px;
}

/* ===============================
   SIDEBAR TAB
================================ */
.sidebar-tab {
    position: fixed;
    top: 20%;
    left: 0;
    transform: translateY(-50%);
    width: 22px;
    height: 76px;
    background: #0d6efd;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .2s ease, left .3s ease;
}

    .sidebar-tab i {
        color: #fff;
        font-size: 10px;
        opacity: 0.85;
        pointer-events: none;
    }

    .sidebar-tab:hover {
        background: #084298;
    }

    .sidebar-tab.move {
        left: var(--sidebar-width);
    }

        .sidebar-tab.move .bi-chevron-right {
            transform: rotate(180deg);
        }

/* ===============================
   SIDEBAR
================================ */
.sidebar {
    position: fixed;
    top: 60px;
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: calc(100vh - 60px);
    background: #e4e4e4;
    border-right: 1px solid #ddd;
    padding: 14px 0;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1000;
}

    .sidebar.active {
        left: 0;
    }

    .sidebar a {
        text-decoration: none !important;
    }

/* ===============================
   MENU
================================ */
.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    margin: 6px 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1c2435;
    background: #f5f7ff;
    border-radius: 8px;
    border-left: 4px solid transparent;
    transition: all 0.25s ease;
}

    .main-menu-item:hover {
        background: #e8edff;
        border-left: 4px solid #1b3cc4;
        color: #1b3cc4;
    }

    .main-menu-item.active-parent {
        background: #e0e6ff;
        border-left: 4px solid #1b3cc4;
        color: #1b3cc4 !important;
    }

    .main-menu-item i {
        font-size: 16px;
        min-width: 18px;
    }

/* ===============================
   SUBMENU
================================ */
.submenu {
    list-style: none;
    padding-left: 32px;
    margin: 6px 0;
    display: none;
}

li.open > .submenu {
    display: block;
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.25s ease;
}

li.open .toggle-icon {
    transform: rotate(180deg);
}

.sub-menu-item {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    padding: 8px 20px;
    display: block;
}

    .sub-menu-item:hover {
        background: #e6ebff;
        color: #1b3cc4;
    }

    .sub-menu-item.active-link {
        font-weight: 600;
        color: #1b3cc4 !important;
    }

/* ===============================
   MAIN CONTENT
================================ */
#mainContent {
    margin-left: 0;
    width: 100%;
    transition: margin-left 0.3s ease;
    padding: 10px;
}

    #mainContent.shift {
        margin-left: var(--sidebar-width);
    }

/* ===============================
   CONTENT WRAPPER
================================ */
.content-wrapper {
    margin-top: 50px;
    padding: 25px;
    min-height: calc(100vh - 70px);
    transition: margin-left .3s ease;
}

/* ===============================
   CARDS
================================ */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}

/* ===============================
   MAIN AREA
================================ */
main {
    padding: 20px;
    height: calc(100vh - 56px - 40px);
    overflow-y: auto;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================
   FOOTER
================================ */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    z-index: 1000;
    background: #fff;
}

/* ===============================
   LOADER
================================ */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

    .loader-overlay.active {
        visibility: visible;
        opacity: 1;
    }

.loader-box {
    background: #ffffff;
    padding: 25px 35px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

.loader-text {
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


#InputsTable {
    table-layout: auto;
    width: 100%;
}

#InputsTable th {
    white-space: normal;   /* allows header wrapping */
    word-break: break-word;
}

.ddlActionType {
    width: 140px !important;
}