@charset "utf-8";
/* OAIM Admin Design System v5 - Modern, Light, Restrained */

:root {
  /* Backgrounds */
  --o-bg: #f8fafc;
  --o-surface: #ffffff;
  --o-surface-2: #f8fafc;
  --o-surface-3: #f1f5f9;

  /* Sidebar - light modern */
  --o-sidebar: #f8fafc;
  --o-sidebar-border: #e2e8f0;
  --o-sidebar-hover: #f1f5f9;
  --o-sidebar-text: #475569;
  --o-sidebar-text-active: #0f172a;
  --o-sidebar-active-bg: #eff6ff;
  --o-sidebar-active-bar: #2563eb;

  /* Brand - refined blue */
  --o-brand: #2563eb;
  --o-brand-2: #3b82f6;
  --o-brand-hover: #1d4ed8;
  --o-brand-light: #dbeafe;

  /* Text */
  --o-text: #0f172a;
  --o-text-2: #334155;
  --o-muted: #64748b;
  --o-muted-2: #94a3b8;

  /* Borders */
  --o-border: #e2e8f0;
  --o-border-strong: #cbd5e1;

  /* States */
  --o-success: #10b981;
  --o-success-light: #d1fae5;
  --o-success-text: #047857;
  --o-warning: #f59e0b;
  --o-warning-light: #fef3c7;
  --o-warning-text: #b45309;
  --o-danger: #ef4444;
  --o-danger-light: #fee2e2;
  --o-danger-text: #b91c1c;
  --o-info: #3b82f6;
  --o-info-light: #dbeafe;
  --o-info-text: #1d4ed8;

  /* Effects */
  --o-radius: 10px;
  --o-radius-sm: 7px;
  --o-radius-lg: 12px;
  --o-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --o-shadow-card: 0 1px 3px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.04);
  --o-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);

  /* Layout */
  --o-header-height: 60px;
  --o-sidebar-width: 220px;
  --o-sidebar-collapsed: 64px;
  --o-transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --o-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
  --o-mono: "SF Mono", "JetBrains Mono", "Fira Code", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--o-bg);
  color: var(--o-text);
  font-family: var(--o-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--o-brand); text-decoration: none; transition: color var(--o-transition); }
a:hover, a:focus { color: var(--o-brand-hover); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--o-border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--o-muted-2); }

/* Layout */
.o-layout-admin { min-height: 100vh; }

.o-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--o-header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--o-border);
  box-shadow: var(--o-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px 0 18px;
  z-index: 1000;
}

.o-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--o-text);
  letter-spacing: 0;
}

.o-header-brand img {
  height: 34px;
  width: 34px;
  border-radius: var(--o-radius-sm);
  object-fit: cover;
}

.o-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.o-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--o-radius-sm);
  color: var(--o-text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--o-transition);
  border: 1px solid transparent;
  background: transparent;
}

.o-header-btn:hover {
  background: var(--o-surface-3);
  color: var(--o-text);
}

.o-header-btn i { font-size: 15px; }

.o-sidebar {
  position: fixed;
  top: var(--o-header-height);
  left: 0;
  bottom: 0;
  width: var(--o-sidebar-width);
  background: var(--o-sidebar);
  border-right: 1px solid var(--o-sidebar-border);
  color: var(--o-sidebar-text);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 900;
  padding: 12px 0;
}

.o-sidebar-nav { list-style: none; margin: 0; padding: 0; }

.o-sidebar-item > a,
.o-sidebar-group > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 2px 10px;
  border-radius: var(--o-radius-sm);
  color: var(--o-sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--o-transition);
  position: relative;
}

.o-sidebar-item > a:hover,
.o-sidebar-group > a:hover {
  background: var(--o-sidebar-hover);
  color: var(--o-sidebar-text-active);
}

.o-sidebar-item > a i,
.o-sidebar-group > a i {
  font-size: 17px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.o-sidebar-item > a .arrow,
.o-sidebar-group > a .arrow {
  margin-left: auto;
  font-size: 11px;
  color: var(--o-muted-2);
  transition: transform var(--o-transition);
}

.o-sidebar-item.active > a,
.o-sidebar-item.layui-this > a,
.o-sidebar-group.active > a,
.o-sidebar-group.layui-this > a,
.o-sidebar-item > a.this,
.o-sidebar-group > a.this {
  background: var(--o-sidebar-active-bg);
  color: var(--o-brand);
  font-weight: 600;
}

.o-sidebar-item.active > a::before,
.o-sidebar-item.layui-this > a::before,
.o-sidebar-group.active > a::before,
.o-sidebar-group.layui-this > a::before,
.o-sidebar-item > a.this::before,
.o-sidebar-group > a.this::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--o-sidebar-active-bar);
  border-radius: 0 2px 2px 0;
}

.o-sidebar-submenu {
  list-style: none;
  margin: 0;
  padding: 4px 0 4px 38px;
  display: none;
  background: transparent;
}

.o-sidebar-group.open > .o-sidebar-submenu { display: block; }
.o-sidebar-group.open > a .arrow { transform: rotate(90deg); }

.o-sidebar-submenu li a {
  display: block;
  padding: 8px 14px;
  margin: 2px 10px 2px 0;
  border-radius: var(--o-radius-sm);
  color: var(--o-sidebar-text);
  font-size: 13px;
  transition: all var(--o-transition);
}

.o-sidebar-submenu li a:hover {
  color: var(--o-text);
  background: var(--o-sidebar-hover);
}

.o-sidebar-submenu li.active a,
.o-sidebar-submenu li.layui-this a,
.o-sidebar-submenu li a.this {
  color: var(--o-brand);
  background: var(--o-sidebar-active-bg);
  font-weight: 600;
}

.o-body {
  position: fixed;
  top: var(--o-header-height);
  left: var(--o-sidebar-width);
  right: 0;
  bottom: 0;
  z-index: 1;
  background: var(--o-bg);
}

.o-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: var(--o-bg);
}

/* Brand logo variants */
.o-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--o-radius-sm);
  background: linear-gradient(135deg, var(--o-brand) 0%, var(--o-brand-2) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.o-header-brand img {
  height: 34px;
  width: 34px;
  border-radius: var(--o-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.o-brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.o-brand-title small {
  font-size: 11px;
  font-weight: 500;
  color: var(--o-muted);
  letter-spacing: 0.2px;
}

.o-content {
  margin-left: var(--o-sidebar-width);
  margin-top: var(--o-header-height);
  min-height: calc(100vh - var(--o-header-height));
  padding: 24px 28px 48px;
  background: var(--o-bg);
  animation: oFadeIn 0.25s ease;
}

@keyframes oFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.o-fade-in { animation: oFadeIn 0.25s ease; }

/* Page header */
.o-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.o-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--o-text);
  line-height: 1.3;
  margin: 0;
  letter-spacing: 0;
}

.o-page-subtitle {
  font-size: 13px;
  color: var(--o-muted);
  margin-top: 4px;
}

.o-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--o-muted);
  margin-bottom: 16px;
}

.o-breadcrumb a {
  color: var(--o-muted);
  transition: color var(--o-transition);
}

.o-breadcrumb a:hover {
  color: var(--o-brand);
}

.o-breadcrumb .layui-icon,
.o-breadcrumb .o-breadcrumb-sep {
  font-size: 12px;
  color: var(--o-muted-2);
}

.o-breadcrumb .current {
  color: var(--o-text-2);
  font-weight: 500;
}

/* Cards */
.o-card {
  background: var(--o-surface);
  border-radius: var(--o-radius);
  border: none;
  box-shadow: var(--o-shadow-card);
  overflow: hidden;
}

.o-card-compact {
  padding: 16px;
}

.o-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--o-border);
  background: var(--o-surface);
  flex-wrap: wrap;
}

.o-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--o-text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.o-card-title i { color: var(--o-brand); font-size: 16px; }

.o-card-body { padding: 22px; }
.o-card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--o-border);
  background: var(--o-surface-2);
}

/* Toolbar inside card */
.o-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: var(--o-surface-2);
  border-bottom: 1px solid var(--o-border);
  flex-wrap: wrap;
  border-radius: var(--o-radius) var(--o-radius) 0 0;
}

.o-toolbar-left,
.o-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.o-toolbar-left {
  flex: 1 1 560px;
}

.o-toolbar-right {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.o-toolbar .layui-input,
.o-toolbar .layui-select {
  height: 34px;
  line-height: 34px;
  border-radius: var(--o-radius-sm);
  border: 1px solid var(--o-border-strong);
  background: var(--o-surface);
  box-shadow: inset 0 1px 2px rgba(15,23,42,0.03);
  transition: all var(--o-transition);
  font-size: 13px;
}

.o-toolbar .layui-input:focus,
.o-toolbar .layui-input:hover,
.o-toolbar .layui-select:hover {
  border-color: var(--o-brand-2);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.o-toolbar .layui-input {
  min-width: 260px;
  padding: 0 12px;
}

/* Buttons */
.o-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--o-radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--o-transition);
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
}

.o-btn-primary {
  background: var(--o-brand);
  color: #fff;
  border-color: var(--o-brand);
}

.o-btn-primary:hover {
  background: var(--o-brand-hover);
  border-color: var(--o-brand-hover);
  box-shadow: 0 4px 10px -3px rgba(37, 99, 235, 0.25);
}

.o-btn-secondary {
  background: var(--o-surface);
  color: var(--o-text-2);
  border-color: var(--o-border-strong);
}

.o-btn-secondary:hover {
  border-color: var(--o-brand-2);
  color: var(--o-brand);
  background: var(--o-brand-light);
}

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

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

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

.o-btn-success:hover {
  background: #059669;
  border-color: #059669;
}

.o-btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.o-btn-lg {
  height: 40px;
  padding: 0 22px;
  font-size: 14px;
}

.o-btn i { font-size: 14px; }

/* Table */
.o-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0;
  border: 1px solid var(--o-border);
  border-radius: var(--o-radius);
  background: var(--o-surface);
}

.o-table-wrap-clean {
  overflow-x: auto;
}

.o-table-wrap .layui-table {
  width: 100%;
  border: none;
  margin: 0;
  background: var(--o-surface);
}

.o-table-wrap .layui-table thead tr,
.o-table-wrap .layui-table thead th {
  background: var(--o-surface-3) !important;
}

.o-table-wrap .layui-table thead th {
  padding: 13px 16px;
  font-weight: 600;
  color: var(--o-text-2);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--o-border-strong);
  white-space: nowrap;
  text-align: left;
}

.o-table-wrap .layui-table tbody td {
  padding: 13px 16px;
  color: var(--o-text-2);
  font-size: 13px;
  border-bottom: 1px solid var(--o-border);
  transition: background var(--o-transition);
  vertical-align: middle;
}

.o-table-wrap .layui-table tbody tr:last-child td { border-bottom: none; }
.o-table-wrap .layui-table tbody tr:hover td { background: var(--o-surface-2) !important; }

.o-table-wrap .layui-table code {
  font-family: var(--o-mono);
  background: var(--o-surface-2);
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--o-text-2);
  border: 1px solid var(--o-border);
}

.o-table-wrap .layui-table .layui-icon { font-size: 14px; }

.o-table-fit {
  width: 100% !important;
  min-width: 960px !important;
  table-layout: auto;
}

.o-table-fit th,
.o-table-fit td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.o-table-dense thead th,
.o-table-wrap .o-table-dense thead th,
.layui-table.o-table-dense thead th {
  padding: 12px 10px !important;
  font-size: 12px !important;
  line-height: 1.35;
}

.o-table-dense tbody td,
.o-table-wrap .o-table-dense tbody td,
.layui-table.o-table-dense tbody td {
  padding: 12px 10px !important;
  font-size: 13px !important;
  line-height: 1.45;
}

.o-table-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.o-table-actions .o-btn-sm,
.o-table-actions .layui-btn-sm {
  min-width: 54px;
  padding: 0 9px;
}

.o-table-wrap .layui-table thead th:last-child,
.o-table-wrap .layui-table tbody td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--o-surface);
  box-shadow: -1px 0 0 var(--o-border);
}

.o-table-wrap .layui-table thead th:last-child {
  z-index: 3;
  background: var(--o-surface-3) !important;
}

.o-table-member {
  min-width: 1280px !important;
}

.o-table-member th:nth-child(1),
.o-table-member td:nth-child(1) {
  width: 56px;
}

.o-table-member th:nth-child(2),
.o-table-member td:nth-child(2),
.o-table-member th:nth-child(3),
.o-table-member td:nth-child(3) {
  min-width: 120px;
}

.o-table-member th:nth-child(4),
.o-table-member td:nth-child(4) {
  min-width: 110px;
}

.o-table-member th:nth-child(10),
.o-table-member td:nth-child(10) {
  min-width: 250px;
}

.o-table-member .o-table-actions {
  max-width: 250px;
}

.o-table-merchant {
  min-width: 1180px !important;
}

.o-table-merchant th:nth-child(1),
.o-table-merchant td:nth-child(1) {
  width: 64px;
}

.o-table-merchant th:nth-child(2),
.o-table-merchant td:nth-child(2) {
  width: 11%;
}

.o-table-merchant th:nth-child(3),
.o-table-merchant td:nth-child(3) {
  width: 18%;
}

.o-table-merchant th:nth-child(4),
.o-table-merchant td:nth-child(4) {
  width: 12%;
}

.o-table-merchant th:nth-child(5),
.o-table-merchant td:nth-child(5) {
  width: 13%;
}

.o-table-merchant th:nth-child(6),
.o-table-merchant td:nth-child(6) {
  width: 8%;
}

.o-table-merchant th:nth-child(7),
.o-table-merchant td:nth-child(7) {
  width: 9%;
}

.o-table-merchant th:nth-child(8),
.o-table-merchant td:nth-child(8) {
  width: 14%;
}

.o-table-merchant th:nth-child(9),
.o-table-merchant td:nth-child(9) {
  min-width: 150px;
}

.o-cell-main {
  color: var(--o-text);
  font-weight: 650;
  line-height: 1.45;
}

.o-meta-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--o-text-3);
  font-size: 12px;
  line-height: 1.45;
}

.o-meta-stack code {
  margin-left: 4px;
}

.o-invite-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
}

.o-access-summary {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--o-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--o-shadow-card);
}

.o-access-summary div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.o-access-summary span {
  color: var(--o-muted);
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
}

.o-access-summary strong {
  color: var(--o-text);
  font-size: 15px;
  line-height: 22px;
  font-weight: 800;
}

.o-widget-access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 18px;
  align-items: start;
}

.o-widget-access-main,
.o-widget-access-side {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.o-code-block {
  min-height: 58px;
  resize: none;
  border-color: var(--o-border);
  border-radius: 8px;
  background: #f8fafc;
  color: #1e293b;
  font-family: var(--o-mono);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.o-code-block-lg {
  min-height: 112px;
}

.o-check-list,
.o-keyval-list {
  display: grid;
  gap: 10px;
}

.o-check-item {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--o-border);
  border-radius: 8px;
  background: #fff;
}

.o-check-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.o-check-main strong {
  color: var(--o-text);
  font-size: 13.5px;
  line-height: 1.35;
}

.o-check-main span {
  color: var(--o-muted);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.o-keyval-list > div {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--o-border);
  border-radius: 8px;
  background: #f8fafc;
}

.o-keyval-list span {
  color: var(--o-muted);
  font-size: 12px;
  line-height: 1.3;
}

.o-keyval-list code {
  min-width: 0;
  color: var(--o-text);
  font-family: var(--o-mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .o-invite-grid {
    grid-template-columns: 1fr;
  }
  .o-widget-access-layout {
    grid-template-columns: 1fr;
  }
  .o-access-summary {
    align-items: stretch;
    flex-direction: column;
  }
  .o-access-summary .o-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  [data-o-merchant-invite] .o-merchant-password-card .layui-form-label {
    float: none;
    width: auto;
    display: block;
    padding: 0 0 7px;
    text-align: left;
  }

  [data-o-merchant-invite] .o-merchant-password-card .layui-input-block {
    margin-left: 0;
  }

  [data-o-merchant-invite] .o-merchant-password-card .layui-form-item {
    margin-bottom: 18px;
  }
}

/* Badges */
.o-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.o-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.o-badge-green { color: var(--o-success-text); background: var(--o-success-light); }
.o-badge-green::before { background: var(--o-success); }
.o-badge-gray { color: #475569; background: #f1f5f9; }
.o-badge-gray::before { background: #94a3b8; }
.o-badge-red { color: var(--o-danger-text); background: var(--o-danger-light); }
.o-badge-red::before { background: var(--o-danger); }
.o-badge-yellow { color: var(--o-warning-text); background: var(--o-warning-light); }
.o-badge-yellow::before { background: var(--o-warning); }
.o-badge-blue { color: var(--o-info-text); background: var(--o-info-light); }
.o-badge-blue::before { background: var(--o-info); }

/* Text utilities */
.o-text-muted { color: var(--o-muted); }
.o-text-brand { color: var(--o-brand); }
.o-text-danger { color: var(--o-danger); }
.o-text-success { color: var(--o-success); }
.o-font-mono { font-family: var(--o-mono); }

.o-flex { display: flex; }
.o-flex-center { display: flex; align-items: center; }
.o-flex-between { display: flex; align-items: center; justify-content: space-between; }
.o-gap-4 { gap: 4px; }
.o-gap-6 { gap: 6px; }
.o-gap-8 { gap: 8px; }
.o-gap-12 { gap: 12px; }
.o-wrap { flex-wrap: wrap; }

.o-mb-16 { margin-bottom: 16px; }
.o-mb-20 { margin-bottom: 20px; }
.o-mt-6 { margin-top: 6px; }
.o-mt-16 { margin-top: 16px; }
.o-mt-20 { margin-top: 20px; }

/* Pagination */
.o-pagination .layui-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.o-pagination .layui-laypage a,
.o-pagination .layui-laypage span {
  height: 32px;
  line-height: 32px;
  padding: 0 12px;
  border-radius: var(--o-radius-sm);
  border: 1px solid var(--o-border);
  background: var(--o-surface);
  color: var(--o-text-2);
  font-size: 13px;
  transition: all var(--o-transition);
}

.o-pagination .layui-laypage a:hover {
  border-color: var(--o-brand-2);
  color: var(--o-brand);
  background: var(--o-brand-light);
}

.o-pagination .layui-laypage .layui-laypage-curr {
  background: var(--o-brand);
  border-color: var(--o-brand);
  color: #fff;
  font-weight: 600;
}

/* Login */
.o-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 20px;
}

.o-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--o-surface);
  border-radius: var(--o-radius-lg);
  box-shadow: var(--o-shadow-lg);
  padding: 40px;
}

.o-login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.o-login-logo img {
  height: 56px;
  width: 56px;
  border-radius: var(--o-radius);
  margin-bottom: 12px;
}

.o-login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--o-text);
}

.o-login-subtitle {
  font-size: 13px;
  color: var(--o-muted);
  margin-top: 4px;
}

.o-login-form .layui-form-item {
  margin-bottom: 18px;
}

.o-login-form .layui-input {
  height: 46px;
  border-radius: var(--o-radius-sm);
  border: 1px solid var(--o-border-strong);
  padding: 0 14px;
  font-size: 14px;
  transition: all var(--o-transition);
}

.o-login-form .layui-input:focus {
  border-color: var(--o-brand);
  box-shadow: 0 0 0 3px var(--o-brand-light);
}

.o-login-form .o-btn-primary {
  width: 100%;
  height: 46px;
  font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .o-sidebar { width: var(--o-sidebar-collapsed); padding: 12px 0; }
  .o-sidebar .o-sidebar-item > a span,
  .o-sidebar .o-sidebar-group > a span,
  .o-sidebar .o-sidebar-group > a .arrow { display: none; }
  .o-sidebar-submenu { display: none !important; }
  .o-content { margin-left: var(--o-sidebar-collapsed); padding: 16px; }
  .o-page-header { flex-direction: column; align-items: flex-start; }
}

/* Inner content for iframe sub-pages (no sidebar margins) */
.o-content-inner {
  min-height: 100vh;
  padding: 24px 28px 48px;
  background: var(--o-bg);
  animation: oFadeIn 0.25s ease;
}

/* Utility: hide extra breadcrumb layer */
.o-content-inner > .o-breadcrumb:first-child,
.o-content > .o-breadcrumb:first-child { margin-top: 0; }


/* Stat Cards */
.o-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.o-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--o-surface);
  border-radius: var(--o-radius);
  box-shadow: var(--o-shadow-card);
  transition: box-shadow 150ms ease;
}

.o-stat-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--o-radius-sm);
  font-size: 22px;
}

.o-stat-icon.blue { background: var(--o-info-light); color: var(--o-info); }
.o-stat-icon.green { background: var(--o-success-light); color: var(--o-success); }
.o-stat-icon.orange { background: var(--o-warning-light); color: var(--o-warning); }
.o-stat-icon.purple { background: #ede9fe; color: #7c3aed; }

.o-stat-label {
  font-size: 13px;
  color: var(--o-muted);
  line-height: 1.3;
}

.o-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--o-text);
  line-height: 1.2;
  margin-top: 2px;
  letter-spacing: 0;
}

.o-stat-meta {
  font-size: 11px;
  color: var(--o-muted-2);
  margin-top: 2px;
}

/* Clickable stat cards */
.o-stat-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.o-stat-card-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--o-shadow-lg);
}
.o-stat-card-link:active {
  transform: translateY(0);
}

/* Additional utilities */
.o-mr-16 { margin-right: 16px; }
.o-text-sm { font-size: 12px; }
.o-card-body.nopad { padding: 0; }

/* Chat Maintenance page (admin-* prefix, isolated to this page) */
.admin-page-shell { padding: 0 0 40px; }

.admin-page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--o-text);
  line-height: 1.3;
  margin: 0 0 4px;
}

.admin-page-desc {
  font-size: 13px;
  color: var(--o-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 600px;
}

.admin-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .admin-stat-grid { grid-template-columns: 1fr; }
}

.admin-stat-card {
  background: var(--o-surface);
  border: 1px solid var(--o-border);
  border-radius: var(--o-radius);
  padding: 18px;
}

.admin-stat-label {
  font-size: 13px;
  color: var(--o-muted);
  margin-bottom: 8px;
}

.admin-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--o-text);
}

.admin-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .admin-section-grid { grid-template-columns: 1fr; }
}

.admin-card {
  background: var(--o-surface);
  border: 1px solid var(--o-border);
  border-radius: var(--o-radius);
  padding: 18px;
}

.admin-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--o-text);
  margin: 0 0 4px;
}

.admin-card-desc {
  font-size: 13px;
  color: var(--o-muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-field-label {
  font-size: 13px;
  color: var(--o-text-2);
  margin-right: 6px;
}

.admin-help-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-help-box {
  font-size: 13px;
  color: var(--o-muted);
  line-height: 1.6;
  padding: 10px 14px;
  background: var(--o-surface-2);
  border-radius: var(--o-radius-sm);
}

.admin-help-box strong {
  color: var(--o-text-2);
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.admin-danger-card {
  border-color: var(--o-danger);
  border-width: 2px;
}

.admin-danger-card .admin-card-title {
  color: var(--o-danger);
}

.admin-danger-copy {
  font-size: 13px;
  color: var(--o-text-2);
  line-height: 1.6;
  margin: 0 0 12px;
}

.admin-danger-copy strong {
  color: var(--o-danger);
}

.admin-danger-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-table-card {
  background: var(--o-surface);
  border: 1px solid var(--o-border);
  border-radius: var(--o-radius);
  overflow: hidden;
}

.admin-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 0;
}

.admin-table-head .admin-card-title {
  margin-bottom: 2px;
}

.admin-table-head .admin-card-desc {
  margin-bottom: 14px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table-wrap .layui-table {
  width: 100%;
  border: none;
  margin: 0;
}

.admin-table-wrap .layui-table thead th {
  background: var(--o-surface-3);
  font-weight: 600;
  color: var(--o-text-2);
  font-size: 12.5px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--o-border-strong);
}

.admin-table-wrap .layui-table tbody td {
  padding: 13px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--o-border);
}

.admin-table-wrap .layui-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-strong {
  font-weight: 600;
  color: var(--o-text);
}

.admin-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--o-muted);
  background: var(--o-surface-2);
}

/* OAIM Console Unified UI v6
   Final override layer shared by super admin and merchant admin. */
:root {
  --o-bg: #f4f7fb;
  --o-surface: #ffffff;
  --o-surface-2: #f8fafc;
  --o-surface-3: #f1f5f9;
  --o-text: #111827;
  --o-text-2: #334155;
  --o-muted: #64748b;
  --o-muted-2: #94a3b8;
  --o-border: #e5eaf2;
  --o-border-strong: #cbd5e1;
  --o-brand: #2563eb;
  --o-brand-2: #3b82f6;
  --o-brand-hover: #1d4ed8;
  --o-brand-light: #eff6ff;
  --o-sidebar: #111827;
  --o-sidebar-2: #172033;
  --o-sidebar-hover: #1f2937;
  --o-sidebar-text: #cbd5e1;
  --o-sidebar-text-active: #ffffff;
  --o-sidebar-muted: #94a3b8;
  --o-radius: 10px;
  --o-radius-sm: 8px;
  --o-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  --o-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.04);
  --o-header-height: 64px;
  --o-sidebar-width: 232px;
  --o-transition: 150ms ease;
}

html, body {
  background: var(--o-bg);
  color: var(--o-text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

.o-admin-shell,
.o-layout-admin {
  min-height: 100vh;
  background: var(--o-bg);
}

.o-header {
  height: var(--o-header-height);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--o-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 0 24px;
}

.o-header-brand {
  gap: 12px;
  color: var(--o-text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.o-brand-mark,
.login-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #2563eb;
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
}

.o-header-brand img,
.login-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--o-border);
  padding: 3px;
}

.o-brand-title {
  gap: 2px;
  line-height: 1.2;
}

.o-brand-title small {
  color: var(--o-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.o-header-right {
  gap: 8px;
}

.o-header-btn {
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--o-border);
  border-radius: 999px;
  color: var(--o-text-2);
  background: #fff;
}

.o-header-btn:hover {
  color: var(--o-brand);
  background: var(--o-brand-light);
  border-color: #bfdbfe;
}

.o-sidebar {
  top: var(--o-header-height);
  width: var(--o-sidebar-width);
  background: var(--o-sidebar);
  border-right: 0;
  padding: 14px 10px;
}

.o-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.o-sidebar-item > a,
.o-sidebar-group > a {
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--o-sidebar-text);
  font-size: 14px;
  font-weight: 600;
}

.o-sidebar-item > a:hover,
.o-sidebar-group > a:hover {
  background: var(--o-sidebar-hover);
  color: var(--o-sidebar-text-active);
}

.o-sidebar-item > a i,
.o-sidebar-group > a i {
  width: 22px;
  color: #93c5fd;
}

.o-sidebar-item.active > a,
.o-sidebar-item.layui-this > a,
.o-sidebar-group.active > a,
.o-sidebar-group.layui-this > a,
.o-sidebar-item > a.this,
.o-sidebar-group > a.this {
  background: #1d4ed8;
  color: #fff;
}

.o-sidebar-item.active > a i,
.o-sidebar-group.active > a i,
.o-sidebar-item.layui-this > a i,
.o-sidebar-group.layui-this > a i {
  color: #fff;
}

.o-sidebar-item.active > a::before,
.o-sidebar-item.layui-this > a::before,
.o-sidebar-group.active > a::before,
.o-sidebar-group.layui-this > a::before,
.o-sidebar-item > a.this::before,
.o-sidebar-group > a.this::before {
  display: none;
}

.o-sidebar-submenu {
  padding: 4px 0 8px 34px;
}

.o-sidebar-submenu li a {
  margin: 0;
  padding: 8px 10px;
  color: var(--o-sidebar-muted);
  border-radius: 8px;
}

.o-sidebar-submenu li a:hover {
  color: #fff;
  background: var(--o-sidebar-hover);
}

.o-sidebar-submenu li.active a,
.o-sidebar-submenu li.layui-this a,
.o-sidebar-submenu li a.this {
  color: #fff;
  background: rgba(37, 99, 235, 0.35);
}

.o-body {
  top: var(--o-header-height);
  left: var(--o-sidebar-width);
  background: var(--o-bg);
}

.o-body iframe {
  background: var(--o-bg);
}

.o-content-inner {
  min-height: 100vh;
  padding: 22px 24px 42px;
  background: var(--o-bg);
}

.o-breadcrumb {
  min-height: 42px;
  margin: -2px 0 18px;
  padding: 0 4px;
  color: var(--o-muted);
}

.o-breadcrumb a,
.o-breadcrumb .current {
  color: var(--o-muted);
}

.o-breadcrumb .current {
  color: var(--o-text);
  font-weight: 700;
}

.o-page-header,
.admin-page-hero {
  align-items: center;
  margin-bottom: 18px;
}

.o-page-title,
.admin-page-title {
  font-size: 24px;
  color: var(--o-text);
  letter-spacing: 0;
}

.o-page-subtitle,
.admin-page-desc,
.admin-card-desc {
  color: var(--o-muted);
  font-size: 14px;
}

.o-card,
.layui-card,
.admin-card,
.admin-table-card,
.admin-stat-card,
.o-stat-card {
  background: var(--o-surface);
  border: 1px solid var(--o-border);
  border-radius: 12px;
  box-shadow: var(--o-shadow-card);
}

.o-card,
.layui-card,
.admin-table-card {
  overflow: hidden;
}

.o-card-header,
.layui-card-header {
  min-height: 58px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--o-border);
  background: #fff;
  color: var(--o-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

.layui-card-body,
.o-card-body,
.admin-card {
  padding: 20px;
}

.o-card-body.nopad {
  padding: 0;
}

.o-toolbar {
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid var(--o-border);
}

.o-stat-grid,
.admin-stat-grid {
  gap: 16px;
}

.o-stat-card,
.admin-stat-card {
  min-height: 108px;
  padding: 20px;
  box-shadow: var(--o-shadow-card);
}

.o-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.o-stat-label,
.admin-stat-label {
  color: var(--o-muted);
  font-size: 13px;
  font-weight: 700;
}

.o-stat-value,
.admin-stat-value {
  color: var(--o-text);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
}

.layui-input,
.layui-textarea,
.layui-select,
.layui-form-select .layui-input,
.o-toolbar .layui-input,
.o-toolbar .layui-select {
  min-height: 38px;
  border: 1px solid var(--o-border-strong);
  border-radius: 9px;
  color: var(--o-text);
  background: #fff;
  box-shadow: none;
}

.layui-input:hover,
.layui-textarea:hover,
.layui-input:focus,
.layui-textarea:focus {
  border-color: var(--o-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.layui-form-label {
  color: var(--o-text-2);
  font-weight: 700;
  width: 98px;
  padding: 9px 14px 9px 0;
  white-space: nowrap;
}

.layui-input-block {
  min-height: 38px;
  margin-left: 118px;
}

.layui-fluid {
  padding: 0 !important;
}

.layui-fluid > .layui-card,
.layui-fluid > .layui-form,
.o-content-inner > .layui-card,
.o-content-inner > .layui-form {
  max-width: 920px;
}

.o-content-inner > .layui-form.o-page-form-full {
  max-width: none;
}

.layui-fluid > form.layui-form {
  max-width: none;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--o-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--o-shadow-card);
}

.layui-fluid > div[style*="margin-top:10px"],
.layui-fluid > div[style*="margin-top: 10px"] {
  margin-top: 0 !important;
  border: 1px solid var(--o-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--o-shadow-card);
  overflow: auto;
}

.layui-fluid > div[style*="margin-top:15px"],
.layui-fluid > div[style*="margin-top: 15px"] {
  margin-top: 16px !important;
}

.layui-fluid > div[style*="margin-top:10px"] > p,
.layui-fluid > div[style*="margin-top: 10px"] > p {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--o-border);
}

.layui-fluid > div[style*="margin-top:10px"] > .layui-table,
.layui-fluid > div[style*="margin-top: 10px"] > .layui-table {
  margin: 0;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 !important;
  color: var(--o-text-2);
  font-size: 14px;
  font-weight: 600;
}

.search-bar .layui-input {
  width: 250px;
  max-width: 100%;
}

.search-bar .layui-form-select {
  width: 190px;
  max-width: 100%;
}

.status-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1;
}

.status-normal { background: #dcfce7 !important; color: #15803d !important; }
.status-disabled,
.status-default { background: #f1f5f9 !important; color: #64748b !important; }
.status-danger { background: #fee2e2 !important; color: #b91c1c !important; }
.status-warning { background: #fef3c7 !important; color: #b45309 !important; }
.status-primary { background: #dbeafe !important; color: #1d4ed8 !important; }

.layui-table img {
  max-width: 92px;
  max-height: 68px;
  border-radius: 8px;
  object-fit: cover;
  vertical-align: middle;
}

.layui-table audio {
  width: 160px;
  height: 32px;
  vertical-align: middle;
}

.layui-table video {
  width: 220px;
  max-width: 100%;
  height: auto;
  max-height: 150px;
  border-radius: 10px;
  background: #0f172a;
  vertical-align: middle;
}

.layui-form-item {
  margin-bottom: 18px;
}

.layui-input-inline {
  width: 260px;
  max-width: 100%;
}

.layui-elem-quote {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-left: 0;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
  font-size: 13px;
  line-height: 1.7;
}

.layui-badge,
.layui-badge-rim {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 0;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.layui-badge-blue {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

.layui-badge-green {
  background: #dcfce7 !important;
  color: #15803d !important;
}

.layui-badge-red {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.layui-btn,
.o-btn {
  min-height: 36px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
  box-shadow: none;
}

.layui-btn,
.layui-btn-normal,
.o-btn-primary {
  background: var(--o-brand);
  border-color: var(--o-brand);
  color: #fff;
}

.layui-btn:hover,
.layui-btn-normal:hover,
.o-btn-primary:hover {
  background: var(--o-brand-hover);
  border-color: var(--o-brand-hover);
  color: #fff;
}

.layui-btn-primary,
.o-btn-secondary {
  background: #fff;
  border: 1px solid var(--o-border-strong);
  color: var(--o-text-2);
}

.layui-btn-primary:hover,
.o-btn-secondary:hover {
  background: var(--o-brand-light);
  border-color: #bfdbfe;
  color: var(--o-brand);
}

.layui-btn-danger,
.o-btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.layui-btn-danger:hover,
.o-btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.layui-btn-warm {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

.layui-btn-sm,
.o-btn-sm {
  min-height: 30px;
  height: 30px;
  line-height: 30px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 650;
}

.o-table-wrap,
.admin-table-wrap {
  border-radius: var(--o-radius);
}

.layui-table {
  color: var(--o-text-2);
  background: #fff;
  margin: 0;
}

.layui-table thead tr,
.layui-table thead th,
.o-table-wrap .layui-table thead tr,
.o-table-wrap .layui-table thead th,
.admin-table-wrap .layui-table thead th {
  background: #f8fafc !important;
}

.layui-table thead th,
.o-table-wrap .layui-table thead th,
.admin-table-wrap .layui-table thead th {
  padding: 14px 16px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  border-color: var(--o-border);
}

.layui-table tbody td,
.o-table-wrap .layui-table tbody td,
.admin-table-wrap .layui-table tbody td {
  padding: 14px 16px;
  color: var(--o-text-2);
  font-size: 14px;
  border-color: var(--o-border);
}

.layui-table tbody tr:hover td,
.o-table-wrap .layui-table tbody tr:hover td,
.admin-table-wrap .layui-table tbody tr:hover td {
  background: #f8fafc !important;
}

.o-table-wrap .layui-table tbody tr:hover td:last-child {
  background: #f8fafc !important;
}

code,
.o-table-wrap .layui-table code {
  font-family: "SF Mono", Consolas, monospace;
  background: #f1f5f9;
  border: 1px solid var(--o-border);
  color: #1d4ed8;
  padding: 3px 8px;
  border-radius: 7px;
}

.o-badge {
  height: 24px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 999px;
}

.o-badge-blue {
  color: #1d4ed8;
  background: #dbeafe;
}

.admin-danger-card {
  border-color: #fecaca;
  background: #fff;
}

.admin-danger-card .admin-card-title,
.admin-danger-copy strong {
  color: #dc2626;
}

.layui-layer {
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18) !important;
}

.layui-layer-title {
  background: #fff !important;
  color: var(--o-text) !important;
  border-bottom: 1px solid var(--o-border) !important;
  font-weight: 800 !important;
}

.layui-layer-dialog .layui-layer-content {
  color: var(--o-text-2);
  font-size: 14px;
  line-height: 1.7;
}

body .layui-layer-page {
  max-width: calc(100vw - 24px) !important;
}

body .layui-layer-page .layui-layer-content {
  max-height: calc(100vh - 118px);
  overflow: auto;
}

body .layui-layer-iframe {
  max-width: calc(100vw - 24px) !important;
}

body .layui-layer-iframe .layui-layer-content {
  max-height: calc(100vh - 64px);
}

body .layui-layer-msg {
  min-width: 172px !important;
  max-width: min(360px, calc(100vw - 32px)) !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  color: var(--o-text-1) !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18) !important;
  overflow: hidden !important;
}

body .layui-layer-msg .layui-layer-content {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  min-height: 48px !important;
  padding: 11px 18px 11px 54px !important;
  color: var(--o-text-1) !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  box-sizing: border-box !important;
}

body .layui-layer-msg .layui-layer-content .layui-layer-ico {
  position: absolute !important;
  left: 16px !important;
  top: 50% !important;
  width: 28px !important;
  height: 28px !important;
  margin-top: -14px !important;
  border-radius: 999px !important;
  background-image: none !important;
  background-color: #ecfdf5 !important;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.22) !important;
}

body .layui-layer-msg .layui-layer-content .layui-layer-ico::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 7px;
  width: 10px;
  height: 6px;
  border-left: 3px solid #10b981;
  border-bottom: 3px solid #10b981;
  transform: rotate(-45deg);
  border-radius: 1px;
}

body .layui-layer-msg .layui-layer-content .layui-layer-ico2 {
  background-color: #fef2f2 !important;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.22) !important;
}

body .layui-layer-msg .layui-layer-content .layui-layer-ico2::before,
body .layui-layer-msg .layui-layer-content .layui-layer-ico2::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 13px;
  width: 12px;
  height: 3px;
  border-radius: 999px;
  background: #ef4444;
  transform: rotate(45deg);
}

body .layui-layer-msg .layui-layer-content .layui-layer-ico2::after {
  transform: rotate(-45deg);
}

/* Unified pagination: ThinkPHP render(), Bootstrap-like pagination and Layui laypage. */
.o-pagination {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin: 16px 0 0;
}

.o-pagination:empty {
  display: none;
  margin: 0;
}

.o-pagination > nav {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.pagination,
.o-pagination .pagination,
.layui-laypage {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.o-card-footer .pagination,
.o-card-footer .layui-laypage,
.o-pagination .pagination,
.o-pagination .layui-laypage {
  margin: 0;
}

.pagination li,
.pagination .page-item {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.pagination li a,
.pagination li span,
.pagination .page-link,
.layui-laypage a,
.layui-laypage span,
.layui-laypage input,
.layui-laypage button {
  min-width: 34px;
  height: 34px;
  line-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--o-border);
  border-radius: 9px;
  background: #fff;
  color: var(--o-text-2);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: none;
  transition: border-color var(--o-transition), background var(--o-transition), color var(--o-transition);
}

.pagination li a:hover,
.pagination .page-link:hover,
.layui-laypage a:hover,
.layui-laypage button:hover {
  border-color: #bfdbfe;
  background: var(--o-brand-light);
  color: var(--o-brand);
}

.pagination .active span,
.pagination .active a,
.pagination li.active span,
.pagination li.active a,
.pagination .page-item.active .page-link,
.layui-laypage .layui-laypage-curr,
.layui-laypage .layui-laypage-curr em,
.layui-laypage .layui-laypage-curr .layui-laypage-em {
  background: var(--o-brand) !important;
  border-color: var(--o-brand) !important;
  color: #fff !important;
  font-style: normal;
}

.layui-laypage .layui-laypage-curr .layui-laypage-em {
  border-radius: 9px;
}

.pagination .disabled span,
.pagination .disabled a,
.pagination li.disabled span,
.pagination li.disabled a,
.pagination .page-item.disabled .page-link {
  cursor: not-allowed;
  color: var(--o-muted-2);
  background: #f8fafc;
  border-color: var(--o-border);
}

.pagination li:first-child a,
.pagination li:first-child span,
.pagination li:last-child a,
.pagination li:last-child span {
  min-width: 62px;
}

.o-card > .o-table-wrap {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.o-card > .o-table-wrap:first-child {
  border-top: 0;
}

.o-card > .o-table-wrap:last-child {
  border-bottom: 0;
}

.o-card-footer .o-pagination {
  margin: 0;
}

.o-card-footer {
  min-height: 54px;
}

@media (max-width: 640px) {
  .o-table-wrap .layui-table thead th:last-child,
  .o-table-wrap .layui-table tbody td:last-child {
    position: static;
    box-shadow: none;
  }

  .o-pagination,
  .o-pagination > nav,
  .pagination,
  .layui-laypage {
    justify-content: center;
  }

  .pagination li a,
  .pagination li span,
  .pagination .page-link,
  .layui-laypage a,
  .layui-laypage span,
  .layui-laypage input,
  .layui-laypage button {
    min-width: 32px;
    height: 32px;
    line-height: 30px;
    padding: 0 10px;
  }
}

.o-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.o-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.o-help-text,
.layui-form-mid.layui-word-aux {
  color: var(--o-muted);
  font-size: 13px;
  line-height: 1.6;
}

.o-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 13px;
  line-height: 1.7;
}

.o-info-panel {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--o-border);
  border-radius: 12px;
  background: #f8fafc;
}

.o-info-panel-title {
  display: block;
  margin-bottom: 5px;
  color: var(--o-text);
  font-size: 14px;
  font-weight: 800;
}

.o-info-panel-desc {
  color: var(--o-muted);
  font-size: 13px;
  line-height: 1.6;
}

.o-empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--o-muted);
  font-size: 14px;
  background: #f8fafc;
}

.o-page-narrow {
  max-width: 860px;
}

.o-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.o-copy-row .layui-input {
  flex: 1;
  min-width: 0;
}

.o-search-input {
  width: 260px;
  max-width: 100%;
}

.o-select-md {
  width: 190px;
  max-width: 100%;
}

.o-date-input {
  width: 132px !important;
  max-width: 100%;
}

.o-table-zero {
  margin: 0 !important;
}

.o-stat-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.o-table-empty {
  height: 52px;
  color: var(--o-muted) !important;
  text-align: center;
}

.o-layer-form {
  padding: 22px 24px 10px;
  background: #fff;
}

.o-content-inner > .o-layer-form {
  max-width: 980px;
  margin: 0;
  padding: 22px 24px 18px;
  border: 1px solid var(--o-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--o-shadow-card);
}

.o-layer-form .layui-form {
  max-width: none;
}

.o-layer-form .layui-form-item:last-child {
  margin-bottom: 4px;
}

.o-layer-form .layui-form-label {
  width: 118px;
}

.o-layer-form .layui-input-block {
  margin-left: 138px;
}

.o-layer-form textarea.layui-textarea {
  min-height: 88px;
  resize: vertical;
}

.o-media-thumb {
  display: inline-block;
  width: 76px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--o-border);
  background: #f8fafc;
  vertical-align: middle;
}

.o-media-audio {
  width: 180px;
  max-width: 100%;
  height: 34px;
  vertical-align: middle;
}

.o-media-video {
  display: block;
  width: 220px;
  max-width: 100%;
  max-height: 150px;
  border-radius: 10px;
  background: #0f172a;
  object-fit: contain;
}

.o-info-label {
  width: 140px;
  white-space: nowrap;
}

.o-detail-list {
  display: grid;
  gap: 0;
}

.o-detail-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid var(--o-border);
}

.o-detail-row:last-child {
  border-bottom: 0;
}

.o-detail-row span {
  color: var(--o-muted);
  font-size: 13px;
  white-space: nowrap;
}

.o-detail-row strong {
  min-width: 0;
  color: var(--o-text);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.o-breadcrumb-refresh {
  margin-left: 12px;
  color: var(--o-muted-2) !important;
}

.o-breadcrumb-refresh:hover {
  color: var(--o-brand) !important;
}

.o-code-display {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.o-status-muted {
  color: var(--o-muted);
  font-size: 13px;
  font-weight: 600;
}

.form-builder-page,
.config-tab-content {
  padding: 20px;
}

.form-builder-page {
  min-height: 100vh;
  background: var(--o-bg);
}

.form-builder-page button {
  width: auto !important;
}

.form-builder-page .form-create,
.config-tab-content .form-create {
  max-width: 980px;
  margin-top: 0 !important;
  padding: 18px 20px;
  border: 1px solid var(--o-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--o-shadow-card);
}

.ivu-modal {
  top: 20px;
}

.ivu-modal .ivu-modal-body {
  padding: 10px;
}

.ivu-modal .ivu-modal-body .ivu-modal-confirm-head {
  padding: 0 0 10px 0;
}

.ivu-modal .ivu-modal-body .ivu-modal-confirm-footer,
.ivu-modal-footer {
  display: none;
  padding-bottom: 10px;
}

.ivu-date-picker {
  display: inline-block;
  width: 280px;
  line-height: normal;
}

.ivu-poptip-popper {
  text-align: left;
}

.ivu-icon {
  padding-left: 5px;
}

.form-create .ivu-form-item-label {
  width: 170px !important;
  padding-right: 14px !important;
  color: var(--o-text-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.form-create .ivu-form-item-content {
  margin-left: 170px !important;
}

.form-create .ivu-input,
.form-create .ivu-input-number,
.form-create .ivu-select {
  max-width: 620px;
}

.form-create textarea.ivu-input {
  min-height: 112px;
}

.form-create .ivu-upload,
.form-create .fc-upload,
.form-create .fc-files {
  max-width: 620px;
}

.form-create .ivu-form-item:last-child .ivu-form-item-content {
  display: flex;
  justify-content: flex-start;
}

.form-create .ivu-btn-long,
.ivu-btn-long {
  width: 156px !important;
  min-width: 156px;
  margin-left: 0 !important;
  border-radius: 9px;
  font-weight: 800;
}

.ivu-col-span-24 .ivu-col-span-24 {
  text-align: center;
}

.config-tab-bar {
  display: flex;
  gap: 10px;
  padding: 16px 20px 0;
  border-bottom: 1px solid var(--o-border);
  background: #fff;
}

.config-tab-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: var(--o-muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.config-tab-bar a:hover {
  color: var(--o-brand);
  background: var(--o-brand-light);
}

.config-tab-bar a.active {
  color: var(--o-brand);
  background: var(--o-bg);
  border-color: var(--o-border);
}

@media (max-width: 760px) {
  .o-form-grid,
  .invite-grid {
    grid-template-columns: 1fr !important;
  }

  .o-copy-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
  background: var(--o-bg) !important;
  color: var(--o-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.login-page-inner {
  width: 100%;
  max-width: 380px;
}

.login-panel,
.o-login-card {
  width: 100%;
  max-width: 380px;
  padding: 30px;
  background: #fff;
  border-radius: 16px !important;
  border: 1px solid var(--o-border) !important;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10) !important;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.login-brand h1 {
  margin: 0;
  color: var(--o-text);
  font-size: 21px;
  line-height: 1.25;
  font-weight: 850;
}

.login-brand .sub {
  margin-top: 4px;
  color: var(--o-muted);
  font-size: 13px;
  line-height: 1.4;
}

.login-form-item {
  margin-bottom: 16px;
}

.login-form-item label {
  display: block;
  margin-bottom: 7px;
  color: var(--o-text-2);
  font-size: 13px;
  font-weight: 750;
}

.login-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--o-border-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--o-text);
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: border-color var(--o-transition), box-shadow var(--o-transition);
}

.login-input:focus {
  border-color: var(--o-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-submit {
  width: 100%;
  height: 42px;
  border: 1px solid var(--o-brand);
  border-radius: 9px;
  background: var(--o-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.login-submit:hover {
  background: var(--o-brand-hover);
  border-color: var(--o-brand-hover);
}

.login-tips {
  margin-top: 14px;
  color: var(--o-muted-2);
  font-size: 12px;
  text-align: center;
}

.legacy-login-wrapper {
  min-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.legacy-login-title {
  color: var(--o-text);
  font-size: 24px;
  font-weight: 850;
}

.legacy-login-box {
  width: 420px;
  max-width: 100%;
  padding: 30px;
  border: 1px solid var(--o-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
}

.legacy-login-captcha {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legacy-login-captcha input {
  width: 150px !important;
}

.legacy-captcha-img {
  width: 110px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--o-border);
  cursor: pointer;
}

.legacy-captcha-link {
  color: var(--o-brand);
  font-size: 12px;
}

.legacy-login-submit {
  width: 100%;
}

.legacy-login-footer {
  color: var(--o-muted);
  font-size: 13px;
}

.error-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--o-bg);
  color: var(--o-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.error-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--o-brand-light);
  color: var(--o-brand);
  font-size: 38px;
}

.error-desc {
  margin: 0 0 18px;
  color: var(--o-text-2);
  font-size: 16px;
  font-weight: 700;
}

.error-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 18px;
  border-radius: 9px;
  background: var(--o-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.error-link:hover {
  background: var(--o-brand-hover);
  color: #fff;
}

@media (max-width: 900px) {
  :root {
    --o-sidebar-width: 72px;
  }

  .o-sidebar {
    width: var(--o-sidebar-width);
    padding: 12px 8px;
  }

  .o-sidebar .o-sidebar-item > a span,
  .o-sidebar .o-sidebar-group > a span,
  .o-sidebar .o-sidebar-group > a .arrow {
    display: none;
  }

  .o-sidebar-submenu {
    display: none !important;
  }

  .o-body {
    left: var(--o-sidebar-width);
  }

  .o-header-right .o-header-btn {
    padding: 0 10px;
  }

  .o-header-right .o-header-btn:not(:first-child) {
    display: none;
  }
}

/* OAIM Console Unified UI v8
   Final authoritative layer: keep super admin and merchant admin visually aligned. */
:root {
  --o-bg: #f3f6fb;
  --o-surface: #ffffff;
  --o-surface-2: #f8fafc;
  --o-surface-3: #f6f8fb;
  --o-text: #111827;
  --o-text-2: #334155;
  --o-muted: #64748b;
  --o-border: #e2e8f0;
  --o-border-strong: #cbd5e1;
  --o-brand: #2563eb;
  --o-brand-hover: #1d4ed8;
  --o-brand-light: #eff6ff;
  --o-danger: #ef4444;
  --o-danger-light: #fef2f2;
  --o-danger-text: #b91c1c;
  --o-warning: #f59e0b;
  --o-warning-hover: #d97706;
  --o-radius: 10px;
  --o-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.035);
}

.o-content-inner {
  padding: 24px 28px 48px;
}

.o-page-header {
  min-height: 54px;
  align-items: center;
  margin-bottom: 20px;
}

.o-page-title {
  font-size: 24px;
  font-weight: 850;
  line-height: 1.25;
}

.o-page-subtitle {
  margin-top: 5px;
  color: var(--o-muted);
  font-size: 14px;
  line-height: 1.55;
}

.o-card {
  border: 1px solid var(--o-border);
  border-radius: 12px;
  box-shadow: var(--o-shadow-card);
  background: var(--o-surface);
}

.o-card-header {
  min-height: 58px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--o-border);
}

.o-card-title {
  color: var(--o-text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
}

.o-card-title > i.layui-icon {
  display: none;
}

.o-card-body {
  padding: 20px;
}

.o-toolbar {
  align-items: center;
  padding: 16px 20px;
  background: #fff;
}

.o-toolbar-inline {
  padding: 0;
  border: 0;
  border-radius: 0;
}

.o-toolbar-left,
.o-toolbar-right {
  min-width: 0;
}

.o-toolbar-left {
  flex: 1 1 auto;
}

.o-toolbar-right {
  margin-left: auto;
}

.o-form-label-inline {
  display: inline-flex;
  align-items: center;
  height: 38px;
  color: var(--o-text-2);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.o-search-input {
  width: 360px;
  max-width: min(100%, 520px);
}

.o-select-md {
  width: 210px;
}

.o-select-field {
  width: 210px;
  max-width: 100%;
}

.o-select-field .layui-form-select,
.o-select-field .layui-form-select .layui-input {
  width: 100% !important;
  min-width: 0 !important;
}

.o-btn,
.layui-btn {
  min-height: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 750;
}

.o-btn-sm,
.layui-btn-sm {
  min-height: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}

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

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

.o-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--o-border);
  border-radius: 12px;
  background: #fff;
}

.o-card > .o-table-wrap {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.o-card > .o-table-wrap:last-child {
  border-bottom: 0;
}

.o-table-wrap .layui-table,
.layui-table.o-table-fit {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.layui-table.o-table-fit {
  min-width: 0 !important;
}

.layui-table.o-table-member {
  min-width: 1120px !important;
}

.layui-table.o-table-merchant {
  min-width: 1040px !important;
}

.o-table-wrap .layui-table thead th,
.o-table-wrap .layui-table tbody td {
  padding: 13px 14px !important;
  border-color: var(--o-border) !important;
  vertical-align: middle;
}

.o-table-wrap .layui-table thead th {
  color: #475569;
  font-size: 13px !important;
  font-weight: 850;
  background: var(--o-surface-3) !important;
}

.o-table-wrap .layui-table tbody td {
  color: var(--o-text-2);
  font-size: 14px !important;
  line-height: 1.45;
}

.o-table-fit th,
.o-table-fit td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.o-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 7px;
}

.o-table-actions .o-btn-sm,
.o-table-actions .layui-btn-sm {
  min-width: 58px;
  padding: 0 10px;
}

.o-table-wrap .layui-table thead th:last-child,
.o-table-wrap .layui-table tbody td:last-child {
  position: static;
  right: auto;
  z-index: auto;
  box-shadow: none;
}

.o-table-merchant th:nth-child(1),
.o-table-merchant td:nth-child(1) { width: 58px; }
.o-table-merchant th:nth-child(2),
.o-table-merchant td:nth-child(2) { width: 112px; }
.o-table-merchant th:nth-child(3),
.o-table-merchant td:nth-child(3) { width: 160px; }
.o-table-merchant th:nth-child(4),
.o-table-merchant td:nth-child(4) { width: 118px; }
.o-table-merchant th:nth-child(5),
.o-table-merchant td:nth-child(5) { width: 145px; }
.o-table-merchant th:nth-child(6),
.o-table-merchant td:nth-child(6) { width: 84px; }
.o-table-merchant th:nth-child(7),
.o-table-merchant td:nth-child(7) { width: 92px; }
.o-table-merchant th:nth-child(8),
.o-table-merchant td:nth-child(8) { width: 155px; }
.o-table-merchant th:nth-child(9),
.o-table-merchant td:nth-child(9) { width: 116px; }

.o-table-member th:nth-child(1),
.o-table-member td:nth-child(1) { width: 50px; }
.o-table-member th:nth-child(2),
.o-table-member td:nth-child(2) { width: 105px; }
.o-table-member th:nth-child(3),
.o-table-member td:nth-child(3) { width: 105px; }
.o-table-member th:nth-child(4),
.o-table-member td:nth-child(4) { width: 92px; }
.o-table-member th:nth-child(5),
.o-table-member td:nth-child(5) { width: 105px; }
.o-table-member th:nth-child(6),
.o-table-member td:nth-child(6) { width: 54px; }
.o-table-member th:nth-child(7),
.o-table-member td:nth-child(7) { width: 122px; }
.o-table-member th:nth-child(8),
.o-table-member td:nth-child(8) { width: 82px; }
.o-table-member th:nth-child(9),
.o-table-member td:nth-child(9) { width: 90px; }
.o-table-member th:nth-child(10),
.o-table-member td:nth-child(10) { width: 250px; }

.o-table-member .o-table-actions {
  max-width: none;
}

.o-table-member th:nth-child(2),
.o-table-member td:nth-child(2),
.o-table-member th:nth-child(3),
.o-table-member td:nth-child(3),
.o-table-member th:nth-child(4),
.o-table-member td:nth-child(4),
.o-table-merchant th:nth-child(3),
.o-table-merchant td:nth-child(3) {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.o-meta-stack {
  color: var(--o-muted);
  font-size: 12.5px;
}

.o-cell-main {
  color: var(--o-text);
  font-weight: 800;
}

.o-badge {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.o-pagination {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.o-card-footer {
  min-height: 0;
  padding: 14px 20px;
  background: #fff;
}

.o-card-footer .o-pagination:empty,
.o-pagination:empty {
  display: none;
}

.o-maintenance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

.o-danger-zone {
  border-color: #fecaca;
  background: #fff;
}

.o-alert-danger {
  border-color: #fecaca;
  background: var(--o-danger-light);
  color: var(--o-danger-text);
}

.o-danger-stack {
  display: grid;
  gap: 12px;
}

.o-danger-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 14px;
  padding: 14px 16px;
  border: 1px solid #fee2e2;
  border-radius: 12px;
  background: #fff7f7;
}

.o-danger-row > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
}

.o-danger-row > .o-btn {
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

.o-danger-row strong {
  display: block;
  color: #991b1b;
  font-size: 14px;
  line-height: 20px;
  font-weight: 800;
  word-break: break-word;
}

.o-danger-row span {
  display: block;
  margin-top: 3px;
  color: #b91c1c;
  font-size: 12px;
  line-height: 18px;
  word-break: break-word;
}

.o-danger-actions {
  display: flex;
  flex: 1 1 280px;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.o-danger-actions .o-search-input,
.o-danger-actions .layui-input {
  width: 100%;
  max-width: 100%;
}

.o-danger-actions .o-btn {
  width: 100%;
}

.layui-layer-title {
  min-height: 46px;
  padding: 0 52px 0 18px !important;
  line-height: 46px !important;
}

.layui-layer-setwin {
  top: 15px !important;
  right: 16px !important;
}

.layui-layer-content iframe {
  display: block;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1100px) {
  .o-table-member,
  .o-table-merchant {
    table-layout: fixed;
  }
}

/* ── UX polish 20260719 ── */

/* 3.2 后台表格移动端适配 */
@media (max-width: 768px) {
  .layui-table-view {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .layui-table {
    min-width: 600px !important;
  }

  .layui-laypage {
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: center !important;
  }

  .layui-laypage a,
  .layui-laypage span {
    margin: 0 !important;
  }
}

/* 表格行悬停增强 */
.layui-table tbody tr {
  transition: background 100ms ease !important;
}

.layui-table tbody tr:hover {
  background: rgba(37, 99, 235, .03) !important;
}

/* 按钮微交互 */
.o-btn:active,
.layui-btn:active {
  transform: scale(.97) !important;
  transition: transform 80ms ease !important;
}

/* 侧边栏菜单项悬停平滑 */
.o-sidebar-item > a,
.o-sidebar-group > a {
  transition: all 160ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 卡片悬停提升 */
.o-card:hover {
  box-shadow: var(--o-shadow-lg, 0 10px 25px -5px rgba(15, 23, 42, 0.08)) !important;
  transition: box-shadow 200ms ease !important;
}

/* ── END UX polish 20260719 ── */

@media (max-width: 760px) {
  .o-content-inner {
    padding: 16px 14px 34px;
  }

  .o-page-header {
    align-items: stretch;
  }

  .o-page-header .o-btn {
    width: 100%;
  }

  .o-toolbar {
    align-items: stretch;
  }

  .o-toolbar-left,
  .o-toolbar-right,
  .o-search-input,
  .o-select-field,
  .o-select-md,
  .o-date-input {
    width: 100% !important;
  }

  .o-toolbar-left > *,
  .o-toolbar-right > * {
    width: 100%;
  }

  .o-maintenance-grid {
    grid-template-columns: 1fr;
  }

  .o-danger-row {
    align-items: stretch;
    flex-direction: column;
  }

  .o-danger-actions {
    width: 100%;
  }

  .o-pagination {
    justify-content: center;
  }
}

/* OAIM unified UI final layer v14: normalize legacy toolbar inputs. */
.o-toolbar .layui-input.o-search-input,
.layui-form.o-toolbar .layui-input.o-search-input {
  width: 360px !important;
  max-width: min(100%, 520px) !important;
  min-width: 260px !important;
  height: 38px !important;
  line-height: 38px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  border-radius: 9px !important;
}

.o-toolbar .layui-input.o-date-input,
.layui-form.o-toolbar .layui-input.o-date-input {
  width: 180px !important;
  min-width: 180px !important;
  font-weight: 400 !important;
}

/* OAIM unified UI final layer v15: tables must not drift into a different visual system. */
.o-card .o-table-wrap,
.o-table-wrap.o-table-wrap-clean {
  overflow-x: hidden !important;
}

.o-table-wrap .layui-table,
.layui-table.o-table-fit,
.layui-table.o-table-member,
.layui-table.o-table-merchant {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

.o-table-wrap .layui-table thead th,
.o-table-wrap .layui-table tbody td {
  padding: 12px 12px !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

.o-table-wrap .layui-table code,
.o-meta-stack span,
.o-cell-main {
  max-width: 100%;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

.o-table-member th:nth-child(1),
.o-table-member td:nth-child(1) { width: 48px !important; }
.o-table-member th:nth-child(2),
.o-table-member td:nth-child(2),
.o-table-member th:nth-child(3),
.o-table-member td:nth-child(3) { width: 112px !important; }
.o-table-member th:nth-child(4),
.o-table-member td:nth-child(4) { width: 90px !important; }
.o-table-member th:nth-child(5),
.o-table-member td:nth-child(5) { width: 108px !important; }
.o-table-member th:nth-child(6),
.o-table-member td:nth-child(6) { width: 54px !important; }
.o-table-member th:nth-child(7),
.o-table-member td:nth-child(7) { width: 116px !important; }
.o-table-member th:nth-child(8),
.o-table-member td:nth-child(8),
.o-table-member th:nth-child(9),
.o-table-member td:nth-child(9) { width: 86px !important; }
.o-table-member th:nth-child(10),
.o-table-member td:nth-child(10) { width: 246px !important; }

.o-table-merchant th:nth-child(1),
.o-table-merchant td:nth-child(1) { width: 52px !important; }
.o-table-merchant th:nth-child(2),
.o-table-merchant td:nth-child(2) { width: 108px !important; }
.o-table-merchant th:nth-child(3),
.o-table-merchant td:nth-child(3) { width: 160px !important; }
.o-table-merchant th:nth-child(4),
.o-table-merchant td:nth-child(4) { width: 126px !important; }
.o-table-merchant th:nth-child(5),
.o-table-merchant td:nth-child(5) { width: 142px !important; }
.o-table-merchant th:nth-child(6),
.o-table-merchant td:nth-child(6),
.o-table-merchant th:nth-child(7),
.o-table-merchant td:nth-child(7) { width: 82px !important; }
.o-table-merchant th:nth-child(8),
.o-table-merchant td:nth-child(8) { width: 150px !important; }
.o-table-merchant th:nth-child(9),
.o-table-merchant td:nth-child(9) { width: 132px !important; }

.o-table-actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(58px, max-content));
  justify-content: start;
  align-items: center;
  gap: 7px !important;
}

.o-table-actions .o-btn-sm,
.o-table-actions .layui-btn-sm {
  min-width: 58px !important;
  margin: 0 !important;
}

.o-card-footer .o-pagination,
.o-pagination {
  justify-content: flex-end !important;
  padding: 0 !important;
  overflow: visible !important;
}

.o-pagination .pagination,
.o-pagination .layui-laypage {
  justify-content: flex-end !important;
  gap: 6px !important;
}

.o-pagination .pagination li a,
.o-pagination .pagination li span,
.o-pagination .layui-laypage a,
.o-pagination .layui-laypage span {
  border-radius: 9px !important;
  min-width: 34px !important;
  height: 34px !important;
  line-height: 32px !important;
}

@media (max-width: 900px) {
  .o-card .o-table-wrap,
  .o-table-wrap.o-table-wrap-clean {
    overflow-x: auto !important;
  }

  .layui-table.o-table-member,
  .layui-table.o-table-merchant {
    min-width: 880px !important;
  }
}

.o-audit-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 19891020;
  background: rgba(15, 23, 42, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.o-audit-modal {
  width: min(760px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #111827;
}

.o-audit-modal__head {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid #e5e7eb;
  box-sizing: border-box;
}

.o-audit-modal__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.o-audit-modal__close {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 26px;
  line-height: 30px;
  color: #64748b;
  cursor: pointer;
}

.o-audit-modal__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.o-audit-modal__body {
  padding: 18px 22px 22px;
  overflow: auto;
}

.o-audit-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.o-audit-summary__item {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  min-width: 0;
}

.o-audit-label {
  color: #64748b;
  font-size: 12px;
  line-height: 18px;
  margin-bottom: 4px;
}

.o-audit-value {
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.o-audit-detail {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.o-audit-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  align-items: start;
}

.o-audit-row:last-child {
  border-bottom: 0;
}

.o-audit-row__key {
  color: #64748b;
  font-size: 13px;
  line-height: 22px;
}

.o-audit-row__value {
  font-size: 14px;
  line-height: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.o-audit-pre {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px 14px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 22px;
}

@media (max-width: 640px) {
  .o-audit-modal-mask {
    padding: 12px;
    align-items: flex-start;
  }

  .o-audit-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .o-audit-summary {
    grid-template-columns: 1fr;
  }

  .o-audit-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.o-widget-menu {
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.o-widget-menu__head {
  min-height: 56px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--o-border);
  background: #f8fafc;
}

.o-widget-menu__head strong {
  display: block;
  color: var(--o-text);
  font-size: 15px;
  line-height: 22px;
  font-weight: 800;
}

.o-widget-menu__head span {
  display: block;
  margin-top: 2px;
  color: var(--o-muted);
  font-size: 12px;
  line-height: 18px;
}

.o-widget-menu__head .layui-btn,
.o-widget-menu__head .o-btn {
  height: 36px;
  padding: 0 14px;
  box-shadow: none;
}

.o-widget-menu__cols,
.o-widget-menu__row {
  display: grid;
  grid-template-columns: minmax(118px, .85fr) 128px minmax(220px, 1.65fr) 34px;
  gap: 12px;
  align-items: center;
}

.o-widget-menu__cols {
  padding: 9px 16px;
  color: #7b8493;
  background: #f8fafc;
  border-bottom: 1px solid var(--o-border);
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
}

.o-widget-menu__list {
  padding: 6px 16px;
}

.o-widget-menu__row {
  position: relative;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f7;
}

.o-widget-menu__row:last-child {
  border-bottom: 0;
}

.o-widget-menu__row .layui-input,
.o-widget-menu__select {
  width: 100%;
  height: 38px;
  min-height: 38px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  color: #1f2937;
  background-color: #fff;
  font-size: 14px;
  line-height: 20px;
  box-shadow: none;
}

.o-widget-menu__row .layui-input {
  padding: 0 12px;
}

.o-widget-menu__select {
  padding: 0 34px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8b94a3 50%), linear-gradient(135deg, #8b94a3 50%, transparent 50%);
  background-position: calc(100% - 16px) 16px, calc(100% - 10px) 16px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.o-widget-menu__row .layui-input:focus,
.o-widget-menu__select:focus {
  border-color: var(--o-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
  outline: 0;
}

.o-widget-menu__remove {
  width: 38px;
  height: 34px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #94a3b8;
  background: #fff;
  line-height: 32px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.o-widget-menu__remove:hover {
  color: #e11d48;
  border-color: #fecdd3;
  background: #fff1f2;
}

.o-btn:disabled,
.o-btn.is-disabled,
.o-widget-menu__head .o-btn:disabled {
  cursor: not-allowed;
  opacity: .52;
  box-shadow: none;
  transform: none;
}

.o-widget-menu__error {
  grid-column: 1 / -1;
  margin-top: -2px;
  color: #e11d48;
  font-size: 12px;
  line-height: 18px;
}

.o-widget-menu__empty {
  padding: 16px 0;
  color: var(--o-muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .o-widget-menu__cols {
    display: none;
  }

  .o-widget-menu__row {
    grid-template-columns: minmax(0, 1fr) 132px 38px;
    gap: 10px;
    align-items: start;
  }

  .o-widget-menu__row [name="widget_menu_value[]"] {
    grid-column: 1 / 3;
  }

  .o-widget-menu__remove {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}

@media (max-width: 640px) {
  [data-o-merchant-setting] .layui-form-label {
    float: none;
    width: auto;
    display: block;
    padding: 0 0 7px;
    text-align: left;
  }

  [data-o-merchant-setting] .layui-input-block,
  [data-o-merchant-setting] .layui-input-inline {
    width: 100%;
    margin-left: 0;
  }

  [data-o-merchant-setting] .layui-form-mid {
    display: block;
    width: 100%;
    margin: 6px 0 0;
    padding: 0 !important;
    line-height: 20px;
  }

  [data-o-merchant-setting] .layui-form-item {
    margin-bottom: 18px;
  }

  .o-widget-menu {
    overflow: visible;
  }

  .o-widget-menu__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .o-widget-menu__head .layui-btn,
  .o-widget-menu__head .o-btn {
    width: 100%;
  }

  .o-widget-menu__list {
    padding: 10px;
  }

  .o-widget-menu__row {
    display: grid;
    grid-template-columns: 1fr 38px;
    gap: 10px;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid #edf1f7;
    border-radius: 8px;
    background: #fbfdff;
  }

  .o-widget-menu__row:last-child {
    margin-bottom: 0;
  }

  .o-widget-menu__row [name="widget_menu_label[]"],
  .o-widget-menu__select,
  .o-widget-menu__row [name="widget_menu_value[]"] {
    grid-column: 1 / -1;
  }

  .o-widget-menu__row [name="widget_menu_label[]"] {
    grid-column: 1 / 2;
  }

  .o-widget-menu__remove {
    grid-column: 2;
    grid-row: 1;
  }

  .o-widget-menu__error {
    grid-column: 1 / -1;
    margin-top: 0;
  }
}
