/* ============================================================
   阳明心学督察管理系统 —— 公共样式
   所有页面通过 <link rel="stylesheet" href="css/common.css"> 引入
   ============================================================ */

:root {
  --bg-primary: #FAFAF8;
  --bg-card: #FFFFFF;
  --ink-dark: #2D2D2D;
  --ink-light: #5C5C5C;
  --ink-muted: #8A8A8A;
  --vermillion: #E63946;
  --vermillion-light: #FEE2E4;
  --gold: #D4A574;
  --gold-light: #F5EDE4;
  --border: #E8E4DF;
  --shadow: rgba(45, 45, 45, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --green: #2E7D32;
  --green-light: #E8F5E9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--ink-dark);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 120px;
}

/* ---- Bottom Navigation ---- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 0;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink-muted);
  transition: color 0.2s, background-color 0.2s;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.nav-item.active {
  color: var(--vermillion);
}

.nav-item:active {
  background-color: rgba(0, 0, 0, 0.05);
  opacity: 0.7;
}

.nav-item:hover {
  text-decoration: none;
}

.nav-icon {
  font-size: 20px;
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

/* ---- Animations ---- */

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Toast ---- */

#toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translate(-50%, 0);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

#toast.show {
  opacity: 1;
}

#toast.success {
  background: rgba(46, 125, 50, 0.85);
}

#toast.error {
  background: rgba(230, 57, 70, 0.85);
}
