:root {
  --wm-depth-primary: #1769e0;
  --wm-depth-primary-strong: #0b4fba;
  --wm-depth-primary-soft: #eaf3ff;
  --wm-depth-ink: #14233c;
  --wm-depth-muted: #64748b;
  --wm-depth-line: rgba(148, 163, 184, .24);
  --wm-depth-surface: rgba(255, 255, 255, .94);
  --wm-depth-bg: #eef4fb;
  --wm-depth-shadow-1: 0 2px 8px rgba(32, 62, 108, .07), 0 1px 2px rgba(32, 62, 108, .06);
  --wm-depth-shadow-2: 0 12px 30px rgba(32, 62, 108, .10), 0 3px 10px rgba(32, 62, 108, .06);
  --wm-depth-shadow-3: 0 24px 60px rgba(20, 45, 85, .16), 0 8px 22px rgba(20, 45, 85, .08);
  --wm-depth-radius-sm: 10px;
  --wm-depth-radius: 15px;
  --wm-depth-radius-lg: 22px;
}

html {
  background: var(--wm-depth-bg);
}

body {
  color: var(--wm-depth-ink);
  background:
    radial-gradient(circle at 8% -12%, rgba(55, 140, 255, .13), transparent 34rem),
    radial-gradient(circle at 96% 8%, rgba(52, 211, 153, .08), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0, var(--wm-depth-bg) 65%, #f5f8fc 100%);
  background-attachment: fixed;
}

#app,
.shell,
.wrapper,
.page-wrapper,
.main-container,
.app-container {
  position: relative;
}

/* Top-level navigation: clearer separation without changing layout. */
.navbar,
.top,
.header,
.topbar,
.el-header,
.main-header,
.top-menu,
.nav-header {
  border-bottom-color: rgba(148, 163, 184, .20) !important;
  box-shadow: 0 5px 22px rgba(31, 67, 118, .08);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

/* Navigation and sidebars use an inset layer, preserving existing widths. */
.sidebar,
.sidebar-container,
.left-menu,
.menu-left,
.nav,
.el-aside,
.main-sidebar {
  border-right-color: rgba(148, 163, 184, .18) !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .65), 7px 0 24px rgba(31, 67, 118, .05);
}

.sidebar .active,
.sidebar-container .is-active,
.left-menu .active,
.menu-left .active,
.nav .on,
.el-menu-item.is-active {
  box-shadow: inset 3px 0 0 var(--wm-depth-primary), 0 7px 16px rgba(23, 105, 224, .12);
}

/* Three elevation levels for dashboards, forms, and dialogs. */
.card,
.panel,
.el-card,
.box,
.widget,
.dashboard-card,
.statistics-card,
.filter-box,
.search-box,
.table-box,
.form-box,
.content-box {
  background-color: var(--wm-depth-surface) !important;
  border-color: var(--wm-depth-line) !important;
  border-radius: var(--wm-depth-radius) !important;
  box-shadow: var(--wm-depth-shadow-2) !important;
}

.el-dialog,
.modal-content,
.layui-layer,
.ant-modal-content,
.dropdown-menu,
.el-dropdown-menu,
.popover,
.el-popover {
  border: 1px solid rgba(148, 163, 184, .22) !important;
  border-radius: var(--wm-depth-radius-lg) !important;
  box-shadow: var(--wm-depth-shadow-3) !important;
  overflow: hidden;
}

.card:hover,
.el-card:hover,
.dashboard-card:hover,
.statistics-card:hover {
  border-color: rgba(23, 105, 224, .22) !important;
  box-shadow: 0 16px 38px rgba(31, 67, 118, .14), 0 4px 12px rgba(31, 67, 118, .06) !important;
}

/* Inputs keep native behavior while becoming easier to scan. */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea,
.form-control,
.el-input__inner,
.el-textarea__inner,
.el-select .el-input__inner,
.ant-input,
.layui-input {
  border-color: rgba(148, 163, 184, .42) !important;
  border-radius: var(--wm-depth-radius-sm) !important;
  background-color: rgba(255, 255, 255, .92) !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .035), 0 2px 6px rgba(31, 67, 118, .035);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus,
.form-control:focus,
.el-input__inner:focus,
.el-textarea__inner:focus,
.ant-input:focus,
.layui-input:focus {
  border-color: rgba(23, 105, 224, .72) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(23, 105, 224, .12), 0 7px 18px rgba(31, 67, 118, .08) !important;
  outline: none;
}

/* Existing actions remain in place; only their visual treatment changes. */
.btn,
button.btn,
.el-button,
.ant-btn,
.layui-btn,
button[type="submit"],
input[type="submit"] {
  border-radius: var(--wm-depth-radius-sm) !important;
  box-shadow: var(--wm-depth-shadow-1);
  transition: box-shadow .18s ease, filter .18s ease, border-color .18s ease;
}

.btn-primary,
.btn.btn-primary,
.el-button--primary,
.ant-btn-primary,
.layui-btn-normal,
button[type="submit"] {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--wm-depth-primary), var(--wm-depth-primary-strong)) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(23, 105, 224, .24) !important;
}

.btn:hover,
.el-button:hover,
.ant-btn:hover,
.layui-btn:hover,
button[type="submit"]:hover {
  filter: brightness(1.025);
  box-shadow: 0 11px 24px rgba(31, 67, 118, .17) !important;
}

/* Tables get a distinct header plane and row depth, without changing columns. */
.table-responsive,
.table-wrap,
.el-table,
.ant-table,
.layui-table-view,
.dataTables_wrapper {
  border-color: var(--wm-depth-line) !important;
  border-radius: var(--wm-depth-radius) !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: var(--wm-depth-shadow-1);
  overflow: auto;
}

table,
.table,
.el-table,
.ant-table {
  background-color: transparent !important;
}

table thead th,
.table thead th,
.el-table th,
.ant-table-thead > tr > th,
.layui-table-header th {
  color: #526179 !important;
  background: linear-gradient(180deg, #fbfdff, #f1f6fc) !important;
  border-bottom-color: rgba(148, 163, 184, .24) !important;
  font-weight: 700 !important;
}

table tbody tr,
.el-table__row,
.ant-table-tbody > tr {
  transition: background-color .15s ease, box-shadow .15s ease;
}

table tbody tr:hover,
.table-hover tbody tr:hover,
.el-table__row:hover > td,
.ant-table-tbody > tr:hover > td {
  background: rgba(234, 243, 255, .72) !important;
}

/* Status chips and pagination become a separate foreground layer. */
.label,
.badge,
.tag,
.status,
.el-tag,
.ant-tag,
.layui-badge {
  border-radius: 999px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .62), 0 2px 7px rgba(31, 67, 118, .08);
}

.pagination > li > a,
.pagination > li > span,
.el-pagination button,
.el-pager li,
.ant-pagination-item,
.layui-laypage a,
.layui-laypage span {
  border-radius: 9px !important;
  box-shadow: var(--wm-depth-shadow-1);
}

/* Authentication pages: retain the original form fields and behavior. */
.login-container,
.login-register-content,
.login-box,
.register-box,
.auth-card,
.login > .content,
.register > .content,
.login-content,
.rigister-content {
  border: 1px solid rgba(255, 255, 255, .82) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, .95) !important;
  box-shadow: var(--wm-depth-shadow-3) !important;
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

/* Email-only registration presentation. The phone endpoint and backend logic stay intact. */
.rigister .rigister-content-tab .el-button:nth-child(n + 2) {
  display: none !important;
}

.rigister .rigister-content-tab .el-button:first-child {
  min-width: 116px;
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--wm-depth-primary), var(--wm-depth-primary-strong)) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(23, 105, 224, .22) !important;
}

.rigister-content-right,
.login-content-right {
  padding: clamp(12px, 2vw, 28px);
}

#wm-regverify-row {
  padding: 10px;
  border: 1px solid rgba(23, 105, 224, .15);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(234, 243, 255, .76), rgba(255, 255, 255, .92));
  box-shadow: var(--wm-depth-shadow-1);
}

#wm-regverify-row #wm-regcode,
#wm-regverify-row #wm-regsend {
  height: 46px !important;
  border-radius: 10px !important;
}

/* Extra legacy/admin shells found in the current ROOT and seller pages. */
.layui-layout-admin .layui-header,
.layui-layout-admin .layui-side,
.skin-blue .main-header,
.skin-blue .main-sidebar,
.page-sidebar,
.fixed-sidebar-left {
  box-shadow: 0 8px 26px rgba(31, 67, 118, .09);
}

.layui-card,
.portlet,
.ibox,
.ibox-content,
.well,
.jumbotron {
  border-color: var(--wm-depth-line) !important;
  border-radius: var(--wm-depth-radius) !important;
  box-shadow: var(--wm-depth-shadow-2) !important;
}

/* Product and order cards gain depth without changing their click targets. */
.goods-item,
.goods-card,
.product-card,
.commodity-item,
.order-card,
.shop-card,
.cart-item,
.store-item {
  border-color: rgba(148, 163, 184, .20) !important;
  border-radius: 15px !important;
  background-color: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 7px 20px rgba(31, 67, 118, .08) !important;
  transition: box-shadow .18s ease, border-color .18s ease;
}

.goods-item:hover,
.goods-card:hover,
.product-card:hover,
.commodity-item:hover,
.order-card:hover,
.shop-card:hover {
  border-color: rgba(23, 105, 224, .24) !important;
  box-shadow: 0 14px 32px rgba(31, 67, 118, .13) !important;
}

@media (max-width: 850px) {
  :root {
    --wm-depth-radius: 13px;
    --wm-depth-radius-lg: 18px;
    --wm-depth-shadow-2: 0 8px 22px rgba(32, 62, 108, .10), 0 2px 7px rgba(32, 62, 108, .05);
  }

  body {
    background:
      radial-gradient(circle at 5% -5%, rgba(55, 140, 255, .12), transparent 19rem),
      linear-gradient(180deg, #f8fbff, #eef4fb);
  }

  .el-dialog,
  .modal-content,
  .ant-modal-content {
    border-radius: 18px !important;
  }
}

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