:root {
  --blue: #1677ff;
  --blue-soft: #e6f4ff;
  --orange: #ff7a45;
  --ink: #1f2329;
  --muted: #86909c;
  --line: #e5e6eb;
  --bg: #f5f6f8;
  --card: #ffffff;
  --ok: #00b42a;
  --warn: #ff7d00;
  --bad: #f53f3f;
  --shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 24px rgba(31,35,41,.04);
  font-family: "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
.hidden { display: none !important; }

/* login */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.brand-panel {
  padding: 64px; color: #fff;
  background: linear-gradient(160deg, #0b1f33, #124070 55%, #1677ff);
  display: flex; flex-direction: column; justify-content: space-between;
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--blue);
  display: grid; place-items: center; font-weight: 700;
}
.brand-panel h1 { font-size: 36px; margin: 24px 0 10px; }
.brand-panel p { line-height: 1.7; color: rgba(255,255,255,.82); max-width: 420px; }
.login-box { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(390px, 100%); }
.login-card h2 { margin: 0 0 6px; font-size: 26px; }
.login-card .sub { color: var(--muted); margin-bottom: 24px; }

/* shell — top navigation */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 420px at 12% -10%, rgba(22, 119, 255, .08), transparent 60%),
    radial-gradient(900px 380px at 88% 0%, rgba(0, 180, 42, .05), transparent 55%),
    var(--bg);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  height: 58px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 700; font-size: 15px; white-space: nowrap;
}
.brand i {
  width: 28px; height: 28px; border-radius: 8px; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-style: normal; font-size: 13px;
}
.edition {
  font-style: normal; font-size: 11px; font-weight: 600;
  color: var(--blue); background: var(--blue-soft);
  border-radius: 999px; padding: 2px 8px;
}
.top-nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.top-nav-item {
  padding: 8px 12px; border-radius: 8px; color: #4e5969; font-size: 14px; white-space: nowrap;
}
.top-nav-item:hover { background: #f2f3f5; color: var(--ink); }
.top-nav-item.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.top-ent {
  display: flex; align-items: center; gap: 8px; padding: 0;
  background: #f7f8fa; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px 4px 12px;
}
.top-ent .help { white-space: nowrap; margin: 0; }
.top-ent select {
  width: auto; min-width: 120px; max-width: 180px;
  border: 0; background: transparent; padding: 4px 0; outline: none;
}
.side-account { position: relative; }
.account-trigger {
  display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 8px; background: transparent;
  text-align: left; color: var(--ink);
}
.account-trigger:hover { background: #f2f3f5; }
.account-trigger.open { background: #f2f3f5; }
.account-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: #e8f3ff; color: var(--blue);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.account-meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.account-name {
  font-size: 13px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-role {
  font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-caret {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid #c9cdd4; flex-shrink: 0; margin-right: 2px;
}
.account-trigger.open .account-caret { transform: rotate(180deg); border-top-color: #86909c; }
.account-menu {
  position: absolute; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(31, 35, 41, .12); padding: 6px;
}
.account-menu-item {
  display: block; width: 100%; border: 0; background: transparent;
  text-align: left; padding: 9px 10px; border-radius: 6px;
  color: var(--ink); font-size: 13px; text-decoration: none; cursor: pointer;
}
.account-menu-item:hover { background: #f2f3f5; }
.account-menu-item.danger { color: #cb2634; }
.account-menu-divider { height: 1px; background: var(--line); margin: 4px 6px; }
.top-account { margin: 0; padding: 0; border: 0; position: relative; }
.top-account .account-trigger {
  width: auto; min-width: 148px; padding: 4px 8px 4px 4px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.top-account .account-menu {
  left: auto; right: 0; bottom: auto; top: calc(100% + 8px); width: 200px;
}

.main { padding: 16px 28px 48px; min-width: 0; width: min(1180px, 100%); margin: 0 auto; }
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin: 0 0 10px; font-size: 13px; color: var(--muted); min-height: 20px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .bc-current { color: #4e5969; font-weight: 500; }
.breadcrumb .bc-sep { color: #c9cdd4; margin: 0 2px; user-select: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.page-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.page-head .sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px; border: 1px solid rgba(229,230,235,.7); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }

.kpi .k { color: var(--muted); font-size: 13px; }
.kpi .v { font-size: 28px; font-weight: 700; margin-top: 8px; }
.kpi .s { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kpi.alert { border: 1px solid #ffd8bf; background: #fff7e8; }

/* payslip batch cards */
.hero-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border-radius: 16px; margin-bottom: 14px;
  background: linear-gradient(120deg, #e8f3ff 0%, #f0f7ff 45%, #eef9f3 100%);
  border: 1px solid #d6e8ff;
}
.hero-banner h3 { margin: 0 0 6px; font-size: 18px; }
.hero-banner p { margin: 0; color: #4e5969; font-size: 13px; line-height: 1.6; }
.hero-art {
  width: 72px; height: 72px; border-radius: 18px; flex-shrink: 0;
  background: linear-gradient(145deg, #1677ff, #36cfc9);
  box-shadow: 0 10px 24px rgba(22,119,255,.28);
  position: relative;
}
.hero-art::after {
  content: ''; position: absolute; inset: 16px; border-radius: 8px;
  background: rgba(255,255,255,.28); border: 1px solid rgba(255,255,255,.4);
}
.batch-list { display: grid; gap: 10px; margin-top: 12px; }
.batch-card {
  display: grid; grid-template-columns: 1.4fr 1.6fr auto; gap: 16px; align-items: center;
  padding: 16px 18px; border-radius: 14px; background: #fff;
  border: 1px solid rgba(229,230,235,.9); box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.batch-card:hover {
  border-color: #91caff; transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(22,119,255,.08);
}
.batch-card.is-sample {
  background:
    linear-gradient(135deg, rgba(255,125,0,.04), transparent 40%),
    #fff;
  position: relative;
  overflow: hidden;
}
.batch-card.is-sample::after {
  content: '示例';
  position: absolute; right: 18%; top: 18%;
  font-size: 42px; font-weight: 700; color: rgba(255,125,0,.12);
  transform: rotate(-18deg); pointer-events: none; user-select: none;
}
.batch-card h4 { margin: 0 0 6px; font-size: 16px; }
.batch-card .meta { color: var(--muted); font-size: 12px; }
.batch-metrics { display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)); gap: 10px; }
.metric {
  background: #f7f8fa; border-radius: 10px; padding: 10px 12px;
}
.metric .lab { font-size: 12px; color: var(--muted); }
.metric .num { margin-top: 4px; font-size: 16px; font-weight: 700; color: var(--ink); }
.batch-actions {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 14px;
}
.batch-actions .links { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.batch-actions .links a { color: var(--blue); }
.linkish.danger { color: #f53f3f; }
.linkish.muted, .linkish:disabled {
  color: #c9cdd4; cursor: not-allowed;
}

/* evidence / reports */
.page-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px; border-radius: 14px; margin-bottom: 14px;
  background: linear-gradient(100deg, #edf5ff, #f5fbff);
  border: 1px solid #d6e8ff;
}
.page-banner b { display: block; margin-bottom: 4px; }
.page-banner span { color: #4e5969; font-size: 13px; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #e8f3ff; color: var(--blue); font-weight: 700;
  display: grid; place-items: center;
}
.chart-panel { padding: 8px 4px 4px; }
.chart-legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.combo-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; height: 180px; padding: 8px 4px 22px; }
.combo-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.combo-col .bar {
  width: 48%; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #69b1ff, #1677ff);
  min-height: 2px;
}
.combo-col .dot {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: #00b42a;
  box-shadow: 0 0 0 3px rgba(0,180,42,.18);
}
.combo-col .lab {
  position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%);
  font-size: 11px; color: var(--muted); white-space: nowrap;
}
.report-filter { padding: 14px 16px; }
.report-card { padding: 16px 18px 18px; }
.report-title { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.report-ico { font-size: 14px; }
.report-links { display: flex; gap: 16px; align-items: center; font-size: 13px; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > span, .label { font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; background: #fff; outline: none;
}
textarea { min-height: 72px; resize: vertical; }
input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px; min-width: 16px; padding: 0; margin: 0;
  border: none; border-radius: 0; box-shadow: none; flex-shrink: 0;
  accent-color: var(--blue);
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,119,255,.12); }
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none; }

.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 7px 12px; line-height: 1.4; white-space: nowrap;
}
.btn:hover { border-color: #c9cdd4; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { filter: brightness(.96); }
.btn-orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-danger { color: var(--bad); border-color: #ffccc7; }
.btn-danger-ghost { color: var(--bad); border-color: transparent; background: transparent; }
.btn-danger-ghost:hover { background: #fff1f0; border-color: #ffccc7; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--blue); }

/* 应用设置：企业后台排版 */
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}
.settings-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px 22px;
}
.settings-panel.compact { padding: 16px 18px; }
.settings-panel.muted { background: #fafbfc; }
.settings-panel-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.settings-panel-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.settings-panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.settings-panel-actions { display: flex; gap: 8px; flex-shrink: 0; }
.settings-section-title {
  margin: 18px 0 12px; font-size: 13px; font-weight: 600; color: #4e5969;
}
.settings-form .field { margin-bottom: 14px; }
.settings-form .field > span { color: #4e5969; font-size: 13px; }
.settings-form .field > span i { color: var(--bad); font-style: normal; margin-left: 2px; }
.field-tip { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.field-tip.warn { color: #d25f00; }
.settings-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px;
}
.settings-form-footer {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line);
}
.settings-side { display: grid; gap: 12px; }
.settings-stat {
  font-size: 28px; font-weight: 650; line-height: 1; color: var(--ink);
}
.settings-stat small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.settings-side-actions { display: flex; gap: 8px; margin-top: 14px; }
.settings-panel h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.settings-steps {
  margin: 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.7;
}
.settings-empty {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 48px 24px; text-align: center;
}
.settings-empty h3 { margin: 0 0 8px; }
.settings-empty p { margin: 0 0 16px; color: var(--muted); }

@media (max-width: 980px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-form-grid { grid-template-columns: 1fr; }
}

.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkish { color: var(--blue); background: none; border: 0; padding: 0; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: #fafafa; white-space: nowrap; }
td { white-space: nowrap; }
.progress {
  display: inline-flex; align-items: center; gap: 8px; min-width: 120px;
}
.progress i {
  display: block; width: 72px; height: 6px; border-radius: 99px; background: #f2f3f5; overflow: hidden;
}
.progress i b { display: block; height: 100%; background: var(--blue); }

.badge {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 2px 8px; font-size: 12px; background: #f2f3f5; color: #4e5969;
}
.badge-ok { background: #e8ffea; color: #009a29; }
.badge-warn { background: #fff7e8; color: #d25f00; }
.badge-bad { background: #ffece8; color: #cb2634; }
.badge-blue { background: #e8f3ff; color: #0e6bd6; }
.badge-gray { background: #f2f3f5; color: #4e5969; }

/* month picker */
.month-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 0 4px;
}
.year-switch { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.months { display: flex; gap: 6px; flex-wrap: wrap; }
.month-chip {
  width: 40px; height: 36px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--ink); position: relative;
}
.month-chip.on { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.month-chip .dot {
  position: absolute; right: 6px; top: 6px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--orange);
}

.dropzone {
  border: 1.5px dashed #c9cdd4; border-radius: 12px; padding: 40px 16px;
  text-align: center; background: #fafafa; color: var(--muted);
}
.dropzone.hot { border-color: var(--blue); background: #f2f8ff; }
.steps { display: flex; gap: 18px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.steps b {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #e5e6eb; color: #4e5969; margin-right: 6px; font-size: 12px;
}
.steps .on { color: var(--blue); }
.steps .on b { background: var(--blue); color: #fff; }

.stat-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-tab {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px 14px; min-width: 110px; text-align: left;
}
.stat-tab.on { border-color: var(--blue); background: var(--blue-soft); }
.stat-tab .n { font-size: 20px; font-weight: 700; }
.stat-tab .t { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* drawers */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.36); z-index: 40;
  display: flex; justify-content: flex-end;
}
.drawer {
  width: min(520px, 100%); height: 100%; background: #fff;
  box-shadow: -8px 0 24px rgba(0,0,0,.08); display: flex; flex-direction: column;
}
.drawer.wide { width: min(860px, 100%); }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid var(--line); font-weight: 700;
}
.drawer-body { padding: 16px 18px; overflow: auto; flex: 1; }
.drawer-foot {
  padding: 12px 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 8px;
}
.check-grid {
  display: grid; grid-template-columns: 1fr; gap: 2px;
  background: #f7f8fa; border-radius: 10px; padding: 6px;
}
.check-grid.label-row { grid-template-columns: 1fr 1fr; }
.check-grid label {
  display: flex; gap: 10px; align-items: center;
  font-size: 13px; color: var(--ink); padding: 8px 10px;
  border-radius: 8px; cursor: pointer; margin: 0;
}
.check-grid label:hover { background: #fff; }
.filter-block { margin-bottom: 18px; }
.filter-block > .label {
  display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); font-weight: 600;
}
.action-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: nowrap; margin: 0 0 14px;
}
.action-bar .stat-tabs { flex: 1; min-width: 0; flex-wrap: nowrap; }
.action-bar .btns { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; margin-left: auto; }
.filter-chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 12px; min-height: 0;
}
.filter-chips:empty { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 10px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 600;
}
.filter-chip button {
  border: 0; background: transparent; color: var(--blue);
  width: 18px; height: 18px; border-radius: 50%; padding: 0; line-height: 1;
}
.filter-chip button:hover { background: rgba(22,119,255,.12); }
.filter-clear { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 4px 6px; }
.filter-clear:hover { color: var(--blue); }

.setup-shell { display: grid; gap: 12px; }
.setup-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 92px minmax(300px, 368px); gap: 12px;
  height: 560px; min-height: 560px;
}
.setup-form, .setup-preview {
  border: 1px solid var(--line); border-radius: 12px; overflow: auto; background: #fff; padding: 14px 16px;
}
.setup-sec { padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
.setup-sec:last-child { border-bottom: 0; }
.setup-sec h3 { margin: 0 0 12px; font-size: 15px; }
.setup-sec .field em { color: var(--bad); font-style: normal; }
.setup-anchors { display: grid; gap: 10px; align-content: start; padding-top: 10px; }
.setup-anchors a { color: var(--muted); font-size: 13px; padding: 4px 0; border-left: 2px solid transparent; padding-left: 8px; }
.setup-anchors a.on { color: var(--blue); font-weight: 600; border-left-color: var(--blue); }
.setup-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 4px 0; border-top: 1px solid var(--line);
}
.switch-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #f5f5f5;
}
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; background: #c9cdd4; border-radius: 99px; cursor: pointer; transition: .2s;
}
.switch span::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::before { transform: translateX(18px); }
.staff-picker { display: grid; gap: 8px; }
.staff-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; background: #e8f3ff; color: #0e6bd6;
  border-radius: 99px; padding: 2px 8px; font-size: 12px;
}
.chip button { border: 0; background: transparent; color: #0e6bd6; padding: 0 2px; cursor: pointer; }
.check-grid.is-locked { opacity: .55; }
.phone-preview {
  border-radius: 18px; background: linear-gradient(#5b9cff 0%, #8ec5ff 40%, #f5f6f7 40%);
  padding: 14px 12px 18px; min-height: 480px;
}
.phone-card { background: #fff; border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.phone-card .care { color: var(--muted); font-size: 13px; }
.phone-card .net-label { color: var(--muted); font-size: 12px; margin-top: 6px; }
.phone-card .net { font-size: 30px; font-weight: 700; color: #0e6bd6; margin: 4px 0 10px; }
.phone-card .tip {
  font-size: 12px; color: #8a6d3b; margin-bottom: 10px; padding: 8px 10px;
  background: #fff8e6; border-radius: 8px; line-height: 1.5;
}
.phone-card .tip.ceiling { border-left: 3px solid #faad14; }
.phone-line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #eee; font-size: 13px; }

.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-card {
  border: 2px solid transparent; border-radius: 10px; min-height: 64px; padding: 8px;
  text-align: center; font-size: 12px; color: #fff; position: relative; overflow: hidden;
}
.theme-card span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px;
  background: rgba(0,0,0,.35); font-size: 11px;
}
.theme-card.on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(22,119,255,.2); }
.msg-card-editor { display: grid; gap: 8px; }
.card-image-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.card-image-opt {
  position: relative; border: 2px solid var(--line); border-radius: 10px; overflow: hidden;
  padding: 0; background: #f7f8fa; cursor: pointer; aspect-ratio: 2.2 / 1;
}
.card-image-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-image-opt span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px;
  background: rgba(0,0,0,.4); color: #fff; font-size: 11px; text-align: center;
}
.card-image-opt.on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(22,119,255,.18); }
.card-image-opt.upload {
  display: grid; place-items: center; color: var(--muted); font-size: 12px;
}
.card-image-opt.upload img.hidden { display: none; }
.ding-msg-card {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f5f6f7;
}
.ding-msg-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; font-size: 13px; font-weight: 600;
}
.ding-msg-time { margin-left: auto; font-weight: 400; color: var(--muted); font-size: 12px; }
.ding-msg-icon {
  width: 22px; height: 22px; border-radius: 6px; background: #f5a623; color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.ding-msg-body { margin: 0 10px 10px; background: #fff; border-radius: 8px; overflow: hidden; }
.ding-msg-banner-img { width: 100%; height: 96px; object-fit: cover; display: block; background: #eee; }
.ding-msg-title { padding: 10px 12px 4px; font-weight: 600; font-size: 15px; color: #1f2329; }
.ding-msg-desc { padding: 0 12px 12px; color: #8f959e; font-size: 13px; line-height: 1.5; }
.ding-msg-btn {
  margin: 0 12px 12px; text-align: center; padding: 9px 0; border-radius: 6px;
  background: #f2f3f5; color: #1f2329; font-size: 14px;
}

.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: grid; place-items: center; z-index: 50; padding: 20px;
}
.modal { width: min(480px, 100%); background: #fff; border-radius: 14px; padding: 18px; }
.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: #1f2329; color: #fff; padding: 10px 16px; border-radius: 8px;
  z-index: 60; box-shadow: var(--shadow); max-width: 80vw;
}
.help { font-size: 13px; color: var(--muted); line-height: 1.7; }
.empty { text-align: center; color: var(--muted); padding: 28px 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tab {
  padding: 10px 14px; border: 0; background: transparent; color: var(--muted); border-bottom: 2px solid transparent;
}
.tab.on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.avatar-group { display: inline-flex; }
.avatar-group span {
  width: 24px; height: 24px; border-radius: 50%; background: #e8f3ff; color: var(--blue);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; margin-left: -6px; border: 2px solid #fff;
}
.avatar-group span:first-child { margin-left: 0; }

/* employee mobile */
.slip-page {
  min-height: 100vh;
  background: linear-gradient(#1677ff 0 150px, #f5f6f7 150px);
  padding: 16px 12px 40px;
  -webkit-user-select: none;
  user-select: none;
}
.slip-page input,
.slip-page textarea {
  -webkit-user-select: text;
  user-select: text;
}
.slip-wrap { width: min(420px, 100%); margin: 0 auto; }
.slip-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
.slip-card header { padding: 20px 18px 6px; }
.slip-card header h1 { margin: 6px 0 0; font-size: 18px; }
.care-line { padding: 0 18px; color: var(--muted); font-size: 13px; }
.net-block { padding: 8px 18px 10px; }
.net-block .k { color: var(--muted); font-size: 13px; }
.net-block .v { font-size: 34px; font-weight: 700; color: #0e6bd6; letter-spacing: -.5px; }
.tip-banner {
  margin: 0 18px 8px; padding: 8px 10px; border-radius: 8px;
  background: #fff8e6; color: #8a6d3b; font-size: 12px;
}
.tip-banner.ceiling { border-left: 3px solid #faad14; }
.group { padding: 2px 18px 8px; }
.group h3 { margin: 10px 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #eee; font-size: 14px; }
.line.deduction b { color: var(--bad); }
.slip-actions { padding: 10px 18px 18px; display: grid; gap: 10px; }
.watermark {
  position: absolute; inset: 90px 0 auto; text-align: center;
  color: rgba(22,119,255,.07); font-size: 22px; font-weight: 700;
  transform: rotate(-14deg); pointer-events: none; user-select: none;
}
.list-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line); color: inherit;
}
.seg { display: flex; background: #f2f3f5; border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 100px; margin: 12px 0; }
.bars i { flex: 1; background: #cce0ff; border-radius: 4px 4px 0 0; min-height: 4px; position: relative; }
.bars i.on { background: var(--blue); }
.bars i span {
  position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%);
  font-size: 10px; color: var(--muted); white-space: nowrap;
}

@media (max-width: 1100px) {
  .setup-layout { grid-template-columns: 1fr; height: auto; }
  .setup-anchors { display: none; }
  .setup-form, .setup-preview { max-height: none; }
  .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; }
  .batch-card { grid-template-columns: 1fr; }
  .batch-actions { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .top-nav {
    display: flex; overflow-x: auto; max-width: min(62vw, 640px);
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 900px) {
  .login-screen { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 12px; }
  .topbar-left, .topbar-right { width: 100%; justify-content: space-between; }
  .main { padding: 16px; width: 100%; }
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .batch-metrics { grid-template-columns: repeat(3, 1fr); }
}
