*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --green-deep: #0d2b1a;
  --green-mid: #1e5c38;
  --green-light: #3a9e68;
  --green-pale: #c8f0d8;
  --lime: #8fd93a;
  --lime-bright: #aaee55;
  --cream: #f5f3ee;
  --cream2: #e8e4d8;
  --text: #141a14;
  --text-soft: #556655;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(13,43,26,0.10);
  --shadow-lg: 0 12px 48px rgba(13,43,26,0.18);
  --shadow-xl: 0 24px 80px rgba(13,43,26,0.22);
  --radius: 20px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --nav-h: 68px;
}

@keyframes fadeUp {
  from { opacity:0; transform: translateY(24px); }
  to   { opacity:1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; } to { opacity:1; }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes float {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-8px); }
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--cream);
  font-family: 'Sarabun', sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.nav {
  background: linear-gradient(135deg, #081a0e 0%, var(--green-deep) 100%);
  display: flex; align-items: center;
  padding: 0 28px; height: var(--nav-h);
  position: sticky; top: 0; z-index: 200;
  border-bottom: 1px solid rgba(142,217,58,0.12);
}
.nav::after {
  content:''; position:absolute; bottom:0; left:0; right:0; height:1px;
  background: linear-gradient(90deg, transparent, rgba(142,217,58,0.3), transparent);
}
.nav-brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; margin-right: 36px; flex-shrink: 0;
}
.nav-brand img {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(142,217,58,0.4);
  transition: border-color 0.3s, transform 0.3s;
}
.nav-brand:hover img { border-color: var(--lime); transform: scale(1.05); }
.nav-title { color: white; font-family: 'Kanit', sans-serif; font-size: 16px; font-weight: 700; line-height: 1.2; }
.nav-title span { display: block; font-size: 10px; font-weight: 400; opacity: 0.5; letter-spacing: 1.5px; text-transform: uppercase; font-family: 'Sarabun', sans-serif; }
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-link {
  color: rgba(255,255,255,0.55); font-size: 14px; font-weight: 600; font-family: 'Kanit', sans-serif;
  padding: 22px 18px; text-decoration: none; position: relative;
  transition: color 0.2s; white-space: nowrap; letter-spacing: 0.3px;
}
.nav-link::after {
  content:''; position:absolute; bottom:0; left:18px; right:18px; height:2px;
  background: var(--lime); border-radius: 2px 2px 0 0;
  transform: scaleX(0); transition: transform 0.25s ease;
}
.nav-link:hover { color: rgba(255,255,255,0.9); }
.nav-link.active { color: var(--lime-bright); }
.nav-link.active::after { transform: scaleX(1); }
.nav-admin {
  margin-left: auto; flex-shrink: 0;
  background: rgba(142,217,58,0.1); border: 1px solid rgba(142,217,58,0.25);
  color: rgba(255,255,255,0.75); font-size: 13px; font-weight: 600;
  padding: 9px 18px; border-radius: 40px; text-decoration: none;
  transition: all 0.25s; font-family: 'Sarabun', sans-serif;
}
.nav-admin:hover { background: rgba(142,217,58,0.2); color: white; border-color: rgba(142,217,58,0.5); transform: translateY(-1px); }

/* ── PAGE WRAPPER ── */
.page {
  flex: 1; padding: 48px 28px; max-width: 1100px; margin: 0 auto; width: 100%;
  animation: fadeUp 0.4s ease both;
}
.page-header { margin-bottom: 36px; }
.page-title {
  font-size: 30px; font-weight: 800; color: var(--green-deep);
  font-family: 'Kanit', sans-serif; line-height: 1.15; letter-spacing: -0.5px;
}
.page-sub { font-size: 15px; color: var(--text-soft); margin-top: 6px; font-weight: 400; }

/* ── CARD ── */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 20px;
  border: 1px solid rgba(13,43,26,0.05);
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-title {
  font-size: 16px; font-weight: 700; color: var(--green-deep);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
  font-family: 'Kanit', sans-serif; letter-spacing: 0.2px;
}
.card-title .badge {
  background: var(--green-pale); color: var(--green-mid);
  font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 20px;
  font-family: 'Sarabun', sans-serif; letter-spacing: 0.5px;
}

/* ── STEPPER ── */
.stepper { display: flex; align-items: center; margin-bottom: 40px; }
.step { display: flex; align-items: center; gap: 10px; flex: 1; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; font-family: 'Kanit', sans-serif;
  border: 2px solid var(--cream2);
  background: var(--cream2); color: var(--text-soft);
  flex-shrink: 0; transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.step.active .step-num {
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  border-color: transparent; color: white;
  box-shadow: 0 4px 16px rgba(30,92,56,0.35);
  transform: scale(1.1);
}
.step.done .step-num {
  background: linear-gradient(135deg, var(--lime), var(--lime-bright));
  border-color: transparent; color: var(--green-deep);
}
.step-label { font-size: 13px; font-weight: 600; color: var(--text-soft); white-space: nowrap; }
.step.active .step-label { color: var(--green-mid); font-weight: 800; }
.step.done .step-label { color: var(--green-light); }
.step-line { flex: 1; height: 2px; background: var(--cream2); margin: 0 8px; border-radius: 2px; overflow: hidden; }
.step-line.done { background: linear-gradient(90deg, var(--lime), var(--lime-bright)); }

/* ── FORM ── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 700; color: var(--text-soft); letter-spacing: 0.6px; text-transform: uppercase; }
.form-label .req { color: #e05; margin-left: 3px; }
.form-input, .form-select, .form-textarea {
  padding: 11px 16px; font-size: 14px; font-family: 'Sarabun', sans-serif;
  background: var(--cream); color: var(--text);
  border: 1.5px solid var(--cream2);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none; -webkit-appearance: none; width: 100%;
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23556655' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 4px rgba(58,158,104,0.12);
  background: white;
}
.form-input.error, .form-input.input-error,
.form-select.input-error { border-color: #e05; box-shadow: 0 0 0 3px rgba(220,50,30,0.1); }
.field-error { font-size: 12px; color: #be123c; margin-top: 4px; font-weight: 500; }

/* ── TABS ── */
.tabs {
  display: flex; gap: 4px;
  background: var(--cream2); padding: 5px;
  border-radius: 14px; margin-bottom: 24px; overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 18px; border-radius: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; color: var(--text-soft); white-space: nowrap;
  transition: all 0.2s; font-family: 'Kanit', sans-serif; letter-spacing: 0.3px;
  text-decoration: none;
}
a.tab { display: inline-block; }
.tab.active {
  background: white; color: var(--green-deep);
  box-shadow: 0 2px 12px rgba(13,43,26,0.12);
}
.tab:hover:not(.active) { color: var(--green-mid); background: rgba(255,255,255,0.5); }

/* ── BUTTONS ── */
.btn {
  padding: 12px 28px; border-radius: 40px; font-size: 14px; font-weight: 700;
  font-family: 'Kanit', sans-serif; letter-spacing: 0.3px;
  cursor: pointer; border: none; transition: all 0.25s cubic-bezier(0.34,1.2,0.64,1);
  display: inline-flex; align-items: center; gap: 8px; position: relative; overflow: hidden;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green-mid), var(--green-deep));
  color: white; box-shadow: 0 4px 16px rgba(30,92,56,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(30,92,56,0.35); }
.btn-secondary { background: var(--cream2); color: var(--text); }
.btn-secondary:hover { background: var(--green-pale); color: var(--green-deep); transform: translateY(-1px); }
.btn-lime {
  background: linear-gradient(135deg, var(--lime), var(--lime-bright));
  color: var(--green-deep); box-shadow: 0 4px 20px rgba(143,217,58,0.35);
  font-weight: 800;
}
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(143,217,58,0.5); }
.btn-danger { background: #fce4e4; color: #c0392b; }
.btn-danger:hover { background: #f9c6c6; transform: translateY(-1px); }
.btn-sm { padding: 7px 18px; font-size: 13px; }
.btn-success { background: #e8f5e9; color: #2e7d32; }
.btn-success:hover { background: #c8e6c9; transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── SCOUT ENTRY ── */
.scout-entry {
  border: 1.5px solid var(--cream2); border-radius: 14px;
  padding: 24px; margin-bottom: 16px;
  background: linear-gradient(160deg, #fafcfa, white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.scout-entry:hover { border-color: var(--green-pale); box-shadow: 0 4px 20px rgba(13,43,26,0.07); }
.scout-entry-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.scout-entry-label { font-size: 14px; font-weight: 800; color: var(--green-mid); display: flex; align-items: center; gap: 10px; font-family: 'Kanit', sans-serif; }
.scout-num {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: white; font-family: 'Kanit', sans-serif;
}

/* ── RECYCLE ROW ── */
.recycle-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 40px; gap: 10px; align-items: end; margin-bottom: 10px; }
.recycle-row-header {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 40px;
  gap: 10px; margin-bottom: 8px;
  font-size: 11px; font-weight: 700; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: 0.8px;
}
.remove-btn {
  width: 36px; height: 40px; border-radius: 10px; border: none;
  background: #fce4e4; color: #c0392b; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.remove-btn:hover { background: #f9c6c6; transform: scale(1.1); }

/* ── STAT CARDS ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: white; border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(13,43,26,0.05);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:3px;
  background: linear-gradient(90deg, var(--green-light), var(--lime));
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-icon { font-size: 28px; margin-bottom: 4px; }
.stat-value { font-size: 28px; font-weight: 900; color: var(--green-deep); line-height: 1; font-family: 'Kanit', sans-serif; }
.stat-label { font-size: 13px; color: var(--text-soft); font-weight: 500; }

/* ── LEADERBOARD ── */
.lb-row {
  display: grid; grid-template-columns: 52px 1fr 110px 130px 80px;
  gap: 16px; align-items: center;
  padding: 16px 20px; border-radius: 14px; margin-bottom: 8px;
  transition: all 0.2s; border: 1px solid transparent;
}
.lb-row:hover { background: var(--cream); border-color: var(--cream2); }
.lb-row.header {
  font-size: 11px; font-weight: 700; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: 0.8px;
  padding-bottom: 8px; margin-bottom: 0;
}
.lb-row.header:hover { background: transparent; border-color: transparent; }
.lb-rank { font-size: 20px; font-weight: 800; text-align: center; font-family: 'Kanit', sans-serif; }
.lb-rank.gold   { color: #f59e0b; filter: drop-shadow(0 2px 4px rgba(245,158,11,0.4)); }
.lb-rank.silver { color: #9ca3af; }
.lb-rank.bronze { color: #b45309; }
.lb-school { font-weight: 700; font-size: 15px; font-family: 'Kanit', sans-serif; }
.lb-school-sub { font-size: 12px; color: var(--text-soft); font-weight: 400; }
.lb-weight { font-size: 15px; font-weight: 700; color: var(--green-light); }
.lb-price  { font-size: 15px; font-weight: 900; color: var(--green-deep); font-family: 'Kanit', sans-serif; }

/* ── STATUS BADGES ── */
.badge-pending  { background: #fef3c7; color: #b45309; padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 700; font-family: 'Kanit', sans-serif; display: inline-block; }
.badge-approved { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 700; font-family: 'Kanit', sans-serif; display: inline-block; }
.badge-rejected { background: #fee2e2; color: #991b1b; padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 700; font-family: 'Kanit', sans-serif; display: inline-block; }

/* ── ADMIN TABLE ── */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.admin-table th {
  background: linear-gradient(135deg, var(--green-deep), var(--green-mid));
  color: white; padding: 14px 18px; text-align: left; font-size: 12px; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase; font-family: 'Kanit', sans-serif;
}
.admin-table th:first-child { border-radius: 10px 0 0 0; }
.admin-table th:last-child  { border-radius: 0 10px 0 0; }
.admin-table td { padding: 15px 18px; border-bottom: 1px solid var(--cream2); font-size: 14px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f9fdf9; }

/* ── ALERT ── */
.alert {
  padding: 14px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
  border: 1px solid transparent;
}
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert-error   { background: #fff1f2; color: #881337; border-color: #fecdd3; }

/* ── EMPTY STATE ── */
.empty { text-align: center; padding: 60px 20px; color: var(--text-soft); }
.empty-icon  { font-size: 52px; margin-bottom: 14px; animation: float 3s ease-in-out infinite; display: block; }
.empty-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 8px; font-family: 'Kanit', sans-serif; }
.empty-sub   { font-size: 14px; line-height: 1.6; }

/* ── PROGRESS BAR ── */
.progress-bar { height: 6px; background: var(--cream2); border-radius: 3px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 3px; transition: width 0.8s cubic-bezier(0.34,1.2,0.64,1);
  background: linear-gradient(90deg, var(--green-light), var(--lime), var(--lime-bright));
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite linear;
}

/* ── DIVIDER ── */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--cream2), transparent); margin: 24px 0; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8,26,14,0.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: white; border-radius: var(--radius-lg); padding: 36px;
  max-width: 480px; width: 100%; box-shadow: var(--shadow-xl);
  border: 1px solid rgba(13,43,26,0.08);
  animation: fadeUp 0.25s ease;
}
.modal-title   { font-size: 22px; font-weight: 800; color: var(--green-deep); margin-bottom: 12px; font-family: 'Kanit', sans-serif; }
.modal-body    { font-size: 15px; color: var(--text-soft); margin-bottom: 28px; line-height: 1.7; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── SUMMARY MINI ── */
.summary-mini {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 20px;
}
.summary-mini > div {
  background: var(--cream); border-radius: 12px; padding: 14px 16px;
}
.summary-mini .s-label { font-size: 12px; color: var(--text-soft); font-weight: 600; margin-bottom: 4px; }
.summary-mini .s-val   { font-size: 20px; font-weight: 800; }

/* ── PHOTO UPLOAD ── */
.photo-upload-wrap { position:relative; }
.photo-upload-box {
  border: 2px dashed var(--cream2); border-radius: 12px;
  padding: 18px 12px; text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s; background: var(--cream);
  min-height: 110px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
}
.photo-upload-box:hover { border-color: var(--green-light); background: #f0faf4; }
.photo-upload-box.has-photo { border-style: solid; border-color: var(--green-light); padding: 6px; }
.photo-upload-box input[type="file"] { display: none; }
.photo-upload-icon { font-size: 28px; }
.photo-upload-text { font-size: 12px; color: var(--text-soft); font-weight: 600; }
.photo-preview {
  width: 100%; max-height: 120px; border-radius: 8px;
  object-fit: cover; display: block;
}
.photo-upload-change {
  font-size: 11px; color: var(--green-mid); font-weight: 700;
  margin-top: 4px; cursor: pointer; text-decoration: underline;
}
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 16px;
  margin-top: 4px;
}
.photo-slot-label {
  font-size: 12px; font-weight: 700; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}

/* ── HAMBURGER BUTTON ── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px 6px;
  border: none;
  background: transparent;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-burger.open .nav-burger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.open .nav-burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open .nav-burger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── MOBILE NAV MENU ── */
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-mobile {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #0a2015;
  border-bottom: 2px solid rgba(143,217,58,0.2);
  z-index: 199;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  overflow-y: auto;
  max-height: calc(100vh - var(--nav-h));
}
.nav-mobile.open { display: flex; }
.nav-mobile .nav-link {
  padding: 15px 24px;
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  font-family: 'Kanit', sans-serif;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.nav-mobile .nav-link:hover,
.nav-mobile .nav-link.active { color: var(--lime-bright); background: rgba(143,217,58,0.07); }
.nav-mobile-actions {
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── RESPONSIVE: TABLET & MOBILE ── */
@media (max-width: 900px) {
  .nav-title span { display: none; }
  .nav-link { padding: 22px 12px; font-size: 13px; }
}

@media (max-width: 680px) {
  /* Nav */
  .nav { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-burger { display: flex; }

  /* Layout */
  .page { padding: 20px 14px; }
  .card { padding: 18px 16px; }
  .page-title { font-size: 22px; }

  /* Landing info cards — stack to 1 col */
  .reg-info-cards { grid-template-columns: 1fr !important; }

  /* Forms */
  .form-grid { grid-template-columns: 1fr; }
  .stepper { gap: 4px; }
  .stepper .step-label { display: none; }
  .step-num { width: 30px; height: 30px; font-size: 13px; }

  /* Recycle rows */
  .recycle-row, .recycle-row-header { grid-template-columns: 1.8fr 1fr 1fr; }
  .recycle-row > *:nth-child(4) { display: none; }

  /* Leaderboard */
  .lb-row { grid-template-columns: 40px 1fr 90px; }
  .lb-row > *:nth-child(4), .lb-row > *:nth-child(5) { display: none; }

  /* Summary cards */
  .summary-mini { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Admin table — horizontal scroll */
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Modal full-width */
  .modal { padding: 24px 18px; border-radius: 16px; }

  /* Buttons row — stack on mobile */
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
  .page { padding: 16px 12px; }
  .card { padding: 14px 12px; }
  .summary-mini { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-value { font-size: 22px; }
}

/* ── ADMIN SIDEBAR LAYOUT ── */
.admin-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
}
.admin-sidebar {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(13,43,26,0.05);
  padding: 10px;
}
.admin-content {
  min-width: 0;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Kanit', sans-serif;
  color: var(--text-soft);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.sidebar-item:hover { background: var(--cream); color: var(--green-mid); }
.sidebar-item.active {
  background: linear-gradient(135deg, var(--green-mid), var(--green-deep));
  color: white;
}
.sidebar-icon { font-size: 16px; flex-shrink: 0; }
.sidebar-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-badge {
  background: var(--cream2);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  flex-shrink: 0;
  font-family: 'Sarabun', sans-serif;
}
.sidebar-badge-active {
  background: rgba(255,255,255,0.25);
  color: white;
}

@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
  }
  .sidebar-item { font-size: 12px; padding: 7px 10px; }
  .sidebar-label { display: none; }
  .sidebar-icon { font-size: 18px; }
}

/* ── Thumbnail hover zoom ── */
.thumb-wrap { position: relative; display: inline-block; }
.thumb-sm { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; cursor: pointer; border: 1px solid #e5e7eb; }
.thumb-zoom { display: none; position: absolute; left: 44px; top: 50%; transform: translateY(-50%); z-index: 999;
  background: white; border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.25); padding: 4px; }
.thumb-zoom img { width: 200px; height: 200px; object-fit: cover; border-radius: 8px; display: block; }
.thumb-wrap:hover .thumb-zoom { display: block; }
