:root {
    --admin-canvas: #f4f6f8;
    --admin-surface: #ffffff;
    --admin-surface-subtle: #f8f9fb;
    --admin-text: #18212f;
    --admin-text-muted: #5d6878;
    --admin-border: #dfe4ea;
    --admin-border-strong: #cbd2da;
    --admin-sidebar: #171b22;
    --admin-sidebar-subtle: #222832;
    --admin-sidebar-text: #b8c0cc;
    --admin-accent: #c92a2a;
    --admin-accent-dark: #a61f1f;
    --admin-blue: #2463a9;
    --admin-green: #18764c;
    --admin-amber: #b56a00;
    --admin-red: #c92a2a;
    --admin-radius-sm: 4px;
    --admin-radius: 6px;
    --admin-radius-lg: 8px;
    --admin-shadow-sm: 0 1px 2px rgba(24, 33, 47, 0.06);
    --admin-shadow: 0 8px 24px rgba(24, 33, 47, 0.08);
    --admin-focus: 0 0 0 3px rgba(36, 99, 169, 0.2);
    --admin-transition: 180ms ease-out;
}

html,
body {
    min-height: 100%;
}

body {
    color: var(--admin-text);
    background: var(--admin-canvas);
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    color: #fff;
    background: var(--admin-blue);
}

a {
    color: var(--admin-blue);
    transition: color var(--admin-transition), background-color var(--admin-transition), border-color var(--admin-transition), box-shadow var(--admin-transition), opacity var(--admin-transition);
}

a:hover,
a:focus {
    color: #174b84;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 2px solid var(--admin-blue);
    outline-offset: 2px;
}

.form-control:focus,
.selectpage:focus,
.bootstrap-select .dropdown-toggle:focus {
    outline: 0;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 12px;
    z-index: 2050;
    padding: 9px 14px;
    color: #fff;
    background: var(--admin-sidebar);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    transform: translateY(-150%);
}

.skip-link:focus {
    color: #fff;
    transform: translateY(0);
}

/* Admin shell */
.admin-shell,
.admin-shell .wrapper,
.admin-shell .content-wrapper {
    background: var(--admin-canvas);
}

.admin-shell .main-header {
    border-bottom: 1px solid var(--admin-border);
    box-shadow: 0 1px 8px rgba(24, 33, 47, 0.06);
}

.admin-shell .main-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff !important;
    background: var(--admin-sidebar) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 16px;
    font-weight: 650;
    letter-spacing: 0;
}

.admin-shell .main-header .logo:hover,
.admin-shell .main-header .logo:focus {
    background: #11151b !important;
}

.admin-shell .main-header .logo-lg {
    align-items: center;
    gap: 9px;
}

.admin-shell .main-header .logo-lg .fa {
    color: #f25555;
    font-size: 17px;
}

.admin-shell .main-header .logo-mini .fa {
    color: #f25555;
}

.admin-shell .main-header .navbar {
    color: var(--admin-text);
    background: rgba(255, 255, 255, 0.97) !important;
}

.admin-shell #firstnav {
    display: flex;
    align-items: stretch;
    min-width: 0;
}

.admin-shell #firstnav .sidebar-toggle {
    position: relative;
    display: flex;
    flex: 0 0 45px;
    align-items: center;
    justify-content: center;
    width: 45px;
    line-height: 20px;
}

.admin-shell #firstnav > .nav-addtabs {
    position: relative;
    left: auto;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.admin-shell #firstnav > .nav-addtabs > li {
    float: none;
    flex: 0 0 auto;
}

.admin-shell #firstnav > .nav-addtabs > li > a,
.admin-shell #firstnav .navbar-custom-menu > .navbar-nav > li > a {
    display: flex;
    align-items: center;
    height: 50px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 20px;
    white-space: nowrap;
}

.admin-shell #firstnav .navbar-custom-menu {
    position: relative;
    top: auto;
    right: auto;
    flex: 0 0 auto;
    margin-left: auto;
}

.admin-shell #firstnav .navbar-custom-menu > .navbar-nav {
    display: flex;
    align-items: stretch;
    margin: 0;
}

.admin-shell #firstnav .navbar-custom-menu > .navbar-nav > li {
    float: none;
}

.admin-shell .main-header .navbar .sidebar-toggle,
.admin-shell .main-header .navbar .nav > li > a {
    color: var(--admin-text-muted) !important;
    border-color: transparent !important;
}

.admin-shell .main-header .navbar .sidebar-toggle:hover,
.admin-shell .main-header .navbar .sidebar-toggle:focus,
.admin-shell .main-header .navbar .nav > li > a:hover,
.admin-shell .main-header .navbar .nav > li > a:focus,
.admin-shell .main-header .navbar .nav > .open > a {
    color: var(--admin-text) !important;
    background: var(--admin-surface-subtle) !important;
}

.admin-shell .navbar-nav > .user-menu .user-image {
    border: 1px solid var(--admin-border);
}

.admin-shell .navbar-nav > .user-menu > .dropdown-menu {
    width: 288px;
    border-top-color: var(--admin-accent);
}

.admin-shell .navbar-nav > .user-menu > .dropdown-menu > .user-header {
    height: auto;
    min-height: 152px;
    padding: 20px;
    background: var(--admin-sidebar) !important;
}

.admin-shell .navbar-nav > .user-menu > .dropdown-menu > .user-header > img {
    width: 72px;
    height: 72px;
    border-color: rgba(255, 255, 255, 0.5);
}

.admin-shell .navbar-nav > .user-menu > .dropdown-menu > .user-footer {
    padding: 12px;
    background: var(--admin-surface-subtle);
}

.admin-shell #firstnav .nav-addtabs > li > a,
.admin-shell #secondnav .nav-addtabs > li > a {
    color: var(--admin-text-muted);
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.admin-shell #firstnav .nav-addtabs > li.active > a,
.admin-shell #firstnav .nav-addtabs > li > a:hover,
.admin-shell #secondnav .nav-addtabs > li.active > a,
.admin-shell #secondnav .nav-addtabs > li > a:hover {
    color: var(--admin-text);
    background: transparent;
    border-bottom-color: var(--admin-accent);
}

.admin-shell #firstnav > .nav-addtabs > li > a {
    color: #344054 !important;
    font-weight: 600;
}

.admin-shell #firstnav > .nav-addtabs > li.active > a {
    color: #18212f !important;
    background: #f3f5f7 !important;
    border-bottom-color: var(--admin-accent) !important;
}

.admin-shell #firstnav .navbar-custom-menu > .navbar-nav > li > a {
    color: #344054 !important;
}

.admin-shell .main-sidebar,
.admin-shell .left-side {
    background: var(--admin-sidebar) !important;
    box-shadow: 2px 0 12px rgba(17, 21, 27, 0.12);
}

.admin-shell .sidebar {
    padding: 8px 10px 18px;
}

.admin-shell .user-panel {
    min-height: 64px;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-shell .user-panel > .image > a > img {
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.16);
}

.admin-shell .user-panel > .info {
    left: 56px;
    padding-top: 10px;
    color: var(--admin-sidebar-text);
}

.admin-shell .user-panel > .info > p {
    margin-bottom: 2px;
    color: #fff;
    font-weight: 600;
}

.admin-shell .sidebar-form {
    margin: 12px 4px 14px;
    overflow: visible;
    background: var(--admin-sidebar-subtle) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--admin-radius);
}

.admin-shell .sidebar-form input[type="text"],
.admin-shell .sidebar-form .btn {
    height: 38px;
    color: var(--admin-sidebar-text);
    background: transparent !important;
}

.admin-shell .sidebar-form input[type="text"]::placeholder {
    color: #7f8998;
}

.admin-shell .sidebar-form:focus-within {
    border-color: rgba(242, 85, 85, 0.7) !important;
    box-shadow: 0 0 0 3px rgba(201, 42, 42, 0.14);
}

.admin-shell .sidebar-menu > li,
.admin-shell .sidebar-menu > li.header {
    margin: 2px 0;
}

.admin-shell .sidebar-menu > li > a,
.admin-shell .sidebar-menu .treeview-menu > li > a {
    color: var(--admin-sidebar-text) !important;
    border: 0 !important;
    border-radius: var(--admin-radius);
    transition: color var(--admin-transition), background-color var(--admin-transition);
}

.admin-shell .sidebar-menu > li > a {
    min-height: 42px;
    padding: 11px 12px;
    font-weight: 500;
}

.admin-shell .sidebar-menu > li > a > .fa,
.admin-shell .sidebar-menu > li > a > .iconfont {
    width: 22px;
    color: #8993a2;
    text-align: center;
}

.admin-shell .sidebar-menu > li:hover > a,
.admin-shell .sidebar-menu > li.active > a,
.admin-shell .sidebar-menu > li.menu-open > a {
    color: #fff !important;
    background: var(--admin-sidebar-subtle) !important;
}

.admin-shell .sidebar-menu > li.active > a {
    box-shadow: inset 3px 0 0 var(--admin-accent);
}

.admin-shell .sidebar-menu > li.active > a > .fa,
.admin-shell .sidebar-menu > li.active > a > .iconfont {
    color: #f25555;
}

.admin-shell .sidebar-menu > li > .treeview-menu {
    margin: 3px 0 6px;
    padding: 4px 0 4px 14px;
    background: #12161c !important;
    border-radius: var(--admin-radius);
}

.admin-shell .sidebar-menu .treeview-menu > li > a {
    min-height: 38px;
    padding: 9px 12px 9px 30px;
    font-size: 13px;
}

.admin-shell .sidebar-menu .treeview-menu > li.active > a,
.admin-shell .sidebar-menu .treeview-menu > li > a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

.admin-shell .control-sidebar,
.admin-shell .control-sidebar-bg {
    background: var(--admin-sidebar) !important;
}

/* Inner admin pages */
body.inside-header,
body.is-dialog {
    background: var(--admin-canvas);
}

#main,
#content {
    min-width: 0;
}

.content {
    padding: 18px;
}

#ribbon {
    min-height: 42px;
    padding: 10px 18px;
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-border);
}

#ribbon .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
}

.panel,
.box,
.well {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow-sm);
}

.panel-intro {
    overflow: visible;
    background: var(--admin-surface);
}

.panel-default > .panel-heading,
.box-header {
    color: var(--admin-text);
    background: var(--admin-surface);
    border-color: var(--admin-border);
    border-radius: var(--admin-radius-lg) var(--admin-radius-lg) 0 0;
}

.panel-heading {
    min-height: 48px;
    padding: 0 16px;
}

.panel-heading .panel-lead {
    padding-top: 12px;
}

.panel-heading .panel-lead em {
    color: var(--admin-text);
    font-size: 16px;
    font-style: normal;
    font-weight: 650;
}

.panel-heading .panel-lead small {
    color: var(--admin-text-muted);
}

.panel-intro > .panel-heading .nav-tabs {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    margin: 5px 0;
    padding: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    vertical-align: middle;
    white-space: nowrap;
    background: var(--admin-surface-subtle);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
}

.panel-intro > .panel-heading .nav-tabs > li {
    float: none;
    flex: 0 0 auto;
    margin: 0;
}

.panel-intro > .panel-heading .nav-tabs > li > a {
    min-height: 32px;
    margin: 0;
    padding: 6px 12px;
    color: var(--admin-text-muted);
    background: transparent;
    border: 0;
    border-radius: var(--admin-radius-sm);
    font-weight: 500;
    line-height: 20px;
}

.panel-intro > .panel-heading .nav-tabs > li.active > a,
.panel-intro > .panel-heading .nav-tabs > li.active > a:hover,
.panel-intro > .panel-heading .nav-tabs > li.active > a:focus {
    color: var(--admin-text);
    background: var(--admin-surface);
    border: 0;
    box-shadow: var(--admin-shadow-sm);
}

.panel-intro > .panel-heading .nav-tabs > li > a:hover {
    color: var(--admin-text);
    background: #eef1f4;
    border: 0;
}

.panel-intro > .panel-heading .nav-tabs > li > a:focus {
    outline: 0;
    box-shadow: var(--admin-focus);
}

.panel-intro > .panel-heading:has(> .nav-tabs[data-field="status"]):not(:has(> .panel-lead)) {
    display: none !important;
}

.panel-intro > .panel-heading .nav-tabs[data-field="status"],
.toolbar .btn-more,
.toolbar .btn-multi,
.toolbar .btn-del,
.toolbar .btn-restoreall,
.toolbar .btn-destroyall,
#toolbar .btn-more,
#toolbar .btn-multi,
#toolbar .btn-del,
#toolbar .btn-restoreall,
#toolbar .btn-destroyall {
    display: none !important;
}

.panel-body {
    padding: 16px;
}

.toolbar,
#toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.toolbar:before,
.toolbar:after,
#toolbar:before,
#toolbar:after {
    display: none;
}

.toolbar .btn,
#toolbar .btn,
.toolbar .btn-group,
#toolbar .btn-group {
    margin: 0 !important;
}

.btn {
    min-height: 34px;
    padding: 6px 12px;
    border-radius: var(--admin-radius);
    box-shadow: none;
    font-weight: 550;
    transition: color var(--admin-transition), background-color var(--admin-transition), border-color var(--admin-transition), box-shadow var(--admin-transition), opacity var(--admin-transition);
}

.btn:hover,
.btn:focus,
.btn.focus {
    box-shadow: 0 3px 10px rgba(24, 33, 47, 0.12);
}

.btn:active,
.btn.active {
    box-shadow: inset 0 1px 2px rgba(24, 33, 47, 0.12);
}

.btn-default {
    color: var(--admin-text);
    background: var(--admin-surface);
    border-color: var(--admin-border-strong);
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active {
    color: var(--admin-text);
    background: var(--admin-surface-subtle);
    border-color: #b7c0ca;
}

.btn-primary {
    color: #fff;
    background: #334155;
    border-color: #334155;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    color: #fff;
    background: #263548;
    border-color: #263548;
}

.btn-success {
    color: #fff;
    background: var(--admin-green);
    border-color: var(--admin-green);
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active {
    color: #fff;
    background: #176f49;
    border-color: #176f49;
}

.btn-info {
    color: #fff;
    background: var(--admin-blue);
    border-color: var(--admin-blue);
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info.active {
    color: #fff;
    background: #1a4f8a;
    border-color: #1a4f8a;
}

.btn-warning {
    color: #fff;
    background: var(--admin-amber);
    border-color: var(--admin-amber);
}

.btn-danger {
    color: #fff;
    background: var(--admin-red);
    border-color: var(--admin-red);
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active {
    color: #fff;
    background: var(--admin-accent-dark);
    border-color: var(--admin-accent-dark);
}

.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
}

.btn .fa {
    min-width: 14px;
}

.form-control,
.selectpage,
.bootstrap-select > .dropdown-toggle {
    height: 38px;
    color: var(--admin-text);
    background: var(--admin-surface);
    border: 1px solid var(--admin-border-strong);
    border-radius: var(--admin-radius);
    box-shadow: none;
    transition: border-color var(--admin-transition), box-shadow var(--admin-transition), background-color var(--admin-transition);
}

textarea.form-control,
select[multiple].form-control {
    height: auto;
}

.form-control::placeholder {
    color: #8a94a3;
}

.form-control:focus,
.selectpage:focus,
.bootstrap-select.open > .dropdown-toggle,
.bootstrap-select > .dropdown-toggle:focus {
    border-color: var(--admin-blue);
    box-shadow: var(--admin-focus);
}

body.admin-login .form-control:focus,
body.inside-header .form-control:focus {
    border-color: var(--admin-blue) !important;
    box-shadow: var(--admin-focus) !important;
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
    color: #6f7885;
    background: #eef1f4;
    cursor: not-allowed;
}

.control-label,
.form-group label {
    color: #344052;
    font-weight: 600;
}

.form-horizontal .form-group {
    margin-bottom: 18px;
}

.form-horizontal .form-group:last-child {
    margin-bottom: 0;
}

.input-group-addon {
    color: var(--admin-text-muted);
    background: var(--admin-surface-subtle);
    border-color: var(--admin-border-strong);
}

.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
    border-radius: var(--admin-radius) 0 0 var(--admin-radius);
}

.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child),
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
    border-radius: 0 var(--admin-radius) var(--admin-radius) 0;
}

.checkbox label,
.radio label {
    font-weight: 400;
}

.help-block,
.text-muted {
    color: var(--admin-text-muted);
}

.msg-box .msg-wrap.n-error,
.has-error .help-block,
.has-error .control-label {
    color: var(--admin-red);
}

.has-error .form-control {
    border-color: var(--admin-red);
}

.has-success .form-control {
    border-color: var(--admin-green);
}

.faupload-preview li {
    border-radius: var(--admin-radius);
}

.faupload-preview li img {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
}

.alert {
    color: var(--admin-text);
    border-radius: var(--admin-radius);
    box-shadow: none;
}

.alert-info,
.alert-info-light {
    background: #edf5ff;
    border-color: #bfd6f1;
}

.alert-success,
.alert-success-light {
    background: #eaf6f0;
    border-color: #b9decf;
}

.alert-warning,
.alert-warning-light {
    background: #fff6e7;
    border-color: #ead1a6;
}

.alert-danger,
.alert-danger-light {
    background: #fff0f0;
    border-color: #e9baba;
}

.table,
.bootstrap-table .table {
    margin-bottom: 0;
    color: var(--admin-text);
    background: var(--admin-surface);
}

.table > thead > tr > th,
.bootstrap-table .table > thead > tr > th {
    padding: 11px 10px;
    color: #3f4a5a;
    background: #f2f4f7;
    border-color: var(--admin-border) !important;
    font-size: 13px;
    font-weight: 650;
    vertical-align: middle;
}

.table > tbody > tr > td,
.bootstrap-table .table > tbody > tr > td {
    padding: 10px;
    border-color: #e8ebef !important;
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background: #fbfcfd;
}

.table-hover > tbody > tr:hover {
    background: #f4f7fa;
}

.fixed-table-container {
    border-color: var(--admin-border) !important;
    border-radius: var(--admin-radius);
}

.fixed-table-container tbody .selected td {
    background: #fff4f4;
}

.fixed-table-pagination .pagination-detail,
.fixed-table-pagination div.pagination {
    margin-top: 14px;
    margin-bottom: 0;
}

.pagination > li > a,
.pagination > li > span {
    min-width: 34px;
    min-height: 34px;
    margin-left: 5px;
    padding: 6px 10px;
    color: var(--admin-text-muted);
    background: var(--admin-surface);
    border-color: var(--admin-border);
    border-radius: var(--admin-radius) !important;
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
    color: #fff;
    background: var(--admin-accent);
    border-color: var(--admin-accent);
}

.dropdown-menu {
    padding: 6px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

.dropdown-menu > li > a {
    padding: 8px 10px;
    color: var(--admin-text);
    border-radius: var(--admin-radius-sm);
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
    color: var(--admin-text);
    background: #eef2f6;
}

.dropdown-menu .divider {
    margin: 5px 0;
    background: var(--admin-border);
}

.modal-content {
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    box-shadow: 0 22px 60px rgba(24, 33, 47, 0.22);
}

.modal-header,
.modal-footer {
    border-color: var(--admin-border);
}

.modal-header {
    background: var(--admin-surface-subtle);
}

.modal-title {
    color: var(--admin-text);
    font-size: 16px;
    font-weight: 650;
}

.modal-backdrop.in {
    opacity: 0.52;
}

.popover {
    border-color: var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

.tooltip-inner {
    padding: 7px 10px;
    background: var(--admin-sidebar);
    border-radius: var(--admin-radius-sm);
}

.label,
.badge {
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.label-primary {
    background: #334155;
}

.label-success {
    background: var(--admin-green);
}

.label-info {
    background: var(--admin-blue);
}

.label-warning {
    background: var(--admin-amber);
}

.label-danger {
    background: var(--admin-red);
}

.progress {
    height: 6px;
    background: #e9edf1;
    border-radius: 999px;
    box-shadow: none;
}

.progress-bar {
    border-radius: 999px;
    box-shadow: none;
}

.close {
    color: var(--admin-text-muted);
    text-shadow: none;
    opacity: 0.7;
}

.close:hover,
.close:focus {
    color: var(--admin-red);
    opacity: 1;
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
    background: #334155;
}

.bootstrap-switch {
    border-color: var(--admin-border-strong);
    border-radius: var(--admin-radius);
}

.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
    background: var(--admin-blue);
}

.layui-layer {
    border-radius: var(--admin-radius-lg) !important;
    box-shadow: 0 22px 60px rgba(24, 33, 47, 0.22) !important;
}

.layui-layer-title {
    color: var(--admin-text) !important;
    background: var(--admin-surface-subtle) !important;
    border-color: var(--admin-border) !important;
    border-radius: var(--admin-radius-lg) var(--admin-radius-lg) 0 0 !important;
    font-weight: 650;
}

#toast-container > div {
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    opacity: 0.98;
}

/* Login */
body.admin-login {
    min-height: 100vh;
    color: var(--admin-text);
    background-color: #e9edf1;
    background-position: center;
    background-size: cover;
}

.admin-login:before {
    position: fixed;
    inset: 0;
    z-index: 0;
    content: "";
    background: rgba(244, 246, 248, 0.88);
}

.login-layout {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
}

.login-brand {
    position: relative;
    display: flex;
    width: 44%;
    min-height: 100vh;
    padding: 64px;
    color: #fff;
    background: var(--admin-sidebar);
    flex-direction: column;
    justify-content: space-between;
}

.login-brand:after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    content: "";
    background: var(--admin-accent);
}

.login-brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 650;
}

.login-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    background: var(--admin-accent);
    border-radius: var(--admin-radius);
    font-size: 18px;
}

.login-brand-copy {
    max-width: 520px;
}

.login-brand-eyebrow {
    margin-bottom: 16px;
    color: #f08383;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-brand h1 {
    margin: 0;
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
}

.login-brand-description {
    max-width: 420px;
    margin: 20px 0 0;
    color: #aeb7c4;
    font-size: 15px;
    line-height: 1.8;
}

.login-brand-footer {
    color: #7f8998;
    font-size: 12px;
}

.login-panel {
    display: flex;
    min-width: 0;
    padding: 48px;
    background: rgba(255, 255, 255, 0.96);
    flex: 1;
    align-items: center;
    justify-content: center;
}

.login-screen {
    width: 100%;
    max-width: 420px;
}

.login-heading {
    margin-bottom: 34px;
}

.login-heading h2 {
    margin: 0 0 9px;
    color: var(--admin-text);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

.login-heading p {
    margin: 0;
    color: var(--admin-text-muted);
}

.admin-login #errtips {
    margin-bottom: 18px;
    padding: 10px 12px;
    color: #8d1c1c;
    background: #fff0f0;
    border: 1px solid #e9baba;
    border-radius: var(--admin-radius);
}

.admin-login .login-field {
    margin-bottom: 20px;
}

.admin-login .login-field > label {
    display: block;
    margin-bottom: 7px;
    color: #344052;
    font-size: 13px;
    font-weight: 650;
}

.admin-login .input-group {
    width: 100%;
}

.admin-login .input-group-addon {
    width: 44px;
    color: var(--admin-text-muted);
    background: var(--admin-surface-subtle);
}

.admin-login .form-control,
.admin-login .input-group-addon {
    height: 46px;
}

.admin-login .form-control {
    font-size: 15px;
}

.admin-login .captcha-addon {
    width: 112px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
}

.admin-login .captcha-addon img {
    display: block;
    width: 100%;
    height: 44px;
    object-fit: cover;
}

.admin-login .login-options {
    display: flex;
    align-items: center;
    min-height: 32px;
    margin: -2px 0 18px;
}

.admin-login .login-options label {
    margin: 0;
    color: var(--admin-text-muted);
    font-weight: 400;
}

.admin-login .login-options input {
    margin-top: 0;
    margin-right: 6px;
    vertical-align: middle;
}

.admin-login .btn-login {
    min-height: 46px;
    color: #fff;
    background: var(--admin-accent);
    border-color: var(--admin-accent);
    font-size: 15px;
    font-weight: 650;
}

.admin-login .btn-login:hover,
.admin-login .btn-login:focus,
.admin-login .btn-login:active {
    color: #fff;
    background: var(--admin-accent-dark);
    border-color: var(--admin-accent-dark);
}

.login-mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    color: var(--admin-text);
    font-weight: 650;
}

.login-mobile-brand .login-brand-icon {
    width: 36px;
    height: 36px;
}

/* Dashboard */
.dashboard-page {
    color: var(--admin-text);
}

.dashboard-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.dashboard-title .panel-lead {
    margin: 0;
}

.dashboard-title .panel-lead em {
    display: block;
    color: var(--admin-text);
    font-size: 22px;
    font-style: normal;
    font-weight: 700;
}

.dashboard-title .panel-lead small {
    color: var(--admin-text-muted);
}

.dashboard-tabs {
    margin: 0;
    border-bottom: 0;
}

.dashboard-tabs > li > a {
    padding-top: 9px;
    padding-bottom: 8px;
}

.dashboard-metrics {
    margin-right: -8px;
    margin-left: -8px;
}

.dashboard-metrics > [class*="col-"] {
    padding-right: 8px;
    padding-left: 8px;
}

.metric-card {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 104px;
    margin-bottom: 16px;
    padding: 18px;
    overflow: hidden;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow-sm);
}

.metric-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-right: 14px;
    border-radius: var(--admin-radius);
    font-size: 17px;
    flex: 0 0 42px;
}

.metric-icon.tone-red {
    color: #a61f1f;
    background: #fff0f0;
}

.metric-icon.tone-blue {
    color: #1a4f8a;
    background: #edf5ff;
}

.metric-icon.tone-teal {
    color: #176f49;
    background: #eaf6f0;
}

.metric-icon.tone-amber {
    color: #8f5500;
    background: #fff6e7;
}

.metric-copy {
    min-width: 0;
}

.metric-value {
    display: block;
    overflow: hidden;
    color: var(--admin-text);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
}

.metric-label {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: var(--admin-text-muted);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.dashboard-surface {
    margin-bottom: 16px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow-sm);
}

.dashboard-surface-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    padding: 0 16px;
    border-bottom: 1px solid var(--admin-border);
}

.dashboard-surface-header h3 {
    margin: 0;
    color: var(--admin-text);
    font-size: 15px;
    font-weight: 650;
}

.dashboard-surface-header .fa {
    color: var(--admin-text-muted);
}

.dashboard-chart {
    width: 100%;
    height: 316px;
    padding: 14px 16px 10px;
}

.activity-grid {
    display: grid;
    min-height: 316px;
    padding: 8px 16px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
}

.activity-stat {
    min-width: 0;
    padding: 16px 10px;
    border-bottom: 1px solid var(--admin-border);
}

.activity-stat:nth-last-child(-n+2) {
    border-bottom: 0;
}

.activity-stat:nth-child(odd) {
    border-right: 1px solid var(--admin-border);
}

.activity-stat .fa {
    margin-bottom: 9px;
    color: var(--admin-blue);
    font-size: 16px;
}

.activity-value {
    display: block;
    color: var(--admin-text);
    font-size: 20px;
    font-weight: 700;
}

.activity-name {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--admin-text-muted);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.system-grid {
    margin-right: -8px;
    margin-left: -8px;
}

.system-grid > [class*="col-"] {
    padding-right: 8px;
    padding-left: 8px;
}

.system-card {
    min-height: 144px;
    margin-bottom: 16px;
    padding: 18px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-top: 3px solid #334155;
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow-sm);
}

.system-card.tone-blue {
    border-top-color: var(--admin-blue);
}

.system-card.tone-green {
    border-top-color: var(--admin-green);
}

.system-card.tone-amber {
    border-top-color: var(--admin-amber);
}

.system-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.system-card-header h4 {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: 12px;
    font-weight: 650;
}

.system-values {
    display: flex;
    gap: 22px;
}

.system-value {
    min-width: 0;
}

.system-value strong {
    display: block;
    overflow: hidden;
    color: var(--admin-text);
    font-size: 22px;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.system-value span {
    display: block;
    margin-top: 6px;
    color: var(--admin-text-muted);
    font-size: 11px;
}

.dashboard-empty {
    min-height: 220px;
    padding: 72px 24px;
    color: var(--admin-text-muted);
    text-align: center;
    background: var(--admin-surface);
    border: 1px dashed var(--admin-border-strong);
    border-radius: var(--admin-radius-lg);
}

/* Signed patch updates */
.update-page .panel-body {
    padding: 18px;
}

.update-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 24px;
    color: #fff;
    background: var(--admin-sidebar);
    border-radius: var(--admin-radius-lg);
}

.update-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: #f08383;
    font-size: 12px;
    font-weight: 700;
}

.update-hero h2 {
    margin: 0;
    color: #fff;
    font-size: 23px;
    font-weight: 700;
}

.update-hero p {
    margin: 7px 0 0;
    color: #b8c0cc;
}

.update-version {
    min-width: 150px;
    padding-left: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.update-version span,
.update-version strong {
    display: block;
}

.update-version span {
    color: #aeb7c4;
    font-size: 12px;
}

.update-version strong {
    margin-top: 5px;
    color: #fff;
    font-size: 22px;
}

.update-config-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.update-config-warning span {
    color: #5f4c2b;
}

.update-operation {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #f4f8fc;
    border: 1px solid #cdddeb;
    border-left: 3px solid var(--admin-blue);
    border-radius: var(--admin-radius);
}

.update-operation-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-operation-icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--admin-blue);
    background: #e6f0f8;
    border-radius: 50%;
}

.update-operation-head strong,
.update-operation-head span {
    display: block;
}

.update-operation-head strong {
    color: var(--admin-text);
    font-size: 14px;
}

.update-operation-head div > span {
    margin-top: 2px;
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.update-operation-progress {
    height: 4px;
    margin: 12px 0 0 46px;
    overflow: hidden;
    background: #dbe7f1;
    border-radius: 2px;
    box-shadow: none;
}

.update-operation-progress .progress-bar {
    width: 100%;
    background-color: var(--admin-blue);
}

.update-operation.is-complete {
    background: #f1faf5;
    border-color: #c7e4d4;
    border-left-color: var(--admin-green);
}

.update-operation.is-complete .update-operation-icon {
    color: var(--admin-green);
    background: #ddf1e5;
}

.update-grid {
    margin-right: -8px;
    margin-left: -8px;
}

.update-grid > [class*="col-"] {
    padding-right: 8px;
    padding-left: 8px;
}

.update-card {
    height: 100%;
    margin-bottom: 16px;
    padding: 18px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow-sm);
}

.update-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
}

.update-card-header h3 {
    margin: 0;
    color: var(--admin-text);
    font-size: 16px;
    font-weight: 650;
}

.update-card-header p {
    max-width: 560px;
    margin: 6px 0 0;
    color: var(--admin-text-muted);
    font-size: 12px;
}

.update-card-icon {
    color: var(--admin-blue);
    font-size: 18px;
}

.update-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--admin-text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.update-state .fa {
    color: #9ba4b0;
    font-size: 8px;
}

.update-state.is-ready .fa {
    color: var(--admin-green);
}

.update-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.update-release {
    margin-top: 18px;
    padding: 14px;
    background: var(--admin-surface-subtle);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
}

.update-release-title strong,
.update-release-title span {
    display: block;
}

.update-release-title strong {
    color: var(--admin-text);
    font-size: 15px;
}

.update-release-title span {
    margin-top: 5px;
    color: var(--admin-text-muted);
    line-height: 1.6;
}

.update-release-meta {
    display: flex;
    gap: 22px;
    margin: 14px 0 0;
}

.update-release-meta > div {
    min-width: 0;
}

.update-release-meta dt,
.update-release-meta dd {
    display: inline;
}

.update-release-meta dt {
    color: var(--admin-text-muted);
    font-size: 12px;
    font-weight: 400;
}

.update-release-meta dd {
    margin-left: 6px;
    color: var(--admin-text);
    font-weight: 650;
}

.update-upload {
    margin-top: 18px;
}

.update-page .btn {
    min-height: 44px;
}

.update-check-grid {
    display: grid;
    margin-top: 14px;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.update-check {
    display: grid;
    min-width: 0;
    min-height: 82px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 4px 8px;
}

.update-check .fa {
    margin-top: 2px;
    grid-row: 1 / span 2;
}

.update-check span {
    overflow-wrap: anywhere;
    color: var(--admin-text-muted);
    font-size: 11px;
}

.update-check strong {
    overflow-wrap: anywhere;
    color: var(--admin-text);
    font-size: 13px;
}

.update-check.is-pass .fa {
    color: var(--admin-green);
}

.update-check.is-fail {
    background: #fff5f5;
    border-color: #e9baba;
}

.update-check.is-fail .fa,
.update-check.is-fail strong {
    color: var(--admin-red);
}

#update-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--admin-text);
    border-left-width: 3px;
}

#update-message.alert-success {
    color: #176f49 !important;
    background-color: #f1faf5 !important;
    border-color: #c7e4d4;
    border-left-color: var(--admin-green);
}

#update-message.alert-info {
    color: #1a4f8a !important;
    background-color: #f1f7fc !important;
    border-color: #caddeb;
    border-left-color: var(--admin-blue);
}

#update-message.alert-warning {
    color: #774800 !important;
    background-color: #fff8ea !important;
    border-color: #eed9ad;
    border-left-color: var(--admin-amber);
}

#update-message.alert-danger {
    color: #8d1c1c !important;
    background-color: #fff0f0 !important;
    border-color: #e9baba;
    border-left-color: var(--admin-red);
}

.update-dropzone {
    display: flex;
    min-height: 176px;
    padding: 28px 20px;
    color: var(--admin-text);
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    border: 1px dashed #aeb8c5;
    border-radius: var(--admin-radius-lg);
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

.update-dropzone:hover,
.update-dropzone:focus {
    color: var(--admin-text);
    text-decoration: none;
    background: #f3f6f9;
    border-color: #697586;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(36, 99, 169, 0.14);
}

.update-dropzone.is-dragover {
    background: #eef5fb;
    border-color: var(--admin-blue);
    border-style: solid;
    box-shadow: inset 0 0 0 1px var(--admin-blue), 0 0 0 3px rgba(36, 99, 169, 0.12);
}

.update-dropzone:active {
    background: #eaf1f7;
}

.update-dropzone.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
    pointer-events: none;
}

.update-dropzone.has-error {
    color: var(--admin-red);
    background: #fff5f5;
    border-color: var(--admin-red);
    box-shadow: 0 0 0 3px rgba(201, 42, 42, 0.12);
}

.update-dropzone-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    color: var(--admin-blue);
    background: #e7f0f8;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.update-dropzone-icon .fa {
    font-size: 18px;
}

.update-dropzone strong,
.update-dropzone > span:last-child {
    display: block;
    max-width: 100%;
}

.update-selected-file {
    display: flex !important;
    min-height: 20px;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.update-selected-file strong {
    max-width: min(420px, 72vw);
    overflow: hidden;
    color: var(--admin-text-muted);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-selected-file span {
    color: var(--admin-text-muted);
    font-size: 11px;
    white-space: nowrap;
}

.update-dropzone strong {
    font-size: 15px;
    font-weight: 650;
}

.update-dropzone-copy {
    margin-top: 6px;
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.update-file-trigger {
    min-width: 180px;
    margin: 14px 0 2px;
    cursor: pointer;
    font-weight: 600;
}

.update-file-trigger.disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.update-dropzone > span:last-child {
    margin-top: 7px;
    overflow: hidden;
    color: var(--admin-text-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-field-feedback {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 7px;
    padding-left: 2px;
    font-size: 12px;
    line-height: 1.5;
}

.update-field-feedback.is-info {
    color: var(--admin-blue);
}

.update-field-feedback.is-success {
    color: var(--admin-green);
}

.update-field-feedback.is-danger {
    color: var(--admin-red);
    font-weight: 600;
}

.update-upload-help {
    margin: 9px 0 12px;
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.update-upload-progress {
    margin: 14px 0 0;
    padding: 12px 14px;
    background: #f6f8fa;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
}

.update-progress-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--admin-text-muted);
    font-size: 12px;
}

.update-progress-copy strong {
    color: var(--admin-text);
    font-variant-numeric: tabular-nums;
}

.update-upload-progress .progress {
    height: 8px;
    margin: 9px 0 0;
    overflow: hidden;
    background: #dfe5eb;
    border-radius: 4px;
    box-shadow: none;
}

.update-upload-progress .progress-bar {
    min-width: 0;
    background: var(--admin-blue);
    box-shadow: none;
    transition: width 180ms ease;
}

.update-upload-progress.is-validating .progress-bar {
    background: #526273;
}

.update-upload-progress.is-complete {
    background: #f1faf5;
    border-color: #c7e4d4;
}

.update-upload-progress.is-complete .progress-bar {
    background: var(--admin-green);
}

.update-upload-progress.is-error {
    background: #fff5f5;
    border-color: #e9baba;
}

.update-upload-progress.is-error .progress-bar {
    background: var(--admin-red);
}

.update-upload-summary {
    margin-top: 14px;
    padding: 14px;
    background: #f7fbf8;
    border: 1px solid #c7e4d4;
    border-left: 3px solid var(--admin-green);
    border-radius: var(--admin-radius);
}

.update-summary-status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #176f49;
}

.update-upload-summary dl,
.update-detail-meta {
    display: grid;
    margin: 12px 0 0;
    gap: 10px 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.update-upload-summary dl > div,
.update-detail-meta > div {
    min-width: 0;
}

.update-upload-summary dt,
.update-detail-meta dt {
    color: var(--admin-text-muted);
    font-size: 11px;
    font-weight: 500;
}

.update-upload-summary dd,
.update-detail-meta dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    color: var(--admin-text);
    font-weight: 650;
}

.update-summary-notes {
    margin-top: 12px;
    padding-top: 10px;
    color: var(--admin-text-muted);
    border-top: 1px solid #dcece3;
    line-height: 1.6;
    white-space: pre-wrap;
}

#staged-changes {
    max-height: 160px;
    min-height: 0;
    margin-top: 10px;
}

.update-summary-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dcece3;
}

.update-summary-actions .btn {
    min-width: 148px;
    min-height: 44px;
    font-weight: 650;
}

.update-summary-actions > span {
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.update-history {
    padding-bottom: 0;
}

.update-history .table-responsive {
    margin-top: 14px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
}

.update-history .table {
    min-width: 1080px;
    margin-bottom: 0;
}

.update-history .btn-update-detail {
    white-space: nowrap;
}

.update-history-total {
    display: inline-flex;
    min-height: 30px;
    padding: 5px 9px;
    align-items: center;
    gap: 6px;
    color: var(--admin-text-muted);
    background: var(--admin-surface-subtle);
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.update-history-total .fa {
    color: var(--admin-blue);
}

.update-history-table > thead > tr > th {
    padding: 10px 12px;
    color: #667085;
    background: #f7f8fa;
    border-bottom: 1px solid #dfe3e8;
    font-size: 11px;
    font-weight: 650;
    vertical-align: middle;
    white-space: nowrap;
}

.update-history-table > tbody > tr > td {
    padding: 13px 12px;
    color: #344054;
    background: #fff;
    border-top: 1px solid #edf0f3;
    vertical-align: middle;
}

.update-history-table > tbody > tr:first-child > td {
    border-top: 0;
}

.update-history-table > tbody > tr:hover > td {
    background: #fafbfc;
}

.update-history-table th:nth-child(1) { width: 16%; }
.update-history-table th:nth-child(2) { width: 10%; }
.update-history-table th:nth-child(3) { width: 30%; }
.update-history-table th:nth-child(4) { width: 10%; }
.update-history-table th:nth-child(5) { width: 10%; }
.update-history-table th:nth-child(6) { width: 10%; }
.update-history-table th:nth-child(7) { width: 14%; }

.update-history-name {
    display: block;
    max-width: 220px;
    overflow: hidden;
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-page .update-version-link {
    min-height: 0;
    padding: 4px 0;
    color: var(--admin-blue);
    font-weight: 650;
}

.update-version-link .fa {
    margin-left: 5px;
    font-size: 11px;
    transition: transform 160ms ease;
}

.update-version-link:hover .fa,
.update-version-link:focus .fa {
    transform: translateX(2px);
}

.update-status {
    display: inline-flex;
    min-height: 24px;
    padding: 2px 8px;
    align-items: center;
    color: #176f49;
    background: #e9f6ee;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 650;
    text-transform: capitalize;
}

.update-status .fa {
    margin-right: 5px;
    font-size: 11px;
}

.update-status-failed {
    color: #8d1c1c;
    background: #fdecec;
}

.update-status-baseline {
    color: #475467;
    background: #eef1f4;
}

.update-history-content {
    max-width: 360px;
}

.update-history-content > span {
    display: -webkit-box;
    overflow: hidden;
    color: #475467;
    font-size: 12px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.update-file-count {
    display: block;
    color: var(--admin-text);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.update-history-table td small {
    display: block;
    margin-top: 2px;
    color: var(--admin-text-muted);
    font-size: 10px;
    white-space: nowrap;
}

.update-package-size,
.update-history-time {
    color: #475467;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.update-history-empty {
    padding: 30px !important;
}

.update-history-detail section h5 {
    margin: 20px 0 8px;
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 650;
}

.update-detail-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.update-detail-notes {
    min-height: 48px;
    padding: 10px 12px;
    color: var(--admin-text-muted);
    background: var(--admin-surface-subtle);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    line-height: 1.6;
    white-space: pre-wrap;
}

.update-detail-files-row {
    margin-right: -7px;
    margin-left: -7px;
}

.update-detail-files-row > [class*="col-"] {
    padding-right: 7px;
    padding-left: 7px;
}

.update-history-files {
    max-height: 230px;
    min-height: 54px;
    margin: 0;
    padding: 8px 12px;
    overflow-y: auto;
    list-style: none;
    background: #fafbfc;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
}

.update-history-files li {
    padding: 5px 0;
    overflow-wrap: anywhere;
    color: #344054;
    border-bottom: 1px solid #edf0f3;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.45;
}

.update-history-files li:last-child {
    border-bottom: 0;
}

.update-history-files .update-detail-empty {
    color: var(--admin-text-muted);
    font-family: inherit;
}

.update-footnote {
    padding: 6px 2px 0;
    color: var(--admin-text-muted);
    font-size: 12px;
}

@media (max-width: 991px) {
    .content {
        padding: 14px;
    }

    .login-brand {
        width: 40%;
        padding: 40px;
    }

    .login-brand h1 {
        font-size: 32px;
    }

    .login-panel {
        padding: 36px;
    }

    .dashboard-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .dashboard-chart,
    .activity-grid {
        min-height: 300px;
        height: 300px;
    }

    .update-hero {
        padding: 20px;
    }

    .update-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body {
        font-size: 14px;
    }

    .admin-shell .main-header .logo {
        justify-content: flex-start;
        padding-left: 16px;
    }

    .admin-shell .sidebar {
        padding-right: 8px;
        padding-left: 8px;
    }

    .content {
        padding: 10px;
    }

    #ribbon {
        padding-right: 10px;
        padding-left: 10px;
    }

    .panel-heading {
        min-height: 46px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .panel-body {
        padding: 12px;
    }

    .panel-intro > .panel-heading .nav-tabs {
        display: flex;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }

    .panel-intro > .panel-heading .nav-tabs > li {
        float: none;
        flex: 0 0 auto;
    }

    .toolbar,
    #toolbar {
        gap: 6px;
    }

    .toolbar .btn,
    #toolbar .btn,
    .toolbar .btn-group > .btn,
    #toolbar .btn-group > .btn {
        min-height: 42px;
        padding: 10px 12px;
    }

    .form-control,
    .selectpage,
    .bootstrap-select > .dropdown-toggle {
        min-height: 44px;
    }

    .form-horizontal .control-label {
        margin-bottom: 6px;
        padding-top: 0;
        text-align: left;
    }

    .fixed-table-body,
    .table-responsive,
    .goods-sku-table {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fixed-table-pagination .pagination-detail,
    .fixed-table-pagination div.pagination {
        float: none !important;
        width: 100%;
        text-align: left;
    }

    .login-brand {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 32px 20px;
    }

    .login-mobile-brand {
        display: flex;
    }

    .login-heading {
        margin-bottom: 28px;
    }

    .login-heading h2 {
        font-size: 25px;
    }

    .dashboard-title .panel-lead em {
        font-size: 20px;
    }

    .update-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .update-version {
        width: 100%;
        padding-top: 14px;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        border-left: 0;
    }

    .update-release-meta {
        gap: 14px;
        flex-wrap: wrap;
    }

    .update-page .btn {
        min-height: 44px;
    }

    .update-operation {
        padding: 13px;
    }

    .update-operation-head {
        align-items: flex-start;
    }

    .update-operation-progress {
        margin-left: 46px;
    }

    .update-upload-summary dl,
    .update-detail-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .update-history .table-responsive {
        overflow: visible;
        border: 0;
    }

    .update-history-table {
        min-width: 0 !important;
        background: transparent;
    }

    .update-history-table thead {
        display: none;
    }

    .update-history-table tbody,
    .update-history-table tr,
    .update-history-table td {
        display: block;
        width: 100%;
    }

    .update-history-table > tbody > tr {
        margin-bottom: 10px;
        overflow: hidden;
        background: #fff;
        border: 1px solid var(--admin-border);
        border-left: 3px solid var(--admin-green);
        border-radius: var(--admin-radius);
        box-shadow: 0 2px 7px rgba(18, 28, 45, 0.04);
    }

    .update-history-table > tbody > tr.update-history-row-failed {
        border-left-color: var(--admin-red);
    }

    .update-history-table > tbody > tr.update-history-row-baseline {
        border-left-color: #98a2b3;
    }

    .update-history-table > tbody > tr > td {
        display: grid;
        padding: 8px 12px;
        background: transparent;
        border: 0;
        border-bottom: 1px solid #edf0f3;
        grid-template-columns: 98px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
    }

    .update-history-table > tbody > tr > td:last-child {
        border-bottom: 0;
    }

    .update-history-table > tbody > tr > td:before {
        content: attr(data-label);
        color: var(--admin-text-muted);
        font-size: 11px;
        font-weight: 600;
    }

    .update-history-table > tbody > tr > td.update-history-empty {
        display: block;
        text-align: center;
    }

    .update-history-table > tbody > tr > td.update-history-empty:before {
        display: none;
    }

    .update-history-name,
    .update-history-content {
        max-width: none;
    }

    .update-history-name {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .update-history-content > span {
        overflow-wrap: anywhere;
        -webkit-line-clamp: 3;
    }

    .update-page .update-version-link {
        min-height: 44px;
        justify-self: start;
    }

    .update-history-table td small {
        grid-column: 2;
        white-space: normal;
    }

    .update-history-table .update-status {
        justify-self: start;
    }

    .update-package-size,
    .update-history-time {
        white-space: normal;
    }

    .dashboard-tabs {
        display: flex;
        max-width: 100%;
        overflow-x: auto;
    }

    .dashboard-tabs > li {
        float: none;
        flex: 0 0 auto;
    }

    .metric-card {
        min-height: 96px;
        padding: 14px;
    }

    .metric-value {
        font-size: 22px;
    }

    .dashboard-chart {
        height: 270px;
        min-height: 270px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .activity-grid {
        height: auto;
        min-height: 0;
    }

    .system-values {
        gap: 14px;
    }

    .system-value strong {
        font-size: 19px;
    }
}

@media (max-width: 479px) {
    .content {
        padding: 8px;
    }

    .panel,
    .box,
    .well,
    .dashboard-surface,
    .metric-card,
    .system-card {
        border-radius: var(--admin-radius);
    }

    .panel-intro > .panel-heading .nav-tabs > li > a {
        padding-right: 11px;
        padding-left: 11px;
    }

    .login-panel {
        padding: 24px 18px;
    }

    .metric-card {
        min-height: 88px;
    }

    .metric-icon {
        width: 38px;
        height: 38px;
        margin-right: 10px;
        flex-basis: 38px;
    }

    .metric-value {
        font-size: 20px;
    }

    .update-page .panel-body {
        padding: 10px;
    }

    .update-hero,
    .update-card {
        padding: 14px;
    }

    .update-card-header {
        min-height: 0;
    }

    .update-dropzone {
        min-height: 148px;
        padding: 22px 14px;
    }

    .update-check-grid {
        grid-template-columns: 1fr;
    }

    .update-check {
        min-height: 64px;
    }

    .update-selected-file {
        align-items: center;
        flex-direction: column;
        gap: 2px;
    }

    .update-upload-summary dl,
    .update-detail-meta {
        grid-template-columns: 1fr;
    }

    .update-summary-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .update-summary-actions .btn {
        width: 100%;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *:before,
    *:after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
