/* ============================================================
   Campus Lost & Found Hub (캠퍼스 분실물 센터)
   Design System & Styling (Light & Dark Theme)
============================================================ */

/* CSS Variables: Theme System */
:root {
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Light Theme Colors */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  /* Brand Accents */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-text: #1d4ed8;

  /* Status Colors */
  --lost-color: #ef4444;
  --lost-bg: #fef2f2;
  --lost-border: #fecaca;
  --lost-text: #b91c1c;

  --found-color: #10b981;
  --found-bg: #ecfdf5;
  --found-border: #a7f3d0;
  --found-text: #047857;

  --resolved-color: #8b5cf6;
  --resolved-bg: #f5f3ff;
  --resolved-border: #ddd6fe;
  --resolved-text: #6d28d9;

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: #fee2e2;

  --success: #10b981;
  --success-hover: #059669;

  /* Shadows & Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-subtle: #1e293b;
  --bg-hover: #334155;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: #1e293b;
  --border-focus: #60a5fa;

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.15);
  --primary-text: #93c5fd;

  --lost-color: #f87171;
  --lost-bg: rgba(239, 68, 68, 0.15);
  --lost-border: rgba(239, 68, 68, 0.3);
  --lost-text: #fca5a5;

  --found-color: #34d399;
  --found-bg: rgba(16, 185, 129, 0.15);
  --found-border: rgba(16, 185, 129, 0.3);
  --found-text: #6ee7b7;

  --resolved-color: #a78bfa;
  --resolved-bg: rgba(139, 92, 246, 0.15);
  --resolved-border: rgba(139, 92, 246, 0.3);
  --resolved-text: #c4b5fd;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.7);
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Typography & Links */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background-color: var(--bg-subtle);
  border-color: var(--text-muted);
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background-color: var(--success-hover);
}

.btn-warning {
  background-color: #f59e0b;
  color: #ffffff;
}

.btn-warning:hover {
  background-color: #d97706;
}

.btn-danger-outline {
  background-color: transparent;
  color: var(--danger);
  border-color: var(--danger-light);
}

.btn-danger-outline:hover {
  background-color: var(--danger-light);
}

.btn-sm {
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-icon-only {
  padding: 0.6rem 0.9rem;
}

.count-pill {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.btn-outline.active .count-pill,
.btn-outline:hover .count-pill {
  background: var(--primary);
  color: #ffffff;
}

/* ============================================================
   Header / Navigation
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background-color: rgba(17, 24, 39, 0.85);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e40af, #0284c7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.35);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-subtle);
  border-color: var(--text-muted);
}

.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* ============================================================
   Hero Section & Statistics
============================================================ */
.hero-section {
  padding: 3rem 0 2rem;
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-text);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.hero-title {
  font-size: 2.25rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  font-weight: 800;
}

.highlight-text {
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.mobile-break {
  display: inline;
}

/* Stat Counter Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-total { background: var(--primary-light); color: var(--primary); }
.icon-lost { background: var(--lost-bg); color: var(--lost-color); }
.icon-found { background: var(--found-bg); color: var(--found-color); }
.icon-resolved { background: var(--resolved-bg); color: var(--resolved-color); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

/* ============================================================
   Controls Panel (Search & Filters)
============================================================ */
.main-content {
  flex: 1;
  padding-bottom: 4rem;
}

.controls-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.search-row {
  margin-bottom: 1.25rem;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 2.8rem 0.85rem 3rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  background-color: var(--bg-subtle);
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.clear-search-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-search-btn:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

/* Status Filter Pills */
.status-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-btn {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.pill-btn.active {
  background-color: var(--text-main);
  color: var(--bg-surface);
  border-color: var(--text-main);
}

.pill-btn.type-lost.active {
  background-color: var(--lost-color);
  border-color: var(--lost-color);
  color: #ffffff;
}

.pill-btn.type-found.active {
  background-color: var(--found-color);
  border-color: var(--found-color);
  color: #ffffff;
}

.pill-btn.type-resolved.active {
  background-color: var(--resolved-color);
  border-color: var(--resolved-color);
  color: #ffffff;
}

.active-filter-indicator {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Dropdowns Row */
.dropdowns-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-reset-group {
  flex: 0 0 auto;
  min-width: auto;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-select {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ============================================================
   Items Grid & Cards
============================================================ */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.item-card.is-resolved {
  opacity: 0.85;
}

/* Card Image & Badges */
.card-media-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  background-color: var(--bg-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.item-card:hover .card-img {
  transform: scale(1.05);
}

.card-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 2.2rem;
}

.card-img-placeholder span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.card-badges-top {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.35rem;
  z-index: 2;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  letter-spacing: -0.01em;
}

.badge-lost {
  background-color: var(--lost-bg);
  color: var(--lost-text);
  border: 1px solid var(--lost-border);
}

.badge-found {
  background-color: var(--found-bg);
  color: var(--found-text);
  border: 1px solid var(--found-border);
}

.badge-resolved {
  background-color: var(--resolved-bg);
  color: var(--resolved-text);
  border: 1px solid var(--resolved-border);
}

.badge-category {
  background-color: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.card-resolved-watermark {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.resolved-stamp {
  border: 3px solid #ffffff;
  color: #ffffff;
  padding: 0.4rem 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  transform: rotate(-10deg);
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Card Body */
.card-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-item svg {
  flex-shrink: 0;
}

.meta-item strong {
  color: var(--text-main);
  font-weight: 600;
}

.card-footer {
  padding: 0.8rem 1.2rem;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-counts {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.count-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-surface);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 600px;
  margin: 2rem auto;
}

.empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  background: var(--bg-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.empty-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.empty-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ============================================================
   Modals
============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  overflow-y: auto;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-dialog-large {
  max-width: 820px;
}

.modal-dialog-sm {
  max-width: 420px;
}

.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: var(--bg-subtle);
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
  flex-shrink: 0;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--text-main);
}

.form-label.required::after {
  content: ' *';
  color: var(--danger);
}

.found-only-indicator {
  font-size: 0.75rem;
  background: var(--found-bg);
  color: var(--found-text);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  margin-right: 0.3rem;
}

.form-control {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.col-half {
  flex: 1;
}

/* Type Selector Radio Cards */
.type-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.type-radio-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.type-radio-card input {
  position: absolute;
  opacity: 0;
}

.type-card-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  background-color: var(--bg-subtle);
  transition: all var(--transition-fast);
}

.type-emoji {
  font-size: 1.4rem;
}

.type-card-text {
  display: flex;
  flex-direction: column;
}

.type-card-text strong {
  font-size: 0.95rem;
  color: var(--text-main);
}

.type-card-text small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.lost-type input:checked ~ .type-card-content {
  border-color: var(--lost-color);
  background-color: var(--lost-bg);
}

.found-type input:checked ~ .type-card-content {
  border-color: var(--found-color);
  background-color: var(--found-bg);
}

/* Image Upload Section & Tabs */
.image-upload-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.img-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.img-tab-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.img-tab-btn.active {
  background-color: var(--primary-light);
  color: var(--primary-text);
  border-color: var(--primary);
}

.image-upload-mode {
  width: 100%;
}

.url-input-wrap {
  display: flex;
  gap: 0.5rem;
}

.upload-format-info {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Image Upload Area */
.image-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  background-color: var(--bg-subtle);
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
  padding: 1.25rem 1rem;
}

.image-upload-zone:hover {
  border-color: var(--primary);
  background-color: var(--bg-surface);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
  width: 100%;
  height: 100%;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.upload-btn-visual {
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}

.upload-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.image-preview-container {
  position: relative;
  width: 100%;
  min-height: 200px;
  max-height: 280px;
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-container img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.preview-overlay-actions {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.preview-badge {
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

.btn-remove-image {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background var(--transition-fast);
}

.btn-remove-image:hover {
  background: var(--danger-hover);
}

/* Lightbox Modal */
.image-lightbox-modal {
  z-index: 2100;
  background: rgba(0, 0, 0, 0.9);
  padding: 1rem;
}

.lightbox-dialog {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-dialog img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.lightbox-close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-image-box {
  cursor: pointer;
}

.detail-image-box:hover img {
  opacity: 0.95;
}

/* ============================================================
   Detail Modal Specifics
============================================================ */
.detail-top-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.detail-image-box {
  width: 100%;
  height: 280px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.detail-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.detail-item-title {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.detail-meta-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-subtle);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
}

.meta-name {
  color: var(--text-muted);
  font-weight: 600;
}

.meta-value {
  color: var(--text-main);
  font-weight: 600;
}

.highlight-value {
  color: var(--primary);
}

/* Detail Contact Box */
.detail-contact-box {
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.contact-box-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.contact-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
}

.detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.section-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-description-section {
  padding: 1.25rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.description-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-main);
  white-space: pre-line;
}

/* Comments Section */
.comments-section {
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.comments-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-input-box {
  margin-bottom: 1.25rem;
}

.comment-inputs-row {
  display: flex;
  gap: 0.5rem;
}

.comment-author-input {
  flex: 0 0 150px;
}

.comment-text-input {
  flex: 1;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-item {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--primary);
}

.comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.comment-author-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-body {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.5;
}

.no-comments {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* PIN Verification Modal */
.pin-guide {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
}

.pin-input-center {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  font-weight: 800;
}

/* ============================================================
   Footer
============================================================ */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left {
  max-width: 500px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.btn-text-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.btn-text-link.text-danger:hover {
  color: var(--danger);
}

.separator {
  color: var(--border-color);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ============================================================
   Toast Notifications
============================================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--text-main);
  color: var(--bg-surface);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.3s ease 2.7s forwards;
}

.toast.toast-success {
  background: #047857;
  color: #ffffff;
}

.toast.toast-error {
  background: #b91c1c;
  color: #ffffff;
}

@keyframes toastIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(20px);
    opacity: 0;
  }
}

/* ============================================================
   Responsive Media Queries
============================================================ */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .detail-top-grid {
    grid-template-columns: 1fr;
  }

  .detail-image-box {
    height: 220px;
  }
}

@media (max-width: 680px) {
  .header-content {
    height: 60px;
  }

  .logo-title {
    font-size: 1rem;
  }

  .logo-badge {
    display: none;
  }

  .btn-text {
    display: none;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .stat-card {
    padding: 0.85rem;
    gap: 0.5rem;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .controls-panel {
    padding: 1rem;
  }

  .dropdowns-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    min-width: 100%;
  }

  .filter-reset-group {
    width: 100%;
  }

  .filter-reset-group .btn {
    width: 100%;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .type-selector-grid {
    grid-template-columns: 1fr;
  }

  .comment-inputs-row {
    flex-direction: column;
  }

  .comment-author-input {
    flex: 1;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    align-items: flex-start;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}