/* ==================================================



   临沂拓研ERP — 新世代 UI 皮肤 v2.0



   覆盖 style.css，保留兼容性



   ================================================== */







:root {



  /* 品牌色 - 蓝紫渐变 */



  --brand-from: #4f46e5;



  --brand-to: #7c3aed;



  --brand-gradient: linear-gradient(135deg, var(--brand-from), var(--brand-to));







  /* 覆盖原变量 */



  --primary: #4f46e5;



  --primary-dark: #4338ca;



  --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);



  --sidebar-hover: rgba(255,255,255,.08);



  --sidebar-active: var(--brand-gradient);



  --sidebar-text: #94a3b8;



  --sidebar-title: #64748b;



  --header-bg: rgba(255,255,255,.85);



  --radius: 10px;



  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);



  --shadow: 0 4px 12px rgba(0,0,0,.08);



  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);



  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);







  /* 新增 */



  --card-bg: rgba(255,255,255,.95);



  --card-border: rgba(0,0,0,.04);



  --bg-subtle: #f8fafc;



  --text-muted: #94a3b8;



}







/* ===== 全局 ===== */



body {



  background: #f1f5f9;



}



::-webkit-scrollbar { width: 5px; height: 5px; }



::-webkit-scrollbar-track { background: transparent; }



::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }



::-webkit-scrollbar-thumb:hover { background: #94a3b8; }







::selection { background: var(--primary); color: #fff; }







/* ===== 侧边栏 ===== */



.layui-side {



  background: var(--sidebar-bg);



  box-shadow: 4px 0 20px rgba(0,0,0,.1);



}







/* Logo — 新风格 */



.layui-side .side-logo {



  background: rgba(255,255,255,.03);



  border-bottom: 1px solid rgba(255,255,255,.06);



}



.layui-side .side-logo .logo-icon {



  background: var(--brand-gradient);



  width: 36px; height: 36px; border-radius: 10px;



  font-size: 18px;



  box-shadow: 0 2px 8px rgba(79,70,229,.35);



}



.layui-side .side-logo .logo-text {



  font-size: 16px; font-weight: 800;



  background: linear-gradient(135deg, #e2e8f0, #f8fafc);



  -webkit-background-clip: text;



  -webkit-text-fill-color: transparent;



  background-clip: text;



}



.layui-side .side-logo .logo-ver {



  background: rgba(255,255,255,.08);



  padding: 1px 8px; border-radius: 4px;



  color: #94a3b8;



}







/* 折叠按钮 */



.sidebar-toggle {



  border: none; background: var(--brand-gradient);



  color: #fff; width: 26px; height: 26px; right: -13px;



  box-shadow: 0 2px 8px rgba(79,70,229,.4);



  font-size: 11px;



}



.sidebar-toggle:hover {



  transform: scale(1.1);



  box-shadow: 0 4px 12px rgba(79,70,229,.5);



}







/* 菜单搜索 */



.sidebar-search input {



  border: 1px solid rgba(255,255,255,.08);



  background: rgba(255,255,255,.06);



  color: #e2e8f0;



  border-radius: 8px;



  height: 36px;



  padding-left: 36px;



}



.sidebar-search input:focus {



  border-color: var(--brand-from);



  box-shadow: 0 0 0 3px rgba(79,70,229,.15);



  background: rgba(255,255,255,.1);



}



.sidebar-search .search-icon { left: 12px; font-size: 15px; }







/* 菜单分组标题 — 大图标重新设计 */



.side-nav .nav-group {



  padding: 14px 20px 6px;



  font-size: 12px;



  letter-spacing: 1px;



  color: var(--sidebar-title);



  gap: 10px;



}



.side-nav .nav-group:before {



  content: '';



  display: inline-block;



  width: 3px; height: 14px;



  background: var(--brand-gradient);



  border-radius: 2px;



  opacity: 0.5;



}



.side-nav .nav-group:hover { color: #94a3b8; }



.side-nav .nav-group .group-arrow {



  font-size: 12px;



  transition: transform var(--transition);



  opacity: 0.5;



}



.side-nav .nav-group.collapsed .group-arrow { transform: rotate(-90deg); }







/* 菜单项 — 大图标 + 圆角 */



.side-nav .nav-item a {



  padding: 10px 20px 10px 24px;



  margin: 2px 10px;



  font-size: 14px;



  border-radius: 8px;



  gap: 12px;



  position: relative;



  overflow: hidden;



}



.side-nav .nav-item a::before {



  content: '';



  position: absolute; top: 0; left: 0; right: 0; bottom: 0;



  background: linear-gradient(90deg, rgba(255,255,255,.04), transparent);



  opacity: 0;



  transition: opacity var(--transition);



}



.side-nav .nav-item a:hover::before { opacity: 1; }



.side-nav .nav-item.sub-item a { padding-left: 40px; }



.side-nav .nav-item.active a {



  background: var(--brand-gradient);



  box-shadow: 0 4px 15px rgba(79,70,229,.4);



  color: #fff;



}



.side-nav .nav-item.active a::before { opacity: 0; }







/* ★ 大图标 ★ */



.side-nav .nav-item .nav-icon {



  font-size: 22px !important;



  width: 32px !important;



  text-align: center;



  flex-shrink: 0;



  line-height: 1;



  filter: drop-shadow(0 1px 2px rgba(0,0,0,.1));



  transition: transform var(--transition);



}



.side-nav .nav-item a:hover .nav-icon {



  transform: scale(1.15);



}



.side-nav .nav-item.active a .nav-icon {



  filter: brightness(1.2) drop-shadow(0 1px 3px rgba(0,0,0,.2));



}







/* 子菜单项用稍小图标 */



.side-nav .nav-item.sub-item .nav-icon {



  font-size: 18px !important;



  width: 28px !important;



}







/* 分隔线 */



.side-nav .nav-separator {



  height: 1px;



  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);



  margin: 10px 20px;



}







/* ===== 侧栏折叠模式 ===== */



.layui-layout-admin.sidebar-collapsed .nav-item .nav-icon {



  font-size: 24px !important;



  width: auto !important;



}



.layui-layout-admin.sidebar-collapsed .nav-item a {



  padding: 12px 0;



}



.layui-layout-admin.sidebar-collapsed .nav-group {



  font-size: 0;



  padding: 14px 0 6px;



}



.layui-layout-admin.sidebar-collapsed .nav-group:before {



  width: 18px; height: 2px;



  opacity: 0.3;



}







/* ===== 顶部栏 ===== */



.layui-header {



  left: var(--sidebar-w);



  background: var(--header-bg);



  backdrop-filter: blur(12px);



  -webkit-backdrop-filter: blur(12px);



  border-bottom: 1px solid rgba(0,0,0,.04);



}



.layui-body {



  left: var(--sidebar-w);



  background: #f1f5f9;



}



.layui-header .header-right a {



  border-radius: 8px;



}



.layui-header .header-right a:hover {



  background: rgba(79,70,229,.08);



}



.layui-header .user-info {



  background: rgba(79,70,229,.1);



  padding: 4px 12px;



  border-radius: 6px;



}







/* ===== Tab 标签栏 ===== */



.tab-bar {



  background: rgba(255,255,255,.7);



  backdrop-filter: blur(8px);



  -webkit-backdrop-filter: blur(8px);



  border-bottom: 1px solid rgba(0,0,0,.04);



}



.tab-item {



  border-radius: 8px 8px 0 0;



  margin: 4px 1px 0;



  padding: 8px 16px;



  font-size: 13px;



  border-bottom: 2px solid transparent;



}



.tab-item.active {



  background: rgba(79,70,229,.06);



  border-bottom-color: var(--brand-from);



  color: var(--brand-from);



}







/* ===== 卡片升级 ===== */



.card {



  background: var(--card-bg);



  backdrop-filter: blur(4px);



  border: 1px solid var(--card-border);



  border-radius: 12px;



  box-shadow: var(--shadow-sm);



  transition: all var(--transition);



}



.card:hover {



  box-shadow: var(--shadow);



}



.card-header {



  background: transparent;



  border-bottom: 1px solid rgba(0,0,0,.04);



  height: 48px;



  line-height: 48px;



  padding: 0 18px;



  border-radius: 12px 12px 0 0;



}



.card-title { font-size: 14px; font-weight: 700; color: #1e293b; }



.card-body { padding: 18px; }







/* ===== 统计卡片动画 ===== */



.stat-card {



  border: 1px solid var(--card-border);



  border-radius: 12px;



  padding: 22px 18px;



  position: relative;



  overflow: hidden;



  transition: all var(--transition);



}



.stat-card::after {



  content: '';



  position: absolute;



  top: -50%; right: -50%;



  width: 100%; height: 100%;



  background: radial-gradient(circle, rgba(79,70,229,.03), transparent);



  pointer-events: none;



}



.stat-card:hover {



  transform: translateY(-3px);



  box-shadow: var(--shadow-lg);



}



.stat-card .stat-icon { font-size: 32px; }



.stat-card .stat-value { font-size: 26px; }



.stat-card.success { border-left-color: #22c55e; }



.stat-card.warning { border-left-color: #f59e0b; }



.stat-card.danger { border-left-color: #ef4444; }



.stat-card.info { border-left-color: var(--brand-from); }







/* ===== 快捷操作 ===== */



.mc-quick-btn {



  border-radius: 12px;



  padding: 24px 14px;



  border: 1px solid var(--card-border);



  transition: all var(--transition);



  position: relative;



  overflow: hidden;



}



.mc-quick-btn::after {



  content: '';



  position: absolute;



  top: 0; left: 0; right: 0; height: 3px;



  background: var(--brand-gradient);



  opacity: 0;



  transition: opacity var(--transition);



}



.mc-quick-btn:hover::after { opacity: 1; }



.mc-quick-btn:hover {



  transform: translateY(-4px);



  box-shadow: var(--shadow-lg);



}



.mc-quick-btn .mc-qb-icon { font-size: 36px; }



.mc-quick-btn.sale { border-left: 3px solid #22c55e; }



.mc-quick-btn.purchase { border-left: 3px solid var(--brand-from); }



.mc-quick-btn.receipt { border-left: 3px solid #f59e0b; }



.mc-quick-btn.pay { border-left: 3px solid #ef4444; }



.mc-quick-btn.stock { border-left: 3px solid #8b5cf6; }







/* ===== 概要卡片 ===== */



.mc-summary-card {



  border-radius: 12px;



  border: 1px solid var(--card-border);



  position: relative;



  overflow: hidden;



}



.mc-summary-card::before {



  content: '';



  position: absolute; top: 0; left: 0; right: 0; height: 3px;



}



.mc-summary-card.green::before { background: linear-gradient(90deg, #22c55e, #4ade80); }



.mc-summary-card.red::before { background: linear-gradient(90deg, #ef4444, #f87171); }



.mc-summary-card.blue::before { background: var(--brand-gradient); }



.mc-summary-card.amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }



.mc-summary-card .mc-sc-val { font-size: 26px; }







/* ===== 按钮升级 ===== */



.btn {



  height: 36px;



  padding: 0 16px;



  font-size: 13px;



  font-weight: 600;



  border-radius: 8px;



  letter-spacing: .3px;



}



.btn-primary { background: var(--brand-gradient); }



.btn-primary:hover { background: linear-gradient(135deg, #4338ca, #6d28d9); box-shadow: 0 4px 12px rgba(79,70,229,.3); }



.btn-normal { background: linear-gradient(135deg, #6366f1, #8b5cf6); }



.btn-normal:hover { background: linear-gradient(135deg, #4f46e5, #7c3aed); }



.btn-success { background: linear-gradient(135deg, #22c55e, #4ade80); }



.btn-success:hover { background: linear-gradient(135deg, #16a34a, #22c55e); box-shadow: 0 4px 12px rgba(34,197,94,.3); }



.btn-danger { background: linear-gradient(135deg, #ef4444, #f87171); }



.btn-danger:hover { background: linear-gradient(135deg, #dc2626, #ef4444); box-shadow: 0 4px 12px rgba(239,68,68,.3); }



.btn-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #1e293b; }



.btn-outline {



  background: transparent;



  border: 1.5px solid #d1d5db;



  color: #4b5563;



}



.btn-outline:hover {



  border-color: var(--brand-from);



  color: var(--brand-from);



  background: rgba(79,70,229,.05);



}



.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 6px; }



.btn-xs { height: 24px; padding: 0 8px; font-size: 11px; border-radius: 5px; }



.btn-lg { height: 42px; padding: 0 22px; font-size: 15px; border-radius: 10px; }







/* ===== 表格升级 ===== */



.table-wrap {



  border-radius: 10px;



  border: 1px solid var(--card-border);



  overflow: hidden;



}



table {



  font-size: 13px;



}



table thead th {



  background: #f8fafc;



  color: #64748b;



  font-size: 12px;



  font-weight: 700;



  text-transform: uppercase;



  letter-spacing: .5px;



  padding: 12px 14px;



  border-bottom: 2px solid #e2e8f0;



  border-right: none;



}



table tbody td {



  padding: 11px 14px;



  border-bottom: 1px solid #f1f5f9;



  border-right: none;



}



table tbody tr {



  transition: background var(--transition);



}



table tbody tr:hover { background: rgba(79,70,229,.03); }



table tbody tr:nth-child(even) { background: rgba(0,0,0,.01); }



table tbody tr:last-child td { border-bottom: none; }







/* ===== 表单升级 ===== */



.form-input, .form-select {



  height: 38px;



  border-radius: 8px;



  border: 1.5px solid #e2e8f0;



  font-size: 13px;



  padding: 0 12px;



  transition: all var(--transition);



}



.form-input:hover, .form-select:hover {



  border-color: #94a3b8;



}



.form-input:focus, .form-select:focus {



  border-color: var(--brand-from);



  box-shadow: 0 0 0 4px rgba(79,70,229,.1);



}



textarea.form-input { height: auto; min-height: 72px; padding: 10px 12px; }







/* ===== 模态框 ===== */



.modal {



  border-radius: 16px;



  box-shadow: 0 25px 80px rgba(0,0,0,.25);



  animation: modalIn .25s cubic-bezier(0.34, 1.56, 0.64, 1);



}



@keyframes modalIn {



  from { opacity: 0; transform: scale(.92) translateY(20px); }



  to { opacity: 1; transform: scale(1) translateY(0); }



}



.modal-header {



  border-radius: 16px 16px 0 0;



  background: transparent;



  border-bottom: 1px solid rgba(0,0,0,.04);



  height: 54px;



  line-height: 54px;



}



.modal-header h3 { font-size: 16px; }



.modal-footer {



  border-radius: 0 0 16px 16px;



  background: transparent;



  border-top: 1px solid rgba(0,0,0,.04);



}



.modal-overlay {



  background: rgba(15,23,42,.6);



  backdrop-filter: blur(6px);



  -webkit-backdrop-filter: blur(6px);



}







/* ===== 分页 ===== */



.pagination a, .pagination button {



  border-radius: 8px;



  border: 1px solid #e2e8f0;



  min-width: 36px; height: 36px;



  font-weight: 500;



}



.pagination a.active {



  background: var(--brand-gradient);



  border-color: transparent;



}







/* ===== Toast ===== */



.toast {



  border-radius: 10px;



  padding: 12px 28px;



  font-size: 14px;



  box-shadow: 0 8px 30px rgba(0,0,0,.15);



}







/* ===== Badge 升级 ===== */



.badge {



  border-radius: 14px;



  padding: 3px 12px;



  font-size: 12px;



  font-weight: 600;



  letter-spacing: .2px;



}



.badge-pending { background: #fef3c7; color: #b45309; }



.badge-partial { background: #dbeafe; color: #1d4ed8; }



.badge-paid { background: #dcfce7; color: #15803d; }



.badge-completed { background: #dcfce7; color: #15803d; }



.badge-cancelled { background: #fee2e2; color: #b91c1c; }



.badge-draft { background: #f1f5f9; color: #475569; }



.badge-ordered { background: #ede9fe; color: #6d28d9; }



.badge-returned { background: #fee2e2; color: #b91c1c; }







/* ===== Detail View ===== */



.detail-header {



  background: linear-gradient(135deg, #f8fafc, #fff);



  border-radius: 10px 10px 0 0;



  border: 1px solid var(--card-border);



  border-bottom: none;



}



.detail-body {



  border: 1px solid var(--card-border);



  border-top: none;



  border-radius: 0 0 10px 10px;



}







/* ===== 登录页 ===== */



#login-screen {



  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;



}



.login-box {



  border-radius: 20px !important;



  padding: 52px 44px !important;



  background: rgba(255,255,255,.95) !important;



  backdrop-filter: blur(20px) !important;



  box-shadow: 0 30px 80px rgba(0,0,0,.4) !important;



  border: 1px solid rgba(255,255,255,.1) !important;



}



.login-box h1 {



  font-size: 24px;



  background: linear-gradient(135deg, #4f46e5, #7c3aed);



  -webkit-background-clip: text;



  -webkit-text-fill-color: transparent;



  background-clip: text;



}







/* ===== 搜索框 ===== */



.search-box {



  border-radius: 8px;



  border: 1.5px solid #e2e8f0;



  transition: all var(--transition);



}



.search-box:focus {



  border-color: var(--brand-from);



  box-shadow: 0 0 0 4px rgba(79,70,229,.1);



}







/* ===== Toolbar 过滤条 ===== */



.filter-bar input[type="date"], .filter-bar select {



  border-radius: 8px;



  border: 1.5px solid #e2e8f0;



  height: 34px;



  transition: all var(--transition);



}



.filter-bar input[type="date"]:focus, .filter-bar select:focus {



  border-color: var(--brand-from);



  box-shadow: 0 0 0 3px rgba(79,70,229,.08);



}







/* ===== 导航菜单二级展开动画 ===== */



.side-nav .nav-section {



  overflow: hidden;



  transition: max-height 0.3s ease;



  max-height: 600px;



}



.side-nav .nav-section.collapsed {



  max-height: 0;



}







/* ===== 下拉菜单全局提层 ===== */



.ss-dropdown { z-index: 9999 !important; }

/* 经营历程往来单位下拉：名称允许换行完整显示（覆盖 search-select.js 的 ellipsis） */
.bh-party-dropdown .ss-item { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; }
.bh-party-dropdown .ss-item-name { white-space: normal; overflow: visible; text-overflow: clip; word-break: break-all; line-height: 1.4; }
/* 加宽下拉框：利用右侧空位（.ss-dropdown.bh-party-dropdown 特异性 0,2,0 压过动态注入的 0,1,0） */
.ss-dropdown.bh-party-dropdown { right: auto; min-width: 460px; max-width: 90vw; }







/* ===== 商品检索下拉框全局浮层（避免被 table/card/modal 裁剪） ===== */



#global-dropdown-container .po-prod-dd,



#global-dropdown-container .sof-prod-dd {



  position: fixed !important;



  z-index: 99999 !important;



  background: #fff;



  border: 1px solid #d0d5dd;



  border-radius: 6px;



  max-height: 260px;



  overflow-y: auto;



  box-shadow: 0 8px 24px rgba(0,0,0,.12);



  box-sizing: border-box;



}



#global-dropdown-container .po-prod-dd .prod-dd-item,



#global-dropdown-container .sof-prod-dd .prod-dd-item {



  padding: 8px 12px;



  cursor: pointer;



  border-bottom: 1px solid #f5f5f5;



  font-size: 13px;



}



#global-dropdown-container .po-prod-dd .prod-dd-item:hover,



#global-dropdown-container .sof-prod-dd .prod-dd-item:hover { background: #f3f4f6; }



#global-dropdown-container .po-prod-dd > div:last-child,



#global-dropdown-container .sof-prod-dd > div:last-child { border-bottom: none; }







/* ===== 小屏适配 ===== */



@media (max-width: 768px) {



  .layui-layout-admin { --sidebar-w: 0px; }



  .layui-header { left: 0; }



  .layui-body { left: 0; }



}







/* ===== 全屏表单（兼容原 fullpage-form.js） ===== */



.fullpage-overlay .fullpage-container {



  border-radius: 16px;



  box-shadow: 0 25px 80px rgba(0,0,0,.25);



}



.fullpage-overlay .fullpage-header {



  border-radius: 16px 16px 0 0;



}







*/

/* ===== 商品搜索下拉框定位修复 ===== */
.search-prod-wrap {
  position: relative;
}
.search-prod-wrap > div {
  top: 100% !important;
  left: 0 !important;
  width: 100% !important;
}
