/* ============================================================
   四川两弹城博物馆 · 视觉体系
   军工红 + 深棕档案 + 米白纸面（呼应两弹城红色文化与科技遗产）
   ============================================================ */
:root {
  --navy: #4a1414;            /* 深绛酒红（侧栏/标题） */
  --navy-2: #6f1515;          /* 酒红次级 */
  --topbar: #5c1114;          /* 深绛红顶栏 */
  --red: #8f1d1d;             /* 主酒红（强调） */
  --red-deep: #6f1515;
  --red-soft: #f6e9e6;
  --gold: #d7b680;            /* 金铜（点缀/分隔/徽章） */
  --gold-deep: #b88a53;
  --gold-soft: #f7efe0;
  --bg: #fdf8f2;              /* 暖纸白 */
  --panel: #FFFFFF;
  --ink: #2E2A26;
  --ink-2: #6E655B;
  --line: #E2DACD;
  --green: #3E7C4F;
  --green-bg: #E7F2E9;
  --blue: #3A6E9B;
  --blue-bg: #E8F0F7;
  --orange: #C07A2B;
  --orange-bg: #F9EFDF;
  --shadow: 0 2px 10px rgba(59,42,30,.08);
  --shadow-hover: 0 6px 20px rgba(59,42,30,.12);
  --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 14px;
}
a { text-decoration: none; color: var(--red); }

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 50%, #5C3D2E 100%);
}
.login-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 400px;
}
.login-box h1 {
  text-align: center;
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 22px;
}
.login-box .subtitle {
  text-align: center;
  color: var(--ink-2);
  margin-bottom: 30px;
  font-size: 13px;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; color: var(--ink); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(179,58,46,0.1);
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.btn-primary { background: var(--red); color: white; }
.btn-primary:hover { background: var(--red-deep); }
.btn-outline { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-outline:hover { background: var(--red); color: white; }
.btn-danger { background: #C53030; color: white; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.error-msg { color: #C53030; font-size: 13px; margin-bottom: 15px; text-align: center; }

/* ===== 管理后台布局 ===== */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  background: var(--navy);
  color: white;
  padding: 0;
  flex-shrink: 0;
}
.sidebar .logo {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar .logo h2 { font-size: 16px; margin-bottom: 4px; color: #F3E7D2; }
.sidebar .logo p { font-size: 12px; opacity: 0.6; }
.sidebar nav { padding: 10px 0; }
.sidebar nav a {
  display: block;
  padding: 11px 20px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.05); color: white; }
.sidebar nav a.active { background: rgba(179,58,46,0.2); color: #F3E7D2; border-left-color: var(--red); }
.sidebar nav .section-title {
  padding: 15px 20px 8px;
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.5;
  letter-spacing: 1px;
}
.main-content { flex: 1; display: flex; flex-direction: column; }
.topbar {
  background: var(--topbar);
  padding: 15px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #F3E7D2;
}
.topbar .user-info { font-size: 14px; color: rgba(243,231,210,0.8); }
.topbar .user-info a { margin-left: 15px; color: var(--gold); }
.content { padding: 24px; flex: 1; }

/* 卡片 */
.card {
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.card h3 { margin-bottom: 15px; font-size: 16px; color: var(--navy); }

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--red);
}
.stat-card .label { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: 700; color: var(--navy); }
.stat-card .trend { font-size: 12px; margin-top: 5px; color: var(--green); }

/* 表格 */
.table-container { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data-table th {
  background: #F8F5F0;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
table.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
table.data-table tr:hover { background: #F8F5F0; }

/* 筛选栏 */
.filter-bar {
  background: var(--panel);
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.filter-bar input, .filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  background: white;
}
.filter-bar .btn { padding: 8px 16px; }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
}
.pagination a, .pagination span {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  background: white;
}
.pagination .current { background: var(--red); color: white; border-color: var(--red); }

/* 标签 */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  background: #EDF2F7;
  color: var(--ink-2);
}

/* ===== 公开展示页 ===== */
.public-body { padding-top: 68px; }
.public-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background-color: #a60000;
  background-image: url('/static/img/nav-bg.png');
  background-repeat: repeat-x;
  background-position: center center;
  background-size: auto 92%;
  backdrop-filter: none;
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 0;
  border-bottom: 1px solid rgba(215,182,128,0.35);
  box-shadow: 0 2px 16px rgba(0,0,0,0.28);
}
.public-header .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
}
.public-header h1 {
  font-size: 19px;
  color: #fff;
  letter-spacing: 2px;
  font-weight: 600;
}
.public-header h1 .en {
  display:block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 2px;
}
.public-header nav a {
  color: rgba(255,255,255,0.78);
  margin-left: 28px;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.public-header nav a:hover { color: var(--gold); border-bottom-color: var(--gold); }

.hero {
  position: relative;
  background: linear-gradient(115deg, #8a0e16 0%, #c8102e 55%, #a8121a 100%);
  color: #fff;
  min-height: 150px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 22px 0;
}
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-text { max-width: 900px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
  font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
  color: rgba(255,255,255,0.7); margin-bottom: 14px; text-align: left;
}
.hero h2 {
  font-size: 56px; margin-bottom: 14px; color: #fff;
  letter-spacing: 6px; font-weight: 700; text-align: left; line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.hero p { font-size: 15px; opacity: 0.9; max-width: 780px; margin: 0 auto 14px; line-height: 1.9; text-align: center; color: rgba(255,255,255,0.88); letter-spacing: 1.5px; font-weight: 300; }
.hero-stats { display: flex; justify-content: center; align-items: center; gap: 28px; }
.hero-stats .stat { text-align: center; }
.hero-stats .num { font-size: 26px; font-weight: 600; color: #d7b680; font-family: ui-sans-serif, system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; line-height: 1; letter-spacing: 0.5px; }
.hero-stats .lbl { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 5px; letter-spacing: 2px; }
.hero-stats .divider { width: 1px; height: 28px; background: rgba(215,182,128,0.35); }
.hero-stats {
  display: flex; justify-content: flex-start; gap: 50px;
  margin-top: 22px; flex-wrap: wrap;
}
.hero-stats .stat { text-align: left; }
.hero-stats .num { font-size: 36px; font-weight: 700; color: #fff; line-height: 1; }
.hero-stats .lbl { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 8px; letter-spacing: 1px; }

/* 机床从右侧探出 */
.hero-photo {
  position: absolute; right: 1%; top: 28%; transform: translateY(-50%);
  width: 109%; height: 199%; pointer-events: none;
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: contain; object-position: right center;
  mix-blend-mode: multiply; filter: contrast(1.05);
}

@media (max-width: 768px) {
  .hero { min-height: 380px; padding: 50px 0; }
  .hero h2 { font-size: 34px; letter-spacing: 3px; }
  .hero-photo { width: 90%; opacity: 0.35; right: -10%; }
  .hero-stats { gap: 30px; }
  .hero-stats .num { font-size: 28px; }
}


/* ===== 补回：容器与表格 ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th {
  background: #F8F5F0; padding: 12px; text-align: left;
  font-weight: 600; color: var(--ink-2);
  border-bottom: 2px solid var(--line); white-space: nowrap;
}
table.data-table td { padding: 12px; border-bottom: 1px solid var(--line); }
table.data-table tr:hover { background: #F8F5F0; }

/* ===== 补回：分类卡片（保留兼容） ===== */
.category-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px; margin: 30px 0;
}
.category-card {
  background: var(--panel); border-radius: 10px; padding: 25px;
  text-align: center; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s; border-top: 3px solid var(--gold);
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.category-card .icon { font-size: 36px; margin-bottom: 10px; }
.category-card h3 { font-size: 16px; color: var(--navy); margin-bottom: 5px; }
.category-card .count { font-size: 28px; font-weight: 700; color: var(--red); }
.category-card .unit { font-size: 12px; color: var(--ink-2); }

/* ===== 补回：展品网格 ===== */
.exhibit-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px; margin: 20px 0;
}
.exhibit-grid.feature { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.exhibit-card {
  background: var(--panel); border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.exhibit-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.exhibit-card .thumb {
  height: 170px; background: linear-gradient(135deg, #E8E0D5, #D5C9B8);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: #B8A99A;
}
.exhibit-card .info { padding: 14px; }
.exhibit-card .name {
  font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.exhibit-card .meta { font-size: 12px; color: var(--ink-2); }

/* ===== 补回：详情页 ===== */
.detail-layout {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 30px; margin: 30px 0;
}
.detail-image {
  background: var(--panel); border-radius: 10px; padding: 20px;
  text-align: center; box-shadow: var(--shadow);
}
.detail-image .placeholder {
  height: 420px; background: linear-gradient(135deg, #E8E0D5, #D5C9B8);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 80px; color: #B8A99A;
}
.detail-info h2 { font-size: 26px; color: var(--navy); margin-bottom: 5px; }
.detail-info .code { color: var(--ink-2); font-size: 13px; margin-bottom: 20px; }
.info-table { width: 100%; border-collapse: collapse; margin: 15px 0; }
.info-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.info-table td:first-child {
  width: 130px; font-weight: 500; color: var(--ink-2); background: #F8F5F0;
}

/* ===== 补回：区块标题 ===== */
.section-title {
  font-size: 22px; color: var(--navy); margin: 40px 0 20px;
  padding-bottom: 12px; border-bottom: 2px solid var(--line);
  position: relative; letter-spacing: 1px;
}
.section-title::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 60px; height: 2px; background: var(--gold);
}

/* ===== 补回：材质紧凑横排 ===== */
.material-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px; margin: 10px 0;
}
.material-chip {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--gold); border-radius: 8px; padding: 14px 16px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.material-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--gold-deep); }
.material-chip .m-icon { font-size: 24px; }
.material-chip .m-name { flex: 1; font-size: 14px; color: var(--ink); font-weight: 500; }
.material-chip .m-count { font-size: 20px; font-weight: 700; color: var(--red); }

/* ===== 补回：区域标签流 ===== */
.area-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.area-tag {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 20px; font-size: 13px; color: var(--ink);
  transition: all .15s;
}
.area-tag:hover { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.area-tag span { font-size: 12px; color: var(--ink-2); }
.area-tag:hover span { color: var(--red); }
.home-cta { text-align: center; margin: 40px 0 10px; }

/* ===== 补回：分页跳转 ===== */
.pagination .jump-input {
  width: 60px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 13px; text-align: center;
}
.pagination .jump-btn {
  padding: 6px 12px; background: var(--red); color: white;
  border: none; border-radius: var(--radius); font-size: 13px; cursor: pointer;
}

/* ===== 补回：响应式 ===== */
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .detail-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
