/* ==========================================================================
   M-Reply Admin theme
   Loaded after admin.css. Overrides the legacy look only; it does not touch
   jQuery UI (.ui-*), the datetimepicker, CKEditor or bootstrap-multiselect.
   ========================================================================== */

:root {
    --mr-navy: #1F4E79;
    --mr-navy-dark: #173B5C;
    --mr-navy-deep: #12304B;
    --mr-orange: #E8772E;
    --mr-orange-dark: #CF6520;
    --mr-ink: #1E293B;
    --mr-text: #334155;
    --mr-muted: #64748B;
    --mr-line: #DCE3EC;
    --mr-line-soft: #EDF1F6;
    --mr-soft: #EEF3F8;
    --mr-bg: #F3F6FA;
    --mr-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--mr-font);
    font-size: 13px;
    color: var(--mr-text);
    background: var(--mr-bg);
}

a { color: var(--mr-navy); }
a:visited { color: var(--mr-navy); }
a:hover { color: var(--mr-orange); }
a:active { background-color: transparent; }

/* ---------- Page shell -------------------------------------------------- */

#wrapper {
    background: var(--mr-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#header {
    position: static;
    height: auto;
    padding: 0;
    width: auto;
    background: var(--mr-navy);
    background: linear-gradient(90deg, var(--mr-navy) 0%, var(--mr-navy-dark) 100%);
    box-shadow: 0 2px 6px rgba(18, 48, 75, .25);
}

.work_area {
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.work_area .cl { display: none; }

.admin_title {
    float: none;
    display: flex;
    align-items: center;
    gap: 14px;
    font: 600 13px var(--mr-font);
}

.admin_title img {
    height: 46px;
    width: auto;
    display: block;
}

.admin_title span {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
}

.admin_title span b { font-weight: 600; }

#user_details {
    float: none;
    padding: 0;
    text-align: left;
}

#user_details_menu {
    float: none;
    width: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #C9D8E8;
    font: 13px var(--mr-font);
}

#user_details_menu li {
    float: none;
    width: auto;
    padding: 0;
}

#user_details_menu li .user_name {
    color: #fff;
    font-weight: 600;
}

#user_access {
    float: none;
    padding: 0;
    background: none;
    font: 13px var(--mr-font);
    line-height: normal;
}

#user_access li {
    float: none;
    padding: 0;
    background: none;
}

#user_access a:link,
#user_access a:visited,
#user_access a:active {
    display: inline-block;
    color: #fff;
    font-weight: 600;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 6px;
    background: transparent;
}

#user_access a:hover {
    color: #fff;
    background: var(--mr-orange);
    border-color: var(--mr-orange);
}

#site_area {
    background: transparent;
    padding: 0;
    min-height: 0;
    flex: 1 0 auto;
}

/* ---------- Main menu --------------------------------------------------- */

#menus_wrapper {
    float: none;
    width: auto;
    padding: 0;
    border-top: 0;
    background: #fff;
    border-bottom: 1px solid var(--mr-line);
    box-shadow: 0 1px 2px rgba(30, 41, 59, .04);
}

.mattblackmenu ul {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    padding: 0 16px;
    font: 600 13px var(--mr-font);
    border-bottom: 0;
    background: transparent;
    overflow: visible;
}

.mattblackmenu li { display: block; }

.mattblackmenu li a,
.mattblackmenu li a:visited {
    float: none;
    padding: 15px 14px 12px;
    color: #475569;
    background: transparent;
    border-right: 0;
    border-bottom: 3px solid transparent;
}

.mattblackmenu li a:hover {
    color: var(--mr-navy);
    background: var(--mr-soft);
}

.mattblackmenu li a.selected,
.mattblackmenu li a.selected:visited,
.mattblackmenu li a.selected:hover {
    color: var(--mr-navy);
    background: transparent;
    border-bottom-color: var(--mr-orange);
}

/* ---------- Content area ------------------------------------------------ */

#content {
    width: auto;
    padding: 24px 14px 40px;
    background: none;
}

#content .errors:empty { display: none; }

#page { float: none; }

#page .inner,
#page .innerhome {
    margin: 0;
    padding: 0 10px;
}

.section { padding: 0 0 24px; }

.title_wrapper {
    background: var(--mr-navy);
    margin: 0;
    padding: 8px 16px;
    border-radius: 10px 10px 0 0;
}

.title_wrapper_left,
.title_wrapper_right { display: none; }

.title_wrapper h2 {
    font-size: 17px;
    font-weight: 600;
    line-height: 34px;
    margin: 0;
    color: #fff;
}

.title_wrapper h2 a {
    font-size: 12px;
    font-weight: 400;
    margin-left: 8px;
    opacity: .85;
}

.title_wrapper h2 a:hover { opacity: 1; text-decoration: underline; }

/* tabs / actions that sit in the title bar */
.section_menu,
.section_menuSearch {
    padding: 2px 0 0;
    color: #fff;
}

.section_menu li,
.section_menuSearch li {
    list-style: none;
    padding: 0 0 0 10px;
    line-height: 30px;
}

.section_menu a:link,
.section_menu a:visited,
.section_menu a:hover,
.section_menu a:active {
    line-height: 28px;
    background: transparent;
    color: #fff;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 6px;
    overflow: hidden;
}

.section_menu a span,
.section_menu a span span { background: transparent; }

.section_menu a span span { padding: 0 14px; }

.section_menu a:hover,
.section_menu a.active,
.section_menu a[id$="hlDropProducts"] {
    background: var(--mr-orange);
    border-color: var(--mr-orange);
    color: #fff;
}

.section_menu a:hover span,
.section_menu a.active span { background: transparent; }

.section_menu a[id$="hlDropProducts"]:hover {
    background: var(--mr-orange-dark);
    border-color: var(--mr-orange-dark);
}

/* card body */
.sct {
    background: #fff;
    border: 1px solid var(--mr-line);
    border-top: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 14px rgba(30, 41, 59, .06);
    overflow: hidden;
}

.sct_left,
.sct_right { border: 0; }

.sct_left .sct_left .sct_right {
    background: transparent;
    padding: 20px;
    min-height: 240px;
}

.table_section .sct_left .sct_left .sct_right { padding: 0; }

.scb { display: none; }

/* ---------- Form controls ----------------------------------------------- */

#content input[type=text],
#content input[type=password],
#content select,
#content textarea {
    font: 13px var(--mr-font);
    color: var(--mr-ink);
    background-color: #fff;
    border: 1px solid #C5D0DD;
    border-radius: 6px;
    padding: 7px 9px;
    outline: 0;
    transition: border-color .15s, box-shadow .15s;
}

#content input[type=text]:focus,
#content input[type=password]:focus,
#content select:focus,
#content textarea:focus {
    border-color: var(--mr-navy);
    box-shadow: 0 0 0 3px rgba(31, 78, 121, .15);
}

#content input[disabled],
#content select[disabled],
#content textarea[disabled] {
    background-color: #F1F5F9;
    color: var(--mr-muted);
}

#content .section_menu select { height: auto; }

/* some pages set a fixed inline height on single-select lists, which clips the text */
#content select:not([multiple]):not([size]) {
    height: auto !important;
    min-height: 34px;
    box-sizing: border-box;
}

.title_wrapper input[type=text],
.title_wrapper select {
    border-color: transparent !important;
    padding: 5px 9px !important;
    vertical-align: middle;
}

#content .pagination select { padding: 3px 4px; }

/* leave third-party widgets that live inside the content area alone */
#content .multiselect-container input[type=text] {
    border-radius: 0 4px 4px 0;
    box-shadow: none;
}

#content input[type=submit],
#content input[type=button],
.buttonStyle {
    font: 600 13px var(--mr-font);
    color: #fff;
    background-color: var(--mr-navy);
    border: 1px solid var(--mr-navy);
    border-radius: 6px;
    padding: 8px 18px;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}

#content input[type=submit]:hover,
#content input[type=button]:hover,
.buttonStyle:hover {
    background-color: var(--mr-navy-dark);
    border-color: var(--mr-navy-dark);
    color: #fff;
}

.title_wrapper input[type=submit],
.title_wrapper .buttonStyle {
    background-color: var(--mr-orange) !important;
    border-color: var(--mr-orange) !important;
    padding: 6px 14px !important;
    vertical-align: middle;
}

.title_wrapper input[type=submit]:hover,
.title_wrapper .buttonStyle:hover {
    background-color: var(--mr-orange-dark) !important;
    border-color: var(--mr-orange-dark) !important;
}

#content h4 {
    margin: 0 0 10px;
    padding: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mr-navy);
    border-bottom: 2px solid var(--mr-line-soft);
}

#content .sct table td { padding-top: 4px; padding-bottom: 4px; }

.treeview {
    border: 1px solid var(--mr-line);
    border-radius: 8px;
    padding: 10px;
    background: #FBFCFE;
}

/* ---------- Data grids -------------------------------------------------- */

.table_wrapper {
    font-family: var(--mr-font);
    font-size: 13px;
}

.table_wrapper table {
    width: 100%;
    border-collapse: collapse;
    border: 0;
}

.table_wrapper td,
.table_wrapper th {
    border: 0;
    border-bottom: 1px solid var(--mr-line-soft);
    padding: 10px 14px;
    line-height: 20px;
}

.table_wrapper th {
    background: var(--mr-soft);
    color: var(--mr-navy);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    border-bottom: 2px solid var(--mr-line);
    white-space: nowrap;
}

.table_wrapper td,
.table_wrapper tr.second td {
    background: #fff;
    color: var(--mr-text);
}

.table_wrapper tr.first td { background: #FAFBFD; }

.table_wrapper tr.first:hover td,
.table_wrapper tr.second:hover td { background: #F1F6FB; }

.table_wrapper td a { color: var(--mr-navy); font-weight: 600; }
.table_wrapper td a:hover { color: var(--mr-orange); }

.actions_menu {
    width: auto;
    overflow: visible;
}

.actions_menu ul {
    float: none;
    width: auto;
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.actions_menu li { float: none; padding: 0 12px 0 0; }

.actions_menu a,
.actions_menu a:visited { color: var(--mr-navy); font-size: 12px; }
.actions_menu a:hover { color: var(--mr-orange); }

/* ---------- Pager ------------------------------------------------------- */

.pagination {
    width: auto;
    margin: 0;
    padding: 12px 14px;
    overflow: hidden;
    line-height: 28px;
    color: var(--mr-muted);
    font-size: 13px;
    border-top: 1px solid var(--mr-line-soft);
    background: #FBFCFE;
}

.pagination .page_no { display: none; }

.pag_list li {
    padding: 0 8px 0 0;
    color: var(--mr-muted);
    font-weight: 400;
}

.pag_list a.button,
.pag_list a.button:link,
.pag_list a.button:visited,
.pag_list a.button:active {
    background: #fff;
    border: 1px solid #C5D0DD;
    border-radius: 6px;
    color: var(--mr-navy) !important;
    font-size: 12px;
}

.pag_list a.button span,
.pag_list a.button span span { background: none; }

.pag_list a.button span span {
    height: 26px;
    line-height: 26px;
    padding: 0 11px;
}

.pag_list a.button:hover {
    background: var(--mr-navy);
    border-color: var(--mr-navy);
    color: #fff !important;
}

.pag_list a.button:hover * { text-decoration: none; }

/* ---------- Dashboard --------------------------------------------------- */

.mr-dash-hero {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 26px 28px;
    margin: 0 0 22px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(120deg, var(--mr-navy) 0%, var(--mr-navy-deep) 100%);
    box-shadow: 0 6px 18px rgba(18, 48, 75, .18);
    position: relative;
    overflow: hidden;
}

.mr-dash-hero:after {
    content: "";
    position: absolute;
    right: -70px;
    top: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}

.mr-dash-hero img { width: 60px; height: 60px; border-radius: 14px; flex: none; }

.mr-dash-hero h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
}

.mr-dash-hero p { margin: 0; padding: 0; color: #C9D8E8; font-size: 14px; }

.mr-dash-label {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mr-muted);
}

.mr-dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
}

a.mr-dash-card,
a.mr-dash-card:link,
a.mr-dash-card:visited {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--mr-line);
    border-radius: 12px;
    color: var(--mr-text);
    box-shadow: 0 2px 6px rgba(30, 41, 59, .04);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

a.mr-dash-card:hover {
    transform: translateY(-2px);
    border-color: var(--mr-navy);
    box-shadow: 0 8px 20px rgba(31, 78, 121, .14);
    color: var(--mr-text);
}

.mr-dash-icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--mr-soft);
    color: var(--mr-navy);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mr-dash-icon svg { width: 22px; height: 22px; }

a.mr-dash-card:hover .mr-dash-icon { background: var(--mr-orange); color: #fff; }

.mr-dash-card strong {
    display: block;
    margin: 1px 0 3px;
    font-size: 15px;
    font-weight: 600;
    color: var(--mr-navy);
}

.mr-dash-card span.mr-dash-text {
    display: block;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--mr-muted);
}

/* the menu hides sections for restricted logins; mirror that on the cards */
#site_area:not(:has(div[id$="ddtopmenubar"])) .mr-dash-full { display: none !important; }
#site_area:not(:has(div[id$="ddtopmenubar"])):not(:has(div[id$="divUser"])) .mr-dash-users { display: none !important; }

/* ---------- Footer ------------------------------------------------------ */

#footer { padding: 0; }

#footer_inner {
    height: auto;
    padding: 14px 24px;
    background: var(--mr-navy-deep);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.copy_right_inner {
    float: none;
    padding: 0;
    color: #A9BDD2;
    font: 12px var(--mr-font);
}

.footer_links {
    float: none;
    font: 12px var(--mr-font);
}

#footer .footer_links a:link,
#footer .footer_links a:visited,
#footer .footer_links a:active {
    color: #DCE6F1;
    padding: 0 0 0 16px;
}

#footer .footer_links a:hover { color: var(--mr-orange); text-decoration: none; }

/* ==========================================================================
   Login page
   ========================================================================== */

body.mr-login-body { background: var(--mr-bg); }

.mr-login {
    display: flex;
    min-height: 100vh;
}

.mr-login-brand {
    flex: 1.15 1 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 64px;
    color: #fff;
    background: linear-gradient(150deg, #24598A 0%, var(--mr-navy) 45%, var(--mr-navy-deep) 100%);
}

.mr-login-brand:before,
.mr-login-brand:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.mr-login-brand:before {
    width: 520px;
    height: 520px;
    right: -210px;
    top: -190px;
    background: rgba(255, 255, 255, .06);
}

.mr-login-brand:after {
    width: 420px;
    height: 420px;
    left: -170px;
    bottom: -220px;
    border: 60px solid rgba(255, 255, 255, .05);
}

.mr-login-brand > * { position: relative; z-index: 1; }

.mr-login-logo { width: 320px; max-width: 80%; height: auto; display: block; }

.mr-login-pitch h1 {
    margin: 0 0 14px;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 600;
    color: #fff;
    max-width: 480px;
}

.mr-login-pitch h1 em { font-style: normal; color: #F6A46B; }

.mr-login-pitch p {
    margin: 0 0 26px;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #C9D8E8;
    max-width: 460px;
}

.mr-login-points { margin: 0; padding: 0; list-style: none; }

.mr-login-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    font-size: 14px;
    color: #E6EEF6;
}

.mr-login-points li:before {
    content: "";
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--mr-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/13px no-repeat;
}

.mr-login-foot { font-size: 12px; color: #9FB6CD; }

.mr-login-panel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--mr-bg);
}

.mr-login-card {
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
    padding: 36px 36px 30px;
    background: #fff;
    border: 1px solid var(--mr-line);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(31, 78, 121, .12);
}

.mr-login-card-icon { width: 56px; height: 56px; border-radius: 13px; display: block; margin: 0 0 18px; }

.mr-login-card h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 600;
    color: var(--mr-ink);
}

.mr-login-sub {
    margin: 0 0 24px;
    padding: 0;
    font-size: 14px;
    color: var(--mr-muted);
}

.mr-login-card .errors:empty { display: none; }

.mr-field { margin: 0 0 16px; }

.mr-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mr-text);
}

.mr-field .enrouge { color: var(--mr-orange); }

.mr-login-card input.input_box {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 44px;
    padding: 0 12px;
    font: 14px var(--mr-font);
    color: var(--mr-ink);
    background: #fff;
    border: 1px solid #C5D0DD;
    border-radius: 8px;
    outline: 0;
    transition: border-color .15s, box-shadow .15s;
}

.mr-login-card input.input_box:focus {
    border-color: var(--mr-navy);
    box-shadow: 0 0 0 3px rgba(31, 78, 121, .16);
}

.mr-field-error {
    display: block;
    margin: 5px 0 0;
    font: 12px var(--mr-font) !important;
    color: #C0392B !important;
}

.mr-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 22px;
    font-size: 13px;
    color: var(--mr-muted);
}

.mr-check input { margin: 0; width: 15px; height: 15px; accent-color: var(--mr-navy); }

.mr-btn-primary {
    display: block;
    width: 100%;
    height: 46px;
    font: 600 15px var(--mr-font);
    color: #fff;
    background: var(--mr-navy);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s, box-shadow .15s;
}

.mr-btn-primary:hover {
    background: var(--mr-navy-dark);
    box-shadow: 0 6px 16px rgba(31, 78, 121, .28);
}

.mr-login-error {
    margin: 16px 0 0;
    padding: 10px 12px;
    font-size: 13px;
    color: #A93226;
    background: #FDECEA;
    border: 1px solid #F5C6C0;
    border-radius: 8px;
}

.mr-login-error:empty { display: none; }

.mr-login-note { margin: 18px 0 0; font-size: 12px; color: var(--mr-muted); text-align: center; }

/* "already logged in" confirmation */
.mr-login-body .modalBackground { background-color: var(--mr-navy-deep); opacity: .55; filter: alpha(opacity=55); }

.mr-login-body .modalPopup {
    width: 520px;
    max-width: 92%;
    height: auto;
    padding: 0 24px 24px;
    background: #fff;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(18, 48, 75, .35);
    font: 15px/1.5 var(--mr-font);
    color: var(--mr-ink);
}

.mr-login-body .modalPopup .close {
    display: inline-block;
    padding: 8px 2px 0;
    font-size: 22px;
    line-height: 1;
    color: var(--mr-muted);
    cursor: pointer;
}

.mr-login-body .modalPopup input[type=submit] {
    height: 40px;
    font: 600 14px var(--mr-font);
    color: #fff;
    background: var(--mr-navy);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.mr-login-body .modalPopup input[type=submit][id$="btnno"] { background: #94A3B8; }

@media (max-width: 900px) {
    .mr-login { flex-direction: column; }
    .mr-login-brand { flex: none; padding: 28px 24px; }
    .mr-login-pitch, .mr-login-foot { display: none; }
    .mr-login-logo { width: 220px; }
    .mr-login-panel { flex: 1 0 auto; justify-content: flex-start; padding-top: 28px; }
}
