/* =====================================================================
   多店铺仓库管理系统 · 后台主题（Bootstrap 5 扩展）
   主色 #0d9488 / #0f766e 与 uniapp 端保持一致
   ===================================================================== */
:root {
  --pri: #0d9488;
  --pri-d: #0f766e;
  --pri-l: #ccfbf1;
  --ink: #0f172a;
  --mut: #64748b;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --side-w: 236px;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: "Noto Sans Arabic", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif; font-size: 14px; }
a { text-decoration: none; }

/* ---------- 布局 ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side-w); flex: none; position: fixed; inset: 0 auto 0 0; z-index: 200;
  background: linear-gradient(170deg, #0f766e 0%, #115e59 55%, #0b3f3b 100%);
  color: #fff; display: flex; flex-direction: column; overflow-y: auto;
  box-shadow: 2px 0 18px rgba(15, 23, 42, .08);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.13); }
.brand-ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.16); display: grid; place-items: center; font-size: 21px; flex: none; }
.brand-tx b { display: block; font-size: 14.5px; line-height: 1.4; }
.brand-tx small { display: block; font-size: 10px; opacity: .72; direction: rtl; line-height: 1.5; }
.side-nav { padding: 12px 10px 20px; flex: 1; }
.nav-group { font-size: 10.5px; letter-spacing: 1px; opacity: .55; padding: 14px 10px 6px; font-weight: 700; }
.side-link { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.82); padding: 9px 11px; border-radius: 10px; font-size: 13px; margin-bottom: 2px; transition: .16s; }
.side-link i { font-size: 15px; width: 18px; }
.side-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.side-link.on { background: rgba(255,255,255,.2); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 #5eead4; }
.side-foot { padding: 12px 16px; font-size: 10.5px; opacity: .6; border-top: 1px solid rgba(255,255,255,.12); }
.main-area { margin-left: var(--side-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 62px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 22px; position: sticky; top: 0; z-index: 100; }
.top-title { font-weight: 700; font-size: 15px; }
.top-title i { color: var(--pri); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.badge-dot { position: absolute; top: -5px; right: -6px; min-width: 17px; height: 17px; border-radius: 99px; background: #ef4444; color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
.content { padding: 22px; flex: 1; }
.page-foot { padding: 14px 22px; color: var(--mut); font-size: 11.5px; border-top: 1px solid var(--line); background: #fff; }

/* ---------- 通用组件 ---------- */
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h4 { margin: 0 0 3px; font-weight: 800; font-size: 19px; }
.page-head h4 i { color: var(--pri); }
.page-head p { margin: 0; color: var(--mut); font-size: 12.5px; }
.page-head > div:last-child { margin-left: auto; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 2px 12px rgba(15,23,42,.045); overflow: hidden; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 17px; border-bottom: 1px solid var(--line); font-size: 14px; }
.panel-head b i { color: var(--pri); }
.panel-head .muted, .muted { margin-left: auto; color: var(--mut); font-size: 11.5px; font-weight: 400; }
.panel-body { padding: 16px 17px; }
.link-more { margin-left: auto; font-size: 12px; color: var(--pri-d); font-weight: 600; }
.chip-soft { background: var(--pri-l); color: var(--pri-d); border-radius: 99px; padding: 6px 13px; font-size: 12px; font-weight: 700; }
.tiny { font-size: 10.5px; }
.empty { text-align: center; color: var(--mut); padding: 34px 10px; font-size: 13px; }

/* 卡片 */
.stat-card { border-radius: 15px; padding: 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 12px rgba(15,23,42,.045); display: flex; align-items: center; gap: 13px; }
.stat-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; flex: none; }
.stat-ic.teal { background: var(--pri-l); color: var(--pri-d); }
.stat-ic.green { background: #d1fae5; color: #047857; }
.stat-ic.blue { background: #dbeafe; color: #1d4ed8; }
.stat-ic.amber { background: #fef3c7; color: #b45309; }
.stat-ic.red { background: #fee2e2; color: #b91c1c; }
.stat-v { font-size: 20px; font-weight: 800; line-height: 1.2; font-family: "Inter", "Segoe UI", sans-serif; white-space: nowrap; }
.stat-l { font-size: 11.5px; color: var(--mut); }

/* 表格 */
.table { font-size: 12.8px; }
.table thead th { background: #f8fafc; color: var(--mut); font-weight: 700; font-size: 11.5px; white-space: nowrap; border-bottom: 1px solid var(--line); padding: 11px 14px; }
.table tbody td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: #f8fdfc; }
.table-responsive { overflow-x: auto; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tag-in { background: #d1fae5; color: #047857; }
.tag-out { background: #ffedd5; color: #c2410c; }
.tag-red { background: #fee2e2; color: #b91c1c; }
.tag-gray { background: #f1f5f9; color: #64748b; }
.tag-blue { background: #dbeafe; color: #1d4ed8; }
.tag-amber { background: #fef3c7; color: #b45309; }
.rank { width: 24px; height: 24px; border-radius: 8px; background: #f1f5f9; color: var(--mut); display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; }
.rank-top { background: var(--pri-l); color: var(--pri-d); }

/* 筛选 / 分页 */
.filter-bar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.pager-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.pager-bar > div:last-child { margin-left: auto; }

/* 通知列表 */
.notice-list { padding: 4px 17px 12px; }
.notice-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.notice-row:last-child { border-bottom: none; }
.notice-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.notice-ic.level-danger { background: #fee2e2; color: #b91c1c; }
.notice-ic.level-warn { background: #fef3c7; color: #b45309; }
.notice-ic.level-info { background: #dbeafe; color: #1d4ed8; }
.setting-group { font-size: 12px; font-weight: 800; color: var(--pri-d); border-left: 3px solid var(--pri); padding-left: 9px; margin: 4px 0; }
.tip-list { list-style: none; padding: 0; margin: 0; font-size: 12.5px; line-height: 1.9; }
.tip-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.tip-list li:last-child { border: none; }
.tip-list i { color: var(--pri); margin-right: 7px; }

/* 按钮覆盖 */
.btn-primary { --bs-btn-bg: var(--pri); --bs-btn-border-color: var(--pri); --bs-btn-hover-bg: var(--pri-d); --bs-btn-hover-border-color: var(--pri-d); }
.btn-outline-primary { --bs-btn-color: var(--pri-d); --bs-btn-border-color: var(--pri); --bs-btn-hover-bg: var(--pri); }
.btn-soft-primary { background: var(--pri-l); color: var(--pri-d); border: none; border-radius: 8px; font-size: 11.5px; font-weight: 700; padding: 5px 10px; }
.btn-soft-primary:hover { background: var(--pri); color: #fff; }
.btn-soft-danger { background: #fee2e2; color: #b91c1c; border: none; border-radius: 8px; font-size: 11.5px; padding: 5px 9px; }
.btn-soft-danger:hover { background: #ef4444; color: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(13,148,136,.14); }
.form-label { font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 5px; }

/* ---------- 登录页 ---------- */
.login-body { background: linear-gradient(135deg, #0f766e 0%, #134e4a 55%, #0b2f2b 100%); min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-wrap { width: min(940px, 100%); background: #fff; border-radius: 22px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 26px 70px rgba(0,0,0,.28); }
.login-visual { background: linear-gradient(160deg, #0d9488, #0f766e 60%, #115e59); color: #fff; padding: 42px 36px; position: relative; }
.lv-ic { font-size: 42px; }
.login-visual h2 { font-size: 23px; font-weight: 800; margin: 14px 0 4px; }
.login-visual .ug { direction: rtl; opacity: .85; font-size: 15px; margin-bottom: 20px; }
.lv-sub { font-size: 12.5px; line-height: 2; opacity: .92; }
.lv-list { list-style: none; padding: 0; margin: 26px 0 0; font-size: 12.5px; line-height: 2.2; }
.lv-list i { color: #5eead4; margin-right: 8px; }
.lv-ver { position: absolute; bottom: 22px; right: 30px; opacity: .6; font-size: 11px; }
.login-card { padding: 46px 40px; }
.lc-head { text-align: center; margin-bottom: 28px; }
.lc-ic { width: 58px; height: 58px; border-radius: 18px; background: var(--pri-l); color: var(--pri-d); display: grid; place-items: center; font-size: 26px; margin: 0 auto 14px; }
.lc-head h4 { font-weight: 800; margin: 0 0 5px; }
.lc-head p { color: var(--mut); font-size: 12.5px; margin: 0; }
.btn-login { background: linear-gradient(135deg, var(--pri-d), var(--pri)); color: #fff; border: none; border-radius: 11px; padding: 11px; font-weight: 700; }
.btn-login:hover { background: linear-gradient(135deg, #115e59, #0d9488); color: #fff; }
.lc-tip { margin-top: 22px; background: #f8fafc; border-radius: 11px; padding: 12px 14px; font-size: 11.5px; line-height: 1.9; color: #475569; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  :root { --side-w: 210px; }
  .content { padding: 16px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: .22s; }
  .sidebar.show { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { display: none; }
}
@media print {
  .sidebar, .topbar, .page-foot, .page-head .btn, .filter-bar { display: none !important; }
  .main-area { margin: 0; }
  .panel { box-shadow: none; break-inside: avoid; }
}
