/* 底片管理系统 - 前台样式（PC / 手机自适应） */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #4a6cf7;
  --primary-dark: #3a55c9;
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #2b2f3a;
  --muted: #8a90a0;
  --border: #e6e8f0;
  --danger: #e5484d;
  --radius: 12px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--card); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.site-name { font-size: 18px; font-weight: 600; }

main.wrap { flex: 1; padding-top: 24px; padding-bottom: 40px; }

.site-footer { background: var(--card); border-top: 1px solid var(--border); }
.site-footer .wrap { padding: 14px 16px; color: var(--muted); font-size: 13px; text-align: center; }

/* 登录卡片 */
.login-card {
  max-width: 380px; margin: 8vh auto 0; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: 0 8px 30px rgba(40, 50, 90, .08);
}
.login-card h2 { font-size: 20px; margin-bottom: 6px; text-align: center; }
.login-card .tip { color: var(--muted); font-size: 13px; text-align: center; margin-bottom: 18px; }
.expired-icon { font-size: 44px; text-align: center; margin-bottom: 8px; color: #f5a623; }

.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="datetime-local"], input[type="date"], input[type="number"], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; background: #fff; color: var(--text); outline: none;
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 60px; }

.btn {
  display: inline-block; border: none; border-radius: 8px; cursor: pointer;
  font-size: 15px; padding: 10px 18px; text-decoration: none; text-align: center;
  transition: background .15s, opacity .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-block { display: block; width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }

.alert { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.alert-error { background: #fdecec; color: var(--danger); border: 1px solid #f7c8ca; }
.alert-ok { background: #e8f7ee; color: #1a7f37; border: 1px solid #bfe8cd; }

.contact-line { text-align: center; font-size: 15px; margin-bottom: 18px; }

/* 相册头部 */
.album-head h2 { font-size: 22px; margin-bottom: 4px; }
.album-head { margin-bottom: 18px; }
.tip { color: var(--muted); font-size: 13px; }

/* 拍摄信息 */
.info-panel {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 22px;
}
.info-panel h3, .photo-section h3 { font-size: 16px; margin-bottom: 12px; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px dashed var(--border);
  font-size: 14px; word-break: break-all;
}
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }
.info-table th { color: var(--muted); font-weight: 500; width: 110px; white-space: nowrap; }

/* 图片网格 */
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; margin-top: 12px;
}
.photo-item {
  background: var(--card); border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 1 / 1;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.photo-item img:hover { transform: scale(1.03); }

.empty {
  text-align: center; color: var(--muted); padding: 60px 0; font-size: 15px;
}

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; background: rgba(10, 12, 20, .92); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92%; max-height: 88vh; border-radius: 6px; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none;
  border-radius: 50%; width: 44px; height: 44px; font-size: 24px; cursor: pointer;
  line-height: 1;
}
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* 手机适配 */
@media (max-width: 640px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .login-card { margin-top: 5vh; padding: 26px 20px; }
  .info-table th { width: 88px; }
}
