:root {
  color: #203428;
  background: #edf1e9;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f3f5ef; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.eyebrow { color: #789080; font-size: 11px; font-weight: 800; letter-spacing: 3px; }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 18px; background: linear-gradient(145deg,#28533b,#719276); box-shadow: 0 14px 28px rgba(38,77,52,.2); color: white; font-size: 25px; font-weight: 800; }
.brand-mark.small { width: 43px; height: 43px; margin: 0 12px 0 0; border-radius: 13px; font-size: 19px; box-shadow: none; }

.login-page { display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 12% 10%,rgba(95,145,104,.18),transparent 28%),radial-gradient(circle at 90% 88%,rgba(218,177,83,.15),transparent 25%),#e9eee7; }
.login-card { width: min(430px,100%); padding: 44px 42px 36px; border: 1px solid rgba(49,83,58,.1); border-radius: 26px; background: rgba(255,255,255,.94); box-shadow: 0 30px 75px rgba(33,62,42,.14); text-align: center; }
.login-card h1 { margin: 9px 0 8px; color: #203b2a; font-size: 26px; }
.login-copy { margin: 0 0 28px; color: #7f8e84; font-size: 14px; line-height: 1.6; }
.login-form { text-align: left; }
.login-form label { display: block; margin-top: 17px; }
.login-form label span { display: block; margin-bottom: 7px; color: #3d5143; font-size: 13px; font-weight: 700; }
.login-form input, .search-form input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #dce4d9; border-radius: 11px; outline: 0; background: #fafbf8; color: #253b2c; }
.login-form input:focus, .search-form input:focus { border-color: #789982; box-shadow: 0 0 0 3px rgba(84,132,97,.1); background: white; }
.login-form button { width: 100%; height: 48px; margin-top: 24px; border: 0; border-radius: 11px; background: #315d43; color: white; font-weight: 750; cursor: pointer; }
.login-foot { margin-top: 22px; color: #9aa49d; font-size: 12px; }

.alert { margin: 0 0 20px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; text-align: left; }
.alert-error { background: #fff0ec; color: #a04b36; }
.alert-warning { border: 1px solid #ead8a8; background: #fff9e9; color: #715a22; }
.alert code { padding: 2px 5px; border-radius: 4px; background: rgba(116,85,24,.1); }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; width: 228px; display: flex; flex-direction: column; padding: 27px 18px; background: #183c2a; color: white; }
.sidebar-brand { display: flex; align-items: center; padding: 0 7px 30px; }
.sidebar-brand b, .sidebar-brand small { display: block; }
.sidebar-brand b { font-size: 16px; }
.sidebar-brand small { margin-top: 3px; color: rgba(255,255,255,.55); font-size: 11px; letter-spacing: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 10px; color: rgba(255,255,255,.72); font-size: 14px; }
.sidebar nav a.active { background: rgba(255,255,255,.11); color: white; font-weight: 700; }
.sidebar nav a span { font-size: 18px; }
.sidebar-foot { margin-top: auto; padding: 12px 14px; color: rgba(255,255,255,.58); font-size: 13px; }

.admin-main { min-height: 100vh; margin-left: 228px; padding: 36px 42px 60px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-header h1 { margin: 7px 0 5px; color: #1d3827; font-size: 30px; }
.admin-header p { margin: 0; color: #7e8c83; font-size: 14px; }
.admin-badge { display: flex; align-items: center; padding: 9px 13px; border: 1px solid #dbe5d8; border-radius: 99px; background: white; color: #52705c; font-size: 12px; font-weight: 700; }
.admin-badge i { width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #54a16c; box-shadow: 0 0 0 4px rgba(84,161,108,.11); }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin-bottom: 22px; }
.stat-card { min-height: 128px; padding: 21px; border: 1px solid rgba(51,83,60,.08); border-radius: 17px; background: white; box-shadow: 0 9px 25px rgba(33,63,43,.05); }
.stat-card span { display: block; color: #829087; font-size: 12px; font-weight: 700; }
.stat-card b { display: inline-block; margin-top: 13px; color: #25452f; font-size: 31px; line-height: 1; }
.stat-card small { margin-left: 7px; color: #98a29b; font-size: 11px; }
.records-panel { padding: 24px; border: 1px solid rgba(51,83,60,.08); border-radius: 19px; background: white; box-shadow: 0 12px 30px rgba(33,63,43,.05); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid #edf0eb; }
.panel-head h2 { margin: 0; color: #263e2e; font-size: 19px; }
.panel-head p { margin: 5px 0 0; color: #929e96; font-size: 12px; }
.search-form { display: flex; align-items: center; gap: 8px; width: min(780px,70%); }
.search-form input { height: 40px; }
.search-form select { height: 40px; min-width: 125px; padding: 0 10px; border: 1px solid #dce4d9; border-radius: 9px; outline: 0; background: #fafbf8; color: #405247; }
.search-form button { height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: #315d43; color: white; font-size: 13px; font-weight: 700; cursor: pointer; }
.search-form a { color: #8a978f; font-size: 12px; white-space: nowrap; }
.export-panel { margin-top: 16px; padding: 14px 16px; border: 1px solid #dfe7dc; border-radius: 12px; background: #f7faf5; }
.export-panel summary { color: #315a41; font-size: 13px; font-weight: 800; cursor: pointer; }
.export-panel p { margin: 11px 0; color: #849087; font-size: 11px; }
.export-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.export-fields label { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #dfe6dc; border-radius: 8px; background: white; color: #4f6255; font-size: 11px; cursor: pointer; }
.export-panel form > button { margin-top: 13px; padding: 9px 16px; border: 0; border-radius: 9px; background: #315d43; color: white; font-size: 12px; font-weight: 750; cursor: pointer; }
.record-list { display: grid; gap: 15px; margin-top: 19px; }
.admin-record { overflow: hidden; border: 1px solid #e6ebe4; border-radius: 15px; background: #fbfcfa; }
.record-summary { padding: 19px; }
.record-title-row { display: flex; justify-content: space-between; gap: 18px; }
.record-title-row h3 { margin: 0; color: #213d2b; font-size: 18px; }
.record-meta { margin-top: 5px; color: #929d96; font-size: 11px; }
.status { height: fit-content; padding: 5px 9px; border-radius: 99px; font-size: 11px; font-weight: 750; }
.status-complete { background: #e7f2e8; color: #438058; }
.status-uploading { background: #fff5dc; color: #8b6b20; }
.status-deleted { background: #f7e8e4; color: #a25440; }
.user-line { display: flex; align-items: center; margin-top: 17px; }
.user-avatar { width: 38px; height: 38px; display: grid; place-items: center; margin-right: 10px; border-radius: 12px; background: #e3ece0; color: #43624d; font-weight: 800; }
.user-line b, .user-line small { display: block; }
.user-line b { color: #374d3e; font-size: 13px; }
.user-line small { margin-top: 3px; color: #909c94; font-size: 11px; }
.survey-details { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin-top: 15px; }
.survey-details div { padding: 9px 10px; border: 1px solid #e6ebe3; border-radius: 9px; background: white; }
.survey-details span, .survey-details b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.survey-details span { color: #8a968e; font-size: 9px; }
.survey-details b { margin-top: 4px; color: #465a4c; font-size: 11px; }
.metrics-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-top: 17px; }
.metrics-row div { padding: 11px 12px; border-radius: 10px; background: #f0f4ed; }
.metrics-row span, .metrics-row b { display: block; }
.metrics-row span { color: #829087; font-size: 10px; }
.metrics-row b { margin-top: 4px; color: #315a41; font-size: 15px; }
.record-files { padding: 16px 19px 19px; border-top: 1px solid #e8ece6; background: white; }
.file-heading { margin-bottom: 11px; color: #6e7e73; font-size: 11px; font-weight: 750; letter-spacing: 1px; }
.admin-photo-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(82px,1fr)); gap: 8px; }
.admin-photo-grid a { min-width: 0; aspect-ratio: 1; overflow: hidden; position: relative; border-radius: 10px; background: #e9eee7; }
.admin-photo-grid img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .18s ease; }
.admin-photo-grid a:hover img { transform: scale(1.045); }
.admin-photo-grid a span { position: absolute; left: 5px; bottom: 5px; padding: 3px 5px; border-radius: 5px; background: rgba(32,53,39,.75); color: white; font-size: 8px; font-weight: 800; }
.archive-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.archive-links a { min-width: 230px; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #e7dfc9; border-radius: 10px; background: #fbf8ef; }
.zip-badge { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 9px; background: #e9dfc3; color: #80672c; font-size: 10px; font-weight: 850; }
.archive-links b, .archive-links small { display: block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-links b { color: #534c39; font-size: 11px; }
.archive-links small { margin-top: 3px; color: #968c71; font-size: 9px; }
.admin-empty { padding: 65px 20px; text-align: center; }
.admin-empty span { width: 55px; height: 55px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 16px; background: #e7eee3; color: #5e7865; font-size: 21px; font-weight: 800; }
.admin-empty b { display: block; color: #4b5f51; font-size: 15px; }
.admin-empty p { margin: 7px 0 0; color: #99a39c; font-size: 12px; }

@media (max-width: 980px) {
  .sidebar { position: static; width: auto; height: 72px; flex-direction: row; align-items: center; padding: 12px 20px; }
  .sidebar-brand { padding: 0; }
  .sidebar nav { margin-left: auto; }
  .sidebar-foot { margin: 0 0 0 12px; padding: 8px; }
  .admin-main { margin-left: 0; padding: 28px 22px 50px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .sidebar nav { display: none; }
  .admin-header { align-items: flex-start; }
  .admin-badge { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .panel-head { align-items: stretch; flex-direction: column; }
  .search-form { width: 100%; }
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .survey-details { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 36px 24px 30px; }
}
