/* ================================================================
   全站统一主题皮肤（轻量增强版）
   - 只统一字体、圆角、阴影、交互反馈等视觉细节
   - 不改变首页 / 用户中心原有的结构、栅格与布局
   ================================================================ */
:root {
    --brand: #2563eb;
    --brand-2: #7c3aed;
    --brand-soft: #eff6ff;
    --ink-900: #0f172a;
    --ink-600: #475569;
    --line-soft: #e6eaf2;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-hover: 0 14px 32px rgba(15, 23, 42, .10);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink-900);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(37, 99, 235, .18);
    color: var(--ink-900);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
    border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

a {
    transition: color .18s ease, opacity .18s ease;
}

.btn,
button.btn {
    border-radius: var(--radius-sm);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn:hover,
button.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}
.btn:active,
button.btn:active {
    transform: translateY(0);
}

:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .45);
    outline-offset: 2px;
}

img {
    max-width: 100%;
}

h1, h2, h3 {
    letter-spacing: .2px;
}

.card,
.panel,
.list-group-item {
    border-radius: var(--radius-md);
}

/* 统一的来源标签 */
.badge-source {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
}
.badge-source.main {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.badge-source.agent {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.badge-source.custom {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
/* 七彩云 / 七彩云 合并版 — 全局暗黑模式 */
html[data-theme="dark"]{
  color-scheme: dark;
  --qcy-bg:#0b1220;
  --qcy-bg-2:#0f1a2b;
  --qcy-surface:#121f33;
  --qcy-surface-2:#17263d;
  --qcy-surface-3:#1d3049;
  --qcy-border:#2a3d57;
  --qcy-border-2:#36506e;
  --qcy-text:#e7effa;
  --qcy-text-2:#c6d5e8;
  --qcy-muted:#93a7c0;
  --qcy-brand:#4f8ef7;
  --qcy-brand-2:#7cb0ff;
  --qcy-shadow:0 18px 44px rgba(0,0,0,.34);
}
html[data-theme="dark"] body{
  background:var(--qcy-bg) !important;
  color:var(--qcy-text) !important;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .h1,
html[data-theme="dark"] .h2,
html[data-theme="dark"] .h3,
html[data-theme="dark"] .h4,
html[data-theme="dark"] .h5,
html[data-theme="dark"] .h6{
  color:var(--qcy-text) !important;
}
html[data-theme="dark"] p,
html[data-theme="dark"] span,
html[data-theme="dark"] label,
html[data-theme="dark"] small,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary{
  color:var(--qcy-text-2);
}
html[data-theme="dark"] a{ color:var(--qcy-brand-2); }
html[data-theme="dark"] a:hover{ color:#a9cbff; }

/* 顶部 / 侧栏 / 页脚 */
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .header,
html[data-theme="dark"] .lyear-layout-header,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .lyear-layout-sidebar,
html[data-theme="dark"] .sidebar-header,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .site-footer{
  background:var(--qcy-surface) !important;
  border-color:var(--qcy-border) !important;
  color:var(--qcy-text) !important;
}
html[data-theme="dark"] .lyear-layout-sidebar-info,
html[data-theme="dark"] .nav-drawer,
html[data-theme="dark"] .nav-subnav,
html[data-theme="dark"] .sidebar-main{
  background:transparent !important;
}
html[data-theme="dark"] .nav-drawer > li > a,
html[data-theme="dark"] .nav-subnav a,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .dropdown-item{
  color:var(--qcy-text-2) !important;
}
html[data-theme="dark"] .nav-drawer > li.active > a,
html[data-theme="dark"] .nav-drawer > li > a:hover,
html[data-theme="dark"] .nav-subnav a:hover,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .dropdown-item:hover{
  background:var(--qcy-surface-2) !important;
  color:#fff !important;
}

/* 卡片 / 面板 / 弹层 */
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .popover,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .accordion,
html[data-theme="dark"] .list-group,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .well,
html[data-theme="dark"] .jumbotron,
html[data-theme="dark"] .home-card,
html[data-theme="dark"] .scenario-card,
html[data-theme="dark"] .faq-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .process-card,
html[data-theme="dark"] .benefit-card,
html[data-theme="dark"] .config-card,
html[data-theme="dark"] .host-card,
html[data-theme="dark"] .order-card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .panel-card,
html[data-theme="dark"] .data-card,
html[data-theme="dark"] .login-box,
html[data-theme="dark"] .layui-layer,
html[data-theme="dark"] .sweet-alert{
  background:var(--qcy-surface) !important;
  border-color:var(--qcy-border) !important;
  color:var(--qcy-text) !important;
  box-shadow:var(--qcy-shadow) !important;
}
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .dropdown-header,
html[data-theme="dark"] .list-group-item + .list-group-item{
  background:var(--qcy-surface-2) !important;
  border-color:var(--qcy-border) !important;
  color:var(--qcy-text) !important;
}
html[data-theme="dark"] .home-card-top,
html[data-theme="dark"] .stat-card-top,
html[data-theme="dark"] .config-item,
html[data-theme="dark"] .benefit-tag,
html[data-theme="dark"] .home-section-head{
  background:var(--qcy-surface-2) !important;
  border-color:var(--qcy-border) !important;
  color:var(--qcy-text) !important;
}

/* 表格 */
html[data-theme="dark"] .table{
  color:var(--qcy-text) !important;
  border-color:var(--qcy-border) !important;
}
html[data-theme="dark"] .table th,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table tbody tr{
  background:var(--qcy-surface) !important;
  border-color:var(--qcy-border) !important;
  color:var(--qcy-text) !important;
}
html[data-theme="dark"] .table thead th{
  background:var(--qcy-surface-2) !important;
}
html[data-theme="dark"] .table-hover tbody tr:hover,
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd){
  background:var(--qcy-surface-2) !important;
}

/* 表单 */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .custom-select,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input,
html[data-theme="dark"] select{
  background:var(--qcy-surface-2) !important;
  border-color:var(--qcy-border-2) !important;
  color:var(--qcy-text) !important;
}
html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] textarea::placeholder{
  color:var(--qcy-muted) !important;
}
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus{
  border-color:var(--qcy-brand) !important;
  box-shadow:0 0 0 3px rgba(79,142,247,.2) !important;
}

/* 按钮 */
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-white,
html[data-theme="dark"] .btn-default,
html[data-theme="dark"] .btn-outline-secondary{
  background:var(--qcy-surface-2) !important;
  border-color:var(--qcy-border-2) !important;
  color:var(--qcy-text) !important;
}
html[data-theme="dark"] .btn-light:hover,
html[data-theme="dark"] .btn-white:hover,
html[data-theme="dark"] .btn-default:hover{
  background:var(--qcy-surface-3) !important;
  color:#fff !important;
}

/* 分页 / 面包屑 / 标签页 / 提示 */
html[data-theme="dark"] .pagination .page-link,
html[data-theme="dark"] .page-link,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .nav-tabs,
html[data-theme="dark"] .alert{
  background:var(--qcy-surface-2) !important;
  border-color:var(--qcy-border) !important;
  color:var(--qcy-text) !important;
}
html[data-theme="dark"] .nav-tabs .nav-link.active{
  background:var(--qcy-surface-3) !important;
  border-color:var(--qcy-border) !important;
  color:#fff !important;
}

/* 代码 / 日志 / 富文本 */
html[data-theme="dark"] pre,
html[data-theme="dark"] code,
html[data-theme="dark"] .code,
html[data-theme="dark"] .log-box,
html[data-theme="dark"] .CodeMirror{
  background:#08111f !important;
  color:#cfe3ff !important;
  border-color:var(--qcy-border) !important;
}

/* 滚动条 */
html[data-theme="dark"] ::-webkit-scrollbar-track{ background:var(--qcy-bg-2); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb{ background:var(--qcy-border-2); }
html[data-theme="dark"] ::selection{ background:rgba(79,142,247,.35); color:#fff; }

/* 日夜切换按钮 */
.qcy-theme-toggle{
  position:fixed; right:18px; bottom:78px; z-index:2147483000;
  width:46px; height:46px; border-radius:50%;
  border:1px solid #dbe7f5; background:#fff; color:#1e3a5f;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 28px rgba(30,64,110,.2);
  cursor:pointer; transition:transform .2s ease, background .2s ease, color .2s ease;
}
.qcy-theme-toggle:hover{ transform:translateY(-2px) scale(1.03); }
.qcy-theme-toggle svg{ width:22px; height:22px; }
html[data-theme="dark"] .qcy-theme-toggle{
  background:var(--qcy-surface-2); color:#ffe7a3; border-color:var(--qcy-border-2);
  box-shadow:0 10px 28px rgba(0,0,0,.35);
}
@media (max-width:767px){
  .qcy-theme-toggle{ right:12px; bottom:74px; width:42px; height:42px; }
  .qcy-theme-toggle svg{ width:20px; height:20px; }
}

/* ===== 合并版统一美化（销售后台） ===== */
:root{
  --qcy-radius:14px;
  --qcy-card-shadow:0 10px 30px rgba(20,58,102,.08);
}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}
.card,.panel,.box,.layui-card{
  border-radius:var(--qcy-radius)!important;
  border:1px solid #e3edf8;
  box-shadow:var(--qcy-card-shadow);
}
.card-header,.panel-heading{
  background:linear-gradient(180deg,#fbfdff,#f3f8fe)!important;
  border-bottom:1px solid #e3edf8!important;
  border-radius:var(--qcy-radius) var(--qcy-radius) 0 0!important;
  color:#183a5c!important;font-weight:700;
}
.btn,.layui-btn{border-radius:9px!important;font-weight:600;}
.btn-primary{background:linear-gradient(135deg,#2563eb,#4f8ef7);border-color:#2563eb!important;}
.btn-success{background:linear-gradient(135deg,#0f9f6e,#22c55e);border-color:#0f9f6e!important;}
.btn-danger{background:linear-gradient(135deg,#dc2626,#f05252);border-color:#dc2626!important;}
.form-control,.form-select,.layui-input,.layui-select{border-radius:9px!important;border:1px solid #d8e5f3!important;}
.form-control:focus,.form-select:focus,.layui-input:focus{border-color:#4f8ef7!important;box-shadow:0 0 0 3px rgba(79,142,247,.18)!important;}
.table,.layui-table{border-radius:10px!important;overflow:hidden;}
.table>thead th,.layui-table-header th{background:#f3f8fe!important;color:#22425f!important;font-weight:700!important;}
.table td,.table th,.layui-table td,.layui-table th{vertical-align:middle;}
.badge,.layui-badge{border-radius:6px!important;}

/* 暗黑模式：去掉看不清的灰色文字，统一高对比 */
html[data-theme="dark"]{
  --qcy-text-2:#e2edfb;
  --qcy-muted:#cbd9ea;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .layui-card,
html[data-theme="dark"] td,
html[data-theme="dark"] th,
html[data-theme="dark"] label,
html[data-theme="dark"] span,
html[data-theme="dark"] small,
html[data-theme="dark"] li,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary,
html[data-theme="dark"] .text-body-secondary,
html[data-theme="dark"] .text-black-50,
html[data-theme="dark"] .text-white-50,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .gray,
html[data-theme="dark"] .desc,
html[data-theme="dark"] .tip,
html[data-theme="dark"] .note,
html[data-theme="dark"] .help,
html[data-theme="dark"] .help-block,
html[data-theme="dark"] .form-text,
html[data-theme="dark"] .card-subtitle,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .metric-label,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .dropdown-item{
  color:#e2edfb!important;
}
html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .layui-input::placeholder{color:#b9c9dd!important;}
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .box,
html[data-theme="dark"] .layui-card{background:var(--qcy-surface)!important;border-color:var(--qcy-border)!important;box-shadow:0 16px 40px rgba(0,0,0,.28)!important;}
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .layui-card-header{background:var(--qcy-surface-2)!important;color:#f2f7ff!important;border-color:var(--qcy-border)!important;}
html[data-theme="dark"] .table>thead th,
html[data-theme="dark"] .layui-table-header th{background:var(--qcy-surface-3)!important;color:#f4f8ff!important;}
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th,
html[data-theme="dark"] .layui-table td,
html[data-theme="dark"] .layui-table th{color:#e2edfb!important;border-color:var(--qcy-border)!important;}

/* ================================================================
   后台长表单 / 弹窗滚动兼容
   解决：参数1-10 等长表单在手机上拉不到底、底部“修改/确定”按钮点不到
   ================================================================ */
@media (max-width: 1024px){
    html, body{
        height:auto !important;
        min-height:100% !important;
        overflow-y:auto !important;
    }
    .lyear-layout-content{
        position:relative !important;
        height:auto !important;
        min-height:calc(100vh - var(--header-height));
        overflow:visible !important;
        padding-bottom:90px !important;
    }
    .lyear-layout-content > .container-fluid{
        padding-bottom:90px !important;
    }
}
.layui-layer-page .layui-layer-content,
.layui-layer-iframe .layui-layer-content{
    max-height:calc(100vh - 120px);
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch;
}
.layui-layer-iframe iframe{
    max-height:calc(100vh - 120px);
}
.admin-product-form-actions{
    position:sticky;
    bottom:0;
    z-index:3;
    padding:12px 0;
    background:inherit;
}
