/* ============================================================
   飞鸟集 · 后台管理  样式 v3「Field Notes 博物志」
   ------------------------------------------------------------
   纸感底色 + 墨色文字 + 苔绿单一强调；衬线标题 / 等宽标签；
   用 1px 细线与留白建立层级，不用阴影、不用大圆角。
   页面样式不重复定义组件，全部在此。
   ============================================================ */

/* ————————————————————— 设计 token ————————————————————— */

:root {
  /* 底色 */
  --paper:      #F7F3E9;
  --paper-2:    #F1EBDD;
  --surface:    #FFFCF4;
  --surface-2:  #FBF7EC;

  /* 墨色 */
  --ink:        #1D231D;
  --ink-2:      #46503F;
  --ink-3:      #6F7767;
  --ink-4:      #9AA091;

  /* 线 */
  --rule:       #DCD4C1;
  --rule-2:     #C6BCA3;

  /* 强调 */
  --moss:       #2F5B3D;
  --moss-2:     #3E7350;
  --moss-soft:  #E7EEE2;
  --ochre:      #A76A1F;
  --ochre-soft: #F5EAD8;
  --brick:      #9C3B2E;
  --brick-soft: #F6E7E3;

  /* 字体 */
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, "Courier New", monospace;

  /* 间距 */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 40px; --s8: 56px;

  /* 动效 */
  --fast: 120ms;
  --base: 180ms;
}

/* ————————————————————— 基础 ————————————————————— */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

input, select, textarea, button { font: inherit; color: inherit; }

a { color: inherit; }

::selection { background: var(--moss-soft); color: var(--moss); }

:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 1px;
}

/* 通用小件 */
.muted { color: var(--ink-3); font-size: 12.5px; }
.latin { font-family: var(--serif); font-style: italic; }
.pad { padding: var(--s5); }
.warn { color: var(--brick); }

.loading,
.empty {
  padding: var(--s7) 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
}

/* 等宽小标签（页眉、表单 label 共用） */
.label,
.form-label,
.block-label > span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--ink-3);
}

/* ————————————————————— 登录 ————————————————————— */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  padding: var(--s6);
}

.login-card {
  position: relative;
  width: 392px;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  padding: 44px 40px 36px;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--rule);
  pointer-events: none;
}

.login-logo {
  width: 56px;
  height: 56px;
  margin-bottom: 26px;
  border: 1px solid var(--rule-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--moss);
  background: none;
}

.login-card h1 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .06em;
}

.login-card .muted {
  margin: 0 0 26px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.login-card input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: var(--surface);
  outline: none;
  transition: border-color var(--fast), box-shadow var(--fast);
}

.login-card input:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(47, 91, 61, .1);
}

.login-card .btn {
  width: 100%;
  height: 42px;
  margin-top: 14px;
}

.login-err {
  min-height: 20px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--brick);
}

/* ————————————————————— 骨架 ————————————————————— */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 228px;
  flex: none;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border-right: 1px solid var(--rule);
  padding-top: 26px;
}

.brand {
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--rule);
}

.brand-cn {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: .1em;
  line-height: 1.3;
}

.brand-en {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.sidebar nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.nav-group {
  padding: 14px 24px 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.nav-group:first-child { padding-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 38px;
  padding: 0 24px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  transition: background var(--fast), color var(--fast);
}

.nav-item:hover { background: var(--paper-2); color: var(--ink); }

.nav-item.active {
  background: var(--paper-2);
  border-left-color: var(--moss);
  color: var(--ink);
  font-weight: 600;
}

.nav-icon {
  width: 15px;
  height: 15px;
  flex: none;
  display: inline-flex;
  opacity: .7;
}

.nav-item.active .nav-icon { opacity: 1; color: var(--moss); }

.nav-icon svg { width: 15px; height: 15px; display: block; }

.nav-label { flex: 1; }

.nav-badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--moss);
}

.nav-badge:empty { display: none; }

.sidebar-foot {
  border-top: 1px solid var(--rule);
  padding: 16px 24px 20px;
}

.sidebar-foot .btn {
  border-color: var(--rule);
  color: var(--ink-2);
}

.sidebar-foot .btn:hover {
  background: var(--paper-2);
  border-color: var(--ink-4);
  color: var(--ink);
}

.mini-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
}

.mini-stats > div {
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.mini-stats b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: 0;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 34px 40px 56px;
}

/* ————————————————————— 页头 ————————————————————— */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule-2);
  margin-bottom: 24px;
}

.page-head h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.2;
}

.page-head p {
  margin: 0;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-3);
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ————————————————————— 按钮 ————————————————————— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 15px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--fast), border-color var(--fast), color var(--fast);
}

.btn:hover { background: var(--paper-2); }
.btn:disabled { opacity: .38; cursor: not-allowed; }

.btn-primary {
  background: var(--moss);
  border-color: var(--moss);
  color: #FBF9F2;
}

.btn-primary:hover { background: var(--moss-2); border-color: var(--moss-2); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}

.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }

.btn-danger {
  color: var(--brick);
  border-color: #E2C6BE;
}

.btn-danger:hover { background: var(--brick-soft); }

.btn-sm { height: 27px; padding: 0 10px; font-size: 12px; }

.btn-block { width: 100%; }

/* ————————————————————— 表单控件 ————————————————————— */

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="datetime-local"],
input:not([type]),
textarea,
select {
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  outline: none;
  transition: border-color var(--fast), box-shadow var(--fast);
}

textarea {
  height: auto;
  padding: 9px 11px;
  line-height: 1.7;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(47, 91, 61, .1);
}

input::placeholder,
textarea::placeholder { color: var(--ink-4); }

.head-actions input,
.head-actions select { min-width: 150px; }

/* ————————————————————— 自定义下拉 ————————————————————— */

.select {
  position: relative;
  display: inline-block;
  min-width: 120px;
}

.select .select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.select-trigger {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px 0 11px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--fast), box-shadow var(--fast);
}

.select-trigger:hover { border-color: var(--ink-4); }

.select-trigger[aria-expanded="true"] {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(47, 91, 61, .1);
}

.select-trigger svg {
  width: 10px;
  height: 6px;
  flex: none;
  color: var(--ink-3);
}

.select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 5px);
  left: 0;
  min-width: 100%;
  max-height: 246px;
  overflow-y: auto;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  box-shadow: 0 14px 32px rgba(29, 35, 29, .14);
}

.select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 30px;
  padding: 0 9px;
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
}

.select-group {
  padding: 8px 9px 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.select-option:hover,
.select-option.is-active { background: var(--paper-2); color: var(--ink); }

.select-option.is-selected {
  background: var(--moss-soft);
  color: var(--moss);
  font-weight: 600;
}

.select-option.is-selected::after { content: "✓"; font-size: 10px; opacity: .8; }

/* ————————————————————— Chip / Tag / Pill ————————————————————— */

.chips,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: background var(--fast), border-color var(--fast), color var(--fast);
}

.chip:hover { border-color: var(--ink-3); color: var(--ink); }

.chip.on {
  background: var(--moss);
  border-color: var(--moss);
  color: #FBF9F2;
}

.chip.static {
  cursor: default;
  background: var(--surface-2);
  border-color: var(--rule);
  font-family: var(--mono);
  font-size: 11.5px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
}

.pill-warn {
  border-color: #E2C6BE;
  background: var(--brick-soft);
  color: var(--brick);
}

.pill-accent {
  border-color: #E7D3B4;
  background: var(--ochre-soft);
  color: var(--ochre);
}

.dot-ok {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--moss);
  vertical-align: middle;
}

/* ————————————————————— 批量归类条 ————————————————————— */

.assign-bar {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 15px 18px;
  margin-bottom: 20px;
}

.assign-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 13px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}

.assign-info b { color: var(--moss); font-weight: 600; }

.assign-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.assign-form .species-picker { flex: 1; min-width: 240px; }

/* ————————————————————— 物种选择器 ————————————————————— */

.species-picker { position: relative; }

.species-picker input { width: 100%; }

.picker-drop {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  box-shadow: 0 14px 32px rgba(29, 35, 29, .14);
}

.picker-drop.drop-up {
  top: auto;
  bottom: calc(100% + 5px);
}

.drop-item {
  padding: 7px 9px;
  cursor: pointer;
}

.drop-item:hover { background: var(--paper-2); }

.drop-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.drop-main b { font-weight: 600; }

.drop-main .muted {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
}

.drop-meta {
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
}

.drop-empty {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
}

.picked {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 5px 10px;
  border: 1px solid #CBD9C4;
  background: var(--moss-soft);
  border-radius: 2px;
  font-size: 12.5px;
  color: var(--moss);
}

/* display: inline-flex 会盖掉 UA 的 [hidden] 规则，未选物种时会漏出一个空药丸 */
.picked[hidden] { display: none; }

.picked-name { font-weight: 600; }

.picked-latin {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  opacity: .75;
}

.picked-x {
  border: none;
  background: none;
  padding: 0 2px;
  color: var(--moss);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

/* ————————————————————— 照片网格 ————————————————————— */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 14px;
}

.cell {
  position: relative;
  display: block;
  padding: 6px;
  border: 1px solid var(--rule);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--fast);
}

.cell:hover { border-color: var(--ink-3); }

.cell.on {
  border-color: var(--moss);
  box-shadow: inset 0 0 0 1px var(--moss);
}

/* 选中态由 .cell.on 表达，原生复选框只保留语义、不参与绘制 */
.cell > input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cell img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--paper-2);
}

.cell-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 2px 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
}

.cell.on .cell-meta { color: var(--moss); }

.cell-date { font-variant-numeric: tabular-nums; }

.cell-loc,
.cell-tag {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 50%;
}

.cell-tag { color: var(--moss); }
.cell-tag.warn { color: var(--ochre); }

.cell-del {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.cell:hover .cell-del { display: flex; }

.cell-del:hover { background: var(--brick-soft); color: var(--brick); border-color: #E2C6BE; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 12px;
}

/* ————————————————————— 表格 ————————————————————— */

.table-wrap { border-top: 1px solid var(--rule-2); }

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--rule-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}

.table tbody tr:hover td { background: var(--surface-2); }

.table td b { font-weight: 600; }

.table .muted.latin {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

/* ————————————————————— 两列（分类）————————————————————— */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.col {
  background: var(--surface);
  border: 1px solid var(--rule);
}

.col-head {
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.col-body { max-height: 64vh; overflow-y: auto; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background var(--fast);
}

.list-row:last-child { border-bottom: none; }

.list-row:hover { background: var(--surface-2); }

.list-row.on {
  background: var(--moss-soft);
  box-shadow: inset 2px 0 0 var(--moss);
}

.list-row b { font-weight: 600; }

.list-row .muted.latin {
  margin-top: 2px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 11px;
  letter-spacing: .02em;
}

/* ————————————————————— 首页精选 ————————————————————— */

.home-row {
  justify-content: flex-start;
  gap: 12px;
  cursor: default;
}

.home-row:hover { background: transparent; }

.home-thumb {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  background: var(--surface-2);
  font-family: var(--serif);
  font-size: 20px;
  color: var(--moss);
  overflow: hidden;
}

.home-main {
  flex: 1;
  min-width: 0;
}

.home-main b { font-weight: 600; }

.home-main .latin {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11px;
}
/* ————————————————————— 知识 ————————————————————— */

.kb-group {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 4px 20px 8px;
  margin-bottom: 16px;
}

.kb-group h3 {
  margin: 0;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--rule-2);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .04em;
}

.kb-group h3 .muted { font-family: var(--mono); font-size: 11px; }

.kb-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.kb-item:last-child { border-bottom: none; }

.kb-main { min-width: 0; }

.kb-main b { font-weight: 600; }

.kb-body {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ————————————————————— 表单（关于页 / 弹窗）————————————————————— */

.card-panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 24px 24px 26px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}

.form-grid.one { grid-template-columns: 1fr; }

/* 表单 label 用等宽小字（输入框内部已单独重置为无衬线） */
.form-grid > label,
.block-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--ink-3);
}

.form-grid > label > span,
.block-label > span { margin-bottom: 2px; }

.block-label + .block-label { margin-top: 16px; }

.form-grid label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  align-self: end;
  height: 36px;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0;
  color: var(--ink-2);
}

.form-block { margin-top: 16px; }

.form-block > .form-label { display: block; margin-bottom: 9px; }

.check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--moss);
}

/* ————————————————————— 相似种 ————————————————————— */

.sim-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.sim-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border: 1px solid var(--rule);
  background: var(--surface-2);
}

.sim-name {
  flex: none;
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sim-name b { font-size: 13px; font-weight: 600; }

.sim-name span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  color: var(--ink-3);
}

.sim-note {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--surface);
  font-size: 12.5px;
}

.sim-empty {
  padding: 4px 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.sim-picker { flex: none; }

/* ————————————————————— 上传进度 ————————————————————— */

.up-progress {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 14px 18px;
  margin-bottom: 18px;
}

.up-bar {
  height: 3px;
  background: var(--rule);
  overflow: hidden;
}

.up-fill {
  height: 100%;
  width: 0;
  background: var(--moss);
  transition: width var(--base);
}

.up-text {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}

/* ————————————————————— 分页 ————————————————————— */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 22px 0 4px;
}

.pager-info {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--ink-3);
}

/* ————————————————————— 模态框 ————————————————————— */

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 46px 24px;
  background: rgba(29, 35, 29, .34);
  opacity: 0;
  transition: opacity var(--base);
  overflow-y: auto;
}

.modal-wrap.show { opacity: 1; }

.modal {
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  box-shadow: 0 24px 60px rgba(29, 35, 29, .2);
  transform: translateY(8px);
  transition: transform var(--base);
}

.modal-wrap.show .modal { transform: translateY(0); }

.modal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--rule-2);
}

.modal-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .02em;
}

.modal-x {
  border: none;
  background: none;
  padding: 0;
  color: var(--ink-3);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.modal-x:hover { color: var(--ink); }

.modal-body {
  padding: 18px 24px 20px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--rule-2);
  background: var(--surface-2);
}

/* ————————————————————— Toast ————————————————————— */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  font-size: 12.5px;
  opacity: 0;
  transition: opacity var(--base), transform var(--base);
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.toast-err { background: var(--brick); }

/* ————————————————————— 响应式 ————————————————————— */

@media (max-width: 1080px) {
  .two-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .sidebar { width: 190px; }
  .main { padding: 24px 20px 40px; }
  .page-head h2 { font-size: 24px; }
  .modal-wrap { padding: 16px; }
}
