/* ============================================================
   大明装饰数字化平台 · 一期原型
   应用层样式：三端外壳（客户端 / 管理端 / 师傅端）
   + 通用组件（按钮/表单/卡片/标签/弹窗/表格/分页/瀑布流等）
   ============================================================ */

/* ============================================================
   1. 三端外壳
   ============================================================ */

/* ---- 客户端 / 师傅端：手机壳布局（居中、圆角、底部 Tab）---- */
.shell-app {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: #ECE6DC; /* 外层底色，衬托「手机壳」 */
}
.shell-app-inner {
  width: 100%;
  max-width: var(--app-max);
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(58, 53, 47, 0.12);
}
/* 内容滚动区 */
.app-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: calc(64px + env(safe-area-inset-bottom)); /* 为底部 Tab 预留 */
}
/* 客户端顶部导航 */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-header .brand {
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 15px;
}
.app-header .brand .sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 6px; }
/* 客户端底部 Tab */
.app-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max);
  height: 60px;
  background: rgba(251, 250, 247, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-soft);
  display: flex;
  z-index: 30;
}
.app-tabbar .tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  transition: color 0.25s var(--ease);
}
.app-tabbar .tab-item.active { color: var(--accent); }
.app-tabbar .tab-item .ic { width: 22px; height: 22px; }
.app-tabbar .tab-item.active .ic { filter: drop-shadow(0 0 4px var(--accent-soft)); }

/* ---- 管理端：深色侧栏 + 顶栏 布局（莫迪风格，与 admin 一致）---- */
.shell-admin { min-height: 100vh; display: flex; }
.admin-side {
  width: var(--admin-side-w);
  background: var(--dark);
  color: rgba(245, 242, 237, 0.78);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
}
.admin-side .side-logo {
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--dark-line);
}
.admin-side .side-logo .logo-name { font-weight: 700; font-size: 18px; letter-spacing: 2px; color: var(--bg); }
.admin-side .side-logo .logo-sub { font-size: 11px; color: rgba(245,242,237,.5); margin-top: 2px; }
.side-grp {
  padding: 18px 22px 8px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(245, 242, 237, 0.4);
}
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  font-size: 14px;
  cursor: pointer;
  color: rgba(245, 242, 237, 0.78);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.side-link:hover { background: var(--dark-2); color: var(--bg); }
.side-link.active {
  background: linear-gradient(90deg, rgba(169, 130, 92, 0.28), transparent);
  color: var(--bg);
  border-left: 3px solid var(--accent);
}
.side-link .ic { width: 18px; height: 18px; flex: none; }
.side-foot {
  margin-top: auto;
  padding: 16px 22px;
  border-top: 1px solid var(--dark-line);
  font-size: 12px;
  color: rgba(245, 242, 237, 0.5);
  line-height: 1.7;
}
.side-foot .foot-phone { color: var(--accent-2); display: block; margin-top: 2px; }
.admin-main { flex: 1; margin-left: var(--admin-side-w); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.admin-topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-topbar .crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.admin-topbar .crumb .sep { color: var(--muted); }
.admin-topbar .crumb .cur { color: var(--ink); font-weight: 600; }
.topbar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 10px; cursor: pointer;
  transition: background 0.2s;
}
.topbar-user:hover { background: var(--accent-soft); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.admin-body { flex: 1; padding: 24px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ============================================================
   2. 通用组件
   ============================================================ */

/* ---- 按钮（按用户习惯：分组按钮 内边距 7px/12px，字号 14px）---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 12px; font-size: 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card-2); color: var(--ink);
  transition: all 0.22s var(--ease); white-space: nowrap; user-select: none;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text); }
.btn-ghost:hover { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn-soft:hover { background: rgba(169,130,92,0.24); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #6B7A5C; border-color: #6B7A5C; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8A4A3A; border-color: #8A4A3A; }
.btn-danger-soft { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-danger-soft:hover { background: rgba(154,90,74,0.22); }
.btn-sm { padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn .ic { width: 15px; height: 15px; }

/* 按钮组：圆角衔接 */
.btn-group { display: inline-flex; gap: 0; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: 10px 0 0 10px; }
.btn-group .btn:last-child { border-radius: 0 10px 10px 0; }
.btn-group .btn + .btn { border-left: none; }

/* ---- 卡片 ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px 20px; }
.card-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-title h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-title h3::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--accent); }

/* ---- 统计卡 ---- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { padding: 16px 18px; position: relative; overflow: hidden; }
.stat-card .label { font-size: 12px; color: var(--text); }
.stat-card .value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-card .value em { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.stat-card .ic { position: absolute; right: 14px; top: 14px; width: 26px; height: 26px; color: var(--accent); opacity: 0.85; }
.stat-card.ok .ic { color: var(--ok); }
.stat-card.warn .ic { color: var(--warn); }
.stat-card.danger .ic { color: var(--danger); }

/* ---- 标签 ---- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; font-size: 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap;
}
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: #8a6a3c; }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-plain { background: #EFEAE1; color: var(--text); }
.tag-line { background: transparent; border: 1px solid var(--line); color: var(--text); }

/* ---- 表单 ---- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 13px; color: var(--text); }
.form-item label .req { color: var(--danger); margin-left: 2px; }
.form-item label .hint { color: var(--muted); font-weight: 400; margin-left: 6px; }
.field {
  width: 100%; padding: 10px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card-2);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.field { resize: vertical; min-height: 84px; line-height: 1.7; }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A736B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 13px; font-size: 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  transition: all 0.2s var(--ease); cursor: pointer; user-select: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 客户池「线索阶段」点击修改入口（虚线下划线 + ✎ 画笔角标提示可编辑） */
.stage-edit {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; margin: -2px -6px; border-radius: 6px;
  cursor: pointer; text-decoration: none; border-bottom: 1px dashed var(--muted);
  transition: background 0.2s var(--ease);
}
.stage-edit:hover { background: var(--accent-soft); }
.stage-edit .stage-pen { font-size: 11px; color: var(--muted); opacity: 0.7; transition: all 0.2s var(--ease); }
.stage-edit:hover .stage-pen { opacity: 1; color: var(--accent); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* ---- 搜索 / 筛选条 ---- */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.search-box input { padding-left: 34px; width: 220px; }
.tab-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-pill {
  padding: 6px 14px; font-size: 13px; border-radius: 999px; cursor: pointer;
  color: var(--text); background: transparent; transition: all 0.2s var(--ease);
}
.tab-pill:hover { color: var(--accent); background: var(--accent-soft); }
.tab-pill.active { background: var(--ink); color: var(--bg); }

/* ---- 表格 ---- */
.table-wrap { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
table.dm-table { width: 100%; border-collapse: collapse; }
.dm-table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 500;
  padding: 12px 16px; background: #F7F3EC; border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.dm-table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: middle; }
.dm-table tbody tr { transition: background 0.2s; }
.dm-table tbody tr:hover { background: rgba(169, 130, 92, 0.05); }
.dm-table tbody tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* 表单地址联想下拉（新居地址复用） */
.suggest-box {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 50; margin-top: 4px;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(58, 53, 47, 0.12); max-height: 220px; overflow: auto;
}
.suggest-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  cursor: pointer; font-size: 13px; color: var(--text);
}
.suggest-item:hover { background: var(--accent-soft); }
.suggest-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.suggest-empty { padding: 12px 14px; color: var(--muted); font-size: 12px; }

/* ---- 分页 ---- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 14px 16px; }
.pager .pg-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; font-size: 13px;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center;
}
.pager .pg-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pager .pg-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager .pg-info { font-size: 12px; color: var(--muted); margin-right: 8px; }

/* ---- 空状态 ---- */
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 48px; height: 48px; margin: 0 auto 12px; opacity: 0.4; }
.empty .t { font-size: 14px; }

/* ---- 浮动操作按钮 ---- */
.fab {
  position: fixed; right: 26px; bottom: 26px; width: 52px; height: 52px;
  border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); transition: transform 0.25s var(--ease), background 0.2s;
  z-index: 25;
}
.fab:hover { transform: translateY(-3px); background: var(--accent-dark); }
.fab .ic { width: 22px; height: 22px; }

/* ============================================================
   3. 登录 / 注册页
   ============================================================ */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(169, 130, 92, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 100%, rgba(126, 139, 111, 0.16), transparent 55%),
    var(--bg);
  padding: 24px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand .logo-mark {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px;
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
  color: var(--accent-2); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.auth-brand h1 { font-size: 22px; letter-spacing: 3px; }
.auth-brand p { color: var(--text); font-size: 13px; margin-top: 6px; }
/* 开发阶段仅「管理端」一个入口 → flex 居中；恢复三端时各 1/3 自动均分（max-width 不生效） */
.role-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.role-tab {
  flex: 1 1 0; max-width: 220px;
  padding: 11px 0; text-align: center; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  transition: all 0.25s var(--ease); font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.role-tab .ic { width: 20px; height: 20px; }
.role-tab:hover { border-color: var(--accent); color: var(--accent); }
.role-tab.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.role-tab.active .ic { color: var(--accent-2); }
.auth-tip { margin-top: 16px; text-align: center; font-size: 12px; color: var(--muted); }
.auth-tip a { color: var(--accent); cursor: pointer; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ============================================================
   4. 客户端：案例瀑布流
   ============================================================ */
.case-masonry { columns: 2; column-gap: 12px; padding: 12px 16px 8px; }
.case-card {
  break-inside: avoid; margin-bottom: 12px; border-radius: 14px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  display: block;
}
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.case-card .cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.case-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.case-card:hover .cover img { transform: scale(1.05); }
.case-card .cover .style-badge {
  position: absolute; left: 8px; top: 8px; background: rgba(20, 28, 24, 0.72);
  color: #F5F2ED; font-size: 11px; padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(4px);
}
.case-card .cover .area-badge {
  position: absolute; right: 8px; bottom: 8px; background: rgba(255,255,255,0.92);
  color: var(--ink); font-size: 11px; padding: 2px 8px; border-radius: 8px; font-weight: 600;
}
.case-card .meta { padding: 10px 12px 12px; }
.case-card .meta .name { font-size: 14px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.case-card .meta .sub { margin-top: 6px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }

/* 案例详情 */
.case-hero { position: relative; height: 300px; }
.case-hero img { width: 100%; height: 100%; object-fit: cover; }
.case-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(20,28,24,0.55)); }
.case-back {
  position: absolute; left: 14px; top: 14px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(20, 28, 24, 0.55); color: #fff; backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.case-hero .hero-title { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 5; color: #fff; }
.case-hero .hero-title h2 { font-size: 18px; font-weight: 600; }
.case-hero .hero-title .tags { margin-top: 6px; display: flex; gap: 8px; }
.info-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--muted); font-size: 13px; }
.info-row .v { font-weight: 600; }
.case-demo-note { display: flex; align-items: center; gap: 8px; background: var(--warn-soft); color: #8a6a3c; font-size: 12px; padding: 8px 12px; border-radius: 10px; margin: 12px 16px; }

/* ============================================================
   5. 客户管理
   ============================================================ */
.cust-card { display: flex; align-items: center; gap: 14px; padding: 15px 16px; cursor: pointer; transition: background 0.2s; }
.cust-card:hover { background: rgba(169, 130, 92, 0.05); }
.cust-avatar {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--accent-soft), rgba(126,139,111,0.14));
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.detail-hero { background: linear-gradient(135deg, var(--dark), var(--dark-2)); color: var(--bg); border-radius: var(--r-lg); padding: 20px; position: relative; overflow: hidden; }
.detail-hero .name { font-size: 20px; font-weight: 700; }
.detail-hero .phone { color: rgba(245,242,237,0.7); margin-top: 4px; font-size: 13px; }
.detail-hero .phone a:hover { text-decoration: underline; }
/* 客户电话：可点击直接拨打（tel:） */
.phone-dial { cursor: pointer; white-space: nowrap; }
.phone-dial:hover { text-decoration: underline; }
.detail-hero .hero-home {
  margin-top: 10px; font-size: 13px; color: #E9D5B5;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 12px; border-radius: 10px; width: fit-content; max-width: 100%;
}
.detail-hero .ext-badge { position: absolute; right: 14px; top: 14px; }
.tab-underline { display: flex; gap: 6px; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
.tab-underline button {
  padding: 10px 16px; font-size: 14px; color: var(--text); position: relative;
  transition: color 0.2s;
}
.tab-underline button.active { color: var(--ink); font-weight: 600; }
.tab-underline button.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.follow-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.follow-item:last-child { border-bottom: none; }
.follow-item .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.follow-item .body .time { font-size: 12px; color: var(--muted); }
.follow-item .body .content { margin-top: 4px; white-space: pre-wrap; }
.follow-item .body .next { margin-top: 6px; font-size: 12px; color: #8a6a3c; background: var(--warn-soft); display: inline-block; padding: 2px 8px; border-radius: 8px; }
.follow-toolbar { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; }
.follow-toolbar .search-box input { width: 160px; }

/* 字段配置 / 详情列表 */
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.kv { display: flex; flex-direction: column; gap: 3px; }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-size: 14px; font-weight: 500; }
.kv .v.blank { color: var(--muted); font-weight: 400; }
.proto-mark {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  color: #8a6a3c; background: var(--warn-soft); padding: 1px 7px; border-radius: 999px;
}

/* ============================================================
   6. 弹窗 / 消息 / 加载
   ============================================================ */
.dm-toast {
  position: fixed; left: 50%; top: 64px; transform: translate(-50%, -20px);
  background: rgba(20, 28, 24, 0.92); color: #F5F2ED; padding: 10px 18px;
  border-radius: 12px; font-size: 13px; z-index: 999; box-shadow: var(--shadow-lg);
  opacity: 0; transition: all 0.3s var(--ease); max-width: 80%; text-align: center;
}
.dm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.dm-toast.err { background: rgba(154, 90, 74, 0.95); }
.dm-toast.ok { background: rgba(126, 139, 111, 0.95); }

.dm-mask { position: fixed; inset: 0; background: rgba(20, 28, 24, 0.45); backdrop-filter: blur(3px); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.2s var(--ease); }
.dm-modal { width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: popIn 0.28s var(--ease); }
.dm-modal .m-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.dm-modal .m-head h3 { font-size: 16px; }
.dm-modal .m-body { padding: 16px 22px 22px; }
.dm-modal .m-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; }

.dm-loading { position: fixed; inset: 0; z-index: 950; background: rgba(245,242,237,0.6); display: flex; align-items: center; justify-content: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* 骨架屏 */
.sk { position: relative; overflow: hidden; background: #EDE7DC; border-radius: 8px; }
.sk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent); animation: shine 1.3s infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ============================================================
   7. 师傅端 / 注册
   ============================================================ */
.worker-avatar-lg { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; }
.profile-card { text-align: center; padding: 26px 20px; }
.profile-card .p-name { font-size: 18px; font-weight: 700; margin-top: 12px; }
.profile-card .p-phone { color: var(--muted); font-size: 13px; margin-top: 4px; }
.menu-list { border-radius: var(--r-lg); overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 15px 18px; background: var(--card); border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background 0.2s; }
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--accent-soft); }
.menu-item .ic { width: 18px; height: 18px; color: var(--accent); }
.menu-item .arrow { margin-left: auto; color: var(--muted); width: 16px; height: 16px; }
.section-label { font-size: 13px; color: var(--muted); margin: 18px 16px 8px; }

/* 瀑布流下的响应式（窄屏 2 列 → 宽屏 3 列） */
@media (min-width: 720px) { .case-masonry { columns: 3; } }
@media (min-width: 1024px) { .case-masonry { columns: 4; } }

/* 管理端响应式：窄屏收窄侧栏 */
@media (max-width: 900px) {
  .admin-side { width: 68px; }
  .admin-side .side-logo .logo-sub, .admin-side .side-link span:not(.ic), .admin-side .side-grp, .admin-side .side-foot { display: none; }
  .side-link { justify-content: center; padding: 14px 0; }
  .admin-main { margin-left: 68px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
}
