/* ===== 登录/注册页 ===== */
/* ===== 登录 / 注册页（样式与 knock 一致）===== */
/* 底纹是一整层固定背景，不跟卡片滚动：窄屏上卡片变长需要滚动时不会露出边缘。 */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(135deg, #d2d78e, #8bb889, #d6dbb9);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.auth-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/static/images/auth/pattern.svg");
  background-repeat: repeat;
  background-size: 400px auto;
  opacity: 0.15;
  pointer-events: none;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.auth-card { width: 100%; max-width: 26rem; }
.auth-card-wide { max-width: 34rem; }
.install-checks { border: 1px solid var(--tblr-border-color); border-radius: 8px; padding: 12px 14px; }
.install-check { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.install-check + .install-check { border-top: 1px dashed var(--tblr-border-color); }
.install-check-icon { font-size: 20px; line-height: 1.2; }
.install-demo { border: 1px solid var(--tblr-border-color); border-radius: 8px; padding: 10px 12px 10px 36px; }
.install-hint { font-size: 12px; white-space: pre-wrap; word-break: break-all; }

/* 品牌放在卡片外面，卡片里只管「要填什么」。 */
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { display: block; max-height: 56px; max-width: 220px; margin: 0 auto; object-fit: contain; }

.auth-card .card {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 45px -15px rgba(15, 23, 42, 0.25);
}
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 1.5rem; }
.auth-foot { text-align: center; margin-top: 1rem; font-size: 14px; color: rgba(15, 23, 42, 0.7); }
.auth-foot a { font-weight: 600; }


/* ===== 后台框架（样式与 cnpay-gateway 一致）===== */
.app-main {
  padding-bottom: 24px;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.app-topbar h1 { font-size: 20px; margin: 0; }

/* ===== 设置页分组标题 ===== */
.settings-group-title {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 12px;
}

.settings-group-title .fw-normal { font-size: 12px; margin-left: 6px; }

/* ===== 支付模块卡片 ===== */
.module-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.module-card:hover,
.module-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.08);
  outline: none;
}

.module-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: #e2f5ec;
  color: #059669;
  flex-shrink: 0;
}

.module-off .module-icon {
  background: #f1f5f9;
  color: #94a3b8;
}

.module-name {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.method-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #d1fae5;
}

.method-chip .ti { font-size: 15px; }

.method-chip.off {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}

.method-chip.more {
  cursor: pointer;
  background: #fff;
  color: #475569;
  border-color: #cbd5e1;
}

.method-chip.more:hover { border-color: #94a3b8; }

.delayed-mark {
  color: #dc2626;
  font-weight: 700;
  margin-left: 2px;
}

/* Non-instant methods (cash vouchers, bank transfers) stand out in red. */
.method-chip.delayed {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.method-chip.delayed.off {
  background: #fff5f5;
  color: #e57373;
  border-color: #fecaca;
}

.delayed-label {
  color: #b91c1c;
  font-weight: 600;
}

.delayed-hint {
  color: #b91c1c;
}

/* 1. 页面底板 Canvas 柔和调性 (内部页面生效) */
body:not(:has(.bubble-bg)),
.page:not(.page-center),
.page-wrapper {
  background-color: #f8fafc !important;
  color: #334155;
}

/* 2. 顶部 Header 纯白浮层与单像素分界边框 (清除 Tabler 默认 inset box-shadow 假边框) */
.page-wrapper header.navbar {
  background-color: #ffffff !important;
  border: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
  margin-bottom: 1.5rem !important;
}

/* 3. 左侧侧边栏纯白基底与虚线分界 (禁用 Tabler 默认 inset box-shadow 阴影线，改用 1px dashed 虚线) */
@media (min-width: 992px) {
  .navbar-expand-lg.navbar-vertical,
  aside.navbar-vertical {
    box-shadow: none !important;
  }
}

aside.navbar-vertical {
  background-color: #ffffff !important;
  border: none !important;
  border-right: 1px dashed #cbd5e1 !important;
  box-shadow: none !important;
}

.navbar-vertical,
.navbar-vertical .container-fluid,
.navbar-vertical .navbar-collapse {
  background-color: transparent !important;
  border: none !important;
  border-right: none !important;
}

aside.navbar-vertical::-webkit-scrollbar,
.navbar-vertical::-webkit-scrollbar,
.navbar-vertical .container-fluid::-webkit-scrollbar,
.navbar-vertical .navbar-collapse::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

aside.navbar-vertical::-webkit-scrollbar-button,
.navbar-vertical::-webkit-scrollbar-button,
.navbar-vertical .container-fluid::-webkit-scrollbar-button,
.navbar-vertical .navbar-collapse::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

@media (min-width: 992px) {
  aside.navbar-vertical {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
  }
  body .page-wrapper {
    margin-left: 280px !important;
    /* a flex item defaults to min-width:auto, so a wide table pushed the whole
       page past the viewport; let the table scroll inside its card instead */
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(100% - 280px);
  }
}

@media (max-width: 991.98px) {
  body .page-wrapper {
    margin-left: 0 !important;
  }

  .page-wrapper header.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
    margin-bottom: 1rem !important;
    min-height: 3.5rem;
  }

  aside.navbar-vertical {
    position: fixed !important;
    top: 0 !important;
    left: -300px !important;
    width: 280px !important;
    height: 100vh !important;
    z-index: 1050 !important;
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15) !important;
    visibility: hidden;
    transition: left 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.3s ease !important;
  }

  aside.navbar-vertical.show,
  aside.navbar-vertical.active {
    left: 0 !important;
    visibility: visible !important;
  }

  /* 解决 Tabler 与 Bootstrap 在移动端自动折叠隐藏 #sidebar-menu 的 BUG */
  .navbar-collapse,
  #sidebar-menu,
  #sidebar-menu.collapse,
  #sidebar-menu.collapse:not(.show),
  aside.navbar-vertical #sidebar-menu,
  aside.navbar-vertical .navbar-collapse {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #sidebar-menu .navbar-nav,
  aside.navbar-vertical .navbar-nav {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  aside.navbar-vertical .dropdown-menu {
    position: static !important;
    float: none !important;
  }
}

/* 移动端菜单展开时的毛玻璃背景遮罩与防滚动穿透 */
.pc-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pc-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.drawer-open {
  overflow: hidden !important;
  touch-action: none !important;
}

.mobile-header-logo {
  height: 32px !important;
  max-height: 32px !important;
  object-fit: contain !important;
}

#sidebar-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 侧边栏 Flex 布局：aside 为列方向容器，container-fluid 充满 aside 并自身可滚动 */
aside.navbar-vertical {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.navbar-vertical .container-fluid {
  display: flex !important;
  flex-direction: column !important;
  /* Bootstrap's container-fluid wraps flex items; when the menu is taller than a phone screen it
     wrapped into a second column outside the drawer, leaving the drawer empty. */
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 0 !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.navbar-vertical .container-fluid::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}

.navbar-vertical .navbar-collapse {
  flex: 1 0 auto !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  min-height: 0 !important;
}

.sidebar-brand-container {
  padding: 1rem 1.25rem 0.5rem 1.25rem !important;
  width: 100%;
  display: flex;
  align-items: center;
}

.sidebar-brand-container .navbar-brand {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
}

.sidebar-brand-logo {
  height: 60px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: left center !important;
}

.text-emerald { color: #10b981 !important; }
.text-indigo { color: #6366f1 !important; }
.text-azure { color: #0284c7 !important; }
.text-rose { color: #f43f5e !important; }

.user-card-mockup {
  background: #f8fafc !important;
  padding: 0.75rem 1rem !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  margin: 0.25rem 1.25rem 0.75rem 1.25rem !important;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.user-card-mockup:hover {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  text-decoration: none !important;
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #ffffff;
  flex-shrink: 0;
  object-fit: cover;
}

.header-user-avatar {
  width: 32px;
  height: 32px;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #1e293b;
  line-height: 1.25;
  margin-bottom: 2px;
}

.sidebar-user-sub {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.25;
}

.sidebar-user-balance {
  font-size: 0.82rem;
  font-weight: 700;
  color: #059669;
  line-height: 1.25;
}

.navbar-vertical .sidebar-group-title-item {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 1.75rem 1.5rem 0.65rem 1.5rem !important;
  margin: 0 !important;
  pointer-events: none;
  list-style: none;
  border: none !important;
  background: transparent !important;
}

.navbar-vertical .navbar-nav {
  padding-bottom: 2.5rem;
  flex-grow: 0 !important;
}

.navbar-vertical .nav-item {
  margin: 0.25rem 1.15rem;
  border: none !important;
}

.navbar-vertical .nav-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 1.15rem !important;
  border-radius: 12px !important;
  color: #475569;
  font-size: 14px !important;
  font-weight: 400 !important;
  border: none !important;
  line-height: 1.25;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-vertical .nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.navbar-vertical .nav-item.active {
  position: relative;
}

.navbar-vertical .nav-item.active::after,
.navbar-vertical .nav-item.active::before,
.navbar-vertical .nav-item.active .nav-link::after,
.navbar-vertical .nav-item.active .nav-link::before {
  display: none !important;
}

.navbar-vertical .nav-item.active .nav-link {
  background-color: #e2f5ec !important;
  color: #059669 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.05);
}

.navbar-vertical .nav-item.active .nav-link .nav-link-icon i {
  color: #059669 !important;
}

/* 侧边栏图标多彩个性化 */
.navbar-vertical .nav-link .ti-dashboard { color: #06b6d4; }
.navbar-vertical .nav-link .ti-building-store { color: #f43f5e; }
.navbar-vertical .nav-link .ti-apps { color: #8b5cf6; }
.navbar-vertical .nav-link .ti-receipt { color: #0ea5e9; }
.navbar-vertical .nav-link .ti-report-money { color: #3b82f6; }
.navbar-vertical .nav-link .ti-percentage { color: #f59e0b; }
.navbar-vertical .nav-link .ti-settings { color: #ef4444; }
.navbar-vertical .nav-link .ti-user-cog { color: #2563eb; }

/* 下级子菜单 (如 系统设置 -> 基础设置、支付渠道等) 样式 */
.navbar-vertical .dropdown-menu {
  background: transparent !important;
  padding: 4px 0 4px 16px !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  position: static !important;
  float: none !important;
}

.navbar-vertical .dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 16px !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  color: #64748b !important;
  background: transparent !important;
  margin: 2px 0 !important;
  transition: all 0.2s ease;
}

.navbar-vertical .dropdown-menu .sub-menu-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #cbd5e1;
  margin-right: 12px;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-vertical .dropdown-menu .dropdown-item:hover {
  color: #059669 !important;
  background-color: transparent !important;
}

.navbar-vertical .dropdown-menu .dropdown-item:hover .sub-menu-dot,
.navbar-vertical .dropdown-menu .dropdown-item.active .sub-menu-dot {
  background-color: #10b981 !important;
  transform: scale(1.35);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.navbar-vertical .dropdown-menu .dropdown-item.active {
  background-color: transparent !important;
  color: #059669 !important;
  font-weight: 600 !important;
}

/* Dashboard 概览卡片微阴影与图标精致化 */
.card.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.avatar.avatar-md {
  width: 44px !important;
  height: 44px !important;
}

.input-group-flat .input-group-text a {
  color: var(--tblr-secondary, #667382);
  text-decoration: none;
  font-size: 1.15rem;
  transition: color 0.15s ease;
}

.input-group-flat .input-group-text a:hover {
  color: var(--tblr-primary, #206bc4);
}


/* ===== SweetAlert2 主题（与 cnpay-gateway 一致）===== */
.app-swal {
  border-radius: var(--tblr-border-radius-lg, 12px);
  box-shadow: 0 1.25rem 3.5rem rgba(0, 0, 0, 0.15);
  padding: 1.75rem 1.5rem 1.25rem;
  font-family: inherit;
}

.app-swal-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0;
  margin-bottom: 0.5rem;
  color: var(--tblr-body-color, #1a2234);
}

.app-swal-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--tblr-secondary, #667382);
  margin: 0;
  padding: 0;
}

.app-swal-actions {
  margin-top: 1.5rem !important;
  display: flex !important;
  gap: 0.75rem !important;
  justify-content: flex-end !important;
  width: 100% !important;
}

.app-swal-actions button {
  margin: 0 !important;
  min-width: 4.5rem;
}

/* 图标整体缩小：用 transform 等比缩放，直接改宽高会让 ×、✓ 的线条错位。 */
.app-swal .app-swal-icon {
  transform: scale(0.7);
  margin: -0.5rem auto 0;
}

/* SweetAlert 打开时会把焦点放到按钮上，保持按钮原本的颜色，只加一圈浅色焦点环。 */
.app-swal-actions .btn:focus,
.app-swal-actions .btn:focus-visible {
  background-color: var(--tblr-btn-bg);
  color: var(--tblr-btn-color);
  border-color: var(--tblr-btn-border-color);
  box-shadow: 0 0 0 0.2rem rgba(var(--tblr-primary-rgb, 6, 111, 209), 0.15);
}

.app-swal .swal2-input,
.app-swal .swal2-textarea,
.app-swal .form-control.swal2-input {
  margin: 1rem 0 0;
  width: 100%;
  height: auto;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 6px;
  box-shadow: none;
}

.app-swal .app-swal-validation {
  font-size: 0.8125rem;
  border-radius: 6px;
  margin: 0.75rem 0 0;
  background: var(--tblr-danger-lt, #fff0f1);
  color: var(--tblr-danger, #d63939);
}

/* 交易明细：彩色金额/状态标签与图标 */
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.pill-green { background: #2fb380; color: #fff; }
.pill-green-lt { background: #e7f7ef; color: #2fb380; }
.pill-orange { background: #f59f00; color: #fff; }
.pill-orange-lt { background: #fff4e0; color: #e8890c; }
.pill-red { background: #e03131; color: #fff; }
.pill-red-lt { background: #fdecee; color: #d6336c; }
.pill-gray { background: #8a94a6; color: #fff; }
.pill-gray-lt { background: #f1f3f5; color: #495057; }

.tx-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 18px;
  cursor: default;
}
.tx-icon-method { background: #fdecee; color: #d6336c; }
.tx-icon-stripe { background: #635bff; color: #fff; }
.tx-icon-paypal { background: #003087; color: #fff; }
.tx-icon-dark { background: #1f2937; color: #fff; }

.tx-table td { padding: 14px 6px; }
.tx-table th { padding-left: 6px; padding-right: 6px; }
.tx-table td:first-child, .tx-table th:first-child { padding-left: 16px; }
.tx-table td:last-child, .tx-table th:last-child { padding-right: 16px; }
.tx-copy { cursor: pointer; font-weight: 500; font-size: 11px; padding-left: 6px; padding-right: 6px; }
.tx-copy.copied { background: #e7f7ef; color: #2fb380; }
.tx-app, .tx-app:hover, .tx-app:focus, .tx-app:active { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.tx-app:hover .tx-app-name { color: var(--tblr-primary); }
.tx-app-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #f1f5f9; flex: none; }
.tx-app-name { display: block; font-weight: 600; color: #1f2937; }
.tx-app-url { display: block; font-size: 12px; color: #8a94a6; }
.tx-detail dt, .tx-detail dd { margin-bottom: 8px; }
.tx-detail dd { word-break: break-all; }

.btn-actions { gap: 4px; }
.btn-actions .btn-action { width: 32px; height: 32px; padding: 0; }
.btn-actions .btn-action .ti { font-size: 20px; }
.refund-summary { display: grid; gap: 6px; padding: 12px 14px; border-radius: 8px; background: #f8fafc; font-size: 14px; }
.refund-summary > div { display: flex; justify-content: space-between; gap: 12px; }
.pill-blue { background: #206bc4; color: #fff; }

/* 统计卡片（结算明细、收益报表）：图标色块 + 标签 + 大数字 + 右侧补充信息 */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.stat-card {
  --stat: #2fb380;
  --stat-rgb: 47, 179, 128;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #e6ebf1;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(var(--stat-rgb), 0.07) 100%);
}
.stat-green { --stat: #2fb380; --stat-rgb: 47, 179, 128; }
.stat-orange { --stat: #f59f00; --stat-rgb: 245, 159, 0; }
.stat-red { --stat: #e03131; --stat-rgb: 224, 49, 49; }
.stat-blue { --stat: #206bc4; --stat-rgb: 32, 107, 196; }
.stat-purple { --stat: #ae3ec9; --stat-rgb: 174, 62, 201; }
.stat-empty { color: #8a94a6; background: #fff; }
.stat-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 12px;
  background: var(--stat);
  color: #fff;
  font-size: 24px;
}
.stat-card-main { flex: 1; min-width: 0; }
.stat-card-label { font-size: 13px; color: #8a94a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card-value { font-size: 24px; font-weight: 700; color: #1f2937; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-card-side { display: grid; gap: 4px; font-size: 12px; text-align: right; white-space: nowrap; flex: none; }

/* 操作按钮配色：沿用 Tabler btn-action，按用途区分颜色，悬停出现同色浅底 */
.btn-action-blue { color: var(--tblr-blue); }
.btn-action-green { color: var(--tblr-green); }
.btn-action-orange { color: var(--tblr-orange); }
.btn-action-purple { color: var(--tblr-purple); }
.btn-action-red { color: var(--tblr-red); }
.btn-action-blue:hover { color: var(--tblr-blue); background: rgba(var(--tblr-blue-rgb), .1); }
.btn-action-green:hover { color: var(--tblr-green); background: rgba(var(--tblr-green-rgb), .1); }
.btn-action-orange:hover { color: var(--tblr-orange); background: rgba(var(--tblr-orange-rgb), .1); }
.btn-action-purple:hover { color: var(--tblr-purple); background: rgba(var(--tblr-purple-rgb), .1); }
.btn-action-red:hover { color: var(--tblr-red); background: rgba(var(--tblr-red-rgb), .1); }

/* 两行日期时间 */
.dt-2l { display: inline-flex; flex-direction: column; line-height: 1.3; }
.dt-2l-time { font-size: 12px; color: #8a94a6; }
.pill-blue-lt { background: #e8f0fb; color: #206bc4; }
.tx-void { text-decoration: line-through; opacity: 0.6; }

/* 支付模块弹窗：需要订阅的回调事件，一行一个 */
.webhook-events { border: 1px solid #e6ebf1; border-radius: 8px; overflow: hidden; }
.webhook-event { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-bottom: 1px solid #f0f3f6; background: #fff; }
.webhook-event:last-child { border-bottom: 0; }
.webhook-event code { flex: 1; background: none; padding: 0; color: #1f2937; font-size: 13px; }
.webhook-event .btn-action { width: 28px; height: 28px; }

/* ===== 开发文档与在线调试（样式参照 cnpay-gateway）===== */
.docs-toc { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; }
.docs-toc .list-group-item { border: 0; padding: 0.25rem 0.75rem; font-size: 0.875rem; }
.docs-toc .list-group-item.sub { padding-left: 1.75rem; color: var(--tblr-secondary); }
.docs-section { scroll-margin-top: 1.5rem; }
/* Tabler 的 alert 是 flex，文字里夹 code/strong 时会被排成一行撑宽页面，文档里按普通段落排版。 */
.docs-section .alert { display: block; }
.docs-section + .docs-section { margin-top: 2rem; }
/* 必须同时声明 color：Tabler 默认 pre 是浅色文字（配深色背景），换成浅底不改颜色会看不见内容。 */
.docs-code, .sandbox-code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--tblr-body-color);
  background: var(--tblr-bg-surface-secondary);
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  padding: 0.875rem 1rem;
  margin: 0;
  overflow-x: auto;
}
.docs-code.wrap, .sandbox-code { white-space: pre-wrap; word-break: break-all; }
.sandbox-code { font-size: 0.75rem; max-height: 360px; overflow-y: auto; }
.docs-table td, .docs-table th { vertical-align: top; }
.docs-table code { white-space: nowrap; }
.req-yes { color: var(--tblr-danger); font-weight: 600; }

/* Filter pickers (merchant / app) on list pages */
.picker { position: relative; }
.picker-toggle { display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; min-height: 36px; }
.picker-toggle .picker-title { overflow: hidden; text-overflow: ellipsis; }
.picker-toggle .picker-id { margin-left: auto; font-size: 12px; padding-right: 4px; }
.picker-menu { position: absolute; z-index: 1050; top: calc(100% + 4px); left: 0; min-width: 100%; width: 340px; max-width: 90vw;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.picker-list { max-height: 320px; overflow-y: auto; padding: 4px; }
.picker-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px;
  background: transparent; text-align: left; cursor: pointer; }
.picker-item:hover, .picker-item.active { background: #f1f5f9; }
.picker-item.active .picker-title { color: #0369a1; }
.picker-logo { width: 28px; height: 28px; flex: none; border-radius: 6px; object-fit: contain; background: #f8fafc; }
.picker-toggle .picker-logo { width: 20px; height: 20px; border-radius: 4px; }
.picker-logo-icon { display: inline-flex; align-items: center; justify-content: center; color: #64748b; font-size: 16px; }
.picker-text { display: flex; flex-direction: column; min-width: 0; }
.picker-title { font-size: 14px; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-sub { font-size: 12px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-empty { padding: 12px; text-align: center; color: #94a3b8; font-size: 13px; }

/* 侧边栏二级菜单：分组标题右侧箭头，子项前圆点，当前页所在分组默认展开 */
.navbar-vertical .nav-group > .nav-link { cursor: pointer; }
.navbar-vertical .nav-group-arrow { margin-left: auto; font-size: 15px; color: #94a3b8; transition: transform .2s ease; }
.navbar-vertical .nav-group.open > .nav-link { background: #f1f5f9; color: #0f172a; }
.navbar-vertical .nav-group.open .nav-group-arrow { transform: rotate(180deg); }
.navbar-vertical .nav-sub { display: none; list-style: none; margin: .25rem 0 .35rem; padding: 0; }
.navbar-vertical .nav-group.open .nav-sub { display: block; }
.navbar-vertical .nav-sub-item a { position: relative; display: block; padding: .55rem 1.15rem .55rem 3.05rem; border-radius: 10px; color: #475569; font-size: 14px; text-decoration: none; transition: background .2s, color .2s; }
.navbar-vertical .nav-sub-item a::before { content: ""; position: absolute; left: 1.75rem; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #cbd5e1; }
.navbar-vertical .nav-sub-item a:hover { background: #f1f5f9; color: #0f172a; }
.navbar-vertical .nav-sub-item.active a { background: #e2f5ec; color: #059669; font-weight: 600; }
.navbar-vertical .nav-sub-item.active a::before { background: #059669; }
.smart-notice { white-space: pre-line; }
/* 长表单：弹窗高度不超过屏幕，内容区滚动，底部按钮始终可见 */
.smart-modal { display: flex; flex-direction: column; max-height: calc(100vh - 8vh - 24px); margin-top: 6vh !important; }
.smart-modal-header, .smart-modal-footer { flex-shrink: 0; }
.smart-modal-body { overflow-y: auto; min-height: 0; }
/* 表单字段里的复选框、开关文字：左对齐、紧跟控件（只有左侧字段名右对齐） */
.smart-form-row > div label { text-align: left; padding-top: 0; font-weight: 400; color: inherit; }
.smart-form-row > div .form-switch { display: flex; align-items: center; gap: .5rem; }
.kit-checklist .form-check { display: flex; align-items: center; gap: .4rem; padding-left: 0; min-width: 0; }
.kit-checklist .form-check-input { float: none; margin: 0; flex-shrink: 0; }

/* 图片/视频预览层（Kit.preview）：盖在弹窗之上，点背景、× 或 Esc 关闭 */
.kit-lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(15, 23, 42, .82); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px 24px; }
.kit-lightbox img, .kit-lightbox video { max-width: min(1280px, 100%); max-height: calc(100vh - 120px); border-radius: 6px; background: #0f172a; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.kit-lightbox-close { position: absolute; top: 12px; right: 18px; border: 0; background: transparent; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; opacity: .85; }
.kit-lightbox-close:hover { opacity: 1; }
.kit-lightbox-url { margin-top: 10px; color: rgba(255, 255, 255, .7); font-size: 12px; word-break: break-all; text-align: center; max-width: 900px; }
.kit-lightbox-missing { color: #fff; text-align: center; font-size: 15px; }
.kit-lightbox-missing .ti { font-size: 40px; opacity: .7; }

/* 文件选择弹窗层（Kit.layer / Kit.pickAsset）：盖在表单弹窗之上 */
.kit-layer { position: fixed; inset: 0; z-index: 2500; background: rgba(24, 36, 51, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; }
.kit-layer-card { width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 16px 48px rgba(15, 23, 42, .25); margin: 0; }
.kit-layer-card .card-title { display: flex; align-items: center; }
.kit-layer-body { overflow: auto; }
/* 拖拽上传区：Tabler dropzone 风格 */
.kit-drop { border: 1.5px dashed var(--tblr-border-color, #dce1e7); border-radius: var(--tblr-border-radius, 6px); background: var(--tblr-bg-surface-secondary, #f6f8fb); padding: 20px; transition: border-color .15s, background-color .15s; }
.kit-drop-hint { text-align: center; color: var(--tblr-body-color, #1d273b); }
.kit-drop-hint .ti { font-size: 34px; color: var(--tblr-primary, #066fd1); display: block; margin-bottom: 4px; }
.kit-drop.is-over { border-color: var(--tblr-primary, #066fd1); background: rgba(6, 111, 209, .06); }
.kit-drop.is-uploading { pointer-events: none; opacity: .85; }
/* 文件卡片 */
.kit-asset { cursor: pointer; height: 100%; transition: border-color .15s, box-shadow .15s; }
.kit-asset:hover { border-color: var(--tblr-primary, #066fd1); box-shadow: 0 0 0 1px var(--tblr-primary, #066fd1); }
.kit-asset-media { position: relative; aspect-ratio: 16 / 9; background: #f1f5f9; border-radius: var(--tblr-border-radius, 6px) var(--tblr-border-radius, 6px) 0 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.kit-asset-media img { width: 100%; height: 100%; object-fit: contain; }
.kit-asset-media > .ti { font-size: 34px; color: #64748b; }
.kit-asset-media > span { font-size: 12px; }
.kit-asset-eye { position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, .92); border: 1px solid var(--tblr-border-color, #dce1e7); opacity: 0; transition: opacity .15s; }
.kit-asset:hover .kit-asset-eye, .kit-asset-eye:focus { opacity: 1; }
.kit-layer .empty { padding: 24px 0; }
.kit-layer .empty-icon .ti { font-size: 40px; color: #94a3b8; }
.kit-lightbox-audio { background: #fff; border-radius: 10px; padding: 28px 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: min(420px, 90vw); }
.kit-lightbox-audio .ti { font-size: 44px; color: var(--tblr-primary, #066fd1); }
.kit-lightbox-audio audio { width: 100%; }
.kit-layer .nav-tabs .badge { font-weight: 500; }

/* ---- 参数页与弹窗表单：开关和左侧文字对齐（文字按 38px 输入框高度排版） ---- */
.hotel-field > div > .form-switch,
.smart-form-row > div > .form-switch { min-height: 38px; display: flex; align-items: center; margin: 0; padding-top: 0 !important; }
.hotel-field > div > .form-switch .form-check-input,
.smart-form-row > div > .form-switch .form-check-input { margin-top: 0; flex-shrink: 0; }
.hotel-field > div > .form-switch .form-check-label,
.smart-form-row > div > .form-switch .form-check-label { margin-left: .5rem; }
/* 提示文字用灰色，红色留给真正的错误 */
.hotel-field small { color: #8a97a8 !important; }

/* ---- 链接样式的按钮、徽标：悬停不显示下划线 ---- */
a.btn, a.btn:hover, a.btn:focus, a.badge, a.badge:hover, a.badge:focus, .nav-link, .nav-link:hover { text-decoration: none !important; }
a.badge { transition: background-color .15s, color .15s; }
a.badge.bg-blue-lt:hover { background: var(--tblr-primary, #066fd1) !important; color: #fff !important; }

/* ---- 酒店参数标签页 ---- */
.hotel-tabs { padding-bottom: 0; background: #fbfcfe; }
.hotel-tabs .nav-tabs { flex-wrap: wrap; }
.hotel-tabs .nav-link { color: #5b6b80; font-weight: 500; padding: .7rem 1rem; }
.hotel-tabs .nav-link .ti { font-size: 16px; }
.hotel-tabs .nav-link:hover { color: var(--tblr-primary, #066fd1); }
.hotel-tabs .nav-link.active { color: var(--tblr-primary, #066fd1); background: #fff; }

/* ---- 酒店列表：参数入口小标签、操作图标 ---- */
.hotel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hotel-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 1px solid #e3e8ef; border-radius: 6px; background: #f8fafc; color: #475569; font-size: 12px; line-height: 20px; white-space: nowrap; transition: border-color .15s, background-color .15s, color .15s; }
.hotel-chip .ti { font-size: 14px; color: #8a97a8; transition: color .15s; }
.hotel-chip:hover, .hotel-chip:focus { border-color: var(--tblr-primary, #066fd1); background: rgba(6, 111, 209, .06); color: var(--tblr-primary, #066fd1); text-decoration: none; }
.hotel-chip:hover .ti { color: var(--tblr-primary, #066fd1); }
.hotel-actions { display: inline-flex; gap: 4px; }
.hotel-actions .btn { width: 30px; height: 30px; padding: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.hotel-actions .btn .ti { font-size: 17px; margin: 0; }
/* 弹窗表单左侧标签：在 38px 行高里垂直居中，和输入框、开关对齐 */
.smart-form-row > label { padding-top: 0 !important; min-height: 38px; display: flex; align-items: center; justify-content: flex-end; }
@media (max-width: 576px) { .smart-form-row > label { justify-content: flex-start; min-height: 0; } }
/* 文件选择控件也按 38px 行高居中，和左侧文字对齐 */
.smart-form-row [data-image], .hotel-field .resource-input { min-height: 38px; }
/* 标签栏下面的表格：表头和标签栏之间留出间距 */
.hotel-tabs + .table-responsive { border-top: 1px solid var(--tblr-border-color, #e6e8eb); }
.hotel-tabs + .table-responsive thead th { padding-top: .85rem; padding-bottom: .85rem; background: #fff; }

/* ---- 酒店标签页 + 表格：标签栏、表头、数据行三层不同底色 ---- */
.hotel-form-card { overflow: hidden; border-color: #e3e8ef; }
.hotel-tabs { background: #eef2f7 !important; border-bottom: 1px solid #dfe5ee !important; padding: .55rem .75rem 0 !important; }
.hotel-tabs .nav-tabs { border-bottom: 0; gap: 2px; }
.hotel-tabs .nav-link { border: 1px solid transparent !important; border-bottom: 0 !important; border-radius: 8px 8px 0 0 !important; color: #5b6b80; padding: .6rem 1rem .65rem; margin-bottom: -1px; }
.hotel-tabs .nav-link:hover { background: rgba(255, 255, 255, .6); color: var(--tblr-primary, #066fd1); }
.hotel-tabs .nav-link.active { background: #fff !important; color: var(--tblr-primary, #066fd1) !important; border-color: #dfe5ee !important; box-shadow: inset 0 2px 0 var(--tblr-primary, #066fd1); font-weight: 600; }
.hotel-tabs + .table-responsive { border-top: 0; }
.hotel-tabs + .table-responsive thead th { background: #f6f8fb !important; color: #64748b; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: none; border-bottom: 1px solid #e6ebf2; padding-top: .8rem; padding-bottom: .8rem; }
.hotel-tabs + .table-responsive tbody tr { background: #fff; transition: background-color .12s; }
.hotel-tabs + .table-responsive tbody tr:hover { background: #f5f9ff; }
.hotel-tabs + .table-responsive tbody td { border-color: #eef1f5; padding-top: .85rem; padding-bottom: .85rem; }
.hotel-form-card > .kit-pager { background: #f8fafc; border-top: 1px solid #e6ebf2; }
.hotel-form-card > .card-body { background: #fff; }
.hotel-tabs { background: #e9eef5 !important; }
.hotel-tabs .nav-tabs { margin: 0 !important; background: transparent !important; }
.hotel-form-card > .card-body { max-width: none !important; margin: 0 !important; }
#hotel-settings-form { max-width: 1024px; margin: 0 auto; }

/* ---- 酒店列表：更紧凑 ---- */
.hotel-name-cell { max-width: 180px; min-width: 110px; }
.hotel-chips { gap: 4px; }
.hotel-chip { padding: 2px 7px; gap: 3px; font-size: 12px; line-height: 20px; }
.hotel-chip .ti { font-size: 13px; }
/* 操作按钮：不同浅色底区分 */
.hotel-actions { gap: 5px; }
.hotel-actions .btn { border: 0; transition: filter .15s, transform .15s; }
.hotel-actions .btn:hover { filter: brightness(.94); transform: translateY(-1px); }
.hotel-actions .btn.disabled { opacity: .35; pointer-events: none; }
.act-green  { background: #e3f6ec !important; color: #1f9d55 !important; }
.act-blue   { background: #e5f0fd !important; color: #1d6fd8 !important; }
.act-purple { background: #efe8fd !important; color: #7c4ddc !important; }
.act-orange { background: #fff1e0 !important; color: #e07d10 !important; }
.act-red    { background: #fde8e8 !important; color: #d63939 !important; }
.hotel-chips { flex-wrap: nowrap; gap: 3px; }
.hotel-chip { padding: 2px 6px; }
.hotel-name-cell { max-width: 150px; min-width: 90px; }
.hotel-actions .btn { width: 28px; height: 28px; }
.hotel-actions { gap: 4px; }
@media (max-width: 1500px) { .hotel-chip .ti { display: none; } }
.hotel-actions .btn { width: 30px !important; height: 30px !important; min-width: 0 !important; padding: 0 !important; }

/* ---- 文件字段：Tabler 组合输入框，“选择文件”在右 ---- */
.kit-file { flex-wrap: nowrap; }
.kit-file .form-control[readonly] { background: #fff; cursor: default; text-overflow: ellipsis; }
.kit-file-prev { padding: 3px 6px; background: #f6f8fb; }
.kit-file-prev img { height: 30px !important; max-width: 64px !important; }
.kit-file-prev a { font-size: 12px; text-decoration: none; }
.kit-file-btn { background: #f6f8fb !important; color: #475569 !important; border: 1px solid var(--tblr-border-color, #dadfe5) !important; font-weight: 500; white-space: nowrap; }
.kit-file-btn:hover { background: #eef2f7 !important; color: var(--tblr-primary, #066fd1) !important; }
.kit-file-clear { background: #fff !important; color: #94a3b8 !important; border: 1px solid var(--tblr-border-color, #dadfe5) !important; border-left: 0 !important; padding-left: .55rem; padding-right: .55rem; }
.kit-file-clear:hover { color: #d63939 !important; }
.kit-file-clear[hidden], .kit-file-prev[hidden] { display: none !important; }
.hotel-chips { justify-content: center; }

/* ---- 站点设置 ---- */
.settings-card .card-body { padding: 20px 24px 6px; }
.settings-card .hotel-field { grid-template-columns: 130px minmax(0, 1fr); }
.settings-card .card-header { background: #f8fafc; }
.settings-dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px 12px; }
.settings-dl dt { color: #64748b; font-weight: 500; }
.settings-dl dd { margin: 0; font-family: var(--tblr-font-monospace); font-size: 13px; color: #0f172a; word-break: break-all; background: #f6f8fb; border: 1px solid #e6ebf2; border-radius: 6px; padding: 4px 8px; }
.settings-connect { position: sticky; top: 16px; }

/* 语言包编辑 */
.lang-editor .lang-key { font-family: var(--tblr-font-monospace); font-size: .8125rem; word-break: break-all; }
.lang-editor .lang-ref { color: var(--tblr-secondary); font-size: .8125rem; }
.lang-editor tr.lang-empty .form-control { border-color: var(--tblr-warning); }
.lang-editor tr.lang-extra .lang-key::after { content: "不在键名列表"; margin-left: .4rem; font-family: var(--tblr-font-sans-serif); font-size: .7rem; color: var(--tblr-orange); }
.lang-footer { position: sticky; bottom: 0; z-index: 5; background: var(--tblr-bg-surface); }
.lang-keys { max-height: 60vh; overflow: auto; }
.lang-keys .lang-key-row { display: grid; grid-template-columns: 28px 1fr 1fr 34px; gap: .5rem; align-items: center; padding: .25rem 0; }
.smart-notice-info { color: #1d5f9f; background: #e8f2fd; }
@media (max-width: 767.98px) { .lang-editor th:nth-child(2), .lang-editor td:nth-child(2) { display: none; } }

/* 一键同步素材 */
.media-sync .sync-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.media-sync .sync-tile { border: 1px solid var(--tblr-border-color); border-radius: 8px; padding: .65rem .85rem; }
.media-sync .sync-tile .ti { font-size: 1.1rem; }
.media-sync .sync-tile b { font-size: 1.15rem; }
.media-sync .sync-tile.is-zero { opacity: .55; }
.media-sync .sync-current { font-family: var(--tblr-font-monospace); font-size: .75rem; }
.media-sync details summary { cursor: pointer; }
.media-sync .sync-list { max-height: 180px; overflow: auto; font-family: var(--tblr-font-monospace); font-size: .75rem; }

/* ---- 提示气泡 ---- */
.kit-toasts { position: fixed; top: 18px; right: 18px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.kit-toast { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(16, 32, 51, .16); border: 1px solid #e6ebf2; font-size: 13px; color: #1e293b; animation: kit-toast-in .18s ease-out; transition: opacity .3s, transform .3s; }
.kit-toast .ti { font-size: 18px; }
.kit-toast-success .ti { color: #2fb380; }
.kit-toast-danger .ti { color: #d63939; }
.kit-toast.is-out { opacity: 0; transform: translateY(-6px); }
@keyframes kit-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---- 操作按钮：统一大小、间距更宽 ---- */
.hotel-actions { display: inline-flex; gap: 8px !important; }
.hotel-actions .btn { width: 32px !important; height: 32px !important; border-radius: 9px; }
.hotel-actions .btn .ti { font-size: 17px; }
.act-cyan   { background: #e0f5f8 !important; color: #0f9bb0 !important; }
.act-yellow { background: #fff6d9 !important; color: #c98a00 !important; }
.act-teal   { background: #def7f1 !important; color: #0e9f7e !important; }
.act-dot { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---- 设备终端列表 ---- */
.terminal-table thead th { background: #f6f8fb; color: #64748b; font-size: 12px; font-weight: 600; border-bottom: 1px solid #e6ebf2; padding-top: .8rem; padding-bottom: .8rem; }
.terminal-table tbody tr { transition: background-color .12s; }
.terminal-table tbody tr:hover { background: #f5f9ff; }
.terminal-table tbody td { border-color: #eef1f5; padding-top: .8rem; padding-bottom: .8rem; }
.mac-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; padding: 2px 8px; border-radius: 6px; background: #f1f5f9; border: 1px solid #e3e8ef; font-family: var(--tblr-font-monospace); font-size: 12px; color: #334155; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.mac-chip .ti { font-size: 13px; color: #94a3b8; }
.mac-chip:hover { border-color: var(--tblr-primary, #066fd1); background: rgba(6, 111, 209, .06); color: var(--tblr-primary, #066fd1); }
.mac-chip:hover .ti { color: var(--tblr-primary, #066fd1); }

/* ---- APP 菜单：显示获焦图，点击切换失焦图 ---- */
.menu-icon { position: relative; display: inline-block; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 10px; }
.menu-icon img { width: 48px !important; height: 48px !important; max-width: none !important; object-fit: contain; border-radius: 10px; background: #f1f5f9; transition: transform .15s; }
.menu-icon:hover img { transform: scale(1.06); }
.menu-icon-tag { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); padding: 0 5px; border-radius: 4px; font-size: 10px; line-height: 15px; background: #066fd1; color: #fff; white-space: nowrap; }
.menu-icon.is-normal .menu-icon-tag { background: #64748b; }

/* ---- 酒店/社区列表：名称列收窄，留给参数和操作 ---- */
th.hotel-name-cell, td.hotel-name-cell { width: 1%; max-width: 150px !important; min-width: 80px !important; white-space: nowrap; }
.hotel-actions { justify-content: center; }
.menu-icon img.is-broken { opacity: .35; outline: 1px dashed #d63939; }
.hotel-chips { gap: 6px !important; }
.hotel-chip { padding: 3px 9px !important; }
@media (max-width: 1500px) { .hotel-chip .ti { display: inline-block; } }
@media (max-width: 1280px) { .hotel-chip .ti { display: none; } }

/* ---- 软解：跟随酒店 / 开启 / 关闭 ---- */
.soft-select { width: 98px; margin: 0 auto; font-size: 12px; padding-top: .2rem; padding-bottom: .2rem; }
.soft-select.is-follow { color: #64748b; background-color: #f8fafc; }
.soft-select.is-on { color: #1f9d55; border-color: #b7e4c7; background-color: #f0faf4; }

/* ---- 操作按钮：方形圆角（Tabler 的 .btn 自带 min-height:40px，会拉成长条） ---- */
.hotel-actions { align-items: center; }
.hotel-actions .btn { width: 34px !important; height: 34px !important; min-height: 0 !important; min-width: 0 !important; padding: 0 !important; border-radius: 10px !important; line-height: 1 !important; flex: 0 0 34px; }
.hotel-actions .btn .ti { font-size: 18px; }
.online-link { display: inline-flex; align-items: center; gap: 3px; text-decoration: none !important; }
.online-link .ti { font-size: 15px; color: #066fd1; }
.online-link:hover .badge { filter: brightness(.95); }

/* ---- 可搜索下拉 ---- */
.kit-combo { position: relative; flex: 1 1 auto; min-width: 0; }
.kit-combo-btn { width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background-color: #fff; }
.kit-combo-btn:disabled { background-color: var(--tblr-bg-surface-secondary, #f6f8fb); }
.kit-combo-text { display: block; overflow: hidden; text-overflow: ellipsis; }
.kit-combo-menu { position: absolute; z-index: 2100; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #dfe5ee; border-radius: 10px; box-shadow: 0 14px 34px rgba(16, 32, 51, .16); padding: 8px; min-width: 220px; }
.kit-combo-list { max-height: 280px; overflow: auto; margin-top: 6px; }
.kit-combo-item { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; color: #1e293b; }
.kit-combo-item:hover, .kit-combo-item.is-active { background: #eef5ff; color: #066fd1; }
.kit-combo-item.is-selected { font-weight: 600; color: #066fd1; }
.kit-combo-item.is-disabled { color: #a0aec0; cursor: not-allowed; background: none; }
.kit-combo-empty { padding: 10px; color: #94a3b8; font-size: 13px; text-align: center; }
.city-results { margin-top: 6px; border: 1px solid #dfe5ee; border-radius: 10px; overflow: hidden; }
.city-results button { display: flex; width: 100%; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 0; border-bottom: 1px solid #eef1f5; background: #fff; text-align: left; font-size: 13px; }
.city-results button:last-child { border-bottom: 0; }
.city-results button:hover { background: #eef5ff; color: #066fd1; }
.city-results small { color: #94a3b8; }
.soft-select { width: 112px !important; padding-left: .55rem !important; padding-right: 1.9rem !important; background-position: right .45rem center !important; }

/* ---- 设备终端：行底色（授权异常 / 在线 / 离线） ---- */
.terminal-table tbody tr.row-danger > td { background: #fff6f6; }
.terminal-table tbody tr.row-online > td { background: #f4fbf7; }
.terminal-table tbody tr.row-offline > td { background: #fff; }
.terminal-table tbody tr.row-danger:hover > td { background: #ffecec; }
.terminal-table tbody tr.row-online:hover > td { background: #e9f7ef; }
.terminal-table tbody tr.row-offline:hover > td { background: #f5f8fc; }
.dev-ctl { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 6px; font-size: 12px; line-height: 20px; white-space: nowrap; border: 1px solid transparent; }
.dev-ctl.is-on { background: #e3f6ec; color: #1f9d55; border-color: #bfe8d0; cursor: pointer; transition: filter .15s, transform .15s; }
.dev-ctl.is-on:hover { filter: brightness(.95); transform: translateY(-1px); }
.dev-ctl.is-off { background: #f1f5f9; color: #94a3b8; }
.dev-ctl .ti { font-size: 14px; }
.dev-dot { width: 7px; height: 7px; border-radius: 50%; background: #2fb380; box-shadow: 0 0 0 3px rgba(47, 179, 128, .2); animation: dev-pulse 1.8s ease-in-out infinite; }
@keyframes dev-pulse { 50% { box-shadow: 0 0 0 5px rgba(47, 179, 128, .05); } }

/* ---- 设备控制弹窗 ---- */
.smart-modal.ctl-modal { width: min(760px, calc(100vw - 32px)); margin-top: 6vh; }
.ctl-modal .smart-modal-body { padding: 20px 24px; max-height: 78vh; overflow: auto; }
.ctl-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.ctl-channel { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid #e6ebf2; border-radius: 12px; background: #f8fafc; }
.ctl-channel-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #e2e8f0; color: #94a3b8; font-size: 20px; flex: 0 0 38px; }
.ctl-channel.is-on { background: #f2fbf6; border-color: #c7ebd6; }
.ctl-channel.is-on .ctl-channel-icon { background: #d8f3e4; color: #1f9d55; }
.ctl-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.ctl-stat { padding: 10px 14px; border: 1px solid #e6ebf2; border-radius: 12px; }
.ctl-stat b { font-size: 16px; }
.ctl-section { margin-top: 14px; }
.ctl-title { font-size: 12px; font-weight: 600; color: #64748b; margin-bottom: 8px; letter-spacing: .02em; }
.ctl-app { padding: 2px 8px; border-radius: 6px; background: #f1f5f9; border: 1px solid #e3e8ef; font-family: var(--tblr-font-monospace); font-size: 12px; color: #334155; }
.ctl-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.ctl-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; border: 1px solid transparent; border-radius: 12px; font-size: 13px; cursor: pointer; transition: transform .15s, filter .15s, box-shadow .15s; }
.ctl-tile .ti { font-size: 22px; }
.ctl-tile em { position: absolute; top: 5px; right: 6px; font-style: normal; font-size: 9px; padding: 0 4px; border-radius: 4px; background: rgba(255, 255, 255, .8); }
.ctl-tile:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(16, 32, 51, .08); }
.ctl-tile:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.6); }
.ctl-tile.is-armed { box-shadow: 0 0 0 2px currentColor inset; }
.ctl-tile.is-blue { background: #e5f0fd; color: #1d6fd8; }
.ctl-tile.is-cyan { background: #e0f5f8; color: #0f9bb0; }
.ctl-tile.is-purple { background: #efe8fd; color: #7c4ddc; }
.ctl-tile.is-green { background: #e3f6ec; color: #1f9d55; }
.ctl-tile.is-orange { background: #fff1e0; color: #e07d10; }
.ctl-tile.is-red { background: #fde8e8; color: #d63939; }
.ctl-shot img { width: 100%; border-radius: 10px; border: 1px solid #e6ebf2; }
@media (max-width: 640px) { .ctl-channels, .ctl-stats { grid-template-columns: 1fr; } .ctl-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- 品牌：PHP 版的绿色图标 + 站点名称 ---- */
.site-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; min-width: 0; }
.site-brand img { width: 36px; height: 36px; border-radius: 9px; flex: 0 0 auto; }
.site-brand span { font-size: 21px; font-weight: 800; color: #00b377; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.site-brand:hover span { color: #009966; }
.site-brand-sidebar { padding: 4px 6px; max-width: 100%; }
.site-brand-mobile img { width: 30px; height: 30px; border-radius: 8px; }
.site-brand-mobile span { font-size: 17px; }
.site-brand-auth { display: flex; justify-content: center; margin: 0 auto 24px; }
.site-brand-auth img { width: 52px; height: 52px; border-radius: 13px; }
.site-brand-auth span { font-size: 28px; }

/* ---- 首页 ---- */
.home-page { min-height: 100vh; margin: 0; display: flex; flex-direction: column; background: radial-gradient(1200px 600px at 50% -10%, #d9f7ea 0%, rgba(217, 247, 234, 0) 60%), #f6faf8; }
.home-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 16px; }
.home-logo { width: 112px; height: 112px; border-radius: 28px; box-shadow: 0 18px 40px rgba(0, 179, 119, .28); }
.home-name { margin: 26px 0 8px; font-size: 40px; font-weight: 800; color: #00a86f; letter-spacing: .04em; }
.home-tagline { margin: 0 0 30px; color: #64748b; font-size: 16px; }
.home-btn { background: #00b377; border-color: #00b377; color: #fff; padding: 10px 26px; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 20px rgba(0, 179, 119, .25); }
.home-btn:hover { background: #009966; border-color: #009966; color: #fff; }
.home-foot { text-align: center; color: #94a3b8; font-size: 13px; padding: 18px 16px; }
@media (max-width: 576px) { .home-name { font-size: 30px; } .home-logo { width: 88px; height: 88px; border-radius: 22px; } }

/* 侧栏品牌：图标 + 名称靠左 */
.sidebar-brand-container .site-brand-sidebar { justify-content: flex-start !important; gap: 10px; width: auto; }
.site-brand img { margin: 0 !important; }

/* 全局：表格里的彩色方形操作按钮（与酒店列表一致） */
.btn.act-btn { width: 32px; height: 32px; min-height: 0 !important; min-width: 0; padding: 0 !important; border: 0 !important; border-radius: 9px !important; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; margin: 2px 0 2px 6px; transition: filter .15s, transform .15s; }
.btn.act-btn:first-child { margin-left: 0; }
.btn.act-btn .ti { font-size: 17px; margin: 0 !important; }
.btn.act-btn:hover { filter: brightness(.94); transform: translateY(-1px); }
.btn.act-btn:disabled, .btn.act-btn.disabled { opacity: .35; pointer-events: none; }

/* 侧栏品牌放大（与 paymentgo 一致） */
.site-brand-sidebar { gap: 12px !important; padding: 6px 4px !important; }
.site-brand-sidebar img { width: 48px !important; height: 48px !important; border-radius: 12px !important; }
.site-brand-sidebar span { font-size: 28px !important; letter-spacing: .03em; }
.stat-link { color: inherit; text-decoration: none !important; } .stat-link:hover { border-color: #00b377; }

/* ---- 存储分配 ---- */
.route-grid { display: grid; gap: 10px; }
.route-row { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, 1.4fr); gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid #e6ebf2; border-radius: 10px; background: #fbfcfe; }
.route-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 500; }
.route-kind .ti { font-size: 18px; }
.route-kind small, .route-fixed small { flex-basis: 100%; font-weight: 400; color: #94a3b8; font-size: 12px; }
.route-fixed { display: flex; flex-wrap: wrap; gap: 0 6px; color: #334155; }
.sync-target { margin-top: 4px; font-size: 12px; color: #7c4ddc; display: flex; align-items: center; gap: 3px; }
@media (max-width: 640px) { .route-row { grid-template-columns: 1fr; } }

/* 存储分配：APK 用了七牛测试域名时的提示 */
.route-pick { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.route-warn { font-size: .8125rem; color: var(--tblr-orange); line-height: 1.5; }
