/* ============================================================
   小红书素人群发系统 · 苹果极简风设计系统
   ============================================================ */
:root {
  --bg:        #f5f5f7;
  --surface:   #ffffff;
  --ink:       #1d1d1f;
  --ink-2:     #6e6e73;
  --ink-3:     #86868b;
  --line:      #d2d2d7;
  --line-soft: #e8e8ed;
  --blue:      #0071e3;
  --blue-h:    #0077ed;
  --blue-press:#006edb;
  --green:     #34c759;
  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 布局 ---------- */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--line-soft);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #ff2e4d, #ff6b8a);
  color: #fff; font-weight: 700; font-size: 17px;
  display: grid; place-items: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; font-weight: 600; }
.brand-text span { font-size: 12px; color: var(--ink-3); letter-spacing: .3px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--ink); text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: rgba(0,0,0,.04); }
.nav-item.active { background: var(--blue); color: #fff; font-weight: 500; }
.nav-item.active:hover { background: var(--blue); }
.nav-item.disabled { color: var(--ink-3); cursor: not-allowed; }
.nav-item .soon {
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: var(--line-soft); color: var(--ink-3);
}

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 52px; display: flex; align-items: center;
  padding: 0 32px; border-bottom: 1px solid var(--line-soft);
  background: rgba(245,245,247,.8); backdrop-filter: blur(12px);
}
.crumb { font-size: 13px; color: var(--ink-2); }

.content { padding: 36px 32px 64px; max-width: 820px; width: 100%; }

/* ---------- 页面头部 ---------- */
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 6px; }
.page-head .sub { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
}
.card-head h2 { font-size: 16px; font-weight: 600; margin: 0; }
.muted { color: var(--ink-3); font-size: 12px; }

/* ---------- 单价行 ---------- */
.rows { padding: 4px 0; }
.row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.row:last-child { border-bottom: none; }
.row-label { display: flex; flex-direction: column; gap: 3px; }
.row-label .name { font-size: 15px; font-weight: 500; }
.row-label .unit { font-size: 12px; color: var(--ink-3); }

.row-input { display: flex; align-items: center; gap: 6px; }
.row-input .prefix { color: var(--ink-2); font-size: 15px; }
.row-input .suffix { color: var(--ink-3); font-size: 12px; min-width: 64px; }
.row-input input {
  width: 110px; text-align: right;
  font-family: var(--font); font-size: 16px; font-weight: 500; color: var(--ink);
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fafafa; outline: none; transition: border-color .15s, box-shadow .15s;
  -moz-appearance: textfield;
}
.row-input input::-webkit-outer-spin-button,
.row-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.row-input input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,113,227,.15);
  background: #fff;
}

/* ---------- 操作区 ---------- */
.actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.btn-primary {
  appearance: none; border: none; cursor: pointer;
  background: var(--blue); color: #fff; font-family: var(--font);
  font-size: 14px; font-weight: 500; padding: 9px 20px; border-radius: 980px;
  transition: background .15s, transform .05s;
}
.btn-primary:hover { background: var(--blue-h); }
.btn-primary:active { background: var(--blue-press); transform: scale(.98); }
.btn-ghost {
  appearance: none; cursor: pointer; background: transparent;
  color: var(--ink-2); font-family: var(--font); font-size: 14px;
  padding: 9px 16px; border-radius: 980px; border: 1px solid var(--line);
  transition: background .15s;
}
.btn-ghost:hover { background: rgba(0,0,0,.04); }
.hint { color: var(--ink-3); font-size: 12.5px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 16px);
  background: rgba(29,29,31,.92); color: #fff; font-size: 14px;
  padding: 11px 22px; border-radius: 980px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok::before  { content: "✓ "; color: var(--green); font-weight: 700; }
.toast.err::before { content: "✕ "; color: #ff6b8a; font-weight: 700; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .content { padding: 24px 18px 48px; }
  .row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .row-input input { width: 100%; }
}
