/* ==========================================================================
 * 共享工单系统 · 商家管理端 特有样式
 *   仅放「商家端独有」的部分：登录页布局、工单详情、开单选择器等。
 *   通用组件（卡片/表格/按钮/弹窗/标签/分页/时间线）全部来自 assets/base.css，
 *   本文件不重复定义，只做补充与微调。
 * ========================================================================== */

/* ============================ 登录页 ============================ */

.login-page {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ---- 左：品牌区 ---- */
.login-brand {
  flex: 1 1 52%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #1d54d4 0%, #2b6cf6 45%, #6a4bf5 100%);
  color: #fff;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand::after {
  content: '';
  position: absolute;
  right: -120px; top: -120px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.login-brand::before {
  content: '';
  position: absolute;
  left: -80px; bottom: -160px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.lb-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  margin-bottom: 22px;
}
.lb-title { font-size: 30px; font-weight: 700; letter-spacing: -.5px; line-height: 1.3; }
.lb-sub { font-size: 14px; opacity: .82; margin-top: 10px; line-height: 1.8; max-width: 420px; }
.lb-feat { margin-top: 34px; display: flex; flex-direction: column; gap: 13px; position: relative; z-index: 1; }
.lb-feat li {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; opacity: .9;
}
.lb-feat .lb-dot {
  width: 20px; height: 20px; flex: 0 0 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.lb-foot {
  position: absolute;
  left: 60px; bottom: 40px;
  font-size: 12px; opacity: .6;
}

/* ---- 右：表单区 ---- */
.login-form-wrap {
  flex: 0 0 460px;
  max-width: 460px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 52px;
  overflow-y: auto;
}
.lf-head { margin-bottom: 26px; }
.lf-head h2 { font-size: 22px; font-weight: 650; letter-spacing: -.3px; }
.lf-head p { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.lf-err {
  background: var(--danger-bg);
  color: #a8352c;
  border: 1px solid #f7c8c4;
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 7px;
  line-height: 1.55;
}
.lf-err .ico { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; }
.lf-field { margin-bottom: 16px; }
.lf-field > label {
  display: block; font-size: 12.5px; color: var(--text-2);
  font-weight: 500; margin-bottom: 6px;
}
.lf-field > label .req { color: var(--danger); margin-left: 2px; }
.lf-field .hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.lf-field .ipt { padding: 9px 12px; font-size: 13.5px; }
.lf-code-wrap { position: relative; }
.lf-code-wrap .code-badge {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: var(--brand-light); color: var(--brand);
  font-size: 11px; padding: 2px 7px; border-radius: 4px;
  cursor: pointer; user-select: none;
}
.lf-code-wrap .code-badge:hover { background: var(--brand); color: #fff; }
.lf-btn { margin-top: 6px; }
.lf-tip {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line-2);
  font-size: 12px; color: var(--text-3); line-height: 1.8;
}
.lf-tip b { color: var(--text-2); font-weight: 600; }

@media (max-width: 900px) {
  .login-page { flex-direction: column; }
  .login-brand { flex: 0 0 auto; padding: 32px 24px; }
  .lb-title { font-size: 22px; }
  .lb-feat, .lb-foot { display: none; }
  .login-form-wrap { flex: 1 1 auto; max-width: none; padding: 30px 24px 44px; }
}

/* ============================ 主框架补充 ============================ */

/* 移动端侧栏开关（≥860px 隐藏） */
.sb-toggle {
  display: none;
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--text-2);
  flex: 0 0 32px;
}
.sb-mask {
  position: fixed; inset: 0;
  background: rgba(23, 26, 31, .4);
  z-index: 880;
}
@media (max-width: 860px) {
  .sb-toggle { display: flex; }
  .tb-crumb { display: none; }
}

/* 侧栏无二级菜单时不需要 subnav 留白 */
.subnav[hidden] { display: none !important; }

/* 待办中心行 */
.todo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background .15s;
}
.todo-row:last-child { border-bottom: 0; }
.todo-row:hover { background: var(--bg-2); }
.todo-ico {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  background: var(--brand-light); color: var(--brand);
}
.todo-ico.warn { background: var(--warning-bg); color: var(--warning); }
.todo-ico.danger { background: var(--danger-bg); color: var(--danger); }
.todo-ico.ok { background: var(--success-bg); color: var(--success); }
.todo-main { flex: 1; min-width: 0; }
.todo-name { font-size: 13.5px; font-weight: 500; }
.todo-desc { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.todo-num { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.todo-num.zero { color: var(--text-4); }

/* 卡片内紧凑统计块（列表页头部） */
.mini-stat {
  display: flex; gap: 22px; flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg-2);
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
}
.mini-stat .ms-item { font-size: 12.5px; color: var(--text-3); }
.mini-stat .ms-item b {
  display: block; font-size: 18px; color: var(--text);
  font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums;
}

/* ============================ 工单详情 ============================ */

.od-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: -20px -20px 16px;
  padding: 0 20px;
  background: var(--bg-2);
}
.od-tab {
  padding: 10px 14px;
  font-size: 13px; color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.od-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.od-pane { display: none; }
.od-pane.active { display: block; }

.od-hero {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-light);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.od-hero .od-no { font-size: 15px; font-weight: 650; letter-spacing: .2px; }
.od-hero .od-amt { margin-left: auto; font-size: 20px; font-weight: 700; color: var(--brand); }

.od-sec-title {
  font-size: 13px; font-weight: 600;
  padding: 3px 0 8px;
  display: flex; align-items: center; gap: 6px;
}
.od-sec-title::before {
  content: ''; width: 3px; height: 13px;
  background: var(--brand); border-radius: 2px;
}

.od-acts {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 14px;
  margin-top: 16px;
  border-top: 1px solid var(--line-2);
}

.od-log-img {
  max-width: 120px; max-height: 120px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin: 6px 6px 0 0;
  display: block;
}

.sum-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 6px 0;
}
.sum-row.total {
  border-top: 1px dashed var(--line);
  margin-top: 6px; padding-top: 10px;
  font-size: 15px; font-weight: 650;
}
.sum-row .s-label { color: var(--text-2); }
.sum-row .s-val { font-variant-numeric: tabular-nums; font-weight: 600; }

/* 汇总侧栏（费用 Tab） */
.od-grid { display: grid; grid-template-columns: 1fr 268px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .od-grid { grid-template-columns: 1fr; } }
.od-side {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 14px;
}

/* ============================ 开单弹窗 ============================ */

.oi-sec {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.oi-sec-hd {
  padding: 9px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-2);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.oi-sec-bd { padding: 14px; }

.oi-mode {
  display: flex; gap: 8px; margin-bottom: 14px;
}

/* 服务项目选择器 */
.oi-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 2px;
}
.oi-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: all .15s;
  background: var(--card);
}
.oi-item:hover { border-color: var(--brand); }
.oi-item.on { border-color: var(--brand); background: var(--brand-light); }
.oi-item .oi-ck {
  width: 15px; height: 15px; flex: 0 0 15px;
  border: 1px solid var(--text-4);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff;
}
.oi-item.on .oi-ck { background: var(--brand); border-color: var(--brand); }
.oi-item .oi-nm { flex: 1; min-width: 0; font-size: 13px; }
.oi-item .oi-nm i {
  display: block; font-style: normal;
  font-size: 11px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.oi-item .oi-pr { font-size: 13px; font-weight: 600; color: var(--brand); white-space: nowrap; }

.oi-total {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: var(--brand-soft);
  border-top: 1px solid var(--brand-light);
  font-size: 13px;
}
.oi-total b { font-size: 17px; color: var(--brand); font-weight: 700; }

.oi-cust-list {
  max-height: 210px; overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.oi-cust {
  padding: 8px 11px; cursor: pointer;
  border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px;
}
.oi-cust:last-child { border-bottom: 0; }
.oi-cust:hover { background: var(--bg-2); }
.oi-cust.on { background: var(--brand-light); }
.oi-cust .oc-nm { flex: 1; min-width: 0; font-size: 13px; }
.oi-cust .oc-nm i {
  font-style: normal; font-size: 11.5px; color: var(--text-3); margin-left: 6px;
}
.oi-cust .oc-ph { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* 星级（评分展示） */
.stars { color: var(--warning); letter-spacing: 1px; font-size: 12.5px; }
.stars .off { color: var(--text-4); }

/* 详情弹窗里的二级 tab（客户详情 / 师傅详情） */
.sub-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.sub-tab {
  padding: 8px 13px; font-size: 13px; cursor: pointer;
  color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.sub-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* 通用：筛选栏里的紧凑输入 */
.f-inline { width: auto; min-width: 148px; }
.f-inline-sm { width: 104px; }

/* 日期区间 */
.date-range { display: flex; align-items: center; gap: 6px; }
.date-range input { width: 140px; }
.date-range span { color: var(--text-3); }

/* 空态小图标（图表区） */
.chart-empty {
  padding: 34px; text-align: center;
  color: var(--text-3); font-size: 13px;
}