:root {
  --sms-sidebar-width: 245px;
  --sms-sidebar-collapsed-width: 72px;
  --sms-color-primary: #0052ff;
  --sms-color-primary-hover: #0046db;
  --sms-color-border: rgba(226, 232, 240, 0.8);
  --sms-color-text: #475569;
  --sms-color-text-muted: #94a3b8;
  --sms-color-active-bg: #eff6ff;
  --sms-color-active-ring: #dbeafe;
  --sms-bg-shell: #f4f6fb;
  --sms-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --bs-font-sans-serif: var(--sms-font-sans);
  --bs-body-font-family: var(--sms-font-sans);
}

html,
body,
#kt_body {
  font-family: var(--sms-font-sans) !important;
}

.aside,
.menu,
.menu-link,
.menu-title,
.card,
.btn,
.form-control,
.form-select,
.page-title,
.toolbar,
.modal-content,
.swal2-popup,
.select2-container,
.table {
  font-family: var(--sms-font-sans) !important;
}

#kt_wrapper{
  padding-left: 0;
}
#kt_toolbar{
  left: 0;
}
#left-menu-container{
  position: absolute; left: -9999px; width: 0; height: 0; overflow: hidden;
  #kt_aside{
    position: relative;
  }
}
#kt_customers_table_wrapper,.table-responsive,#kt_customers_table{
  border-left: none !important;
}
#kt_content_container{
  border-radius: 10px !important;
}
.card{
  border: 1px solid #e7e9eb;
  border-radius: 20px;
  margin-left: 30px;
  margin-bottom: 30px;
  margin-right: 30px;
}
.select2-results__option--selected{
  background-color: #0052FF !important;
}
.modal-content{
  border-radius: 14px;
  background: linear-gradient(#D7E7FF, #fff);
}

.modal-content input{
  background-color: #fff!important;
  border-radius: 14px;
  border: #E4EBFF 1px solid;
}
/* 后台整体背景（对齐参考站 admin-shell） */
body.aside-enabled {
  background-color: var(--sms-bg-shell);
  background-image:
    radial-gradient(at 0% 0%, rgba(0, 82, 255, 0.05) 0, transparent 45%),
    radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.04) 0, transparent 40%);
}

/* 桌面端侧栏 */
@media (min-width: 769px) {
  #kt_aside {
    position: fixed !important;
    top: 0;
    left: 0;
    width: var(--sms-sidebar-width) !important;
    min-width: var(--sms-sidebar-width) !important;
    max-width: var(--sms-sidebar-width) !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border-right: 1px solid var(--sms-color-border);
    background: #fff !important;
    z-index: 100;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    transition: width 0.3s ease, min-width 0.3s ease, max-width 0.3s ease;
  }

  [data-kt-aside-minimize="on"] #kt_aside {
    width: var(--sms-sidebar-collapsed-width) !important;
    min-width: var(--sms-sidebar-collapsed-width) !important;
    max-width: var(--sms-sidebar-collapsed-width) !important;
  }

  .left-container {
    width: 0 !important;
    min-width: 0 !important;
    flex-shrink: 0;
    padding: 0 !important;
    overflow: visible;
  }

  [data-kt-aside-minimize="on"] .left-container {
    width: 0 !important;
  }

  /* 覆盖 Metronic 默认 265px */
  #kt_aside.aside,
  #kt_aside .aside-menu,
  #kt_aside .aside-menu.flex-column-fluid {
    width: var(--sms-sidebar-width) !important;
    max-width: var(--sms-sidebar-width) !important;
  }
}
#kt_content_container{
  width: 100%;
}
.btn-primary,.btn-danger,.btn-success{
  border-radius: 10px;
}
.btn-primary,.swal2-confirm{
  background-color: #0052FF !important;
}
.page-link{
  border-radius: 10px;
}
.page-item.active .page-link{
  background-color: #0052FF;
  border-radius: 10px;
}
.fa-user:before {
  font-size: 24px;
}
.br_10px,.br-10px{
  border-radius: 10px;
}
.ml-10px{
  margin-left: 10px;
}
/* 固定iframe左边距的样式类 */
.iframe-fixed-margin {
  margin-left: 245px !important;
  width: calc(100vw - 245px) !important;
}
.select2-container{
  border-radius: 10px;
  /* overflow: hidden; */
}
.align-end{
  align-items: flex-end !important;
}
.musel_div .select2-selection {
	padding: .75rem 3rem .75rem 1rem !important;
	margin-bottom: -2px;
}
.musel_div .select2-search__field {
  margin: 0 !important;
  line-height: 16px;
}
.select2-container .select2-selection{
  border-radius: 10px;
  background-color: #fff;
}
.form-check.form-check-solid .form-check-input:checked{
  background-color: #0052FF;
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
  /* 移动端卡片样式调整 */
  .card {
    margin-left: 16px !important;
    margin-right: 16px !important;
    margin-bottom: 16px !important;
    border-radius: 12px !important;
  }

  /* 移动端表格响应式 */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 移动端按钮样式 */
  .btn {
    padding: 8px 16px !important;
    font-size: 14px !important;
  }

  /* 移动端表单样式 */
  .form-control,
  .form-select {
    font-size: 14px !important;
    /* padding: 8px 12px !important; */
  }

  /* 移动端模态框优化 */
  .modal-dialog {
    margin: 10px !important;
    max-width: calc(100% - 20px) !important;
  }

  .modal-content {
    border-radius: 12px !important;
  }

  /* 移动端工具栏调整 */
  .card-toolbar {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  .card-toolbar > div {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  /* 移动端分页样式 */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }

  .page-link {
    padding: 6px 12px !important;
    font-size: 14px !important;
  }

  /* 移动端Select2优化 */
  .select2-container {
    width: 100% !important;
  }

  /* 移动端隐藏不必要的元素 */
  .d-none-mobile {
    display: none !important;
  }

  /* 移动端显示专用元素 */
  .d-block-mobile {
    display: block !important;
  }
  .page-title{
    margin-left: 12px;
  }
  .lang-switch{
    display: none !important;
  }
  #kt_toolbar{
    padding: 10px !important;
  }
  .option_th{
    min-width: 130px !important;
  }
  .no_btn_left{
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
}
@media (min-width: 768px) {
  .lang-switch{
    display: block !important;
  }
  #kt_toolbar{
    padding: none !important;
  }
}
/* 小屏幕手机优化 */
@media (max-width: 480px) {
  .card {
    margin-left: 12px !important;
    margin-right: 12px !important;
  }

  .btn {
    padding: 6px 12px !important;
    font-size: 13px !important;
  }

  .modal-dialog {
    margin: 5px !important;
    max-width: calc(100% - 10px) !important;
  }
}
.modal-content .form-check-input:checked{
  background-color: #0052FF!important;
}
.sorting_disabled{
  vertical-align: middle;
}

/* Global SweetAlert2 theme */
.swal2-popup:not(.swal2-toast) {
  border-radius: 16px !important;
  padding: 24px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12) !important;
}
.swal2-popup:not(.swal2-toast) .swal2-title,
.swal2-popup:not(.swal2-toast) .app-swal-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  padding-bottom: 4px !important;
}
.swal2-popup:not(.swal2-toast) .swal2-html-container,
.swal2-popup:not(.swal2-toast) .app-swal-html {
  font-size: 14px !important;
  color: #475569 !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions,
.swal2-popup:not(.swal2-toast) .app-swal-actions {
  gap: 10px !important;
  margin: 16px 0 0 !important;
  width: 100%;
  justify-content: flex-end;
}
.swal2-popup:not(.swal2-toast) .swal2-input,
.swal2-popup:not(.swal2-toast) .app-swal-input,
.swal2-popup:not(.swal2-toast) input.swal2-input {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
  margin-top: 8px !important;
}
.swal2-popup:not(.swal2-toast) .swal2-input:focus,
.swal2-popup:not(.swal2-toast) .app-swal-input:focus {
  border-color: #0052ff !important;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12) !important;
  outline: none !important;
}
.swal2-popup:not(.swal2-toast) .swal2-validation-message,
.swal2-popup:not(.swal2-toast) .app-swal-validation {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions button.swal2-styled[style*="display: none"],
.swal2-popup:not(.swal2-toast) .swal2-actions button.swal2-styled.swal2-hide {
  display: none !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .app-swal-btn,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled {
  align-items: center !important;
  justify-content: center !important;
  min-width: 72px;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .app-swal-btn-primary,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled.swal2-confirm {
  background: #0052ff !important;
  border: 1px solid #0052ff !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 82, 255, 0.2) !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .app-swal-btn-primary:hover,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled.swal2-confirm:hover {
  background: #0046db !important;
  border-color: #0046db !important;
  color: #fff !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .app-swal-btn-cancel,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled.swal2-cancel,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled.swal2-deny {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  box-shadow: none !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .app-swal-btn-cancel:hover,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled.swal2-cancel:hover,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled.swal2-deny:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .app-swal-btn-warning,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled.swal2-confirm.app-swal-btn-warning {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #b45309 !important;
  box-shadow: none !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .app-swal-btn-warning:hover,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled.swal2-confirm.app-swal-btn-warning:hover {
  background: #fef3c7 !important;
  border-color: #fcd34d !important;
  color: #92400e !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .app-swal-btn-danger,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled.swal2-confirm.app-swal-btn-danger {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #dc2626 !important;
  box-shadow: none !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .app-swal-btn-danger:hover,
.swal2-popup:not(.swal2-toast) .swal2-actions .swal2-styled.swal2-confirm.app-swal-btn-danger:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
}
/* legacy btn classes passed via customClass */
.swal2-popup:not(.swal2-toast) .swal2-actions .btn.btn-primary,
.swal2-popup:not(.swal2-toast) .swal2-actions .btn.btn-success,
.swal2-popup:not(.swal2-toast) .swal2-actions .chat-page-btn-primary {
  background: #0052ff !important;
  border: 1px solid #0052ff !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 82, 255, 0.2) !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .btn.btn-light,
.swal2-popup:not(.swal2-toast) .swal2-actions .btn.btn-secondary {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  box-shadow: none !important;
}
.swal2-popup:not(.swal2-toast) .swal2-actions .btn.btn-warning {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #b45309 !important;
  box-shadow: none !important;
}
.swal2-popup.swal2-toast {
  border-radius: 10px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1) !important;
  padding: 12px 16px !important;
}

/* 列表页 DataTables：内容未溢出时不显示横向滚动条 */
.batch-stats-table-card {
  overflow: hidden;
  max-width: 100%;
}

.batch-stats-table-card .card-body {
  overflow-x: hidden !important;
}

.batch-stats-table-card .dataTables_wrapper,
#kt_content_container .dataTables_wrapper {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100%;
}

.batch-stats-table-card .dataTables_wrapper > .row,
#kt_content_container .dataTables_wrapper > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  --bs-gutter-x: 0;
}

.batch-stats-table-card .dataTables_wrapper > .row > [class*="col-"],
#kt_content_container .dataTables_wrapper > .row > [class*="col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100%;
}

.batch-stats-table-card table.dataTable,
#kt_content_container table.dataTable {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100%;
  table-layout: auto !important;
}

@media (max-width: 991.98px) {
  .batch-stats-table-card .card-body {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}
