/* ============================================================
   style.css — SchoolSpare
   Soft green, friendly & warm, mobile-first
   Dark theme support, smooth animations
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Lato:wght@400;700&display=swap');

/* ── LIGHT THEME VARIABLES ───────────────────────────────── */
:root {
  --green-50:  #f0faf4;
  --green-100: #d9f2e3;
  --green-200: #b3e5c8;
  --green-300: #7dcca4;
  --green-400: #4caf7d;
  --green-500: #35955f;
  --green-600: #277a4c;
  --green-700: #1d5c38;

  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --white:    #ffffff;

  --amber:    #f59e0b;
  --red:      #ef4444;
  --red-light:#fee2e2;

  /* Semantic tokens — these flip in dark mode */
  --bg:           var(--white);
  --bg-secondary: var(--gray-50);
  --bg-card:      var(--white);
  --border:       var(--gray-200);
  --text:         var(--gray-800);
  --text-muted:   var(--gray-600);
  --text-faint:   var(--gray-400);
  --input-bg:     var(--white);
  --nav-bg:       var(--white);
  --nav-border:   var(--green-100);

  --font-head: 'Nunito', sans-serif;
  --font-body: 'Lato', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);

  --transition: 0.2s ease;
}

/* ── DARK THEME ───────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:           #0f172a;
  --bg-secondary: #1e293b;
  --bg-card:      #1e293b;
  --border:       #334155;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-faint:   #64748b;
  --input-bg:     #0f172a;
  --nav-bg:       #1e293b;
  --nav-border:   #334155;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);

  --green-50:  #0d2818;
  --green-100: #14532d;
  --green-200: #166534;
  --red-light: #450a0a;
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Disable blue tap highlight on mobile */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
input, textarea, select, button, a {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 4vw, 1.9rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p  { color: var(--text-muted); }

/* ── LAYOUT ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.section { padding: 40px 0; }

/* ── NAVBAR ───────────────────────────────────────────────── */
.navbar {
  background: var(--nav-bg);
  border-bottom: 2px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 12px;
}
.navbar-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--green-600);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.navbar-logo span.logo-icon {
  background: var(--green-500);
  color: var(--white);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-link {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--green-600); background: var(--green-50); }

.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--green-50);
  border: 1.5px solid var(--green-200);
  border-radius: var(--radius-xl);
  padding: 5px 12px 5px 6px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--green-700);
  transition: background 0.3s ease;
}
.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-400);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Dark mode toggle button */
.btn-theme {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.btn-theme:hover { color: var(--green-600); background: var(--green-50); }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition),
              box-shadow var(--transition), opacity var(--transition);
  white-space: nowrap;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--green-500);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(53,149,95,0.25);
}
.btn-primary:hover:not(:disabled) {
  background: var(--green-600);
  box-shadow: 0 4px 14px rgba(53,149,95,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--green-600);
  border: 2px solid var(--green-400);
}
.btn-outline:hover:not(:disabled) { background: var(--green-50); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
}
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text); }
.btn-sm  { font-size: 0.82rem; padding: 7px 14px; border-radius: var(--radius-sm); }
.btn-lg  { font-size: 1.05rem; padding: 13px 28px; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }
.btn-google {
  background: var(--bg-card);
  color: var(--text);
  border: 2px solid var(--border);
  font-weight: 700;
}
.btn-google:hover { background: var(--bg-secondary); }
.btn-google img { width: 18px; height: 18px; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--green-600) 0%, var(--green-400) 100%);
  padding: 52px 16px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Ccircle cx='30' cy='30' r='20' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/g%3E%3C/svg%3E") repeat;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { color: var(--white); font-size: clamp(1.7rem, 6vw, 2.6rem); margin-bottom: 10px; }
.hero p   { color: rgba(255,255,255,0.88); font-size: 1.05rem; margin-bottom: 28px; }

.search-bar {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gray-800);
  background: transparent;
}
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar button {
  background: var(--green-500);
  color: var(--white);
  border: none;
  padding: 0 22px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
}
.search-bar button:hover { background: var(--green-600); }

/* ── FILTER BAR ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 18px 0 8px;
}
.filter-bar select {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 30px 8px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), background 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-color: var(--bg-card);
}
.filter-bar select:focus { border-color: var(--green-400); }
.results-count { margin-left: auto; font-size: 0.88rem; color: var(--text-faint); font-weight: 600; }

/* ── LISTING GRID & CARDS ─────────────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding-bottom: 48px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
  animation: cardIn 0.35s ease both;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--green-50);
  position: relative;
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.card:hover .card-img-wrap img { transform: scale(1.04); }

.card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--green-300); font-size: 2.5rem; gap: 6px;
}
.card-img-placeholder span { font-size: 0.78rem; color: var(--text-faint); font-family: var(--font-head); }

.status-badge {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--font-head); font-weight: 700;
  font-size: 0.72rem; padding: 3px 9px;
  border-radius: var(--radius-xl);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.status-badge.active { background: var(--green-500); color: var(--white); }
.status-badge.sold   { background: var(--gray-600);  color: var(--white); }

.card-body {
  padding: 14px 16px 16px;
  flex: 1; display: flex; flex-direction: column; gap: 6px;
}
.card-school {
  font-family: var(--font-head); font-weight: 700;
  font-size: 0.95rem; color: var(--green-700);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--text-faint);
}
.card-meta span {
  background: var(--bg-secondary); padding: 2px 8px;
  border-radius: var(--radius-xl); font-weight: 600;
}
.card-title {
  font-size: 0.92rem; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; align-items: center;
  justify-content: space-between; margin-top: auto; padding-top: 8px;
}
.card-price {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.1rem; color: var(--green-600);
}
.card-price .free { color: var(--amber); }
.card-condition { font-size: 0.78rem; font-weight: 600; color: var(--text-faint); text-transform: capitalize; }

.btn-report-card {
  background: none; border: none; color: var(--text-faint);
  font-size: 0.78rem; cursor: pointer; padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-body);
}
.btn-report-card:hover { color: var(--red); background: var(--red-light); }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 64px 20px; grid-column: 1 / -1;
}
.empty-state i { font-size: 3.5rem; color: var(--green-200); margin-bottom: 16px; }
.empty-state h3 { color: var(--text-muted); margin-bottom: 8px; }
.empty-state p  { font-size: 0.9rem; }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-sheet {
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 640px; max-height: 92vh;
  overflow-y: auto; padding: 24px 20px 32px;
  transform: translateY(40px);
  transition: transform 0.3s ease, background 0.3s ease;
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }

@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal-sheet { border-radius: var(--radius-lg); max-height: 88vh; }
}

.modal-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 18px; gap: 12px;
}
.modal-header h2 { font-size: 1.2rem; }
.modal-close {
  background: var(--bg-secondary); border: none; border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; color: var(--text-muted);
  font-size: 1rem; flex-shrink: 0; transition: background var(--transition);
}
.modal-close:hover { background: var(--border); }

.modal-img {
  width: 100%; max-height: 280px; object-fit: cover;
  border-radius: var(--radius-md); margin-bottom: 16px;
}
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag {
  background: var(--green-50); color: var(--green-700);
  border: 1px solid var(--green-200); padding: 4px 12px;
  border-radius: var(--radius-xl); font-size: 0.82rem;
  font-weight: 600; font-family: var(--font-head);
}
.modal-price {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.6rem; color: var(--green-600); margin-bottom: 12px;
}
.modal-desc {
  font-size: 0.95rem; color: var(--text-muted);
  line-height: 1.7; margin-bottom: 18px; white-space: pre-wrap;
}
.modal-seller {
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
  margin-bottom: 18px; display: flex; align-items: center; gap: 12px;
}
.modal-seller-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--green-400); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}
.modal-seller-info p { font-size: 0.82rem; color: var(--text-faint); }
.modal-seller-info strong { font-size: 0.95rem; color: var(--text); }

.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.modal-actions .btn-whatsapp {
  background: #25D366; color: var(--white);
  font-family: var(--font-head); font-weight: 700;
  border-radius: var(--radius-md); font-size: 1rem;
}
.modal-actions .btn-whatsapp:hover { background: #1da851; }

/* ── REPORT MODAL ─────────────────────────────────────────── */
.report-form { display: flex; flex-direction: column; gap: 14px; }
.report-options { display: flex; flex-direction: column; gap: 10px; }
.report-option {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 0.95rem; color: var(--text-muted);
}
.report-option input[type="radio"] { accent-color: var(--green-500); width: 16px; height: 16px; }

/* ── TOAST ────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%); z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none;
}
.toast {
  background: var(--gray-800); color: var(--white);
  padding: 12px 22px; border-radius: var(--radius-xl);
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 320px; text-align: center;
}
.toast.success { background: var(--green-600); }
.toast.error   { background: var(--red); }
@keyframes toastIn  { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; } }

/* ── FORMS ────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-family: var(--font-head); font-weight: 700;
  font-size: 0.9rem; color: var(--text-muted);
}
.form-group label .required { color: var(--red); margin-left: 2px; }
.form-group input,
.form-group select,
.form-group textarea {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-family: var(--font-body); font-size: 0.97rem;
  color: var(--text); background: var(--input-bg);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background 0.3s ease;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px rgba(76,175,125,0.15);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-hint  { font-size: 0.8rem; color: var(--text-faint); margin-top: -2px; }
.form-error { font-size: 0.82rem; color: var(--red); font-weight: 600; }

/* Phone row */
.phone-row {
  display: flex; gap: 8px; align-items: flex-start;
}
.phone-row .country-select-wrap {
  flex: 0 0 auto; width: 160px;
}
.phone-row .number-input-wrap { flex: 1; }

/* Upload zone */
.upload-zone {
  border: 2.5px dashed var(--green-300);
  border-radius: var(--radius-lg);
  padding: 28px 16px; text-align: center;
  background: var(--green-50); cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--green-500); background: var(--green-100);
}
.upload-zone i { font-size: 2.2rem; color: var(--green-400); margin-bottom: 8px; }
.upload-zone p { font-size: 0.9rem; color: var(--text-muted); }
.upload-zone small { font-size: 0.78rem; color: var(--text-faint); margin-top: 4px; display: block; }
.upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}

/* Camera / gallery buttons */
.upload-buttons {
  display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.upload-btn-option {
  flex: 1; min-width: 120px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--radius-md);
  border: 2px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); font-family: var(--font-head);
  font-weight: 700; font-size: 0.9rem; cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.upload-btn-option:hover {
  border-color: var(--green-400); color: var(--green-600);
  background: var(--green-50);
}
.upload-btn-option i { font-size: 1.2rem; }

.upload-preview { margin-top: 14px; position: relative; display: inline-block; }
.upload-preview img {
  width: 120px; height: 90px; object-fit: cover;
  border-radius: var(--radius-md); border: 2px solid var(--green-200);
}
.upload-preview-remove {
  position: absolute; top: -8px; right: -8px;
  background: var(--red); color: var(--white); border: none;
  border-radius: 50%; width: 24px; height: 24px;
  font-size: 0.75rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.upload-progress {
  height: 5px; background: var(--green-100);
  border-radius: 99px; margin-top: 10px; overflow: hidden;
}
.upload-progress-bar {
  height: 100%; background: var(--green-500);
  border-radius: 99px; width: 0%;
  transition: width 0.2s ease;
}

/* ── AUTH PAGE ────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(160deg, var(--green-50) 0%, var(--bg) 100%);
}
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 36px 28px; width: 100%; max-width: 420px;
  transition: background 0.3s ease;
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .logo-mark {
  width: 54px; height: 54px; background: var(--green-500);
  border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--white); margin-bottom: 10px;
}
.auth-logo h2 { font-size: 1.4rem; color: var(--green-700); }
.auth-logo p  { font-size: 0.88rem; color: var(--text-faint); margin-top: 4px; }

.auth-tabs {
  display: flex; background: var(--bg-secondary);
  border-radius: var(--radius-md); padding: 4px;
  margin-bottom: 24px; gap: 4px;
}
.auth-tab {
  flex: 1; padding: 9px; text-align: center;
  border-radius: var(--radius-sm);
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
  cursor: pointer; border: none; background: transparent;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.auth-tab.active {
  background: var(--bg-card); color: var(--green-700);
  box-shadow: var(--shadow-sm);
}
.auth-divider {
  display: flex; align-items: center; gap: 10px; margin: 18px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-divider span { font-size: 0.82rem; color: var(--text-faint); white-space: nowrap; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* ── DASHBOARD ────────────────────────────────────────────── */
.dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; padding: 28px 0 20px;
}
.dashboard-header h2 { font-size: 1.4rem; }
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 16px 18px; border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm); transition: background 0.3s ease;
}
.stat-card .stat-num {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.8rem; color: var(--green-600);
}
.stat-card .stat-label { font-size: 0.82rem; color: var(--text-faint); font-weight: 600; }

.my-listing-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1.5px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; gap: 14px; padding: 14px; align-items: flex-start;
  margin-bottom: 14px;
  transition: box-shadow var(--transition), background 0.3s ease;
  animation: cardIn 0.3s ease both;
}
.my-listing-card:hover { box-shadow: var(--shadow-md); }
.my-listing-thumb {
  width: 72px; height: 72px; border-radius: var(--radius-md);
  object-fit: cover; flex-shrink: 0; background: var(--green-50);
}
.my-listing-thumb-placeholder {
  width: 72px; height: 72px; border-radius: var(--radius-md);
  background: var(--green-50); display: flex; align-items: center;
  justify-content: center; color: var(--green-300);
  font-size: 1.6rem; flex-shrink: 0;
}
.my-listing-info { flex: 1; min-width: 0; }
.my-listing-info h4 { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-listing-info p  { font-size: 0.82rem; color: var(--text-faint); margin-top: 2px; }
.my-listing-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--green-600) 0%, var(--green-400) 100%);
  padding: 32px 16px 28px; color: var(--white);
}
.page-header h1 { color: var(--white); font-size: 1.5rem; }
.page-header p  { color: rgba(255,255,255,0.85); font-size: 0.92rem; margin-top: 4px; }

/* ── LISTING FORM ─────────────────────────────────────────── */
.listing-form-card {
  background: var(--bg-card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md); padding: 28px 22px;
  margin: 28px auto; max-width: 600px;
  transition: background 0.3s ease;
}
.listing-form-card .form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.listing-form-card .form-section-title {
  font-family: var(--font-head); font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--green-600); border-bottom: 2px solid var(--green-100);
  padding-bottom: 6px; margin: 20px 0 16px;
}
.listing-form-card .form-section-title:first-child { margin-top: 0; }

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-card); border-top: 2px solid var(--nav-border);
  padding: 24px 16px; text-align: center;
  transition: background 0.3s ease;
}
.footer p { font-size: 0.85rem; color: var(--text-faint); }
.footer a { color: var(--green-600); font-weight: 600; }
.footer a:hover { text-decoration: underline; }

/* ── SPINNER ──────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 22px; height: 22px;
  border: 3px solid rgba(255,255,255,0.35);
  border-top-color: var(--white); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner.green { border-color: var(--green-100); border-top-color: var(--green-500); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen { display: flex; align-items: center; justify-content: center; min-height: 200px; }

/* ── TERMS PAGE ───────────────────────────────────────────── */
.terms-content {
  max-width: 780px; margin: 0 auto; padding: 40px 20px 60px;
}
.terms-content h1 { margin-bottom: 8px; }
.terms-content .last-updated {
  font-size: 0.85rem; color: var(--text-faint); margin-bottom: 32px;
}
.terms-content h2 {
  font-size: 1.15rem; color: var(--green-700);
  margin: 32px 0 10px; border-bottom: 2px solid var(--green-100);
  padding-bottom: 6px;
}
.terms-content p  { margin-bottom: 14px; line-height: 1.75; }
.terms-content ul {
  list-style: disc; padding-left: 24px; margin-bottom: 14px;
}
.terms-content ul li { margin-bottom: 6px; color: var(--text-muted); line-height: 1.7; }

/* ── SMOOTH DROPDOWN ANIMATION ────────────────────────────── */
select {
  transition: border-color var(--transition), box-shadow var(--transition);
}
select:focus {
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px rgba(76,175,125,0.15);
  outline: none;
}

/* ── UTILITY ──────────────────────────────────────────────── */
.hidden       { display: none !important; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mt-24        { margin-top: 24px; }
.text-center  { text-align: center; }
.text-green   { color: var(--green-600); }
.text-red     { color: var(--red); }
.fw-bold      { font-weight: 700; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .auth-card { padding: 28px 18px; }
  .listing-form-card { margin: 16px auto; padding: 20px 16px; border-radius: var(--radius-lg); }
  .listing-form-card .form-row { grid-template-columns: 1fr; }
  .navbar-logo .logo-text { display: none; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .phone-row { flex-direction: column; }
  .phone-row .country-select-wrap { width: 100%; }
  .my-listing-actions { flex-direction: row; }
}