/* ===== RESET & ROOT ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --success: #10b981;
  --danger: #f43f5e;
  --warning: #f59e0b;
  --purple: #a855f7;
  --bg: #eef0fb;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --sidebar-w: 260px;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(99,102,241,0.08);
}

/* ===== DARK MODE ===== */
body.dark {
  --primary: #1e1b4b;
  --primary-light: #312e81;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --success: #34d399;
  --danger: #fb7185;
  --warning: #fbbf24;
  --purple: #c084fc;
  --bg: #0f172a;
  --card: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --shadow: 0 2px 16px rgba(0,0,0,0.3);
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 8px 12px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  letter-spacing: 0.5px;
}

.sidebar-brand i { color: var(--accent); font-size: 1.5rem; }

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 24px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
}

.nav-item i { width: 18px; text-align: center; font-size: 1rem; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; }

.badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}
.badge[data-count="0"], .badge:empty { display: none; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
}

.avatar {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 0.85rem;
  flex-shrink: 0;
}

.user-name { color: #fff; font-size: 0.88rem; font-weight: 600; }
.user-role { color: rgba(255,255,255,0.5); font-size: 0.75rem; }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== TOPBAR ===== */
.topbar {
  background: var(--card);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, #6366f1, #a855f7, #f43f5e) 1;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
}

.topbar-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  max-width: 420px;
}

.topbar-search i { color: var(--text-muted); }
.topbar-search input { border: none; background: none; outline: none; font-size: 0.9rem; width: 100%; color: var(--text); }

.topbar-actions { display: flex; gap: 8px; margin-left: auto; }

.icon-btn {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  transition: all 0.2s;
}
.icon-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--card);
}
.dot.hidden { display: none; }

/* ===== SECTIONS ===== */
.section { display: none; padding: 28px; }
.section.active { display: block; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}
.page-header p { color: var(--text-muted); font-size: 0.9rem; margin-top: 2px; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  color: #fff;
}

.stat-card.blue  { background: linear-gradient(135deg, #6366f1, #818cf8); }
.stat-card.red   { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.stat-card.green { background: linear-gradient(135deg, #10b981, #34d399); }
.stat-card.purple{ background: linear-gradient(135deg, #a855f7, #c084fc); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.stat-card.blue .stat-icon,
.stat-card.red .stat-icon,
.stat-card.green .stat-icon,
.stat-card.purple .stat-icon { background: rgba(255,255,255,0.2); color: #fff; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.8rem; font-weight: 700; line-height: 1; color: #fff; }
.stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.8); margin-top: 4px; }

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-header h3 { font-size: 1rem; font-weight: 600; }

/* ===== ACTIVITY LIST ===== */
.activity-list { display: flex; flex-direction: column; gap: 10px; }

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.88rem;
  border-left: 3px solid var(--border);
  transition: border-color 0.2s;
}
.activity-item:has(.activity-dot.lost) { border-color: var(--danger); }
.activity-item:has(.activity-dot.found) { border-color: var(--success); }
.activity-item:has(.activity-dot.returned) { border-color: var(--purple); }

.activity-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-dot.lost { background: var(--danger); }
.activity-dot.found { background: var(--success); }
.activity-dot.returned { background: var(--purple); }

.activity-meta { margin-left: auto; color: var(--text-muted); font-size: 0.78rem; }

/* ===== MATCH LIST ===== */
.match-list { display: flex; flex-direction: column; gap: 10px; }

.match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.88rem;
}

.match-score {
  background: rgba(16,185,129,0.12);
  color: var(--success);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 20px;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.filter-select {
  padding: 7px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
}

/* ===== ITEMS GRID ===== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.item-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.item-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.item-card-img {
  height: 160px;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(168,85,247,0.1));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  color: var(--accent);
  overflow: hidden;
}

.item-card-img img { width: 100%; height: 100%; object-fit: cover; }

.item-card-body { padding: 16px; }

.item-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.item-card-name { font-weight: 600; font-size: 0.95rem; }

.status-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-tag.Lost { background: rgba(244,63,94,0.12); color: var(--danger); }
.status-tag.Found { background: rgba(16,185,129,0.12); color: var(--success); }
.status-tag.Returned { background: rgba(168,85,247,0.12); color: var(--purple); }

.item-card-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.item-card-meta span { display: flex; align-items: center; gap: 6px; }

.item-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--border); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
}
.link-btn:hover { text-decoration: underline; }

/* ===== FORM CARD ===== */
.form-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 760px;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, #6366f1, #a855f7, #f43f5e) 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { margin-bottom: 16px; }

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-group textarea { resize: vertical; }

.upload-area {
  border: 2px dashed var(--accent);
  border-radius: 10px;
  padding: 36px 28px;
  text-align: center;
  cursor: pointer;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(168,85,247,0.05));
  transition: all 0.2s;
}
.upload-area:hover {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(168,85,247,0.12));
  border-color: var(--purple);
  color: var(--purple);
  transform: translateY(-2px);
}
.upload-area i { font-size: 2rem; margin-bottom: 8px; display: block; }
.upload-area p { font-size: 0.85rem; }

.image-preview {
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  max-height: 200px;
}
.image-preview img { width: 100%; object-fit: cover; }


/* ===== NOTIFICATIONS ===== */
.notif-list { display: flex; flex-direction: column; gap: 10px; max-width: 700px; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
  transition: opacity 0.3s;
}

.notif-item.unread { border-color: var(--accent); background: rgba(99,102,241,0.04); }
.notif-item.read { opacity: 0.6; }

.notif-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.notif-icon.match { background: rgba(16,185,129,0.12); color: var(--success); }
.notif-icon.verify { background: rgba(99,102,241,0.12); color: var(--accent); }
.notif-icon.chat { background: rgba(168,85,247,0.12); color: var(--purple); }

.notif-body { flex: 1; }
.notif-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 3px; }
.notif-desc { font-size: 0.82rem; color: var(--text-muted); }
.notif-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ===== CHAT ===== */
.chat-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: calc(100vh - 200px);
  overflow: hidden;
}

.chat-sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.chat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.chat-search input {
  border: none;
  outline: none;
  font-size: 0.88rem;
  width: 100%;
  color: var(--text);
  background: transparent;
}

.conversation-list { flex: 1; overflow-y: auto; }

.convo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.convo-item:hover, .convo-item.active { background: var(--bg); }

.convo-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.convo-info { flex: 1; min-width: 0; }
.convo-name { font-weight: 600; font-size: 0.88rem; }
.convo-preview { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-time { font-size: 0.72rem; color: var(--text-muted); }
.convo-unread { background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 2px 6px; border-radius: 10px; }

/* ===== CHAT WINDOW ===== */
.chat-window {
  display: flex;
  flex-direction: column;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
}

.chat-empty i { font-size: 3rem; opacity: 0.3; }

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-info { flex: 1; }
.chat-header-name { font-weight: 600; font-size: 0.95rem; }
.chat-header-item { font-size: 0.78rem; color: var(--text-muted); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: 65%;
}

.msg.sent { align-self: flex-end; align-items: flex-end; }
.msg.received { align-self: flex-start; align-items: flex-start; }

.msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.msg.sent .msg-bubble { background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.msg.received .msg-bubble { background: #ffffff; color: #111827; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; }

.msg-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; padding: 0 4px; }

.chat-input-area {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input-area input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  outline: none;
  font-size: 0.88rem;
  background: var(--bg);
  transition: border-color 0.2s;
}

.chat-input-area input:focus { border-color: var(--accent); }

.send-btn {
  width: 40px; height: 40px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.send-btn:hover { background: var(--accent-hover); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--border); }

.modal-item-img {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(168,85,247,0.1));
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 20px;
  overflow: hidden;
}

.modal-item-img img { width: 100%; height: 100%; object-fit: cover; }

.modal-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }

.modal-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.modal-meta span { display: flex; align-items: center; gap: 8px; }
.modal-meta i { width: 16px; color: var(--accent); }

.modal-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  padding: 14px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 20px;
}

.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--primary);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.3s ease;
  max-width: 340px;
}

.toast.hidden { display: none; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--accent); }

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

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; opacity: 0.3; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 0.9rem; }

/* ===== UTILITY ===== */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .menu-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .section { padding: 16px; }
}

/* ===== PROFILE ===== */
.profile-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Hero card (avatar panel) */
.profile-hero-card {
  width: 240px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.profile-hero-bg {
  height: 80px;
  background: linear-gradient(135deg, #6366f1, #a855f7, #f43f5e);
}

.profile-hero-body {
  background: var(--card);
  padding: 0 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.profile-avatar-wrap {
  position: relative;
  margin-top: -44px;
  margin-bottom: 4px;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid var(--card);
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-avatar-edit-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--card);
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.profile-avatar-edit-btn:hover { background: var(--accent-hover); }

.profile-avatar-name { font-weight: 700; font-size: 1.05rem; }
.profile-avatar-role { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

.profile-stats {
  display: flex;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}

.profile-stat {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.profile-stat:not(:last-child) { border-right: 1px solid var(--border); }
.profile-stat-val { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.profile-stat-label { font-size: 0.72rem; color: var(--text-muted); }

/* Info card */
.profile-info-card {
  flex: 1;
  min-width: 280px;
}

.profile-info-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.profile-info-item > i {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(99,102,241,0.1);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.profile-info-item > div { display: flex; flex-direction: column; gap: 2px; }
.profile-info-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.profile-info-val { font-size: 0.9rem; font-weight: 500; color: var(--text); }

.profile-bio-block {
  padding: 14px;
  background: var(--bg);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-bio-block p { font-size: 0.9rem; line-height: 1.6; color: var(--text); }

@media (max-width: 768px) {
  .profile-layout { flex-direction: column; }
  .profile-hero-card { width: 100%; }
  .profile-info-grid { grid-template-columns: 1fr; }
}



/* ===== REPORT SECTION ===== */
#section-report {
  background: linear-gradient(160deg, rgba(99,102,241,0.06) 0%, rgba(168,85,247,0.06) 50%, rgba(244,63,94,0.04) 100%);
  min-height: calc(100vh - 70px);
}

.report-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #6366f1, #a855f7, #f43f5e);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 28px;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.report-hero::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  top: -100px; right: -60px;
}

.report-hero-text h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: none;
  margin-bottom: 6px;
}

.report-hero-text p {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

.report-hero-icons {
  display: flex;
  gap: 16px;
  font-size: 2rem;
  color: rgba(255,255,255,0.3);
  position: relative;
  z-index: 1;
}

.report-hero-icons i:nth-child(2) { color: rgba(255,255,255,0.5); font-size: 2.6rem; }

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, #6366f1, #a855f7) 1;
}

/* ===== LISTINGS SECTION ===== */
#section-listings {
  background: linear-gradient(160deg, rgba(99,102,241,0.06) 0%, rgba(168,85,247,0.06) 50%, rgba(16,185,129,0.04) 100%);
  min-height: calc(100vh - 70px);
}

.filter-bar .filter-btn {
  box-shadow: 0 1px 4px rgba(99,102,241,0.08);
}

.filter-bar .filter-btn:hover,
.filter-bar .filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.item-card-img {
  background: linear-gradient(135deg, rgba(99,102,241,0.13), rgba(168,85,247,0.13));
}

/* ===== CHAT INPUT DEFAULT STATE ===== */
.chat-input-default {
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.chat-input-default input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.chat-input-default .send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== AUTH PAGE ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
  padding: 24px;
}

.auth-card {
  background: var(--card);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 24px;
}
.auth-brand i { font-size: 1.6rem; }

.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background: var(--accent);
  color: #fff;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-login {
  width: 100%;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-login:hover { opacity: 0.9; transform: translateY(-1px); }

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input { width: 100%; padding-right: 44px !important; }
.pw-toggle {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 0.9rem; padding: 4px;
  transition: color 0.2s;
}
.pw-toggle:hover { color: var(--accent); }

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .auth-name-row { grid-template-columns: 1fr; }
}

/* Unverified lock overlay */
.section-lock {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  border-radius: 12px;
  color: #fff;
  text-align: center;
  padding: 24px;
}
.section-lock i { font-size: 2rem; color: var(--warning); }
.section-lock p { font-size: 0.95rem; max-width: 300px; }
.section.locked { position: relative; overflow: hidden; }

.stat-card.yellow { background: linear-gradient(135deg, #eab308, #facc15); }
.stat-card.yellow .stat-icon { background: rgba(255,255,255,0.2); color: #fff; }
.stat-card.yellow .stat-value,
.stat-card.yellow .stat-label { color: #fff; }

/* Subscription */
.sub-plan:hover { border-color: var(--accent) !important; }
.sub-plan.selected { border-color: var(--accent) !important; }
.pay-method-btn {
  padding: 8px 14px; border: 2px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); cursor: pointer; font-size: 0.85rem;
  transition: all 0.2s;
}
.pay-method-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(99,102,241,0.08); }
.sub-status-active { color: var(--success); font-weight: 600; }
.sub-status-inactive { color: var(--danger); font-weight: 600; }
