/* Page-level polish layered after the core v2 design system. */

/* Shared information density */
.stats-section { padding: 22px 0; border-bottom-color: var(--line); background: #e9e7dd; }
.stats-grid { gap: 14px; }
.stat {
  min-height: 118px; padding: 22px; border-color: var(--line); border-radius: 22px;
  background: linear-gradient(145deg,#fffdf7,#f4f2e8); box-shadow: var(--shadow-soft);
}
.stat strong { color: var(--forest); font-size: 2.15rem; letter-spacing: -.045em; }
.stat span { color: var(--muted); }
.admin-stats { grid-template-columns: repeat(5,minmax(0,1fr)); margin-bottom: 62px; }
.admin-stats .stat:first-child { background: linear-gradient(145deg,#173f32,#204b3c); }
.admin-stats .stat:first-child strong { color: #fffdf5; }
.admin-stats .stat:first-child span { color: rgba(255,255,255,.65); }

.detail-grid { gap: 12px; margin-block: 18px; }
.detail-grid > div {
  padding: 18px; border: 1px solid var(--line); border-radius: 18px;
  background: #faf8f1;
}
.detail-grid small { color: var(--muted); }
.detail-grid strong { color: var(--forest); }
.note-card { padding: 24px; }
.note-card p:last-child { margin-bottom: 0; }
.review-note { border-color: rgba(195,146,71,.18); background: #faf3e4; }

.check-row {
  padding: 14px; border: 1px solid var(--line); border-radius: 17px;
  background: #faf9f3;
}
.check-row input { width: 18px; height: 18px; accent-color: var(--forest); }

/* Upload / observation workflow */
.form-layout > section > h1 { max-width: 780px; }
.form-layout > section > .muted { max-width: 720px; font-size: 1.02rem; }
.form-stack { gap: 19px; }
.form-actions { padding-top: 5px; }
.form-actions form { margin: 0; }
.coordinate-head strong { color: var(--forest); }
.choice-fieldset legend { color: var(--forest); }
.choice-cards label > span strong { color: var(--forest); }
.choice-cards label > span small { color: var(--muted); }
input[type="file"]::file-selector-button {
  margin-right: 11px; padding: 8px 12px; border: 0; border-radius: 999px;
  background: var(--forest); color: #fff; font: inherit; font-weight: 750; cursor: pointer;
}

/* AI workflow as a guided notebook rather than a wall of panels */
.ai-shell > .page-heading { max-width: 900px; }
.ai-steps { margin-bottom: 34px; }
.ai-steps li { min-height: 43px; display: grid; place-items: center; }
.ai-steps .active { box-shadow: inset 0 -2px 0 rgba(49,95,72,.24); }
.ai-panel-head h2 { margin-bottom: 5px; }
.candidate-card h3 { color: var(--forest); }
.candidate-card:hover { border-color: rgba(49,95,72,.21); }
.score-row b { color: var(--forest); }
.question-card legend { color: var(--forest); }
.decision-option input, .answer-options input { accent-color: var(--forest); }

/* Community empty/loading states have a visual anchor instead of plain text. */
.feed-loading, .feed-empty {
  min-height: 180px; display: grid; place-items: center; align-content: center; gap: 14px;
  border-color: rgba(23,58,47,.13); border-radius: 24px; background: rgba(255,253,247,.58);
}
.feed-loading::before, .feed-empty::before {
  content: ""; width: 48px; height: 48px; border-radius: 50% 50% 48% 52% / 60% 42% 58% 40%;
  background: linear-gradient(145deg,#78936a,#315f48); transform: rotate(-25deg);
  box-shadow: 18px -8px 0 -8px rgba(195,146,71,.8), 0 12px 30px rgba(23,58,47,.12);
}
.feed-loading::before { animation: bioquest-breathe 1.7s ease-in-out infinite alternate; }
@keyframes bioquest-breathe { from { opacity:.62; transform: rotate(-25deg) scale(.94); } to { opacity:1; transform: rotate(-20deg) scale(1); } }

/* Community feed becomes more editorial and photo-forward. */
.community-feed { gap: 18px; }
.community-feed .observation-card { grid-template-columns: 210px minmax(0,1fr); }
.community-feed .feed-media { min-height: 190px; }
.community-feed .feed-content { padding: 24px; }
.community-feed .announcement-card { padding: 26px; }
.feed-content h3, .announcement-card h3 { color: var(--forest); font-size: 1.24rem; }

/* Admin */
.heading-actions { align-items: center; }
.admin-announcement-layout { gap: 34px; }
.announcement-admin-list { gap: 14px; }
.announcement-admin-card { padding: 22px; }
.announcement-admin-card h3 { color: var(--forest); }
.announcement-admin-foot { border-top-color: var(--line); }
.review-layout { gap: 30px; }
.review-panel .eyebrow { margin-bottom: 8px; }
.review-panel h2 { color: var(--forest); }
.review-actions { padding-top: 6px; }
.table-card { border: 1px solid var(--line); }
th { background: #f2f0e7; }
.table-empty { min-height: 130px; color: var(--muted); }
.text-button { color: var(--accent-strong); font-weight: 750; }

/* Dashboard and empty states */
.empty-card {
  position: relative; overflow: hidden; min-height: 270px; display: grid; align-content: center;
  padding: 46px; background: linear-gradient(135deg,#fffdf7,#eef1e7);
}
.empty-card::after {
  content: ""; position: absolute; width: 210px; height: 210px; right: -70px; bottom: -80px;
  border: 1px solid rgba(49,95,72,.13); border-radius: 44% 56% 62% 38% / 45% 42% 58% 55%;
  box-shadow: 0 0 0 28px rgba(49,95,72,.025), 0 0 0 58px rgba(49,95,72,.018);
  transform: rotate(-22deg); pointer-events: none;
}
.empty-card h2, .empty-card p, .empty-card a { position: relative; z-index: 1; }
.empty-card p { max-width: 620px; color: var(--muted); }

/* Auth details */
.auth-card .eyebrow { margin-bottom: 8px; }
.auth-card > .muted { margin-bottom: 24px; }
.auth-card form label { font-size: .92rem; }

/* Small UI labels */
.fine-print { color: #77867d; line-height: 1.65; }
.latin { color: var(--muted); font-style: italic; }
.role-badge { border-color: var(--line)!important; background: #f0eee5!important; color: var(--forest)!important; }

@media (max-width: 1060px) {
  .admin-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .stats-grid, .admin-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .community-feed .observation-card { grid-template-columns: 1fr; }
  .community-feed .feed-media { aspect-ratio: 16/10; min-height: 0; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .note-card { padding: 20px; }
}

@media (max-width: 480px) {
  .stats-grid, .admin-stats, .detail-grid { grid-template-columns: 1fr; }
  .stat { min-height: 100px; }
  .empty-card { min-height: 230px; padding: 30px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .feed-loading::before { animation: none; }
}
