:root {
    --ip-font-sans: ;
    --ip-font-sans: 'Jura', "Segoe UI", Roboto, Arial, sans-serif;
    --ip-color-primary: #1769c2;
    --ip-color-primary-hover: #0f56a3;
    --ip-color-primary-soft: #e8f2fc;
    --ip-color-shell: #243b53;
    --ip-color-shell-deep: #172a3d;
    --ip-color-text: #243447;
    --ip-color-text-muted: #5f6f81;
    --ip-color-border: #cbd6e2;
    --ip-color-surface: #ffffff;
    --ip-focus-ring: rgba(23, 105, 194, 0.28);
    --ip-radius-sm: 6px;
    --ip-radius-md: 10px;
    --ip-shadow-shell: 0 2px 10px rgba(20, 39, 58, 0.22);
    --ip-shadow-card: 0 18px 50px rgba(20, 39, 58, 0.24);
}

body.ui-refresh-login,
body.ui-refresh-shell {
    font-family: var(--ip-font-sans) !important;
    color: var(--ip-color-text) !important;
}

body.ui-refresh-login button,
body.ui-refresh-login input,
body.ui-refresh-shell button,
body.ui-refresh-shell input,
body.ui-refresh-shell select,
body.ui-refresh-shell textarea {
    font-family: inherit !important;
}

body.ui-refresh-login a,
body.ui-refresh-login button,
body.ui-refresh-shell a,
body.ui-refresh-shell button,
body.ui-refresh-shell [role="button"] {
    cursor: pointer;
}

body.ui-refresh-login :focus-visible,
body.ui-refresh-shell :focus-visible {
    outline: 2px solid var(--ip-color-primary) !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--ip-focus-ring) !important;
}

/* Login is deliberately isolated from the report/page styles. */
body.ui-refresh-login {
    min-height: 100vh;
    overflow: auto !important;
    padding: 24px !important;
    background-color: #dce6ef;
    background-image:
        linear-gradient(rgba(231, 238, 245, 0.46), rgba(210, 222, 233, 0.58)),
        url("../images/clouds.jpg") !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

body.ui-refresh-login .form-signin {
    width: 100%;
    max-width: 380px;
    padding: 30px 32px 24px;
    border: 1px solid rgba(203, 214, 226, 0.9);
    border-radius: var(--ip-radius-md);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--ip-shadow-card);
    backdrop-filter: blur(4px);
}

body.ui-refresh-login .form-signin > img {
    width: auto;
    max-width: 76px;
    max-height: 76px;
    margin-bottom: 18px !important;
}

body.ui-refresh-login .form-signin h5 {
    margin-bottom: 22px !important;
    color: var(--ip-color-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

body.ui-refresh-login .input-group {
    position: relative;
}

body.ui-refresh-login .input-group-prepend {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: 42px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--ip-color-primary) !important;
    pointer-events: none;
}

body.ui-refresh-login .input-group-prepend span.fa,
body.ui-refresh-login .input-group-prepend span.fas,
body.ui-refresh-login .input-group-prepend svg {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--ip-color-primary) !important;
    font-size: 15px;
}

body.ui-refresh-login .form-control {
    width: 100%;
    height: 40px !important;
    margin-right: 0 !important;
    padding: 8px 12px 8px 42px !important;
    border: 1px solid var(--ip-color-border) !important;
    border-radius: var(--ip-radius-sm) !important;
    background: var(--ip-color-surface) !important;
    color: var(--ip-color-text) !important;
    font-size: 14px !important;
    line-height: 1.35;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

body.ui-refresh-login .input-group-sm > .form-control {
    font-family: var(--ip-font-sans) !important;
}

body.ui-refresh-login .form-control:focus {
    border-color: var(--ip-color-primary) !important;
    box-shadow: 0 0 0 3px var(--ip-focus-ring) !important;
}

body.ui-refresh-login .form-control::placeholder {
    color: #7a8999;
    opacity: 1;
}

body.ui-refresh-login .form-signin > .input-group:last-of-type .input-group-prepend {
    display: none;
}

body.ui-refresh-login .form-signin .btn-primary {
    min-height: 40px;
    margin: 0 !important;
    border: 1px solid var(--ip-color-primary) !important;
    border-radius: var(--ip-radius-sm) !important;
    background: var(--ip-color-primary) !important;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

body.ui-refresh-login .form-signin .btn-primary:hover {
    border-color: var(--ip-color-primary-hover) !important;
    background: var(--ip-color-primary-hover) !important;
}

body.ui-refresh-login .form-signin .btn-primary:active {
    transform: translateY(1px);
}

body.ui-refresh-login .form-signin .text-muted {
    margin-top: 32px !important;
    margin-bottom: 0 !important;
    color: var(--ip-color-text-muted) !important;
    font-size: 11px;
}

/* Main shell/navigation only. The iframe content keeps the legacy report CSS. */
body.ui-refresh-shell {
    overflow: hidden !important;
    background: #eef3f8 !important;
}

body.ui-refresh-shell #main-menu {
    min-height: 48px;
    padding: 4px 16px !important;
    border: 0;
    background: linear-gradient(135deg, var(--ip-color-shell-deep), var(--ip-color-shell)) !important;
    box-shadow: var(--ip-shadow-shell);
}

body.ui-refresh-shell #main-menu .navbar-brand {
    display: inline-flex;
    min-width: 36px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    padding: 0;
    border-radius: var(--ip-radius-sm);
    color: #66b7ff;
}

body.ui-refresh-shell #main-menu .navbar-brand:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

body.ui-refresh-shell #main-menu .navbar-nav.mb-1 {
    margin-bottom: 0 !important;
}

body.ui-refresh-shell #main-menu .nav-link {
    display: flex;
    min-height: 36px;
    align-items: center;
    padding: 7px 10px;
    border-radius: var(--ip-radius-sm);
    color: #d7e7f7 !important;
    font-size: 13px;
    line-height: 1.25;
    transition: color 120ms ease, background-color 120ms ease;
}

body.ui-refresh-shell #main-menu .nav-link:hover,
body.ui-refresh-shell #main-menu .nav-item.show > .nav-link {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

body.ui-refresh-shell #main-menu .dropdown-menu {
    min-width: 210px;
    margin-top: 4px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--ip-radius-sm);
    background: #20364b;
    box-shadow: 0 12px 28px rgba(15, 30, 45, 0.3);
}

body.ui-refresh-shell #main-menu .dropdown-item,
body.ui-refresh-shell #main-menu .dropdown-item-menu {
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 4px;
    color: #d7e7f7 !important;
    font-size: 13px;
    line-height: 1.25;
}

body.ui-refresh-shell #main-menu .dropdown-item:hover,
body.ui-refresh-shell #main-menu .dropdown-item:focus,
body.ui-refresh-shell #main-menu .dropdown-item-menu:hover,
body.ui-refresh-shell #main-menu .dropdown-item-menu:focus {
    background: var(--ip-color-primary);
    color: #ffffff !important;
}

@media (min-width: 992px) {
    body.ui-refresh-shell #main-menu .dropdown-submenu {
        position: relative;
    }

    body.ui-refresh-shell #main-menu .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: calc(100% - 1px);
        z-index: 1001;
        margin: 0;
    }

    body.ui-refresh-shell #main-menu .dropdown-submenu:hover > .dropdown-menu,
    body.ui-refresh-shell #main-menu .dropdown-submenu:focus-within > .dropdown-menu {
        display: flex;
        flex-direction: column;
    }
}

body.ui-refresh-shell #main-menu .navbar-toggler {
    min-width: 38px;
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--ip-radius-sm) !important;
}

body.ui-refresh-shell #content {
    top: 48px;
    height: calc(100% - 48px);
    background: #eef3f8;
}

@media (max-width: 991.98px) {
    body.ui-refresh-shell #main-menu {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    body.ui-refresh-shell #main-menu .navbar-collapse {
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        padding-top: 6px;
    }

    body.ui-refresh-shell #main-menu .dropdown-menu {
        width: 100%;
        margin: 2px 0 6px;
        box-shadow: none;
    }
}

@media (max-width: 480px) {
    body.ui-refresh-login {
        padding: 12px !important;
    }

    body.ui-refresh-login .form-signin {
        padding: 24px 20px 20px;
    }
}
