:root {
  --bac-primary: #1F4E78;
  --bac-accent: #F2B705;
}

body {
  font-family: 'Prompt', -apple-system, sans-serif;
  background-color: #f7f9fb;
  overflow-x: hidden;
}

/* ---------------- Hero banner (index.php) — เต็มความกว้างจอ ชิดขอบซ้าย-ขวา ---------------- */
.hero-band {
  background: linear-gradient(135deg, #1F4E78, #2f6fa5);
  color: #fff;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -1.5rem; /* ชดเชย padding-top ของ <main class="container py-4"> ให้แบนเนอร์ชิดใต้เมนูพอดี */
  padding: 2.25rem 0 2rem;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .85rem;
  border-radius: 999px;
}
.hero-icon-badge {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.hero-desc {
  color: rgba(255,255,255,.88);
  max-width: 640px;
}
.hero-link {
  color: #fff;
  font-size: .85rem;
  text-decoration: underline;
}
.hero-link:hover { color: #fff; opacity: .85; }
.hero-breadcrumb .breadcrumb-item a { color: rgba(255,255,255,.75); text-decoration: none; }
.hero-breadcrumb .breadcrumb-item a:hover { color: #fff; text-decoration: underline; }
.hero-breadcrumb .breadcrumb-item.active { color: #fff; }
.hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }

/* ---------------- ปุ่ม 3 บล็อกแจ้งเรื่อง (index.php) ---------------- */
.action-cards-row {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}
.action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  color: #fff;
  text-decoration: none;
  height: 100%;
  box-shadow: 0 8px 22px rgba(15, 40, 66, .16);
  transition: transform .18s ease, box-shadow .18s ease;
}
.action-card:hover,
.action-card:focus {
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(15, 40, 66, .22);
}
.action-card-found  { background: linear-gradient(135deg, #16a34a, #4ade80); }
.action-card-lost    { background: linear-gradient(135deg, #ea580c, #fbbf24); }
.action-card-damage  { background: linear-gradient(135deg, #dc2626, #f472b6); }
.action-card-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.action-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .1rem;
}
.action-card-desc {
  font-size: .8rem;
  color: rgba(255,255,255,.9);
  margin-bottom: 0;
}
.action-card-arrow {
  margin-left: auto;
  font-size: 1.3rem;
  opacity: .85;
  transition: transform .18s ease;
}
.action-card:hover .action-card-arrow {
  transform: translateX(4px);
}

/* ---------------- ล่าสุดที่โพส (index.php) — 3 บล็อกใหญ่ แสดง 3 เรื่องล่าสุดสุด (ผสมทุกประเภท) ---------------- */
.recent-cols-row {
  margin-top: .25rem;
}
.recent-block {
  position: relative;
  display: block;
  height: 260px;
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(15, 40, 66, .14);
  transition: transform .18s ease, box-shadow .18s ease;
}
.recent-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(15, 40, 66, .22);
}
.recent-block-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recent-block-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255, 255, 255, .85);
}
.recent-block-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1.1rem 1.1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
}
.recent-block-overlay.action-card-found  { background: linear-gradient(to top, rgba(22, 101, 52, .88), rgba(22, 101, 52, 0) 85%); }
.recent-block-overlay.action-card-lost   { background: linear-gradient(to top, rgba(154, 52, 18, .88), rgba(154, 52, 18, 0) 85%); }
.recent-block-overlay.action-card-damage { background: linear-gradient(to top, rgba(153, 27, 27, .88), rgba(153, 27, 27, 0) 85%); }
.recent-block-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.recent-block-meta {
  color: rgba(255, 255, 255, .85);
  font-size: .8rem;
}

/* ---------------- แถบหัวเรื่องสีสัน (page-hero) — ใช้กับหน้าย่อยต่างๆ เช่น แจ้งพบของ/แจ้งของหาย/แจ้งของชำรุด/ทำเนียบคนดี/รายละเอียดของ ---------------- */
.page-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -1.5rem; /* ชดเชย padding-top ของ <main class="container py-4"> ให้แถบชิดใต้เมนูพอดี */
  margin-bottom: 1.75rem;
  padding: 1.9rem 0;
  color: #fff;
}
.page-hero-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-hero-icon {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.page-hero-title {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: .2rem;
}
.page-hero-desc {
  color: rgba(255,255,255,.9);
  margin-bottom: 0;
  font-size: .9rem;
  max-width: 680px;
}
.page-hero-success   { background: linear-gradient(135deg, #16a34a, #4ade80); }
.page-hero-warning    { background: linear-gradient(135deg, #ea580c, #fbbf24); }
.page-hero-danger     { background: linear-gradient(135deg, #dc2626, #f472b6); }
.page-hero-primary    { background: linear-gradient(135deg, #1F4E78, #2f6fa5); }
.page-hero-secondary  { background: linear-gradient(135deg, #475569, #94a3b8); }
.page-hero-dark       { background: linear-gradient(135deg, #111827, #4b5563); }
.page-hero-gold       { background: linear-gradient(135deg, #b45309, #f59e0b); }

.navbar-brand {
  letter-spacing: .3px;
}

.site-navbar {
  border-bottom: 1px solid #eef1f5;
}
.site-navbar .navbar-brand { color: #1a1a1a; }

.bg-primary {
  background-color: var(--bac-primary) !important;
}

.btn-primary {
  background-color: var(--bac-primary);
  border-color: var(--bac-primary);
}

.btn-primary:hover {
  background-color: #163a59;
  border-color: #163a59;
}

.card {
  border-radius: .75rem;
  border: 1px solid #e7ecf1;
}

.item-photo-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: .5rem;
}

/* การ์ดของที่คืนแล้ว: โชว์ภาพส่งมอบเป็นภาพหลัก + แปะภาพตอนแจ้งของเดิมไว้ตรงกลางเป็นภาพเล็ก (ไม่ลบทิ้ง) */
.before-photo-inset-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
}
.before-photo-inset {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: .5rem;
  border: 3px solid #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.45);
  display: block;
}
.before-photo-inset-tag {
  display: inline-block;
  margin-top: .3rem;
  font-size: .62rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,.6);
  padding: .1rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-icon {
  font-size: 1.3rem;
}

.star-rating {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
}

.star-rating .star.active,
.star-rating .star:hover {
  color: var(--bac-accent);
}

.stat-card {
  border-radius: 1rem;
  padding: 1.25rem;
  color: #fff;
}

.stat-card h3 {
  font-weight: 700;
  margin-bottom: 0;
}

/* ---- Admin dashboard (admin/index.php) ---- */
.dash-stat-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: #fff;
  border: 1px solid rgba(15, 40, 66, .06);
  border-radius: .9rem;
  padding: 1rem 1.1rem;
  height: 100%;
  box-shadow: 0 2px 10px rgba(15, 40, 66, .05);
  transition: transform .15s ease, box-shadow .15s ease;
}

.dash-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(15, 40, 66, .12);
}

.dash-stat-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
}

.dash-stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
  color: #1a1a1a;
}

.dash-stat-label {
  font-size: .78rem;
  font-weight: 600;
  color: #6c757d;
}

.dash-section-title {
  font-weight: 700;
  color: #12314a;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.dash-card {
  border-radius: 1rem;
  border: 1px solid rgba(15, 40, 66, .06);
  box-shadow: 0 2px 12px rgba(15, 40, 66, .06);
}

.dash-card .card-header {
  background: #fff;
  border-bottom: 1px solid rgba(15, 40, 66, .08);
  border-radius: 1rem 1rem 0 0 !important;
  font-weight: 700;
  color: #12314a;
}

.dash-chart-wrap {
  position: relative;
  height: 260px;
}

.dash-chart-wrap-sm {
  position: relative;
  height: 220px;
}

.leaderboard-rank {
  font-size: 1.4rem;
  font-weight: 700;
  width: 2.5rem;
  display: inline-block;
  text-align: center;
}
