@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ── Modern real-estate luxe: charcoal + antique gold on warm ivory ── */
  --bg: #f6f3ec;
  --surface: #ffffff;
  --surface-2: #faf7f0;
  --border: #e7e0d3;
  --border-strong: #d6cdbb;
  --ink: #1b1712;          /* warm near-black */
  --ink-soft: #3a342c;
  --muted: #847b6d;        /* warm grey */
  --accent: #9a7434;       /* antique gold — links, active, accents (AA on white) */
  --accent-ink: #ffffff;
  --gold: #b8924f;         /* brighter gold — decorative hairlines / hover */
  --gold-soft: #f2ead8;    /* gold tint surface */
  --primary: #211c15;      /* charcoal — primary buttons */
  --primary-hover: #363025;
  --good: #16a34a;
  --warn: #ca8a04;
  --bad: #dc2626;
  --shadow: 0 1px 2px rgba(33,28,21,0.05), 0 6px 22px rgba(33,28,21,0.06);
  --shadow-lg: 0 18px 50px rgba(33,28,21,0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; margin: 0; color: var(--ink); }
h1 { font-size: 32px; font-weight: 600; line-height: 1.12; }
h2 { font-size: 23px; font-weight: 600; line-height: 1.2; }
h3 { font-size: 16px; font-weight: 600; font-family: var(--font-sans); letter-spacing: -0.005em; }

/* Small uppercase eyebrow / kicker */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Layout */
.topbar {
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.topbar .brand span { color: var(--accent); }
.topbar nav { display: flex; gap: 26px; }
.topbar nav a { color: var(--muted); font-weight: 500; position: relative; padding: 4px 0; }
.topbar nav a:hover { color: var(--ink); text-decoration: none; }
.topbar nav a.active { color: var(--ink); }
.topbar nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--gold); border-radius: 2px;
}
.topbar .user { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.topbar .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(184,146,79,0.5);
}

/* User dropdown menu — opens from the avatar in the topbar */
.user-menu { position: relative; display: inline-block; }
.user-menu-trigger {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 8px 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  color: var(--ink);
  transition: background 0.12s, border-color 0.12s;
}
.user-menu-trigger:hover { background: var(--surface-2); border-color: var(--border); }
.user-menu-name { color: var(--muted); font-size: 14px; font-weight: 500; }
.user-menu-avatar { width: 32px; height: 32px; flex-shrink: 0; }
.user-menu-caret { color: var(--muted); font-size: 11px; transition: transform 0.12s; }
.user-menu[data-open="true"] .user-menu-caret { transform: rotate(180deg); }
.user-menu[data-open="true"] .user-menu-trigger { background: var(--surface-2); border-color: var(--border); }

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 200;
  display: none;
}
.user-menu[data-open="true"] .user-menu-dropdown { display: block; }

.user-menu-header {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.user-menu-header-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.user-menu-header-email { color: var(--muted); font-size: 12px; margin-top: 2px; word-break: break-all; }

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.user-menu-item:hover { background: var(--surface-2); text-decoration: none; }
.user-menu-icon { font-size: 14px; width: 18px; flex-shrink: 0; text-align: center; }
.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}
.user-menu-logout { color: var(--bad); }
.user-menu-logout:hover { background: #fef2f2; }

.container { max-width: 1200px; margin: 0 auto; padding: 32px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s, border-color 0.14s, transform 0.06s, box-shadow 0.14s;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.gold { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.gold:hover { background: #876228; border-color: #876228; }
.btn.good { background: var(--good); color: white; border-color: var(--good); }
.btn.bad { background: white; color: var(--bad); border-color: #e7b9b9; }
.btn.bad:hover { background: #fef2f2; border-color: var(--bad); }
.btn.sm { padding: 6px 11px; font-size: 13px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-row { display: flex; gap: 20px; }
.card-row .card { flex: 1; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Folders grid */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.folder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.folder:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
.folder .icon { font-size: 28px; margin-bottom: 8px; }
.folder .name { font-weight: 600; }
.folder .count { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Post queue */
.queue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.12s, box-shadow 0.12s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.post-card .preview {
  width: 100%;
  aspect-ratio: 1;
  background: #ece6da center/cover;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px;
}
.post-card .meta {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.post-card .day { font-weight: 600; font-size: 14px; }
.post-card .theme { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.post-card .caption {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  max-height: 120px;
  overflow: hidden;
}
.post-card .actions {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}
.post-card .actions .btn { flex: 1; justify-content: center; }

.post-card[data-status="approved"] { border-color: #16a34a; box-shadow: 0 0 0 1px rgba(22,163,74,0.25); }
.post-card[data-status="approved"] .actions { background: #f0fdf4; }
.post-card[data-status="rejected"] { opacity: 0.55; }
.post-card[data-status="rejected"] .actions { background: #fef2f2; }
.post-card .card-status {
  display: none;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border-top: 1px solid var(--border);
}
.post-card[data-status="approved"] .card-status { display: block; background: #d1fae5; color: #065f46; }
.post-card[data-status="rejected"] .card-status { display: block; background: #fee2e2; color: #991b1b; }
.post-card[data-status="approved"] .approve-btn,
.post-card[data-status="rejected"] .reject-btn { opacity: 0.5; }

/* ---- Modal / lightbox overlays (shared across all pages) ---- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 23, 18, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  overflow-y: auto;
  animation: overlay-fade 0.15s ease-out;
}
@keyframes overlay-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.overlay-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: overlay-pop 0.18s ease-out;
}
@keyframes overlay-pop {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.overlay-card h3 { margin: 0 0 8px; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge.draft { background: #fef3c7; color: #92400e; }
.badge.approved { background: #d1fae5; color: #065f46; }
.badge.auto { background: var(--gold-soft); color: #836022; }
.badge.posted { background: #efece4; color: #4a4438; }

/* Section header */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  margin-bottom: 10px;
}
.section-head h2 { margin: 0; }

/* Listings table */
table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
tr:hover td { background: var(--surface-2); }

/* Listing site (public) */
.hero {
  position: relative;
  height: 64vh;
  min-height: 420px;
  background: #1b1712 center/cover;
  display: flex; align-items: flex-end;
  color: white;
  padding: 48px;
}
.hero .gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.88));
}
.hero .content { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; width: 100%; }
.hero h1 { font-size: 44px; color: #fff; }
.hero .price { font-family: var(--font-display); font-size: 30px; font-weight: 600; margin-top: 8px; color: var(--gold); }
.hero .specs { margin-top: 12px; display: flex; gap: 22px; font-size: 15px; opacity: 0.95; }

.listing-body { max-width: 1200px; margin: 0 auto; padding: 48px; }
.listing-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 36px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.gallery img:hover { transform: scale(1.015); box-shadow: var(--shadow); }
.map-placeholder {
  background: #ece6da;
  height: 280px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  margin-top: 16px;
}
.poi-list { list-style: none; padding: 0; margin: 8px 0 0; }
.poi-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; display: flex; justify-content: space-between; }
.poi-list li:last-child { border: none; }

/* Landing */
.landing-hero {
  text-align: center;
  padding: 92px 32px 48px;
}
.landing-hero h1 { font-size: 56px; max-width: 760px; margin: 0 auto; line-height: 1.08; }
.landing-hero p { font-size: 18px; color: var(--muted); margin: 18px auto 32px; max-width: 600px; line-height: 1.6; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 32px;
}
.feature { padding: 26px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform 0.12s, box-shadow 0.12s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature .icon { font-size: 28px; }
.feature h3 { margin: 12px 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ============================================================
   MODERN LAYER — aurora atmosphere, glass, motion, tiles.
   Shared across every page that links styles.css.
   ============================================================ */

/* Soft warm aurora glow anchored to the top of every page */
html { background: var(--bg); }
body {
  background:
    radial-gradient(760px 400px at 6% -8%, rgba(184,146,79,0.13), transparent 70%),
    radial-gradient(680px 360px at 97% -12%, rgba(212,165,116,0.10), transparent 72%),
    var(--bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Glassmorphism surface */
.glass {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* Reusable aurora field (place inside a position:relative, overflow:hidden parent) */
.aurora { position: absolute; inset: -25% -10% auto -10%; height: 520px; z-index: 0; filter: blur(70px); opacity: 0.85; pointer-events: none; }
.aurora b { position: absolute; display: block; border-radius: 50%; }
.aurora .a1 { width: 440px; height: 440px; left: -20px; top: -40px; background: radial-gradient(circle, rgba(184,146,79,0.5), transparent 65%); animation: au1 19s ease-in-out infinite; }
.aurora .a2 { width: 400px; height: 400px; right: 6%; top: -30px; background: radial-gradient(circle, rgba(212,165,116,0.42), transparent 66%); animation: au2 23s ease-in-out infinite; }
.aurora .a3 { width: 360px; height: 360px; left: 42%; top: 90px; background: radial-gradient(circle, rgba(95,140,135,0.26), transparent 68%); animation: au3 27s ease-in-out infinite; }
@keyframes au1 { 50% { transform: translate(50px, 36px) scale(1.08); } }
@keyframes au2 { 50% { transform: translate(-44px, 44px) scale(1.06); } }
@keyframes au3 { 50% { transform: translate(34px, -26px) scale(1.1); } }

/* Gradient-gold accent text */
.grad-gold {
  background: linear-gradient(100deg, #b8924f 0%, #9a7434 45%, #caa25f 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Modern page header (app pages): eyebrow + serif title + subtitle */
.page-head-modern { position: relative; }
.page-head-modern .eyebrow { display: block; margin-bottom: 8px; }

/* Pill chip (status / label) */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.7); border: 1px solid var(--border-strong);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 6px 13px 6px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(184,146,79,0.2); }

/* Bento / tile grid */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.tile .ico {
  width: 44px; height: 44px; border-radius: 13px; background: var(--gold-soft); color: #8a6628;
  display: grid; place-items: center; margin-bottom: 15px;
}
.tile .ico svg { width: 22px; height: 22px; }
.tile.span2 { grid-column: span 2; } .tile.span3 { grid-column: span 3; } .tile.span4 { grid-column: span 4; }

/* Line-icon badge (replaces emoji square) */
.iconbadge { width: 40px; height: 40px; border-radius: 11px; background: var(--gold-soft); color: #8a6628; display: inline-grid; place-items: center; flex-shrink: 0; }
.iconbadge svg { width: 20px; height: 20px; }

/* Scroll-reveal motion */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Primary button gets soft depth + lift (cascades to .btn.primary everywhere) */
.btn.primary { box-shadow: 0 8px 22px rgba(33,28,21,0.16); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(33,28,21,0.22); }
.btn.primary:active { transform: translateY(1px); }

/* Softer, friendlier global focus ring (low specificity so page styles still win) */
:where(input, textarea, select):focus-visible {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(154,116,52,0.16);
}

/* Cards round a touch more for the modern feel */
.card { border-radius: 16px; }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile.span2, .tile.span3, .tile.span4 { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora b, .reveal { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
