/* ==========================================================================
   Admin Template 3 — Executive Academic SaaS Theme (Sneat Pro / Stripe Inspired)
   Multi-Journal Dynamic Color System via --adm3-primary / --adm3-primary-rgb
   ========================================================================== */

:root {
    --adm3-primary: #014495;
    --adm3-primary-dark: #0F2044;
    --adm3-primary-mid: #1A3260;
    --adm3-primary-light: #243B7A;
    --adm3-primary-rgb: 1, 68, 149;
    --adm3-primary-dark-rgb: 15, 32, 68;

    --adm3-bg: #f6f7fb;
    --adm3-surface: #ffffff;
    --adm3-surface-subtle: #f8fafc;
    --adm3-border: #e7eaf0;
    --adm3-border-strong: #d5dce6;
    --adm3-text: #334155;
    --adm3-heading: #0f172a;
    --adm3-muted: #64748b;
    --adm3-subtle: #94a3b8;

    --adm3-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --adm3-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.03);
    --adm3-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.06);
    --adm3-radius: 12px;
    --adm3-radius-sm: 8px;
    --adm3-sidebar-w: 256px;
    --adm3-sidebar-mini-w: 64px;
}

/* ─── BASE TYPOGRAPHY ────────────────────────────────────────────────────── */
body.admin-template-3 {
    background-color: var(--adm3-bg) !important;
    color: var(--adm3-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13.75px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.admin-template-3 h1,
.admin-template-3 h2,
.admin-template-3 h3,
.admin-template-3 h4,
.admin-template-3 .h1,
.admin-template-3 .h2,
.admin-template-3 .h3,
.admin-template-3 .h4,
.admin-template-3 .panel-title,
.admin-template-3 .box-title,
.admin-template-3 .modal-title,
.admin-template-3 .logo-brand-text,
.admin-template-3 .small-box h3,
.admin-template-3 .info-box-number {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif !important;
    letter-spacing: -0.018em;
}

.admin-template-3 button,
.admin-template-3 input,
.admin-template-3 select,
.admin-template-3 textarea,
.admin-template-3 .btn,
.admin-template-3 .form-control,
.admin-template-3 .table,
.admin-template-3 .dropdown-menu,
.admin-template-3 .sidebar-menu,
.admin-template-3 .pagination,
.admin-template-3 .select2-container,
.admin-template-3 .select2-container * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.admin-template-3 a {
    color: var(--adm3-primary);
    transition: color 0.15s ease;
}

.admin-template-3 a:hover,
.admin-template-3 a:focus {
    color: var(--adm3-primary-dark);
    text-decoration: none;
}

/* Disable legacy custom.css white diagonal button shine */
.admin-template-3 .btn:after,
.admin-template-3 .badge:after,
.admin-template-3 .label:after {
    content: none !important;
    display: none !important;
}

/* ─── SHELL & CANVAS ─────────────────────────────────────────────────────── */
.admin-template-3 .wrapper,
.skin-blue.admin-template-3 .wrapper,
.admin-template-3 .content-wrapper,
.admin-template-3 .right-side {
    background-color: var(--adm3-bg) !important;
}

.admin-template-3 .wrapper {
    min-height: 100vh;
    overflow-x: clip;
}

.admin-template-3 .content-wrapper,
.admin-template-3 .right-side {
    margin-left: var(--adm3-sidebar-w) !important;
    min-height: calc(100vh - 76px) !important;
    padding: 16px 26px 32px;
    transition: margin-left 0.22s ease, transform 0.22s ease;
}

.admin-template-3 .content {
    padding: 0 !important;
}

.admin-template-3 .content-header {
    background: transparent;
    border-bottom: 0;
    padding: 4px 0 16px;
}

.admin-template-3 .content-header > h1 {
    color: var(--adm3-heading);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.admin-template-3 .main-footer {
    background: transparent;
    border-top: 1px solid var(--adm3-border);
    color: var(--adm3-muted);
    font-size: 12px;
    margin-left: var(--adm3-sidebar-w) !important;
    padding: 14px 26px;
    text-transform: none;
}

/* ─── HEADER & STICKY FLOATING FROSTED TOPBAR ────────────────────────────── */
.admin-template-3 .main-header {
    height: auto;
    max-height: none;
    position: sticky;
    top: 0;
    z-index: 1045;
    background: transparent;
    pointer-events: none;
}

.admin-template-3 .main-header .logo,
.admin-template-3 .main-header .navbar {
    pointer-events: auto;
}

/* Fixed brand header pinned cleanly at top of fixed sidebar */
.admin-template-3 .main-header .logo,
.skin-blue.admin-template-3 .main-header .logo,
.skin-blue.admin-template-3 .main-header .logo:hover {
    background: var(--adm3-surface) !important;
    border-bottom: 1px solid #f1f4f9;
    border-right: 1px solid var(--adm3-border);
    color: var(--adm3-heading) !important;
    height: 68px;
    left: 0;
    line-height: normal;
    padding: 0 16px;
    position: fixed;
    text-align: left;
    top: 0;
    transition: width 0.22s ease;
    width: var(--adm3-sidebar-w);
    z-index: 1040;
}

.admin-template-3 .main-header .logo .logo-lg {
    justify-content: flex-start !important;
    gap: 11px !important;
    padding: 0 !important;
}

.admin-template-3 .main-header .logo .logo-brand-image {
    background: rgba(var(--adm3-primary-rgb), 0.06);
    border: 1px solid rgba(var(--adm3-primary-rgb), 0.14);
    border-radius: 10px;
    height: 38px !important;
    padding: 3px;
    width: 38px !important;
}

.admin-template-3 .main-header .logo .logo-brand-stack {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-template-3 .main-header .logo .logo-brand-text {
    color: var(--adm3-heading);
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    max-width: 170px !important;
}

.admin-template-3 .main-header .logo .logo-brand-sub {
    color: var(--adm3-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Floating frosted top navbar */
.admin-template-3 .main-header .navbar,
.skin-blue.admin-template-3 .main-header .navbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: var(--adm3-radius);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.03);
    display: flex;
    justify-content: space-between;
    margin: 12px 26px 4px calc(var(--adm3-sidebar-w) + 26px);
    min-height: 58px;
    padding: 0 10px;
    transition: margin-left 0.22s ease;
}

.admin-template-3 .main-header .navbar:before,
.admin-template-3 .main-header .navbar:after {
    display: none;
}

.admin-template-3 .main-header .sidebar-toggle,
.skin-blue.admin-template-3 .main-header .navbar .sidebar-toggle {
    align-items: center;
    border-radius: var(--adm3-radius-sm);
    color: var(--adm3-text) !important;
    display: inline-flex;
    flex: 0 0 auto;
    float: none;
    height: 36px;
    justify-content: center;
    margin: 0 8px 0 2px;
    padding: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
    width: 36px;
}

.admin-template-3 .main-header .sidebar-toggle:hover,
.admin-template-3 .main-header .sidebar-toggle:focus,
.skin-blue.admin-template-3 .main-header .navbar .sidebar-toggle:hover,
.skin-blue.admin-template-3 .main-header .navbar .sidebar-toggle:focus {
    background: rgba(var(--adm3-primary-rgb), 0.1) !important;
    color: var(--adm3-primary) !important;
}

/* Quick Jump Command Bar Trigger */
.adm3-cmd-trigger {
    align-items: center;
    background: var(--adm3-surface-subtle);
    border: 1px solid var(--adm3-border);
    border-radius: 9px;
    color: var(--adm3-muted);
    cursor: pointer;
    display: inline-flex;
    flex: 1 1 auto;
    font-size: 13px;
    gap: 8px;
    height: 38px;
    max-width: 340px;
    margin-right: auto;
    padding: 0 10px 0 12px;
    text-align: left;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.adm3-cmd-trigger:hover,
.adm3-cmd-trigger:focus {
    background: #ffffff;
    border-color: rgba(var(--adm3-primary-rgb), 0.35);
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.08);
    color: var(--adm3-text);
    outline: none;
}

.adm3-cmd-trigger i {
    color: var(--adm3-subtle);
    font-size: 15px;
}

.adm3-cmd-placeholder {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm3-cmd-kbd {
    background: #ffffff;
    border: 1px solid var(--adm3-border);
    border-radius: 5px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
    color: var(--adm3-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
}

/* Command Palette Modal */
.adm3-cmd-backdrop {
    align-items: flex-start;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    inset: 0;
    justify-content: center;
    padding: 12vh 16px 24px;
    position: fixed;
    z-index: 2000;
}

.adm3-cmd-modal {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    max-width: 540px;
    overflow: hidden;
    width: 100%;
}

.adm3-cmd-head {
    align-items: center;
    border-bottom: 1px solid var(--adm3-border);
    display: flex;
    gap: 10px;
    padding: 12px 16px;
}

.adm3-cmd-head i {
    color: var(--adm3-primary);
    font-size: 18px;
}

.adm3-cmd-head input {
    border: 0;
    color: var(--adm3-heading);
    flex: 1 1 auto;
    font-size: 14.5px;
    outline: none;
}

.adm3-cmd-head button {
    background: transparent;
    border: 0;
    color: var(--adm3-muted);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 0 4px;
}

.adm3-cmd-list {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
}

.adm3-cmd-item {
    align-items: center;
    border-radius: 8px;
    color: var(--adm3-text);
    display: flex;
    justify-content: space-between;
    padding: 9px 12px;
    transition: background-color 0.12s ease;
}

.adm3-cmd-item:hover,
.adm3-cmd-item.is-focused {
    background: rgba(var(--adm3-primary-rgb), 0.08);
    color: var(--adm3-primary);
}

.adm3-cmd-item-label {
    font-size: 13.5px;
    font-weight: 500;
}

.adm3-cmd-item-group {
    background: #f1f5f9;
    border-radius: 999px;
    color: var(--adm3-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
}

.adm3-cmd-empty {
    color: var(--adm3-muted);
    padding: 24px 12px;
    text-align: center;
}

/* Navbar right action items */
.admin-template-3 .main-header .navbar-custom-menu {
    float: none;
    margin-left: auto;
}

.admin-template-3 .main-header .navbar-custom-menu > .navbar-nav {
    align-items: center;
    display: flex;
    float: none;
    gap: 2px;
}

.admin-template-3 .main-header .navbar .nav > li > a,
.skin-blue.admin-template-3 .main-header .navbar .nav > li > a {
    align-items: center;
    border-left: 0 !important;
    border-radius: var(--adm3-radius-sm);
    color: var(--adm3-text) !important;
    display: inline-flex;
    gap: 7px;
    height: 38px;
    line-height: 1;
    margin: 0;
    padding: 0 11px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-template-3 .main-header .navbar .nav > li > a:hover,
.admin-template-3 .main-header .navbar .nav > li.open > a,
.skin-blue.admin-template-3 .main-header .navbar .nav > li > a:hover,
.skin-blue.admin-template-3 .main-header .navbar .nav > li.open > a {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .notifications-menu > a > .label {
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    right: 3px;
    top: 3px;
}

.adm3-header-swatch {
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
    display: inline-block;
    height: 14px;
    width: 14px;
}

.adm3-swatch-link {
    border: 2px solid rgba(15, 23, 42, 0.12);
    border-radius: 50%;
    display: inline-block;
    height: 24px;
    padding: 0 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    width: 24px;
}

.adm3-swatch-link:hover {
    transform: scale(1.12);
}

.adm3-swatch-link.is-active {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px var(--adm3-heading);
}

.adm3-avatar-monogram {
    align-items: center;
    background: linear-gradient(135deg, var(--adm3-primary) 0%, var(--adm3-primary-dark) 100%);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(var(--adm3-primary-rgb), 0.3);
    color: #ffffff;
    display: inline-flex;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    height: 30px;
    justify-content: center;
    letter-spacing: 0.02em;
    width: 30px;
}

.adm3-avatar-monogram--lg {
    border: 3px solid rgba(255, 255, 255, 0.3);
    font-size: 26px;
    height: 76px;
    margin: 6px auto 10px;
    width: 76px;
}

.admin-template-3 .main-header .navbar .nav > li.user > a > img {
    border: 2px solid rgba(var(--adm3-primary-rgb), 0.25);
    float: none;
    height: 30px;
    margin: 0;
    width: 30px;
}

.admin-template-3 .navbar-nav > .user-menu > .dropdown-menu,
.admin-template-3 .admin-template-menu .dropdown-menu,
.admin-template-3 .notifications-menu .dropdown-menu {
    border: 1px solid var(--adm3-border);
    border-radius: var(--adm3-radius);
    box-shadow: var(--adm3-shadow-md);
    margin-top: 8px;
    overflow: hidden;
}

.skin-blue.admin-template-3 .main-header li.user-header {
    background: linear-gradient(135deg, var(--adm3-primary-dark) 0%, var(--adm3-primary) 100%) !important;
    height: auto;
    padding: 18px 16px;
}

.admin-template-3 .admin-template-menu .dropdown-menu {
    min-width: 264px;
}

.admin-template-3 .admin-template-switcher li > a {
    border-radius: 0;
    padding: 10px 14px;
}

.admin-template-3 .admin-template-switcher li > a strong,
.admin-template-3 .admin-template-switcher li > a small {
    display: block;
}

.admin-template-3 .admin-template-switcher li > a small {
    color: var(--adm3-muted);
    font-size: 11.5px;
    margin-top: 2px;
}

.admin-template-3 .admin-template-switcher li.active > a {
    background: rgba(var(--adm3-primary-rgb), 0.09);
    color: var(--adm3-primary);
}

/* ─── FIXED INDEPENDENTLY-SCROLLABLE WHITE SIDEBAR ───────────────────────── */
.admin-template-3 .main-sidebar,
.admin-template-3 .left-side,
.skin-blue.admin-template-3 .main-sidebar,
.skin-blue.admin-template-3 .left-side {
    background: var(--adm3-surface) !important;
    border-right: 1px solid var(--adm3-border);
    bottom: 0;
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.025);
    height: 100vh;
    left: 0;
    padding-top: 68px;
    position: fixed;
    top: 0;
    transition: width 0.22s ease, transform 0.22s ease;
    width: var(--adm3-sidebar-w);
    z-index: 1030;
}

.admin-template-3 .sidebar {
    height: calc(100vh - 68px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 4px 0 28px;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.25) transparent;
}

.admin-template-3 .sidebar::-webkit-scrollbar {
    width: 5px;
}

.admin-template-3 .sidebar::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.22);
    border-radius: 999px;
}

.admin-template-3 .sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-template-3 .sidebar-search {
    border-bottom: 1px solid #f1f4f9;
    padding: 10px 14px 12px;
}

.admin-template-3 .sidebar-form,
.skin-blue.admin-template-3 .sidebar-form {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.admin-template-3 .sidebar-form .input-group {
    align-items: center;
    background: var(--adm3-surface-subtle);
    border: 1px solid var(--adm3-border);
    border-radius: var(--adm3-radius-sm);
    display: flex;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    width: 100%;
}

.admin-template-3 .sidebar-form .input-group:focus-within {
    background: #ffffff;
    border-color: var(--adm3-primary);
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.1);
}

.admin-template-3 .sidebar-form .input-group-btn {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    width: auto;
}

.admin-template-3 .sidebar-form .btn,
.skin-blue.admin-template-3 .sidebar-form .btn {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--adm3-subtle) !important;
    height: 34px;
    line-height: 1;
    padding: 0 6px 0 10px;
}

.admin-template-3 .sidebar-form .form-control,
.skin-blue.admin-template-3 .sidebar-form input[type="text"],
.skin-blue.admin-template-3 .sidebar-form input[type="text"]:focus {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--adm3-heading) !important;
    flex: 1 1 auto;
    font-size: 12.75px !important;
    height: 34px;
    min-height: 34px;
    padding: 5px 10px 5px 2px;
    width: 100%;
}

.admin-template-3 .sidebar-form .form-control::placeholder {
    color: var(--adm3-subtle);
}

.admin-template-3 .sidebar-menu {
    list-style: none;
    margin: 4px 0 0;
    padding: 0 12px !important;
}

.admin-template-3 .sidebar-menu > li {
    margin: 0 0 2px;
    padding: 0;
    position: relative;
}

/* Crisp uniform slate icons overriding custom.css rainbow nth-child */
.admin-template-3 .sidebar ul li a i {
    color: #64748b !important;
}

.admin-template-3 .sidebar-menu > li.header,
.skin-blue.admin-template-3 .sidebar-menu > li.header {
    background: transparent !important;
    color: #94a3b8 !important;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 14px 0 5px;
    padding: 10px 10px 3px;
    position: relative;
    text-transform: uppercase;
}

.admin-template-3 .sidebar-menu > li.header:first-child {
    margin-top: 4px;
    padding-top: 4px;
}

.admin-template-3 .sidebar-menu > li.header:not(:first-child):before {
    background: #eef2f6;
    content: "";
    height: 1px;
    left: 10px;
    position: absolute;
    right: 10px;
    top: 0;
}

.admin-template-3 .sidebar-menu > li > a,
.skin-blue.admin-template-3 .sidebar-menu > li > a {
    border-left: 0 !important;
    border-radius: var(--adm3-radius-sm);
    color: #334155 !important;
    display: block;
    font-size: 13.25px;
    font-weight: 500;
    overflow: hidden;
    padding: 8.5px 28px 8.5px 11px;
    position: relative;
    text-overflow: ellipsis;
    transition: background-color 0.14s ease, color 0.14s ease;
    white-space: nowrap;
}

.admin-template-3 .sidebar-menu > li > a:hover,
.skin-blue.admin-template-3 .sidebar-menu > li:hover > a {
    background: #f1f5f9 !important;
    color: var(--adm3-heading) !important;
}

.admin-template-3 .sidebar-menu > li.active > a,
.admin-template-3 .sidebar-menu > li.menu-open > a,
.skin-blue.admin-template-3 .sidebar-menu > li.active > a,
.skin-blue.admin-template-3 .sidebar-menu > li.menu-open > a {
    background: rgba(var(--adm3-primary-rgb), 0.1) !important;
    color: var(--adm3-primary) !important;
    font-weight: 600;
}

/* Signature crisp vertical active edge indicator */
.admin-template-3 .sidebar-menu > li.active:after {
    background: var(--adm3-primary);
    border-radius: 4px 0 0 4px;
    content: "";
    height: 30px;
    position: absolute;
    right: -12px;
    top: 4px;
    width: 3.5px;
}

.admin-template-3 .sidebar-menu > li.active > a > i,
.admin-template-3 .sidebar-menu > li.menu-open > a > i,
.admin-template-3 .sidebar-menu > li:hover > a > i {
    color: var(--adm3-primary) !important;
}

.admin-template-3 .sidebar-menu > li > a > .adm3-nav-ic,
.admin-template-3 .sidebar-menu > li > a > .fa {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    margin-right: 10px;
    text-align: center;
    vertical-align: -2px;
    width: 19px;
}

.admin-template-3 .sidebar-menu > li > a > .pull-right-container {
    margin-top: -7px;
    position: absolute;
    right: 9px;
    top: 50%;
}

.admin-template-3 .sidebar-menu > li > a > .pull-right-container > i {
    color: #94a3b8 !important;
    font-size: 13px;
    margin-right: 0;
    transition: transform 0.2s ease, color 0.15s ease;
    width: auto;
}

.admin-template-3 .sidebar-menu > li.active > a > .pull-right-container > i,
.admin-template-3 .sidebar-menu > li.menu-open > a > .pull-right-container > i {
    color: var(--adm3-primary) !important;
}

.admin-template-3 .sidebar-menu > li.treeview.active > a > .pull-right-container > .fa-angle-left,
.admin-template-3 .sidebar-menu > li.treeview.menu-open > a > .pull-right-container > .fa-angle-left {
    -webkit-transform: rotate(-90deg);
    -ms-transform: rotate(-90deg);
    transform: rotate(-90deg);
}

/* Clean Submenu Tree */
.admin-template-3 .treeview-menu,
.skin-blue.admin-template-3 .sidebar-menu > li > .treeview-menu {
    background: transparent !important;
    margin: 2px 0 6px !important;
    padding: 2px 0 4px !important;
    position: relative;
}

.admin-template-3 .treeview-menu > li {
    margin: 1px 0;
    position: relative;
}

.admin-template-3 .treeview-menu > li > a,
.skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li > a {
    border-radius: 7px;
    color: var(--adm3-muted) !important;
    display: block;
    font-size: 12.75px;
    overflow: hidden;
    padding: 7px 12px 7px 38px;
    position: relative;
    text-overflow: ellipsis;
    transition: background-color 0.14s ease, color 0.14s ease;
    white-space: nowrap;
}

.admin-template-3 .treeview-menu > li > a:before {
    background: #cbd5e1;
    border-radius: 50%;
    content: "";
    height: 5px;
    left: 20px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    width: 5px;
}

.admin-template-3 .treeview-menu > li > a:hover,
.skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li > a:hover {
    background: #f8fafc !important;
    color: var(--adm3-heading) !important;
}

.admin-template-3 .treeview-menu > li.active > a,
.skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li.active > a {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    color: var(--adm3-primary) !important;
    font-weight: 600;
}

.admin-template-3 .treeview-menu > li.active > a:before {
    background: var(--adm3-primary);
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.2);
    height: 6px;
    width: 6px;
}

/* ─── COLLAPSED SIDEBAR RAIL (DESKTOP) ───────────────────────────────────── */
@media (min-width: 768px) {
    .sidebar-mini.sidebar-collapse.admin-template-3 .main-header .logo {
        padding: 0;
        width: var(--adm3-sidebar-mini-w) !important;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .main-header .navbar {
        margin-left: calc(var(--adm3-sidebar-mini-w) + 26px) !important;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .content-wrapper,
    .sidebar-mini.sidebar-collapse.admin-template-3 .right-side,
    .sidebar-mini.sidebar-collapse.admin-template-3 .main-footer {
        margin-left: var(--adm3-sidebar-mini-w) !important;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .main-sidebar,
    .sidebar-mini.sidebar-collapse.admin-template-3 .left-side {
        overflow: visible !important;
        width: var(--adm3-sidebar-mini-w) !important;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar {
        overflow: visible !important;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-search,
    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li.header,
    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li.active:after {
        display: none !important;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu {
        padding: 6px 8px !important;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li > a {
        overflow: visible;
        padding: 10px 0;
        text-align: center;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li > a > .adm3-nav-ic,
    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li > a > .fa {
        margin-right: 0;
        width: auto;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li:hover > a > span:not(.pull-right) {
        background: #ffffff;
        border: 1px solid var(--adm3-border);
        border-left: 0;
        border-radius: 0 10px 0 0;
        box-shadow: var(--adm3-shadow-md);
        color: var(--adm3-primary);
        font-weight: 600;
        left: 56px;
        margin-left: 0;
        padding: 10px 14px;
        text-align: left;
        width: 220px;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li:hover > .treeview-menu {
        background: #ffffff !important;
        border: 1px solid var(--adm3-border);
        border-left: 0;
        border-radius: 0 0 10px 0;
        box-shadow: var(--adm3-shadow-md);
        left: 56px;
        margin-left: 0 !important;
        padding: 6px 8px !important;
        width: 220px;
    }
}

/* ─── EXECUTIVE HERO WORKSPACE HEADER (HOME) ─────────────────────────────── */
.adm3-hero-header {
    padding: 6px 0 18px !important;
}

.adm3-hero-bar {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
}

.adm3-hero-eyebrow {
    align-items: center;
    color: var(--adm3-primary);
    display: inline-flex;
    font-size: 11.5px;
    font-weight: 700;
    gap: 7px;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.adm3-hero-dot {
    background: var(--adm3-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.18);
    display: inline-block;
    height: 7px;
    width: 7px;
}

.adm3-hero-bar h1 {
    color: var(--adm3-heading);
    font-size: 25px !important;
    font-weight: 800 !important;
    line-height: 1.2;
    margin: 0 0 3px !important;
}

.adm3-hero-sub {
    color: var(--adm3-muted);
    font-size: 13.5px;
    margin: 0;
}

.adm3-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.adm3-hero-actions .btn i {
    font-size: 14px;
    margin-right: 4px;
    vertical-align: -2px;
}

/* ─── EQUAL-HEIGHT KPI CARDS & ELEVATED SURFACES ─────────────────────────── */
.admin-template-3 .adm3-kpi-row {
    display: flex;
    flex-wrap: wrap;
}

.admin-template-3 .adm3-kpi-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.admin-template-3 .adm3-kpi-row .small-box {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: space-between;
}

.admin-template-3 .small-box {
    background: var(--adm3-surface) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    border-bottom: 3px solid var(--adm3-primary) !important;
    border-radius: var(--adm3-radius) !important;
    box-shadow: var(--adm3-shadow-sm) !important;
    color: var(--adm3-heading) !important;
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.admin-template-3 .small-box:hover {
    box-shadow: var(--adm3-shadow-md) !important;
    transform: translateY(-2px);
}

.admin-template-3 .small-box.bg-aqua { border-bottom-color: var(--adm3-primary) !important; }
.admin-template-3 .small-box.bg-yellow,
.admin-template-3 .small-box.bg-orange { border-bottom-color: #f59e0b !important; }
.admin-template-3 .small-box.bg-purple { border-bottom-color: #6366f1 !important; }
.admin-template-3 .small-box.bg-green { border-bottom-color: #10b981 !important; }
.admin-template-3 .small-box.bg-red { border-bottom-color: #ef4444 !important; }

.admin-template-3 .small-box > .inner {
    flex: 1 1 auto;
    padding: 20px 68px 16px 20px;
    text-align: left;
}

.admin-template-3 .small-box h3 {
    color: var(--adm3-heading) !important;
    font-size: 30px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 8px;
}

.admin-template-3 .small-box p {
    color: var(--adm3-text) !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 4px;
}

.admin-template-3 .small-box p:last-child {
    color: var(--adm3-muted) !important;
    font-size: 12px !important;
    font-weight: 400;
}

.admin-template-3 .small-box .icon {
    align-items: center;
    background: rgba(var(--adm3-primary-rgb), 0.1);
    border: 1px solid rgba(var(--adm3-primary-rgb), 0.15);
    border-radius: 10px;
    color: var(--adm3-primary) !important;
    display: flex;
    font-size: 19px !important;
    height: 44px;
    justify-content: center;
    opacity: 1 !important;
    right: 18px;
    top: 18px;
    width: 44px;
}

.admin-template-3 .small-box.bg-yellow .icon,
.admin-template-3 .small-box.bg-orange .icon { background: #fffbeb; border-color: #fde68a; color: #d97706 !important; }
.admin-template-3 .small-box.bg-purple .icon { background: #eef2ff; border-color: #c7d2fe; color: #4f46e5 !important; }
.admin-template-3 .small-box.bg-green .icon { background: #ecfdf5; border-color: #a7f3d0; color: #059669 !important; }
.admin-template-3 .small-box.bg-red .icon { background: #fef2f2; border-color: #fecaca; color: #dc2626 !important; }

.admin-template-3 .small-box > .small-box-footer {
    align-items: center;
    background: #fafbfd !important;
    border-top: 1px solid #f1f4f9;
    color: var(--adm3-primary) !important;
    display: flex;
    font-size: 12.25px;
    font-weight: 600;
    justify-content: space-between;
    padding: 9px 18px;
    text-align: left;
}

.admin-template-3 .small-box > .small-box-footer:hover {
    background: rgba(var(--adm3-primary-rgb), 0.06) !important;
    color: var(--adm3-primary-dark) !important;
}

/* Modern .info-box Stat Cards (Article Metrics, Pipeline Dashboard) */
.admin-template-3 .info-box {
    align-items: center;
    background: var(--adm3-surface) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    border-bottom: 3px solid var(--adm3-primary) !important;
    border-radius: var(--adm3-radius) !important;
    box-shadow: var(--adm3-shadow-sm) !important;
    display: flex;
    gap: 14px;
    min-height: 92px;
    padding: 16px 18px;
}

.admin-template-3 .info-box-icon {
    align-items: center;
    border-radius: 10px !important;
    display: inline-flex;
    flex: 0 0 46px;
    float: none;
    font-size: 20px;
    height: 46px;
    justify-content: center;
    line-height: 1;
    width: 46px;
}

.admin-template-3 .info-box-icon.bg-aqua,
.admin-template-3 .info-box-icon.bg-blue {
    background: rgba(var(--adm3-primary-rgb), 0.11) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .info-box-icon.bg-green {
    background: #ecfdf5 !important;
    color: #059669 !important;
}

.admin-template-3 .info-box-icon.bg-purple,
.admin-template-3 .info-box-icon[style*="605ca8"] {
    background: #f3e8ff !important;
    color: #7c3aed !important;
}

.admin-template-3 .info-box-icon.bg-yellow,
.admin-template-3 .info-box-icon.bg-orange {
    background: #fffbeb !important;
    color: #d97706 !important;
}

.admin-template-3 .info-box-icon.bg-red {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

.admin-template-3 .info-box-content {
    flex: 1 1 auto;
    margin-left: 0 !important;
    min-width: 0;
    padding: 0 !important;
}

.admin-template-3 .info-box-text {
    color: var(--adm3-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-template-3 .info-box-number {
    color: var(--adm3-heading);
    font-size: 23px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    line-height: 1.25;
    margin-top: 2px;
}

.admin-template-3 .info-box .progress-description {
    color: var(--adm3-muted);
    font-size: 11.5px;
    margin-top: 2px;
}

/* Elevated Boxes, Panels, Tabs, Charts, Modals */
.admin-template-3 .box,
.admin-template-3 .panel,
.admin-template-3 .nav-tabs-custom,
.admin-template-3 .chart-box,
.admin-template-3 .modal-content {
    background: var(--adm3-surface);
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    border-radius: var(--adm3-radius) !important;
    box-shadow: var(--adm3-shadow-sm) !important;
}

.admin-template-3 .box-header,
.admin-template-3 .panel-heading,
.admin-template-3 .panel-primary > .panel-heading {
    background: var(--adm3-surface) !important;
    border-bottom: 1px solid #eef2f6 !important;
    border-radius: var(--adm3-radius) var(--adm3-radius) 0 0 !important;
    color: var(--adm3-heading) !important;
    padding: 15px 20px !important;
}

.admin-template-3 .box-title,
.admin-template-3 .panel-title,
.admin-template-3 .panel-primary > .panel-heading .panel-title {
    color: var(--adm3-heading) !important;
    font-size: 15.5px;
    font-weight: 700;
}

.admin-template-3 .panel-primary > .panel-heading .nav-tabs > li > a {
    border-radius: 7px;
    color: var(--adm3-muted);
    font-weight: 500;
}

.admin-template-3 .panel-primary > .panel-heading .nav-tabs > li.active > a,
.admin-template-3 .panel-primary > .panel-heading .nav-tabs > li > a:hover {
    background: rgba(var(--adm3-primary-rgb), 0.1);
    border-color: transparent;
    color: var(--adm3-primary);
    font-weight: 600;
}

.admin-template-3 .box-body,
.admin-template-3 .panel-body {
    background: var(--adm3-surface);
    border: 0 !important;
    border-radius: var(--adm3-radius);
    padding: 18px 20px;
}

.admin-template-3 .box-footer,
.admin-template-3 .panel-footer {
    background: #fafbfd;
    border-top: 1px solid #eef2f6;
    border-radius: 0 0 var(--adm3-radius) var(--adm3-radius);
    color: var(--adm3-muted);
    font-size: 12.5px;
    padding: 12px 20px;
}

/* Clean White .nav-tabs-custom Header (Article/Volume/Issue/CMS CRUD pages) */
.admin-template-3 .nav-tabs-custom > .nav-tabs {
    background: #ffffff !important;
    border-bottom: 1px solid var(--adm3-border) !important;
    border-radius: var(--adm3-radius) var(--adm3-radius) 0 0;
    padding: 6px 16px 0;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs > li.header {
    color: var(--adm3-heading) !important;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 40px;
    padding: 0 6px;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs > li {
    border-top: 0 !important;
    margin-bottom: -1px;
    margin-right: 4px;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs > li > a {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 6px 6px 0 0;
    color: var(--adm3-muted) !important;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs > li > a:hover {
    color: var(--adm3-heading) !important;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs > li.active > a,
.admin-template-3 .nav-tabs-custom > .nav-tabs > li.active > a:hover {
    background: rgba(var(--adm3-primary-rgb), 0.06) !important;
    border-bottom: 2px solid var(--adm3-primary) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .nav-tabs-custom > .tab-content {
    background: #ffffff;
    border-radius: 0 0 var(--adm3-radius) var(--adm3-radius);
    padding: 18px 20px;
}

/* Ghost box-tools collapse buttons ONLY (preserve full width for text CTA buttons like CrossRef DOI!) */
.admin-template-3 .box-header .box-tools .btn-box-tool,
.admin-template-3 .box-header .box-tools .btn[data-widget="collapse"],
.admin-template-3 .box-header .box-tools .btn[data-widget="remove"] {
    align-items: center;
    background: #f8fafc !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    color: var(--adm3-muted) !important;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0 !important;
    width: 30px;
}

.admin-template-3 .box-header .box-tools .btn-box-tool:hover,
.admin-template-3 .box-header .box-tools .btn[data-widget="collapse"]:hover,
.admin-template-3 .box-header .box-tools .btn[data-widget="remove"]:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.25) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .box-header > .box-tools {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    margin-left: auto;
    position: static !important;
    right: auto !important;
    top: auto !important;
}

.admin-template-3 .box-header > .box-tools .btn:not(.btn-box-tool):not([data-widget]) {
    height: 32px;
    padding: 0 11px !important;
    width: auto !important;
}

/* Highcharts / Analytics period heading (replaces ugly <u>Last 7 Days</u>) */
.admin-template-3 .box-body center h4 {
    margin: 0 0 12px;
}

.admin-template-3 .box-body center h4 u {
    background: rgba(var(--adm3-primary-rgb), 0.08);
    border: 1px solid rgba(var(--adm3-primary-rgb), 0.16);
    border-radius: 999px;
    color: var(--adm3-primary);
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 4px 12px;
    text-decoration: none !important;
    text-transform: uppercase;
}

/* Submissions Analytics KPI Cards (replaces 6 harsh 2014 solid blocks) */
.admin-template-3 .analytics-kpi {
    background: var(--adm3-surface) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    border-bottom: 3px solid var(--adm3-primary) !important;
    border-radius: var(--adm3-radius) !important;
    box-shadow: var(--adm3-shadow-sm) !important;
    color: var(--adm3-heading) !important;
    padding: 16px 14px !important;
    text-align: left !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.admin-template-3 .analytics-kpi:hover {
    box-shadow: var(--adm3-shadow-md) !important;
    transform: translateY(-2px);
}

.admin-template-3 .analytics-kpi[style*="00a65a"] { border-bottom-color: #10b981 !important; }
.admin-template-3 .analytics-kpi[style*="605ca8"] { border-bottom-color: #6366f1 !important; }
.admin-template-3 .analytics-kpi[style*="dd4b39"] { border-bottom-color: #ef4444 !important; }
.admin-template-3 .analytics-kpi[style*="f39c12"] { border-bottom-color: #f59e0b !important; }
.admin-template-3 .analytics-kpi[style*="00c0ef"] { border-bottom-color: #0ea5e9 !important; }

.admin-template-3 .analytics-kpi .kpi-num {
    color: var(--adm3-heading);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 27px !important;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.admin-template-3 .analytics-kpi .kpi-lbl {
    color: var(--adm3-muted);
    font-size: 11.5px !important;
    font-weight: 600;
    margin-top: 5px !important;
    opacity: 1 !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Chart Box Polish */
.admin-template-3 .chart-box {
    padding: 18px 20px !important;
}

.admin-template-3 .chart-box .chart-title {
    border-bottom: 1px solid #eef2f6 !important;
    color: var(--adm3-heading) !important;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
}

/* ─── UNIFIED 5-TIER EXECUTIVE BUTTON SYSTEM ─────────────────────────────── */
.admin-template-3 .btn {
    border-radius: var(--adm3-radius-sm);
    font-size: 12.75px;
    font-weight: 600;
    line-height: 1.4;
    padding: 7px 13px;
    transition: all 0.15s ease;
}

.admin-template-3 .btn-sm,
.admin-template-3 .btn-group-sm > .btn {
    font-size: 12.25px !important;
    padding: 6px 11px;
}

.admin-template-3 .btn-xs,
.admin-template-3 .btn-group-xs > .btn {
    border-radius: 6px;
    font-size: 11.5px !important;
    font-weight: 600;
    padding: 4px 9px;
}

/* Tier 1: Primary (Solid Brand Accent) */
.admin-template-3 .btn-primary,
.admin-template-3 .btn-primary:active,
.admin-template-3 .article-btn-sort {
    background: var(--adm3-primary) !important;
    border: 1px solid var(--adm3-primary) !important;
    box-shadow: 0 1px 2px rgba(var(--adm3-primary-rgb), 0.22);
    color: #ffffff !important;
}

.admin-template-3 .btn-primary:hover,
.admin-template-3 .btn-primary:focus,
.admin-template-3 .article-btn-sort:hover {
    background: var(--adm3-primary-dark) !important;
    border-color: var(--adm3-primary-dark) !important;
    box-shadow: 0 3px 10px rgba(var(--adm3-primary-rgb), 0.28);
    color: #ffffff !important;
}

/* Tier 2: Secondary Highlight / Info (Soft Brand Tint — Harmonizes with ANY Subdomain Color) */
.admin-template-3 .btn-info,
.admin-template-3 .btn-info:active,
.admin-template-3 .article-management-toolbar .article-btn-bulk-verify {
    background: rgba(var(--adm3-primary-rgb), 0.1) !important;
    border: 1px solid rgba(var(--adm3-primary-rgb), 0.24) !important;
    box-shadow: none !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .btn-info:hover,
.admin-template-3 .btn-info:focus,
.admin-template-3 .article-management-toolbar .article-btn-bulk-verify:hover {
    background: var(--adm3-primary) !important;
    border-color: var(--adm3-primary) !important;
    color: #ffffff !important;
}

/* Tier 3: Neutral / Export Utility (Crisp White + Hairline Border — Zero Skittles!) */
.admin-template-3 .btn-default,
.admin-template-3 .article-management-toolbar .article-btn-supplemental,
.admin-template-3 .article-management-toolbar .article-btn-metadata-xml,
.admin-template-3 .article-management-toolbar .article-btn-metadata-json,
.admin-template-3 .article-management-toolbar .article-btn-citation-txt,
.admin-template-3 .article-management-toolbar .article-btn-bibtex,
.admin-template-3 .article-management-toolbar .article-btn-ris,
.admin-template-3 .article-management-toolbar .article-btn-citation-xml {
    background: #ffffff !important;
    border: 1px solid var(--adm3-border-strong) !important;
    box-shadow: var(--adm3-shadow-xs);
    color: var(--adm3-text) !important;
}

.admin-template-3 .btn-default:hover,
.admin-template-3 .btn-default:focus,
.admin-template-3 .article-management-toolbar .article-btn-supplemental:hover,
.admin-template-3 .article-management-toolbar .article-btn-metadata-xml:hover,
.admin-template-3 .article-management-toolbar .article-btn-metadata-json:hover,
.admin-template-3 .article-management-toolbar .article-btn-citation-txt:hover,
.admin-template-3 .article-management-toolbar .article-btn-bibtex:hover,
.admin-template-3 .article-management-toolbar .article-btn-ris:hover,
.admin-template-3 .article-management-toolbar .article-btn-citation-xml:hover {
    background: rgba(var(--adm3-primary-rgb), 0.06) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.35) !important;
    color: var(--adm3-primary) !important;
}

/* Tier 4: Positive / Success (Refined Soft Emerald -> Solid on Hover) */
.admin-template-3 .btn-success,
.admin-template-3 .btn-success:active {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    box-shadow: none !important;
    color: #047857 !important;
}

.admin-template-3 .btn-success:hover,
.admin-template-3 .btn-success:focus {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

/* Tier 5a: Warning (Refined Soft Amber -> Solid on Hover) */
.admin-template-3 .btn-warning,
.admin-template-3 .btn-warning:active {
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    box-shadow: none !important;
    color: #b45309 !important;
}

.admin-template-3 .btn-warning:hover,
.admin-template-3 .btn-warning:focus {
    background: #d97706 !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
}

/* Tier 5b: Danger / Destructive / Urgent (Refined Soft Rose -> Solid on Hover) */
.admin-template-3 .btn-danger,
.admin-template-3 .btn-danger:active,
.admin-template-3 .article-btn-close {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    box-shadow: none !important;
    color: #b91c1c !important;
}

.admin-template-3 .btn-danger:hover,
.admin-template-3 .btn-danger:focus,
.admin-template-3 .article-btn-close:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Normalize legacy AdminLTE bg-* utility buttons to unified 5-tier palette */
.admin-template-3 .btn.bg-navy,
.admin-template-3 .btn.bg-blue,
.admin-template-3 .btn.bg-light-blue,
.admin-template-3 .btn.bg-purple,
.admin-template-3 .btn.bg-teal {
    background: rgba(var(--adm3-primary-rgb), 0.1) !important;
    border: 1px solid rgba(var(--adm3-primary-rgb), 0.24) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .btn.bg-navy:hover,
.admin-template-3 .btn.bg-blue:hover,
.admin-template-3 .btn.bg-light-blue:hover,
.admin-template-3 .btn.bg-purple:hover,
.admin-template-3 .btn.bg-teal:hover {
    background: var(--adm3-primary) !important;
    border-color: var(--adm3-primary) !important;
    color: #ffffff !important;
}

.admin-template-3 .btn.bg-olive {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #047857 !important;
}

.admin-template-3 .btn.bg-orange {
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    color: #b45309 !important;
}

.admin-template-3 .btn.bg-maroon {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #b91c1c !important;
}

/* ─── PIPELINE DASHBOARD EXECUTIVE POLISH ────────────────────────────────── */
.admin-template-3 .pipeline-wrap {
    padding: 8px 4px 20px;
}

.admin-template-3 .pipeline-title {
    color: var(--adm3-heading);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 800;
}

.admin-template-3 .pipeline-subtitle {
    color: var(--adm3-muted);
    font-size: 13px;
}

.admin-template-3 .summary-card {
    background: var(--adm3-surface) !important;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-bottom: 3px solid var(--adm3-primary);
    border-radius: var(--adm3-radius);
    box-shadow: var(--adm3-shadow-sm);
    padding: 16px 18px;
    text-align: left;
}

.admin-template-3 .summary-card .num {
    color: var(--adm3-heading) !important;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 28px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.admin-template-3 .summary-card .lbl {
    color: var(--adm3-muted);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-top: 6px;
    text-transform: uppercase;
}

.admin-template-3 .stage-card {
    border: 1px solid var(--adm3-border) !important;
    border-radius: 12px !important;
    box-shadow: var(--adm3-shadow-xs);
    min-width: 132px;
    padding: 14px 16px;
}

.admin-template-3 .stage-card[style*="ecf0f1"] {
    background: #f8fafc !important;
    border-color: var(--adm3-border) !important;
    color: var(--adm3-subtle) !important;
}

.admin-template-3 .stage-card[style*="27ae60"] {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #065f46 !important;
}

.admin-template-3 .stage-card[style*="f39c12"] {
    background: #fffbeb !important;
    border-color: #fde68a !important;
    color: #92400e !important;
}

.admin-template-3 .stage-card[style*="e74c3c"] {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #991b1b !important;
}

.admin-template-3 .stage-card .s-count {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 26px;
    font-variant-numeric: tabular-nums;
}

.admin-template-3 .stage-card .s-label {
    font-size: 11.5px;
    font-weight: 600;
    opacity: 0.92;
}

.admin-template-3 .stage-arrow {
    color: #cbd5e1;
    padding: 0 6px;
}

.admin-template-3 .terminal-card {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--adm3-radius);
    box-shadow: var(--adm3-shadow-xs);
}

.admin-template-3 .terminal-card .t-num {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
}

.admin-template-3 .alert-card {
    border-radius: var(--adm3-radius) !important;
    box-shadow: var(--adm3-shadow-xs);
}

/* Consistent Soft Semantic Badges/Labels */
.admin-template-3 .label {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
}

.admin-template-3 .label-primary,
.admin-template-3 .badge.bg-light-blue {
    background-color: rgba(var(--adm3-primary-rgb), 0.11) !important;
    color: var(--adm3-primary) !important;
    font-weight: 700;
}

.admin-template-3 .label-info {
    background-color: #f0f9ff !important;
    color: #0369a1 !important;
}

.admin-template-3 .label-success {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
}

.admin-template-3 .label-warning {
    background-color: #fffbeb !important;
    color: #b45309 !important;
}

.admin-template-3 .label-danger {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
}

.adm3-rate-pill {
    background: #f1f5f9;
    border-radius: 999px;
    color: var(--adm3-heading);
    display: inline-block;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    padding: 2px 8px;
}

.admin-template-3 .nav-pills > li.active > a,
.admin-template-3 .nav-pills > li.active > a:hover,
.admin-template-3 .nav-pills > li.active > a:focus {
    background-color: var(--adm3-primary) !important;
    border-radius: var(--adm3-radius-sm);
}

.admin-template-3 .pagination > li > a {
    border-color: var(--adm3-border);
    color: var(--adm3-text);
    font-size: 12.5px;
    font-weight: 500;
}

.admin-template-3 .pagination > .active > a,
.admin-template-3 .pagination > .active > span,
.admin-template-3 .pagination > .active > a:hover {
    background-color: var(--adm3-primary) !important;
    border-color: var(--adm3-primary) !important;
    color: #ffffff !important;
}

.admin-template-3 .form-control {
    border: 1px solid var(--adm3-border-strong);
    border-radius: var(--adm3-radius-sm);
    box-shadow: var(--adm3-shadow-xs);
    color: var(--adm3-heading);
    font-size: 13.5px;
    min-height: 38px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-template-3 .form-control:focus {
    border-color: var(--adm3-primary);
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.12);
}

.admin-template-3 .input-group-addon {
    background: #f8fafc;
    border-color: var(--adm3-border-strong);
    border-radius: var(--adm3-radius-sm) 0 0 var(--adm3-radius-sm);
    color: var(--adm3-muted);
    font-size: 12px !important;
    font-weight: 600;
    padding: 6px 10px !important;
}

.admin-template-3 .form-group label,
.admin-template-3 .control-label {
    color: var(--adm3-heading);
    font-size: 13px;
    font-weight: 600;
}

/* ─── MODERN BORDERLESS EXECUTIVE TABLES & DATATABLES ────────────────────── */
/* Desktop + Mobile smooth horizontal scroll for wide tables (prevents right clipping!) */
.admin-template-3 .dataTables_wrapper > .row:nth-child(2) {
    margin-left: 0;
    margin-right: 0;
}

.admin-template-3 .dataTables_wrapper > .row:nth-child(2) > [class*="col-"],
.admin-template-3 .table-responsive {
    border: 1px solid var(--adm3-border);
    border-radius: 10px;
    overflow-x: auto;
    padding-left: 0;
    padding-right: 0;
    -webkit-overflow-scrolling: touch;
}

.admin-template-3 .dataTables_wrapper .table-responsive {
    border: 0;
    border-radius: 0;
}

.admin-template-3 .dataTables_wrapper .dataTables_length label,
.admin-template-3 .dataTables_wrapper .dataTables_filter label {
    color: var(--adm3-muted);
    font-size: 12.5px;
    font-weight: 500;
}

.admin-template-3 .dataTables_wrapper .dataTables_length select,
.admin-template-3 .dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--adm3-border-strong);
    border-radius: 8px;
    height: 34px;
    min-height: 34px;
    padding: 4px 10px;
}

.admin-template-3 .dataTables_wrapper .dataTables_info {
    color: var(--adm3-muted);
    font-size: 12.5px;
    padding-top: 12px;
}

/* Override legacy custom.css rigid first/last-child widths & vertical grid cages */
.admin-template-3 table.table-bordered th:first-child,
.admin-template-3 table.table-bordered td:first-child,
.admin-template-3 table.table-bordered th:last-child,
.admin-template-3 table.table-bordered td:last-child {
    border-right-width: 0;
    text-align: inherit;
    width: auto !important;
}

.admin-template-3 .table,
.admin-template-3 table.dataTable {
    border: 0 !important;
    border-collapse: collapse !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
}

.admin-template-3 .table-bordered,
.admin-template-3 .table-bordered > thead > tr > th,
.admin-template-3 .table-bordered > tbody > tr > td,
.admin-template-3 .table-bordered > tfoot > tr > td {
    border-left: 0 !important;
    border-right: 0 !important;
    border-color: #eef2f6 !important;
}

.admin-template-3 .table > thead > tr > th,
.admin-template-3 table.dataTable thead th {
    background: #f8fafc !important;
    border-bottom: 1px solid var(--adm3-border) !important;
    border-top: 0 !important;
    color: var(--adm3-muted) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 11px 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-template-3 table.dataTable thead .sorting,
.admin-template-3 table.dataTable thead .sorting_asc,
.admin-template-3 table.dataTable thead .sorting_desc {
    padding-right: 26px !important;
}

.admin-template-3 table.dataTable thead .sorting:after,
.admin-template-3 table.dataTable thead .sorting_asc:after,
.admin-template-3 table.dataTable thead .sorting_desc:after {
    bottom: 11px;
    opacity: 0.32;
    right: 8px;
}

.admin-template-3 table.dataTable thead .sorting_asc:after,
.admin-template-3 table.dataTable thead .sorting_desc:after {
    color: var(--adm3-primary);
    opacity: 0.95;
}

.admin-template-3 table.dataTable thead .sorting_disabled:after {
    display: none !important;
}

.admin-template-3 .table > tbody > tr > td {
    border-bottom: 1px solid #f1f5f9 !important;
    border-top: 0 !important;
    color: var(--adm3-text);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    padding: 12px 12px;
    vertical-align: middle;
}

.admin-template-3 .table > tbody > tr:last-child > td {
    border-bottom: 0 !important;
}

.admin-template-3 .adm3-compact-table > thead > tr > th {
    padding: 9px 9px;
}

.admin-template-3 .adm3-compact-table > tbody > tr > td {
    font-size: 12.75px;
    padding: 9px 9px;
}

.admin-template-3 .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #ffffff;
}

.admin-template-3 .table-striped > tbody > tr:nth-of-type(even) {
    background-color: #fafbfd;
}

.admin-template-3 .table-hover > tbody > tr:hover,
.admin-template-3 table.dataTable tbody tr:hover {
    background-color: rgba(var(--adm3-primary-rgb), 0.035) !important;
}

.admin-template-3 .modal-header {
    border-bottom: 1px solid #eef2f6;
    padding: 16px 20px;
}

/* Split Editorial Authentication Page styles live at bottom of file for full cascade & dark-mode parity. */

/* ─── MOBILE RESPONSIVE (<= 767px) ───────────────────────────────────────── */
@media (max-width: 767px) {
    .admin-template-3 .main-header {
        position: relative;
        pointer-events: auto;
    }

    .admin-template-3 .main-header .logo,
    .skin-blue.admin-template-3 .main-header .logo {
        border-right: 0;
        height: 54px;
        padding: 0 14px;
        position: relative;
        width: 100%;
    }

    .admin-template-3 .main-header .logo .logo-lg {
        justify-content: center !important;
    }

    .admin-template-3 .main-header .logo .logo-brand-image {
        height: 32px !important;
        width: 32px !important;
    }

    .admin-template-3 .main-header .logo .logo-brand-sub {
        display: none;
    }

    .admin-template-3 .main-header .navbar,
    .skin-blue.admin-template-3 .main-header .navbar {
        border-radius: 0;
        margin: 0 !important;
        min-height: 52px;
        padding: 0 6px;
    }

    .adm3-cmd-trigger {
        max-width: 160px;
        padding: 0 8px;
    }

    .adm3-cmd-kbd {
        display: none;
    }

    .admin-template-3 .main-sidebar,
    .admin-template-3 .left-side,
    .skin-blue.admin-template-3 .main-sidebar,
    .skin-blue.admin-template-3 .left-side {
        height: 100vh;
        padding-top: 106px;
        position: fixed;
        width: var(--adm3-sidebar-w);
        -webkit-transform: translate(-256px, 0);
        -ms-transform: translate(-256px, 0);
        transform: translate(-256px, 0);
    }

    .admin-template-3 .sidebar {
        height: calc(100vh - 106px);
    }

    .admin-template-3.sidebar-open .main-sidebar,
    .admin-template-3.sidebar-open .left-side,
    .skin-blue.admin-template-3.sidebar-open .main-sidebar,
    .skin-blue.admin-template-3.sidebar-open .left-side {
        -webkit-transform: translate(0, 0);
        -ms-transform: translate(0, 0);
        transform: translate(0, 0);
    }

    .admin-template-3.sidebar-open .content-wrapper,
    .admin-template-3.sidebar-open .right-side,
    .admin-template-3.sidebar-open .main-footer {
        -webkit-transform: translate(256px, 0);
        -ms-transform: translate(256px, 0);
        transform: translate(256px, 0);
    }

    .admin-template-3 .content-wrapper,
    .admin-template-3 .right-side,
    .admin-template-3 .main-footer {
        margin-left: 0 !important;
        padding: 12px;
        width: 100%;
    }

    .adm3-hero-bar h1 {
        font-size: 21px !important;
    }

    .admin-template-3 .box-header > .box-tools {
        display: block;
        float: none !important;
        margin-top: 6px;
        position: static;
    }

    .admin-template-3 .box-header > .box-tools .label {
        display: inline-block;
        line-height: 1.4;
        text-align: left;
        white-space: normal;
    }

    .admin-template-3 .dataTables_wrapper > .row:nth-child(2) {
        margin-left: 0;
        margin-right: 0;
    }

    .admin-template-3 .dataTables_wrapper > .row:nth-child(2) > [class*="col-"],
    .admin-template-3 .table-responsive {
        overflow-x: auto;
        padding-left: 0;
        padding-right: 0;
        -webkit-overflow-scrolling: touch;
    }

    .admin-template-3 .dataTables_wrapper .dataTables_length,
    .admin-template-3 .dataTables_wrapper .dataTables_filter {
        text-align: left !important;
    }

    .admin-template-3 .dataTables_wrapper .dataTables_filter input {
        display: block;
        margin-left: 0;
        margin-top: 4px;
        max-width: 100%;
        width: 100%;
    }

    .admin-template-3 .modal-dialog {
        margin: 10px auto;
        max-width: calc(100vw - 20px);
        width: auto !important;
    }

    .admin-template-3 .modal-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}


/* ==========================================================================
   ADMIN TEMPLATE 3 — WMS TEMPLATE 2 ENTERPRISE ARCHITECTURE UPGRADE
   (Shared 64px Header Seam, Edge-to-Edge Density, Calm Panels & Tables,
    DataTables Toolbar & Status Filter Chips, Pinned Account Footer,
    Slide-Over Theme Settings Drawer, Dark Mode & Sidebar Skins)
   ========================================================================== */

:root {
    --adm3-topbar-h: 64px;
    --adm3-sidebar-w: 260px;
    --adm3-sidebar-mini-w: 72px;
    --sb-bg: #ffffff;
    --sb-line: #e6eae8;
    --sb-text: #1e293b;
    --sb-muted: #64748b;
    --sb-icon: #64748b;
    --sb-hover: #f3f6fa;
    --sb-active-bg: rgba(var(--adm3-primary-rgb), 0.1);
    --sb-active-text: var(--adm3-primary);
    --sb-accent: var(--adm3-primary);
}

/* ─── 1. SHARED 64px HEADER SEAM (SIDEBAR BRAND + FLUSH WORKSPACE BAR) ──── */
.admin-template-3 .main-header {
    background: var(--adm3-surface);
    pointer-events: auto;
    position: sticky;
    top: 0;
    z-index: 1045;
}

.admin-template-3 .main-header .logo,
.skin-blue.admin-template-3 .main-header .logo,
.skin-blue.admin-template-3 .main-header .logo:hover {
    background: var(--sb-bg) !important;
    border-bottom: 1px solid var(--sb-line) !important;
    border-right: 1px solid var(--sb-line) !important;
    color: var(--sb-text) !important;
    height: var(--adm3-topbar-h) !important;
    padding: 0 16px;
    width: var(--adm3-sidebar-w);
}

.admin-template-3 .main-header .logo .logo-brand-text {
    color: var(--sb-text);
}

.admin-template-3 .main-header .logo .logo-brand-sub {
    color: var(--sb-muted);
}

.admin-template-3 .main-header .navbar,
.skin-blue.admin-template-3 .main-header .navbar {
    align-items: center;
    background: var(--adm3-surface) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0 !important;
    border-bottom: 1px solid var(--adm3-border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    gap: 12px;
    height: var(--adm3-topbar-h);
    margin: 0 0 0 var(--adm3-sidebar-w) !important;
    min-height: var(--adm3-topbar-h);
    padding: 0 20px;
}

.admin-template-3 .main-header .sidebar-toggle,
.skin-blue.admin-template-3 .main-header .navbar .sidebar-toggle {
    background: transparent;
    border: 1px solid var(--adm3-border);
    border-radius: 9px;
    color: var(--adm3-muted) !important;
    height: 36px;
    margin: 0 4px 0 0;
    width: 36px;
}

.admin-template-3 .main-header .sidebar-toggle:hover,
.skin-blue.admin-template-3 .main-header .navbar .sidebar-toggle:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.24);
    color: var(--adm3-primary) !important;
}

/* Workspace Bar Identity (Breadcrumb + Bold Page Title) */
.adm3-ws-identity {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    margin-right: auto;
    min-width: 0;
}

.adm3-ws-crumbs {
    align-items: center;
    color: var(--adm3-muted);
    display: flex;
    font-size: 11px;
    font-weight: 600;
    gap: 5px;
    line-height: 1.2;
    margin-bottom: 2px;
    white-space: nowrap;
}

.adm3-ws-crumbs a {
    color: var(--adm3-primary);
    display: inline-flex;
    font-size: 13px;
}

.adm3-ws-crumbs i {
    color: var(--adm3-subtle);
    font-size: 13px;
}

.adm3-ws-eyebrow {
    color: var(--adm3-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.adm3-ws-crumbs [aria-current] {
    color: var(--adm3-heading);
    overflow: hidden;
    text-overflow: ellipsis;
}

.adm3-ws-heading {
    align-items: center;
    color: var(--adm3-heading);
    display: flex;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 16.5px;
    font-weight: 800;
    gap: 8px;
    letter-spacing: -0.02em;
    line-height: 1.2;
    min-width: 0;
}

.adm3-ws-heading > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm3-ws-heading > small {
    background: rgba(var(--adm3-primary-rgb), 0.09);
    border-radius: 999px;
    color: var(--adm3-primary);
    flex: 0 0 auto;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    padding: 2px 8px;
}

/* Right Workspace Bar Utilities */
.admin-template-3 .navbar-custom-menu > .navbar-nav {
    align-items: center;
    display: flex;
    gap: 6px;
}

.adm3-ws-cmd-li,
.adm3-ws-clock-li,
.adm3-theme-btn-li {
    align-items: center;
    display: flex;
}

.admin-template-3 .adm3-cmd-trigger {
    flex: 0 0 auto;
    height: 36px;
    margin-right: 2px;
    max-width: 170px;
    padding: 0 9px 0 10px;
}

.adm3-ws-clock-card {
    align-items: center;
    background: var(--adm3-surface-subtle);
    border: 1px solid var(--adm3-border);
    border-radius: 10px;
    display: flex;
    gap: 8px;
    height: 36px;
    padding: 0 10px 0 6px;
}

.adm3-ws-clock-icon {
    align-items: center;
    background: rgba(var(--adm3-primary-rgb), 0.1);
    border-radius: 7px;
    color: var(--adm3-primary);
    display: inline-flex;
    font-size: 14px;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.adm3-ws-clock-body {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

#adm3WsDate {
    color: var(--adm3-muted);
    font-size: 9.5px;
    font-weight: 600;
    white-space: nowrap;
}

#adm3WsClock {
    color: var(--adm3-heading);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
}

.adm3-ws-icon-btn {
    align-items: center;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 9px;
    color: var(--adm3-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 15px;
    gap: 5px;
    height: 36px;
    justify-content: center;
    padding: 0 10px;
    transition: all 0.15s ease;
}

.adm3-ws-icon-btn:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08);
    border-color: rgba(var(--adm3-primary-rgb), 0.28);
    color: var(--adm3-primary);
}

.admin-template-3 .navbar-custom-menu .navbar-nav > li.log_out > a {
    align-items: center;
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border);
    border-radius: 9px !important;
    color: var(--adm3-muted) !important;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0 !important;
    width: 36px;
}

.admin-template-3 .navbar-custom-menu .navbar-nav > li.log_out > a:hover {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

/* ─── 2. WMS ENTERPRISE SIDEBAR (LIGHT SURFACE, RAIL TREE, PINNED ACCOUNT) ─ */
.admin-template-3 .main-sidebar,
.admin-template-3 .left-side,
.skin-blue.admin-template-3 .main-sidebar,
.skin-blue.admin-template-3 .left-side {
    background: var(--sb-bg) !important;
    border-right: 1px solid var(--sb-line) !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding-top: var(--adm3-topbar-h) !important;
    position: fixed;
    width: var(--adm3-sidebar-w) !important;
}

.admin-template-3 .sidebar {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 12px;
}

.admin-template-3 .sidebar-search {
    padding: 12px 12px 6px !important;
}

.admin-template-3 .sidebar-form {
    background: var(--sb-hover) !important;
    border: 1px solid var(--sb-line) !important;
    border-radius: 9px !important;
    margin: 0 !important;
    position: relative;
}

.admin-template-3 .sidebar-form input[type="text"] {
    background: transparent !important;
    color: var(--sb-text) !important;
    font-size: 12.5px;
    height: 34px;
    padding-right: 30px;
}

.admin-template-3 .sidebar-form .btn {
    background: transparent !important;
    color: var(--sb-icon) !important;
    height: 34px;
    padding: 0 4px 0 10px !important;
}

.adm3-search-kbd {
    background: var(--sb-bg);
    border: 1px solid var(--sb-line);
    border-radius: 5px;
    box-shadow: none;
    color: var(--sb-muted);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    pointer-events: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

.admin-template-3 .sidebar-form input:focus ~ .adm3-search-kbd {
    display: none;
}

.admin-template-3 .sidebar-menu {
    padding: 4px 10px 14px !important;
}

.admin-template-3 .sidebar-menu > li.header,
.skin-blue.admin-template-3 .sidebar-menu > li.header {
    background: transparent !important;
    color: var(--sb-muted) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.11em !important;
    margin: 14px 0 4px !important;
    padding: 0 10px !important;
}

.admin-template-3 .sidebar-menu > li > a,
.skin-blue.admin-template-3 .sidebar-menu > li > a {
    border-left: 0 !important;
    border-radius: 8px !important;
    color: var(--sb-text) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    min-height: 36px;
    padding: 8px 10px !important;
}

.admin-template-3 .sidebar-menu > li > a > .adm3-nav-ic,
.admin-template-3 .sidebar-menu > li > a > .fa {
    color: var(--sb-icon) !important;
    font-size: 16px;
    margin-right: 10px;
    width: 20px;
}

.admin-template-3 .sidebar-menu > li:hover > a,
.skin-blue.admin-template-3 .sidebar-menu > li:hover > a {
    background: var(--sb-hover) !important;
    color: var(--sb-active-text) !important;
}

.admin-template-3 .sidebar-menu > li.active > a,
.skin-blue.admin-template-3 .sidebar-menu > li.active > a {
    background: var(--sb-active-bg) !important;
    color: var(--sb-active-text) !important;
    font-weight: 700 !important;
}

.admin-template-3 .sidebar-menu > li.active > a > .adm3-nav-ic,
.admin-template-3 .sidebar-menu > li:hover > a > .adm3-nav-ic {
    color: var(--sb-accent) !important;
}

.admin-template-3 .sidebar-menu > li.active:after {
    display: none !important;
}

/* Clean vertical guide-rail submenu (exact WMS .nav-sm) */
.admin-template-3 .treeview-menu,
.skin-blue.admin-template-3 .sidebar-menu > li > .treeview-menu {
    border-left: 1px solid var(--sb-line);
    margin: 2px 0 6px 20px !important;
    padding: 2px 0 2px 10px !important;
}

.admin-template-3 .treeview-menu > li > a,
.skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li > a {
    border-radius: 7px;
    color: var(--sb-muted) !important;
    font-size: 12px;
    font-weight: 500;
    min-height: 31px;
    padding: 6px 10px !important;
}

.admin-template-3 .treeview-menu > li > a:before {
    display: none !important;
}

.admin-template-3 .treeview-menu > li > a:hover,
.skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li > a:hover {
    background: var(--sb-hover) !important;
    color: var(--sb-active-text) !important;
}

.admin-template-3 .treeview-menu > li.active > a,
.skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li.active > a {
    background: var(--sb-active-bg) !important;
    color: var(--sb-active-text) !important;
    font-weight: 700 !important;
}

/* Pinned Sidebar Account Footer Card (exact WMS .t2-account) */
.adm3-sidebar-account {
    background: var(--sb-bg);
    border-top: 1px solid var(--sb-line);
    flex: 0 0 auto;
    padding: 10px 10px 11px;
    position: relative;
}

.adm3-account-btn {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--sb-text);
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 7px 8px;
    text-align: left;
    transition: background-color 0.14s ease, border-color 0.14s ease;
    width: 100%;
}

.adm3-account-btn:hover,
.adm3-sidebar-account.open .adm3-account-btn {
    background: var(--sb-hover);
    border-color: var(--sb-line);
}

.adm3-account-avatar {
    flex: 0 0 auto;
    position: relative;
}

.adm3-account-avatar img,
.adm3-account-monogram {
    align-items: center;
    background: var(--sb-active-bg);
    border-radius: 10px;
    color: var(--sb-accent);
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    object-fit: cover;
    width: 34px;
}

.adm3-account-avatar > i {
    background: #10b981;
    border: 2px solid var(--sb-bg);
    border-radius: 50%;
    bottom: -2px;
    height: 9px;
    position: absolute;
    right: -2px;
    width: 9px;
}

.adm3-account-copy {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
}

.adm3-account-copy strong {
    color: var(--sb-text);
    font-size: 12.5px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm3-account-copy small {
    color: var(--sb-muted);
    font-size: 10.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm3-account-caret {
    color: var(--sb-icon);
    font-size: 15px;
}

.adm3-account-menu {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 12px !important;
    bottom: calc(100% + 6px) !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14) !important;
    left: 10px !important;
    padding: 6px !important;
    right: 10px !important;
    top: auto !important;
    width: auto !important;
}

.adm3-account-menu-head {
    border-bottom: 1px solid var(--adm3-border);
    display: grid;
    margin-bottom: 4px;
    padding: 6px 10px 8px;
}

.adm3-account-menu-head strong {
    color: var(--adm3-heading);
    font-size: 12.5px;
}

.adm3-account-menu-head small {
    color: var(--adm3-muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adm3-account-menu > li > a {
    align-items: center;
    border-radius: 8px;
    color: var(--adm3-text) !important;
    display: flex !important;
    font-size: 12.5px;
    font-weight: 600;
    gap: 8px;
    padding: 7px 10px !important;
}

.adm3-account-menu > li > a:hover {
    background: var(--adm3-surface-subtle) !important;
    color: var(--adm3-primary) !important;
}

.adm3-account-menu > li > a.adm3-account-signout:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

/* Compact Sidebar Mode + Floating Fixed Tooltip (WMS .t2-nav-tip) */
@media (min-width: 768px) {
    .sidebar-mini.sidebar-collapse.admin-template-3 .main-header .navbar {
        margin-left: var(--adm3-sidebar-mini-w) !important;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .adm3-account-copy,
    .sidebar-mini.sidebar-collapse.admin-template-3 .adm3-account-caret {
        display: none !important;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .adm3-account-btn {
        justify-content: center;
        padding: 6px 4px;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .adm3-account-menu {
        bottom: 6px !important;
        left: calc(var(--adm3-sidebar-mini-w) + 6px) !important;
        min-width: 210px;
        right: auto !important;
    }

    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li:hover > a > span:not(.pull-right),
    .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li:hover > .treeview-menu {
        left: calc(var(--adm3-sidebar-mini-w) - 4px);
    }
}

.adm3-nav-tip {
    background: #0f172a;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 11px;
    pointer-events: none;
    position: fixed;
    transform: translateY(-50%);
    white-space: nowrap;
    z-index: 1200;
}

.adm3-nav-tip::before {
    border: 5px solid transparent;
    border-right-color: #0f172a;
    content: "";
    margin-top: -5px;
    position: absolute;
    right: 100%;
    top: 50%;
}

.adm3-nav-tip[hidden] {
    display: none !important;
}

/* ─── 3. EDGE-TO-EDGE COMPACT DENSITY & CALM PANELS (EXACT WMS RHYTHM) ──── */
.admin-template-3 .content-wrapper,
.admin-template-3 .right-side {
    min-height: calc(100vh - var(--adm3-topbar-h)) !important;
    padding: 14px 18px 24px !important;
}

.admin-template-3 .main-footer {
    padding: 12px 18px;
}

.admin-template-3 .box,
.admin-template-3 .panel,
.admin-template-3 .nav-tabs-custom {
    border: 1px solid var(--adm3-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04) !important;
    margin-bottom: 14px;
    overflow: hidden;
}

.admin-template-3 .panel-heading,
.admin-template-3 .panel-primary > .panel-heading,
.admin-template-3 .box-header {
    align-items: center;
    background: var(--adm3-surface) !important;
    border-bottom: 1px solid var(--adm3-border) !important;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    min-height: 48px;
    padding: 8px 16px !important;
}

.admin-template-3 .panel-heading:before,
.admin-template-3 .panel-heading:after,
.admin-template-3 .box-header:before,
.admin-template-3 .box-header:after {
    display: none;
}

.admin-template-3 .panel-title,
.admin-template-3 .panel-primary > .panel-heading .panel-title,
.admin-template-3 .box-title {
    color: var(--adm3-heading) !important;
    font-size: 14.5px !important;
    font-weight: 800 !important;
    letter-spacing: -0.015em;
    margin: 0;
}

.admin-template-3 .panel-body,
.admin-template-3 .panel-body-blank,
.admin-template-3 .box-body {
    background: var(--adm3-surface);
    padding: 12px 16px 14px !important;
}

.admin-template-3 .panel-footer,
.admin-template-3 .box-footer {
    background: var(--adm3-surface-subtle);
    border-top: 1px solid var(--adm3-border);
    padding: 10px 16px !important;
}

.admin-template-3 .panel-footer:has(> #dataFormButton.display-hide),
.admin-template-3 .panel-footer:empty {
    display: none;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs {
    align-items: center;
    background: var(--adm3-surface) !important;
    border-bottom: 1px solid var(--adm3-border) !important;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 48px;
    padding: 6px 14px !important;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs > li.header {
    font-size: 14.5px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    margin-right: auto !important;
    padding: 4px 2px !important;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs > li {
    float: none !important;
    margin: 0 !important;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs > li > a {
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    color: var(--adm3-muted) !important;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px !important;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs > li > a:hover {
    background: var(--adm3-surface-subtle) !important;
    color: var(--adm3-heading) !important;
}

.admin-template-3 .nav-tabs-custom > .nav-tabs > li.active > a,
.admin-template-3 .nav-tabs-custom > .nav-tabs > li.active > a:hover {
    background: rgba(var(--adm3-primary-rgb), 0.1) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.22) !important;
    color: var(--adm3-primary) !important;
    font-weight: 700 !important;
}

.admin-template-3 .nav-tabs-custom > .tab-content {
    padding: 12px 16px 14px !important;
}

/* ─── 4. WMS DASHBOARD HERO BANNER ──────────────────────────────────────── */
.adm3-hero-header {
    padding: 0 0 14px !important;
}

.adm3-dh-hero {
    background: linear-gradient(115deg, rgba(var(--adm3-primary-rgb), 0.085) 0%, rgba(var(--adm3-primary-rgb), 0.025) 55%, var(--adm3-surface) 100%);
    border: 1px solid rgba(var(--adm3-primary-rgb), 0.16);
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 20px 24px;
}

.adm3-dh-hero-main {
    flex: 1 1 360px;
    min-width: 0;
}

.adm3-dh-hero h1 {
    color: var(--adm3-heading);
    font-size: 24px !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin: 4px 0 !important;
}

.adm3-dh-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.adm3-dh-shortcuts a {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--adm3-border);
    border-radius: 8px;
    color: var(--adm3-text);
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
    padding: 6px 11px;
    transition: all 0.14s ease;
}

.adm3-dh-shortcuts a:hover {
    background: var(--adm3-surface);
    border-color: rgba(var(--adm3-primary-rgb), 0.35);
    color: var(--adm3-primary);
}

.adm3-dh-hero-side {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.adm3-dh-hero-date {
    color: var(--adm3-heading);
    font-size: 12px;
    font-weight: 700;
}

.adm3-dh-hero-side small {
    color: var(--adm3-muted);
    font-size: 11px;
}

/* ─── 5. WMS SUMMARY STATUS FILTER CHIPS (.adm3-list-summary / .adm3-chip) ── */
.admin-template-3 .adm3-list-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.admin-template-3 .adm3-chip {
    align-items: center;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 999px;
    color: var(--adm3-text);
    cursor: pointer;
    display: inline-flex;
    font-size: 11.5px;
    font-weight: 700;
    gap: 7px;
    min-height: 30px;
    padding: 3px 5px 3px 10px;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.admin-template-3 .adm3-chip:hover {
    background: var(--adm3-surface-subtle);
    border-color: var(--adm3-border-strong);
}

.admin-template-3 .adm3-chip.is-active {
    background: rgba(var(--adm3-primary-rgb), 0.1);
    border-color: rgba(var(--adm3-primary-rgb), 0.32);
    color: var(--adm3-primary);
}

.admin-template-3 .adm3-chip__label {
    white-space: nowrap;
}

.admin-template-3 .adm3-chip__count {
    background: #eef2f6;
    border-radius: 999px;
    color: var(--adm3-text);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    min-width: 24px;
    padding: 1px 6px;
    text-align: center;
}

.admin-template-3 .adm3-chip.is-active .adm3-chip__count {
    background: var(--adm3-primary);
    color: #ffffff;
}

.admin-template-3 .adm3-chip--ok .adm3-chip__label::before,
.admin-template-3 .adm3-chip--info .adm3-chip__label::before,
.admin-template-3 .adm3-chip--warn .adm3-chip__label::before,
.admin-template-3 .adm3-chip--danger .adm3-chip__label::before,
.admin-template-3 .adm3-chip--muted .adm3-chip__label::before {
    border-radius: 50%;
    content: "";
    display: inline-block;
    height: 7px;
    margin-right: 6px;
    vertical-align: 1px;
    width: 7px;
}

.admin-template-3 .adm3-chip--ok .adm3-chip__label::before { background: #10b981; }
.admin-template-3 .adm3-chip--info .adm3-chip__label::before { background: var(--adm3-primary); }
.admin-template-3 .adm3-chip--warn .adm3-chip__label::before { background: #f59e0b; }
.admin-template-3 .adm3-chip--danger .adm3-chip__label::before { background: #ef4444; }
.admin-template-3 .adm3-chip--muted .adm3-chip__label::before { background: #94a3b8; }

/* ─── 6. WMS DATATABLES TOOLBAR, DENSE TABLES, EMPTY STATE & PAGINATION ─── */
.admin-template-3 .dataTables_wrapper > .row:first-child {
    align-items: center;
    background: var(--adm3-surface-subtle);
    border: 1px solid var(--adm3-border);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: space-between;
    margin: 0 0 10px !important;
    padding: 8px 12px;
}

.admin-template-3 .dataTables_wrapper > .row:first-child:before,
.admin-template-3 .dataTables_wrapper > .row:first-child:after {
    display: none;
}

.admin-template-3 .dataTables_wrapper > .row:first-child > [class*="col-"] {
    flex: 0 1 auto;
    padding: 0;
    width: auto;
}

.admin-template-3 .dataTables_wrapper .dataTables_length,
.admin-template-3 .dataTables_wrapper .dataTables_filter {
    margin: 0 !important;
}

.admin-template-3 .dataTables_wrapper .dataTables_length label,
.admin-template-3 .dataTables_wrapper .dataTables_filter label {
    align-items: center;
    color: var(--adm3-muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
    margin: 0;
}

.admin-template-3 .dataTables_wrapper .dataTables_length select {
    background-color: var(--adm3-surface);
    border: 1px solid var(--adm3-border-strong);
    border-radius: 8px;
    color: var(--adm3-heading);
    font-size: 12px;
    height: 32px;
    min-height: 32px;
    padding: 0 24px 0 8px;
}

.admin-template-3 .dataTables_wrapper .dataTables_filter input {
    background: var(--adm3-surface) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 10px center no-repeat;
    border: 1px solid var(--adm3-border-strong);
    border-radius: 8px;
    color: var(--adm3-heading);
    font-size: 12px;
    height: 32px;
    margin: 0 !important;
    min-height: 32px;
    padding: 0 10px 0 30px;
    width: 230px;
}

.admin-template-3 .dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--adm3-primary);
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.12);
    outline: 0;
}

/* Dense, Scannable WMS Table Density */
.admin-template-3 .table > thead > tr > th,
.admin-template-3 table.dataTable thead th {
    background: #f5f7fa !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    padding: 9px 10px !important;
}

.admin-template-3 .table > tbody > tr > td {
    font-size: 12.5px !important;
    line-height: 1.45;
    padding: 8px 10px !important;
}

.admin-template-3 .table td a:not(.btn) {
    color: var(--adm3-primary);
    font-weight: 600;
}

.admin-template-3 .table td a:not(.btn):hover {
    text-decoration: underline;
}

/* Compact Table Row Action Buttons (WMS: 28px crisp pills) */
.admin-template-3 .table td .btn {
    border-radius: 7px !important;
    font-size: 11px !important;
    line-height: 1.3;
    min-height: 28px;
    padding: 4px 9px !important;
    white-space: nowrap;
}

.admin-template-3 .table td .btn + .btn {
    margin-left: 3px;
}

/* Dot-prefixed semantic status pills (WMS .t2-badge style) */
.admin-template-3 .table .label {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    gap: 5px;
    padding: 3px 9px 3px 7px;
}

.admin-template-3 .table .label::before {
    background: currentColor;
    border-radius: 50%;
    content: "";
    height: 6px;
    width: 6px;
}

.admin-template-3 .table .label-success { border-color: #a7f3d0; }
.admin-template-3 .table .label-warning { border-color: #fde68a; }
.admin-template-3 .table .label-danger { border-color: #fecaca; }
.admin-template-3 .table .label-info { border-color: #bae6fd; }
.admin-template-3 .table .label-primary { border-color: rgba(var(--adm3-primary-rgb), 0.24); }

/* Empty table state + Floating pill processing overlay */
.admin-template-3 .table td.dataTables_empty {
    color: var(--adm3-muted);
    font-size: 13px;
    padding: 38px 16px !important;
    text-align: center;
}

.admin-template-3 .table td.dataTables_empty::before {
    color: var(--adm3-border-strong);
    content: "\2205";
    display: block;
    font-size: 26px;
    margin-bottom: 6px;
}

.admin-template-3 .dataTables_processing {
    align-items: center;
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 999px !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14) !important;
    color: var(--adm3-heading) !important;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: auto !important;
    padding: 9px 16px !important;
    width: auto !important;
}

/* Standalone Rounded Pagination Tiles (WMS lines 4350-4416) */
.admin-template-3 .dataTables_wrapper > .row:last-child {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 10px 0 0 !important;
}

.admin-template-3 .dataTables_wrapper > .row:last-child:before,
.admin-template-3 .dataTables_wrapper > .row:last-child:after {
    display: none;
}

.admin-template-3 .dataTables_wrapper > .row:last-child > [class*="col-"] {
    flex: 0 1 auto;
    padding: 0;
    width: auto;
}

.admin-template-3 .dataTables_wrapper .dataTables_info {
    font-size: 11.5px;
    padding-top: 0 !important;
}

.admin-template-3 .dataTables_paginate .pagination {
    display: inline-flex;
    gap: 4px;
    margin: 0 !important;
}

.admin-template-3 .dataTables_paginate .pagination > li > a,
.admin-template-3 .dataTables_paginate .pagination > li > span {
    align-items: center;
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 8px !important;
    color: var(--adm3-text) !important;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 30px;
    justify-content: center;
    margin: 0 !important;
    min-width: 30px;
    padding: 0 8px !important;
}

.admin-template-3 .dataTables_paginate .pagination > li:not(.disabled):not(.active) > a:hover {
    background: rgba(var(--adm3-primary-rgb), 0.1) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.3) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .dataTables_paginate .pagination > li.active > a {
    background: var(--adm3-primary) !important;
    border-color: var(--adm3-primary) !important;
    color: #ffffff !important;
}

.admin-template-3 .dataTables_paginate .pagination > li.disabled > a {
    background: var(--adm3-surface-subtle) !important;
    color: var(--adm3-subtle) !important;
}

/* ─── 7. WMS FORMS, FILTER INPUT-GROUPS, SELECT2 & MODALS ───────────────── */
.admin-template-3 .input-group-addon {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    border: 1px solid var(--adm3-border) !important;
    border-right: 0 !important;
    border-radius: 8px 0 0 8px !important;
    color: var(--adm3-primary) !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    padding: 6px 10px !important;
    text-transform: uppercase;
}

.admin-template-3 .form-control {
    background-color: #fafbfd;
    border-color: var(--adm3-border);
    border-radius: 8px;
    min-height: 36px;
}

.admin-template-3 .form-control:focus {
    background-color: var(--adm3-surface);
}

.admin-template-3 .form-control[readonly],
.admin-template-3 .form-control:disabled {
    background-color: #f1f5f9;
    color: var(--adm3-muted);
}

.admin-template-3 fieldset {
    border: 1px solid var(--adm3-border);
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 14px 16px 6px;
}

.admin-template-3 fieldset > legend {
    border: 0;
    color: var(--adm3-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    padding: 0 6px;
    text-transform: uppercase;
    width: auto;
}

.admin-template-3 .select2-container--default .select2-selection--single,
.admin-template-3 .select2-container--default .select2-selection--multiple {
    background: #fafbfd;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 8px !important;
    min-height: 36px;
}

.admin-template-3 .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--adm3-primary) !important;
}

.admin-template-3 .modal-content {
    border-radius: 14px !important;
    overflow: hidden;
}

.admin-template-3 .modal-header {
    background: var(--adm3-surface);
    border-bottom: 1px solid var(--adm3-border);
    padding: 12px 16px !important;
}

.admin-template-3 .modal-title {
    font-size: 14.5px;
    font-weight: 800;
}

.admin-template-3 .modal-body {
    padding: 16px;
}

.admin-template-3 .modal-footer {
    background: var(--adm3-surface-subtle);
    border-top: 1px solid var(--adm3-border);
    padding: 10px 16px;
}

/* ─── 8. SLIDE-OVER THEME SETTINGS DRAWER (WMS theme-settings.css) ──────── */
.adm3-theme-backdrop[hidden],
.adm3-theme-panel[hidden] {
    display: none !important;
}

.adm3-theme-backdrop {
    backdrop-filter: blur(3px);
    background: rgba(15, 23, 42, 0.42);
    inset: 0;
    position: fixed;
    z-index: 1090;
}

.adm3-theme-panel {
    animation: adm3DrawerIn 0.2s ease-out;
    background: var(--adm3-surface);
    bottom: 0;
    box-shadow: -16px 0 56px rgba(15, 23, 42, 0.18);
    color: var(--adm3-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    width: min(380px, 100%);
    z-index: 1095;
}

@keyframes adm3DrawerIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.adm3-theme-panel__head {
    border-bottom: 1px solid var(--adm3-border);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 20px 20px 16px;
}

.adm3-theme-eyebrow {
    color: var(--adm3-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.adm3-theme-panel__head h2 {
    color: var(--adm3-heading);
    font-size: 20px;
    font-weight: 800;
    margin: 4px 0 3px;
}

.adm3-theme-panel__head p {
    color: var(--adm3-muted);
    font-size: 12px;
    margin: 0;
}

.adm3-theme-close {
    align-items: center;
    align-self: flex-start;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 8px;
    color: var(--adm3-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 18px;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.adm3-theme-close:hover {
    background: var(--adm3-surface-subtle);
    color: var(--adm3-heading);
}

.adm3-theme-options {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 20px;
}

.adm3-theme-options fieldset {
    border: 0 !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
}

.adm3-theme-options legend {
    color: var(--adm3-heading) !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    margin-bottom: 10px !important;
    padding: 0 !important;
    text-transform: none !important;
}

.adm3-theme-swatches {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adm3-theme-swatch-card {
    align-items: center;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 9px;
    color: var(--adm3-text) !important;
    display: flex;
    font-size: 11px;
    font-weight: 600;
    gap: 7px;
    padding: 7px 8px;
    transition: all 0.14s ease;
}

.adm3-theme-swatch-card:hover {
    border-color: rgba(var(--adm3-primary-rgb), 0.35);
}

.adm3-theme-swatch-card.is-active {
    background: rgba(var(--adm3-primary-rgb), 0.09);
    border-color: var(--adm3-primary);
    box-shadow: 0 0 0 1px var(--adm3-primary);
    color: var(--adm3-primary) !important;
    font-weight: 700;
}

.adm3-theme-swatch-dot {
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 50%;
    flex: 0 0 14px;
    height: 14px;
    width: 14px;
}

.adm3-theme-choices {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adm3-theme-choices label {
    cursor: pointer;
    margin: 0;
    position: relative;
}

.adm3-theme-choices input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.adm3-theme-choices label > span {
    align-items: center;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 9px;
    color: var(--adm3-text);
    display: flex;
    font-size: 12px;
    font-weight: 600;
    gap: 8px;
    padding: 9px 10px;
}

.adm3-theme-choices input:checked + span {
    background: rgba(var(--adm3-primary-rgb), 0.09);
    border-color: var(--adm3-primary);
    box-shadow: 0 0 0 1px var(--adm3-primary);
    color: var(--adm3-primary);
    font-weight: 700;
}

.adm3-preview {
    border: 1px solid rgba(100, 116, 139, 0.32);
    border-radius: 5px;
    display: inline-block;
    flex: 0 0 18px;
    height: 18px;
    width: 18px;
}

.adm3-preview--light { background: #f8fafc; }
.adm3-preview--dark { background: #0f172a; }
.adm3-preview--system { background: linear-gradient(90deg, #f8fafc 50%, #0f172a 50%); }
.adm3-preview--expanded { background: linear-gradient(90deg, var(--adm3-primary) 38%, #e2e8f0 38%); }
.adm3-preview--compact { background: linear-gradient(90deg, var(--adm3-primary) 20%, #e2e8f0 20%); }
.adm3-preview--gradient { background: linear-gradient(135deg, var(--adm3-primary-dark), var(--adm3-primary)); }

.adm3-theme-tpl-list {
    display: grid;
    gap: 7px;
}

.adm3-theme-tpl-item {
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 9px;
    display: block;
    padding: 9px 11px;
}

.adm3-theme-tpl-item strong {
    color: var(--adm3-heading);
    display: block;
    font-size: 12.5px;
}

.adm3-theme-tpl-item small {
    color: var(--adm3-muted);
    display: block;
    font-size: 11px;
}

.adm3-theme-tpl-item.is-active {
    background: rgba(var(--adm3-primary-rgb), 0.09);
    border-color: var(--adm3-primary);
}

.adm3-theme-tpl-item.is-active strong {
    color: var(--adm3-primary);
}

.adm3-theme-note {
    color: var(--adm3-muted);
    font-size: 11px;
    line-height: 1.5;
    margin: 4px 0 0;
}

.adm3-theme-panel__foot {
    border-top: 1px solid var(--adm3-border);
    padding: 14px 20px;
}

.adm3-theme-panel__foot button {
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 8px;
    color: var(--adm3-heading);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 12px;
    width: 100%;
}

.adm3-theme-panel__foot button:hover {
    background: var(--adm3-surface-subtle);
}

.adm3-theme-panel__foot span {
    color: var(--adm3-muted);
    display: block;
    font-size: 11px;
    margin-top: 8px;
    text-align: center;
}

/* ─── 9. DARK MODE & INDEPENDENT SIDEBAR SKINS (WMS PATTERN) ────────────── */
html[data-adm3-theme="dark"] {
    --adm3-bg: #0f172a;
    --adm3-surface: #1e293b;
    --adm3-surface-subtle: #162032;
    --adm3-border: #334155;
    --adm3-border-strong: #475569;
    --adm3-heading: #f1f5f9;
    --adm3-text: #cbd5e1;
    --adm3-muted: #94a3b8;
    --adm3-subtle: #64748b;
    --adm3-accent-text: #93c5fd;
    color-scheme: dark;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-ws-crumbs a,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-ws-eyebrow,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-ws-heading > small,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-hero-eyebrow,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-ws-clock-icon,
html[data-adm3-theme="dark"] .admin-template-3 .table td a:not(.btn),
html[data-adm3-theme="dark"] .admin-template-3 .adm3-chip.is-active,
html[data-adm3-theme="dark"] .admin-template-3 .nav-tabs-custom > .nav-tabs > li.active > a,
html[data-adm3-theme="dark"] .admin-template-3 .small-box > .small-box-footer,
html[data-adm3-theme="dark"] .admin-template-3 .input-group-addon,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-theme-eyebrow {
    color: var(--adm3-accent-text) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-ws-heading > small,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-ws-clock-icon,
html[data-adm3-theme="dark"] .admin-template-3 .nav-tabs-custom > .nav-tabs > li.active > a,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-chip.is-active,
html[data-adm3-theme="dark"] .admin-template-3 .input-group-addon {
    background: rgba(147, 197, 253, 0.14) !important;
    border-color: rgba(147, 197, 253, 0.28) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .btn-info {
    background: rgba(147, 197, 253, 0.14) !important;
    border-color: rgba(147, 197, 253, 0.3) !important;
    color: #93c5fd !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .btn-success {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: rgba(16, 185, 129, 0.32) !important;
    color: #6ee7b7 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .btn-warning {
    background: rgba(245, 158, 11, 0.16) !important;
    border-color: rgba(245, 158, 11, 0.32) !important;
    color: #fcd34d !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .btn-danger {
    background: rgba(239, 68, 68, 0.16) !important;
    border-color: rgba(239, 68, 68, 0.32) !important;
    color: #fca5a5 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .label-success { background: rgba(16, 185, 129, 0.18) !important; color: #6ee7b7 !important; border-color: rgba(16, 185, 129, 0.3) !important; }
html[data-adm3-theme="dark"] .admin-template-3 .label-warning { background: rgba(245, 158, 11, 0.18) !important; color: #fcd34d !important; border-color: rgba(245, 158, 11, 0.3) !important; }
html[data-adm3-theme="dark"] .admin-template-3 .label-danger { background: rgba(239, 68, 68, 0.18) !important; color: #fca5a5 !important; border-color: rgba(239, 68, 68, 0.3) !important; }
html[data-adm3-theme="dark"] .admin-template-3 .label-info { background: rgba(56, 189, 248, 0.18) !important; color: #7dd3fc !important; border-color: rgba(56, 189, 248, 0.3) !important; }
html[data-adm3-theme="dark"] .admin-template-3 .label-default { background: #334155 !important; color: #cbd5e1 !important; }

html[data-adm3-theme="dark"] .admin-template-3 .table > thead > tr > th,
html[data-adm3-theme="dark"] .admin-template-3 table.dataTable thead th {
    background: #162032 !important;
    color: #94a3b8 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #1e293b;
}

html[data-adm3-theme="dark"] .admin-template-3 .table-striped > tbody > tr:nth-of-type(even) {
    background-color: #192436;
}

html[data-adm3-theme="dark"] .admin-template-3 .table > tbody > tr > td {
    border-bottom-color: #293548 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .form-control,
html[data-adm3-theme="dark"] .admin-template-3 .select2-container--default .select2-selection--single,
html[data-adm3-theme="dark"] .admin-template-3 .btn-default,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-dh-shortcuts a {
    background-color: #162032 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .small-box > .small-box-footer,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-chip__count {
    background: #162032 !important;
    border-top-color: #334155;
    color: #cbd5e1;
}

html[data-adm3-theme="dark"] .admin-template-3 .highcharts-background {
    fill: transparent !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .highcharts-axis-labels text,
html[data-adm3-theme="dark"] .admin-template-3 .highcharts-legend-item text {
    fill: #cbd5e1 !important;
}

/* Sidebar Skin: Dark */
html[data-adm3-skin="dark"] {
    --sb-bg: #111827;
    --sb-line: rgba(255, 255, 255, 0.1);
    --sb-text: #e2e8f0;
    --sb-muted: #94a3b8;
    --sb-icon: #94a3b8;
    --sb-hover: rgba(255, 255, 255, 0.08);
    --sb-active-bg: rgba(255, 255, 255, 0.14);
    --sb-active-text: #ffffff;
    --sb-accent: #ffffff;
}

/* Sidebar Skin: Brand Gradient (uses dynamic journal color!) */
html[data-adm3-skin="gradient"] {
    --sb-bg: linear-gradient(170deg, var(--adm3-primary-dark) 0%, var(--adm3-primary) 100%);
    --sb-line: rgba(255, 255, 255, 0.14);
    --sb-text: #f1f5f9;
    --sb-muted: rgba(255, 255, 255, 0.68);
    --sb-icon: rgba(255, 255, 255, 0.78);
    --sb-hover: rgba(255, 255, 255, 0.12);
    --sb-active-bg: rgba(255, 255, 255, 0.2);
    --sb-active-text: #ffffff;
    --sb-accent: #ffffff;
}

html[data-adm3-skin="gradient"] .admin-template-3 .main-header .logo,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-sidebar-account {
    background: var(--adm3-primary-dark) !important;
}

/* ─── 10. MOBILE POLISH (<= 767px) ──────────────────────────────────────── */
@media (max-width: 767px) {
    .admin-template-3 .main-header .logo,
    .skin-blue.admin-template-3 .main-header .logo {
        height: 52px !important;
        width: 100% !important;
    }

    .admin-template-3 .main-header .navbar,
    .skin-blue.admin-template-3 .main-header .navbar {
        height: 54px;
        margin-left: 0 !important;
        min-height: 54px;
        padding: 0 10px;
    }

    .adm3-ws-crumbs,
    .adm3-ws-heading > small,
    .admin-template-3 .navbar-custom-menu .user-menu {
        display: none !important;
    }

    .adm3-ws-heading {
        font-size: 14px;
    }

    .admin-template-3 .navbar-custom-menu > .navbar-nav {
        gap: 4px;
    }

    .admin-template-3 .adm3-cmd-trigger,
    .admin-template-3 .adm3-ws-icon-btn,
    .admin-template-3 .navbar-custom-menu .navbar-nav > li.log_out > a {
        height: 32px;
        min-width: 32px;
        padding: 0 7px !important;
    }

    .admin-template-3 .content-wrapper,
    .admin-template-3 .right-side {
        padding: 10px 10px 18px !important;
    }

    .admin-template-3 .adm3-dh-hero {
        padding: 16px;
    }

    .admin-template-3 .adm3-dh-hero-side {
        align-items: flex-start;
    }

    /* Horizontally scrollable WMS chip slider on phones */
    .admin-template-3 .adm3-list-summary {
        flex-wrap: nowrap;
        margin: 0 -10px 10px;
        overflow-x: auto;
        padding: 2px 10px 4px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
    }

    .admin-template-3 .adm3-list-summary::-webkit-scrollbar {
        display: none;
    }

    .admin-template-3 .adm3-list-summary > * {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .admin-template-3 .dataTables_wrapper > .row:first-child {
        padding: 8px 10px;
    }

    .admin-template-3 .dataTables_wrapper .dataTables_filter,
    .admin-template-3 .dataTables_wrapper .dataTables_filter label,
    .admin-template-3 .dataTables_wrapper .dataTables_filter input {
        width: 100%;
    }

    .admin-template-3 .dataTables_wrapper > .row:last-child {
        gap: 8px;
        justify-content: center;
    }
}


/* ==========================================================================
   ADMIN TEMPLATE 3 — PIXEL-ALIGNED WMS TEMPLATE 2 REFINEMENT PASS
   (1:1 Visual Match to Reference: Clean Workspace Bar, Borderless Brand,
    Single-Bar Panel Header w/ + ADD CTA, Single Compact Chip Strip,
    Transparent DataTables Toolbar, Subtle Full Hairline Table Grid,
    Ultra-Compact 2-Line Primary Rows & Horizontal 28px Action Icon Squares)
   ========================================================================== */

/* ─── 1. CLEAN WORKSPACE BAR & BORDERLESS SIDEBAR BRAND (EXACT WMS MATCH) ─ */
.admin-template-3 .main-header .logo .logo-brand-image {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    height: 36px !important;
    padding: 0 !important;
    width: 36px !important;
}

.adm3-brand-accent {
    color: var(--adm3-primary);
}

@media (min-width: 768px) {
    .admin-template-3 .main-header .sidebar-toggle,
    .skin-blue.admin-template-3 .main-header .navbar .sidebar-toggle {
        display: none !important;
    }
}

/* Status Pill: "● System operational" */
.adm3-ws-status-li {
    align-items: center;
    display: flex;
}

.adm3-ws-status {
    align-items: center;
    background: rgba(var(--adm3-primary-rgb), 0.09);
    border-radius: 999px;
    color: var(--adm3-primary);
    display: inline-flex;
    font-size: 11.5px;
    font-weight: 700;
    gap: 7px;
    padding: 6px 12px;
    white-space: nowrap;
}

.adm3-ws-status > i {
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
    display: inline-block;
    height: 7px;
    width: 7px;
}

/* Clock Card with Zone Badge */
.adm3-ws-clock-card {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
    height: 40px;
    padding: 0 11px 0 7px;
}

.adm3-ws-clock-top {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: space-between;
}

.adm3-ws-clock-zone {
    background: rgba(var(--adm3-primary-rgb), 0.08);
    border-radius: 4px;
    color: var(--adm3-primary);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 1px 4px;
}

#adm3WsClock {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* 2-Line Horizontal User Chip (Exact WMS .workspace-profile) */
.admin-template-3 .navbar-custom-menu .navbar-nav > li.user-menu {
    border-left: 1px solid var(--adm3-border);
    margin-left: 4px;
    padding-left: 10px;
}

.admin-template-3 .navbar-custom-menu .navbar-nav > li.user-menu > a {
    align-items: center;
    display: inline-flex;
    gap: 9px;
    padding: 4px 6px !important;
}

.adm3-ws-user-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.adm3-ws-user-copy strong {
    color: var(--adm3-heading);
    font-size: 12px;
    font-weight: 700;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm3-ws-user-copy small {
    color: var(--adm3-muted);
    font-size: 10px;
    font-weight: 600;
}

.adm3-ws-icon-btn {
    height: 36px;
    padding: 0 !important;
    width: 36px;
}

/* ─── 2. WMS SINGLE-BAR PANEL HEADER (.adm3-panel-head) & + ADD CTA ─────── */
.admin-template-3 .adm3-wms-panel {
    overflow: visible !important;
}

.adm3-panel-head {
    align-items: center;
    background: var(--adm3-surface);
    border-bottom: 1px solid var(--adm3-border);
    border-radius: 14px 14px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    min-height: 50px;
    padding: 8px 16px;
}

.adm3-panel-head__title {
    color: var(--adm3-heading);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
    font-size: 14.5px;
    font-weight: 800;
    margin: 0;
}

.adm3-panel-head__options {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.adm3-panel-head__options .btn {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 12px !important;
    font-weight: 700;
    gap: 5px;
    height: 32px;
    padding: 0 11px !important;
}

.adm3-panel-head__options .article-btn-sort,
.adm3-panel-head__options .article-btn-bulk-verify {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    box-shadow: none !important;
    color: var(--adm3-text) !important;
}

.adm3-panel-head__options .article-btn-sort:hover,
.adm3-panel-head__options .article-btn-bulk-verify:hover {
    background: var(--adm3-surface-subtle) !important;
    border-color: var(--adm3-border-strong) !important;
    color: var(--adm3-primary) !important;
}

.adm3-inline-tabs {
    border: 0 !important;
    display: inline-flex;
    gap: 6px;
    margin: 0 !important;
    padding: 0 !important;
}

.adm3-inline-tabs > li {
    margin: 0 !important;
}

.adm3-inline-tabs > li > a {
    align-items: center;
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 8px !important;
    color: var(--adm3-text) !important;
    display: inline-flex !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    gap: 5px;
    height: 32px;
    padding: 0 12px !important;
}

.adm3-inline-tabs > li.active > a {
    display: none !important;
}

.adm3-inline-tabs > li > a.adm3-tab-add-cta {
    background: var(--adm3-primary) !important;
    border-color: var(--adm3-primary) !important;
    color: #ffffff !important;
}

.adm3-inline-tabs > li > a.adm3-tab-add-cta:hover {
    background: var(--adm3-primary-dark) !important;
    border-color: var(--adm3-primary-dark) !important;
    color: #ffffff !important;
}

.adm3-export-menu {
    border: 1px solid var(--adm3-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12) !important;
    min-width: 205px;
    padding: 6px !important;
}

.adm3-export-menu > li > a {
    align-items: center;
    border-radius: 7px;
    color: var(--adm3-text) !important;
    display: flex !important;
    font-size: 12px;
    font-weight: 600;
    gap: 8px;
    padding: 6px 10px !important;
}

.adm3-export-menu > li > a:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    color: var(--adm3-primary) !important;
}

/* Global .nav-tabs-custom Form Tab -> Solid Primary "+ ADD" Button across ALL CRUD pages */
.admin-template-3 .nav-tabs-custom:not(.adm3-wms-panel) > .nav-tabs > li:not(.active) > a[href="#form"] {
    background: var(--adm3-primary) !important;
    border-color: var(--adm3-primary) !important;
    color: #ffffff !important;
}

.admin-template-3 .nav-tabs-custom:not(.adm3-wms-panel) > .nav-tabs > li:not(.active) > a[href="#form"]:hover {
    background: var(--adm3-primary-dark) !important;
}

.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.active > a {
    display: none !important;
}

.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li > a {
    align-items: center;
    display: inline-flex !important;
    gap: 5px;
}

.admin-template-3 .main-header .logo .logo-brand-image {
    border-radius: 8px;
}

/* ─── 3. WMS SUMMARY CHIPS + UNIFIED SINGLE-ROW TOOLBAR ─────────────────── */
.adm3-list-summary__meta {
    align-items: center;
    background: var(--adm3-surface-subtle);
    border: 1px dashed var(--adm3-border-strong);
    border-radius: 999px;
    color: var(--adm3-muted);
    display: inline-flex;
    font-size: 11.5px;
    gap: 5px;
    margin-left: 4px;
    min-height: 30px;
    padding: 0 10px;
    white-space: nowrap;
}

.adm3-list-summary__meta i {
    color: var(--adm3-primary);
}

.adm3-list-summary__meta strong {
    color: var(--adm3-heading);
    font-variant-numeric: tabular-nums;
}

/* Unified single toolbar row: Show [10] | Volume | Issue | Filter | Search… */
.admin-template-3 .dataTables_wrapper > .row.adm3-toolbar-unified {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 10px !important;
    justify-content: space-between !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
}

.admin-template-3 .dataTables_wrapper > .row.adm3-toolbar-unified::before,
.admin-template-3 .dataTables_wrapper > .row.adm3-toolbar-unified::after {
    content: none !important;
    display: none !important;
}

.admin-template-3 .dataTables_wrapper > .row.adm3-toolbar-unified > .col-sm-6 {
    flex: 0 0 auto !important;
    float: none !important;
    padding: 0 !important;
    width: auto !important;
}

.admin-template-3 .dataTables_wrapper > .row.adm3-toolbar-unified > .col-sm-6:last-child {
    margin-left: auto !important;
}

.admin-template-3 .dataTables_wrapper > .row.adm3-toolbar-unified .dataTables_filter input {
    min-width: 215px !important;
    width: 225px !important;
}

.adm3-inline-filters {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.adm3-filter-item {
    align-items: stretch;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 8px;
    display: inline-flex;
    flex: 0 1 auto;
    height: 32px;
    overflow: hidden;
}

.adm3-filter-item:focus-within {
    border-color: rgba(var(--adm3-primary-rgb), 0.45);
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.1);
}

.adm3-filter-lbl {
    align-items: center;
    background: var(--adm3-surface-subtle);
    border: 0;
    border-right: 1px solid var(--adm3-border);
    color: var(--adm3-muted);
    display: inline-flex;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.adm3-filter-item .admin-filter-reset-group {
    align-items: center;
    display: inline-flex !important;
    height: 100%;
    margin: 0 !important;
    width: auto !important;
}

.adm3-filter-item .form-control,
.adm3-filter-item .admin-filter-reset-group .form-control {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--adm3-heading);
    font-size: 12px;
    font-weight: 600;
    height: 30px !important;
    max-width: 132px;
    min-height: 30px !important;
    min-width: 96px;
    padding: 0 6px 0 8px;
    width: auto !important;
}

.adm3-filter-item .admin-filter-reset-btn {
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    border-left: 1px solid var(--adm3-border) !important;
    border-radius: 0 !important;
    color: var(--adm3-subtle) !important;
    display: inline-flex !important;
    height: 30px !important;
    justify-content: center;
    line-height: 1 !important;
    margin: 0 !important;
    min-height: 30px !important;
    padding: 0 !important;
    width: 26px !important;
}

.adm3-filter-item .admin-filter-reset-btn:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    color: var(--adm3-primary) !important;
}

/* Remove grey shaded box on DataTables top toolbar (exact WMS clean white bar!) */
.admin-template-3 .dataTables_wrapper > .row:first-child {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
}

/* ─── 4. WMS SUBTLE HAIRLINE TABLE GRID & COMPACT 2-LINE CELLS ──────────── */
.admin-template-3 .table-bordered > thead > tr > th,
.admin-template-3 .table-bordered > tbody > tr > td {
    border-left: 1px solid #edf0f4 !important;
    border-right: 0 !important;
}

.admin-template-3 .table-bordered > thead > tr > th:first-child,
.admin-template-3 .table-bordered > tbody > tr > td:first-child {
    border-left: 0 !important;
}

.admin-template-3 .table > thead > tr > th,
.admin-template-3 table.dataTable thead th {
    background: #f7f8fa !important;
    font-size: 10px !important;
    padding: 8px 10px !important;
}

.admin-template-3 .table > tbody > tr > td {
    padding: 7px 10px !important;
}

.admin-template-3 .adm3-wms-table > thead > tr > th,
.admin-template-3 .adm3-wms-table > tbody > tr > td {
    padding: 6px 8px !important;
}

/* Global horizontal action button group (ONLY squash icon-only last-column action squares, NEVER text buttons in middle columns!) */
.admin-template-3 .table td:last-child .btn-group,
.admin-template-3 .adm3-row-actions {
    align-items: center;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    gap: 4px;
    white-space: nowrap;
}

.admin-template-3 .table td:last-child .btn-group > .btn,
.admin-template-3 .adm3-row-actions > .btn {
    align-items: center;
    border-radius: 7px !important;
    display: inline-flex;
    float: none !important;
    height: 28px;
    justify-content: center;
    margin: 0 !important;
    min-height: 28px;
    padding: 0 !important;
    width: 28px;
}

.admin-template-3 .table td:not(:last-child) .btn-group {
    display: inline-flex !important;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-template-3 .table td:not(:last-child) .btn-group > .btn {
    border-radius: 6px !important;
    float: none !important;
    margin: 0 !important;
    padding: 3px 8px !important;
    width: auto !important;
}

.admin-template-3 .adm3-row-actions > .btn.display-hide {
    display: none !important;
}

.admin-template-3 .table td:last-child .btn-group > .btn > i,
.admin-template-3 .adm3-row-actions > .btn > i {
    font-size: 13.5px;
    line-height: 1;
}

.admin-template-3 .table td ul {
    margin: 0;
    padding-left: 15px;
}

/* WMS 2-Line Primary Cell (exact .t2-vehicle pattern, 100% fits 1440px!) */
.adm3-wms-table .adm3-col-index {
    color: var(--adm3-muted);
    font-variant-numeric: tabular-nums;
    text-align: center;
    width: 34px;
}

.adm3-wms-table .adm3-col-primary {
    max-width: 280px;
    min-width: 205px;
    text-align: left !important;
}

.adm3-cell-primary {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    text-align: left !important;
}

.adm3-cell-title {
    color: var(--adm3-heading) !important;
    display: block;
    font-size: 12.5px;
    font-weight: 700 !important;
    line-height: 1.3;
    overflow: hidden;
    text-align: left !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm3-cell-title:hover {
    color: var(--adm3-primary) !important;
    text-decoration: underline !important;
}

.adm3-cell-sub {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    min-width: 0;
}

.adm3-cell-authors {
    color: var(--adm3-muted);
    flex: 0 1 auto;
    font-size: 11px;
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm3-meta-tag {
    background: #f1f4f8;
    border-radius: 5px;
    color: #475569;
    flex: 0 0 auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9.5px;
    font-weight: 600;
    padding: 1px 5px;
    white-space: nowrap;
}

.adm3-type-tag,
.adm3-type-tag.editable-click {
    background: rgba(var(--adm3-primary-rgb), 0.08);
    border: 0 !important;
    border-radius: 5px;
    color: var(--adm3-primary) !important;
    flex: 0 0 auto;
    font-size: 9.5px;
    font-weight: 700 !important;
    padding: 1px 5px;
    text-decoration: none !important;
    white-space: nowrap;
}

/* Exact WMS Dot-Prefixed Table Badges (.adm3-badge) */
.adm3-badge {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    gap: 5px;
    padding: 2px 8px 2px 6px;
    white-space: nowrap;
}

.adm3-badge > i {
    background: currentColor;
    border-radius: 50%;
    height: 6px;
    width: 6px;
}

.adm3-badge a,
.adm3-badge a.editable-click {
    border-bottom: 0 !important;
    color: inherit !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.adm3-badge--ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.adm3-badge--warn { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.adm3-badge--danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.adm3-badge--muted { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }

.adm3-col-status,
.adm3-col-date,
.adm3-col-metrics,
.adm3-col-doi,
.adm3-col-meta,
.adm3-col-pdf,
.adm3-col-actions {
    white-space: nowrap;
}

.adm3-col-actions {
    text-align: right;
    width: 104px;
}

.adm3-date-txt {
    color: var(--adm3-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

/* Compact Inline Metrics Pills (Views / Downloads / Citations) */
.adm3-metrics-inline {
    align-items: center;
    display: inline-flex;
    gap: 3px;
}

.adm3-metric-pill {
    align-items: center;
    background: #f4f6f9;
    border: 1px solid #e6eaf0;
    border-radius: 6px;
    color: #475569 !important;
    display: inline-flex;
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    font-weight: 600 !important;
    gap: 2px;
    height: 23px;
    padding: 0 5px;
    text-decoration: none !important;
}

.adm3-metric-pill--cite:hover {
    background: rgba(var(--adm3-primary-rgb), 0.1);
    border-color: rgba(var(--adm3-primary-rgb), 0.28);
    color: var(--adm3-primary) !important;
}

.adm3-metric-pill--cite.has-cites {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857 !important;
}

/* Compact Link & Icon Buttons (Exact WMS .t2-link-btn / .t2-icon-btn) */
.adm3-links {
    display: inline-flex;
    gap: 4px;
}

.adm3-link-btn {
    align-items: center;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 7px;
    color: var(--adm3-text) !important;
    cursor: pointer;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700 !important;
    gap: 3px;
    height: 25px;
    padding: 0 7px;
    text-decoration: none !important;
    transition: all 0.12s ease;
    white-space: nowrap;
}

.adm3-link-btn:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08);
    border-color: rgba(var(--adm3-primary-rgb), 0.3);
    color: var(--adm3-primary) !important;
}

.adm3-link-btn--pdf:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c !important;
}

.adm3-icon-btn {
    align-items: center;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 7px;
    color: var(--adm3-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    height: 25px;
    justify-content: center;
    padding: 0;
    width: 25px;
}

.adm3-icon-btn:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08);
    border-color: rgba(var(--adm3-primary-rgb), 0.3);
    color: var(--adm3-primary);
}

.admin-template-3 .adm3-doi-status-btn {
    align-items: center;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    font-size: 10.5px;
    font-weight: 700;
    gap: 3px;
    height: 25px;
    line-height: 1;
    padding: 0 7px;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.admin-template-3 .adm3-doi-status-btn i {
    font-size: 12px;
}

.admin-template-3 .adm3-doi-status-btn--live {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.admin-template-3 .adm3-doi-status-btn--live:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
}

.admin-template-3 .adm3-doi-status-btn--unverified {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
}

.admin-template-3 .adm3-doi-status-btn--unverified:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.admin-template-3 .adm3-doi-status-btn--warn {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
}

.admin-template-3 .adm3-doi-status-btn--warn:hover {
    background: #ffedd5;
    border-color: #fb923c;
}

.admin-template-3 .adm3-doi-status-btn--danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.admin-template-3 .adm3-doi-status-btn--danger:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.adm3-muted {
    color: var(--adm3-subtle);
}

/* Mobile polish for WMS unified toolbar & panel header */
@media (max-width: 767px) {
    .adm3-panel-head {
        padding: 10px 12px;
    }

    .adm3-panel-head__options .btn,
    .adm3-inline-tabs > li > a {
        font-size: 11.5px !important;
        height: 30px;
        padding: 0 9px !important;
    }

    .admin-template-3 .dataTables_wrapper > .row.adm3-toolbar-unified > .col-sm-6:last-child {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .admin-template-3 .dataTables_wrapper > .row.adm3-toolbar-unified .dataTables_filter input {
        min-width: 0 !important;
        width: 100% !important;
    }

    .adm3-inline-filters {
        display: flex;
        width: 100%;
    }

    .adm3-filter-item {
        width: 100%;
    }

    .adm3-filter-item .admin-filter-reset-group {
        flex: 1 1 auto;
    }

    .adm3-filter-item .form-control,
    .adm3-filter-item .admin-filter-reset-group .form-control {
        flex: 1 1 auto;
        max-width: none;
    }
}

/* Dark mode sync for new WMS components */
html[data-adm3-theme="dark"] .admin-template-3 .table-bordered > thead > tr > th,
html[data-adm3-theme="dark"] .admin-template-3 .table-bordered > tbody > tr > td {
    border-left-color: #293548 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-meta-tag,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-metric-pill,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-link-btn,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-icon-btn,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-filter-item,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-filter-lbl {
    background: #162032 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-badge--ok { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.3); color: #6ee7b7; }
html[data-adm3-theme="dark"] .admin-template-3 .adm3-badge--warn { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.3); color: #fcd34d; }
html[data-adm3-theme="dark"] .admin-template-3 .adm3-badge--muted { background: #334155; border-color: #475569; color: #cbd5e1; }
html[data-adm3-theme="dark"] .admin-template-3 .adm3-doi-status-btn--live { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.35); color: #6ee7b7; }
html[data-adm3-theme="dark"] .admin-template-3 .adm3-doi-status-btn--unverified { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.35); color: #fcd34d; }
html[data-adm3-theme="dark"] .admin-template-3 .adm3-doi-status-btn--warn { background: rgba(249, 115, 22, 0.2); border-color: rgba(249, 115, 22, 0.38); color: #fdba74; }
html[data-adm3-theme="dark"] .admin-template-3 .adm3-doi-status-btn--danger { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.38); color: #fca5a5; }
html[data-adm3-theme="dark"] .admin-template-3 .adm3-ws-status { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; }

/* ==========================================================================
   PLATFORM-WIDE WMS UNIFICATION LAYER (ALL CRUD, FORMS, MODALS, REPORTS)
   ========================================================================== */

/* 1. EXACT WMS "+ ADD" <-> "× CANCEL" IN-PLACE HEADER & FOOTER FLOW */
.admin-template-3 .adm3-inline-tabs > li > a.adm3-tab-cancel-cta,
.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li > a.adm3-tab-cancel-cta {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-radius: 8px !important;
    color: #dc2626 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    height: 32px;
    padding: 0 12px !important;
}

.admin-template-3 .adm3-inline-tabs > li > a.adm3-tab-cancel-cta:hover,
.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li > a.adm3-tab-cancel-cta:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
}

.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs {
    align-items: center;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.header {
    margin-right: auto !important;
    order: 0;
}

.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-tool-li {
    order: 10;
}

.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-tool-li > a,
.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-sort-li > .btn {
    align-items: center;
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: var(--adm3-text) !important;
    display: inline-flex !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    gap: 5px;
    height: 32px;
    margin: 0 !important;
    padding: 0 11px !important;
}

.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-sort-li > .btn.display-hide {
    display: none !important;
}

.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-sort-li > .adm3-hdr-close-btn {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-tool-li > a:hover,
.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-sort-li > .adm3-hdr-sort-btn:hover {
    background: var(--adm3-surface-subtle) !important;
    border-color: var(--adm3-border-strong) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-cta-li {
    order: 99;
}

/* Hide legacy floating #update_close inside form body (header × CANCEL & footer × Cancel handle it cleanly!) */
.admin-template-3 #form #update_close {
    display: none !important;
}

/* Exact WMS Form Footer ([× Cancel] [✓ Save/Submit]) */
.admin-template-3 #form .box-footer.adm3-form-footer {
    align-items: center;
    background: var(--adm3-surface-subtle) !important;
    border-top: 1px solid var(--adm3-border) !important;
    border-radius: 0 0 12px 12px;
    display: flex !important;
    gap: 8px;
    justify-content: flex-end;
    margin: 18px -18px -18px !important;
    padding: 12px 18px !important;
}

.admin-template-3 #form .box-footer.adm3-form-footer .clearfix {
    display: none !important;
}

.admin-template-3 #form .box-footer.adm3-form-footer .pull-right {
    float: none !important;
}

.admin-template-3 #form .box-footer.adm3-form-footer .adm3-form-cancel-btn,
.admin-template-3 #form .box-footer.adm3-form-footer .btn-add-client {
    align-items: center;
    border-radius: 8px !important;
    display: inline-flex;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    gap: 5px;
    height: 36px;
    padding: 0 15px !important;
}

.admin-template-3 #form .box-footer.adm3-form-footer .adm3-form-cancel-btn {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    color: var(--adm3-text) !important;
}

.admin-template-3 #form .box-footer.adm3-form-footer .adm3-form-cancel-btn:hover {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

/* 2. CRISP WHITE EDITABLE FORM INPUTS (EXACT WMS FORMS) */
.admin-template-3 .form-control {
    background-color: #ffffff;
    border-color: #d5dce5;
    border-radius: 8px;
    color: var(--adm3-heading);
    min-height: 36px;
}

.admin-template-3 .form-control[readonly]:not(#authorDOB),
.admin-template-3 .form-control:disabled {
    background-color: #f1f5f9;
    color: var(--adm3-muted);
}

.admin-template-3 #authorDOB.form-control[readonly] {
    background-color: #ffffff;
    color: var(--adm3-heading);
    cursor: pointer;
}

.admin-template-3 #form .input-group-addon,
.admin-template-3 .modal-body .input-group-addon {
    background: #f8fafc !important;
    border-color: #d5dce5 !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    text-transform: none;
}

.admin-template-3 #form .input-group > .input-group-addon:last-child {
    border-left: 0 !important;
    border-right: 1px solid #d5dce5 !important;
    border-radius: 0 8px 8px 0 !important;
}

/* 3. FULL-WIDTH WORKSPACE MODALS (Full rules & dark-mode parity at bottom of file) */
@media (min-width: 768px) {
    .admin-template-3 .modal-dialog {
        margin: 20px auto !important;
        max-width: calc(100vw - 40px) !important;
        width: calc(100vw - 40px) !important;
    }

    .admin-template-3 .modal-dialog.modal-sm {
        max-width: 560px !important;
        width: 92% !important;
    }

    .admin-template-3 .modal-dialog.modal-lg,
    .admin-template-3 .modal-dialog.modal-xl {
        max-width: calc(100vw - 40px) !important;
        width: calc(100vw - 40px) !important;
    }
}

/* 4. FIX GLUED PANEL TITLES / SUBTITLES & PAGE-HEADER BARS GLOBALLY */
.admin-template-3 .panel-heading .panel-title {
    align-items: center;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start !important;
    width: 100%;
}

.admin-template-3 .panel-heading .panel-title > i {
    color: var(--adm3-primary);
    flex: 0 0 auto;
    margin-right: 2px;
}

.admin-template-3 .panel-heading .panel-title > span.pull-right,
.admin-template-3 .panel-heading .panel-title > small {
    color: var(--adm3-muted) !important;
    float: none !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    margin-left: auto;
    opacity: 1 !important;
}

.admin-template-3 .panel-heading.adm3-panel-heading-bar {
    align-items: center;
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.admin-template-3 .panel-heading.adm3-panel-heading-bar > .panel-title {
    flex: 1 1 auto;
    width: auto;
}

.admin-template-3 .panel-heading.adm3-panel-heading-bar > .adm3-hdr-cta {
    align-items: center;
    border-radius: 8px !important;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px !important;
    font-weight: 700 !important;
    gap: 5px;
    height: 32px;
    padding: 0 13px !important;
}

/* Calm WMS bar for pages using raw Bootstrap .page-header */
.admin-template-3 .content .page-header {
    align-items: center;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin: 0 0 14px !important;
    padding: 12px 16px !important;
}

.admin-template-3 .content .page-header h1,
.admin-template-3 .content .page-header h2,
.admin-template-3 .content .page-header h3 {
    color: var(--adm3-heading);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
    font-size: 15.5px !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

.admin-template-3 .content .page-header small {
    color: var(--adm3-muted) !important;
    display: inline-block;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin-left: 8px;
}

/* 5. CALM WMS KPI .info-box CARDS (ALL COLORS HARMONIZED!) */
.admin-template-3 .info-box,
.admin-template-3 .info-box:has(.info-box-icon) {
    border: 1px solid var(--adm3-border) !important;
    border-bottom: 1px solid var(--adm3-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
    min-height: 70px !important;
    padding: 12px 14px !important;
}

.admin-template-3 .info-box-icon {
    border-radius: 10px !important;
    flex: 0 0 42px !important;
    font-size: 18px !important;
    height: 42px !important;
    line-height: 42px !important;
    width: 42px !important;
}

.admin-template-3 .info-box-icon.bg-red,
.admin-template-3 .info-box-icon.bg-maroon {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

.admin-template-3 .info-box-icon.bg-yellow,
.admin-template-3 .info-box-icon.bg-orange {
    background: #fffbeb !important;
    color: #d97706 !important;
}

.admin-template-3 .info-box-icon.bg-purple {
    background: #f3e8ff !important;
    color: #7c3aed !important;
}

.admin-template-3 .info-box-icon.bg-teal,
.admin-template-3 .info-box-icon.bg-olive {
    background: #ecfdf5 !important;
    color: #059669 !important;
}

.admin-template-3 .info-box-text {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
}

.admin-template-3 .info-box-number {
    font-size: 21px !important;
    line-height: 1.2 !important;
}

/* 6. FIX DOUBLE-ICON TABLE STATUS LABELS (● ✓ Sent -> ● Sent) & CALM VIEW LINKS */
.admin-template-3 .table .label > i.fa-check,
.admin-template-3 .table .label > i.fa-times {
    display: none !important;
}

.admin-template-3 .table td > a.btn-xs.btn-primary,
.admin-template-3 .table td > button.btn-xs.btn-primary {
    align-items: center;
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    color: var(--adm3-text) !important;
    display: inline-flex;
    font-size: 11px !important;
    font-weight: 700 !important;
    gap: 4px;
    height: 26px;
    padding: 0 9px !important;
}

.admin-template-3 .table td > a.btn-xs.btn-primary:hover,
.admin-template-3 .table td > button.btn-xs.btn-primary:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.3) !important;
    color: var(--adm3-primary) !important;
}

/* 7. SETTINGS PAGE — DYNAMIC JOURNAL COLOR + CLEAN WMS SURFACE */
.admin-template-3 .settings-shell {
    max-width: none;
}

.admin-template-3 .settings-panel {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.admin-template-3 .settings-panel > .panel-heading {
    display: none !important;
}

.admin-template-3 .settings-panel .panel-body {
    background: transparent !important;
    padding: 0 !important;
}

.admin-template-3 .settings-layout {
    gap: 18px;
    padding: 0 !important;
}

.admin-template-3 .settings-side-nav,
.admin-template-3 .settings-card {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

.admin-template-3 .settings-side-nav h4,
.admin-template-3 .settings-card-header h4,
.admin-template-3 .asset-card h5 {
    color: var(--adm3-heading) !important;
}

.admin-template-3 .settings-side-nav a {
    color: var(--adm3-muted) !important;
    font-weight: 600;
}

.admin-template-3 .settings-side-nav a:hover,
.admin-template-3 .settings-side-nav a:focus {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .settings-side-nav a.is-active {
    background: var(--adm3-primary) !important;
    box-shadow: 0 4px 12px rgba(var(--adm3-primary-rgb), 0.22) !important;
    color: #ffffff !important;
}

.admin-template-3 .settings-card .form-control:focus {
    border-color: var(--adm3-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.12) !important;
}

.admin-template-3 .asset-card {
    background: var(--adm3-surface-subtle) !important;
    border-color: var(--adm3-border) !important;
}

.asset-preview-empty {
    align-items: center;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
}

.asset-preview-empty i {
    font-size: 26px;
    opacity: 0.55;
}

/* 8. ROLES & PERMISSIONS — CALM WMS LIGHT HERO + DYNAMIC BRAND COLOR */
.admin-template-3 .rbac-page {
    --gold: var(--adm3-primary);
    --gold-dark: var(--adm3-primary-dark);
    --line: var(--adm3-border);
    --ink: var(--adm3-heading);
    --muted: var(--adm3-muted);
}

.admin-template-3 .rbac-hero {
    background: linear-gradient(135deg, rgba(var(--adm3-primary-rgb), 0.09) 0%, rgba(var(--adm3-primary-rgb), 0.02) 55%, var(--adm3-surface) 100%) !important;
    border: 1px solid rgba(var(--adm3-primary-rgb), 0.18) !important;
    box-shadow: none !important;
    color: var(--adm3-heading) !important;
    margin-bottom: 14px !important;
    padding: 18px 22px !important;
}

.admin-template-3 .rbac-hero:after {
    border-color: rgba(var(--adm3-primary-rgb), 0.09) !important;
}

.admin-template-3 .rbac-eyebrow {
    color: var(--adm3-primary) !important;
}

.admin-template-3 .rbac-hero h2 {
    color: var(--adm3-heading) !important;
    font-size: 21px !important;
}

.admin-template-3 .rbac-hero p {
    color: var(--adm3-muted) !important;
    font-size: 12.5px;
}

.admin-template-3 .rbac-stat {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    color: var(--adm3-heading) !important;
}

.admin-template-3 .rbac-stat span {
    color: var(--adm3-muted) !important;
}

.admin-template-3 .rbac-shell {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

.admin-template-3 .rbac-tabs > li.active .tab-count,
.admin-template-3 .rbac-editor-icon,
.admin-template-3 .select-all-control {
    background: rgba(var(--adm3-primary-rgb), 0.1) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.25) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .rbac-role-item:hover,
.admin-template-3 .rbac-role-item.active,
.admin-template-3 .role-option:has(input:checked),
.admin-template-3 .permission-table tr:hover td {
    background: rgba(var(--adm3-primary-rgb), 0.05) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.35) !important;
}

.admin-template-3 .rbac-role-item.active {
    border-color: var(--adm3-primary) !important;
    box-shadow: inset 3px 0 var(--adm3-primary) !important;
}

.admin-template-3 .admin-avatar,
.admin-template-3 .admin-impersonate {
    background: var(--adm3-primary) !important;
    border-color: var(--adm3-primary) !important;
}

/* 9. REVIEWER / AUTHOR LIST — ZERO OVERFLOW + INLINE DECISION + CLEAN TOOLBAR */
.admin-template-3 .adm3-reviewer-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px !important;
}

.admin-template-3 .adm3-rev-cat-col {
    flex: 0 0 220px;
    width: auto !important;
}

.admin-template-3 .adm3-rev-bulk-col {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    width: auto !important;
}

.admin-template-3 .adm3-rev-bulk-col .btn {
    align-items: center;
    border-radius: 8px !important;
    display: inline-flex;
    font-size: 12px !important;
    font-weight: 600 !important;
    gap: 5px;
    height: 32px;
    padding: 0 10px !important;
}

.admin-template-3 .adm3-rev-selected-pill {
    margin: 0 2px !important;
    padding: 5px 10px !important;
}

.adm3-reviewer-table .adm3-col-check {
    width: 34px;
}

.adm3-reviewer-table .adm3-col-primary {
    max-width: 240px;
    min-width: 175px;
}

.adm3-rev-head {
    align-items: center;
    display: flex;
    gap: 6px;
    min-width: 0;
}

.adm3-rev-email {
    color: var(--adm3-muted);
    flex: 0 1 auto;
    font-size: 11px;
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm3-rev-inst {
    color: var(--adm3-subtle);
    flex: 0 1 auto;
    font-size: 11px;
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm3-rev-decision {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 4px;
    white-space: nowrap;
}

.adm3-rev-decision > .btn {
    border-radius: 7px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    height: 25px;
    line-height: 1;
    padding: 0 6px !important;
}

.adm3-rev-exp {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 162px;
}

.adm3-rev-tags {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    overflow: hidden;
}

.adm3-rev-tag {
    background: rgba(var(--adm3-primary-rgb), 0.08);
    border-radius: 5px;
    color: var(--adm3-primary) !important;
    font-size: 10px;
    font-weight: 600;
    max-width: 68px;
    overflow: hidden;
    padding: 2px 5px;
    text-decoration: none !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm3-rev-tag--more {
    background: #f1f5f9;
    color: #475569 !important;
    flex: 0 0 auto;
    max-width: none;
}

.adm3-rev-stats {
    color: var(--adm3-muted);
    font-size: 10.5px;
}

.adm3-col-cat,
.adm3-col-decision,
.adm3-col-mobile {
    white-space: nowrap;
}

/* 10. REVIEWER PERFORMANCE REPORT — CALM WHITE WMS ROWS & SOFT DOT-BADGES */
.admin-template-3 .adm3-rp-page .rp-row.load-available,
.admin-template-3 .adm3-rp-page .rp-row.load-busy,
.admin-template-3 .adm3-rp-page .rp-row.load-overloaded {
    background: transparent !important;
    border-left: 0 !important;
}

.admin-template-3 .adm3-rp-page .rp-row:hover {
    background: rgba(var(--adm3-primary-rgb), 0.03) !important;
}

.admin-template-3 .adm3-rp-page .badge-available,
.admin-template-3 .adm3-rp-page .badge-busy,
.admin-template-3 .adm3-rp-page .badge-overloaded {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px !important;
    display: inline-flex;
    font-size: 11px !important;
    font-weight: 700 !important;
    gap: 5px;
    padding: 3px 9px 3px 7px !important;
}

.admin-template-3 .adm3-rp-page .badge-available::before,
.admin-template-3 .adm3-rp-page .badge-busy::before,
.admin-template-3 .adm3-rp-page .badge-overloaded::before {
    background: currentColor;
    border-radius: 50%;
    content: "";
    display: inline-block;
    height: 6px;
    width: 6px;
}

.admin-template-3 .adm3-rp-page .badge-available {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #047857 !important;
}

.admin-template-3 .adm3-rp-page .badge-busy {
    background: #fffbeb !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
}

.admin-template-3 .adm3-rp-page .badge-overloaded {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #b91c1c !important;
}

.admin-template-3 .adm3-rp-page .subject-tag {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0;
    border-radius: 5px !important;
    color: #475569 !important;
    font-size: 10.5px !important;
    font-weight: 600;
    padding: 1px 6px !important;
}

.admin-template-3 .adm3-rp-page #rp-table .badge[style*="8e44ad"] {
    background: #fef2f2 !important;
    border: 1px solid #fecaca;
    color: #b91c1c !important;
}

.admin-template-3 .adm3-rp-page #rp-table .badge[style*="f39c12"] {
    background: #fffbeb !important;
    border: 1px solid #fde68a;
    color: #b45309 !important;
}

.admin-template-3 .adm3-rp-page #rp-table .badge[style*="dd4b39"] {
    background: #fef2f2 !important;
    border: 1px solid #fecaca;
    color: #b91c1c !important;
}

.admin-template-3 .adm3-rp-page #rp-table > thead > tr {
    background: #f7f8fa !important;
}

/* Dark mode sync for unification layer */
html[data-adm3-theme="dark"] .admin-template-3 .form-control,
html[data-adm3-theme="dark"] .admin-template-3 #authorDOB.form-control[readonly] {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .form-control[readonly]:not(#authorDOB),
html[data-adm3-theme="dark"] .admin-template-3 .form-control:disabled {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-tab-cancel-cta,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-hdr-close-btn {
    background: rgba(239, 68, 68, 0.16) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #fca5a5 !important;
}

/* ==========================================================================
   ALL-MENU COLOR, BUTTON, CALLOUT, HEADER & TABLE CONSISTENCY LAYER
   ========================================================================== */

/* 1. FIX LEGACY .btn-social.btn-bitbucket ("Change Status" / "Change Payment status") */
.admin-template-3 .btn.btn-social {
    align-items: center !important;
    background: var(--adm3-primary) !important;
    border: 1px solid var(--adm3-primary) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: #ffffff !important;
    display: inline-flex !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    gap: 6px !important;
    height: 30px !important;
    justify-content: center !important;
    line-height: 1.2 !important;
    min-height: 30px !important;
    padding: 0 11px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.admin-template-3 .btn.btn-social:hover,
.admin-template-3 .btn.btn-social:focus {
    background: var(--adm3-primary-dark) !important;
    border-color: var(--adm3-primary-dark) !important;
    color: #ffffff !important;
}

.admin-template-3 .btn.btn-social > :first-child {
    border: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    position: static !important;
    width: auto !important;
}

/* 2. FIX .box-header ICON/TITLE ALIGNMENT (Profile, CrossRef DOI, etc.) */
.admin-template-3 .box-header {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start !important;
}

.admin-template-3 .box-header > i,
.admin-template-3 .box-header > .fa,
.admin-template-3 .box-header > .glyphicon {
    color: var(--adm3-primary);
    flex: 0 0 auto;
    font-size: 15px;
    margin: 0 !important;
}

.admin-template-3 .box-header > .box-title {
    margin: 0 !important;
}

/* 3. HIDE REDUNDANT SINGLE-TAB "List" PILL (Message to users) & CLEAN SEARCH EXPORT */
.admin-template-3 .nav-tabs-custom.adm3-single-tab > .nav-tabs > li:not(.header) {
    display: none !important;
}

.admin-template-3 .panel-heading .adm3-hdr-export-btn {
    align-items: center;
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: var(--adm3-text) !important;
    display: inline-flex !important;
    float: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    gap: 5px;
    height: 32px;
    margin-left: auto !important;
    padding: 0 12px !important;
}

.admin-template-3 .panel-heading .adm3-hdr-export-btn:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.3) !important;
    color: var(--adm3-primary) !important;
}

/* 4. STYLE RAW .page-header DIRECTLY INSIDE .content-wrapper (ALL 10 ANALYTICS/REPORTING PAGES!) */
.admin-template-3 .content-wrapper .page-header {
    align-items: center;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin: 0 0 14px !important;
    padding: 12px 16px !important;
}

.admin-template-3 .content-wrapper .page-header h1,
.admin-template-3 .content-wrapper .page-header h2,
.admin-template-3 .content-wrapper .page-header h3 {
    color: var(--adm3-heading);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

.admin-template-3 .content-wrapper h1.page-header {
    display: block;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
}

.admin-template-3 .content-wrapper .page-header small {
    color: var(--adm3-muted) !important;
    display: inline-block;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin-left: 8px;
}

/* 5. CALM WMS CALLOUTS & ALERTS (KILLS HARSH NEON CYAN #00c0ef BANNERS!) */
.admin-template-3 .callout,
.admin-template-3 .callout.callout-info,
.admin-template-3 .alert.alert-info {
    background: rgba(var(--adm3-primary-rgb), 0.06) !important;
    border: 1px solid rgba(var(--adm3-primary-rgb), 0.2) !important;
    border-left: 3px solid var(--adm3-primary) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: var(--adm3-heading) !important;
    padding: 12px 15px !important;
}

.admin-template-3 .callout h4,
.admin-template-3 .callout.callout-info h4,
.admin-template-3 .alert.alert-info strong {
    color: var(--adm3-primary) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    margin: 0 0 4px !important;
}

.admin-template-3 .callout a,
.admin-template-3 .alert.alert-info a {
    color: var(--adm3-primary) !important;
    font-weight: 700;
    text-decoration: underline !important;
}

.admin-template-3 .callout code,
.admin-template-3 .alert code {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border);
    border-radius: 5px;
    color: var(--adm3-primary) !important;
    font-weight: 700;
    padding: 1px 5px;
}

.admin-template-3 .callout.callout-warning,
.admin-template-3 .alert.alert-warning {
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    border-left: 3px solid #d97706 !important;
    color: #92400e !important;
}

.admin-template-3 .callout.callout-danger,
.admin-template-3 .alert.alert-danger {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-left: 3px solid #dc2626 !important;
    color: #991b1b !important;
}

.admin-template-3 .callout.callout-success,
.admin-template-3 .alert.alert-success {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    border-left: 3px solid #059669 !important;
    color: #065f46 !important;
}

/* 6. SOFTEN ALL INLINE-STYLED ADMINLTE .info-box-icon & LEGACY BADGES/BARS */
.admin-template-3 .info-box-icon[style*="3c8dbc"],
.admin-template-3 .info-box-icon[style*="0073b7"],
.admin-template-3 .info-box-icon[style*="00c0ef"],
.admin-template-3 .info-box-icon[style*="337ab7"] {
    background: rgba(var(--adm3-primary-rgb), 0.11) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .info-box-icon[style*="dd4b39"],
.admin-template-3 .info-box-icon[style*="c0392b"],
.admin-template-3 .info-box-icon[style*="d9534f"] {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

.admin-template-3 .info-box-icon[style*="00a65a"],
.admin-template-3 .info-box-icon[style*="27ae60"] {
    background: #ecfdf5 !important;
    color: #059669 !important;
}

.admin-template-3 .info-box-icon[style*="f39c12"],
.admin-template-3 .info-box-icon[style*="e67e22"] {
    background: #fffbeb !important;
    color: #d97706 !important;
}

.admin-template-3 .info-box-icon[style*="605ca8"],
.admin-template-3 .info-box-icon[style*="8e44ad"] {
    background: #f3e8ff !important;
    color: #7c3aed !important;
}

.admin-template-3 .info-box-icon[style*="999"],
.admin-template-3 .info-box-icon[style*="777"],
.admin-template-3 .info-box-icon[style*="888"],
.admin-template-3 .info-box-icon[style*="666"] {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

/* Replace harsh black outline:3px solid #333 on iThenticate / Internal Similarity filter KPI boxes */
.admin-template-3 .filter-card.active-filter {
    border-color: var(--adm3-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--adm3-primary-rgb), 0.18) !important;
    outline: 0 !important;
}

/* Soften similarity & plagiarism badges, COI inline-colored labels, & progress bars */
.admin-template-3 .badge.sim-high,
.admin-template-3 .badge.plag-flagged,
.admin-template-3 .label[style*="dd4b39"],
.admin-template-3 .badge[style*="dd4b39"] {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #b91c1c !important;
}

.admin-template-3 .badge.sim-medium,
.admin-template-3 .badge.plag-warning,
.admin-template-3 .label[style*="f39c12"],
.admin-template-3 .badge[style*="f39c12"] {
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    color: #b45309 !important;
}

.admin-template-3 .badge.sim-low,
.admin-template-3 .badge.plag-ok,
.admin-template-3 .label[style*="00a65a"],
.admin-template-3 .badge[style*="00a65a"] {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #047857 !important;
}

.admin-template-3 .label[style*="605ca8"],
.admin-template-3 .badge[style*="605ca8"] {
    background: #f3e8ff !important;
    border: 1px solid #ddd6fe !important;
    color: #6d28d9 !important;
}

.admin-template-3 .score-bar[style*="00a65a"],
.admin-template-3 .rate-bar[style*="00a65a"] {
    background: #10b981 !important;
}

.admin-template-3 .score-bar[style*="f39c12"],
.admin-template-3 .rate-bar[style*="f39c12"] {
    background: #f59e0b !important;
}

.admin-template-3 .score-bar[style*="dd4b39"],
.admin-template-3 .rate-bar[style*="dd4b39"] {
    background: #ef4444 !important;
}

.admin-template-3 .pl-legend span[style*="f39c12"],
.admin-template-3 span[style*="background:#f39c12"],
.admin-template-3 span[style*="background: #f39c12"] {
    background: #f59e0b !important;
}

/* 7. PREVENT TABLE OVERFLOW ON LONG URLS WITHOUT BREAKING SHORT WORDS/DATES MID-WORD */
.admin-template-3 .table td {
    overflow-wrap: normal;
    word-break: normal;
}

.admin-template-3 .table td a[href^="http"],
.admin-template-3 .table td code {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Association Listing & Issue Management long unlinked URL columns */
.admin-template-3 table#tbl-client td:nth-child(3),
.admin-template-3 table#tbl-client td:nth-child(4) {
    overflow-wrap: break-word;
}

.admin-template-3 .table td a.btn-primary.btn-block,
.admin-template-3 .table td a.btn-sm.btn-primary[download],
.admin-template-3 .table td a.btn-sm.btn-primary[href*="doi"] {
    align-items: center;
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    color: var(--adm3-text) !important;
    display: inline-flex;
    font-size: 11px !important;
    font-weight: 700 !important;
    gap: 4px;
    height: 27px;
    justify-content: center;
    padding: 0 9px !important;
    width: auto !important;
}

.admin-template-3 .table td a.btn-primary.btn-block:hover,
.admin-template-3 .table td a.btn-sm.btn-primary[download]:hover,
.admin-template-3 .table td a.btn-sm.btn-primary[href*="doi"]:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.3) !important;
    color: var(--adm3-primary) !important;
}

/* Keep DataTables FixedColumns clean on 18-col Paper Management spreadsheet */
.admin-template-3 .DTFC_LeftHeadWrapper,
.admin-template-3 .DTFC_LeftBodyWrapper {
    background: var(--adm3-surface);
}

.admin-template-3 .DTFC_LeftHeadWrapper table,
.admin-template-3 .DTFC_LeftBodyWrapper table {
    margin: 0 !important;
}

/* Dark mode sync for callouts & page-header */
html[data-adm3-theme="dark"] .admin-template-3 .callout,
html[data-adm3-theme="dark"] .admin-template-3 .callout.callout-info,
html[data-adm3-theme="dark"] .admin-template-3 .alert.alert-info {
    background: rgba(var(--adm3-primary-rgb), 0.14) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.3) !important;
    color: #e2e8f0 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .content-wrapper .page-header {
    background: var(--adm3-surface);
    border-color: var(--adm3-border);
}

/* ==========================================================================
   ANALYTICS & REPORTING ENTERPRISE POLISH LAYER
   ========================================================================== */

/* 1. Uniform Page Padding & Header Bar with Right-Aligned Actions */
.admin-template-3 .adm3-analytics-page {
    padding: 0 !important;
}

.admin-template-3 .adm3-analytics-page .page-header {
    align-items: center;
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: space-between;
    margin: 0 0 14px !important;
    padding: 12px 18px !important;
}

.admin-template-3 .adm3-analytics-page .page-header h3 {
    align-items: baseline;
    color: var(--adm3-heading);
    display: flex;
    flex-wrap: wrap;
    font-size: 16px !important;
    font-weight: 800 !important;
    gap: 4px 8px;
    letter-spacing: -0.015em;
    margin: 0 !important;
}

.admin-template-3 .adm3-analytics-page .page-header h3 > i {
    color: var(--adm3-primary);
    font-size: 15px;
}

.admin-template-3 .adm3-analytics-page .page-header small {
    color: var(--adm3-muted) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin-left: 0 !important;
}

.admin-template-3 .adm3-ph-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

/* 2. Non-Truncating 5/6-Column KPI Grid (.adm3-kpi-grid) */
.admin-template-3 .adm3-kpi-grid {
    gap: 12px;
    margin-bottom: 14px;
}

.admin-template-3 .adm3-kpi-tile {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.035) !important;
    color: var(--adm3-text) !important;
    gap: 8px;
    padding: 14px 16px !important;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.admin-template-3 a.adm3-kpi-tile:hover {
    border-color: rgba(var(--adm3-primary-rgb), 0.35) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07) !important;
    transform: translateY(-1px);
}

.admin-template-3 .adm3-kpi-tile.is-active,
.admin-template-3 .adm3-kpi-tile.active-filter {
    border-color: var(--adm3-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--adm3-primary-rgb), 0.18), 0 6px 18px rgba(15, 23, 42, 0.05) !important;
    outline: 0 !important;
}

.admin-template-3 .adm3-kpi-tile__label {
    color: var(--adm3-muted) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    line-height: 1.3;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
}

.admin-template-3 .adm3-kpi-tile__icon {
    background: rgba(var(--adm3-primary-rgb), 0.1) !important;
    border-radius: 9px !important;
    color: var(--adm3-primary) !important;
    font-size: 13.5px;
    height: 30px;
    width: 30px;
    flex: 0 0 30px;
}

.admin-template-3 .adm3-kpi-tile.tone-ok .adm3-kpi-tile__icon {
    background: #ecfdf5 !important;
    color: #059669 !important;
}

.admin-template-3 .adm3-kpi-tile.tone-warn .adm3-kpi-tile__icon {
    background: #fffbeb !important;
    color: #d97706 !important;
}

.admin-template-3 .adm3-kpi-tile.tone-danger .adm3-kpi-tile__icon {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

.admin-template-3 .adm3-kpi-tile.tone-purple .adm3-kpi-tile__icon {
    background: #f3e8ff !important;
    color: #7c3aed !important;
}

.admin-template-3 .adm3-kpi-tile.tone-info .adm3-kpi-tile__icon {
    background: #ecfeff !important;
    color: #0891b2 !important;
}

.admin-template-3 .adm3-kpi-tile.tone-muted .adm3-kpi-tile__icon {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

.admin-template-3 .adm3-kpi-tile__val {
    color: var(--adm3-heading) !important;
    font-size: 25px !important;
    font-variant-numeric: tabular-nums;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.admin-template-3 .adm3-kpi-tile__sub {
    color: var(--adm3-muted) !important;
    font-size: 11px !important;
    margin-top: -2px;
}

/* 3. Metric / Scoring Legend Strip */
.admin-template-3 .adm3-metric-strip {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    color: var(--adm3-text) !important;
    padding: 10px 16px !important;
}

/* 4. Chart Boxes (Submissions Analytics & Article Metrics) */
.admin-template-3 .adm3-analytics-page .chart-box {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04) !important;
    margin-bottom: 14px !important;
    padding: 16px 18px !important;
}

.admin-template-3 .adm3-analytics-page .chart-box .chart-title {
    align-items: center;
    border-bottom: 1px solid var(--adm3-border) !important;
    color: var(--adm3-heading) !important;
    display: flex;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    gap: 8px;
    letter-spacing: -0.01em;
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
}

.admin-template-3 .adm3-analytics-page .chart-box .chart-title > i {
    color: var(--adm3-primary) !important;
    font-size: 14px;
}

/* 5. Inline Action Groups (CrossRef DOI, Article Metrics, iThenticate) */
.admin-template-3 .adm3-doi-actions,
.admin-template-3 .adm3-inline-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 5px;
    justify-content: center;
}

.admin-template-3 .adm3-doi-actions .btn,
.admin-template-3 .adm3-inline-actions .btn {
    border-radius: 7px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    height: 27px;
    padding: 0 9px !important;
    white-space: nowrap;
}

/* 6. Export Manuscripts — Uniform WMS Presets, Filter Box & 2-Col Columns Grid */
.admin-template-3 .adm3-analytics-page .export-form-box {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04) !important;
    margin-bottom: 14px !important;
    padding: 16px 20px !important;
}

.admin-template-3 .adm3-analytics-page .export-form-box .section-label {
    align-items: center;
    border-bottom: 1px solid var(--adm3-border) !important;
    color: var(--adm3-heading) !important;
    display: flex;
    flex-wrap: wrap;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    gap: 7px;
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
}

.admin-template-3 .adm3-analytics-page .export-form-box .section-label > i {
    color: var(--adm3-primary);
}

.admin-template-3 .adm3-preset-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-template-3 .adm3-preset-chip {
    align-items: center !important;
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    color: var(--adm3-text) !important;
    display: inline-flex !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    gap: 7px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 6px 0 12px !important;
    transition: all 0.14s ease !important;
}

.admin-template-3 .adm3-preset-chip::before {
    border-radius: 50%;
    content: "";
    display: inline-block;
    height: 7px;
    width: 7px;
}

.admin-template-3 .adm3-preset-chip.is-primary {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.3) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .adm3-preset-chip.is-primary::before { background: var(--adm3-primary); }
.admin-template-3 .adm3-preset-chip.tone-warn::before { background: #f59e0b; }
.admin-template-3 .adm3-preset-chip.tone-info::before { background: #0ea5e9; }
.admin-template-3 .adm3-preset-chip.tone-ok::before { background: #10b981; }
.admin-template-3 .adm3-preset-chip.tone-danger::before { background: #ef4444; }
.admin-template-3 .adm3-preset-chip.tone-muted::before { background: #94a3b8; }

.admin-template-3 .adm3-preset-chip:hover {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    border-color: rgba(var(--adm3-primary-rgb), 0.35) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .adm3-preset-chip .stat-pill {
    background: var(--adm3-surface-subtle) !important;
    border-radius: 999px !important;
    color: var(--adm3-heading) !important;
    font-size: 11px !important;
    font-variant-numeric: tabular-nums;
    font-weight: 700 !important;
    margin-left: 0 !important;
    min-width: 24px;
    padding: 2px 7px !important;
    text-align: center;
}

.admin-template-3 .adm3-preset-chip.is-primary .stat-pill {
    background: var(--adm3-primary) !important;
    color: #ffffff !important;
}

.admin-template-3 .adm3-col-grid {
    color: var(--adm3-muted);
    columns: 2;
    column-gap: 20px;
    font-size: 12px;
    line-height: 1.75;
    margin: 0;
    padding-left: 20px;
}

@media (max-width: 576px) {
    .admin-template-3 .adm3-col-grid { columns: 1; }
}

.admin-template-3 .adm3-export-actions {
    align-items: center;
    border-top: 1px solid var(--adm3-border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    padding-top: 14px;
}

/* 7. Email Templates Cards, Search & Crisp Light Modals */
.admin-template-3 .adm3-email-tpl-page .nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px !important;
}

.admin-template-3 .adm3-email-tpl-page .nav-pills > li {
    float: none !important;
}

.admin-template-3 .adm3-email-tpl-page .nav-pills > li > a {
    align-items: center;
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 999px !important;
    color: var(--adm3-text) !important;
    display: inline-flex;
    font-size: 12px !important;
    font-weight: 700 !important;
    gap: 6px;
    padding: 5px 12px !important;
}

.admin-template-3 .adm3-email-tpl-page .nav-pills > li > a:hover {
    border-color: rgba(var(--adm3-primary-rgb), 0.35) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .adm3-email-tpl-page .nav-pills > li.active > a {
    background: var(--adm3-primary) !important;
    border-color: var(--adm3-primary) !important;
    color: #ffffff !important;
}

.admin-template-3 .adm3-email-tpl-page .nav-pills > li > a .badge {
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
    font-size: 10.5px;
}

.admin-template-3 .adm3-email-tpl-page .nav-pills > li.active > a .badge {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.admin-template-3 .adm3-tpl-card .box-header {
    justify-content: space-between !important;
}

.admin-template-3 .adm3-tpl-card .box-footer {
    align-items: center;
    display: flex;
    gap: 6px;
}

.admin-template-3 .adm3-tpl-card .box-footer .btn-attachments-tpl {
    margin-left: auto;
}

/* Crisp light WMS modal headers for Email Templates */
.admin-template-3 #editTplModal .modal-header,
.admin-template-3 #previewTplModal .modal-header,
.admin-template-3 #attachmentTplModal .modal-header,
.admin-template-3 #attachmentAuditModal .modal-header {
    background: var(--adm3-surface) !important;
    border-bottom: 1px solid var(--adm3-border) !important;
    color: var(--adm3-heading) !important;
    padding: 14px 20px !important;
}

.admin-template-3 #editTplModal .modal-header .modal-title,
.admin-template-3 #previewTplModal .modal-header .modal-title,
.admin-template-3 #attachmentTplModal .modal-header .modal-title,
.admin-template-3 #attachmentAuditModal .modal-header .modal-title {
    color: var(--adm3-heading) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
}

.admin-template-3 #editTplModal .modal-header .modal-title i,
.admin-template-3 #previewTplModal .modal-header .modal-title i,
.admin-template-3 #attachmentTplModal .modal-header .modal-title i,
.admin-template-3 #attachmentAuditModal .modal-header .modal-title i {
    color: var(--adm3-primary) !important;
    margin-right: 6px;
}

.admin-template-3 #editTplModal .modal-header .close,
.admin-template-3 #previewTplModal .modal-header .close,
.admin-template-3 #attachmentTplModal .modal-header .close,
.admin-template-3 #attachmentAuditModal .modal-header .close {
    color: var(--adm3-muted) !important;
    opacity: 0.8 !important;
    text-shadow: none !important;
}

/* 8. TOC Generator Table Header Polish */
.admin-template-3 #tocTable thead tr {
    background: var(--adm3-surface-subtle) !important;
}

.admin-template-3 #tocTable .serial-badge {
    background: rgba(var(--adm3-primary-rgb), 0.1) !important;
    border: 1px solid rgba(var(--adm3-primary-rgb), 0.22);
    color: var(--adm3-primary) !important;
    font-weight: 700;
}

/* 9. Dark Mode Parity for ALL Analytics & Reporting Components */
html[data-adm3-theme="dark"] .admin-template-3 .adm3-kpi-tile,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-metric-strip,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-analytics-page .chart-box,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-analytics-page .export-form-box {
    background: var(--adm3-surface) !important;
    border-color: var(--adm3-border) !important;
    color: var(--adm3-text) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-kpi-tile.tone-ok .adm3-kpi-tile__icon {
    background: rgba(16, 185, 129, 0.16) !important;
    color: #34d399 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-kpi-tile.tone-warn .adm3-kpi-tile__icon {
    background: rgba(245, 158, 11, 0.16) !important;
    color: #fbbf24 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-kpi-tile.tone-danger .adm3-kpi-tile__icon {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #f87171 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-kpi-tile.tone-purple .adm3-kpi-tile__icon {
    background: rgba(139, 92, 246, 0.16) !important;
    color: #a78bfa !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-kpi-tile.tone-info .adm3-kpi-tile__icon {
    background: rgba(14, 165, 233, 0.16) !important;
    color: #38bdf8 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-kpi-tile.tone-muted .adm3-kpi-tile__icon {
    background: rgba(148, 163, 184, 0.16) !important;
    color: #94a3b8 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-preset-chip {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--adm3-border) !important;
    color: #e2e8f0 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-preset-chip .stat-pill {
    background: rgba(255, 255, 255, 0.09) !important;
    color: #f8fafc !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-rp-page #rp-table > thead > tr,
html[data-adm3-theme="dark"] .admin-template-3 #plag-table > thead > tr,
html[data-adm3-theme="dark"] .admin-template-3 #sim-table > thead > tr,
html[data-adm3-theme="dark"] .admin-template-3 #coi-table > thead > tr,
html[data-adm3-theme="dark"] .admin-template-3 #metrics-table > thead > tr {
    background: #1e293b !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .match-details-panel,
html[data-adm3-theme="dark"] .admin-template-3 #attachmentTplModal .modal-body {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .attachment-rule {
    background: #1e293b !important;
    border-color: #334155 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-tpl-card .box-footer {
    background: rgba(255, 255, 255, 0.03) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .score-bar-wrap,
html[data-adm3-theme="dark"] .admin-template-3 .sim-bar-wrap,
html[data-adm3-theme="dark"] .admin-template-3 .rate-bar-wrap {
    background: #334155 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-analytics-page td span[style*="color:#444"],
html[data-adm3-theme="dark"] .admin-template-3 .adm3-analytics-page td span[style*="color:#555"],
html[data-adm3-theme="dark"] .admin-template-3 .adm3-analytics-page .tpl-card-subject {
    color: #cbd5e1 !important;
}

/* ==========================================================================
   OVERVIEW GROUP POLISH & DARK MODE PARITY
   (Dashboard, Pipeline, Audit Log, Email Log, Settings, Roles & Permissions)
   ========================================================================== */

/* 1. Clean right-aligned panel subtitle (Audit Log, Email Delivery Log) */
.admin-template-3 .panel-heading:has(> .adm3-panel-sub) {
    justify-content: space-between !important;
}

.admin-template-3 .panel-heading:has(> .adm3-panel-sub) > .panel-title {
    flex: 0 1 auto !important;
    width: auto !important;
}

.admin-template-3 .adm3-panel-sub {
    color: var(--adm3-muted);
    font-size: 12px;
    font-weight: 500;
    margin-left: auto;
}

/* 2. Pipeline Dashboard WMS Surface + Light/Dark Sync */
.admin-template-3 .adm3-pipeline-page .pipeline-wrap {
    padding: 0 !important;
}

.admin-template-3 .adm3-pl-flow-box {
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.035);
    margin-bottom: 16px;
    padding: 16px 18px 12px;
}

.admin-template-3 .adm3-pl-flow-box .adm3-pl-legend {
    margin: 4px 0 0 !important;
}

.admin-template-3 .adm3-pl-cluster {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.035);
}

.admin-template-3 .adm3-pl-cluster__hd {
    color: var(--adm3-muted) !important;
}

.admin-template-3 .adm3-pl-row__top a {
    color: var(--adm3-text) !important;
    font-weight: 600;
}

.admin-template-3 .adm3-pl-row__top a:hover {
    color: var(--adm3-primary) !important;
}

.admin-template-3 .adm3-pl-row__top strong {
    color: var(--adm3-heading);
    font-variant-numeric: tabular-nums;
}

.admin-template-3 .adm3-pl-bar-track {
    background: var(--adm3-surface-subtle) !important;
}

/* 3. Settings Page — Dynamic Brand Buttons (kills legacy #0f6b77 teal) + Dark Mode */
.admin-template-3 .settings-save-btn {
    background: var(--adm3-primary) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(var(--adm3-primary-rgb), 0.22) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.admin-template-3 .settings-save-btn:hover,
.admin-template-3 .settings-save-btn:focus {
    background: var(--adm3-primary-dark) !important;
    color: #ffffff !important;
}

.admin-template-3 .settings-outline-btn {
    border-color: var(--adm3-border-strong) !important;
    border-radius: 10px !important;
    color: var(--adm3-primary) !important;
    background: var(--adm3-surface) !important;
    font-weight: 600;
}

.admin-template-3 .settings-outline-btn:hover,
.admin-template-3 .settings-outline-btn:focus {
    background: rgba(var(--adm3-primary-rgb), 0.08) !important;
    border-color: var(--adm3-primary) !important;
    color: var(--adm3-primary) !important;
}

.admin-template-3 .settings-action-card {
    background: var(--adm3-surface-subtle) !important;
    border-color: var(--adm3-border) !important;
}

.admin-template-3 .settings-action-card h5,
.admin-template-3 .settings-card label {
    color: var(--adm3-heading) !important;
}

.admin-template-3 .choice-tile {
    background: var(--adm3-surface-subtle) !important;
    border-color: var(--adm3-border) !important;
    color: var(--adm3-text) !important;
}

.admin-template-3 .asset-preview {
    background: var(--adm3-surface) !important;
    border-color: var(--adm3-border-strong) !important;
}

.admin-template-3 .settings-panel .panel-footer {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 14px !important;
    margin-top: 16px;
}

/* 4. Dark Mode Parity for Pipeline, Settings, and Roles & Permissions */
html[data-adm3-theme="dark"] .admin-template-3 .stage-card[style*="ecf0f1"] {
    background: rgba(148, 163, 184, 0.08) !important;
    border-color: var(--adm3-border) !important;
    color: #94a3b8 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .stage-card[style*="27ae60"] {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #34d399 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .stage-card[style*="f39c12"] {
    background: rgba(245, 158, 11, 0.16) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #fbbf24 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .stage-card[style*="e74c3c"] {
    background: rgba(239, 68, 68, 0.18) !important;
    border-color: rgba(239, 68, 68, 0.38) !important;
    color: #f87171 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-alert--danger,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-terminal--danger {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: rgba(239, 68, 68, 0.34) !important;
    color: #fca5a5 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-alert--danger .a-num,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-alert--danger .a-lbl,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-alert--danger .a-icon {
    color: #fca5a5 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-alert--warn,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-terminal--warn {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(245, 158, 11, 0.34) !important;
    color: #fcd34d !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-alert--warn .a-num,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-alert--warn .a-lbl,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-alert--warn .a-icon {
    color: #fcd34d !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-terminal--ok {
    background: rgba(16, 185, 129, 0.14) !important;
    border-color: rgba(16, 185, 129, 0.34) !important;
    color: #6ee7b7 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-pl-bar-track {
    background: #334155 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .suspend-alert {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(245, 158, 11, 0.34) !important;
    color: #fde68a !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .rbac-shell,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-card,
html[data-adm3-theme="dark"] .admin-template-3 .permission-group,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-savebar,
html[data-adm3-theme="dark"] .admin-template-3 .admin-row {
    background: var(--adm3-surface) !important;
    border-color: var(--adm3-border) !important;
    color: var(--adm3-text) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .rbac-tabs,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-content,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-permissions,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-form-band,
html[data-adm3-theme="dark"] .admin-template-3 .permission-group-head {
    background: #0f172a !important;
    border-color: var(--adm3-border) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .rbac-tabs > li.active > a,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-permission-tools,
html[data-adm3-theme="dark"] .admin-template-3 .permission-table th {
    background: var(--adm3-surface) !important;
    color: var(--adm3-heading) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .rbac-search input,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-role-item,
html[data-adm3-theme="dark"] .admin-template-3 .role-option {
    background: #0f172a !important;
    border-color: var(--adm3-border) !important;
    color: var(--adm3-text) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .module-name,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-editor-title h3,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-card-head h3 {
    color: var(--adm3-heading) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .permission-table td {
    border-color: var(--adm3-border) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .permission-check {
    background: #0f172a;
    border-color: #475569;
}

html[data-adm3-theme="dark"] .admin-template-3 .role-chip {
    background: rgba(148, 163, 184, 0.14) !important;
    color: #cbd5e1 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .rbac-tabs > li.active .tab-count,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-editor-icon,
html[data-adm3-theme="dark"] .admin-template-3 .select-all-control,
html[data-adm3-theme="dark"] .admin-template-3 .rbac-eyebrow {
    background: rgba(59, 130, 246, 0.18) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
    color: #93c5fd !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .rbac-eyebrow {
    background: transparent !important;
    border-color: transparent !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .info-box-icon.bg-aqua,
html[data-adm3-theme="dark"] .admin-template-3 .info-box-icon.bg-blue {
    background: rgba(59, 130, 246, 0.16) !important;
    color: #60a5fa !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .info-box-icon.bg-green {
    background: rgba(16, 185, 129, 0.16) !important;
    color: #34d399 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .info-box-icon.bg-red {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #f87171 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .info-box-icon.bg-yellow,
html[data-adm3-theme="dark"] .admin-template-3 .info-box-icon.bg-orange {
    background: rgba(245, 158, 11, 0.16) !important;
    color: #fbbf24 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .info-box-icon.bg-purple {
    background: rgba(139, 92, 246, 0.16) !important;
    color: #a78bfa !important;
}

/* ==========================================================================
   FIXED-WIDTH FIRST COLUMN & TRAILING ACTION COLUMN ACROSS ALL TABLES
   ========================================================================== */
.admin-template-3 .table th.adm3-col-fixed-first,
.admin-template-3 .table td.adm3-col-fixed-first {
    box-sizing: border-box !important;
    font-variant-numeric: tabular-nums;
    padding-left: 5px !important;
    padding-right: 5px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.admin-template-3 table.dataTable thead th.adm3-col-fixed-first.sorting,
.admin-template-3 table.dataTable thead th.adm3-col-fixed-first.sorting_asc,
.admin-template-3 table.dataTable thead th.adm3-col-fixed-first.sorting_desc {
    padding-left: 6px !important;
    padding-right: 16px !important;
}

.admin-template-3 .table th.adm3-col-fixed-first-left,
.admin-template-3 .table td.adm3-col-fixed-first-left {
    box-sizing: border-box !important;
    font-variant-numeric: tabular-nums;
    padding-left: 6px !important;
    padding-right: 6px !important;
    white-space: nowrap !important;
}

.admin-template-3 .table th.adm3-col-fixed-action,
.admin-template-3 .table td.adm3-col-fixed-action {
    box-sizing: border-box !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

.admin-template-3 .table td.adm3-col-fixed-action > .btn-group {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: center;
}

.admin-template-3 .table td.adm3-col-fixed-action > .btn-group > .btn {
    float: none !important;
    margin: 0 !important;
}

/* ==========================================================================
   ELIMINATE SPURIOUS X-AXIS SCROLLBARS ON DESKTOP TABLES (1280px & 1440px+)
   ========================================================================== */
/* 1. Prevent double scrollbox & outer border when .table-responsive wraps DataTables */
.admin-template-3 .table-responsive:has(> .dataTables_wrapper),
.admin-template-3 .table-responsive.adm3-dt-outer-wrap {
    border: 0 !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    overflow-x: visible !important;
    padding: 0 !important;
}

/* 2. Keep flush .box-body.table-responsive free of +32px padding inside scroll container */
.admin-template-3 .box-body.table-responsive {
    border: 0 !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* 3. Allow multi-word headers to wrap cleanly at spaces only when constrained; tighten sort arrows */
.admin-template-3 .table > thead > tr > th,
.admin-template-3 table.dataTable thead th {
    line-height: 1.25;
    vertical-align: middle !important;
    white-space: normal;
    word-break: normal;
}

.admin-template-3 table.dataTable thead .sorting,
.admin-template-3 table.dataTable thead .sorting_asc,
.admin-template-3 table.dataTable thead .sorting_desc {
    padding-right: 20px !important;
}

.admin-template-3 table.dataTable thead .sorting:after,
.admin-template-3 table.dataTable thead .sorting_asc:after,
.admin-template-3 table.dataTable thead .sorting_desc:after {
    bottom: auto;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

/* 4. Normalize legacy inline negative-margin <ol> inside manuscript author cells */
.admin-template-3 .table td ol {
    margin: 0 !important;
    padding-left: 16px !important;
}

/* 5. Allow long unbreakable tokens (URLs, DOIs, emails, long usernames) to shrink & wrap cleanly */
.admin-template-3 .table td.adm3-wrap-token,
.admin-template-3 .table td.adm3-wrap-token a:not(.btn) {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.admin-template-3 .table td .adm3-inline-actions {
    gap: 4px !important;
}

.admin-template-3 .table td .adm3-inline-actions > .btn {
    padding: 3px 7px !important;
}

/* 6. Auto-density tiers for 8–9 col & 10+ col tables */
.admin-template-3 .table.adm3-table-dense > thead > tr > th,
.admin-template-3 table.dataTable.adm3-table-dense thead th {
    font-size: 10px !important;
    letter-spacing: 0.04em !important;
    padding: 8px 6px !important;
}

.admin-template-3 table.dataTable.adm3-table-dense thead .sorting,
.admin-template-3 table.dataTable.adm3-table-dense thead .sorting_asc,
.admin-template-3 table.dataTable.adm3-table-dense thead .sorting_desc {
    padding-right: 17px !important;
}

.admin-template-3 .table.adm3-table-dense > tbody > tr > td {
    font-size: 12px !important;
    padding: 7px 6px !important;
}

.admin-template-3 .table.adm3-table-dense td .btn.btn-social {
    font-size: 10.5px !important;
    height: auto !important;
    line-height: 1.25 !important;
    min-height: 26px !important;
    padding: 3px 8px !important;
    white-space: normal !important;
}

.admin-template-3 .table.adm3-table-xdense > thead > tr > th,
.admin-template-3 table.dataTable.adm3-table-xdense thead th {
    font-size: 9.75px !important;
    letter-spacing: 0.02em !important;
    line-height: 1.2;
    padding: 7px 4px !important;
}

.admin-template-3 table.dataTable.adm3-table-xdense thead .sorting,
.admin-template-3 table.dataTable.adm3-table-xdense thead .sorting_asc,
.admin-template-3 table.dataTable.adm3-table-xdense thead .sorting_desc {
    padding-right: 14px !important;
}

.admin-template-3 table.dataTable.adm3-table-xdense thead .sorting:after,
.admin-template-3 table.dataTable.adm3-table-xdense thead .sorting_asc:after,
.admin-template-3 table.dataTable.adm3-table-xdense thead .sorting_desc:after {
    font-size: 10px;
    right: 3px;
}

.admin-template-3 .table.adm3-table-xdense > tbody > tr > td {
    font-size: 11.75px !important;
    line-height: 1.38;
    padding: 6px 4px !important;
}

.admin-template-3 .table.adm3-table-xdense td .btn {
    font-size: 10.5px !important;
    min-height: 24px;
    padding: 3px 6px !important;
}

.admin-template-3 .table.adm3-table-xdense td .label,
.admin-template-3 .table.adm3-table-xdense td .adm3-badge {
    font-size: 10.5px !important;
    padding: 2px 6px 2px 5px;
}

.admin-template-3 .table.adm3-table-xdense td .badge {
    line-height: 1.25;
    white-space: normal;
}

/* 7. Compact laptop refinement (1280px–1380px) so 7–13 col tables fit cleanly without X scrollbars */
@media (max-width: 1380px) {
    .admin-template-3 .table.adm3-table-7plus > thead > tr > th,
    .admin-template-3 table.dataTable.adm3-table-7plus thead th {
        font-size: 10px !important;
        letter-spacing: 0.03em !important;
        padding: 7px 5px !important;
    }

    .admin-template-3 table.dataTable.adm3-table-7plus thead .sorting,
    .admin-template-3 table.dataTable.adm3-table-7plus thead .sorting_asc,
    .admin-template-3 table.dataTable.adm3-table-7plus thead .sorting_desc {
        padding-right: 15px !important;
    }

    .admin-template-3 .table.adm3-table-7plus > tbody > tr > td {
        font-size: 11.75px !important;
        padding: 6px 5px !important;
    }

    .admin-template-3 .table.adm3-table-xdense > thead > tr > th,
    .admin-template-3 table.dataTable.adm3-table-xdense thead th {
        font-size: 9.5px !important;
        padding: 6px 3px !important;
    }

    .admin-template-3 table.dataTable.adm3-table-xdense thead .sorting,
    .admin-template-3 table.dataTable.adm3-table-xdense thead .sorting_asc,
    .admin-template-3 table.dataTable.adm3-table-xdense thead .sorting_desc {
        padding-right: 13px !important;
    }

    .admin-template-3 .table.adm3-table-xdense > tbody > tr > td {
        font-size: 11.25px !important;
        padding: 5px 3px !important;
    }

    .admin-template-3 .table.adm3-table-xdense td .rd-date-input {
        min-width: 0 !important;
        width: 102px !important;
    }

    .admin-template-3 .adm3-compact-table > thead > tr > th,
    .admin-template-3 .adm3-compact-table > tbody > tr > td {
        padding: 7px 6px !important;
    }

    .admin-template-3 .adm3-wms-table .adm3-col-primary {
        max-width: 210px;
        min-width: 150px;
    }

    .admin-template-3 .adm3-wms-table .adm3-cell-sub {
        flex-wrap: wrap;
        gap: 3px;
    }

    .admin-template-3 .adm3-wms-table .adm3-metric-pill {
        font-size: 10px;
        padding: 0 4px;
    }

    .admin-template-3 .adm3-wms-table .adm3-link-btn,
    .admin-template-3 .adm3-wms-table .adm3-doi-status-btn {
        font-size: 10.5px;
        padding: 0 5px;
    }

    .admin-template-3 .adm3-reviewer-table .adm3-col-primary {
        max-width: 180px;
        min-width: 140px;
    }

    .admin-template-3 .adm3-reviewer-table .adm3-rev-email {
        max-width: 110px;
    }

    .admin-template-3 .adm3-reviewer-table .adm3-rev-exp {
        max-width: 120px;
    }

    .admin-template-3 .adm3-reviewer-table .adm3-rev-tag {
        max-width: 54px;
    }
}

/* ==========================================================================
   EXECUTIVE FORM ELEMENTS SYSTEM (SELECTS, FILE UPLOADS, CHECKBOXES, RADIOS,
   TEXTAREAS, DATEPICKERS, HELP/ERROR TEXT, CKEDITOR, INPUT GROUPS — LIGHT+DARK)
   ========================================================================== */

/* 1. Labels, Help Text & Validation Errors */
.admin-template-3 .form-group {
    margin-bottom: 16px;
}

.admin-template-3 .form-group > label:not(.help-block):not(.error):not(.checkbox-inline):not(.radio-inline),
.admin-template-3 .control-label:not(.help-block):not(.error) {
    color: var(--adm3-heading);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin-bottom: 6px;
}

.admin-template-3 .help-block,
.admin-template-3 label.help-block,
.admin-template-3 .form-group label.help-block {
    color: var(--adm3-muted) !important;
    display: block;
    font-size: 11.5px !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
    margin: 5px 0 0 !important;
}

.admin-template-3 label.error:empty,
.admin-template-3 .form-group label.error:empty {
    display: none !important;
    margin: 0 !important;
}

.admin-template-3 label.error,
.admin-template-3 .form-group label.error {
    color: #dc2626 !important;
    display: block;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    margin: 5px 0 0 !important;
}

.admin-template-3 .form-control.error,
.admin-template-3 input.error.form-control,
.admin-template-3 select.error.form-control,
.admin-template-3 textarea.error.form-control {
    background-color: #fef2f2;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.11) !important;
}

/* 2. Uniform Crisp Inputs, Hover/Focus, Date Inputs & Clickable Datepickers */
.admin-template-3 .form-control,
.admin-template-3 .form-control.input-sm {
    background-color: #ffffff;
    border: 1px solid #d5dce5;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    color: var(--adm3-heading);
    font-size: 13px;
    height: 38px;
    line-height: 1.45;
    min-height: 38px;
    padding: 7px 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.admin-template-3 .form-control:hover:not(:disabled):not(:focus) {
    border-color: #b4c0cf;
}

.admin-template-3 .form-control:focus {
    background-color: #ffffff;
    border-color: var(--adm3-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.14) !important;
    outline: 0;
}

.admin-template-3 .form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Keep filter toolbars & inline forms compact */
.admin-template-3 .form-inline .form-control,
.admin-template-3 .form-inline .form-control.input-sm,
.admin-template-3 .adm3-filter-item .form-control,
.admin-template-3 .adm3-filter-item .admin-filter-reset-group .form-control {
    font-size: 12.5px;
    height: 34px;
    min-height: 34px;
    padding: 5px 10px;
}

/* True readonly / disabled fields vs clickable datepicker readonly fields */
.admin-template-3 .form-control[readonly]:not(#authorDOB):not(.date):not(.datepicker):not(.datepickers):not(._date),
.admin-template-3 .form-control:disabled {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0;
    box-shadow: none;
    color: var(--adm3-muted) !important;
    cursor: not-allowed;
}

.admin-template-3 .form-control.date[readonly],
.admin-template-3 .form-control.datepicker[readonly],
.admin-template-3 .form-control.datepickers[readonly],
.admin-template-3 .form-control._date[readonly],
.admin-template-3 #authorDOB.form-control[readonly] {
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-position: right 11px center;
    background-repeat: no-repeat;
    background-size: 15px 15px;
    color: var(--adm3-heading) !important;
    cursor: pointer !important;
    padding-right: 34px !important;
}

.admin-template-3 input[type="date"].form-control {
    font-variant-numeric: tabular-nums;
    padding: 6px 11px;
}

/* 3. Custom Modern <select> Dropdowns (No Chunky Native OS Chevrons) */
.admin-template-3 select.form-control:not([multiple]):not([size]),
.admin-template-3 select.form-control.input-sm:not([multiple]):not([size]) {
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-position: right 11px center !important;
    background-repeat: no-repeat !important;
    background-size: 14px 14px !important;
    cursor: pointer;
    padding: 6px 34px 6px 12px !important;
}

.admin-template-3 .form-inline select.form-control:not([multiple]):not([size]),
.admin-template-3 .adm3-filter-item select.form-control:not([multiple]):not([size]) {
    background-position: right 9px center !important;
    padding: 4px 28px 4px 10px !important;
}

.admin-template-3 .dataTables_wrapper .dataTables_length select {
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-position: right 8px center !important;
    background-repeat: no-repeat !important;
    background-size: 13px 13px !important;
    cursor: pointer;
    padding: 0 26px 0 10px !important;
}

.admin-template-3 select.form-control[multiple],
.admin-template-3 select.form-control[size] {
    height: auto !important;
    min-height: 108px;
    padding: 6px 8px !important;
}

/* 4. Multi-line Textareas (Fix 1-line squished .input-sm textareas) */
.admin-template-3 textarea.form-control,
.admin-template-3 textarea.form-control.input-sm {
    height: auto !important;
    line-height: 1.5;
    min-height: 92px;
    padding: 9px 12px !important;
    resize: vertical;
}

.admin-template-3 textarea.form-control[rows="2"],
.admin-template-3 textarea.form-control[rows="3"] {
    min-height: 68px;
}

/* 5. Modern Dashed File Upload Dropzone (All File Inputs, with or without .form-control) */
.admin-template-3 input[type="file"]:not(.display-hide):not([style*="display:none"]):not([style*="display: none"]) {
    background: #f8fafc !important;
    border: 1.5px dashed #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: var(--adm3-muted) !important;
    cursor: pointer;
    display: block;
    font-size: 12.5px !important;
    height: auto !important;
    line-height: 1.4 !important;
    min-height: 44px !important;
    padding: 6px 10px !important;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
    width: 100%;
}

.admin-template-3 input[type="file"]:not(.display-hide):hover {
    background: rgba(var(--adm3-primary-rgb), 0.03) !important;
    border-color: var(--adm3-primary) !important;
}

.admin-template-3 input[type="file"]:not(.display-hide):focus {
    border-color: var(--adm3-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.14) !important;
    outline: 0;
}

.admin-template-3 input[type="file"]::file-selector-button,
.admin-template-3 input[type="file"]::-webkit-file-upload-button {
    -webkit-appearance: none;
    appearance: none;
    background: #ffffff;
    border: 1px solid #d5dce5;
    border-radius: 7px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    color: var(--adm3-heading);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
    padding: 5px 12px;
    transition: all 0.14s ease;
}

.admin-template-3 input[type="file"]:hover::file-selector-button,
.admin-template-3 input[type="file"]:hover::-webkit-file-upload-button {
    background: var(--adm3-primary);
    border-color: var(--adm3-primary);
    color: #ffffff;
}

/* 6. Modern Custom Checkboxes & Radios (Scoped cleanly; preserves RBAC permission-matrix checks) */
.admin-template-3 input[type="checkbox"]:not(.permission-check):not(.group-toggle):not(.group-capability-toggle):not(#select-all-permissions),
.admin-template-3 input[type="radio"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-grid;
    flex-shrink: 0;
    height: 16px;
    margin: 0 6px 0 0;
    min-width: 16px;
    place-content: center;
    position: relative;
    transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
    vertical-align: -3px;
    width: 16px;
}

.admin-template-3 input[type="checkbox"]:not(.permission-check):not(.group-toggle):not(.group-capability-toggle):not(#select-all-permissions) {
    border-radius: 4.5px;
}

.admin-template-3 input[type="radio"] {
    border-radius: 50%;
}

.admin-template-3 input[type="checkbox"]:not(.permission-check):not(.group-toggle):not(.group-capability-toggle):not(#select-all-permissions):hover:not(:disabled),
.admin-template-3 input[type="radio"]:hover:not(:disabled) {
    border-color: var(--adm3-primary);
}

.admin-template-3 input[type="checkbox"]:not(.permission-check):not(.group-toggle):not(.group-capability-toggle):not(#select-all-permissions):focus-visible,
.admin-template-3 input[type="radio"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.2);
    outline: 0;
}

.admin-template-3 input[type="checkbox"]:not(.permission-check):not(.group-toggle):not(.group-capability-toggle):not(#select-all-permissions):checked {
    background-color: var(--adm3-primary);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
    border-color: var(--adm3-primary);
}

.admin-template-3 input[type="radio"]:checked {
    background-color: var(--adm3-primary);
    border-color: var(--adm3-primary);
    box-shadow: inset 0 0 0 3px #ffffff;
}

.admin-template-3 input[type="checkbox"]:disabled,
.admin-template-3 input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.admin-template-3 .table th input[type="checkbox"],
.admin-template-3 .table td input[type="checkbox"] {
    margin: 0 !important;
    vertical-align: middle;
}

.admin-template-3 .checkbox label,
.admin-template-3 .radio label,
.admin-template-3 .checkbox-inline,
.admin-template-3 .radio-inline {
    align-items: center;
    cursor: pointer;
    display: inline-flex !important;
    font-size: 13px;
    font-weight: 500;
    gap: 8px;
    padding-left: 0 !important;
}

.admin-template-3 .checkbox label input[type="checkbox"],
.admin-template-3 .radio label input[type="radio"],
.admin-template-3 .checkbox-inline input[type="checkbox"],
.admin-template-3 .radio-inline input[type="radio"] {
    margin: 0 !important;
    position: static !important;
}

/* 7. Input Groups, Hidden SheepIt Remove Addon, Phone/Country Plugins */
.admin-template-3 .form-group .input-group {
    width: 100%;
}

.admin-template-3 .form-inline .form-group .input-group {
    width: auto;
}

.admin-template-3 .input-group .form-control {
    height: 38px;
    min-height: 38px;
}

.admin-template-3 #form .input-group > .input-group-addon:first-child,
.admin-template-3 .modal-body .input-group > .input-group-addon:first-child {
    border-radius: 8px 0 0 8px !important;
    border-right: 0 !important;
    padding: 0 11px !important;
}

.admin-template-3 #form .input-group > .input-group-addon:last-child,
.admin-template-3 .modal-body .input-group > .input-group-addon:last-child {
    border-left: 0 !important;
    border-radius: 0 8px 8px 0 !important;
    border-right: 1px solid #d5dce5 !important;
    padding: 0 11px !important;
}

.admin-template-3 .input-group-addon label {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 5px;
    margin: 0 !important;
}

/* Hide empty SheepIt addon when only 1 row exists (fixes blank gray box on Author University 1) */
.admin-template-3 .input-group-addon:has(> a[style*="display: none"]),
.admin-template-3 .input-group-addon:has(> a[style*="display:none"]) {
    display: none !important;
}

.admin-template-3 .input-group:has(> .input-group-addon > a[style*="display: none"]) > .form-control,
.admin-template-3 .input-group:has(> .input-group-addon > a[style*="display:none"]) > .form-control {
    border-radius: 8px !important;
}

.admin-template-3 .input-group-addon > a.close {
    color: #94a3b8;
    float: none !important;
    font-size: 13px;
    line-height: 1;
    opacity: 1;
    padding: 2px;
    text-shadow: none;
    transition: color 0.14s ease;
}

.admin-template-3 .input-group-addon > a.close:hover {
    color: #dc2626;
}

.admin-template-3 .intl-tel-input,
.admin-template-3 .iti,
.admin-template-3 .country-select {
    display: block !important;
    width: 100% !important;
}

/* 8. Modern Rounded CKEditor 4, WYSIHTML5 & Floating Datepicker Popups */
.admin-template-3 .cke_chrome {
    border: 1px solid #d5dce5 !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-template-3 .cke_chrome.cke_focus {
    border-color: var(--adm3-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.14) !important;
}

.admin-template-3 .cke_top {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    padding: 6px 8px 3px !important;
}

.admin-template-3 .cke_bottom {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    padding: 5px 10px !important;
}

.admin-template-3 .cke_toolgroup {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

.admin-template-3 .wysihtml5-toolbar {
    background: #f8fafc;
    border: 1px solid #d5dce5;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    margin: 0 !important;
    padding: 6px 8px !important;
}

.admin-template-3 .wysihtml5-sandbox {
    border: 1px solid #d5dce5 !important;
    border-radius: 0 0 10px 10px !important;
}

.admin-template-3 .datepicker.datepicker-dropdown {
    background: var(--adm3-surface);
    border: 1px solid var(--adm3-border);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    padding: 10px;
}

.admin-template-3 .datepicker table tr td.active,
.admin-template-3 .datepicker table tr td.active:hover,
.admin-template-3 .datepicker table tr td span.active,
.admin-template-3 .datepicker table tr td span.active:hover {
    background: var(--adm3-primary) !important;
    background-image: none !important;
    border-radius: 7px;
    color: #ffffff !important;
    text-shadow: none;
}

.admin-template-3 .datepicker table tr td.day:hover,
.admin-template-3 .datepicker table tr td span:hover {
    background: rgba(var(--adm3-primary-rgb), 0.1) !important;
    border-radius: 7px;
}

/* 9. Full Dark Mode Parity for All Upgraded Form Elements */
html[data-adm3-theme="dark"] .admin-template-3 .form-control,
html[data-adm3-theme="dark"] .admin-template-3 .form-control.input-sm,
html[data-adm3-theme="dark"] .admin-template-3 .form-control.date[readonly],
html[data-adm3-theme="dark"] .admin-template-3 .form-control.datepicker[readonly],
html[data-adm3-theme="dark"] .admin-template-3 .form-control.datepickers[readonly],
html[data-adm3-theme="dark"] .admin-template-3 .form-control._date[readonly] {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .form-control[readonly]:not(#authorDOB):not(.date):not(.datepicker):not(.datepickers):not(._date),
html[data-adm3-theme="dark"] .admin-template-3 .form-control:disabled {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 input[type="date"].form-control {
    color-scheme: dark;
}

html[data-adm3-theme="dark"] .admin-template-3 select.form-control:not([multiple]):not([size]),
html[data-adm3-theme="dark"] .admin-template-3 .dataTables_wrapper .dataTables_length select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

html[data-adm3-theme="dark"] .admin-template-3 input[type="file"]:not(.display-hide):not([style*="display:none"]):not([style*="display: none"]) {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #94a3b8 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 input[type="file"]::file-selector-button,
html[data-adm3-theme="dark"] .admin-template-3 input[type="file"]::-webkit-file-upload-button {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

html[data-adm3-theme="dark"] .admin-template-3 input[type="checkbox"]:not(.permission-check):not(.group-toggle):not(.group-capability-toggle):not(#select-all-permissions),
html[data-adm3-theme="dark"] .admin-template-3 input[type="radio"] {
    background-color: #0f172a;
    border-color: #475569;
}

html[data-adm3-theme="dark"] .admin-template-3 input[type="radio"]:checked {
    box-shadow: inset 0 0 0 3px #0f172a;
}

html[data-adm3-theme="dark"] .admin-template-3 #form .input-group-addon,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .input-group-addon {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .cke_chrome {
    border-color: #334155 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .cke_top,
html[data-adm3-theme="dark"] .admin-template-3 .cke_bottom {
    background: #1e293b !important;
    border-color: #334155 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .nav-tabs-custom,
html[data-adm3-theme="dark"] .admin-template-3 .nav-tabs-custom > .tab-content,
html[data-adm3-theme="dark"] .admin-template-3 .tab-content,
html[data-adm3-theme="dark"] .admin-template-3 .tab-pane,
html[data-adm3-theme="dark"] .admin-template-3 .panel,
html[data-adm3-theme="dark"] .admin-template-3 .panel-body,
html[data-adm3-theme="dark"] .admin-template-3 .panel-body-blank,
html[data-adm3-theme="dark"] .admin-template-3 .box,
html[data-adm3-theme="dark"] .admin-template-3 .box-body {
    background-color: #111b2e !important;
    border-color: #243247 !important;
    color: #e2e8f0;
}

html[data-adm3-theme="dark"] .admin-template-3 .box-footer,
html[data-adm3-theme="dark"] .admin-template-3 .panel-footer {
    background-color: #0f172a !important;
    border-top-color: #243247 !important;
    color: #94a3b8 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .table,
html[data-adm3-theme="dark"] .admin-template-3 table.dataTable,
html[data-adm3-theme="dark"] .admin-template-3 .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #111b2e !important;
    color: #e2e8f0 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .table-striped > tbody > tr:nth-of-type(even) {
    background-color: #162238 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .table > tbody > tr > td {
    border-bottom-color: #1e2d45 !important;
    color: #e2e8f0 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .datepicker.datepicker-dropdown {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

/* ==========================================================================
   SPLIT EDITORIAL AUTHENTICATION PAGE (CBER Editorial Sign-In Architecture)
   Synced with --adm3-primary palette & html[data-adm3-theme="dark"]
   ========================================================================== */
body.login-page.admin-template-3 {
    --auth-page: #f8f7f4;
    --auth-surface: #ffffff;
    --auth-tint: #efefea;
    --auth-soft: rgba(var(--adm3-primary-rgb), 0.08);
    --auth-ink: #162433;
    --auth-muted: #5b6978;
    --auth-line: #d9dfe6;
    --auth-story-bg: var(--adm3-primary-dark);
    --auth-story-bg-mix: linear-gradient(155deg, color-mix(in srgb, var(--adm3-primary) 42%, #0a1829) 0%, color-mix(in srgb, var(--adm3-primary-dark) 82%, #060e1a) 100%);
    --auth-story-ink: #f4f6f9;
    --auth-story-muted: rgba(214, 226, 238, 0.84);
    --auth-story-accent: color-mix(in srgb, var(--adm3-primary-light) 35%, #d6e8ff);
    --auth-story-numeral: #d8b578;
    --auth-story-line: rgba(220, 234, 248, 0.2);
    --auth-danger: #a33a37;
    --auth-danger-bg: #f9e9e7;
    background: var(--auth-page) !important;
    color: var(--auth-ink);
    margin: 0;
    min-height: 100dvh;
}

html[data-adm3-theme="dark"] body.login-page.admin-template-3 {
    --auth-page: #0d1622;
    --auth-surface: #142233;
    --auth-tint: #101c2b;
    --auth-soft: rgba(147, 197, 253, 0.11);
    --auth-ink: #edf2f8;
    --auth-muted: #9eb0c4;
    --auth-line: #27394d;
    --auth-danger: #f0a39b;
    --auth-danger-bg: #362225;
}

.admin-template-3 .adm3-auth-icon {
    fill: none;
    flex: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.65;
    vertical-align: middle;
    width: 18px;
}

.adm3-auth-split {
    display: grid;
    grid-template-columns: minmax(380px, 44%) minmax(0, 1fr);
    min-height: 100dvh;
}

/* Left Editorial Story Panel */
.adm3-auth-story {
    background-color: var(--auth-story-bg);
    background-image: var(--auth-story-bg-mix);
    color: var(--auth-story-ink);
    display: flex;
    flex-direction: column;
    isolation: isolate;
    overflow: hidden;
    padding: 40px clamp(32px, 4.8vw, 76px);
    position: relative;
}

.adm3-auth-story:after {
    background-image:
        linear-gradient(rgba(225, 240, 255, 0.9) 1px, transparent 1px),
        linear-gradient(90deg, rgba(225, 240, 255, 0.9) 1px, transparent 1px);
    background-size: 64px 64px;
    content: "";
    inset: 0;
    -webkit-mask-image: linear-gradient(135deg, transparent 5%, #000 100%);
    mask-image: linear-gradient(135deg, transparent 5%, #000 100%);
    opacity: 0.085;
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.admin-template-3 .adm3-auth-brand {
    align-items: center;
    color: var(--auth-story-ink);
    display: inline-flex;
    gap: 13px;
    line-height: 1.25;
    min-width: 0;
    text-decoration: none;
}

.admin-template-3 .adm3-auth-brand:hover,
.admin-template-3 .adm3-auth-brand:focus {
    color: #ffffff;
    text-decoration: none;
}

.adm3-auth-brand-img {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    flex-shrink: 0;
    height: 50px;
    object-fit: contain;
    padding: 3px;
    width: 50px;
}

.adm3-auth-brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.adm3-auth-brand-word {
    color: #f7f9fc;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.7px;
    line-height: 1.05;
}

.adm3-auth-brand-full {
    color: var(--auth-story-muted);
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.4;
    max-width: 240px;
}

.adm3-auth-story-content {
    margin: auto 0;
    padding: 58px 0 38px;
}

.adm3-auth-story-eyebrow {
    color: var(--auth-story-accent);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    margin: 0 0 16px;
    text-transform: uppercase;
}

.admin-template-3 .adm3-auth-headline {
    color: #f6f8fb;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: clamp(42px, 4.1vw, 62px);
    font-weight: 400 !important;
    letter-spacing: -1.8px;
    line-height: 1.11;
    margin: 0 0 22px;
}

.admin-template-3 .adm3-auth-headline em {
    color: var(--auth-story-accent);
    font-style: italic;
    font-weight: 400;
}

.adm3-auth-lead {
    color: var(--auth-story-muted);
    font-size: 13.5px;
    line-height: 1.82;
    margin: 0;
    max-width: 355px;
}

.adm3-auth-path {
    border-top: 1px solid var(--auth-story-line);
    margin-top: 34px;
    max-width: 368px;
}

.adm3-auth-path-row {
    align-items: center;
    border-bottom: 1px solid var(--auth-story-line);
    display: flex;
    gap: 18px;
    padding: 16px 0;
}

.adm3-auth-path-row > span {
    color: var(--auth-story-numeral);
    font: 400 20px/1 Georgia, "Times New Roman", serif;
    min-width: 24px;
}

.adm3-auth-path-row > div {
    min-width: 0;
}

.adm3-auth-path-row strong {
    color: #f4f6fa;
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
}

.adm3-auth-path-row small {
    color: var(--auth-story-muted);
    display: block;
    font-size: 11px;
    line-height: 1.45;
    margin-top: 3px;
}

.adm3-auth-path-row .adm3-auth-icon {
    color: var(--auth-story-accent);
    height: 17px;
    margin-left: auto;
    opacity: 0.85;
    width: 17px;
}

.adm3-auth-story-footer {
    color: var(--auth-story-muted);
    display: flex;
    font-size: 10px;
    gap: 14px;
    justify-content: space-between;
    letter-spacing: 0.9px;
    opacity: 0.82;
    text-transform: uppercase;
}

/* Right Authentication Panel */
.adm3-auth-panel {
    background: var(--auth-page);
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px clamp(28px, 5vw, 80px) 24px;
}

.adm3-auth-topline {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.adm3-auth-mobile-brand {
    align-items: center;
    color: var(--auth-ink);
    display: none;
    gap: 9px;
    text-decoration: none;
}

.adm3-auth-mobile-brand img {
    background: #ffffff;
    border: 1px solid var(--auth-line);
    border-radius: 4px;
    height: 30px;
    object-fit: contain;
    padding: 2px;
    width: 30px;
}

.adm3-auth-mobile-brand span {
    color: var(--auth-ink);
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.9px;
    line-height: 1;
}

.adm3-auth-mobile-brand em {
    color: var(--adm3-primary);
    font-style: normal;
}

html[data-adm3-theme="dark"] .adm3-auth-mobile-brand em {
    color: #93c5fd;
}

.admin-template-3 .adm3-auth-back {
    align-items: center;
    color: var(--auth-muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 500;
    gap: 8px;
    text-decoration: none;
    transition: color 0.16s ease;
}

.admin-template-3 .adm3-auth-back:hover,
.admin-template-3 .adm3-auth-back:focus {
    color: var(--adm3-primary);
    text-decoration: none;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-auth-back:hover,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-auth-back:focus {
    color: #93c5fd;
}

.adm3-auth-back .adm3-auth-icon {
    height: 15px;
    transition: transform 0.18s ease;
    width: 15px;
}

.adm3-auth-back:hover .adm3-auth-icon {
    transform: translateX(-2px);
}

.adm3-auth-theme-toggle {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    color: var(--auth-ink);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
    width: 36px;
}

.adm3-auth-theme-toggle:hover,
.adm3-auth-theme-toggle:focus-visible {
    background: var(--auth-soft);
    border-color: var(--auth-line);
    color: var(--adm3-primary);
    outline: none;
}

html[data-adm3-theme="dark"] .adm3-auth-theme-toggle:hover,
html[data-adm3-theme="dark"] .adm3-auth-theme-toggle:focus-visible {
    color: #93c5fd;
}

.adm3-auth-theme-toggle .adm3-theme-sun {
    display: none;
}

html[data-adm3-theme="dark"] .adm3-auth-theme-toggle .adm3-theme-sun {
    display: inline-block;
}

html[data-adm3-theme="dark"] .adm3-auth-theme-toggle .adm3-theme-moon {
    display: none;
}

.adm3-auth-content {
    margin: auto;
    max-width: 430px;
    padding: 36px 0 24px;
    width: 100%;
}

.adm3-auth-badge {
    align-items: center;
    background: var(--auth-soft);
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    color: var(--adm3-primary);
    display: inline-flex;
    font-size: 9.5px;
    font-weight: 600;
    gap: 7px;
    letter-spacing: 1.05px;
    line-height: 1.2;
    margin-bottom: 22px;
    padding: 7px 12px;
    text-transform: uppercase;
}

html[data-adm3-theme="dark"] .adm3-auth-badge {
    color: #93c5fd;
}

.adm3-auth-badge .adm3-auth-icon {
    height: 13px;
    width: 13px;
}

.adm3-auth-kicker {
    color: var(--adm3-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.7px;
    margin: 0 0 11px;
    text-transform: uppercase;
}

html[data-adm3-theme="dark"] .adm3-auth-kicker {
    color: #93c5fd;
}

.admin-template-3 .adm3-auth-title {
    color: var(--auth-ink);
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: clamp(34px, 3vw, 42px);
    font-weight: 400 !important;
    letter-spacing: -1.4px;
    line-height: 1.14;
    margin: 0 0 10px;
}

.adm3-auth-subtitle {
    color: var(--auth-muted);
    font-size: 13.5px;
    line-height: 1.65;
    margin: 0 0 26px;
    max-width: 400px;
}

/* Alert & Validation Feedback */
.adm3-auth-panel .form_result .alert {
    border: 1px solid var(--auth-line);
    border-left: 3px solid var(--auth-danger);
    border-radius: 6px;
    font-size: 12.5px;
    line-height: 1.55;
    margin: 0 0 18px;
    padding: 12px 14px;
}

.adm3-auth-panel .form_result .alert-danger {
    background: var(--auth-danger-bg) !important;
    border-color: rgba(163, 58, 55, 0.25) !important;
    border-left-color: var(--auth-danger) !important;
    color: var(--auth-danger) !important;
}

/* Form Fields */
.adm3-auth-field {
    margin-bottom: 18px;
}

.adm3-auth-label {
    color: var(--auth-ink);
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 7px;
}

.adm3-auth-req {
    color: var(--auth-muted);
    font-weight: 400;
}

body.login-page.admin-template-3 .adm3-auth-panel .form-control {
    background-color: var(--auth-surface) !important;
    border: 1px solid var(--auth-line) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: var(--auth-ink) !important;
    font-size: 13.5px !important;
    height: 46px !important;
    line-height: 1.45;
    min-height: 46px !important;
    padding: 11px 14px !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

body.login-page.admin-template-3 .adm3-auth-panel .form-control::placeholder {
    color: var(--auth-muted);
    opacity: 0.72;
}

body.login-page.admin-template-3 .adm3-auth-panel .form-control:focus {
    background-color: var(--auth-surface) !important;
    border-color: var(--adm3-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--adm3-primary-rgb), 0.16) !important;
}

html[data-adm3-theme="dark"] body.login-page.admin-template-3 .adm3-auth-panel .form-control:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22) !important;
}

body.login-page.admin-template-3 .adm3-auth-panel .form-control.error {
    border-color: var(--auth-danger) !important;
    box-shadow: 0 0 0 3px rgba(163, 58, 55, 0.14) !important;
}

.adm3-auth-panel label.error {
    color: var(--auth-danger);
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin: 6px 0 0;
}

body.login-page.admin-template-3 .adm3-auth-panel .password-field .form-control {
    padding-right: 50px !important;
}

body.login-page.admin-template-3 .adm3-auth-panel .password-toggle {
    border-radius: 5px;
    color: var(--auth-muted);
    height: 36px;
    margin-top: 0;
    right: 5px;
    top: 5px;
    transition: background-color 0.15s ease, color 0.15s ease;
    width: 36px;
}

body.login-page.admin-template-3 .adm3-auth-panel .password-toggle:hover,
body.login-page.admin-template-3 .adm3-auth-panel .password-toggle:focus-visible {
    background: var(--auth-tint);
    color: var(--auth-ink);
}

.adm3-auth-panel .password-toggle .adm3-eye-hide {
    display: none;
}

.adm3-auth-panel .password-toggle[aria-pressed="true"] .adm3-eye-show {
    display: none;
}

.adm3-auth-panel .password-toggle[aria-pressed="true"] .adm3-eye-hide {
    display: inline-block;
}

/* Remember Row */
.adm3-auth-between {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    justify-content: space-between;
    margin: 4px 0 22px;
}

.adm3-auth-check {
    align-items: center;
    color: var(--auth-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 400;
    gap: 8px;
    margin: 0;
    user-select: none;
}

body.login-page.admin-template-3 .adm3-auth-check input[type="checkbox"] {
    background-color: var(--auth-surface);
    border: 1.5px solid var(--auth-line);
    border-radius: 4px;
    height: 16px;
    margin: 0;
    width: 16px;
}

.admin-template-3 .adm3-auth-link {
    color: var(--adm3-primary);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
}

.admin-template-3 .adm3-auth-link:hover,
.admin-template-3 .adm3-auth-link:focus {
    color: var(--adm3-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-auth-link {
    color: #93c5fd;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-auth-link:hover,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-auth-link:focus {
    color: #bfdbfe;
}

/* Primary & Secondary Action Buttons */
body.login-page.admin-template-3 .adm3-login-btn {
    align-items: center;
    background: var(--adm3-primary) !important;
    border: 1px solid var(--adm3-primary) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #ffffff !important;
    display: inline-flex;
    font-size: 13px !important;
    font-weight: 600 !important;
    gap: 10px;
    height: 47px;
    justify-content: center;
    letter-spacing: 0.1px;
    min-height: 47px;
    padding: 11px 18px;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
    width: 100%;
}

body.login-page.admin-template-3 .adm3-login-btn:hover,
body.login-page.admin-template-3 .adm3-login-btn:focus {
    background: var(--adm3-primary-dark) !important;
    border-color: var(--adm3-primary-dark) !important;
    color: #ffffff !important;
}

body.login-page.admin-template-3 .adm3-login-btn .adm3-auth-icon {
    height: 16px;
    transition: transform 0.18s ease;
    width: 16px;
}

body.login-page.admin-template-3 .adm3-login-btn:hover .adm3-auth-icon {
    transform: translateX(2px);
}

.adm3-auth-or {
    align-items: center;
    color: var(--auth-muted);
    display: flex;
    font-size: 11px;
    gap: 13px;
    margin: 22px 0 18px;
}

.adm3-auth-or:before,
.adm3-auth-or:after {
    background: var(--auth-line);
    content: "";
    flex: 1;
    height: 1px;
}

.admin-template-3 .adm3-auth-outline-btn {
    align-items: center;
    background: transparent;
    border: 1px solid var(--auth-line);
    border-radius: 6px;
    color: var(--auth-ink);
    display: flex;
    font-size: 13px;
    font-weight: 600;
    gap: 10px;
    justify-content: center;
    min-height: 46px;
    padding: 10px 16px;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    width: 100%;
}

.admin-template-3 .adm3-auth-outline-btn:hover,
.admin-template-3 .adm3-auth-outline-btn:focus {
    background: var(--auth-soft);
    border-color: var(--adm3-primary);
    color: var(--adm3-primary);
    text-decoration: none;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-auth-outline-btn:hover,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-auth-outline-btn:focus {
    border-color: #60a5fa;
    color: #93c5fd;
}

.adm3-auth-outline-btn .adm3-auth-icon {
    height: 16px;
    width: 16px;
}

.adm3-auth-note {
    border-top: 1px solid var(--auth-line);
    color: var(--auth-muted);
    font-size: 11.5px;
    line-height: 1.72;
    margin: 22px 0 0;
    padding-top: 16px;
}

.adm3-auth-note strong {
    color: var(--auth-ink);
    font-weight: 600;
}

/* Footer */
.adm3-auth-footer {
    color: var(--auth-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 11px;
    gap: 16px;
    justify-content: center;
    margin-top: 14px;
}

.admin-template-3 .adm3-auth-footer a {
    color: var(--auth-muted);
    text-decoration: none;
}

.admin-template-3 .adm3-auth-footer a:hover,
.admin-template-3 .adm3-auth-footer a:focus {
    color: var(--adm3-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-auth-footer a:hover,
html[data-adm3-theme="dark"] .admin-template-3 .adm3-auth-footer a:focus {
    color: #93c5fd;
}

/* Local Development Quick Login Integration */
body.login-page.admin-template-3 .adm3-auth-panel .local-auto-login {
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-left: 3px solid var(--adm3-primary);
    border-radius: 6px;
    box-shadow: none;
    margin: 0 0 18px;
    padding: 13px 14px;
}

html[data-adm3-theme="dark"] body.login-page.admin-template-3 .adm3-auth-panel .local-auto-login {
    border-left-color: #60a5fa;
}

body.login-page.admin-template-3 .adm3-auth-panel .local-auto-heading {
    color: var(--auth-ink);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.9px;
    margin-bottom: 9px;
}

body.login-page.admin-template-3 .adm3-auth-panel .local-auto-heading small {
    background: var(--auth-soft);
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    color: var(--adm3-primary);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 8px;
}

html[data-adm3-theme="dark"] body.login-page.admin-template-3 .adm3-auth-panel .local-auto-heading small {
    color: #93c5fd;
}

body.login-page.admin-template-3 .adm3-auth-panel .local-auto-login .select2-selection--single {
    background: var(--auth-page) !important;
    border: 1px solid var(--auth-line) !important;
    border-radius: 6px !important;
    color: var(--auth-ink) !important;
    height: 54px !important;
}

body.login-page.admin-template-3 .adm3-auth-panel .local-auto-login .select2-selection__rendered {
    color: var(--auth-ink) !important;
    height: 52px;
    line-height: 44px !important;
    padding: 4px 32px 4px 10px !important;
}

body.login-page.admin-template-3 .adm3-auth-panel .local-auto-login .select2-selection__arrow {
    height: 52px !important;
}

body.login-page.admin-template-3 .adm3-auth-panel .local-login-divider {
    color: var(--auth-muted);
    font-size: 10.5px;
    letter-spacing: 0.5px;
    margin: 0 0 18px;
    text-transform: none;
}

body.login-page.admin-template-3 .adm3-auth-panel .local-login-divider:before,
body.login-page.admin-template-3 .adm3-auth-panel .local-login-divider:after {
    background: var(--auth-line);
}

html[data-adm3-theme="dark"] body.login-page.admin-template-3 .select2-dropdown {
    background: #142233 !important;
    border-color: #27394d !important;
    color: #edf2f8 !important;
}

html[data-adm3-theme="dark"] body.login-page.admin-template-3 .select2-search--dropdown .select2-search__field {
    background: #0d1622 !important;
    border-color: #27394d !important;
    color: #edf2f8 !important;
}

html[data-adm3-theme="dark"] body.login-page.admin-template-3 .local-user-copy strong {
    color: #edf2f8;
}

html[data-adm3-theme="dark"] body.login-page.admin-template-3 .local-user-copy small {
    color: #9eb0c4;
}

html[data-adm3-theme="dark"] body.login-page.admin-template-3 .select2-results__option--highlighted[aria-selected] {
    background: rgba(96, 165, 250, 0.16) !important;
}

/* Responsive Breakpoints (matching CBER Editorial Split-Screen) */
@media (max-width: 1199.98px) {
    .adm3-auth-story {
        padding-left: 36px;
        padding-right: 36px;
    }

    .adm3-auth-panel {
        padding-left: 36px;
        padding-right: 36px;
    }
}

@media (max-width: 991.98px) {
    .adm3-auth-split {
        grid-template-columns: minmax(290px, 40%) minmax(0, 1fr);
    }

    .adm3-auth-story {
        padding: 30px;
    }

    .adm3-auth-brand-full {
        display: none;
    }

    .adm3-auth-story-content {
        padding-top: 42px;
    }

    .admin-template-3 .adm3-auth-headline {
        font-size: 42px;
    }

    .adm3-auth-story-footer {
        font-size: 9px;
    }

    .adm3-auth-panel {
        padding-left: 28px;
        padding-right: 28px;
    }

    .admin-template-3 .adm3-auth-title {
        font-size: 38px;
    }
}

@media (max-width: 767.98px) {
    .adm3-auth-split {
        display: block;
        min-height: 100dvh;
    }

    .adm3-auth-story {
        display: none;
    }

    .adm3-auth-panel {
        min-height: 100dvh;
        padding: 22px;
    }

    .adm3-auth-mobile-brand {
        display: inline-flex;
    }

    .adm3-auth-back {
        font-size: 11px;
        margin-left: auto;
    }

    .adm3-auth-content {
        max-width: 440px;
        padding: 32px 0 24px;
    }

    .adm3-auth-badge {
        margin-bottom: 18px;
    }

    .admin-template-3 .adm3-auth-title {
        font-size: 36px;
    }

    body.login-page.admin-template-3 .adm3-auth-panel .form-control {
        font-size: 16px !important;
    }

    .adm3-auth-footer {
        margin-top: auto;
        padding-top: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.login-page.admin-template-3 * {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   EDITORIAL DARK SIDEBAR — ALIGNED WITH AUTHENTICATION STORY PANEL
   Harmonized with --adm3-primary palette, 64px architectural grid, Georgia
   serif crest lockup, warm gold (#d8b578) active rail & clean dark controls
   ========================================================================== */
.adm3-preview--dark {
    background: linear-gradient(
        155deg,
        color-mix(in srgb, var(--adm3-primary) 42%, #0a1829) 0%,
        color-mix(in srgb, var(--adm3-primary-dark) 86%, #060e1a) 100%
    );
}

html[data-adm3-skin="dark"] {
    --sb-bg-top: color-mix(in srgb, var(--adm3-primary) 42%, #0a1829);
    --sb-bg-solid: color-mix(in srgb, var(--adm3-primary-dark) 84%, #060e1a);
    --sb-bg: linear-gradient(165deg, var(--sb-bg-top) 0%, var(--sb-bg-solid) 100%);
    --sb-line: rgba(220, 234, 248, 0.12);
    --sb-line-strong: rgba(220, 234, 248, 0.2);
    --sb-text: rgba(232, 240, 250, 0.86);
    --sb-heading: #f6f8fb;
    --sb-muted: rgba(196, 214, 234, 0.64);
    --sb-icon: rgba(196, 216, 240, 0.66);
    --sb-hover: rgba(220, 236, 255, 0.075);
    --sb-active-bg: rgba(214, 232, 255, 0.13);
    --sb-active-border: rgba(214, 232, 255, 0.19);
    --sb-active-text: #ffffff;
    --sb-accent: color-mix(in srgb, var(--adm3-primary-light) 35%, #d6e8ff);
    --sb-gold: #d8b578;
}

html[data-adm3-skin="gradient"] {
    --sb-bg-top: var(--adm3-primary-dark);
    --sb-bg-solid: var(--adm3-primary-dark);
    --sb-line: rgba(255, 255, 255, 0.15);
    --sb-line-strong: rgba(255, 255, 255, 0.24);
    --sb-heading: #ffffff;
    --sb-active-border: rgba(255, 255, 255, 0.22);
    --sb-gold: #e6c98f;
}

/* Sidebar Shell + Subtle 64px Editorial Grid (matching .adm3-auth-story) */
html[data-adm3-skin="dark"] .admin-template-3 .main-sidebar,
html[data-adm3-skin="dark"] .admin-template-3 .left-side,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .main-sidebar,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .left-side {
    background-color: var(--adm3-primary-dark) !important;
    background-image: var(--sb-bg) !important;
    border-right: 1px solid var(--sb-line) !important;
    box-shadow: 2px 0 20px rgba(4, 10, 20, 0.16) !important;
    isolation: isolate;
}

html[data-adm3-skin="dark"] .admin-template-3 .main-sidebar:before {
    background-image:
        linear-gradient(rgba(225, 240, 255, 0.9) 1px, transparent 1px),
        linear-gradient(90deg, rgba(225, 240, 255, 0.9) 1px, transparent 1px);
    background-size: 64px 64px;
    content: "";
    inset: 0;
    -webkit-mask-image: linear-gradient(150deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
    mask-image: linear-gradient(150deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
    opacity: 0.055;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar,
html[data-adm3-skin="dark"] .admin-template-3 .adm3-sidebar-account {
    position: relative;
    z-index: 1;
}

/* Scrollbar Refinement */
html[data-adm3-skin="dark"] .admin-template-3 .sidebar,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar {
    scrollbar-color: rgba(214, 232, 255, 0.2) transparent;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar::-webkit-scrollbar-thumb,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar::-webkit-scrollbar-thumb {
    background: rgba(214, 232, 255, 0.18);
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar::-webkit-scrollbar-thumb:hover,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(214, 232, 255, 0.34);
}

/* Brand Header Lockup (matching .adm3-auth-brand crest & Georgia serif wordmark) */
html[data-adm3-skin="dark"] .admin-template-3 .main-header .logo,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .main-header .logo,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .main-header .logo:hover {
    background-color: var(--adm3-primary-dark) !important;
    background-image: linear-gradient(180deg, var(--sb-bg-top) 0%, color-mix(in srgb, var(--sb-bg-top) 88%, var(--sb-bg-solid)) 100%) !important;
    border-bottom: 1px solid var(--sb-line) !important;
    border-right: 1px solid var(--sb-line) !important;
    color: var(--sb-heading) !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .main-header .logo .logo-brand-image,
html[data-adm3-skin="gradient"] .admin-template-3 .main-header .logo .logo-brand-image {
    background: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(4, 10, 22, 0.24);
    height: 38px !important;
    padding: 3px !important;
    width: 38px !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .main-header .logo .logo-brand-text,
html[data-adm3-skin="gradient"] .admin-template-3 .main-header .logo .logo-brand-text {
    color: rgba(226, 236, 248, 0.88) !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.15 !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .main-header .logo .adm3-brand-accent,
html[data-adm3-skin="gradient"] .admin-template-3 .main-header .logo .adm3-brand-accent {
    color: #ffffff !important;
    font-weight: 700 !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .main-header .logo .logo-brand-sub,
html[data-adm3-skin="gradient"] .admin-template-3 .main-header .logo .logo-brand-sub {
    color: var(--sb-muted) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 9.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em;
    margin-top: 2px;
    text-transform: uppercase;
}

/* Recessed Editorial Filter Input (fixes white-box form-control clash) */
html[data-adm3-skin="dark"] .admin-template-3 .sidebar-search,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-search {
    border-bottom: 1px solid var(--sb-line) !important;
    padding: 12px 12px 11px !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-form,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-form,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-form,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-form {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-form .input-group,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-form .input-group {
    background: rgba(5, 11, 22, 0.34) !important;
    border: 1px solid rgba(220, 234, 248, 0.14) !important;
    border-radius: 7px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.16);
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-form .input-group:focus-within,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-form .input-group:focus-within {
    background: rgba(5, 11, 22, 0.52) !important;
    border-color: rgba(214, 232, 255, 0.36) !important;
    box-shadow: 0 0 0 3px rgba(214, 232, 255, 0.08) !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-form .btn,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-form .btn,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-form .btn,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-form .btn {
    background: transparent !important;
    border: 0 !important;
    color: var(--sb-icon) !important;
    height: 34px !important;
    padding: 0 5px 0 10px !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-form .form-control,
html[data-adm3-skin="dark"] .admin-template-3 .sidebar-form .form-control.input-sm,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-form input[type="text"],
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-form input[type="text"]:focus,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-form .form-control,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-form .form-control.input-sm,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-form input[type="text"],
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-form input[type="text"]:focus {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #f4f7fb !important;
    font-size: 12.5px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 5px 30px 5px 3px !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-form .form-control::placeholder,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-form .form-control::placeholder {
    color: rgba(196, 214, 234, 0.56) !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .adm3-search-kbd,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-search-kbd {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(220, 234, 248, 0.18) !important;
    border-radius: 4px;
    color: rgba(214, 226, 238, 0.72) !important;
    font-size: 10px;
    font-weight: 600;
}

/* Section Headers & Hairline Editorial Dividers (kills bright #eef2f6 bars) */
html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu {
    padding: 6px 10px 16px !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li.header,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-menu > li.header,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li.header,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-menu > li.header {
    background: transparent !important;
    color: var(--sb-muted) !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.14em !important;
    margin: 14px 0 6px !important;
    padding: 12px 10px 2px !important;
    text-transform: uppercase;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li.header:first-child,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li.header:first-child {
    margin-top: 4px !important;
    padding-top: 4px !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li.header:not(:first-child):before,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li.header:not(:first-child):before {
    background: var(--sb-line) !important;
    left: 10px;
    right: 10px;
    top: 0;
}

/* Top-Level Navigation Links & Warm-Gold Active Rail */
html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li {
    margin: 0 0 2px !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li > a,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-menu > li > a,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li > a,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-menu > li > a {
    border: 1px solid transparent !important;
    border-radius: 7px !important;
    color: var(--sb-text) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    min-height: 37px;
    padding: 8px 28px 8px 12px !important;
    position: relative;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li > a > .adm3-nav-ic,
html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li > a > .fa,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li > a > .adm3-nav-ic,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li > a > .fa {
    color: var(--sb-icon) !important;
    font-size: 16px;
    margin-right: 10px;
    transition: color 0.15s ease;
    width: 19px;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li:hover > a,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-menu > li:hover > a,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li:hover > a,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-menu > li:hover > a {
    background: var(--sb-hover) !important;
    color: #ffffff !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li:hover > a > .adm3-nav-ic,
html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li:hover > a > .fa,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li:hover > a > .adm3-nav-ic,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li:hover > a > .fa {
    color: var(--sb-accent) !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li.menu-open:not(.active) > a,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-menu > li.menu-open:not(.active) > a,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li.menu-open:not(.active) > a,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-menu > li.menu-open:not(.active) > a {
    background: rgba(220, 236, 255, 0.06) !important;
    color: #f6f8fb !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li.active > a,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-menu > li.active > a,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li.active > a,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-menu > li.active > a {
    background: var(--sb-active-bg) !important;
    border-color: var(--sb-active-border) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li.active > a:before,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li.active > a:before {
    background: var(--sb-gold);
    border-radius: 0 3px 3px 0;
    bottom: 7px;
    content: "";
    left: -1px;
    position: absolute;
    top: 7px;
    width: 3px;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li.active > a > .adm3-nav-ic,
html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li.active > a > .fa,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li.active > a > .adm3-nav-ic,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li.active > a > .fa {
    color: var(--sb-gold) !important;
}

/* Caret Chevrons */
html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li > a > .pull-right-container > i,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li > a > .pull-right-container > i {
    color: rgba(196, 216, 240, 0.52) !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li:hover > a > .pull-right-container > i,
html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li.menu-open > a > .pull-right-container > i,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li:hover > a > .pull-right-container > i,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li.menu-open > a > .pull-right-container > i {
    color: rgba(235, 243, 252, 0.88) !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .sidebar-menu > li.active > a > .pull-right-container > i,
html[data-adm3-skin="gradient"] .admin-template-3 .sidebar-menu > li.active > a > .pull-right-container > i {
    color: var(--sb-gold) !important;
}

/* Treeview Submenu Guide Rail */
html[data-adm3-skin="dark"] .admin-template-3 .treeview-menu,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-menu > li > .treeview-menu,
html[data-adm3-skin="gradient"] .admin-template-3 .treeview-menu,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-menu > li > .treeview-menu {
    background: transparent !important;
    border-left: 1px solid rgba(220, 234, 248, 0.16) !important;
    margin: 3px 0 6px 21px !important;
    padding: 2px 0 2px 10px !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .treeview-menu > li > a,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li > a,
html[data-adm3-skin="gradient"] .admin-template-3 .treeview-menu > li > a,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li > a {
    border-radius: 6px;
    color: rgba(202, 219, 238, 0.74) !important;
    font-size: 12.25px !important;
    font-weight: 400 !important;
    min-height: 32px;
    padding: 6px 10px !important;
    position: relative;
}

html[data-adm3-skin="dark"] .admin-template-3 .treeview-menu > li > a:hover,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li > a:hover,
html[data-adm3-skin="gradient"] .admin-template-3 .treeview-menu > li > a:hover,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li > a:hover {
    background: var(--sb-hover) !important;
    color: #ffffff !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .treeview-menu > li.active > a,
html[data-adm3-skin="dark"] .skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li.active > a,
html[data-adm3-skin="gradient"] .admin-template-3 .treeview-menu > li.active > a,
html[data-adm3-skin="gradient"] .skin-blue.admin-template-3 .sidebar-menu .treeview-menu > li.active > a {
    background: rgba(214, 232, 255, 0.11) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .treeview-menu > li.active > a:after,
html[data-adm3-skin="gradient"] .admin-template-3 .treeview-menu > li.active > a:after {
    background: var(--sb-gold);
    border-radius: 50%;
    content: "";
    height: 5px;
    left: -13px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
}

/* Pinned Bottom Editorial Account Footer */
html[data-adm3-skin="dark"] .admin-template-3 .adm3-sidebar-account,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-sidebar-account {
    background: rgba(5, 11, 22, 0.34) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--sb-line) !important;
    padding: 10px 10px 11px;
}

html[data-adm3-skin="dark"] .admin-template-3 .adm3-account-btn,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-account-btn {
    border-radius: 8px;
    color: var(--sb-heading);
    padding: 7px 8px;
}

html[data-adm3-skin="dark"] .admin-template-3 .adm3-account-btn:hover,
html[data-adm3-skin="dark"] .admin-template-3 .adm3-sidebar-account.open .adm3-account-btn,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-account-btn:hover,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-sidebar-account.open .adm3-account-btn {
    background: rgba(220, 236, 255, 0.085) !important;
    border-color: rgba(220, 234, 248, 0.16) !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .adm3-account-avatar img,
html[data-adm3-skin="dark"] .admin-template-3 .adm3-account-monogram,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-account-avatar img,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-account-monogram {
    background: rgba(214, 232, 255, 0.14) !important;
    border: 1px solid rgba(214, 232, 255, 0.22);
    border-radius: 7px;
    color: #f6f8fb !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 13.5px;
    font-weight: 700;
}

html[data-adm3-skin="dark"] .admin-template-3 .adm3-account-avatar > i,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-account-avatar > i {
    border-color: var(--sb-bg-solid) !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .adm3-account-copy strong,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-account-copy strong {
    color: #f6f8fb !important;
    font-weight: 600;
}

html[data-adm3-skin="dark"] .admin-template-3 .adm3-account-copy small,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-account-copy small {
    color: var(--sb-muted) !important;
}

html[data-adm3-skin="dark"] .admin-template-3 .adm3-account-caret,
html[data-adm3-skin="gradient"] .admin-template-3 .adm3-account-caret {
    color: var(--sb-icon) !important;
}

/* Collapsed Compact Rail & Flyout Submenu Parity */
@media (min-width: 768px) {
    html[data-adm3-skin="dark"] .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li > a,
    html[data-adm3-skin="gradient"] .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li > a {
        padding: 9px 0 !important;
    }

    html[data-adm3-skin="dark"] .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li.active > a:before,
    html[data-adm3-skin="gradient"] .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li.active > a:before {
        bottom: 8px;
        top: 8px;
    }

    html[data-adm3-skin="dark"] .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li:hover > a > span:not(.pull-right),
    html[data-adm3-skin="gradient"] .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li:hover > a > span:not(.pull-right) {
        background: var(--sb-bg-solid) !important;
        border: 1px solid var(--sb-line-strong) !important;
        border-left: 0 !important;
        box-shadow: 0 14px 32px rgba(4, 10, 22, 0.42) !important;
        color: #ffffff !important;
    }

    html[data-adm3-skin="dark"] .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li:hover > .treeview-menu,
    html[data-adm3-skin="gradient"] .sidebar-mini.sidebar-collapse.admin-template-3 .sidebar-menu > li:hover > .treeview-menu {
        background: var(--sb-bg-solid) !important;
        border: 1px solid var(--sb-line-strong) !important;
        border-left: 0 !important;
        box-shadow: 0 18px 38px rgba(4, 10, 22, 0.46) !important;
        padding: 6px 8px !important;
    }
}

html[data-adm3-skin="dark"] .adm3-nav-tip,
html[data-adm3-skin="gradient"] .adm3-nav-tip {
    background: var(--sb-bg-solid);
    border: 1px solid var(--sb-line-strong);
    color: #f6f8fb;
}

html[data-adm3-skin="dark"] .adm3-nav-tip::before,
html[data-adm3-skin="gradient"] .adm3-nav-tip::before {
    border-right-color: var(--sb-bg-solid);
}

/* ==========================================================================
   FULL-WIDTH MODALS, CLOSE BUTTONS, BUTTON GROUPS & STACKED BUTTON SPACING
   ========================================================================== */

/* 1. Full-Width Responsive Modals & Clean Header/Body/Footer Chrome */
.admin-template-3 .modal {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.admin-template-3 .modal-dialog,
.admin-template-3 .modal-dialog.modal-lg,
.admin-template-3 .modal-dialog.modal-xl,
.admin-template-3 .modal-dialog.preview-dialog,
.admin-template-3 .modal-dialog.attachment-dialog,
.admin-template-3 .modal-dialog.attachment-audit-dialog {
    margin: 20px auto !important;
    max-width: calc(100vw - 40px) !important;
    width: calc(100vw - 40px) !important;
}

.admin-template-3 .modal-dialog.modal-sm {
    margin: 44px auto !important;
    max-width: 560px !important;
    width: calc(100vw - 32px) !important;
}

@media (max-width: 767.98px) {
    .admin-template-3 .modal-dialog,
    .admin-template-3 .modal-dialog.modal-sm,
    .admin-template-3 .modal-dialog.modal-lg,
    .admin-template-3 .modal-dialog.modal-xl,
    .admin-template-3 .modal-dialog.preview-dialog,
    .admin-template-3 .modal-dialog.attachment-dialog,
    .admin-template-3 .modal-dialog.attachment-audit-dialog {
        margin: 8px auto !important;
        max-width: calc(100vw - 16px) !important;
        width: calc(100vw - 16px) !important;
    }
}

.admin-template-3 .modal-content {
    background: var(--adm3-surface) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 24px 64px rgba(10, 20, 38, 0.24) !important;
    color: var(--adm3-text);
    overflow: hidden;
}

.admin-template-3 .modal-header {
    align-items: center !important;
    background: var(--adm3-surface) !important;
    border-bottom: 1px solid var(--adm3-border) !important;
    display: flex !important;
    gap: 14px;
    justify-content: space-between !important;
    min-height: 54px;
    padding: 13px 22px !important;
}

.admin-template-3 .modal-header:before,
.admin-template-3 .modal-header:after {
    display: none !important;
}

.admin-template-3 .modal-header .modal-title {
    color: var(--adm3-heading) !important;
    flex: 1 1 auto;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    line-height: 1.3;
    margin: 0 !important;
    min-width: 0;
    order: 1;
}

.admin-template-3 .modal-body {
    max-height: calc(100vh - 140px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 22px !important;
}

.admin-template-3 .modal-footer {
    align-items: center;
    background: var(--adm3-surface-subtle) !important;
    border-top: 1px solid var(--adm3-border) !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 22px !important;
    text-align: right;
}

.admin-template-3 .modal-footer:before,
.admin-template-3 .modal-footer:after {
    display: none !important;
}

.admin-template-3 .modal-footer:empty {
    display: none !important;
}

.admin-template-3 .modal-body .modal-footer {
    margin: 20px -22px -20px !important;
    padding: 12px 22px !important;
}

.admin-template-3 .modal-body .row > .modal-footer {
    margin: 20px 0 -20px !important;
    padding: 12px 22px !important;
}

.admin-template-3 .modal-footer .btn {
    margin: 0 !important;
    min-height: 34px;
    padding: 6px 14px;
}

/* 2. Crisp Framed Close Buttons (Modals, Alerts & Sort/Toolbar Close Actions) */
.admin-template-3 .modal-header .close,
.admin-template-3 .modal-header button.close {
    align-items: center !important;
    background: var(--adm3-surface-subtle) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: var(--adm3-muted) !important;
    cursor: pointer;
    display: inline-flex !important;
    flex: 0 0 auto;
    float: none !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    height: 32px !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin: 0 !important;
    opacity: 1 !important;
    order: 2;
    padding: 0 !important;
    text-shadow: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    width: 32px !important;
}

.admin-template-3 .modal-header .close:hover,
.admin-template-3 .modal-header .close:focus,
.admin-template-3 .modal-header button.close:hover,
.admin-template-3 .modal-header button.close:focus {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
    opacity: 1 !important;
    outline: none;
}

.admin-template-3 .alert-dismissible,
.admin-template-3 .alert-dismissable {
    padding-right: 44px !important;
    position: relative;
}

.admin-template-3 .alert .close {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: inherit !important;
    display: inline-flex;
    float: none !important;
    font-size: 18px;
    font-weight: 500;
    height: 26px;
    justify-content: center;
    line-height: 1;
    opacity: 0.72;
    padding: 0;
    position: absolute !important;
    right: 10px !important;
    text-shadow: none !important;
    top: 9px !important;
    transition: background-color 0.14s ease, opacity 0.14s ease;
    width: 26px;
}

.admin-template-3 .alert .close:hover,
.admin-template-3 .alert .close:focus {
    background: rgba(15, 23, 42, 0.08);
    opacity: 1;
    outline: none;
}

.admin-template-3 .article-btn-close,
.admin-template-3 #tableReload.btn,
.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-sort-li > .adm3-hdr-close-btn {
    align-items: center;
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-radius: 8px !important;
    color: #b91c1c !important;
    display: inline-flex !important;
    font-weight: 700 !important;
    gap: 5px;
    height: 32px;
    padding: 0 12px !important;
}

.admin-template-3 .article-btn-close.display-hide,
.admin-template-3 #tableReload.display-hide {
    display: none !important;
}

.admin-template-3 .article-btn-close:hover,
.admin-template-3 #tableReload.btn:hover,
.admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-sort-li > .adm3-hdr-close-btn:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

.admin-template-3 .modal-footer .btn-default[data-dismiss="modal"]:hover {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #b91c1c !important;
}

/* 3. Clean Segmented Button Groups (.btn-group) Outside Table Cells */
.admin-template-3 .btn-group:not(.btn-group-vertical) {
    align-items: stretch;
    display: inline-flex;
    vertical-align: middle;
}

.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn {
    align-items: center;
    box-shadow: none !important;
    display: inline-flex;
    float: none !important;
    gap: 5px;
    justify-content: center;
    margin: 0 !important;
    position: relative;
    white-space: nowrap;
}

.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn:not(:first-child) {
    margin-left: -1px !important;
}

.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
    border-bottom-right-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
    border-radius: 0 !important;
}

.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn:last-child:not(:first-child),
.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .dropdown-toggle:not(:first-child) {
    border-bottom-left-radius: 0 !important;
    border-top-left-radius: 0 !important;
}

.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn.btn-primary,
.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn.btn-danger,
.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn.btn-success,
.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn.btn-warning,
.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn.active {
    z-index: 2;
}

.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn:hover,
.admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn:focus {
    z-index: 3;
}

.admin-template-3 .btn-group + .btn-group {
    margin-left: 8px;
}

/* 4. Table Button Groups & Cramped / Stacked Button Spacing */
.admin-template-3 .table td:last-child .btn-group,
.admin-template-3 .table td.adm3-col-fixed-action > .btn-group {
    gap: 5px;
}

.admin-template-3 .table td .btn-group:has(> .btn-block) {
    align-items: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: 100% !important;
}

.admin-template-3 .table td .btn-group:has(> .btn-block) > .btn {
    border-radius: 8px !important;
    margin: 0 !important;
    padding: 6px 10px !important;
    width: 100% !important;
}

/* Fix touching/glued stacked .btn-block buttons & uneven <br> breaks inside table cells */
.admin-template-3 .table td > .btn-block {
    align-items: center !important;
    border-radius: 7px !important;
    display: inline-flex !important;
    gap: 5px;
    justify-content: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

.admin-template-3 .table td > .btn-block + br,
.admin-template-3 .table td > br + br {
    display: none !important;
}

.admin-template-3 .table td > .btn-block + .btn-block,
.admin-template-3 .table td > .btn-block + br + .btn-block,
.admin-template-3 .table td > .btn + .btn-block {
    margin-top: 6px !important;
}

.admin-template-3 .table td > br + .btn-block {
    margin-top: 6px !important;
}

/* Clean spacing for footer toolbars & adjacent standalone buttons */
.admin-template-3 .panel-footer:has(> .btn),
.admin-template-3 .panel-footer:has(> a.btn) {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-template-3 .panel-footer:has(> .btn) > .btn,
.admin-template-3 .panel-footer:has(> a.btn) > .btn {
    margin-right: 0 !important;
}

/* 5. Dark Mode Parity for Modals, Close Buttons & Button Groups */
html[data-adm3-theme="dark"] .admin-template-3 .modal-content {
    background: #142033 !important;
    border-color: #2a3b52 !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55) !important;
    color: #e2e8f0;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-header {
    background: #142033 !important;
    border-bottom-color: #2a3b52 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-header .modal-title {
    color: #f1f5f9 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-footer {
    background: #0f172a !important;
    border-top-color: #2a3b52 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body pre {
    color: #cbd5e1 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .alert.alert-info strong,
html[data-adm3-theme="dark"] .admin-template-3 .alert.alert-info strong {
    color: #93c5fd !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .int-notes-header {
    background: #1b2a40 !important;
    border-color: #2d4059 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .int-notes-header strong {
    color: #f1f5f9 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-header .close,
html[data-adm3-theme="dark"] .admin-template-3 .modal-header button.close {
    background: #1e2d45 !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-header .close:hover,
html[data-adm3-theme="dark"] .admin-template-3 .modal-header button.close:hover {
    background: rgba(239, 68, 68, 0.18) !important;
    border-color: rgba(239, 68, 68, 0.38) !important;
    color: #fca5a5 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .alert .close:hover {
    background: rgba(255, 255, 255, 0.1);
}

html[data-adm3-theme="dark"] .admin-template-3 .article-btn-close,
html[data-adm3-theme="dark"] .admin-template-3 #tableReload.btn,
html[data-adm3-theme="dark"] .admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-sort-li > .adm3-hdr-close-btn {
    background: rgba(239, 68, 68, 0.16) !important;
    border-color: rgba(239, 68, 68, 0.34) !important;
    color: #fca5a5 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .article-btn-close:hover,
html[data-adm3-theme="dark"] .admin-template-3 #tableReload.btn:hover,
html[data-adm3-theme="dark"] .admin-template-3 .nav-tabs-custom.adm3-crud-tabs > .nav-tabs > li.adm3-tab-sort-li > .adm3-hdr-close-btn:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-footer .btn-default[data-dismiss="modal"]:hover {
    background: rgba(239, 68, 68, 0.16) !important;
    border-color: rgba(239, 68, 68, 0.34) !important;
    color: #fca5a5 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn-default {
    background: #162235 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 :not(td) > .btn-group:not(.btn-group-vertical) > .btn-default:hover {
    background: #1e2e47 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   Phase 3 & 4: Workflow Modals Polish, Dark-Mode Contrast & Mobile Controls
   ========================================================================== */
.admin-template-3 .modal-block-lg .modal-dialog {
    max-width: 1120px !important;
    width: calc(100vw - 32px) !important;
    margin: 22px auto !important;
}

.admin-template-3 .modal-body .form-horizontal .form-group {
    margin-bottom: 14px;
}

.admin-template-3 .modal-body .form-horizontal .control-label {
    color: var(--adm3-heading);
    font-size: 13px;
    font-weight: 600;
    padding-top: 7px;
}

.admin-template-3 .modal-body .panel {
    border-radius: 10px !important;
    border-color: var(--adm3-border) !important;
    background: var(--adm3-surface) !important;
    box-shadow: none !important;
}

.admin-template-3 .modal-body .panel-heading {
    border-radius: 9px 9px 0 0 !important;
    font-weight: 600;
}

.admin-template-3 .modal-body pre {
    background: var(--adm3-surface-subtle) !important;
    border: 1px solid var(--adm3-border) !important;
    border-radius: 8px;
    color: var(--adm3-text) !important;
    font-family: inherit;
    padding: 8px 10px !important;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Previous Round Reviews accordion (Light + Dark) */
.admin-template-3 .adm3-prev-rounds-toggle {
    align-items: center;
    background: #f0f4f8;
    border: 1px solid #d0d8e4;
    border-radius: 8px;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    gap: 8px;
    padding: 9px 14px;
    user-select: none;
}

.admin-template-3 .adm3-prev-rounds-toggle strong {
    flex: 1;
    font-size: 13px;
}

.admin-template-3 .adm3-prev-rounds-toggle .badge {
    background: var(--adm3-primary, #014495);
    color: #ffffff;
}

.admin-template-3 .adm3-prev-rounds-body {
    background: #f8fafc;
    border: 1px solid #d0d8e4;
    border-radius: 0 0 8px 8px;
    border-top: 0;
    padding: 12px 14px;
}

.admin-template-3 .adm3-prev-round-group {
    margin-bottom: 12px;
}

.admin-template-3 .adm3-prev-round-group hr {
    border-color: var(--adm3-border);
    margin: 5px 0 9px;
}

.admin-template-3 .adm3-prev-round-heading {
    color: var(--adm3-heading);
    font-size: 12px;
}

.admin-template-3 .adm3-prev-round-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--adm3-primary, #014495);
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 9px 12px;
}

.admin-template-3 .adm3-prev-round-author {
    color: var(--adm3-heading);
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.admin-template-3 .adm3-prev-round-meta {
    color: var(--adm3-muted);
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 3px;
}

.admin-template-3 .reviewer-load-label {
    color: var(--adm3-muted);
    font-size: 12px;
    font-weight: 600;
    margin-right: 4px;
}

.admin-template-3 .reviewer-total-meta {
    color: var(--adm3-muted);
    font-size: 11.5px;
    margin-left: 4px;
}

.admin-template-3 .chat-msg-text {
    color: var(--adm3-text);
    margin: 4px 0 0;
}

/* Dark Mode Parity for Workflow Modals & Reviewer Picker */
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-upload-row,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-card .reviewer-select-card,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-card .panel,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-card .panel-body {
    background: #142033 !important;
    border-color: #243247 !important;
    color: #e2e8f0 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-card .panel-heading,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-card .panel-footer {
    background: #1a2942 !important;
    border-color: #243247 !important;
    color: #f1f5f9 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-upload-label,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-summary-count,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-card .reviewer-name {
    color: #f1f5f9 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-card .reviewer-stats,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-card .reviewer-email,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-upload-content .help-block,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-search-status {
    color: #94a3b8 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-help {
    background: rgba(22, 163, 74, 0.14) !important;
    border-color: rgba(34, 197, 94, 0.35) !important;
    border-left-color: #22c55e !important;
    color: #dcfce7 !important;
    box-shadow: none !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-help strong {
    color: #86efac !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .reviewer-card .reviewer-select-card.is-selected {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-prev-rounds-toggle {
    background: #1a2942 !important;
    border-color: #2b3d59 !important;
    color: #f1f5f9 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-prev-rounds-body {
    background: #0f172a !important;
    border-color: #2b3d59 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .adm3-prev-round-card {
    background: #142033 !important;
    border-color: #243247 !important;
    border-left-color: #60a5fa !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .well,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .list-group-item,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .panel-default > .panel-heading {
    background: #1a2942 !important;
    border-color: #2b3d59 !important;
    color: #e2e8f0 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .table,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .table > thead > tr > th,
html[data-adm3-theme="dark"] .admin-template-3 .modal-body .table > tbody > tr > td {
    background-color: transparent !important;
    border-color: #243247 !important;
    color: #e2e8f0 !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(148, 163, 184, 0.06) !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .alert-info {
    background: rgba(59, 130, 246, 0.14) !important;
    border-color: rgba(96, 165, 250, 0.34) !important;
    color: #dbeafe !important;
}

html[data-adm3-theme="dark"] .admin-template-3 .modal-body .alert-warning {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(251, 191, 36, 0.34) !important;
    color: #fef3c7 !important;
}

/* Mobile Search Icon Clearance & Modal Fit (Phase 4) */
@media (max-width: 767px) {
    .admin-template-3 .dataTables_wrapper .dataTables_filter input,
    .admin-template-3 .dataTables_wrapper > .row.adm3-toolbar-unified .dataTables_filter input {
        padding-left: 34px !important;
    }

    .admin-template-3 .modal-dialog,
    .admin-template-3 .modal-block-lg .modal-dialog {
        margin: 10px auto !important;
        width: calc(100vw - 16px) !important;
    }

    .admin-template-3 .modal-body {
        max-height: calc(100vh - 110px);
        padding: 14px 14px !important;
    }

    .admin-template-3 .modal-body .form-horizontal .control-label {
        margin-bottom: 5px;
        padding-top: 0;
        text-align: left !important;
    }
}
