/* ===== App Shell：桌面左侧栏 + 主工作区 / 手机底部导航 ===== */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; width: 100%; max-width: 100%; }
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 14px;
}
.side .logo { padding: 4px 6px 10px; }
.role-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.role-card b { display: block; font-size: 14px; }
.role-card small { font-family: var(--mono); font-size: 10.5px; color: var(--brand); letter-spacing: 0.5px; }

.side-nav { display: flex; flex-direction: column; gap: 3px; overflow: auto; flex: 1; }
.side-nav .grp { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.2px; color: var(--text-3); padding: 12px 10px 4px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: 0.12s;
}
.side-nav a:hover { background: var(--nav-hover-bg); color: var(--text); }
.side-nav a.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--brand);
}
.side-nav a .ico { width: 20px; text-align: center; }
.side-nav a .cnt {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bad-soft);
  color: var(--bad);
  padding: 0 7px;
  border-radius: 999px;
  font-weight: 700;
}
.side-foot { display: grid; gap: 8px; }

.main { min-width: 0; max-width: 100%; display: flex; flex-direction: column; }
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--appbar-bg);
  backdrop-filter: blur(12px);
}
.appbar .crumb { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.appbar .sp { flex: 1; min-width: 8px; }
.appbar .mode {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--brand-border);
  color: var(--nav-active-text);
  background: var(--brand-soft);
  white-space: nowrap;
}
.appbar .mode.live {
  border-color: var(--ok);
  color: var(--ok);
  background: var(--ok-soft);
}

.page { padding: 24px 28px 40px; max-width: var(--container); width: 100%; min-width: 0; overflow-x: clip; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ph h1 { font-size: 26px; font-weight: 900; letter-spacing: -0.4px; margin-top: 4px; }
.ph .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; margin-bottom: 8px; }
.back:hover { color: var(--brand); }
.bottom-nav { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .appbar { padding: 10px 14px; }
  .appbar .crumb { display: none; }
  .page { padding: 16px 14px 96px; }
  .ph h1 { font-size: 21px; }
  .bottom-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    z-index: 40;
    background: var(--bottom-nav-bg);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px;
    font-size: 11px;
    color: var(--text-3);
    border-radius: 10px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }
  .bottom-nav a .ico { font-size: 17px; }
  .bottom-nav a.active { color: var(--nav-active-text); background: var(--nav-active-bg); font-weight: 700; }
}
@media (max-width: 640px) {
  .appbar { justify-content: space-between; gap: 8px; }
  .appbar .sp { display: none; }
  .appbar .mode { display: none; }
  .theme-opt { padding: 4px 8px; font-size: 11.5px; }
}

/* ===== Grid / Stat ===== */
.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1100px) { .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .g2, .g3, .g4, .g5 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
}

.stat { padding: 18px; }
.stat .eyebrow { font-size: 10.5px; }
.stat b { display: block; font-size: 28px; font-weight: 900; margin: 6px 0 2px; letter-spacing: -0.5px; }
.stat small { color: var(--text-3); font-size: 12px; display: block; overflow-wrap: anywhere; }
.stat.hl {
  border-color: var(--hl-border);
  background: var(--hl-bg);
}
.card h3 {
  font-size: 15.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.card h3 .eyebrow { font-size: 10.5px; }

/* ===== 响应式长流程文字块（防溢出/裁切） ===== */
.flow-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--info-border);
  background: var(--info-bg);
  color: var(--info-text);
  margin-bottom: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.flow-strip > * {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.flow-text {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  flex: 1 1 220px;
  max-width: 100%;
}
.stage-pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

/* ===== List rows ===== */
.list { display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.row:last-child { border-bottom: none; }
.row.click { cursor: pointer; border-radius: 10px; padding: 12px 10px; }
.row.click:hover { background: var(--surface-2); }
.row .grow { flex: 1 1 140px; min-width: 0; }
.row .grow b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.row .grow small {
  color: var(--text-2);
  font-size: 12.5px;
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin-top: 2px;
}
.row .end { text-align: right; font-size: 13px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
@media (max-width: 560px) {
  .row .end { width: 100%; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; text-align: left; }
}

.av {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  color: #06101f;
  flex-shrink: 0;
}
.av.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }

/* ===== Status Badges ===== */
.st {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.st-working, .st-done, .st-active, .st-won, .st-paid, .st-approved, .st-l1, .st-completed, .st-suitable {
  background: var(--ok-soft);
  color: var(--ok);
}
.st-available, .st-new, .st-qualified, .st-reserved, .st-confirmed {
  background: var(--brand-soft);
  color: var(--nav-active-text);
}
.st-onway, .st-upcoming, .st-pending, .st-considering, .st-l2, .st-interview, .st-scheduled {
  background: var(--warn-soft);
  color: var(--warn);
}
.st-placed {
  background: var(--placed-soft);
  color: var(--placed);
}
.st-complaint, .st-lost, .st-l3, .st-cancelled, .st-rejected, .st-unsuitable, .st-no-show {
  background: var(--bad-soft);
  color: var(--bad);
}
.st-inactive {
  background: var(--disabled-bg);
  color: var(--text-3);
}

/* ===== Filters & Search ===== */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.toolbar > * { min-width: 0; max-width: 100%; }
@media (max-width: 720px) { .toolbar { grid-template-columns: minmax(0, 1fr); } }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--input-border);
  border-radius: var(--r-pill);
  background: var(--input-bg);
  margin-bottom: 12px;
}
.toolbar .search { margin-bottom: 0; }
.search:focus-within {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px var(--focus-soft);
}
.search input { flex: 1; min-width: 0; background: none; border: none; outline: none; font-size: 13.5px; color: var(--text); }
.toolbar-select {
  padding: 9px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 13.5px;
}
.inline-select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  max-width: 100%;
}
.inline-input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
}

/* ===== Bar chart ===== */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .b i { display: block; width: 100%; max-width: 40px; border-radius: 8px 8px 3px 3px; background: var(--grad); opacity: 0.85; transition: 0.2s; }
.bars .b:hover i { opacity: 1; }
.bars .b span { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.bars .b em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--text-2); }
.hbar { display: grid; grid-template-columns: 84px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; margin: 8px 0; }
.hbar .track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }

/* ===== Map mock ===== */
.map {
  position: relative;
  height: 220px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--map-bg);
}
.pin { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; font-size: 11px; gap: 3px; }
.pin i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 5px var(--brand-soft); }
.pin span {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: var(--card-shadow);
  font-weight: 600;
}

/* ===== CRM Kanban ===== */
.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.col {
  background: var(--kanban-col-bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px;
  min-height: 220px;
  min-width: 0;
}
.col h4 {
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.kcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: var(--card-shadow);
}
.kcard:hover { border-color: var(--brand-border); }
.kcard b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.kcard .tag { white-space: nowrap; flex-shrink: 0; }
.kcard small { color: var(--text-2); display: block; font-size: 12px; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.kcard .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kcard .acts button {
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  background: var(--section-bg);
}
.kcard .acts button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.kcard .acts button.primary-act {
  border-color: var(--brand-border);
  color: var(--nav-active-text);
  background: var(--brand-soft);
  font-weight: 600;
}
@media (max-width: 900px) {
  .kanban {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
  }
  .col { min-height: auto; }
}

/* ===== Forms ===== */
.form { display: grid; gap: 14px; }
.form > *, .field { min-width: 0; }
.card.form { min-width: 0; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 620px) { .form-grid-2 { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; font-weight: 600; }
.field label .req { color: var(--bad); margin-left: 3px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  font-size: 13.5px;
  transition: 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px var(--focus-soft);
}
.field textarea { min-height: 84px; resize: vertical; }
.check-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--section-bg);
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}
.check-pill input { width: auto; accent-color: var(--brand); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.opt {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--section-bg);
  color: var(--text);
  text-align: center;
  font-size: 13px;
  cursor: pointer;
  transition: 0.12s;
}
.opt b { display: block; font-size: 15px; }
.opt small { color: var(--text-3); }
.opt.sel, .opt:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--nav-active-text); }
@media (max-width: 620px) { .opt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== Auth ===== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background: var(--auth-side-bg);
}
.auth-side h1 { font-size: clamp(26px, 3.4vw, 42px); line-height: 1.25; font-weight: 900; letter-spacing: -0.6px; margin: 14px 0; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 460px; }
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.auth-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.role-pick { display: grid; gap: 10px; }
.role-pick button {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  transition: 0.15s;
}
.role-pick button:hover { border-color: var(--brand-border); box-shadow: var(--card-hover-shadow); }
.role-pick .ri { font-size: 24px; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex-shrink: 0; }
.role-pick b { display: block; color: var(--text); }
.role-pick small { color: var(--text-3); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

/* ===== Banners / Alerts / Timeline / Modal ===== */
.banner {
  padding: 12px 15px;
  border-radius: var(--r);
  border: 1px dashed var(--info-border);
  background: var(--info-bg);
  color: var(--info-text);
  font-size: 13px;
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}
.banner.warn {
  border-color: var(--warn-border);
  background: var(--warn-soft);
  color: var(--warn-text);
}
.alert-err {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--bad-border);
  background: var(--bad-soft);
  color: var(--bad-text);
  font-size: 13px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.empty { padding: 28px 16px; text-align: center; color: var(--text-3); font-size: 13.5px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { text-align: right; overflow-wrap: anywhere; }
.total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 900; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
.stars { font-size: 34px; letter-spacing: 6px; cursor: pointer; color: var(--text-3); }
.stars .on { color: #f59e0b; }
.center { text-align: center; }
.big-ok { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 10px auto 16px; font-size: 36px; background: var(--ok-soft); border: 1px solid var(--ok); }
.date-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.date-scroll .opt { min-width: 70px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week .day { border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; min-height: 120px; background: var(--section-bg); font-size: 12px; }
.week .day.today { border-color: var(--brand); }
.week .day h5 { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-bottom: 6px; }
.week .job { background: var(--brand-soft); color: var(--nav-active-text); font-weight: 600; border-radius: 8px; padding: 4px 6px; margin-bottom: 4px; font-size: 11px; }
@media (max-width: 700px) { .week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.photos { display: flex; gap: 8px; }
.photos div { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--text-2); }
.qr { width: 160px; height: 160px; border-radius: 14px; background: #fff; border: 1px solid var(--line-strong); padding: 10px; display: grid; grid-template-columns: repeat(21, 1fr); gap: 0; }
.qr i { background: #06101f; }
.qr i.w { background: #fff; }
.copy { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--input-border); border-radius: 12px; background: var(--input-bg); font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.copy span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.tl { border-left: 2px solid var(--line-strong); padding-left: 16px; display: grid; gap: 12px; }
.tl .ev { position: relative; min-width: 0; overflow-wrap: anywhere; }
.tl .ev::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--surface);
}
.tl .ev.cur::before { background: var(--ok); border-color: var(--surface); }
.tl .ev.rb::before { background: var(--warn); }
.tl .ev small { color: var(--text-3); display: block; font-size: 12px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--backdrop);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  background: var(--modal-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal.lg { max-width: 920px; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 17px; font-weight: 800; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  background: var(--btn-ghost-bg);
  display: grid;
  place-items: center;
}
.modal-close:hover { border-color: var(--brand); color: var(--brand); background: var(--btn-ghost-hover-bg); }
.modal-body { padding: 18px 20px; overflow-y: auto; display: grid; gap: 14px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--modal-foot-bg);
}

.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.section-box {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  background: var(--section-bg);
}
.section-box h4 { font-size: 13.5px; margin-bottom: 10px; color: var(--text); }

/* ===== 女佣主照片 / 首字母占位头像 ===== */
.maid-photo-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.maid-photo-wrap.sm { width: 32px; height: 32px; border-radius: 9px; }
.maid-photo-wrap.md { width: 46px; height: 46px; border-radius: 12px; }
.maid-photo-wrap.lg { width: 72px; height: 72px; border-radius: 16px; }
.maid-photo-wrap.xl { width: 96px; height: 96px; border-radius: 18px; }
.maid-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: none;
  opacity: 1;
}
.maid-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #06101f;
}
.maid-photo-wrap.lg .maid-photo-placeholder { font-size: 22px; }
.maid-photo-wrap.xl .maid-photo-placeholder { font-size: 28px; }
.maid-photo-wrap.sm .maid-photo-placeholder { font-size: 11px; }

.photo-uploader {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: var(--section-bg);
  max-width: 100%;
}
.photo-uploader-info {
  flex: 1 1 200px;
  min-width: 0;
  display: grid;
  gap: 8px;
}
.photo-meta-line {
  font-size: 12px;
  color: var(--text-2);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
