/* ============================================================
   奶茶点单 · 商家管理后台 样式
   纯手写，无外部依赖。浅色电商后台风格。
   ============================================================ */

:root{
  --primary: #b4763c;        /* 奶茶暖棕 */
  --primary-light: #e8a33d;  /* 橙 */
  --primary-soft: #fbf1e6;
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e8eaed;
  --text: #2c2f36;
  --text-sub: #8a909a;
  --blue: #2f80ed;
  --red: #eb5757;
  --green: #27ae60;
  --orange: #f2994a;
  --gray: #9aa0a6;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --radius: 12px;
  /* 表单控件 */
  --input-border: #e3e6eb;
  --input-border-hover: #cfd5de;
  --input-bg: #fbfcfd;
  --label: #5c626d;
  --ring: 0 0 0 3px rgba(180,118,60,.13);
  --ring-error: 0 0 0 3px rgba(235,87,87,.13);
}

*{ box-sizing: border-box; margin: 0; padding: 0; }
html,body{ height: 100%; }
body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a{ color: var(--blue); text-decoration: none; }
button{ font-family: inherit; cursor: pointer; }
.hidden{ display: none !important; }
::-webkit-scrollbar{ width: 8px; height: 8px; }
::-webkit-scrollbar-thumb{ background: #d4d7dc; border-radius: 4px; }

/* ---------- 登录页 ---------- */
.login-wrap{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fbf1e6 0%, #f5f6f8 55%, #f3efe9 100%);
  padding: 20px;
}
.login-card{
  width: 380px;
  max-width: 100%;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
}
.login-logo{
  text-align: center;
  margin-bottom: 24px;
}
.login-logo .cup{
  width: 56px; height: 56px; margin: 0 auto 12px;
  background: var(--primary-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.login-logo h1{ font-size: 20px; font-weight: 700; }
.login-logo p{ color: var(--text-sub); font-size: 13px; margin-top: 4px; }
.login-hint{
  margin-top: 16px;
  background: #fff8ef;
  border: 1px solid #f3e2cb;
  color: #92704a;
  font-size: 12px;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}

/* ---------- 表单基础 ---------- */
.field{ margin-bottom: 16px; }
.field > label{
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--label);
  margin-bottom: 7px;
  transition: color .16s;
}
/* 聚焦时标签跟着主色走，视线不用在两个地方切换 */
.field:focus-within > label{ color: var(--primary); }
.field > label .req{ color: var(--red); margin-left: 2px; }

/* 所有输入控件共用一套外观：.field 内的、工具条搜索、下拉筛选、弹窗内搜索 */
/* 注意：表单里大量 <input name="xx"> 没写 type 属性，
   而属性选择器 [type=text] 不会命中"没有该属性"的元素，
   所以必须显式补一条 :not([type])，否则这些框会退回浏览器默认样式 */
.field input[type=text],
.field input:not([type]),
.field input[type=password],
.field input[type=number],
.field input[type=datetime-local],
.field select,
.field textarea,
.toolbar .search input,
.toolbar select,
.multi-select .ms-search{
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.45;
  color: var(--text);
  background: var(--input-bg);
  outline: none;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
/* 宽度单独给，避免影响工具条里自然宽度的下拉框 */
/* 注意：表单里大量 <input name="xx"> 没写 type 属性，
   而属性选择器 [type=text] 不会命中"没有该属性"的元素，
   所以必须显式补一条 :not([type])，否则这些框会退回浏览器默认样式 */
.field input[type=text],
.field input:not([type]),
.field input[type=password],
.field input[type=number],
.field input[type=datetime-local],
.field select,
.field textarea,
.toolbar .search input,
.multi-select .ms-search{ width: 100%; }

.field input:hover, .field select:hover, .field textarea:hover,
.toolbar .search input:hover, .toolbar select:hover{ border-color: var(--input-border-hover); }

.field input:focus, .field select:focus, .field textarea:focus,
.toolbar .search input:focus, .toolbar select:focus{
  border-color: var(--primary);
  background: #fff;
  box-shadow: var(--ring);
}

.field input::placeholder, .field textarea::placeholder,
.toolbar .search input::placeholder{ color: #b7bdc7; }

.field textarea{ resize: vertical; min-height: 76px; line-height: 1.6; }

/* 下拉框：去掉系统外观，换成自绘箭头，和输入框观感统一 */
.field select,
.toolbar select{
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.75L6 6.25L11 1.75' fill='none' stroke='%238a909a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.field select:hover, .toolbar select:hover{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.75L6 6.25L11 1.75' fill='none' stroke='%23b4763c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* 日期时间选择器的小图标 */
.field input[type=datetime-local]::-webkit-calendar-picker-indicator{
  cursor: pointer; opacity: .5; transition: opacity .16s;
}
.field input[type=datetime-local]::-webkit-calendar-picker-indicator:hover{ opacity: .85; }

/* 数字框的上下箭头弱化一点，别抢视线 */
.field input[type=number]::-webkit-inner-spin-button{ opacity: .35; }
.field input[type=number]:hover::-webkit-inner-spin-button{ opacity: .7; }

.field input:disabled, .field select:disabled, .field textarea:disabled{
  background: #f4f5f7; color: var(--text-sub); cursor: not-allowed; box-shadow: none;
}

.field .err{ color: var(--red); font-size: 12px; margin-top: 5px; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea{
  border-color: var(--red); background: #fffafb;
}
.field.invalid input:focus, .field.invalid select:focus, .field.invalid textarea:focus{
  box-shadow: var(--ring-error);
}
.field.invalid .err{ display: block; }
.field.invalid > label{ color: var(--red); }
.row2{ display: flex; gap: 12px; }
.row2 .field{ flex: 1; }

.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 8px;
  padding: 9px 16px; font-size: 14px; font-weight: 500;
  background: var(--primary); color: #fff;
  transition: opacity .15s, background .15s;
}
.btn:hover{ opacity: .92; }
.btn:disabled{ opacity: .55; cursor: not-allowed; }
.btn.block{ width: 100%; }
.btn.ghost{ background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover{ background: #fafafa; }
.btn.sm{ padding: 5px 10px; font-size: 13px; }
.btn.danger{ background: var(--red); }
.btn.blue{ background: var(--blue); }

/* 文字型操作按钮 */
.link-btn{ background: none; border: none; color: var(--blue); font-size: 13px; padding: 4px 6px; }
.link-btn.danger{ color: var(--red); }
.link-btn:hover{ text-decoration: underline; }

/* ---------- 主框架 ---------- */
.layout{ display: flex; min-height: 100vh; }
.sidebar{
  width: 210px;
  background: #fff;
  border-right: 1px solid var(--border);
  position: fixed; top: 0; bottom: 0; left: 0;
  display: flex; flex-direction: column;
  z-index: 20;
}
.sidebar .brand{
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 16px;
}
.sidebar .brand .cup{
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--primary-soft); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.sidebar nav{ flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-item{
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px;
  color: var(--text-sub);
  font-size: 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
  user-select: none;
}
.nav-item:hover{ background: #fafafa; color: var(--text); }
.nav-item.active{ background: var(--primary-soft); color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.nav-item .ico{ width: 18px; text-align: center; }
/* 底部备案号：ICP / 公安备案，按法规要求对公众可见 */
.sidebar-foot{
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-sub);
}
.sidebar-foot a{
  color: var(--text-sub);
  text-decoration: none;
  word-break: break-all;
}
.sidebar-foot a:hover{ color: var(--primary); text-decoration: underline; }

.main{ margin-left: 210px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar{
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 10;
}
.topbar .crumb{ font-size: 15px; font-weight: 600; }
.topbar .user{ display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-sub); }
.topbar .user .avatar{
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.content{ padding: 22px 24px 60px; }

/* ---------- 看板卡片 ---------- */
.page-head{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.page-head h2{ font-size: 18px; font-weight: 700; }
.page-head .sub{ color: var(--text-sub); font-size: 13px; margin-top: 2px; }

.stat-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card{
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px;
}
.stat-card .label{ color: var(--text-sub); font-size: 13px; }
.stat-card .value{ font-size: 24px; font-weight: 700; margin-top: 6px; }
.stat-card .value.money{ color: var(--primary); }
.stat-card .foot{ font-size: 12px; color: var(--text-sub); margin-top: 4px; }

.panel{
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 18px;
}
.panel .panel-head{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel .panel-head h3{ font-size: 15px; font-weight: 700; }
.panel .panel-head .seg{ display: flex; background: #f1f2f4; border-radius: 8px; overflow: hidden; }
.panel .panel-head .seg button{ border: none; background: none; padding: 6px 14px; font-size: 13px; color: var(--text-sub); }
.panel .panel-head .seg button.active{ background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }

.dash-cols{ display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* 柱状图 (CSS) */
.bar-chart{ display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.bar-col{ flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-col .bar{ width: 60%; background: linear-gradient(180deg, var(--primary-light), var(--primary)); border-radius: 6px 6px 0 0; transition: height .3s; min-height: 2px; }
.bar-col .val{ font-size: 11px; color: var(--text-sub); margin-bottom: 4px; }
.bar-col .lab{ font-size: 11px; color: var(--text-sub); margin-top: 6px; }

/* 水平条形图 */
.hbar-row{ display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hbar-row .name{ width: 120px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-row .track{ flex: 1; background: #f1f2f4; border-radius: 6px; height: 20px; overflow: hidden; }
.hbar-row .fill{ height: 100%; background: linear-gradient(90deg, var(--primary-light), var(--primary)); border-radius: 6px; }
.hbar-row .num{ width: 70px; text-align: right; font-size: 13px; color: var(--text-sub); }

/* 库存紧张列表 */
.stock-list .item{ display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.stock-list .item:last-child{ border-bottom: none; }
.stock-list .item img{ width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.stock-list .item .nm{ flex: 1; font-size: 13px; }
.stock-list .item .st{ color: var(--red); font-weight: 600; font-size: 13px; }

/* ---------- 表格 ---------- */
.toolbar{ display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search{ flex: 1; min-width: 220px; position: relative; }
.toolbar .search input{ padding-left: 36px; }
/* 放大镜用 SVG 画：emoji 在 Windows 上是彩色的，跟整体风格不搭 */
.toolbar .search::before{
  content: "";
  position: absolute; left: 12px; top: 50%;
  width: 15px; height: 15px; margin-top: -7.5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='6.8' cy='6.8' r='4.8' fill='none' stroke='%238a909a' stroke-width='1.7'/%3E%3Cpath d='M10.4 10.4L14 14' stroke='%238a909a' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: .8;
  transition: opacity .16s;
  pointer-events: none;
}
.toolbar .search:focus-within::before{ opacity: 1; }
.toolbar select{ min-width: 122px; }
.table-card{ background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table{ width: 100%; border-collapse: collapse; }
th, td{ padding: 12px 14px; text-align: left; font-size: 13px; }
thead th{ background: #fafafa; color: var(--text-sub); font-weight: 600; white-space: nowrap; }
tbody tr{ border-top: 1px solid var(--border); }
tbody tr:hover{ background: #fcf9f5; }
td .thumb{ width: 40px; height: 40px; border-radius: 8px; object-fit: cover; cursor: pointer; }
td .money{ color: var(--primary); font-weight: 600; }
td .muted{ color: var(--text-sub); }

/* 徽章 */
.badge{ display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge.orange{ background: #fef0e6; color: #f2994a; }
.badge.blue{ background: #e9f1fe; color: #2f80ed; }
.badge.green{ background: #e6f6ec; color: #27ae60; }
.badge.gray{ background: #eef0f2; color: #9aa0a6; }
.badge.purple{ background: #f1eafc; color: #8b5cf6; }
.badge.red{ background: #fdeaea; color: #eb5757; }

.switch{ position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input{ opacity: 0; width: 0; height: 0; }
.switch .slider{ position: absolute; inset: 0; background: #d4d7dc; border-radius: 22px; transition: .2s; }
.switch .slider::before{ content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider{ background: var(--green); }
.switch input:checked + .slider::before{ transform: translateX(18px); }

/* 分页 */
.pager{ display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 13px; color: var(--text-sub); flex-wrap: wrap; gap: 10px; }
.pager .pages{ display: flex; gap: 6px; }
.pager .pages button{ border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 5px 11px; color: var(--text); }
.pager .pages button:disabled{ opacity: .5; cursor: not-allowed; }
.pager .pages button.active{ background: var(--primary); color: #fff; border-color: var(--primary); }

/* 空状态 / loading */
.empty{ text-align: center; padding: 50px 0; color: var(--text-sub); }
.empty .ico{ font-size: 40px; opacity: .4; }
.loading{ text-align: center; padding: 50px 0; color: var(--text-sub); }
.spinner{ display: inline-block; width: 22px; height: 22px; border: 3px solid #e6e8eb; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ---------- 模态框 / 抽屉 ---------- */
.modal-mask{
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal{
  background: #fff; border-radius: 14px; width: 640px; max-width: 100%;
  max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal.wide{ width: 760px; }
.modal .modal-head{ padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal .modal-head h3{ font-size: 16px; font-weight: 700; }
.modal .modal-head .x{ border: none; background: none; font-size: 22px; color: var(--text-sub); cursor: pointer; }
.modal .modal-body{ padding: 20px; overflow-y: auto; }
.modal .modal-foot{ padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.drawer-mask{ position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; justify-content: flex-end; }
.drawer{
  background: #fff; width: 560px; max-width: 100%; height: 100%;
  display: flex; flex-direction: column; animation: slidein .25s ease;
}
@keyframes slidein{ from{ transform: translateX(40px); opacity: .6; } to{ transform: translateX(0); opacity: 1; } }
.drawer .drawer-head{ padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.drawer .drawer-head h3{ font-size: 16px; font-weight: 700; }
.drawer .drawer-body{ padding: 20px; overflow-y: auto; flex: 1; }
.drawer .drawer-foot{ padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); }

/* 标签输入 */
.tag-input{
  border: 1px solid var(--input-border); border-radius: 10px; padding: 6px 8px;
  min-height: 42px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: var(--input-bg); box-shadow: 0 1px 2px rgba(16,24,40,.03);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.tag-input:hover{ border-color: var(--input-border-hover); }
.tag-input:focus-within{ border-color: var(--primary); background: #fff; box-shadow: var(--ring); }
.field .tag-input input{ border: none; outline: none; background: none; box-shadow: none; flex: 1; min-width: 100px; padding: 4px 3px; font-size: 14px; color: var(--text); }
.field .tag-input input::placeholder{ color: #b7bdc7; }
.tag{ background: var(--primary-soft); color: var(--primary); border-radius: 6px; padding: 3px 8px; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; }
.tag .x{ cursor: pointer; font-weight: 700; }

/* 上传 */
.uploader{ display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.upload-box{
  width: 78px; height: 78px; border: 1px dashed var(--border); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-sub); font-size: 12px; cursor: pointer; background: #fafbfc; position: relative; overflow: hidden;
}
.upload-box:hover{ border-color: var(--primary); color: var(--primary); }
.upload-box .plus{ font-size: 22px; line-height: 1; }
.upload-box img{ width: 100%; height: 100%; object-fit: cover; }
.upload-box .del{ position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 18px; height: 18px; line-height: 16px; font-size: 12px; }
.upload-box .prog{ position: absolute; inset: 0; background: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--primary); }

/* 多选商品 */
.multi-select{
  border: 1px solid var(--input-border); border-radius: 10px; padding: 8px;
  background: var(--input-bg);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.multi-select:focus-within{ border-color: var(--primary); background: #fff; box-shadow: var(--ring); }
.multi-select .ms-search{ margin-bottom: 8px; }
.multi-select .ms-opt{ display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.multi-select .ms-opt:hover{ background: #fafafa; }
.multi-select .ms-opt img{ width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.multi-select .ms-opt .pick{ margin-left: auto; color: var(--primary); }
.ms-picked{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ms-picked .tag{ background: #eef0f2; color: var(--text); }

/* 优惠券卡片 */
.coupon-list{ display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; }
.coupon{ display: flex; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.coupon .left{ width: 96px; background: linear-gradient(135deg, var(--primary-light), var(--primary)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; }
.coupon .left .big{ font-size: 24px; font-weight: 800; }
.coupon .left .big small{ font-size: 13px; font-weight: 500; }
.coupon .left .cond{ font-size: 11px; opacity: .9; margin-top: 4px; text-align: center; }
.coupon .right{ flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.coupon .right .t{ font-weight: 700; font-size: 14px; }
.coupon .right .d{ font-size: 12px; color: var(--text-sub); }
.coupon .right .meta{ font-size: 12px; color: var(--text-sub); margin-top: auto; }
.coupon .right .ops{ display: flex; gap: 6px; margin-top: 4px; }

/* 系统设置 */
.kv{ display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; font-size: 14px; }
.kv .k{ color: var(--text-sub); }
.kv .v{ word-break: break-all; }
.note{ background: #fff8ef; border: 1px solid #f3e2cb; color: #92704a; font-size: 13px; border-radius: 8px; padding: 10px 12px; margin-top: 14px; line-height: 1.7; }
.note code{ background: #f3e2cb; padding: 1px 5px; border-radius: 4px; }

/* order items */
.order-items{ font-size: 12px; color: var(--text-sub); }
.order-items .oi{ display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.order-items .oi img{ width: 22px; height: 22px; border-radius: 5px; object-fit: cover; }

/* lightbox */
.lightbox{ position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 200; display: flex; align-items: center; justify-content: center; }
.lightbox img{ max-width: 90%; max-height: 90%; border-radius: 8px; }
.lightbox .lightbox-close{ position: absolute; top: 20px; right: 28px; color: #fff; font-size: 36px; cursor: pointer; }

/* toast */
.toast-container{ position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast{ background: rgba(44,47,54,.95); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.2); animation: toastin .2s ease; max-width: 80vw; }
.toast.ok{ background: rgba(39,174,96,.96); }
.toast.err{ background: rgba(235,87,87,.96); }
@keyframes toastin{ from{ transform: translateY(-10px); opacity: 0; } to{ transform: translateY(0); opacity: 1; } }

/* 响应式 */
@media (max-width: 900px){
  .stat-grid{ grid-template-columns: repeat(2,1fr); }
  .dash-cols{ grid-template-columns: 1fr; }
  .sidebar{ width: 64px; }
  .sidebar .brand span, .nav-item span{ display: none; }
  .main{ margin-left: 64px; }
}
