/* ============================================================
   Proplist — "Quiet luxury" PropTech design system
   Refined, trustworthy real-estate software.
   ============================================================ */

:root {
  /* --- Brand surfaces --- */
  --forest-900: #14241c;   /* deepest evergreen — brand panel base */
  --forest-800: #1c3026;   /* evergreen surface */
  --forest-700: #284536;   /* evergreen raised */
  --forest-600: #2f4f3d;   /* evergreen mid-raised */
  --forest-500: #3c5e4a;   /* mid evergreen */
  --forest-100: #e5ede7;   /* faint evergreen tint on light */

  /* --- Paper / light ground --- */
  --paper:      #f6f1e7;   /* warm bone/ivory page */
  --paper-2:    #efe8d9;   /* slightly deeper paper */
  --card:       #fffdf8;   /* near-white card with warmth */

  /* --- Accent (antique brass / muted terracotta) --- */
  --brass:      #b07d3f;   /* antique gold accent */
  --brass-dark: #946632;
  --clay:       #c0623f;   /* warm terracotta — used very sparingly */
  --brass-soft: #efe1c9;

  /* --- Ink --- */
  --ink:        #25302a;   /* charcoal-green ink */
  --ink-soft:   #5d6b62;   /* secondary text */
  --ink-faint:  #8a958c;   /* tertiary / hints */
  --on-dark:    #f3efe2;   /* text on forest */
  --on-dark-soft: #b9c5bc; /* secondary text on forest */

  /* --- Lines --- */
  --line:       #e3dccb;   /* hairline on light */
  --line-2:     #d6cdb8;   /* stronger hairline */
  --line-dark:  rgba(243, 239, 226, 0.14); /* hairline on forest */

  /* --- Status (tuned to palette) --- */
  --green:      #3f7a52;
  --green-bg:   #e4ede4;
  --amber:      #b07d3f;
  --amber-bg:   #f0e6cf;
  --red:        #b04a36;
  --red-bg:     #f1e0d6;

  /* --- Geometry --- */
  --radius:     12px;
  --radius-lg:  18px;
  --radius-sm:  8px;

  /* --- Shadows (soft, realistic) --- */
  --shadow-sm:  0 1px 2px rgba(20, 36, 28, 0.05),
                0 2px 6px rgba(20, 36, 28, 0.05);
  --shadow:     0 2px 4px rgba(20, 36, 28, 0.04),
                0 8px 20px rgba(20, 36, 28, 0.07);
  --shadow-lg:  0 6px 14px rgba(20, 36, 28, 0.08),
                0 24px 48px rgba(20, 36, 28, 0.16);

  /* --- Type --- */
  --serif: "Fraunces", "Spectral", Georgia, serif;
  --sans:  "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.18;
  font-weight: 540;
  letter-spacing: -0.012em;
  color: var(--ink);
}

a { color: var(--brass-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }

::selection { background: var(--brass); color: #fff; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s cubic-bezier(.2,.7,.3,1),
              box-shadow .18s ease, background-color .18s ease,
              border-color .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--brass);
}

.btn-primary {
  background: var(--forest-800);
  color: var(--on-dark);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--forest-700); box-shadow: var(--shadow); }

.btn-peach {
  background: var(--brass);
  color: #fff;
  box-shadow: 0 2px 6px rgba(176, 125, 63, 0.28);
}
.btn-peach:hover { background: var(--brass-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--forest-100); color: var(--ink); }

.btn-outline {
  background: var(--card);
  border-color: var(--line-2);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--forest-500); background: var(--card); }

.btn-danger {
  background: transparent;
  border-color: var(--red-bg);
  color: var(--red);
}
.btn-danger:hover { background: var(--red-bg); }

.btn-block { width: 100%; }
.btn-sm {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.84rem;
  border-radius: 8px;
}
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
}

/* ============================================================
   Forms
   ============================================================ */
label {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

input, select, textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 450;
  width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:hover, select:hover, textarea:hover { border-color: var(--forest-500); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--forest-700);
  box-shadow: 0 0 0 4px rgba(40, 69, 54, 0.10);
  background: #fff;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.6; }

/* custom select chevron */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path d='M3 5l4 4 4-4' fill='none' stroke='%235d6b62' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* custom file input */
input[type="file"] {
  padding: 0;
  border: 1.5px dashed var(--line-2);
  background: var(--paper-2);
  cursor: pointer;
}
input[type="file"]::file-selector-button {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.84rem;
  margin-right: 14px;
  padding: 12px 16px;
  border: none;
  border-right: 1.5px solid var(--line-2);
  background: var(--forest-100);
  color: var(--forest-700);
  cursor: pointer;
  transition: background-color .15s ease;
}
input[type="file"]:hover { border-color: var(--forest-500); }
input[type="file"]::file-selector-button:hover { background: #dde6df; }

/* custom checkbox */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  background: var(--card);
  cursor: pointer;
  position: relative;
  transition: background-color .15s ease, border-color .15s ease;
}
input[type="checkbox"]:checked {
  background: var(--forest-800);
  border-color: var(--forest-800);
}
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 7px; top: 3px;
  width: 5px; height: 10px;
  border: solid var(--on-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 69, 54, 0.18);
}

.hint { font-weight: 400; color: var(--ink-faint); font-size: 0.74rem; }
.row { display: flex; gap: 14px; }
.row > * { flex: 1; }

/* ============================================================
   Brand mark (shared SVG sizing)
   ============================================================ */
.logo-mark { display: block; flex: none; }

/* ============================================================
   Auth page — confident two-panel layout
   ============================================================ */
.auth-body {
  min-height: 100vh;
  background: var(--paper);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

/* --- Left brand panel --- */
.brand-panel {
  position: relative;
  background: var(--forest-900);
  color: var(--on-dark);
  padding: 32px 28px 36px;
  overflow: hidden;
  isolation: isolate;
}
/* layered tonal atmosphere */
.brand-panel::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(176,125,63,0.20), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(40,69,54,0.9), transparent 70%);
}
/* fine grain / texture */
.brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.5;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.45'/></svg>");
  mix-blend-mode: overlay;
  pointer-events: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-lockup .logo-mark { color: var(--brass); }
.wordmark {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 560;
  letter-spacing: -0.015em;
  color: var(--on-dark);
}
.wordmark .accent { color: var(--brass); }

.brand-copy { margin-top: auto; padding-top: 48px; }
.brand-eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}
.brand-headline {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 6vw, 2.15rem);
  line-height: 1.14;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--on-dark);
  margin-top: 14px;
}
.brand-headline em {
  font-style: italic;
  color: var(--brass);
}
.brand-sub {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--on-dark-soft);
  margin-top: 14px;
  max-width: 38ch;
}

.trust-list {
  list-style: none;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.trust-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--on-dark);
}
.trust-list .tick {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(176,125,63,0.55);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.trust-list .tick svg { display: block; color: var(--brass); }
.trust-list b { font-weight: 650; }
.trust-list span { color: var(--on-dark-soft); }

.brand-foot {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--on-dark-soft);
}

/* --- Right auth panel --- */
.auth-panel {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 20px 48px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px;
}
.auth-card-head { margin-bottom: 20px; }
.auth-card-head h2 {
  font-size: 1.5rem;
  font-weight: 540;
}
.auth-card-head p {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  margin-bottom: 22px;
}
.tab {
  flex: 1;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.tab.active {
  background: var(--card);
  color: var(--forest-800);
  box-shadow: var(--shadow-sm);
}

.auth-form .btn { margin-top: 8px; }
.foot-note {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.78rem;
  margin-top: 18px;
}
.legal-note {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin-top: 16px;
}
.legal-note svg { color: var(--green); flex: none; }

.msg {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(176,74,54,0.25);
  border-radius: 10px;
  padding: 11px 13px;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.msg.ok {
  background: var(--green-bg);
  color: var(--green);
  border-color: rgba(63,122,82,0.25);
}

/* --- Auth desktop two-panel --- */
@media (min-width: 860px) {
  .auth-shell {
    grid-template-columns: 1.05fr 1fr;
  }
  .brand-panel {
    display: flex;
    flex-direction: column;
    padding: 52px 56px;
  }
  .brand-copy { padding-top: 60px; }
  .auth-panel {
    align-items: center;
    padding: 48px;
  }
}

/* ============================================================
   App shell
   ============================================================ */
/* Shared centered container — keeps content readable while the
   colored bars themselves stay full-bleed. */
.app-header-inner,
.nav-inner {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.app-header {
  background: var(--forest-900);
  color: var(--on-dark);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 30;
}
.app-header-inner {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 560;
  letter-spacing: -0.015em;
  color: var(--on-dark);
}
.app-header .logo .logo-mark { color: var(--brass); }
.app-header .logo .accent { color: var(--brass); }

/* ---------- Account chip + dropdown ---------- */
.account { position: relative; }
.account-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--on-dark);
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.account-trigger:hover { background: var(--forest-700); }
.account-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(176, 125, 63, 0.5);
}
.account-trigger #user-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-avatar {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--brass);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.account-caret { color: var(--on-dark-soft); flex: none; }
.account-trigger[aria-expanded="true"] .account-caret { transform: rotate(180deg); }

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 184px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 40;
  animation: modal-in .18s cubic-bezier(.2,.7,.3,1) both;
}
.account-menu[hidden] { display: none; }
.account-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.account-menu-item:hover { background: var(--forest-100); }
.account-menu-item:focus-visible {
  outline: none;
  background: var(--forest-100);
  box-shadow: 0 0 0 2px var(--forest-500);
}
.account-menu-item.danger { color: var(--red); }
.account-menu-item.danger:hover { background: var(--red-bg); }
.account-menu-sep {
  height: 1px;
  background: var(--line);
  margin: 5px 4px;
}

.nav {
  background: var(--forest-800);
  width: 100%;
  position: sticky;
  top: 57px;
  z-index: 29;
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  padding: 0 12px;
}
.nav button {
  flex: 1;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  padding: 15px 6px 13px;
  border: none;
  background: none;
  color: var(--on-dark-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.nav button:hover { color: var(--on-dark); }
.nav button.active {
  color: var(--brass);
  border-bottom-color: var(--brass);
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 20px 64px;
}
.page { display: none; }
.page.active {
  display: block;
  animation: page-in .4s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-head { margin-bottom: 18px; }
.page-head h2 { font-size: 1.5rem; font-weight: 540; }
.page-head p {
  font-family: var(--sans);
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 4px;
}
.page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.page-head-row .btn { flex: none; }

/* ---------- Home stats ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 560;
  line-height: 1;
  color: var(--forest-800);
  letter-spacing: -0.02em;
}
.stat-label {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.home-see-all {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

/* ---------- Settings rows ---------- */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.setting-info { flex: 1; min-width: 220px; }
.setting-info h3 {
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 650;
}
.setting-info p { margin-top: 3px; }
.setting-info code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--forest-900);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  margin-bottom: 22px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(110% 90% at 92% 8%, rgba(176,125,63,0.22), transparent 58%);
}
.hero .hero-eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}
.hero h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--on-dark);
  margin-top: 10px;
  max-width: 22ch;
}
.hero p {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--on-dark-soft);
  margin-top: 8px;
  max-width: 42ch;
}
.hero .btn { margin-top: 18px; }

/* ---------- Listing cards ---------- */
#listings-list {
  display: grid;
  gap: 18px;
}
.listing-card {
  padding: 0;
  overflow: hidden;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease;
}
.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.listing-thumb {
  width: 100%;
  height: 188px;
  object-fit: cover;
  background: var(--forest-100);
  display: block;
}
.listing-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--forest-500);
  background:
    repeating-linear-gradient(45deg, var(--paper-2) 0 14px, var(--paper) 14px 28px);
}
.listing-body { padding: 18px 20px 20px; }
.listing-body h3 {
  font-size: 1.18rem;
  font-weight: 540;
  margin-top: 8px;
}
.listing-meta {
  font-family: var(--sans);
  color: var(--ink-soft);
  font-size: 0.82rem;
  margin: 4px 0 10px;
}
.listing-price {
  font-family: var(--serif);
  color: var(--forest-800);
  font-weight: 560;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.badge.draft  { background: var(--paper-2); color: var(--ink-soft); border: 1px solid var(--line); }
.badge.active { background: var(--green-bg); color: var(--green); }
.badge.sold,
.badge.rented { background: var(--brass-soft); color: var(--brass-dark); }

/* ---------- Post status pills ---------- */
.post-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid transparent;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pill.posted  { background: var(--green-bg); color: var(--green); border-color: rgba(63,122,82,0.2); }
.pill.posted  .dot { background: var(--green); }
.pill.pending { background: var(--amber-bg); color: var(--amber); border-color: rgba(176,125,63,0.22); }
.pill.pending .dot { background: var(--amber); }
.pill.failed  { background: var(--red-bg); color: var(--red); border-color: rgba(176,74,54,0.2); }
.pill.failed  .dot { background: var(--red); }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Connections ---------- */
.conn-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  transition: border-color .15s ease, box-shadow .18s ease;
}
.conn-card:hover { box-shadow: var(--shadow-lg); }

/* Verified-connection card: header row + optional 2FA code row */
.conn-card-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
  transition: border-color .15s ease, box-shadow .18s ease;
}
.conn-card-wrap:hover { box-shadow: var(--shadow-lg); }
.conn-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
}
.conn-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest-100);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.conn-info { flex: 1; min-width: 0; }
.conn-info h3 {
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 650;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.conn-info .conn-sub { font-size: 0.8rem; margin-top: 2px; }
.method-tag {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--forest-100);
  color: var(--forest-700);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 5px;
}
.conn-status {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
}
.conn-status.on  { color: var(--green); }
.conn-status.off { color: var(--ink-faint); }
.conn-status.bad   { color: var(--red); }
.conn-status.warn  { color: var(--amber); }
.conn-status.busy  { color: var(--ink-soft); }

/* Verified-connection extra states */
.conn-detail {
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--ink-soft);
  margin-top: 3px;
}
.conn-detail.bad  { color: var(--red); }
.conn-detail.warn { color: var(--amber); }

/* Inline 2FA code entry on a connection card */
.conn-code-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.conn-code-row input {
  flex: 1;
  min-width: 120px;
  margin-top: 0;
}
.conn-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }

/* Spinner used in the connect modal + verifying card */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid var(--line-2);
  border-top-color: var(--forest-700);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.conn-status.busy .spinner { width: 12px; height: 12px; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Connect modal: verifying + result + 2FA */
.connect-help {
  font-family: var(--sans);
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.verify-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  margin: 14px 0 4px;
}
.connect-result {
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 6px;
}
.connect-result.bad {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(176,74,54,0.25);
}
.connect-result.warn {
  background: var(--amber-bg);
  color: var(--brass-dark);
  border: 1px solid rgba(176,125,63,0.25);
}
.connect-result.ok {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(63,122,82,0.25);
}
.soon-tag {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--brass-soft);
  color: var(--brass-dark);
  padding: 4px 9px;
  border-radius: 6px;
  flex: none;
}
.conn-card:has(.soon-tag) { opacity: 0.72; }

/* ---------- Composer ---------- */
.platform-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: 11px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.platform-check:hover { border-color: var(--forest-500); }
.platform-check.checked {
  border-color: var(--forest-700);
  background: var(--forest-100);
}
.platform-check .pc-label {
  flex: 1;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
}
.platform-check .pc-icon { font-size: 1.25rem; }

.preview-block {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.preview-block h4 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 7px;
}
.preview-text {
  white-space: pre-wrap;
  font-family: var(--sans);
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px;
  margin: 10px 0;
  max-height: 240px;
  overflow-y: auto;
}

/* ---------- Photos ---------- */
.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.photo-preview img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
}

/* ---------- Misc ---------- */
.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 52px 24px;
  font-family: var(--sans);
  font-size: 0.92rem;
  background: var(--card);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
}
.empty .big {
  font-size: 2rem;
  display: flex;
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  align-items: center;
  justify-content: center;
  background: var(--forest-100);
  border-radius: 50%;
}
.empty strong { color: var(--forest-800); font-weight: 650; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--forest-900);
  color: var(--on-dark);
  font-family: var(--sans);
  padding: 13px 20px;
  border-radius: 11px;
  font-size: 0.86rem;
  font-weight: 500;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
  border: 1px solid var(--line-dark);
  animation: toast-in .28s cubic-bezier(.2,.7,.3,1) both;
}
.toast.err {
  background: #3a1f19;
  border-color: rgba(176,74,54,0.4);
  color: #f1d9d0;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.section-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin: 22px 0 12px;
}
.section-label:first-child { margin-top: 0; }

.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.muted {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.84rem;
}

/* ---------- Connect modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 36, 28, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 400px;
  margin-bottom: 0;
  animation: modal-in .26s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-card h2 { font-size: 1.22rem; font-weight: 540; }
.modal-lock {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--green-bg);
  border: 1px solid rgba(63,122,82,0.22);
  border-radius: 9px;
  padding: 10px 12px;
  margin: 12px 0 18px;
}
.modal-lock svg { color: var(--green); flex: none; margin-top: 1px; }

/* ---------- Staggered reveal on load ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal-up .55s cubic-bezier(.2,.7,.3,1) forwards;
}
.reveal-1 { animation-delay: .05s; }
.reveal-2 { animation-delay: .13s; }
.reveal-3 { animation-delay: .21s; }
.reveal-4 { animation-delay: .29s; }
@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-delay: 0s !important;
    transition-duration: .001s !important;
  }
}

/* ============================================================
   Co-broke / Sharing / Enquiries / Public browse
   ============================================================ */

/* --- Listing form: checkbox rows --- */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.check-row input[type="checkbox"] { margin-top: 2px; }
.check-row .check-text { display: flex; flex-direction: column; gap: 2px; }
.check-row .check-text strong {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink);
}
.check-row .check-text .hint { font-size: 0.76rem; }

/* --- Listing form: AI title generator --- */
.title-block { margin-bottom: 16px; }
.title-ai-toggle { margin-bottom: 14px; }
#title-manual-field { margin-bottom: 0; }
.title-ai-label {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}
.title-ai-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.title-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.title-options:empty { margin-top: 0; }
.title-option {
  text-align: left;
  width: 100%;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line-2);
  border-radius: 11px;
  padding: 13px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.title-option:hover { border-color: var(--forest-500); }
.title-option .title-option-tick {
  flex: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s ease, background-color .15s ease;
}
.title-option .title-option-tick::after {
  content: "";
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .15s ease;
}
.title-option.selected {
  border-color: var(--brass);
  background: var(--brass-soft);
  box-shadow: 0 0 0 3px rgba(176, 125, 63, 0.12);
}
.title-option.selected .title-option-tick {
  border-color: var(--brass);
  background: var(--brass);
}
.title-option.selected .title-option-tick::after { transform: rotate(45deg) scale(1); }
.title-option:focus-visible {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(176, 125, 63, 0.22);
}
.title-option-text { flex: 1; }

/* --- Listing form: AI description generator --- */
.desc-block { margin-bottom: 16px; }
.desc-ai-toggle { margin-bottom: 14px; }
#desc-manual-field { margin-bottom: 0; }
#desc-notes-field { margin-bottom: 0; }
#desc-notes { min-height: 70px; }
.desc-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.desc-options:empty { margin-top: 0; }
.desc-option {
  text-align: left;
  width: 100%;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 450;
  line-height: 1.6;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line-2);
  border-radius: 11px;
  padding: 14px 15px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.desc-option:hover { border-color: var(--forest-500); }
.desc-option .title-option-tick { margin-top: 2px; }
.desc-option-text {
  flex: 1;
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
}
.desc-option.selected {
  border-color: var(--brass);
  background: var(--brass-soft);
  box-shadow: 0 0 0 3px rgba(176, 125, 63, 0.12);
}
.desc-option.selected .title-option-tick {
  border-color: var(--brass);
  background: var(--brass);
}
.desc-option.selected .title-option-tick::after { transform: rotate(45deg) scale(1); }
.desc-option:focus-visible {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(176, 125, 63, 0.22);
}

/* --- Stat card as a button (Home enquiries) --- */
.stat-card-link {
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
  transition: transform .15s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease;
}
.stat-card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-card-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--brass);
}

/* --- Filter bar (co-broke + public browse) --- */
.filter-bar { padding: 18px 20px; }
.filter-row { display: flex; gap: 14px; flex-wrap: wrap; }
.filter-row > label { flex: 1; min-width: 160px; margin-bottom: 0; }

/* --- Co-broke board --- */
#cobroke-list,
#enquiries-list {
  display: grid;
  gap: 18px;
}
.badge.mine {
  background: var(--brass-soft);
  color: var(--brass-dark);
}
.cobroke-agent {
  margin-top: 12px;
  font-family: var(--sans);
}
.cobroke-agent-name {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--forest-700);
}
.cobroke-note {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.84rem;
  color: var(--ink);
  background: var(--forest-100);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 8px;
  padding: 10px 12px;
}
.cobroke-contact {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cobroke-contact-line,
.enquiry-contact {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.cobroke-contact-line strong,
.enquiry-contact strong { color: var(--ink); }

/* --- Enquiry cards --- */
.enquiry-card .enquiry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.enquiry-message {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  white-space: pre-wrap;
}
.enquiry-contact { margin-top: 10px; }

/* ============================================================
   Public browse page
   ============================================================ */
.public-header {
  background: var(--forest-900);
  color: var(--on-dark);
  width: 100%;
}
.public-header-inner {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.public-header .logo-mark { color: var(--brass); }
.public-header .wordmark { font-size: 1.16rem; }
.public-tagline {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--on-dark-soft);
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.browse-card {
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease;
}
.browse-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.detail-photos {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.detail-photos img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  object-fit: cover;
}
.detail-hero-photo {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.fact {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
}
.fact-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.fact-value {
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}
.detail-desc {
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
}

/* ---------- Narrow screens ---------- */
@media (max-width: 480px) {
  .stat-row { gap: 10px; }
  .stat-card { padding: 14px 12px; }
  .stat-num { font-size: 1.5rem; }
  .stat-label { font-size: 0.68rem; }
  .page-head-row .btn { width: 100%; }
  .account-trigger #user-name { max-width: 96px; }
  .fact-grid { grid-template-columns: 1fr; }
}
