/* 基础重置与移动端适配 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
@media (max-width: 360px) { html { font-size: 15px; } }
@media (min-width: 414px) { html { font-size: 17px; } }
@media (min-width: 768px) { html { font-size: 18px; } }

body {
  margin: 0;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color: #222;
  background: #f7f8fa;
}

/* 通用布局 */
.container { padding: 12px; }
.card {
  background: #fff; border-radius: 10px; padding: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.space-between { justify-content: space-between; align-items: center; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.p-12 { padding: 12px; }
.text-muted { color: #666; }
.text-bold { font-weight: 600; }
.badge {
  display: inline-block; padding: 2px 8px; font-size: 12px; border-radius: 999px; background: #f0f2f5; color: #555;
}

/* 触摸反馈 */
.tapable { position: relative; }
.tapable:active { opacity: .7; }

/* 顶部导航（含汉堡菜单） */
.navbar {
  position: sticky; top: 0; z-index: 10;
  background: #ffffff; height: 52px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; border-bottom: 1px solid #eee;
}
.navbar-title { font-size: 18px; font-weight: 700; }
.hamburger {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 8px;
  flex-direction: column; cursor: pointer;
}
.hamburger span, .hamburger::before, .hamburger::after {
  content: ''; display: block; width: 20px; height: 2px; background: #222; margin: 3px 0; border-radius: 1px;
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger.open span { opacity: 0; }
.hamburger.open::before { transform: translateY(5px) rotate(45deg); }
.hamburger.open::after { transform: translateY(-5px) rotate(-45deg); }
.nav-drawer {
  position: fixed; top: 52px; left: 0; right: 0; background: #fff; border-bottom: 1px solid #eee;
  transform-origin: top; transform: scaleY(0); transition: transform .18s ease; will-change: transform;
  max-height: 0; overflow: hidden;
}
.nav-drawer.open { 
  transform: scaleY(1); 
  max-height: 400px; 
  overflow-y: auto;
}
.nav-menu { list-style: none; margin: 0; padding: 8px; }
.nav-menu li a {
  display: block; padding: 12px; border-radius: 8px; color: #222; text-decoration: none;
}
.nav-menu li a:active { background: #f3f4f6; }

/* 表单垂直排列 + 可点击区域 */
.form { display: flex; flex-direction: column; gap: 10px; }
.form .field { display: flex; flex-direction: column; }
.form label { font-size: 14px; color: #555; margin-bottom: 6px; }
.input, select, textarea {
  width: 100%; padding: 12px; min-height: 44px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 16px; background: #fff;
}
.input:focus, select:focus, textarea:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }

/* 主要按钮（底部固定） */
.footer-action {
  position: sticky; bottom: 0; z-index: 9; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid #eee; padding: 10px 12px;
}
.btn {
  height: 44px; min-width: 44px; border: none; border-radius: 10px; font-size: 16px; font-weight: 600;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:active { background: #1e40af; }
.btn-ghost { background: transparent; color: #2563eb; }

/* 列表与加载更多 */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  background: #fff; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.list-item .title { font-size: 16px; font-weight: 700; }
.load-more { text-align: center; color: #666; padding: 12px; }

/* 全屏弹窗 */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); display: none; align-items: flex-end; z-index: 50;
}
.modal.open { display: flex; }
.modal .panel {
  width: 100%; max-height: 90%; background: #fff; border-top-left-radius: 14px; border-top-right-radius: 14px; overflow: auto;
}
.modal .panel-header { padding: 12px; border-bottom: 1px solid #eee; font-weight: 700; }
.modal .panel-body { padding: 12px; }

/* 权限隐藏 */
.hidden { display: none !important; }

/* Global nav (unified for all WAP pages) */
.nav-drawer { z-index: 1000; transition: transform .3s ease; }
.nav-menu li a { min-height: 48px; }
.nav-menu .has-children > a { display:flex; align-items:center; justify-content:space-between; }
.nav-menu .arrow { margin-left:8px; transition: transform .2s ease; }
.nav-menu .submenu { list-style:none; margin:0; padding:4px 0 8px 16px; display:none; }
.nav-menu .submenu.open { display:block; }