@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

/* ─── Light theme (default) ─────────────────────────── */
:root {
  --brand-50:   #F3E8FF;
  --brand-100:  #E9D5FF;
  --brand-400:  #4B0082;
  --brand-600:  #3B0066;
  --brand-800:  #2A004A;

  --gold-50:    #FFFBEB;
  --gold-400:   #FFD700;
  --gold-600:   #C9A800;

  --coral-50:   #FAECE7;
  --coral-400:  #D85A30;
  --coral-600:  #993C1D;

  --bg-primary:   #F7F5FF;
  --bg-secondary: #FFFFFF;
  --bg-tertiary:  #F0EBFF;

  --text-primary:   #1a1a18;
  --text-secondary: #5f5e5a;
  --text-muted:     #999896;

  --border:    rgba(75,0,130,0.10);
  --border-md: rgba(75,0,130,0.18);

  --shadow-sm: 0 1px 3px rgba(75,0,130,0.07);
  --shadow-md: 0 4px 12px rgba(75,0,130,0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --font: 'DM Sans', system-ui, sans-serif;
}

/* ─── Dark theme ─────────────────────────────────────── */
[data-theme="dark"] {
  --bg-primary:   #0d0014;
  --bg-secondary: #160020;
  --bg-tertiary:  #1f002e;

  --text-primary:   #f0f0ee;
  --text-secondary: #a0a09a;
  --text-muted:     #666662;

  --border:    rgba(255,215,0,0.08);
  --border-md: rgba(255,215,0,0.16);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);

  --brand-50:  rgba(75,0,130,0.2);
  --gold-50:   rgba(255,215,0,0.1);
  --coral-50:  rgba(216,90,48,0.15);
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

/* ─── Layout ─────────────────────────────────────────── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.page      { padding: 2rem 0 4rem; }

/* ─── Navbar ─────────────────────────────────────────── */
.navbar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
}
.navbar__inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1080px; margin: 0 auto; padding: 0 1.25rem;
}
.navbar__logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1rem;
  color: var(--text-primary); text-decoration: none;
}
.navbar__logo-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--brand-400);
  border-radius: 22px;
  padding: 5px 14px 5px 8px;
  color: white;
}
.navbar__logo-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold-400);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.navbar__logo-text {
  font-size: 0.9rem; font-weight: 700; color: white;
  letter-spacing: 0.3px;
}
.navbar__logo-text span { color: var(--gold-400); }
.navbar__logo-sub {
  font-size: 0.72rem; font-weight: 400;
  color: var(--text-muted); margin-left: 2px;
}
.navbar__links { display: flex; align-items: center; gap: 8px; }

/* ─── Theme toggle ───────────────────────────────────── */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-md);
  background: var(--bg-tertiary);
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-toggle:hover { background: var(--brand-50); }

/* ─── Notification bell ──────────────────────────────── */
.notif-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-md);
  background: var(--bg-tertiary);
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: all 0.2s;
  text-decoration: none;
}
.notif-btn:hover { background: var(--brand-50); }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--gold-400); color: var(--brand-400);
  font-size: 0.6rem; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  text-decoration: none; transition: all 0.15s;
  font-family: var(--font);
}
.btn--primary { background: var(--brand-400); color: #fff; }
.btn--primary:hover { background: var(--brand-600); }
.btn--gold { background: var(--gold-400); color: var(--brand-400); font-weight: 700; }
.btn--gold:hover { background: var(--gold-600); color: #fff; }
.btn--outline {
  background: var(--bg-secondary);
  border-color: var(--border-md);
  color: var(--text-primary);
}
.btn--outline:hover { background: var(--bg-tertiary); }
.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover { background: var(--bg-tertiary); }
.btn--danger { background: var(--coral-400); color: #fff; }
.btn--danger:hover { background: var(--coral-600); }
.btn--sm  { padding: 6px 12px; font-size: 0.8rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Back button ────────────────────────────────────── */
.btn--back {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer;
  transition: all 0.2s; flex-shrink: 0;
}
.btn--back:hover {
  background: var(--brand-50);
  border-color: var(--brand-400);
  color: var(--brand-400);
  transform: translateX(-2px);
}

/* ─── Cards ──────────────────────────────────────────── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ─── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 500;
  padding: 3px 9px; border-radius: 20px;
}
.badge--lost     { background: var(--coral-50);  color: var(--coral-600); }
.badge--found    { background: var(--brand-50);  color: var(--brand-400); }
.badge--verified { background: var(--gold-50);   color: var(--gold-600);  }

/* ─── Forms ──────────────────────────────────────────── */
.form-group   { display: flex; flex-direction: column; gap: 6px; }
.form-label   { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: var(--font);
  background: var(--bg-secondary);
  color: var(--text-primary);
  outline: none; transition: border-color 0.15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--brand-400); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint  { font-size: 0.78rem; color: var(--text-muted); }
.form-error { font-size: 0.78rem; color: var(--coral-600); display: none; }
.form-error.visible { display: block; }

/* ─── Toast ──────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem;
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--brand-400); color: #fff;
  padding: 10px 20px; border-radius: var(--radius-md);
  font-size: 0.875rem; opacity: 0;
  transition: all 0.25s; z-index: 999;
}
.toast--show    { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--success { background: var(--brand-600); color: #fff; }
.toast--error   { background: var(--coral-600); color: #fff; }

/* ─── Avatar ─────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-400); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar--sm { width: 28px; height: 28px; font-size: 0.72rem; }
.avatar--md { width: 38px; height: 38px; font-size: 0.85rem; }
.avatar--lg { width: 52px; height: 52px; font-size: 1rem;    }

/* ─── Empty state ────────────────────────────────────── */
.empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* ─── Divider ────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ─── Skeleton ───────────────────────────────────────── */
.skeleton {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  .hide-mobile { display: none; }
}