:root {
  /* Light theme palette aligned to 页面用色参考.png */
  --bg: #f5f5f5;
  --panel: #ffffff;
  --panel-2: #f5f5f5;
  --text: #111827;
  --muted: #64748b;
  --primary: #ff8200;
  --primary-700: #ff9a33;
  --accent: #3182ce;
  --success: #16a34a;
  --warning: #eab308;
  --danger: #ef4444;
  --ring: rgba(255, 138, 0, 0.35);
  --card-border: linear-gradient(135deg, rgba(255, 138, 0, 0.18), rgba(49, 130, 206, 0.15));
  --glow: 0 0 0 rgba(0,0,0,0);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, var(--primary), var(--primary-700));
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
}
.brand .name { font-weight: 700; letter-spacing: 0.2px; }
.brand .name strong { color: #ffffff; }
.brand .name { color: #ffffff; }
.brand .logo i { color: #ffffff; font-size: 18px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.ghost-btn { color: #ffffff; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.12); }
.ghost-btn:hover { border-color: rgba(255,255,255,0.6); color: #ffffff; background: rgba(255,255,255,0.18); }
.primary-btn { color: #111827; background: #fff; border: none; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.primary-btn:hover { filter: brightness(1.08); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fffbeb; background: rgba(255,255,255,0.2); font-size: 12px; font-weight: 700; border: 1px solid rgba(255,255,255,0.35); }
.hamburger { display: none; }

/* Layout with precise vertical spacing for 1080p */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; flex: 1; padding: 16px; height: calc(100vh - 64px - 56px); }
aside.sidebar {
  border: 1px solid rgba(2, 6, 23, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15,23,42,0.06);
  overflow: auto;
  height: auto;
  max-height: calc(100vh - 84px);
  position: sticky; top: 84px;
}
/* 隐藏侧栏滚动条（仍可滚动） */
aside.sidebar::-webkit-scrollbar { width: 0; height: 0; }
aside.sidebar { scrollbar-width: none; -ms-overflow-style: none; }
.sidebar .section-title { padding: 16px 16px; border-bottom: 1px solid rgba(2,6,23,0.06); background: #fff; }
.sidebar .section-title .cn { font-size: 15px; font-weight: 800; letter-spacing: 0.3px; color: var(--text); }
.sidebar .section-title .en { margin-top: 4px; font-size: 11px; color: #64748b; opacity: 1; text-transform: uppercase; letter-spacing: 0.12em; }
nav.menu { display: flex; flex-direction: column; padding: 8px; }
nav.menu a {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 10px; color: #334155;
}
nav.menu a:hover { background: rgba(2,6,23,0.05); color: var(--text); }
nav.menu a.active { background: rgba(255,130,0,0.12); color: var(--text); border: 1px solid rgba(255,130,0,0.3); }
nav.menu i { width: 18px; height: 18px; color: var(--primary); opacity: 0.95; flex: 0 0 auto; }
nav.menu .text { display: flex; flex-direction: column; line-height: 1.15; }
nav.menu .text .cn { font-size: 15px; }
nav.menu .text .en { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.mobile-nav { display: none; margin: 0 0 12px; }

/* Main */
main {
  border: 1px solid rgba(2,6,23,0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15,23,42,0.06);
  padding: 16px;
  overflow: auto;
}
.page-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.page-title h1 { margin: 0; font-size: 22px; letter-spacing: 0.3px; line-height: 30px; }
.en-sub { margin: 6px 0 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; line-height: 18px; }

.card {
  position: relative; border-radius: 14px; padding: 18px; margin-top: 12px;
  background: #fff;
  border: 1px solid rgba(2,6,23,0.08);
}
.card::before { content: none; }

form .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .hamburger { display: inline-flex; }
  form .grid { grid-template-columns: 1fr; }
}

/* 竖屏手机：侧栏改为抽屉式，带半透明遮罩；iOS 兼容点击 */
@media (max-width: 768px) and (orientation: portrait) {
  .layout { grid-template-columns: 1fr; }
  aside.sidebar {
    position: fixed; top: 64px; left: 0; z-index: 60;
    width: 86vw; max-width: 320px; height: calc(100vh - 64px);
    transform: translateX(-100%);
    transition: transform .25s ease;
    display: block;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff; /* 保证移动端白底 */
  }
  aside.sidebar::-webkit-scrollbar { width: 0; height: 0; }
  aside.sidebar { scrollbar-width: none; -ms-overflow-style: none; }
  aside.sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 64px 0 0 0; background: rgba(0,0,0,0.28); backdrop-filter: blur(1.5px); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 50; }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  body.no-scroll { overflow: hidden; }
}

label { display: inline-block; margin-bottom: 10px; color: #d1d5db; font-size: 13px; }
.field-label { display: inline-flex; align-items: baseline; gap: 10px; }
.field-label .cn { font-size: 16px; font-weight: 800; color: #e5e7eb; }
.field-label .en { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.input, .select, .textarea {
  width: 100%; color: #0f172a; background: #fff;
  border: 1px solid rgba(2,6,23,0.12); border-radius: 12px; padding: 12px 12px; outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.textarea { min-height: 180px; resize: vertical; }
#requirements.textarea { min-height: 0; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.btn { appearance: none; border: none; cursor: pointer; padding: 10px 16px; border-radius: 12px; font-weight: 700; }
.btn-primary { color: #ffffff; background: linear-gradient(135deg, var(--primary), var(--primary-700)); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { color: #334155; background: #fff; border: 1px solid rgba(2,6,23,0.12); }
.btn-secondary:hover { background: rgba(2,6,23,0.04); }

.fieldset { border: 1px dashed rgba(2,6,23,0.12); border-radius: 12px; padding: 14px; color: var(--muted); background: #fff; }
.fieldset legend { padding: 0 8px; color: #334155; }
.disabled { opacity: 0.65; filter: grayscale(0.2); }

/* Footer precise height to fit viewport */
footer.site-footer { color: #64748b; font-size: 12px; border-top: 1px solid rgba(2,6,23,0.06); height: 56px; background: #fff; backdrop-filter: blur(6px); display: grid; place-items: center; text-align: center; }
/* Toast */
.toast { position: fixed; right: 18px; bottom: 18px; background: #0b1a12; color: #c7f9d4; border: 1px solid rgba(34, 197, 94, 0.35);
  padding: 12px 14px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,0.35); transform: translateY(20px); opacity: 0; pointer-events: none; transition: all 0.2s ease; }
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.counter { text-align: right; color: var(--muted); font-size: 12px; margin-top: 6px; }

