*{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;line-height:1.6}
a{text-decoration:none;color:inherit}
.app-shell{min-height:100vh;display:flex;flex-direction:column}
.app-header{display:flex;align-items:center;justify-content:space-between;padding:12px 24px;position:sticky;top:0;z-index:20}
.header-left{display:flex;align-items:center;gap:12px;min-width:0}
.mobile-nav-toggle{display:none;border:1px solid rgba(148,163,184,.45);background:rgba(255,255,255,.65);backdrop-filter:blur(10px);border-radius:12px;padding:6px 10px;font-size:18px;line-height:1;cursor:pointer}
.app-body.theme-dark .mobile-nav-toggle{background:rgba(15,23,42,.55);color:#e5e7eb}
.mobile-nav-close{display:none;border:none;background:transparent;font-size:26px;line-height:1;cursor:pointer;align-self:flex-end;color:#9ca3af;margin:2px 2px 10px 0}
.app-body.theme-dark .mobile-nav-close{color:#6b7280}
/*
  注意：.app-header 设了 z-index，会形成 stacking context。
  如果遮罩层 z-index 高于 header，会把抽屉里的链接“盖住”，导致无法点击。
  因此把遮罩层放在 header 之下，但仍高于页面主体。
*/
.nav-backdrop{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:15}

/* 移动端抽屉导航 */
@media (max-width: 960px){
  .mobile-nav-toggle{display:inline-flex;align-items:center;justify-content:center}
  .nav-links{position:fixed;top:0;right:0;height:100vh;width:min(84vw,360px);padding:16px 16px 22px;margin:0;display:flex;flex-direction:column;gap:6px;overflow:auto;z-index:40;transform:translateX(110%);transition:transform .22s ease;background:rgba(255,255,255,.92);backdrop-filter:blur(18px);box-shadow:-18px 0 40px rgba(15,23,42,.18)}
  .app-body.theme-dark .nav-links{background:rgba(15,23,42,.92);box-shadow:-18px 0 40px rgba(0,0,0,.55)}
  .nav-links a{margin:0;padding:10px 10px;border-radius:12px;opacity:1}
  .nav-links a:hover{background:rgba(148,163,184,.14)}
  .mobile-nav-close{display:inline-flex}
  body.nav-open .nav-links{transform:translateX(0)}
  body.nav-open .nav-backdrop{display:block}
}
.app-main{flex:1;padding:24px;max-width:1400px;margin:0 auto;width:100%}
.logo{font-weight:700;font-size:20px}
.nav-links a{margin-left:16px;font-size:14px;opacity:.85}
.nav-links a:hover{opacity:1}
.theme-toggle{border:none;background:transparent;font-size:20px;cursor:pointer;margin-left:16px}
.glass{backdrop-filter:blur(16px);background:rgba(255,255,255,0.8);box-shadow:0 8px 24px rgba(15,23,42,.08)}
.app-body.theme-dark .glass{background:rgba(15,23,42,.85)}
.app-body.theme-light{background:#f3f4f6;color:#111827}
.app-body.theme-dark{background:radial-gradient(circle at top,#1e293b,#020617);color:#e5e7eb}
.card{background:rgba(255,255,255,0.9);border-radius:16px;padding:20px;margin-bottom:16px;box-shadow:0 10px 30px rgba(15,23,42,.08)}
.app-body.theme-dark .card{background:rgba(15,23,42,0.9);box-shadow:0 20px 45px rgba(0,0,0,.6)}
.hero{margin-top:64px;text-align:center}
.hero h1{font-size:32px;margin-bottom:12px}
.hero p{color:#6b7280}
.hero-actions{margin-top:24px}
.btn{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;border:1px solid rgba(148,163,184,.5);padding:8px 18px;font-size:14px;cursor:pointer;transition:all .15s;background:transparent}
.btn.primary{background:linear-gradient(135deg,#3b82f6,#6366f1);border:none;color:#fff;box-shadow:0 10px 25px rgba(59,130,246,.35)}
.btn.primary:hover{transform:translateY(-1px);box-shadow:0 14px 35px rgba(59,130,246,.45)}
.btn.small{padding:4px 10px;font-size:12px}
.table{width:100%;border-collapse:collapse;font-size:14px;background:rgba(255,255,255,0.95);border-radius:16px;overflow:hidden}
.table th,.table td{padding:8px 10px;border-bottom:1px solid rgba(148,163,184,.25)}
.table thead{background:rgba(148,163,184,.1)}
.app-body.theme-dark .table{background:rgba(15,23,42,0.9)}
.app-body.theme-dark .table thead{background:rgba(30,64,175,.3)}
label{display:block;margin-top:10px;margin-bottom:4px;font-size:13px}
input,select,textarea{width:100%;padding:8px 10px;border-radius:10px;border:1px solid rgba(148,163,184,.6);background:rgba(255,255,255,.9);font-size:14px}
textarea{resize:vertical}
.app-body.theme-dark input,.app-body.theme-dark select,.app-body.theme-dark textarea{background:rgba(15,23,42,.9);color:#e5e7eb;border-color:rgba(148,163,184,.6)}
.flash-list{margin-bottom:16px}
.flash{padding:10px 14px;border-radius:12px;margin-bottom:8px;font-size:13px}
.flash-success{background:rgba(34,197,94,.1);color:#166534}
.flash-danger{background:rgba(239,68,68,.08);color:#b91c1c}
.flash-warning{background:rgba(245,158,11,.08);color:#92400e}
.flash-info{background:rgba(59,130,246,.08);color:#1d4ed8}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.grid-3{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.grid-4{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}


.grid-products{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
@media (min-width:1200px){
  .grid-products{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (min-width:1600px){
  .grid-products{grid-template-columns:repeat(6,minmax(0,1fr))}
}
@media (max-width:960px){
  .grid-products{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .grid-products{grid-template-columns:repeat(1,minmax(0,1fr))}
}
.grid-5{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
@media (max-width:960px){
  .grid-5{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .grid-5{grid-template-columns:repeat(1,minmax(0,1fr))}
}
@media (max-width:960px){
  .grid-4,.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .grid-4,.grid-3,.grid-2{grid-template-columns:repeat(1,minmax(0,1fr))}
  .app-main{padding:14px}
  .app-header{padding:10px 12px;gap:10px}
  .logo{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70vw}
  .theme-toggle{font-size:18px}
  .card{padding:14px;border-radius:14px}
  .hero{margin-top:34px}
  .hero h1{font-size:24px}
  .hero.hero-with-canvas{margin-top:44px;padding:36px 14px 44px;border-radius:22px}
  .hero.hero-with-canvas h1{font-size:26px}
  .flex-between{flex-direction:column;align-items:stretch}
  .flex-between > *{width:100%}
  .btn{padding:10px 16px}
  input,select,textarea{border-radius:12px;padding:10px 12px}
  /* 防止 iOS 输入框自动缩放 */
  input,select,textarea,button{font-size:16px}
}

/* 表格：移动端横向滚动，避免挤压 */
@media (max-width: 960px){
  .table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .table th,.table td{white-space:nowrap}
}

/* 过滤/查询表单：移动端纵向堆叠 */
@media (max-width: 640px){
  .filter-form .filter-row{flex-direction:column;align-items:stretch}
  .filter-form .filter-row label{margin:0}
  .filter-form .filter-row select,
  .filter-form .filter-row input[type="date"],
  .filter-form .filter-row input[type="text"],
  .filter-form .filter-row input[type="number"]{width:100%}
  .filter-row{align-items:stretch}
  .filter-label{min-width:0}
}

/* ===== 全局移动端适配（全页面） ===== */
@media (max-width: 640px){
  .app-header{padding:10px 12px;gap:10px}
  .logo{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:72vw}
  .theme-toggle{font-size:18px;margin-left:8px}

  .hero{margin-top:32px}
  .hero h1{font-size:24px}
  .hero.hero-with-canvas{margin-top:28px;padding:40px 14px 48px;border-radius:22px}
  .hero.hero-with-canvas h1{font-size:26px}

  .card{padding:14px;border-radius:14px}
  .btn{width:100%;justify-content:center}
  .btn.small,.btn.x-small{width:auto}

  .flex-between{flex-direction:column;align-items:stretch}
  .flex-between > *{width:100%}

  /* 表格：手机端横向滚动 */
  .table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:14px}
  .table th,.table td{white-space:nowrap}

  /* 过滤/搜索行在手机端改为纵向 */
  .filter-form .filter-row{flex-direction:column;align-items:stretch}
  .filter-form .filter-row select,
  .filter-form .filter-row input[type="date"]{width:100%}

  .filters-panel{padding:10px 12px}
  .filter-row{flex-direction:column;align-items:stretch}
  .filter-label{min-width:0}
  .filter-chips{gap:8px}

  /* 登录页：左右留白更紧凑 */
  .login-landing{padding-top:16px;gap:16px}
  .login-hero-overlay{padding:22px 18px}
  .login-hero-title{font-size:24px}
}

/* iOS/安卓：避免输入框触发页面放大 */
@media (max-width: 480px){
  input,select,textarea{font-size:16px}
}
.stat{font-size:14px}
.stat strong{display:block;font-size:20px;margin-top:4px}
.flex-between{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:12px}
.mt{margin-top:16px}
.muted{color:#6b7280;font-size:13px}
.app-body.theme-dark .muted{color:#9ca3af}
.clock-city{font-size:14px;margin-bottom:4px}
.clock-time{font-size:18px;font-weight:600}

/* =========================================================
   全站精细移动端排版（表单/按钮条/详情页信息）
   ========================================================= */

/* 通用间距工具（模板里大量使用） */
.mt-small{margin-top:10px}
.mt-0{margin-top:0}
.mb-3{margin-bottom:16px}
.mb-2{margin-bottom:12px}
.mb-1{margin-bottom:8px}

/* 更适合小屏阅读：长文本自动换行，避免“顶出”卡片 */
.card p,
.glass-card p,
.metric-card p,
.table td{word-break:break-word;overflow-wrap:anywhere}

/* glass-card / header bar / metric 文案（模板里用得很多） */
.glass-card{border-radius:18px;padding:0;margin-bottom:16px;border:1px solid rgba(148,163,184,.18);background:rgba(255,255,255,.78);backdrop-filter:blur(16px);box-shadow:0 10px 28px rgba(15,23,42,.08)}
.app-body.theme-dark .glass-card{background:rgba(15,23,42,.82);border-color:rgba(148,163,184,.18);box-shadow:0 24px 55px rgba(0,0,0,.55)}
.card-header-bar{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:16px 18px;border-bottom:1px solid rgba(148,163,184,.18)}
.card-body-inner{padding:18px}
.metric-label{font-size:18px;font-weight:650;letter-spacing:.2px}
.metric-value{font-size:13px;color:#6b7280}
.app-body.theme-dark .metric-value{color:#9ca3af}

.pill-soft{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 12px;border-radius:999px;border:1px solid rgba(148,163,184,.22);background:rgba(148,163,184,.08);font-size:13px;color:#111827}
.app-body.theme-dark .pill-soft{background:rgba(148,163,184,.12);color:#e5e7eb}
.pill-soft .dot{width:8px;height:8px;border-radius:999px;background:#22c55e;display:inline-block}
.pill-soft .pill-label{opacity:.85}

/* “右侧信息块”（很多详情页/编辑页用 text-align:right） */
.right-meta{font-size:13px;color:#6b7280;text-align:right}
.app-body.theme-dark .right-meta{color:#9ca3af}

/* ====== 轻量栅格：兼容模板中的 row/col-md-?（无需引入 Bootstrap） ====== */
.row{display:flex;flex-wrap:wrap}
.row.g-3{gap:16px}
.row.g-2{gap:12px}
.row > [class*="col-"]{min-width:0}
/* 默认（移动端）：都占满一行 */
[class^="col-"],
[class*=" col-"]{flex:1 1 100%}
@media(min-width:768px){
  .col-md-12{flex:0 0 100%}
  .col-md-6{flex:0 0 calc(50% - 8px)}
  .col-md-4{flex:0 0 calc(33.333% - 11px)}
  .col-md-3{flex:0 0 calc(25% - 12px)}
  .col-md-2{flex:0 0 calc(16.666% - 14px)}
}

.form-label{display:block;margin-top:10px;margin-bottom:6px;font-size:13px}
.form-text{font-size:12px;color:#6b7280;line-height:1.5}
.app-body.theme-dark .form-text{color:#9ca3af}
.form-control,.form-select,.input-glass{width:100%}

/* ====== 表单行/按钮条：在手机端不挤一行 ====== */
.inline-form{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.inline-form label{margin:0;font-size:13px;white-space:nowrap}
.inline-form select,.inline-form input{width:auto;min-width:160px}
.inline-form .btn{width:auto}

.form-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:16px}
.form-actions .btn{width:auto}

/* Mobile fixed bottom action bar (App-like) */
.mobile-action-bar{display:none}
body.has-action-bar{padding-bottom:var(--action-bar-height, 0px)}
@media (max-width: 640px){
  .mobile-action-bar{
    display:flex;
    gap:10px;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    padding:10px 12px;
    background:rgba(255,255,255,0.98);
    border-top:1px solid rgba(148,163,184,0.35);
    z-index:1100;
    backdrop-filter:saturate(180%) blur(10px);
  }
  .mobile-action-bar .btn{flex:1;min-height:44px}

  /* When the fixed bar exists, hide the normal action area to avoid duplicate buttons */
  body.has-action-bar .form-actions{display:none}

  /*
    修复：页面内容较短时，最后一行表单可能被底部固定操作条遮挡（如“确认密码”输入框）。
    除了 body 留白外，再给内容容器增加等量底部 padding，保证无需滚动也能看到最后一行。
  */
  body.has-action-bar .app-main{padding-bottom:calc(var(--action-bar-height, 0px) + 8px)}
  body.has-action-bar .glass-card .card-body-inner{padding-bottom:calc(18px + var(--action-bar-height, 0px))}
}

/* 通用“按钮行”容器：详情页顶部返回/新增等 */
.btn-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* ====== 详情页信息：更像“键值对卡片”，手机端更好读 ====== */
.kv{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.kv p{margin:0;display:flex;gap:8px;flex-wrap:wrap;align-items:flex-start}
.kv p strong{min-width:84px;color:#6b7280;font-weight:600}
.app-body.theme-dark .kv p strong{color:#9ca3af}

/* ====== 小屏专属细化 ====== */
@media (max-width: 640px){
  /* header bar/右侧信息块：改为纵向堆叠 */
  .card-header-bar{flex-direction:column;align-items:stretch}
  .right-meta{width:100%;text-align:left}

  /* inline-form：改为纵向（尤其是“状态更新/转交”等） */
  .inline-form{justify-content:flex-start;flex-direction:column;align-items:stretch}
  .inline-form select,.inline-form input{width:100%;min-width:0}
  .inline-form .btn{width:100%}

  /* 表单底部按钮：竖排大按钮更好点 */
  .form-actions{flex-direction:column;align-items:stretch}
  .form-actions .btn{width:100%}

  /* 修复部分模板使用 inline 的 text-align:right：移动端强制左对齐 */
  .app-main div[style*="text-align:right"]{text-align:left !important}

  /* 详情页键值对：标签宽度更小 */
  .kv p strong{min-width:72px}
}


/* 商品卡片主图缩略图样式 */
.card.product-card .product-thumb-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
  background: #e5e7eb;
}

.app-body.theme-dark .card.product-card .product-thumb-wrap {
  background: #020617;
}

.card.product-card .product-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 客户首页可下单商品的缩略图同样使用 product-card 视觉 */


/* 下单页商品信息头部布局 */
.product-order-head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.product-order-thumb {
  width: 220px;
  max-width: 30%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #e5e7eb;
}

.app-body.theme-dark .product-order-thumb {
  background: #020617;
}

.product-order-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-order-meta {
  flex: 1;
  min-width: 0;
}

.product-order-detail {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #4b5563;
}

.app-body.theme-dark .product-order-detail {
  color: #e5e7eb;
}

@media (max-width: 768px) {
  .product-order-head {
    flex-direction: column;
  }
  .product-order-thumb {
    width: 100%;
    max-width: 100%;
  }
}


/* 通用过滤表单布局 */
.filter-form .filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.filter-form .filter-row label {
  font-size: 0.9rem;
}

.filter-form .filter-row select,
.filter-form .filter-row input[type="date"] {
  padding: 4px 8px;
  font-size: 0.9rem;
}

.ml {
  margin-left: 8px;
}


.nav-icon-link{position:relative;display:inline-flex;align-items:center;justify-content:center;margin-left:16px;font-size:18px}
.badge{display:inline-block;min-width:18px;padding:0 4px;font-size:12px;border-radius:999px;background:#ef4444;color:#fff;margin-left:4px;text-align:center}
.badge-dot{min-width:8px;width:8px;height:8px;padding:0;border-radius:999px;font-size:0;}
.notify-list{list-style:none;margin-top:12px}
.notify-item{padding:12px 0;border-bottom:1px solid rgba(148,163,184,0.4)}
.notify-item.unread .notify-title{font-weight:600}
.notify-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.notify-title{display:inline-flex;align-items:center;gap:4px}
.notify-time{font-size:12px;color:#6b7280}
.notify-body{font-size:14px;color:#111827;margin-bottom:4px}
.app-body.theme-dark .notify-body{color:#e5e7eb}
.notify-actions .btn.small{padding:4px 10px;font-size:12px}
.notify-item .dot{display:inline-block;width:8px;height:8px;border-radius:999px;background:#22c55e;margin-right:4px}


.card-list{display:flex;flex-direction:column;gap:12px}
.article-body{font-size:14px;line-height:1.8}
.article-body p{margin-bottom:0.75rem}
.article-body ul{margin:0.5rem 0 0.5rem 1.2rem;padding-left:0}
.article-body li{margin-bottom:0.25rem}


.btn.x-small{
  padding:2px 6px;
  font-size:12px;
  line-height:1.4;
}


/* --- 全局 UI 动画增强 --- */

.card,
.glass-card,
.metric-card,
.table,
.table tbody tr{
  transition:transform .25s ease,box-shadow .25s ease,background-color .25s ease,border-color .25s ease;
}

.card:hover,
.glass-card:hover,
.metric-card:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 45px rgba(15,23,42,.18);
}

.table tbody tr:hover{
  background:rgba(148,163,184,.06);
}

/* 顶部导航下划线动画 */
.nav-links a{
  position:relative;
  transition:color .2s ease,opacity .2s ease;
}

.nav-links a::after{
  content:'';
  position:absolute;
  left:0;
  bottom:-2px;
  width:0;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,#6366f1,#22c55e);
  transition:width .25s ease;
}

.nav-links a:hover::after{
  width:100%;
}

/* 按钮闪光效果 */
.btn{
  position:relative;
  overflow:hidden;
}

.btn::after{
  content:'';
  position:absolute;
  left:-120%;
  top:0;
  width:120%;
  height:100%;
  background:linear-gradient(120deg,rgba(255,255,255,.28),transparent);
  opacity:0;
  transform:translateX(0);
  transition:opacity .45s ease,transform .45s ease;
}

.btn:hover::after{
  opacity:1;
  transform:translateX(120%);
}

/* 粒子背景画布 */
.bg-particles{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:.9;
  display:none;
}

/* 只有带 data-space-bg 的页面才显示宇宙背景 */
.app-body[data-space-bg="1"] .bg-particles{
  display:block;
}

.app-shell{
  position:relative;
  z-index:1;
}


/* 登录页布局 + 光束背景 */
.login-landing{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);
  gap:32px;
  align-items:stretch;
  min-height:calc(100vh - 80px);
  padding-top:32px;
}

@media(max-width:960px){
  .login-landing{
    grid-template-columns:minmax(0,1fr);
  }
}

.login-hero{
  position:relative;
  border-radius:24px;
  overflow:hidden;
  background:radial-gradient(circle at top,#020617,#020617);
  box-shadow:0 22px 55px rgba(15,23,42,.85);
}

.app-body.theme-light .login-hero{
  background:radial-gradient(circle at top,#1d4ed8,#020617);
}

.login-hero-canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
}

.login-hero-overlay{
  position:relative;
  z-index:1;
  padding:32px 40px;
  color:#e5e7eb;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:12px;
}

.login-hero-kicker{
  font-size:13px;
  letter-spacing:.16em;
  text-transform:uppercase;
  opacity:.8;
}

.login-hero-title{
  font-size:32px;
  font-weight:700;
}

.login-hero-sub{
  font-size:14px;
  max-width:420px;
  opacity:.9;
}

.login-card{
  align-self:center;
  max-width:480px;
  margin-left:auto;
}

@media(max-width:960px){
  .login-card{
    margin:0 auto;
  }
}


/* 首页 Hero 粒子背景容器 */

.hero.hero-with-canvas{
  position:relative;
  margin-top:96px;
  padding:72px 24px 96px;
  border-radius:32px;
  overflow:hidden;
  background:rgba(15,23,42,.55);
  box-shadow:0 24px 60px rgba(15,23,42,.6);
  backdrop-filter:blur(18px);
  color:#e5e7eb;
}
.hero.hero-with-canvas .hero-inner{
  position:relative;
  z-index:1;
}
.app-body.theme-light .hero.hero-with-canvas,
.app-body.theme-dark .hero.hero-with-canvas{
  background:rgba(15,23,42,.55);
}
.hero.hero-with-canvas h1{
  font-size:36px;
  margin-bottom:12px;
}
.hero.hero-with-canvas p{
  color:rgba(226,232,240,.86);
}
.hero.hero-with-canvas .hero-actions{
  margin-top:28px;
}
.hero.hero-with-canvas .hero-actions .btn{
  box-shadow:0 18px 40px rgba(15,23,42,.55);
}
/* 通用弹窗样式 */
.modal-backdrop{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,.45);
  z-index:50;
}
.modal-backdrop.show{
  display:flex;
}
.modal-panel{
  position:relative;
  max-width:520px;
  width:92%;
}
.modal-close{
  position:absolute;
  top:10px;
  right:14px;
  border:none;
  background:transparent;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  color:#9ca3af;
}
.modal-close:hover{
  color:#4b5563;
}
.app-body.theme-dark .modal-close{
  color:#6b7280;
}
.badge.danger {
  background-color: #dc3545;
  color: #fff;
}
/* --- 客户首页：可下单商品筛选 UI --- */

.filters-panel{
  margin-top:8px;
  margin-bottom:18px;       /* 和下面商品卡片拉开距离 */
  padding:12px 16px;
  border-radius:14px;
  background:#f9fafb;
  box-shadow:0 6px 18px rgba(15,23,42,.06);
}

.app-body.theme-dark .filters-panel{
  background:rgba(15,23,42,.85);
}

.filters-panel-title{
  font-size:13px;
  font-weight:600;
  margin-bottom:4px;
}

.filter-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
  margin-top:6px;
}

.filter-label{
  font-size:13px;
  color:#6b7280;
  min-width:68px;
  line-height:1.8;
}

.filter-chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.filter-chip{
  padding:2px 14px;
  border-radius:999px;
  font-size:13px;
  background:#f3f4f6;
  color:#374151;
  text-decoration:none;
  line-height:1.9;
  cursor:pointer;
  border:1px solid transparent;
}

.filter-chip:hover{
  background:#e5e7eb;
}

.filter-chip.active{
  background:#10b981;
  color:#fff;
  border-color:#0ea76a;
}
/* ===== 导航首页样式 ===== */
.nav-landing {
  max-width: 1040px;
  margin: 40px auto 64px;
  padding: 24px;
}

.nav-landing-header {
  text-align: center;
  color: #f9fafb;
  margin-bottom: 24px;
}

.nav-logo-circle {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.9);
}

.nav-landing-header h1 {
  font-size: 30px;
  letter-spacing: 2px;
}

.nav-subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: #cbd5f5;
}

.nav-auth-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* 公告条 */
.nav-announcement {
  margin: 0 auto 24px;
  padding: 12px 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-announcement-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  font-size: 12px;
  white-space: nowrap;
}

.nav-announcement-text {
  font-size: 13px;
}

/* 导航卡片 */
.nav-links-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.nav-link-card {
  text-decoration: none;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #f9fafb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease, border-color 0.18s ease;
}

.nav-link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 55px rgba(15, 23, 42, 1);
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.98);
}

.nav-link-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.nav-link-icon {
  font-size: 20px;
}

.nav-link-desc {
  font-size: 12px;
  color: #cbd5f5;
}

.nav-link-mark {
  font-size: 12px;
  color: #94a3b8;
}
/* ===== 通用：遮罩弹窗（移动端友好） ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15,23,42,.55);

  display: none;              /* 默认隐藏，JS 里改成 flex */
  align-items: center;        /* 真居中 */
  justify-content: center;
  padding: 16px;

  /* 防止内部滚动时页面跟着抖 */
  overscroll-behavior: contain;
}

.modal-card {
  width: min(92vw, 420px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(15,23,42,.25);
  position: relative;
  padding: 18px 18px 14px;

  /* 关键：限制最大高度，避免被底部/顶部遮挡 */
  max-height: calc(100svh - 32px - env(safe-area-inset-bottom));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #9ca3af;
}

/* 二维码自适应：自动缩小 + 居中 */
.modal-qr {
  text-align: center;
}

.modal-qr img {
  width: min(70vw, 240px);  /* 手机自动缩小 */
  height: auto;             /* 不要写死 height */
  display: block;
  margin: 12px auto;
}

/* 如果你有底部固定操作条，把弹窗高度再扣掉一点（可选但推荐） */
@media (max-width: 640px) {
  body.has-action-bar .modal-card {
    max-height: calc(100svh - 32px - var(--action-bar-height) - env(safe-area-inset-bottom));
  }
}
/* 给 fixed 底部操作条腾出真实滚动空间（关键修复：最后一个输入框被挡住） */
.action-bar-spacer{display:none}

@media (max-width: 640px){
  body.has-action-bar .action-bar-spacer{
    display:block;
    height: var(--action-bar-height, 0px);
  }

  /* 可选：iPhone 底部手势区更舒服 */
  .mobile-action-bar{
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
}
