/* =====================================================================
   CLEON UI - shared look for every page (loaded from EminentMaster.master
   and Eminent.aspx, after theme.css). Change colours here, not page by page.
   ===================================================================== */
:root {
    --cl-blue: #022EB5;   /* Cleon brand blue */
    --cl-deep: #061A63;   /* dark navy : headers, table heads */
    --cl-spark: #00B2FF;  /* electric cyan from the brand banner : focus + accent */
    --cl-ink: #152033;    /* text */
    --cl-mist: #EEF2FA;   /* page background */
    --cl-line: #CBD5E8;   /* borders */
    --cl-ok: #128A52;
    --cl-warn: #E8A100;
    --cl-bad: #D23B3B;
    --cl-radius: 6px;
}

body {
    color: var(--cl-ink);
    background: var(--cl-mist);
}

/* ---------- page frame ---------- */
.page-container {
    background: var(--cl-mist);
}

.main-content {
    padding-top: 18px;
}

.section__content--p30 {
    padding: 0 14px;
}

.cl-topbar {
    background: linear-gradient(90deg, var(--cl-deep), var(--cl-blue)) !important;
    border-bottom: 3px solid var(--cl-spark);
    z-index: 1 !important;
}

    .cl-topbar .cssname {
        font-size: 14px;
        letter-spacing: .04em;
        padding-left: 46px !important;
    }

.header-button-item.js-sidebar-btn {
    z-index: 5;
    color: #fff;
    top: 2px;
    left: 10px;
    cursor: pointer;
}

.cl-footer {
    background: var(--cl-deep) !important;
    margin: 0;
}

/* ---------- side menu ---------- */
.setting-menu .parent-header {
    font-size: 15px;
    color: var(--cl-deep) !important;
    padding: 10px 14px;
    margin: 0;
    border-bottom: 1px solid var(--cl-mist);
}

    .setting-menu .parent-header:hover {
        background: var(--cl-mist);
    }

.setting-menu .submenu-container {
    border-left: 3px solid var(--cl-spark);
    margin-left: 14px;
}

.setting-menu .active-menu {
    background: var(--cl-blue);
    border-radius: var(--cl-radius);
}

/* ---------- cards ---------- */
.card {
    border: 1px solid var(--cl-line);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(6, 26, 99, .06), 0 8px 24px -18px rgba(6, 26, 99, .45);
    margin-bottom: 18px;
    overflow: visible;
}

.card-header {
    background: #fff;
    color: var(--cl-deep);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .01em;
    border-bottom: 1px solid var(--cl-line);
    border-radius: 10px 10px 0 0 !important;
    box-shadow: inset 5px 0 0 var(--cl-spark);
    padding: 12px 18px;
}

.card-body {
    padding: 16px 18px;
}

/* ---------- form fields ---------- */
.form-label,
.form-group > label,
.form-line > label {
    font-size: 12.5px;
    font-weight: 600;
    color: #45526B;
    margin-bottom: 4px;
}

.au-input,
.form-control,
select.form-control:not([size]):not([multiple]) {
    height: 40px;
    line-height: 38px;
    border: 1px solid var(--cl-line);
    border-radius: var(--cl-radius);
    color: var(--cl-ink);
    background-color: #fff;
    padding: 0 10px;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

textarea.au-input,
textarea.form-control {
    height: auto;
    line-height: 1.5;
    padding: 8px 10px;
}

select.form-control[size],
select.form-control[multiple],
input[type=file].form-control {
    height: auto;
    line-height: 1.5;
    padding: 6px 10px;
}

    .au-input:focus,
    .form-control:focus {
        border-color: var(--cl-spark);
        box-shadow: 0 0 0 3px rgba(0, 178, 255, .22);
        outline: 0;
    }

    .au-input[readonly],
    .form-control[readonly],
    .au-input:disabled,
    .form-control:disabled {
        background-color: #F4F6FB;
        color: #5A6781;
    }

/* date fields get a calendar mark */
input.cl-date {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23022EB5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 34px;
}

/* ---------- searchable dropdowns (select2) ---------- */
.select2-container {
    width: 100% !important;
}

    .select2-container .select2-selection--single {
        height: 40px;
        border: 1px solid var(--cl-line);
        border-radius: var(--cl-radius);
        background: #fff;
    }

        .select2-container .select2-selection--single .select2-selection__rendered {
            line-height: 38px;
            padding-left: 10px;
            color: var(--cl-ink);
        }

        .select2-container .select2-selection--single .select2-selection__arrow {
            height: 38px;
        }

    .select2-container.select2-container--focus .select2-selection--single,
    .select2-container.select2-container--open .select2-selection--single {
        border-color: var(--cl-spark);
        box-shadow: 0 0 0 3px rgba(0, 178, 255, .22);
    }

.select2-dropdown {
    border: 1px solid var(--cl-line);
    border-radius: var(--cl-radius);
    box-shadow: 0 12px 28px -12px rgba(6, 26, 99, .45);
    z-index: 2000;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid var(--cl-line);
    border-radius: 4px;
    height: 34px;
    padding: 0 8px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--cl-blue);
}

/* ---------- calendar ---------- */
.datepicker.dropdown-menu {
    border: 1px solid var(--cl-line);
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 12px 28px -12px rgba(6, 26, 99, .45);
    z-index: 2000 !important;
    font-size: 13px;
}

.datepicker td,
.datepicker th {
    width: 32px;
    height: 30px;
    border-radius: 4px;
    text-align: center;
}

.datepicker th.switch,
.datepicker th.datepicker-switch {
    color: var(--cl-deep);
    font-weight: 600;
}

.datepicker td.day:hover,
.datepicker td span:hover {
    background: var(--cl-mist);
    cursor: pointer;
}

.datepicker td.active,
.datepicker td.active:hover,
.datepicker td span.active {
    background: var(--cl-blue) !important;
    background-image: none !important;
    color: #fff !important;
}

.datepicker td.today {
    background: #FFF3CF !important;
    background-image: none !important;
    color: var(--cl-ink) !important;
}

/* ---------- buttons ---------- */
.btn {
    border-radius: var(--cl-radius);
    font-weight: 500;
    padding: 8px 16px;
    border-width: 1px;
}

    .btn:focus {
        box-shadow: 0 0 0 3px rgba(0, 178, 255, .3);
    }

.btn-primary {
    background: var(--cl-blue);
    border-color: var(--cl-blue);
}

    .btn-primary:hover {
        background: var(--cl-deep);
        border-color: var(--cl-deep);
    }

.btn-success {
    background: var(--cl-ok);
    border-color: var(--cl-ok);
}

    .btn-success:hover {
        background: #0C6B3F;
        border-color: #0C6B3F;
    }

.btn-warning {
    background: var(--cl-warn);
    border-color: var(--cl-warn);
    color: #2B2000;
}

.btn-danger {
    background: var(--cl-bad);
    border-color: var(--cl-bad);
}

/* ---------- tables ---------- */
.table-responsive {
    border-radius: 10px;
}

.table {
    background: #fff;
    color: var(--cl-ink);
    margin-bottom: 0;
}

.table-data3 thead {
    background: var(--cl-deep);
}

    .table-data3 thead tr th {
        font-size: 13px;
        font-weight: 600;
        padding: 10px 12px;
        white-space: nowrap;
    }

.table-data3 tbody td,
.table td.tablesize {
    padding: 8px 12px;
    font-size: 13.5px;
    vertical-align: middle;
    border-top: 1px solid #E4E9F4;
}

.table-data3 tbody tr:nth-child(even) td {
    background: #F7F9FD;
}

.table-data3 tbody tr:hover td {
    background: #E7F6FF;
}

@media screen {
    /* GridView tables : header row is rendered as <tr><th> */
    table.table-bordered > tbody > tr > th,
    table.dataTable > tbody > tr > th {
        background: var(--cl-deep);
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        padding: 10px 12px;
        border-color: var(--cl-deep);
        white-space: nowrap;
    }

    table.table-bordered > tbody > tr > td {
        padding: 8px 12px;
        font-size: 13.5px;
        vertical-align: middle;
        border-color: #E4E9F4;
    }

    table.table-striped > tbody > tr:nth-of-type(odd) {
        background: #F7F9FD;
    }
}

/* ---------- print : keep paper output plain ---------- */
@media print {
    body,
    .page-container {
        background: #fff !important;
    }

    .card {
        border: 0;
        box-shadow: none;
    }

    .card-header {
        box-shadow: none;
    }
}

/* =====================================================================
   LOGIN (Eminent.aspx) : brand picture on the left, 30% sign-in on the right
   ===================================================================== */
body.cl-login {
    margin: 0;
    min-height: 100vh;
    background: #030C36;
}

.cl-login-shell {
    display: flex;
    min-height: 100vh;
}

.cl-login-hero {
    flex: 1 1 70%;
    display: flex;
    align-items: flex-end;
    min-width: 0;
    /* whole brand banner, never cropped; navy below it carries the saying */
    background: #030C36 url(../images/bg.jpg) left top / 100% auto no-repeat;
}

.cl-saying {
    width: 100%;
    padding: 90px 6% 34px 6%;
    color: #fff;
    background: linear-gradient(180deg, rgba(3, 12, 54, 0) 0%, #030C36 46%);
}

    .cl-saying blockquote {
        margin: 0;
        max-width: 30em;
        font-size: clamp(20px, 2.1vw, 30px);
        line-height: 1.35;
        font-weight: 500;
        border-left: 4px solid var(--cl-spark);
        padding-left: 18px;
    }

    .cl-saying cite {
        display: block;
        margin-top: 10px;
        padding-left: 22px;
        font-style: normal;
        font-size: 14px;
        color: #B9D9FF;
    }

.cl-login-panel {
    flex: 0 0 30%;
    min-width: 340px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 34px;
    box-shadow: -18px 0 40px -20px rgba(0, 0, 0, .55);
}

    .cl-login-panel .cl-logo {
        background: #0228A5; /* same blue as the logo plate */
        border-radius: 10px;
        padding: 14px 18px;
        text-align: center;
        margin-bottom: 28px;
    }

        .cl-login-panel .cl-logo img {
            max-width: 100%;
            height: auto;
        }

    .cl-login-panel h1 {
        font-size: 24px;
        font-weight: 600;
        color: var(--cl-deep);
        margin: 0 0 4px 0;
    }

    .cl-login-panel .cl-sub {
        color: #5A6781;
        font-size: 14px;
        margin-bottom: 22px;
    }

    .cl-login-panel .form-group {
        margin-bottom: 16px;
    }

    .cl-login-panel .au-input {
        height: 46px;
        line-height: 44px;
        font-size: 15px;
        width: 100%;
    }

    .cl-login-panel .cl-msg {
        display: block;
        min-height: 20px;
        color: var(--cl-bad);
        font-size: 13.5px;
        font-weight: 500;
    }

    .cl-login-panel .cl-signin {
        width: 100%;
        height: 48px;
        border: 0;
        border-radius: var(--cl-radius);
        background: var(--cl-blue);
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: background .15s ease;
    }

        .cl-login-panel .cl-signin:hover {
            background: var(--cl-deep);
        }

        .cl-login-panel .cl-signin:focus {
            outline: 0;
            box-shadow: 0 0 0 3px rgba(0, 178, 255, .45);
        }

    .cl-login-panel .cl-foot {
        margin-top: 26px;
        font-size: 12.5px;
        color: #7A869E;
        text-align: center;
    }

@media (max-width: 900px) {
    .cl-login-shell {
        flex-direction: column;
    }

    .cl-login-hero {
        flex: 0 0 auto;
        min-height: 34vh;
    }

    .cl-saying {
        padding: 60px 22px 20px 22px;
    }

    .cl-login-panel {
        flex: 1 1 auto;
        min-width: 0;
        padding: 26px 22px;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* =====================================================================
   "Install app" button (js/cleon-pwa.js)
   ===================================================================== */
.cl-install {
    border: 1px solid var(--cl-blue);
    background: #fff;
    color: var(--cl-blue);
    border-radius: var(--cl-radius);
    font-weight: 600;
    cursor: pointer;
}

    .cl-install[hidden],
    .cl-install-help[hidden] {
        display: none !important;
    }

    .cl-install:hover {
        background: var(--cl-mist);
    }

.cl-install--login {
    width: 100%;
    height: 44px;
    margin-top: 12px;
    font-size: 15px;
}

.cl-install--bar {
    position: absolute;
    right: 14px;
    top: 5px;
    height: 28px;
    padding: 0 12px;
    font-size: 12.5px;
    border-color: #fff;
}

.cl-install-help {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--cl-mist);
    border-left: 4px solid var(--cl-spark);
    border-radius: 4px;
    font-size: 13.5px;
    color: var(--cl-ink);
    text-transform: none;
}

.cl-install-help--bar {
    position: absolute;
    right: 14px;
    top: 40px;
    max-width: 320px;
    z-index: 50;
    box-shadow: 0 12px 28px -12px rgba(6, 26, 99, .45);
}

/* ---------- layout fixes ---------- */
/* a .row placed directly inside another .row (list below the form) must take the full width */
.row > .row {
    flex: 0 0 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.table-responsive > .table {
    width: 100%;
}

/* sort arrows in table headers */
.table-data3 thead th i {
    margin: 0 0 0 5px;
    font-size: 10px;
    opacity: .7;
}

.table-data3 tbody td small {
    color: #5A6781;
    font-size: 12.5px;
}

/* =====================================================================
   SIDE MENU : fixed on the LEFT, hidden; opens only when the mouse is on the
   three-line menu button (or the button is clicked), stays open while the
   mouse is on the menu, closes when the mouse leaves it (js/cleon-ui.js).
   ===================================================================== */
@media (min-width: 992px) {
    .setting-menu {
        left: 0;
        right: auto !important;
        top: 0 !important;
        width: 290px;
        min-width: 290px;
        height: 100vh !important;
        z-index: 1500 !important;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .2s ease, visibility 0s linear .2s !important;
        box-shadow: none;
        background: #fff;
        border-right: 3px solid var(--cl-spark);
    }

        .setting-menu:before {
            display: none;
        }

        .setting-menu.show-sidebar {
            transform: none;
            visibility: visible;
            transition: transform .2s ease, visibility 0s !important;
            box-shadow: 18px 0 40px -20px rgba(3, 12, 54, .6);
        }

        .setting-menu > .account-dropdown__body:last-child {
            height: calc(100vh - 150px) !important;
        }

    /* only the three-line icon itself opens the menu
       (the button also has class show-sidebar, whose old style right:10px stretched it across the whole top bar) */
    .header-button-item.js-sidebar-btn {
        left: 14px !important;
        right: auto !important;
        top: 3px !important;
        width: 36px;
        height: 32px;
        margin: 0 !important;
        z-index: 1600;
        display: flex !important;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

        .header-button-item.js-sidebar-btn i {
            margin: 0;
            font-size: 26px;
            line-height: 1;
        }

    .cl-topbar .cssname {
        padding-left: 58px !important;
    }
}

.setting-menu .inactive-menu,
.setting-menu .active-menu {
    display: block;
    padding: 9px 12px;
    font-size: 14px;
    border-radius: var(--cl-radius);
}

.setting-menu .inactive-menu {
    color: #33415C;
}

    .setting-menu .inactive-menu:hover {
        background: var(--cl-mist);
        color: var(--cl-blue);
    }

.setting-menu .submenu-container ul {
    padding: 2px 8px;
    margin: 0;
}

/* =====================================================================
   DASHBOARD (EminentHome) tiles : same look as the rest of the site.
   Each tile keeps its own colour as the stripe on the left of its title.
   ===================================================================== */
.table-responsive.shadow {
    background: #fff;
    border: 1px solid var(--cl-line);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(6, 26, 99, .06), 0 8px 24px -18px rgba(6, 26, 99, .45) !important;
    overflow: hidden;
}

    .table-responsive.shadow > .table {
        border: 0;
    }

@media screen {
    table.table tr.card-header {
        box-shadow: none;
    }

        table.table tr.card-header > td {
            background: var(--cl-deep);
            background-clip: padding-box;
            border: 0;
            border-left: 7px solid transparent; /* tile colour shows here */
            color: #fff;
            font-size: 14px;
            font-weight: 600;
            letter-spacing: .03em;
            padding: 11px 14px;
            text-align: left;
        }

            table.table tr.card-header > td a {
                color: #fff !important;
                text-decoration: none;
            }

                table.table tr.card-header > td a:hover {
                    color: #9FE2FF !important;
                }

    table.table td.tablesize.head {
        background: #E6ECF9;
        color: var(--cl-deep);
        font-size: 12.5px;
        font-weight: 600;
        padding: 7px 10px;
        border-color: #D5DDEE;
        white-space: nowrap;
    }

    table.table td.tablesize.tail {
        padding: 7px 10px;
        font-size: 13.5px;
        border-color: #E4E9F4;
    }

    table.table-hover > tbody > tr:hover > td.tablesize.tail {
        background: #E7F6FF;
    }
}

.btn-block.btn-lg {
    font-size: 15px;
    padding: 11px 14px;
    text-align: left;
}

.card-body.shadow {
    box-shadow: none !important;
}

.setting-menu .logo img {
    max-width: 190px;
    height: auto;
    padding: 8px 0;
}

/* ---------- confirm popup (Sub BOM check on Plates Stock) ---------- */
.cl-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    background: rgba(3, 12, 54, .55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 16px 16px 16px;
    overflow-y: auto;
}

.cl-modal-box {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 860px;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
}

.cl-modal-body {
    padding: 14px 18px;
    max-height: 60vh;
    overflow-y: auto;
}

.cl-modal-foot {
    padding: 12px 18px 16px 18px;
    text-align: right;
    border-top: 1px solid var(--cl-line);
}

/* Close button on a dark tile heading (e.g. Total Stock battery list) */
.cl-closebtn,
table.table tr.card-header > td a.cl-closebtn {
    float: right;
    padding: 2px 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff !important;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 4px;
}

    .cl-closebtn:hover,
    table.table tr.card-header > td a.cl-closebtn:hover {
        background: #D23B3B;
        border-color: #D23B3B;
        color: #fff !important;
    }

    .cl-closebtn i {
        margin-right: 4px;
        font-size: 12px;
    }
