/**
 * 管理后台：Bootstrap 3 页面结构与类名在 BS5 + Tabler 下的过渡兼容（阶段 3）
 * 随各页改写为原生 BS5 后可逐步删减。
 */

/* —— BS3 网格 col-xs-* —— */
.row {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 0;
}
.col-xs-1 {
  flex: 0 0 auto;
  width: 8.33333333%;
}
.col-xs-2 {
  flex: 0 0 auto;
  width: 16.66666667%;
}
.col-xs-3 {
  flex: 0 0 auto;
  width: 25%;
}
.col-xs-4 {
  flex: 0 0 auto;
  width: 33.33333333%;
}
.col-xs-5 {
  flex: 0 0 auto;
  width: 41.66666667%;
}
.col-xs-6 {
  flex: 0 0 auto;
  width: 50%;
}
.col-xs-7 {
  flex: 0 0 auto;
  width: 58.33333333%;
}
.col-xs-8 {
  flex: 0 0 auto;
  width: 66.66666667%;
}
.col-xs-9 {
  flex: 0 0 auto;
  width: 75%;
}
.col-xs-10 {
  flex: 0 0 auto;
  width: 83.33333333%;
}
.col-xs-11 {
  flex: 0 0 auto;
  width: 91.66666667%;
}
.col-xs-12 {
  flex: 0 0 auto;
  width: 100%;
}

.pull-right {
  float: right !important;
}
.pull-left {
  float: left !important;
}
.center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* —— Panel → 卡片观感 —— */
.panel {
  margin-bottom: 1rem;
  background-color: var(--hui-bg-surface, #fff);
  border: 1px solid var(--hui-border-color, #dee2e6);
  border-radius: var(--hui-radius-card, 8px);
  box-shadow: var(--hui-shadow-card, 0 1px 2px rgba(0, 0, 0, 0.06));
}
.panel-heading {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--hui-border-color, #dee2e6);
  border-radius: calc(var(--hui-radius-card, 8px) - 1px) calc(var(--hui-radius-card, 8px) - 1px) 0 0;
}
.panel-title {
  margin-top: 0;
  margin-bottom: 0;
  font-size: var(--hui-fs-card-title, 1.0625rem);
}
.panel-body {
  padding: 1rem;
}
.panel-footer {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--hui-border-color, #dee2e6);
}

.panel-default > .panel-heading {
  background-color: #f8fafc;
  color: inherit;
}
.panel-primary > .panel-heading {
  background-color: var(--hui-primary);
  border-color: var(--hui-primary);
  color: #fff;
}
.panel-info > .panel-heading {
  background-color: var(--tblr-info, #4299e1);
  border-color: #9bc8f0;
  color: #fff;
}
.panel-success > .panel-heading {
  background-color: var(--hui-success);
  color: #fff;
}
.panel-warning > .panel-heading {
  background-color: var(--hui-warning);
  color: #1a1a1a;
}
.panel-danger > .panel-heading {
  background-color: var(--hui-danger);
  color: #fff;
}

.well {
  min-height: 20px;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: #f8fafc;
  border: 1px solid var(--hui-border-color);
  border-radius: var(--hui-radius-card);
}

/* —— 按钮 btn-default —— */
.btn-default {
  color: #1d273b;
  background-color: #f8fafc;
  border-color: #dee2e6;
}
.btn-default:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
}

/* —— input-group-addon（BS3）—— */
.input-group-addon {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 400;
  color: #667382;
  background-color: #f8fafc;
  border: 1px solid #dee2e6;
}
.input-group-addon:first-child {
  border-radius: var(--hui-radius-input, 6px) 0 0 var(--hui-radius-input, 6px);
}
.input-group-addon:last-child {
  border-radius: 0 var(--hui-radius-input, 6px) var(--hui-radius-input, 6px) 0;
}
.input-group .form-control:first-child,
.input-group-addon:first-child {
  border-right: 0;
}

/* —— Modal 关闭按钮 BS3 —— */
.modal-header .close,
button.close {
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0.6;
}
.modal-header .close:hover,
button.close:hover {
  opacity: 1;
}

/* animate.css + BS3 modal .in → BS5 .show（脚本亦会修补） */
.modal.fade.in {
  opacity: 1;
}

/* bootstrap-table 分页仍为 ul.pagination>li>a 形态时的兜底 */
.bootstrap-table .fixed-table-pagination .pagination > li > a,
.bootstrap-table .fixed-table-pagination .pagination > li > span {
  position: relative;
  display: block;
  padding: 0.375rem 0.75rem;
  margin-left: -1px;
  color: var(--hui-primary);
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: var(--hui-radius-sm, 4px);
}
.bootstrap-table .fixed-table-pagination .pagination > li.active > a {
  color: #fff !important;
  background-color: var(--hui-primary) !important;
  border-color: var(--hui-primary) !important;
}

/* Glyphicons → Font Awesome 4（页面仍写 glyphicon 类名时显示图标） */
.glyphicon.glyphicon-info-sign:before {
  font-family: FontAwesome !important;
  content: "\f05a" !important;
}
.glyphicon.glyphicon-question-sign:before {
  font-family: FontAwesome !important;
  content: "\f059" !important;
}
.glyphicon.glyphicon-stats:before {
  font-family: FontAwesome !important;
  content: "\f080" !important;
}
.glyphicon.glyphicon-tint:before {
  font-family: FontAwesome !important;
  content: "\f043" !important;
}
.glyphicon.glyphicon-time:before {
  font-family: FontAwesome !important;
  content: "\f017" !important;
}
.glyphicon.glyphicon-shopping-cart:before {
  font-family: FontAwesome !important;
  content: "\f07a" !important;
}
.glyphicon.glyphicon-yen:before {
  font-family: FontAwesome !important;
  content: "\f157" !important;
}

/* 管理端登录 / SSO 网关（Tabler page-center） */
.admin-login-page .admin-login-wrap {
  min-height: calc(100vh - 3.5rem);
  display: flex;
  align-items: center;
  padding-top: 0.5rem;
  padding-bottom: 2rem;
}
.admin-login-page .admin-login-wrap .container-tight {
  max-width: 28rem;
}
.admin-sso-gateway {
  min-height: calc(100vh - 3.5rem);
}

/* Layer 3.x 与管理端 Bootstrap Modal 观感对齐（阶段 5 IMP-5-02） */
body.admin-shell .layui-layer {
  border-radius: var(--tblr-border-radius, 0.375rem);
  box-shadow:
    0 0.125rem 0.25rem rgba(0, 0, 0, 0.075),
    0 0.5rem 1rem rgba(0, 0, 0, 0.12);
  border: 1px solid var(--tblr-border-color-translucent, rgba(4, 32, 69, 0.14));
  overflow: hidden;
}
body.admin-shell .layui-layer-title {
  height: 3rem;
  line-height: 3rem;
  padding: 0 3rem 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  box-sizing: border-box;
  border-bottom: 1px solid var(--tblr-border-color-translucent, rgba(4, 32, 69, 0.14));
  background: var(--tblr-bg-surface, #fff);
}
body.admin-shell .layui-layer-btn {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--tblr-border-color-translucent, rgba(4, 32, 69, 0.14));
  text-align: right;
}
body.admin-shell .layui-layer-btn a {
  margin-left: 0.5rem;
  border-radius: var(--tblr-border-radius, 0.25rem);
}
body.admin-shell .layui-layer-shade {
  opacity: 0.45 !important;
  filter: alpha(opacity=45) !important;
}

/* —— 阶段 7：业务页外壳（Tabler 容器 + 小屏筛选折叠）—— */
.admin-page-shell {
  padding-top: 4.75rem;
}
@media (min-width: 992px) {
  .admin-filter-collapse.collapse {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
  }
}
.admin-table-card .fixed-table-toolbar {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.75rem;
}
