/* utiles.net — Lost & Found — shared stylesheet */

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

:root {
  --green:        #0F6E56;
  --green-light:  #E1F5EE;
  --green-dark:   #085041;
  --red:          #A32D2D;
  --red-light:    #FCEBEB;
  --red-dark:     #791F1F;
  --blue:         #185FA5;
  --blue-light:   #E6F1FB;
  --blue-dark:    #0C447C;
  --amber:        #BA7517;
  --amber-light:  #FAEEDA;
  --amber-dark:   #633806;
  --gray:         #5F5E5A;
  --gray-light:   #F1EFE8;
  --gray-dark:    #2C2C2A;
  --border:       rgba(0,0,0,0.1);
  --border-md:    rgba(0,0,0,0.18);
  --bg:           #f9f9f7;
  --white:        #ffffff;
  --text:         #1a1a18;
  --text-muted:   #6b6b67;
  --radius:       10px;
  --radius-lg:    14px;
  --shadow:       0 1px 3px rgba(0,0,0,0.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1,h2,h3,h4 { font-weight: 600; line-height: 1.3; }

/* ── Container ────────────────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }

.btn-primary  { background: var(--green); color: #fff; border-color: var(--green); }
.btn-outline  { background: var(--white); color: var(--text); border-color: var(--border-md); }
.btn-outline:hover { background: var(--gray-light); }
.btn-ghost    { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--gray-light); color: var(--text); }
.btn-danger   { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm       { padding: 5px 12px; font-size: 13px; }
.btn-lg       { padding: 11px 24px; font-size: 15px; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.badge-lost     { background: var(--red-light); color: var(--red-dark); }
.badge-found    { background: var(--green-light); color: var(--green-dark); }
.badge-reunited { background: var(--blue-light); color: var(--blue-dark); }
.badge-pending  { background: var(--amber-light); color: var(--amber-dark); }

/* ── Header ───────────────────────────────────────────────────────────────── */
.lf-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.lf-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}
.lf-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.lf-logo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.lf-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}
.lang-switcher a { font-weight: 500; }
.lang-switcher a.active { color: var(--green); font-weight: 700; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.lf-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 36px;
  text-align: center;
}
.lf-hero h1 {
  font-size: 30px;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.lf-hero p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.7;
}
.hero-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hero-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Stats bar ────────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.stats-grid {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
}
.stat { display: flex; align-items: baseline; gap: 5px; }
.stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}
.stat-lost  .stat-val { color: var(--red); }
.stat-found .stat-val { color: var(--green); }
.stat-reunited .stat-val { color: var(--blue); }

/* ── Filters ──────────────────────────────────────────────────────────────── */
.lf-filters {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0 12px;
  position: sticky;
  top: 56px;
  z-index: 90;
}
.type-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.type-tab {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--white);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.type-tab:hover { background: var(--gray-light); }
.type-tab.active          { background: var(--text); color: #fff; border-color: var(--text); }
.type-tab-lost.active     { background: var(--red-light); color: var(--red-dark); border-color: var(--red); }
.type-tab-found.active    { background: var(--green-light); color: var(--green-dark); border-color: var(--green); }
.type-tab-reunited.active { background: var(--blue-light); color: var(--blue-dark); border-color: var(--blue); }

.search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border-md);
  font-size: 14px;
  background: var(--white);
  color: var(--text);
  outline: none;
}
.search-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,110,86,0.1); }
.cat-select {
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-md);
  font-size: 14px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
}
.results-count { font-size: 13px; color: var(--text-muted); }

/* ── Posts grid ───────────────────────────────────────────────────────────── */
.lf-main { padding: 28px 0 48px; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  border-color: var(--border-md);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.post-card-reunited { opacity: 0.75; }
.post-card-reunited:hover { opacity: 1; }

.post-card-photo {
  width: 100%;
  height: 160px;
  background: var(--gray-light);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.post-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card-no-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-muted);
}
.post-card-photo .badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.post-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.post-card-category {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.post-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.post-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}
.post-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  flex-wrap: wrap;
}
.post-card-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border-md);
  background: var(--white);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.page-btn:hover { background: var(--gray-light); color: var(--text); }
.page-btn.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-state p { margin-bottom: 20px; font-size: 15px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.lf-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.footer-tagline { font-weight: 400; color: var(--text-muted); font-size: 13px; }
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links a { font-size: 12px; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-note { font-size: 12px; color: var(--text-muted); }

/* ── Form styles (used in post.php, claim.php) ────────────────────────────── */
.lf-form-page { background: var(--bg); min-height: 100vh; padding: 32px 0 60px; }
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 20px;
}
.form-card-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.form-row { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .required {
  color: var(--red);
  margin-left: 3px;
}
.form-label .optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
  margin-left: 4px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15,110,86,0.1);
}
.form-textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.5;
}

/* Education panel */
.edu-panel {
  background: var(--amber-light);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--amber-dark);
  line-height: 1.6;
  display: none;
}
.edu-panel.show { display: block; }
.edu-panel.info {
  background: var(--blue-light);
  border-color: var(--blue);
  color: var(--blue-dark);
}
.edu-panel.safe {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green-dark);
}
.edu-panel-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.edu-step {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  align-items: flex-start;
}
.edu-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Checklist */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.checklist-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.checklist-item label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.checklist-item input[type="text"] {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-md);
  border-radius: 8px;
  font-size: 13px;
  background: var(--white);
  color: var(--text);
}
.checklist-item input:focus { border-color: var(--green); outline: none; }

/* Photo upload */
.photo-upload-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.photo-slot {
  width: 100px;
  height: 100px;
  border: 2px dashed var(--border-md);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s;
}
.photo-slot:hover { border-color: var(--green); }
.photo-slot input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.photo-slot-icon { color: var(--text-muted); font-size: 24px; }
.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Custody options */
.custody-options { display: flex; flex-direction: column; gap: 8px; }
.custody-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.custody-option:hover { border-color: var(--green); background: var(--green-light); }
.custody-option input[type="radio"] { margin-top: 2px; flex-shrink: 0; }
.custody-option-text strong { font-size: 14px; display: block; margin-bottom: 2px; }
.custody-option-text span { font-size: 12px; color: var(--text-muted); }
.custody-option.recommended { border-color: var(--green); }
.custody-recommended-badge {
  font-size: 10px;
  background: var(--green-light);
  color: var(--green-dark);
  padding: 2px 7px;
  border-radius: 8px;
  margin-left: 6px;
  font-weight: 500;
}

/* Secret detail */
.secret-field {
  background: var(--gray-light);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  padding: 14px;
}
.secret-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.secret-field-label i { color: var(--red); }

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--gray-light); }
.admin-table tr:last-child td { border-bottom: none; }

/* Score bar */
.score-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.score-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.score-fill { height: 100%; border-radius: 3px; }
.score-high   .score-fill { background: var(--green); }
.score-medium .score-fill { background: var(--amber); }
.score-low    .score-fill { background: var(--red); }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.alert i { flex-shrink: 0; margin-top: 2px; }
.alert-success { background: var(--green-light); color: var(--green-dark); }
.alert-error   { background: var(--red-light);   color: var(--red-dark); }
.alert-warning { background: var(--amber-light);  color: var(--amber-dark); }
.alert-info    { background: var(--blue-light);   color: var(--blue-dark); }

/* ── Admin layout ─────────────────────────────────────────────────────────── */
.admin-page { background: var(--bg); min-height: 100vh; }
.admin-content { padding: 28px 0 60px; }
.admin-page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.admin-page-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }

.admin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.admin-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.admin-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.admin-setting-row:last-child { border-bottom: none; }
.admin-setting-info { flex: 1; min-width: 200px; }
.admin-setting-label { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.admin-setting-sub { font-size: 12px; color: var(--text-muted); }
.admin-setting-control { flex-shrink: 0; }

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-md);
  border-radius: 22px;
  transition: 0.2s;
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Stat cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.stat-card-val { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.stat-card-label { font-size: 12px; color: var(--text-muted); }

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .lf-hero h1 { font-size: 22px; }
  .lf-hero p  { font-size: 14px; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .stats-grid { gap: 16px; }
  .posts-grid { grid-template-columns: 1fr; }
  .checklist-grid { grid-template-columns: 1fr; }
  .form-card { padding: 18px; }
  .admin-card { padding: 16px; }
  .lf-filters { top: 56px; }
  .search-row { flex-direction: column; }
  .search-input-wrap { width: 100%; }
  .cat-select { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
