/* ============================================================
   TIMMO — design system
   Palette: navy, gold accent, deep green, cool paper background.
   Type: Lato Light (display) + Inter (body/UI).
   Signature: the "horizon" divider — a low, wide wave motif that
   recurs between sections, echoing the Dakar/Atlantic coastline.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #111111;
  --ink-soft: #5B6672;
  --paper: #F8FAFC;
  --paper-raised: #FFFFFF;
  --line: #E2E8F0;
  --deep: #0D1B2A;
  --deep-2: #060D15;
  --clay: #BF6A3D;
  --clay-dark: #8C4E2D;
  --gold: #D4AF37;
  --gold-soft: #F3E6BC;
  --ok: #1E6B4F;
  --danger: #B23A3A;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 24px;
  --shadow-s: 0 2px 10px rgba(13,27,42,.08);
  --shadow-m: 0 10px 30px rgba(13,27,42,.12);
  --font-display: 'Lato', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-soft: cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .18s var(--ease); }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .4em; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
p { margin: 0 0 1em; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-tight { padding: 40px 0; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }

/* ---------- Scroll-reveal ---------- */
.ti-reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.ti-reveal.in-view { opacity: 1; transform: translateY(0); }
.ti-reveal-stagger.in-view > * { opacity: 1; transform: translateY(0); }
.ti-reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.ti-reveal-stagger.in-view > *:nth-child(1) { transition-delay: .03s; }
.ti-reveal-stagger.in-view > *:nth-child(2) { transition-delay: .09s; }
.ti-reveal-stagger.in-view > *:nth-child(3) { transition-delay: .15s; }
.ti-reveal-stagger.in-view > *:nth-child(4) { transition-delay: .21s; }
.ti-reveal-stagger.in-view > *:nth-child(5) { transition-delay: .27s; }
.ti-reveal-stagger.in-view > *:nth-child(6) { transition-delay: .33s; }
@media (prefers-reduced-motion: reduce) {
  .ti-reveal, .ti-reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Universal page-enter (applied to main content wrappers) ----------
   .ti-auth-card a une simple animation d'entrée slide+fade (aucun enfant en
   position fixe, donc aucun risque). #ti-property-root (galerie plein écran)
   et .ti-listings-layout (panneau de filtres mobile) utilisent uniquement un
   fondu sans transform : un transform, même retombé à translateY(0), reste
   un contexte d'empilement/bloc de référence pour tout descendant en
   position:fixed — ce qui décalait ces éléments par rapport à cet ancêtre
   au lieu de la fenêtre réelle. */
.ti-auth-card {
  animation: ti-page-in .5s var(--ease) both;
}
#ti-property-root, .ti-listings-layout, .ti-dash-main, .ti-dash-side {
  animation: ti-fade-in .4s var(--ease) both;
}
@keyframes ti-page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ti-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  #ti-property-root, .ti-listings-layout, .ti-auth-card, .ti-dash-main, .ti-dash-side { animation: none; }
}

/* ---------- Buttons & form basics ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .18s var(--ease), opacity .18s var(--ease);
  text-align: center; position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--clay); color: #fff; box-shadow: 0 1px 2px rgba(191,106,61,.25); overflow: hidden; }
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease);
}
.btn-primary:hover::before { left: 125%; }
.btn-primary:hover { background: var(--clay-dark); box-shadow: 0 8px 20px rgba(191,106,61,.32); }
.btn-dark { background: var(--deep); color: #fff; }
.btn-dark:hover { background: var(--deep-2); box-shadow: 0 8px 20px rgba(15,37,47,.28); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--deep); }
.btn-ghost:hover { background: rgba(22,50,63,.08); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; left: 50%; top: 50%;
  margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; animation: ti-spin .7s linear infinite;
}
.btn-outline.is-loading::after, .btn-ghost.is-loading::after { border-color: rgba(22,50,63,.25); border-top-color: var(--deep); }
@keyframes ti-spin { to { transform: rotate(360deg); } }

label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--ink); }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: .95rem;
  padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: var(--paper-raised); color: var(--ink);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: #cfc2a0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(191,106,61,.14); }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
textarea { resize: vertical; min-height: 90px; }

/* ---------- Header ---------- */
#ti-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(247,242,231,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(228,218,196,0);
  box-shadow: none;
  transition: background .45s var(--ease), backdrop-filter .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
}
#ti-header.scrolled {
  background: rgba(247,242,231,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(23,38,43,.09);
}
body { padding-top: var(--header-h, 68px); }
.ti-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: 1180px; margin: 0 auto; gap: 20px; transition: padding .3s var(--ease); }
#ti-header.scrolled .ti-header-inner { padding-top: 11px; padding-bottom: 11px; }
.ti-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; color: var(--deep); letter-spacing: -.01em; transition: opacity .2s var(--ease); }
.ti-brand:hover { opacity: .82; }
.ti-brand-mark { width: 32px; height: 32px; flex-shrink: 0; color: var(--clay); background: var(--gold-soft); border-radius: 50%; padding: 6px; box-sizing: border-box; transition: transform .3s var(--ease); }
.ti-brand:hover .ti-brand-mark { transform: rotate(-8deg) scale(1.05); }
.ti-brand-logo { height: 40px; width: auto; display: block; transition: transform .3s var(--ease); }
.ti-brand:hover .ti-brand-logo { transform: scale(1.03); }
.ti-nav { display: flex; align-items: center; gap: 22px; font-weight: 600; font-size: .92rem; }
.ti-nav a { position: relative; padding: 4px 0; }
.ti-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 2px;
  background: var(--clay); transition: width .25s var(--ease);
}
.ti-nav a:hover::after, .ti-nav a.active::after { width: 100%; }
.ti-nav a:hover { color: var(--clay); }
.ti-header-actions { display: flex; align-items: center; gap: 10px; }

/* Account dropdown */
.ti-account { position: relative; }
.ti-account-trigger {
  display: flex; align-items: center; gap: 8px; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px 5px 5px; cursor: pointer; font-family: var(--font-body);
  font-size: .84rem; font-weight: 700; color: var(--ink); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.ti-account-trigger:hover { border-color: var(--clay); }
.ti-account.open .ti-account-trigger { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(191,106,61,.14); }
.ti-account-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--deep); color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; padding: 6px; box-sizing: border-box;
}
.ti-account-avatar-lg { width: 42px; height: 42px; padding: 9px; }
.ti-account-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti-account-chevron { width: 14px; height: 14px; display: flex; transition: transform .25s var(--ease); color: var(--ink-soft); }
.ti-account.open .ti-account-chevron { transform: rotate(180deg); }

.ti-account-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 240px; background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 18px 44px rgba(15,37,47,.18);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease); z-index: 60;
}
.ti-account.open .ti-account-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.ti-account-menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.ti-account-menu-head strong { display: block; font-size: .9rem; }
.ti-account-role-badge { display: inline-block; margin-top: 3px; background: var(--gold-soft); color: var(--clay-dark); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.ti-account-menu a, .ti-account-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: var(--radius-s);
  font-size: .86rem; font-weight: 600; color: var(--ink); background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-body); transition: background .18s var(--ease);
}
.ti-account-menu a svg, .ti-account-menu button svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--ink-soft); }
.ti-account-menu a:hover, .ti-account-menu button:hover { background: var(--paper); }
.ti-account-logout { color: var(--danger); }
.ti-account-logout svg { color: var(--danger); }
.ti-account-logout:hover { background: #FBE4E4; }

/* ---------- Notification bell (favorited-listing status alerts) ---------- */
.ti-notif-wrap { position: relative; }
.ti-notif-trigger {
  position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--paper-raised); display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--ink); transition: border-color .2s var(--ease);
}
.ti-notif-trigger svg { width: 18px; height: 18px; }
.ti-notif-wrap.open .ti-notif-trigger { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(191,106,61,.14); }
.ti-notif-badge {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: .66rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--paper); animation: ti-notif-dot-pulse 2s ease-in-out infinite;
}
@keyframes ti-notif-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--paper), 0 0 0 2px var(--paper); }
  50% { box-shadow: 0 0 0 2px var(--paper), 0 0 0 5px rgba(214,72,72,.25); }
}
.ti-notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 320px; max-width: 90vw; background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 18px 44px rgba(15,37,47,.18);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease); z-index: 60;
}
.ti-notif-wrap.open .ti-notif-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.ti-notif-panel-head { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); padding: 8px 10px; }
.ti-notif-empty { padding: 16px 10px 20px; text-align: center; color: var(--ink-soft); font-size: .84rem; }
.ti-notif-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ti-notif-item {
  display: flex; gap: 10px; padding: 9px 10px; border-radius: var(--radius-s); text-decoration: none; color: var(--ink);
  transition: background .18s var(--ease);
}
.ti-notif-item:hover { background: var(--paper); }
.ti-notif-item.unread { background: var(--gold-soft); }
.ti-notif-item.unread:hover { background: var(--gold-soft); filter: brightness(.97); }
.ti-notif-item img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius-s); flex-shrink: 0; }
.ti-notif-broadcast-icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--gold-soft); color: var(--clay-dark);
  display: flex; align-items: center; justify-content: center;
}
.ti-notif-broadcast-icon svg { width: 19px; height: 19px; }
.ti-notif-broadcast { cursor: default; }
.ti-broadcast-form { max-width: 480px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; margin-bottom: 30px; }
.ti-notif-text { font-size: .82rem; line-height: 1.4; }
.ti-notif-time { font-size: .72rem; color: var(--ink-soft); margin-top: 3px; }

/* ---------- Status ribbon on property cards (under contract / sold / rented) ---------- */
.ti-card-ribbon {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 7px 10px; text-align: center;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fff; z-index: 2;
}
.ti-card-ribbon.ribbon-contract { background: var(--gold); }
.ti-card-ribbon.ribbon-sold { background: var(--danger); }
.ti-card-ribbon.ribbon-rented { background: var(--deep); }

.ti-toggle-group { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper-raised); }
.ti-toggle-group button {
  border: none; background: transparent; padding: 7px 12px; font-size: .78rem; font-weight: 700;
  cursor: pointer; color: var(--ink-soft); letter-spacing: .02em; transition: background .2s var(--ease), color .2s var(--ease);
}
.ti-toggle-group button.active { background: var(--deep); color: #fff; }

.ti-burger {
  display: none; align-items: center; justify-content: center; width: 34px; height: 34px;
  background: none; border: none; cursor: pointer; color: var(--deep); flex-direction: column; gap: 5px; padding: 0;
}
.ti-burger-line { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.ti-burger.active { color: var(--clay); }
.ti-burger.active .ti-burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ti-burger.active .ti-burger-line:nth-child(2) { opacity: 0; }
.ti-burger.active .ti-burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Horizon divider (signature element) ---------- */
.ti-horizon { width: 100%; height: 46px; display: block; color: var(--deep); }
.ti-horizon path { fill: currentColor; opacity: .07; }
.ti-horizon.flip { transform: scaleY(-1); }

/* ---------- Hero ---------- */
.ti-hero { background: linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 100%); color: #fff; padding: 64px 0 0; position: relative; overflow: hidden; }
.ti-hero-video-wrap { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.ti-hero-video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); filter: saturate(1.05) brightness(.85); transition: opacity 1.1s var(--ease); }
.ti-hero-video.loaded { opacity: .55; }
.ti-hero-video-wrap::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,37,47,.55) 0%, rgba(15,37,47,.72) 55%, var(--deep-2) 100%);
}
@media (max-width: 720px) {
  .ti-hero-video { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ti-hero-video { display: none; }
}
.ti-hero-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px 90px; position: relative; z-index: 2; }
.ti-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; font-weight: 700; color: var(--gold); margin-bottom: 14px; opacity: 0; animation: ti-fade-up .7s var(--ease) .05s forwards; }
.ti-hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); max-width: 15ch; color: #fff; opacity: 0; animation: ti-fade-up .8s var(--ease) .15s forwards; }
.ti-hero-sub { max-width: 46ch; color: rgba(255,255,255,.78); font-size: 1.05rem; opacity: 0; animation: ti-fade-up .8s var(--ease) .28s forwards; }
.ti-hero-glow { position: absolute; inset: 0; background: radial-gradient(600px 320px at 85% 10%, rgba(214,162,76,.25), transparent 60%); z-index: 1; }
.ti-hero-glow::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 260px at 8% 90%, rgba(191,106,61,.18), transparent 65%);
}
.ti-search-card-wrap { opacity: 0; animation: ti-fade-up .8s var(--ease) .4s forwards; }
@keyframes ti-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .ti-eyebrow, .ti-hero h1, .ti-hero-sub, .ti-search-card-wrap { animation: none; opacity: 1; }
}

/* Search card */
.ti-search-card { background: var(--paper-raised); border-radius: var(--radius-l); box-shadow: var(--shadow-m); padding: 8px; margin-top: 34px; transition: box-shadow .3s var(--ease); }
.ti-search-tabs { display: flex; gap: 4px; padding: 8px 8px 0; }
.ti-search-tabs button {
  border: none; background: transparent; padding: 10px 18px; border-radius: 999px 999px 0 0;
  font-weight: 700; font-size: .88rem; color: var(--ink-soft); cursor: pointer;
  transition: background .22s var(--ease), color .22s var(--ease);
}
.ti-search-tabs button.active { background: var(--paper); color: var(--deep); }
.ti-search-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 10px; padding: 16px; background: var(--paper); border-radius: 0 var(--radius-m) var(--radius-m) var(--radius-m); }
.ti-search-form input, .ti-search-form select { border: 1px solid var(--line); }
.ti-search-form .btn { white-space: nowrap; }

/* ---------- Category tiles ---------- */
.ti-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ti-cat-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 26px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.ti-cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); border-color: transparent; }
.ti-cat-icon { width: 44px; height: 44px; margin-bottom: 14px; color: var(--clay); transition: transform .3s var(--ease); }
.ti-cat-card:hover .ti-cat-icon { transform: scale(1.08) rotate(-4deg); }
.ti-perks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ti-perk { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-soft); color: var(--clay-dark); font-size: .78rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; }

/* ---------- Section headers ---------- */
.ti-section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; gap: 20px; }
.ti-section-head p { color: var(--ink-soft); margin: 0; }

/* ---------- Neighborhood chips ---------- */
.ti-hoods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ti-hood-card { position: relative; border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 4/3; }
.ti-hood-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.ti-hood-card:hover img { transform: scale(1.08); }
.ti-hood-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(15,37,47,.85)); }
.ti-hood-label { position: absolute; bottom: 14px; left: 16px; z-index: 2; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; transition: transform .3s var(--ease); }
.ti-hood-card:hover .ti-hood-label { transform: translateX(4px); }

/* ---------- Property cards ---------- */
.ti-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ti-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease); display: flex; flex-direction: column; }
.ti-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); border-color: transparent; }
.ti-card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: linear-gradient(135deg, var(--line), var(--paper)); }
.ti-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .4s var(--ease); opacity: 0; }
.ti-card-media img.loaded { opacity: 1; }
.ti-card:hover .ti-card-media img { transform: scale(1.07); }
.ti-card-badge { position: absolute; top: 12px; left: 12px; background: var(--deep); color: #fff; font-size: .72rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.ti-verified-badge {
  display: inline-flex; align-items: center; gap: 4px; background: #DCEFE1; color: var(--ok);
  font-size: .72rem; font-weight: 800; padding: 3px 9px 3px 7px; border-radius: 999px; white-space: nowrap;
}
.ti-verified-badge svg { width: 12px; height: 12px; flex-shrink: 0; }
.ti-verified-badge-lg { font-size: .82rem; padding: 6px 14px 6px 10px; gap: 6px; }
.ti-verified-badge-lg svg { width: 15px; height: 15px; }
.ti-region-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ti-region-chip {
  padding: 10px 14px; border-radius: var(--radius-s); border: 1.5px solid var(--line); background: var(--paper-raised);
  font-size: .85rem; font-weight: 700; color: var(--ink); text-align: center; cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.ti-region-chip:hover { border-color: var(--clay); transform: translateY(-1px); }
.ti-region-chip.active { background: var(--deep); border-color: var(--deep); color: #fff; }
.ti-title-doc-upload { border: 2px dashed var(--line); border-radius: var(--radius-m); padding: 18px; text-align: center; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); }
.ti-title-doc-upload:hover { border-color: var(--clay); background: rgba(196,122,74,.04); }
.ti-title-doc-current { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--paper-raised); border-radius: var(--radius-s); border: 1px solid var(--line); margin-top: 10px; }
.ti-card-fav { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.9); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s var(--ease), background .2s var(--ease); }
.ti-card-fav:hover { transform: scale(1.1); background: #fff; }
.ti-card-fav.active { color: var(--clay); }
.ti-card-fav.pulse svg { animation: ti-heart-pulse .5s var(--ease); }
.ti-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ti-card-hood { font-size: .78rem; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ti-card-hood .ti-verified-badge { text-transform: none; letter-spacing: normal; }
.ti-card-ref { font-size: .72rem; color: var(--ink-soft); font-family: ui-monospace, "SF Mono", Consolas, monospace; opacity: .75; margin-top: 1px; }
.ti-card-title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; margin: 0; }
.ti-card-title a { transition: color .2s var(--ease), background-size .35s var(--ease); background-image: linear-gradient(var(--clay), var(--clay)); background-position: 0 100%; background-repeat: no-repeat; background-size: 0% 2px; padding-bottom: 1px; }
.ti-card:hover .ti-card-title a { background-size: 100% 2px; color: var(--clay-dark); }
.ti-card-title a:hover { color: var(--clay); }
.ti-card-meta { display: flex; gap: 12px; font-size: .82rem; color: var(--ink-soft); }
.ti-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.ti-price { font-weight: 800; color: var(--deep); }
.ti-rating { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--clay-dark); }

/* ---------- How it works ---------- */
.ti-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ti-step { padding: 26px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); }
.ti-step-num { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); font-weight: 700; }

/* ---------- Footer ---------- */
.ti-footer {
  background: radial-gradient(900px 400px at 15% 0%, rgba(191,106,61,.10), transparent 60%),
              radial-gradient(700px 380px at 90% 10%, rgba(214,162,76,.08), transparent 55%),
              var(--deep-2);
  color: rgba(255,255,255,.82); padding: 0 0 26px; position: relative;
}
.ti-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--clay) 0%, var(--gold) 50%, var(--clay) 100%);
}
.ti-footer h4 { display: flex; align-items: center; gap: 8px; color: #fff; font-family: var(--font-body); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.ti-footer-h4-icon { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; margin-right: 6px; flex-shrink: 0; }
.ti-footer-brand-logo { height: 34px; width: auto; display: block; }
.ti-footer a { display: block; padding: 4px 0; color: rgba(255,255,255,.72); font-size: .9rem; transition: color .2s var(--ease), transform .2s var(--ease); }
.ti-footer a:hover { color: var(--gold); transform: translateX(2px); }

/* Trust stats band */
.ti-footer-trust-band { background: rgba(0,0,0,.16); border-bottom: 1px solid rgba(255,255,255,.1); padding: 22px 0; }
.ti-footer-trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ti-trust-stat { display: flex; align-items: center; gap: 12px; }
.ti-trust-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: rgba(214,162,76,.16); color: var(--gold);
  display: flex; align-items: center; justify-content: center; border: 1px solid rgba(214,162,76,.3);
}
.ti-trust-icon svg { width: 18px; height: 18px; }
.ti-trust-stat b { display: block; font-family: var(--font-display); font-size: 1.15rem; color: #fff; line-height: 1.2; }
.ti-trust-stat span { font-size: .76rem; color: rgba(255,255,255,.6); }
@media (max-width: 900px) { .ti-footer-trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .ti-footer-trust-grid { grid-template-columns: 1fr; } }

.ti-footer-newsletter {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 32px 0; margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.ti-footer-newsletter-copy { display: flex; align-items: center; gap: 16px; }
.ti-newsletter-icon { width: 44px; height: 44px; }
.ti-newsletter-icon svg { width: 20px; height: 20px; }
.ti-footer-newsletter h3 { color: #fff; margin: 0 0 4px; font-size: 1.3rem; }
.ti-footer-newsletter p { margin: 0; color: rgba(255,255,255,.6); font-size: .88rem; }
.ti-newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.ti-newsletter-form input {
  min-width: 240px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff;
}
.ti-newsletter-form input::placeholder { color: rgba(255,255,255,.5); }
.ti-newsletter-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,162,76,.18); }

.ti-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.12); }

.ti-footer-agency-card {
  background: linear-gradient(160deg, rgba(214,162,76,.1), rgba(214,162,76,.03));
  border: 1px solid rgba(214,162,76,.28);
  border-radius: var(--radius-m);
  padding: 20px;
}
.ti-footer-agency-card h4 { margin-top: 0; }
.ti-footer-agency-benefits { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ti-footer-agency-benefits li { display: flex; align-items: flex-start; gap: 9px; font-size: .84rem; color: rgba(255,255,255,.82); line-height: 1.4; }
.ti-footer-agency-benefits li span { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--gold); }

.ti-footer-contact { margin-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.ti-footer-contact a { display: flex; align-items: center; gap: 10px; }
.ti-footer-contact span { width: 16px; height: 16px; flex-shrink: 0; display: inline-flex; opacity: .75; }

.ti-social-row { display: flex; gap: 10px; margin-top: 18px; }
.ti-social-row a {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex;
  align-items: center; justify-content: center; padding: 0; transition: background .2s var(--ease), transform .2s var(--ease);
}
.ti-social-row a:hover { background: var(--clay); transform: translateY(-2px); }
.ti-social-row svg { width: 16px; height: 16px; }

.ti-footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; font-size: .8rem; color: rgba(255,255,255,.55); flex-wrap: wrap; gap: 14px; }
.ti-footer-bottom-right { display: flex; align-items: center; gap: 12px; }
.ti-footer .ti-toggle-group { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.06); }
.ti-footer .ti-toggle-group button { color: rgba(255,255,255,.7); }
.ti-footer .ti-toggle-group button.active { background: var(--clay); color: #fff; }
.ti-back-to-top {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.ti-back-to-top:hover { background: var(--clay); transform: translateY(-3px); }
.ti-back-to-top svg { width: 16px; height: 16px; }

/* ---------- Rich filter bar (dashboards: admin, agency) ---------- */
.ti-admin-filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px; margin-bottom: 6px;
  box-shadow: var(--shadow-s);
}
.ti-filter-search { position: relative; flex: 1 1 220px; min-width: 200px; }
.ti-filter-search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px;
  color: var(--ink-soft); pointer-events: none;
}
.ti-filter-search-icon svg { width: 100%; height: 100%; }
.ti-filter-search input { padding-left: 36px; }
.ti-admin-filter-bar select, .ti-admin-filter-bar input[type=number] { flex: 1 1 140px; min-width: 110px; }
.ti-filter-reset {
  flex-shrink: 0; background: none; border: 1px solid var(--line); color: var(--ink-soft); border-radius: var(--radius-s);
  padding: 11px 16px; font-size: .85rem; font-weight: 700; cursor: pointer; transition: border-color .2s var(--ease), color .2s var(--ease);
}
.ti-filter-reset:hover { border-color: var(--danger); color: var(--danger); }
.ti-filter-results-count { font-size: .82rem; color: var(--ink-soft); margin: 12px 2px 14px; }
@media (max-width: 700px) {
  .ti-admin-filter-bar { flex-direction: column; align-items: stretch; }
  .ti-admin-filter-bar select, .ti-admin-filter-bar input, .ti-filter-reset { flex: 1 1 auto; width: 100%; }
}
/* ---------- Demo banner ---------- */
.ti-demo-banner { background: var(--gold-soft); color: var(--clay-dark); font-size: .82rem; text-align: center; padding: 9px 16px; font-weight: 600; }

/* ---------- Crash recovery banner (global safety net) ---------- */
.ti-crash-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999; background: var(--danger); color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 20px; font-size: .85rem; font-weight: 600; text-align: center;
}
.ti-crash-actions { display: inline-flex; gap: 8px; align-items: center; }
.ti-crash-actions button {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 999px;
  padding: 5px 14px; font-size: .78rem; font-weight: 700; cursor: pointer; transition: background .2s var(--ease);
}
.ti-crash-actions button:hover { background: rgba(255,255,255,.3); }

/* ---------- Listings page ---------- */
.ti-listings-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; align-items: start; }
.ti-filters { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; position: sticky; top: calc(var(--header-h, 68px) + 20px); box-shadow: var(--shadow-s); transition: box-shadow .25s var(--ease); }
.ti-filters-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.ti-filters-head-icon { width: 20px; height: 20px; color: var(--clay); flex-shrink: 0; }
.ti-filters-head-icon svg { width: 100%; height: 100%; }
.ti-filters-reset-link { background: none; border: none; color: var(--clay-dark); font-weight: 700; font-size: .78rem; cursor: pointer; padding: 4px 0; display: inline-flex; align-items: center; gap: 4px; transition: color .2s var(--ease); }
.ti-filters-reset-link:hover { color: var(--danger); }
.ti-filter-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.ti-filter-section:last-of-type { border-bottom: none; padding-bottom: 4px; }
.ti-filters h4 { font-family: var(--font-body); text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--ink-soft); margin: 0 0 12px; font-weight: 800; }
.ti-filters input[type=number], .ti-filters input[type=text], .ti-filters select {
  border-radius: var(--radius-s); border: 1.5px solid var(--line); transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.ti-filters input[type=number]:focus, .ti-filters input[type=text]:focus, .ti-filters select:focus {
  border-color: var(--clay); box-shadow: 0 0 0 3px rgba(196,122,74,.14); outline: none;
}
.ti-chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.ti-chip { border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 14px; font-size: .8rem; font-weight: 600; cursor: pointer; transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .15s var(--ease), box-shadow .18s var(--ease); }
.ti-chip:hover { border-color: var(--clay); transform: translateY(-1px); box-shadow: var(--shadow-s); }
.ti-chip.active { background: var(--deep); color: #fff; border-color: var(--deep); box-shadow: var(--shadow-s); }
.ti-chip-group-icons .ti-chip { display: inline-flex; align-items: center; gap: 7px; }
.ti-chip-icon { width: 15px; height: 15px; flex-shrink: 0; opacity: .75; transition: opacity .18s var(--ease); }
.ti-chip-icon svg { width: 100%; height: 100%; }
.ti-chip.active .ti-chip-icon { opacity: 1; }
.ti-filters-mobile-cta { display: none; margin-top: 18px; }
.ti-results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

/* Active filter pills above results */
.ti-active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ti-active-chips:empty { margin-bottom: 0; }
.ti-active-chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--gold-soft); color: var(--clay-dark);
  border: none; border-radius: 999px; padding: 6px 8px 6px 14px; font-size: .8rem; font-weight: 700; cursor: pointer;
  transition: background .2s var(--ease), transform .15s var(--ease);
}
.ti-active-chip:hover { background: #e9cd97; transform: translateY(-1px); }
.ti-active-chip span { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(158,85,48,.16); font-size: .95rem; line-height: 1; }

/* Mobile filters toggle + drawer */
.ti-filters-toggle {
  display: none; align-items: center; gap: 8px; width: 100%; margin-bottom: 16px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px;
  font-weight: 700; font-size: .88rem; cursor: pointer; color: var(--deep);
}
.ti-filters-toggle span:first-child { width: 18px; height: 18px; display: inline-flex; }
.ti-filters-toggle-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--clay); color: #fff; font-size: .72rem; font-weight: 800;
}
.ti-filters-scrim { display: none; position: fixed; inset: 0; background: rgba(15,37,47,.5); z-index: 59; opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s var(--ease); }
.ti-filters-scrim.open { opacity: 1; visibility: visible; }

@media (max-width: 980px) {
  .ti-filters-toggle { display: flex; }
  .ti-filters-scrim { display: block; }
  .ti-filters {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; top: auto; max-height: 82vh; overflow-y: auto;
    border-radius: var(--radius-l) var(--radius-l) 0 0; transform: translateY(100%); transition: transform .32s var(--ease);
    box-shadow: 0 -20px 50px rgba(15,37,47,.3);
  }
  .ti-filters.open { transform: translateY(0); }
  .ti-filters-mobile-cta { display: flex; }
}

/* ---------- Property detail ---------- */
.ti-detail-hero { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; border-radius: var(--radius-m); overflow: hidden; height: 420px; background: var(--line); }
.ti-detail-hero-tile { position: relative; overflow: hidden; cursor: pointer; background: var(--line); display: block; }
.ti-detail-hero-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transform: scale(1.045); transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.ti-detail-hero-tile img.loaded { opacity: 1; }
.ti-detail-hero-tile:hover img { transform: scale(1.09); }
.ti-detail-hero-tile::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(15,37,47,.28) 100%);
  opacity: 0; transition: opacity .3s var(--ease);
}
.ti-detail-hero-tile:hover::before { opacity: 1; }
.ti-hero-more-overlay {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  background: rgba(15,37,47,.58); color: #fff; font-weight: 700; font-size: 1.05rem; gap: 8px;
  opacity: 1; transition: background .25s var(--ease);
}
.ti-detail-hero-tile:hover .ti-hero-more-overlay { background: rgba(15,37,47,.7); }
.ti-detail-hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; }
.ti-gallery-strip-wrap { position: relative; }
.ti-gallery-strip-wrap::before, .ti-gallery-strip-wrap::after {
  content: ""; position: absolute; top: 14px; bottom: 14px; width: 34px; z-index: 2; pointer-events: none;
}
.ti-gallery-strip-wrap::before { left: 0; background: linear-gradient(90deg, var(--paper) 0%, transparent 100%); }
.ti-gallery-strip-wrap::after { right: 0; background: linear-gradient(270deg, var(--paper) 0%, transparent 100%); }
.ti-gallery-strip { display: flex; gap: 10px; overflow-x: auto; padding: 14px 2px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.ti-gallery-item { position: relative; flex-shrink: 0; cursor: pointer; scroll-snap-align: start; border-radius: var(--radius-s); overflow: hidden; }
.ti-gallery-item img { width: 140px; height: 100px; object-fit: cover; display: block; transition: transform .35s var(--ease), opacity .25s var(--ease); opacity: .8; }
.ti-gallery-item:hover img, .ti-gallery-item:focus-visible img { transform: scale(1.06); opacity: 1; }
.ti-gallery-item::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-s); border: 2px solid transparent; transition: border-color .2s var(--ease);
}
.ti-gallery-item:hover::after { border-color: var(--clay); }
.ti-gallery-item-index {
  position: absolute; bottom: 6px; right: 6px; background: rgba(15,37,47,.65); color: #fff; font-size: .68rem; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
}
.ti-detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; margin-top: 30px; }
.ti-detail-stats { display: flex; gap: 22px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 18px 0; }
.ti-detail-stat b { display: block; font-family: var(--font-display); font-size: 1.2rem; }
.ti-detail-stat span { font-size: .78rem; color: var(--ink-soft); }
.ti-sticky-card { position: sticky; top: calc(var(--header-h, 68px) + 20px); background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; box-shadow: var(--shadow-s); }
.ti-sticky-price { font-family: var(--font-display); font-size: 1.6rem; color: var(--deep); font-weight: 700; }
.ti-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: .8rem; color: var(--ink-soft); margin-bottom: 16px; }
.ti-breadcrumb a { transition: color .2s var(--ease); }
.ti-breadcrumb a:hover { color: var(--clay); }
.ti-breadcrumb-current { color: var(--ink); font-weight: 600; max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Favorite pill button (property detail page) */
.ti-fav-pill {
  display: inline-flex; align-items: center; gap: 8px; background: var(--paper-raised); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 10px 18px; font-family: var(--font-body); font-weight: 700; font-size: .88rem;
  color: var(--ink); cursor: pointer; transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease), transform .15s var(--ease);
}
.ti-fav-pill:hover { border-color: var(--clay); transform: translateY(-1px); }
.ti-fav-pill-icon { width: 18px; height: 18px; display: flex; transition: transform .2s var(--ease); }
.ti-fav-pill.active { background: #FBE9EC; border-color: #E8A9B4; color: #C43B57; }
.ti-fav-pill.active .ti-fav-pill-icon { color: #C43B57; }
.ti-fav-pill.pulse .ti-fav-pill-icon { animation: ti-heart-pulse .5s var(--ease); }
@keyframes ti-heart-pulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  55% { transform: scale(.9); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ti-fav-pill.pulse .ti-fav-pill-icon { animation: none; }
}
.ti-agency-strip { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .85rem; }

/* Availability badge (monthly rentals) */
.ti-availability-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; padding: 6px 12px;
  border-radius: 999px; margin-bottom: 14px;
}
.ti-availability-badge.available { background: #DCEFE1; color: var(--ok); }
.ti-availability-badge.upcoming { background: var(--gold-soft); color: var(--clay-dark); }
.ti-availability-badge::before { content: "●"; font-size: .6rem; }
.ti-availability-note { background: var(--gold-soft); color: var(--clay-dark); font-size: .82rem; padding: 10px 14px; border-radius: var(--radius-s); margin: -2px 0 14px; }

/* Availability calendar (short-stay booking) */
.ti-cal-status { font-size: .86rem; font-weight: 700; color: var(--deep); margin-bottom: 10px; min-height: 1.3em; }
.ti-cal-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px; }
.ti-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ti-cal-nav strong { font-family: var(--font-display); font-size: .95rem; text-transform: capitalize; }
.ti-cal-nav button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper-raised);
  color: var(--deep); font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.ti-cal-nav button:hover { background: var(--gold-soft); border-color: var(--clay); }
.ti-cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .7rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; margin-bottom: 4px; }
.ti-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ti-cal-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: .82rem; border-radius: var(--radius-s);
  color: var(--ink); transition: background .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
.ti-cal-cell.empty { visibility: hidden; }
.ti-cal-cell.disabled { color: #C9BFA8; cursor: not-allowed; }
.ti-cal-cell.booked { background: #FBE4E4; color: #C77B7B; text-decoration: line-through; cursor: not-allowed; }
.ti-cal-cell.blocked { background: repeating-linear-gradient(135deg, #ECE4D2, #ECE4D2 4px, #E3D8BE 4px, #E3D8BE 8px); color: #A8916A; cursor: not-allowed; }
.ti-cal-cell.available { cursor: pointer; font-weight: 600; }
.ti-cal-cell.available:hover { background: var(--gold-soft); transform: scale(1.08); }
.ti-cal-cell.selected-start, .ti-cal-cell.selected-end { background: var(--clay); color: #fff; font-weight: 800; }
.ti-cal-cell.in-range { background: var(--gold-soft); color: var(--clay-dark); }
.ti-cal-clear { margin-top: 10px; background: none; border: none; color: var(--ink-soft); font-size: .8rem; font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }
.ti-cal-clear:hover { color: var(--danger); }

.ti-cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .76rem; color: var(--ink-soft); }
.ti-cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ti-cal-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ti-cal-dot.available { background: var(--paper-raised); border: 1px solid var(--line); }
.ti-cal-dot.booked { background: #FBE4E4; }
.ti-cal-dot.blocked { background: repeating-linear-gradient(135deg, #ECE4D2, #ECE4D2 3px, #E3D8BE 3px, #E3D8BE 6px); }
.ti-cal-dot.selected { background: var(--clay); }
.ti-agency-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--deep); color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: .9rem; text-transform: uppercase;
}

/* Property characteristics / amenities */
.ti-features-wrap { margin: 8px 0 4px; }
.ti-features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px;
}
.ti-feature-item {
  display: flex; align-items: center; gap: 12px; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 14px 16px; font-size: .88rem; font-weight: 600; color: var(--ink);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.ti-feature-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-s); border-color: transparent; }
.ti-feature-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
@media (max-width: 720px) {
  .ti-features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .ti-features-grid { grid-template-columns: 1fr; }
}

/* Map */
#ti-map { height: 320px; border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); background: var(--paper-raised); }
.ti-map-fallback { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--ink-soft); font-size: .88rem; line-height: 1.6; }

/* ---------- Interactive map search (listings page) ---------- */
.ti-map-toggle-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ti-map-toggle-btn svg { width: 15px; height: 15px; }
.ti-listings-split { display: block; }
.ti-listings-map { display: none; }
.ti-listings-split.map-active {
  display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 20px; align-items: flex-start;
}
.ti-listings-sticky-count { display: none; }
.ti-listings-split.map-active .ti-listings-scroll-wrap {
  max-height: calc(100vh - 200px); overflow-y: auto; padding-right: 10px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.ti-listings-split.map-active .ti-listings-scroll-wrap::-webkit-scrollbar { width: 6px; }
.ti-listings-split.map-active .ti-listings-scroll-wrap::-webkit-scrollbar-track { background: transparent; }
.ti-listings-split.map-active .ti-listings-scroll-wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.ti-listings-split.map-active .ti-listings-scroll-wrap::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }
.ti-listings-split.map-active .ti-listings-sticky-count {
  display: block; position: sticky; top: 0; z-index: 2; background: var(--paper); padding: 4px 0 12px;
  font-size: .84rem; font-weight: 700; color: var(--ink-soft);
}
.ti-listings-split.map-active .ti-grid {
  grid-template-columns: 1fr;
}
.ti-listings-split.map-active .ti-listings-map {
  display: block; position: sticky; top: calc(var(--header-h, 76px) + 16px);
}
#ti-search-map {
  height: calc(100vh - 200px); min-height: 420px; border-radius: var(--radius-l);
  overflow: hidden; border: 1px solid var(--line); background: var(--paper-raised); box-shadow: var(--shadow-m);
}
.ti-map-bounds-note {
  margin-top: 8px; font-size: .8rem; color: var(--ink-soft); text-align: center;
}
.ti-map-price-pin {
  display: inline-block; width: max-content;
  position: relative; transform: translate(-50%, -100%);
  background: var(--deep); color: #fff; font-weight: 800; font-size: .76rem; font-family: var(--font-body);
  padding: 7px 13px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 12px rgba(23,38,43,.3);
  border: 2px solid #fff; cursor: pointer; transition: background .15s var(--ease), transform .15s var(--ease);
}
.ti-map-price-pin::after {
  content: ''; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid var(--deep);
  transition: border-top-color .15s var(--ease);
}
.ti-map-price-pin.highlighted { background: var(--clay); transform: translate(-50%, -100%) scale(1.14); z-index: 1000 !important; }
.ti-map-price-pin.highlighted::after { border-top-color: var(--clay); }
.ti-map-cluster {
  transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--clay); color: #fff; font-weight: 800; font-size: .85rem;
  border: 3px solid #fff; box-shadow: 0 4px 14px rgba(196,122,74,.4); cursor: pointer; transition: transform .15s var(--ease);
}
.ti-map-cluster:hover { transform: translate(-50%, -50%) scale(1.08); }
.leaflet-popup-content-wrapper { border-radius: var(--radius-m); box-shadow: var(--shadow-m); padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: auto !important; }
.leaflet-popup-tip-container { filter: drop-shadow(0 2px 2px rgba(13,27,42,.08)); }
.leaflet-popup-close-button { z-index: 2; }
.ti-map-popup { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); width: 220px; }
.ti-map-popup img { width: 100%; height: 120px; object-fit: cover; }
.ti-map-popup-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; }
.ti-map-popup-body strong { font-family: var(--font-display); font-size: .9rem; line-height: 1.3; }
.ti-map-popup-body span:last-child { font-weight: 800; color: var(--clay-dark); font-size: .92rem; }
.ti-card.map-highlight { box-shadow: 0 0 0 2px var(--gold), var(--shadow-m); }

@media (max-width: 900px) {
  .ti-listings-split.map-active { grid-template-columns: 1fr; }
  .ti-listings-split.map-active .ti-listings-scroll-wrap { display: none; }
  #ti-search-map { height: calc(100vh - 260px); }
}

/* Stars */
.ti-stars { color: var(--gold); letter-spacing: 2px; }
.ti-star-input { display: flex; gap: 6px; font-size: 1.5rem; cursor: pointer; color: var(--line); }
.ti-star-input span.active { color: var(--gold); }

.ti-review { border-bottom: 1px solid var(--line); padding: 16px 0; }
.ti-review-head { display: flex; justify-content: space-between; font-weight: 700; }

/* ---------- Auth pages ---------- */
.ti-auth-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 60px 20px; }
.ti-auth-card { width: 100%; max-width: 440px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 40px; box-shadow: var(--shadow-m); }
.ti-role-tabs { display: flex; gap: 6px; background: var(--paper); border-radius: 999px; padding: 4px; margin-bottom: 22px; }
.ti-role-tabs button { flex: 1; border: none; background: transparent; padding: 9px; border-radius: 999px; font-weight: 700; font-size: .82rem; cursor: pointer; color: var(--ink-soft); }
.ti-role-tabs button.active { background: var(--deep); color: #fff; }
.ti-demo-box { background: var(--gold-soft); border-radius: var(--radius-s); padding: 12px 14px; font-size: .8rem; margin-top: 16px; color: var(--clay-dark); }
.ti-demo-box code { background: rgba(255,255,255,.6); padding: 1px 5px; border-radius: 4px; }
.ti-error { background: #FBE4E4; color: var(--danger); padding: 10px 14px; border-radius: var(--radius-s); font-size: .85rem; margin-bottom: 14px; }
.ti-success { background: #E3F1E8; color: var(--ok); padding: 10px 14px; border-radius: var(--radius-s); font-size: .85rem; margin-bottom: 14px; }

/* ---------- Dashboard layout ---------- */
.ti-dash { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - var(--header-h, 68px)); transition: grid-template-columns .25s var(--ease); }
.ti-dash.collapsed { grid-template-columns: 76px 1fr; }
.ti-dash-side { background: var(--deep-2); color: rgba(255,255,255,.85); padding: 26px 16px; position: relative; transition: padding .25s var(--ease); }
.ti-dash.collapsed .ti-dash-side { padding-left: 12px; padding-right: 12px; }
.ti-dash-side h3 { color: #fff; font-size: 1rem; margin-bottom: 4px; white-space: nowrap; overflow: hidden; }
.ti-dash-side .ti-dash-role { font-size: .76rem; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 22px; white-space: nowrap; overflow: hidden; }
.ti-dash.collapsed .ti-dash-side h3, .ti-dash.collapsed .ti-dash-side .ti-dash-role { opacity: 0; height: 0; margin: 0; overflow: hidden; }
.ti-dash-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-s); font-weight: 600; font-size: .88rem; color: rgba(255,255,255,.75); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.ti-dash-nav a:hover { background: rgba(255,255,255,.08); transform: translateX(2px); }
.ti-dash-nav a.active { background: var(--clay); color: #fff; }
.ti-dash-nav-icon { flex-shrink: 0; width: 19px; height: 19px; display: flex; align-items: center; justify-content: center; }
.ti-dash-nav-icon svg { width: 100%; height: 100%; }
.ti-dash-nav-label { white-space: nowrap; overflow: hidden; transition: opacity .15s var(--ease); }
.ti-nav-badge {
  margin-left: auto; background: var(--clay); color: #fff; font-size: .7rem; font-weight: 800;
  padding: 1px 7px; border-radius: 999px; line-height: 1.5; flex-shrink: 0;
}
.ti-dash-nav a.active .ti-nav-badge { background: rgba(255,255,255,.28); }
/* État replié : icônes seules, centrées, étiquette masquée, info-bulle au survol */
.ti-dash.collapsed .ti-dash-nav a { justify-content: center; padding: 12px 8px; transform: none !important; }
.ti-dash.collapsed .ti-dash-nav-label { display: none; }
.ti-dash.collapsed .ti-dash-nav a .ti-nav-badge { position: absolute; top: 2px; right: 2px; margin-left: 0; }
/* Bouton de repli/dépli — dans le coin supérieur droit de la barre latérale */
.ti-sidebar-toggle {
  position: absolute; top: 24px; right: 14px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff; border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease); z-index: 6; padding: 0;
}
.ti-sidebar-toggle:hover { background: var(--clay); transform: scale(1.08); }
.ti-sidebar-toggle svg { width: 13px; height: 13px; transition: transform .3s var(--ease); }
.ti-dash.collapsed .ti-sidebar-toggle { position: static; margin: 0 auto 14px; display: flex; }
.ti-dash.collapsed .ti-sidebar-toggle svg { transform: rotate(180deg); }
.ti-dash-main { padding: 34px 40px; background: var(--paper); }
.ti-dash-panel { display: none; }
.ti-dash-panel.active { display: block; }
.ti-dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }

.ti-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 30px; }
.ti-stat-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px 20px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.ti-stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-s); }
.ti-stat-icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--gold-soft); color: var(--clay-dark); margin-bottom: 12px; }
.ti-stat-icon svg { width: 17px; height: 17px; }
.ti-stat-card b { display: block; font-family: var(--font-display); font-size: 1.8rem; margin-top: 2px; }
.ti-stat-card span { font-size: .8rem; color: var(--ink-soft); }
.ti-stat-card-alert { border-color: rgba(214,162,76,.4); background: linear-gradient(160deg, var(--gold-soft), var(--paper-raised) 65%); }

/* ---------- Agency detail sub-dashboard (admin) ---------- */
.ti-agency-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 28px; grid-auto-flow: dense; }
.ti-stat-card-featured {
  grid-column: span 2; background: linear-gradient(135deg, var(--paper-raised), var(--gold-soft) 180%);
  border-color: rgba(214,162,76,.4);
}
.ti-stat-card-featured b { font-size: 2.1rem; }
.ti-agency-stat-grid .ti-stat-card-featured .ti-stat-icon { width: 42px; height: 42px; }
@media (max-width: 620px) {
  .ti-stat-card-featured { grid-column: span 1; }
}
.ti-agency-stat-grid .ti-stat-card { padding: 16px 14px; }
.ti-agency-stat-grid .ti-stat-icon { width: 28px; height: 28px; margin-bottom: 8px; }
.ti-agency-stat-grid .ti-stat-icon svg { width: 14px; height: 14px; }
.ti-agency-stat-grid .ti-stat-card b { font-size: 1.3rem; }
.ti-agency-detail-section { margin-bottom: 30px; }
.ti-danger-zone { border: 1px solid rgba(197,68,68,.3); border-radius: var(--radius-m); padding: 18px 20px; background: rgba(197,68,68,.04); }
.ti-danger-zone .ti-form-section-title { margin-top: 0; padding-top: 0; border-top: none; }

.ti-debug-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.ti-debug-row {
  display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .86rem;
}
.ti-debug-row:last-child { border-bottom: none; }
.ti-debug-row span { color: var(--ink-soft); }
.ti-debug-row code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .82rem; text-align: right; }

.ti-impersonation-banner {
  background: var(--gold); color: var(--deep); padding: 10px 20px; display: flex; align-items: center;
  justify-content: center; gap: 16px; font-size: .88rem; font-weight: 600; flex-wrap: wrap; text-align: center;
}
.ti-impersonation-banner button { background: var(--deep); color: #fff; border: none; }
.ti-stat-card-alert:hover { border-color: var(--gold); }
.ti-stat-card-alert .ti-stat-icon { background: var(--gold); color: #fff; }
.ti-stat-card-danger { border-color: rgba(178,58,58,.35); background: linear-gradient(160deg, #FBE4E4, var(--paper-raised) 65%); }
.ti-stat-card-danger:hover { border-color: var(--danger); }
.ti-stat-card-danger .ti-stat-icon { background: var(--danger); color: #fff; }

/* Pie chart cards (stats pages) */
.ti-charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 4px; }
.ti-chart-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.ti-chart-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: transparent; }
.ti-trend-chart-card { margin-bottom: 24px; }
.ti-charts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 24px; align-items: start; }
.ti-charts-row .ti-trend-chart-card { margin-bottom: 0; }
.ti-charts-row .ti-chart-card { display: flex; flex-direction: column; padding: 18px 20px; }
.ti-charts-row .ti-chart-card-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.ti-charts-row .ti-chart-card-head h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.ti-charts-row .ti-period-tabs { align-self: stretch; }
.ti-charts-row .ti-period-tab { flex: 1; text-align: center; padding: 4px 6px; font-size: .68rem; }
.ti-charts-row .ti-line-chart { max-height: 190px; }
.ti-charts-row .ti-bar-chart { display: flex; flex-direction: column; justify-content: center; min-height: 190px; }
.ti-chart-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ti-chart-card-head h4 { margin: 0; }
.ti-period-tabs { display: flex; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.ti-period-tab {
  border: none; background: none; padding: 6px 14px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  color: var(--ink-soft); cursor: pointer; font-family: inherit; transition: all .2s var(--ease);
}
.ti-period-tab:hover { color: var(--ink); }
.ti-period-tab.active { background: var(--deep); color: #fff; }
.ti-line-chart-legend { display: flex; gap: 18px; margin-top: 10px; justify-content: center; }
.ti-line-legend-item { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-soft); font-weight: 600; }
.ti-line-legend-item i { width: 16px; height: 0; border-top: 2.5px solid var(--clay); display: inline-block; }
.ti-line-legend-item i.dashed { border-top: 2px dashed var(--ink-soft); }

/* ---------- Modern hover polish: tables, amenity pickers, tabs, avatars ---------- */
table tbody tr { transition: background .18s var(--ease); }
table tbody tr:hover { background: var(--paper); }
.ti-amenity-option:hover { border-color: var(--gold); background: var(--gold-soft); }
.ti-pipeline-tab { transition: all .2s var(--ease), transform .2s var(--ease); }
.ti-pipeline-tab:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-s); }
.ti-list-row .ti-agency-avatar { transition: transform .3s var(--ease); }
.ti-list-row:hover .ti-agency-avatar { transform: scale(1.08) rotate(-4deg); }
.ti-stat-card .ti-stat-icon { transition: transform .3s var(--ease); }
.ti-stat-card:hover .ti-stat-icon { transform: scale(1.12) rotate(-6deg); }
.ti-account-trigger:hover, .ti-notif-trigger:hover { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(191,106,61,.1); }
.badge { transition: transform .18s var(--ease); }
.ti-list-row:hover .badge, .ti-booking-card:hover .badge { transform: scale(1.04); }
.ti-doc-view-link, .ti-doc-view-link svg { transition: transform .2s var(--ease), color .2s var(--ease); }
.ti-doc-view-link:hover svg { transform: translateX(2px); }

/* ---------- Trend indicators & line chart (SaaS-style analytics) ---------- */
.ti-trend-badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: .74rem; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.ti-trend-up { background: #DCEFE1; color: var(--ok); }
.ti-trend-down { background: #FBE4E4; color: var(--danger); }
.ti-line-chart { display: block; overflow: visible; max-height: 270px; max-width: 780px; width: 100%; height: auto; margin: 0 auto; }
.ti-stat-card { position: relative; }
.ti-chart-card h4 { font-family: var(--font-body); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin: 0 0 20px; }
.ti-pie-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.ti-pie { width: 130px; height: 130px; border-radius: 50%; flex-shrink: 0; position: relative; }
.ti-pie-center {
  position: absolute; inset: 20px; background: var(--paper-raised); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700; color: var(--deep); text-align: center;
}
.ti-pie-center-value { transition: font-size .15s var(--ease); line-height: 1.1; }
.ti-pie-center-sub { font-family: var(--font-body); font-size: .68rem; font-weight: 700; color: var(--clay); letter-spacing: .02em; min-height: 14px; }
.ti-pie-legend { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 140px; }
.ti-pie-legend-item { display: flex; align-items: center; gap: 8px; font-size: .84rem; padding: 4px 6px; border-radius: var(--radius-s); margin: 0 -6px; cursor: default; transition: background .18s var(--ease); }
.ti-pie-legend-item:not(.ti-pie-legend-empty):hover { background: var(--paper); }
.ti-pie-legend-item:not(.ti-pie-legend-empty):hover .ti-pie-dot { transform: scale(1.3); }
.ti-pie-dot { transition: transform .18s var(--ease); }

/* ---------- Interactive chart tooltip & hover feedback ---------- */
.ti-chart-tooltip {
  position: fixed; z-index: 999; background: var(--deep); color: #fff; font-size: .78rem; font-weight: 700;
  padding: 6px 11px; border-radius: var(--radius-s); pointer-events: none; box-shadow: var(--shadow-m);
  transform: translateY(-100%); white-space: nowrap; opacity: 0; transition: opacity .15s var(--ease); letter-spacing: .01em;
}
.ti-line-point { transition: transform .15s var(--ease); cursor: pointer; transform-box: fill-box; transform-origin: center; }
.ti-line-point:hover, .ti-line-point.ti-line-point-active { transform: scale(1.8); }
.ti-line-hover-slice { cursor: pointer; }
.ti-line-hover-guide { stroke: var(--clay); stroke-width: 1; opacity: 0; pointer-events: none; transition: opacity .1s var(--ease); }
.ti-line-hover-slice:hover + .ti-line-hover-guide { opacity: .35; }
.ti-bar-row { cursor: pointer; border-radius: var(--radius-s); padding: 4px 6px; margin: 0 -6px; transition: background .18s var(--ease); }
.ti-bar-row:hover { background: var(--paper); }
.ti-bar-row:hover .ti-bar-fill { filter: brightness(1.12); }
.ti-bar-fill { transition: filter .18s var(--ease); }
.ti-pie-legend-empty { color: var(--ink-soft); font-style: italic; }
.ti-pie-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ti-pie-legend-label { flex: 1; color: var(--ink); }
.ti-pie-legend-value { font-weight: 800; color: var(--deep); }
@media (max-width: 620px) { .ti-charts-grid { grid-template-columns: 1fr; } }

/* Horizontal bar chart */
.ti-bar-chart { display: flex; flex-direction: column; gap: 14px; }
.ti-bar-row { display: grid; grid-template-columns: 34% 1fr auto; align-items: center; gap: 10px; }
.ti-bar-label { font-size: .82rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti-bar-track { background: var(--paper); border-radius: 999px; height: 10px; overflow: hidden; }
.ti-bar-fill { height: 100%; border-radius: 999px; transition: width .6s var(--ease); }
.ti-bar-value { font-size: .82rem; font-weight: 800; color: var(--deep); min-width: 22px; text-align: right; }
@media (max-width: 480px) { .ti-bar-row { grid-template-columns: 1fr; row-gap: 4px; } .ti-bar-value { text-align: left; } }

/* Photo upload: drag-drop zone + interactive thumbnail grid */
.ti-photo-dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius-m); padding: 30px 20px; text-align: center;
  cursor: pointer; background: var(--paper-raised); transition: all .2s var(--ease);
}
.ti-photo-dropzone:hover, .ti-photo-dropzone.dragover { border-color: var(--clay); background: var(--gold-soft); }
.ti-photo-dropzone.ti-photo-dropzone-full { opacity: .55; cursor: not-allowed; pointer-events: none; }
.ti-photo-dropzone-icon { display: inline-flex; width: 34px; height: 34px; color: var(--clay-dark); margin-bottom: 8px; }
.ti-photo-dropzone-icon svg { width: 100%; height: 100%; }
.ti-photo-dropzone-text { font-weight: 700; font-size: .9rem; }
.ti-photo-dropzone-sub { font-size: .78rem; color: var(--ink-soft); margin-top: 3px; }
.ti-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.ti-photo-thumb { position: relative; aspect-ratio: 4/3; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); cursor: grab; background: var(--paper); }
.ti-photo-thumb:active { cursor: grabbing; }
.ti-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ti-photo-thumb img.broken { opacity: .3; }
.ti-photo-cover-badge {
  position: absolute; top: 6px; left: 6px; background: var(--deep); color: #fff; font-size: .62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; padding: 3px 7px; border-radius: 999px; z-index: 2;
}
.ti-photo-thumb-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; z-index: 2; }
.ti-photo-thumb-btn {
  width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .8rem; line-height: 1;
  box-shadow: var(--shadow-s); transition: transform .15s var(--ease);
}
.ti-photo-thumb-btn:hover { transform: scale(1.1); }
.ti-photo-thumb-btn-danger:hover { background: var(--danger); color: #fff; }
.ti-photo-url-add { display: flex; gap: 8px; margin-top: 14px; }
.ti-photo-url-add input { flex: 1; }

/* Characteristics picker */
.ti-amenity-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 6px; }
.ti-amenity-option {
  display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 12px; font-size: .85rem; font-weight: 600; cursor: pointer; background: var(--paper-raised);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.ti-amenity-option:has(input:checked) { border-color: var(--clay); background: var(--gold-soft); }
.ti-amenity-option input { width: auto; margin: 0; accent-color: var(--clay); }
@media (max-width: 480px) { .ti-amenity-picker { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; background: var(--paper-raised); border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); }
th, td { text-align: left; padding: 12px 14px; font-size: .88rem; border-bottom: 1px solid var(--line); }
th { background: var(--paper); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .18s var(--ease); }
tbody tr:hover { background: rgba(191,106,61,.05); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge-pending { background: #FCEBC8; color: #8A5B00; }
.badge-confirmed { background: #DCEFE1; color: var(--ok); }
.badge-cancelled { background: #FBE4E4; color: var(--danger); }
.badge-paid { background: #DCEFE1; color: var(--ok); }
.badge-review { background: #DCE9F5; color: #2B5D8C; }
.badge-under-contract { background: #EDE4F7; color: #6B3FA0; }
.badge-closed { background: #D8ECEC; color: #1B6B6B; }

/* ---------- Booking cards (client & agency dashboards) ---------- */
.ti-booking-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 18px 20px; margin-bottom: 14px; transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.ti-booking-card:hover { box-shadow: var(--shadow-s); }
.ti-booking-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ti-booking-card-head strong { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; }
.ti-booking-meta { color: var(--ink-soft); font-size: .84rem; margin-top: 3px; }

/* ---------- Dossier (document review) workflow ---------- */
.ti-dossier {
  margin-top: 16px; padding: 16px 16px 8px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-s);
}

/* ---------- Dossier stepper (documents → signature → active) ---------- */
.ti-stepper { display: flex; flex-direction: column; }
.ti-stepper-step { display: flex; gap: 14px; position: relative; }
.ti-stepper-connector-line {
  position: absolute; left: 13px; top: -14px; width: 2px; height: 14px; background: var(--line);
}
.ti-stepper-connector-hidden { display: none; }
.ti-stepper-marker {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; background: var(--paper-raised); border: 2px solid var(--line); color: var(--ink-soft);
}
.ti-stepper-marker svg { width: 13px; height: 13px; }
.ti-stepper-completed .ti-stepper-marker { background: var(--ok); border-color: var(--ok); color: #fff; }
.ti-stepper-completed .ti-stepper-connector-line { background: var(--ok); }
.ti-stepper-active .ti-stepper-marker { background: var(--clay); border-color: var(--clay); color: #fff; }
.ti-stepper-upcoming .ti-stepper-title { color: var(--ink-soft); }
.ti-stepper-body { flex: 1; min-width: 0; padding-bottom: 20px; }
.ti-stepper-step:last-child .ti-stepper-body { padding-bottom: 4px; }
.ti-stepper-title { font-size: .9rem; font-weight: 700; padding-top: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ti-stepper-due { font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--clay-dark); }
.ti-stepper-due-soon { background: rgba(214,162,76,.25); color: var(--clay-dark); }
.ti-stepper-due-overdue { background: rgba(178,58,58,.12); color: var(--danger); }
.ti-stepper-status { font-size: .84rem; color: var(--ink-soft); margin-top: 4px; }
.ti-dossier-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ti-dossier-icon {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--gold-soft); color: var(--clay-dark);
  display: flex; align-items: center; justify-content: center;
}
.ti-dossier-icon svg { width: 15px; height: 15px; }
.ti-dossier-head strong { font-size: .92rem; margin-right: auto; }
.ti-dossier-docs { display: flex; flex-direction: column; gap: 0; }
.ti-dossier-doc { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ti-dossier-doc:last-child { border-bottom: none; }
.ti-dossier-doc-info { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: .87rem; }
.ti-dossier-doc-label { font-weight: 600; }
.ti-doc-status-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--line); }
.ti-doc-status-dot.pending { background: #C9BEA4; }
.ti-doc-status-dot.submitted { background: var(--gold); }
.ti-doc-status-dot.approved { background: var(--ok); }
.ti-doc-status-dot.rejected { background: var(--danger); }
.ti-doc-filename {
  display: inline-flex; align-items: center; gap: 5px; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px; font-size: .76rem; color: var(--ink-soft); font-weight: 600;
}
.ti-doc-filename::before { content: "📎"; font-size: .78rem; }
.ti-doc-view-link {
  display: inline-flex; align-items: center; gap: 4px; background: none; border: none; cursor: pointer;
  color: var(--clay-dark); font-size: .78rem; font-weight: 700; padding: 2px 4px; transition: color .2s var(--ease);
}
.ti-doc-view-link svg { width: 13px; height: 13px; }
.ti-doc-view-link:hover { color: var(--clay); text-decoration: underline; }

/* ---------- Empty state (dashboards) ---------- */
.ti-empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: 48px 24px; background: var(--paper-raised); border: 1px dashed var(--line); border-radius: var(--radius-m);
}
.ti-empty-state-icon {
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold-soft); color: var(--clay-dark);
  display: flex; align-items: center; justify-content: center;
}
.ti-empty-state-icon svg { width: 24px; height: 24px; }
.ti-empty-state p { color: var(--ink-soft); font-size: .92rem; max-width: 34ch; margin: 0; }
.ti-doc-note {
  margin-top: 6px; background: #FBE4E4; color: var(--danger); border-radius: var(--radius-s);
  padding: 8px 12px; font-size: .8rem;
}
.ti-dossier-doc-actions { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }

/* ---------- Rental ledger (deposit, charges, monthly schedule) ---------- */
.ti-rental-ledger { }
.ti-rental-deposit-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: .9rem; font-weight: 600; flex-wrap: wrap;
}
.ti-rental-deposit-row span:first-child { color: var(--ink-soft); font-weight: 600; }
.ti-rental-deposit-amount { font-family: var(--font-display); font-weight: 700; color: var(--deep); margin-right: auto; }
.ti-escrow-box {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 12px 14px; margin: 10px 0; font-size: .85rem;
}
.ti-escrow-box p { margin: 8px 0 0; color: var(--ink); }
.ti-escrow-box p strong { color: var(--deep); }
.ti-escrow-reason { color: var(--ink-soft) !important; font-size: .82rem; }
.ti-escrow-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ti-escrow-proposed { border-color: var(--gold); background: var(--gold-soft); }
.ti-charges-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.ti-charge-chip {
  background: var(--gold-soft); color: var(--clay-dark); font-size: .78rem; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
}
.ti-rental-no-charges { color: var(--ink-soft); font-size: .84rem; padding: 10px 0; margin: 0; font-style: italic; }
.ti-rental-schedule-table { width: 100%; border-collapse: collapse; margin-top: 8px; background: transparent; border: none; }
.ti-rental-schedule-table th, .ti-rental-schedule-table td { padding: 9px 8px; font-size: .85rem; border-bottom: 1px solid var(--line); text-align: left; }
.ti-rental-schedule-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); font-weight: 700; }
.ti-rental-schedule-table tr:last-child td { border-bottom: none; }

/* ---------- Client payments: monthly summary + expandable charge breakdown ---------- */
.ti-rental-monthly-summary {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 10px 0 14px;
  border-bottom: 1px solid var(--line); margin-bottom: 12px; font-size: .88rem;
}
.ti-rental-monthly-summary strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--clay-dark); }
.ti-monthly-breakdown { color: var(--ink-soft); font-size: .8rem; }

.ti-month-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ti-month-card { border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.ti-month-card-head {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--paper);
  border: none; cursor: pointer; text-align: left; font-family: inherit; font-size: .88rem; color: var(--ink);
}
.ti-month-name { font-weight: 700; flex: 1 1 auto; }
.ti-month-total { font-weight: 700; color: var(--clay-dark); }
.ti-month-chevron { width: 16px; height: 16px; color: var(--ink-soft); transition: transform .2s var(--ease); flex-shrink: 0; }
.ti-month-chevron svg { width: 100%; height: 100%; }
.ti-month-chevron.open { transform: rotate(180deg); }
.ti-month-breakdown {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px;
  padding: 14px; background: var(--paper-raised); border-top: 1px solid var(--line);
}
.ti-charge-status-box {
  display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-s);
}
.ti-charge-status-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); font-weight: 700; }
.ti-charge-status-amount { font-family: var(--font-display); font-size: .95rem; font-weight: 600; }
.ti-month-breakdown-action { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 4px; }

.ti-charge-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ti-charge-row:last-child { border-bottom: none; }
.ti-charge-row .ti-amenity-option { flex: 1; margin: 0; }
.ti-charge-amount { width: 130px; flex-shrink: 0; }
.ti-doc-badge-pending { background: #EFE9DB; color: #7A6E55; }
.ti-doc-badge-submitted { background: #FCEBC8; color: #8A5B00; }
.ti-doc-badge-approved { background: #DCEFE1; color: var(--ok); }
.ti-doc-badge-rejected { background: #FBE4E4; color: var(--danger); }
.ti-doc-approved-check {
  width: 24px; height: 24px; border-radius: 50%; background: #DCEFE1; color: var(--ok);
  display: flex; align-items: center; justify-content: center;
}
.ti-doc-approved-check svg { width: 13px; height: 13px; }

.ti-upload-btn { position: relative; overflow: hidden; cursor: pointer; }
.ti-upload-btn input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.ti-upload-btn svg { width: 14px; height: 14px; }

/* Dashboard listing filter bar */
.ti-table-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 16px;
  box-shadow: var(--shadow-s);
}
.ti-search-input-wrap { position: relative; flex: 1 1 220px; min-width: 180px; }
.ti-search-input-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-soft); pointer-events: none; }
.ti-search-input-wrap input { padding-left: 36px; }
.ti-table-filters select { flex: 1 1 150px; min-width: 130px; }
.ti-table-filters .ti-price-range { display: flex; align-items: center; gap: 6px; flex: 1 1 200px; }
.ti-table-filters .ti-price-range input { min-width: 0; }
.ti-table-filters .ti-price-range span { color: var(--ink-soft); font-size: .8rem; flex-shrink: 0; }
.ti-table-filters-reset { flex-shrink: 0; }
.ti-table-filters-count { color: var(--ink-soft); font-size: .84rem; margin-bottom: 14px; }
@media (max-width: 720px) { .ti-table-filters { flex-direction: column; align-items: stretch; } .ti-table-filters select, .ti-table-filters .ti-price-range { flex: 1 1 auto; } }

.ti-list-row { display: flex; gap: 16px; align-items: center; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px; margin-bottom: 12px; transition: box-shadow .25s var(--ease), border-color .25s var(--ease); }
.ti-list-row:hover { box-shadow: var(--shadow-s); border-color: transparent; }
.ti-row-frozen { opacity: .68; background: repeating-linear-gradient(135deg, var(--paper-raised), var(--paper-raised) 10px, var(--paper) 10px, var(--paper) 20px); }

/* ---------- Client pipeline tabs (agency dashboard) ---------- */
.ti-pipeline-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.ti-pipeline-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--paper-raised); cursor: pointer; font-family: inherit;
  font-size: .88rem; font-weight: 600; color: var(--ink-soft); transition: all .2s var(--ease);
}
.ti-pipeline-tab:hover { border-color: var(--gold); }
.ti-pipeline-tab.active { background: var(--deep); color: #fff; border-color: var(--deep); }
.ti-pipeline-count {
  background: rgba(255,255,255,.2); border-radius: 999px; padding: 1px 8px; font-size: .78rem; font-weight: 800;
}
.ti-pipeline-tab:not(.active) .ti-pipeline-count { background: var(--gold-soft); color: var(--clay-dark); }
.ti-list-row img { width: 90px; height: 70px; object-fit: cover; border-radius: var(--radius-s); }
.ti-list-row-body { flex: 1; }
.ti-list-row-actions { display: flex; gap: 8px; }
.ti-assign-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.ti-assign-label { font-size: .78rem; color: var(--ink-soft); font-weight: 600; flex-shrink: 0; }
.ti-assign-row select { max-width: 200px; padding: 6px 10px; font-size: .82rem; }

.ti-msg-thread { display: flex; flex-direction: column; gap: 10px; max-height: 380px; overflow-y: auto; padding: 4px; }
.ti-msg-bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: .88rem; }
.ti-msg-me { align-self: flex-end; background: var(--deep); color: #fff; border-bottom-right-radius: 4px; }
.ti-msg-them { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ti-msg-sender-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--clay-dark); margin-bottom: 3px; }

/* Modal */
.ti-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,37,47,.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .28s var(--ease), visibility .28s var(--ease);
}
.ti-modal-backdrop.open { opacity: 1; visibility: visible; }
.ti-modal {
  background: var(--paper-raised); border-radius: var(--radius-l); padding: 30px; max-width: 480px; width: 100%;
  max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(15,37,47,.28);
  transform: scale(.94) translateY(10px); transition: transform .32s var(--ease);
}
.ti-modal-backdrop.open .ti-modal { transform: scale(1) translateY(0); }
.ti-modal-close { float: right; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--ink-soft); transition: color .2s var(--ease), transform .2s var(--ease); line-height: 1; padding: 4px; }
.ti-modal-close:hover { color: var(--danger); transform: rotate(90deg); }
.ti-modal-wide { max-width: 640px; }

/* ---------- Sectioned admin forms (agency create/edit) ---------- */
.ti-form-section-title {
  margin: 26px 0 4px; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--clay-dark); font-weight: 800; border-top: 1px solid var(--line); padding-top: 18px;
}
.ti-form-section-title:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }
.ti-form-section-sub { margin: 0 0 12px; font-size: .82rem; color: var(--ink-soft); }

.ti-tier-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.ti-tier-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; border: 1.5px solid var(--line);
  border-radius: var(--radius-s); cursor: pointer; text-align: center; transition: border-color .2s var(--ease), background .2s var(--ease);
  position: relative;
}
.ti-tier-card input { position: absolute; opacity: 0; pointer-events: none; }
.ti-tier-card strong { font-family: var(--font-display); font-size: .95rem; }
.ti-tier-card span { font-size: .74rem; color: var(--ink-soft); }
.ti-tier-card.selected { border-color: var(--gold); background: var(--gold-soft); }
.ti-tier-card.selected strong { color: var(--clay-dark); }

.ti-plan-usage {
  display: flex; flex-wrap: wrap; gap: 18px; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 12px 16px; margin-bottom: 16px; font-size: .84rem; color: var(--ink-soft);
}
.ti-plan-usage strong { color: var(--ink); }
.ti-pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.ti-pay-methods label { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; text-align: center; cursor: pointer; font-size: .82rem; font-weight: 700; transition: border-color .2s var(--ease), background .2s var(--ease); }
.ti-pay-methods input { width: auto; display: inline; margin-right: 6px; }
.ti-pay-methods label:has(input:checked) { border-color: var(--clay); background: var(--gold-soft); }

/* Lightbox */
#modal-lightbox { background: rgba(10,20,25,.9); gap: 18px; }
.ti-lightbox-stage { position: relative; display: flex; flex-direction: column; align-items: center; max-width: 90vw; }
.ti-lightbox-stage img { max-width: 90vw; max-height: 82vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); opacity: 0; transition: opacity .25s var(--ease); }
.ti-lightbox-stage img.loaded { opacity: 1; }
.ti-lightbox-counter { margin-top: 12px; color: rgba(255,255,255,.75); font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.ti-lightbox-nav {
  background: rgba(255,255,255,.12); border: none; color: #fff; width: 46px; height: 46px; border-radius: 50%;
  font-size: 1.8rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease), transform .2s var(--ease); flex-shrink: 0;
}
.ti-lightbox-nav:hover { background: rgba(255,255,255,.24); transform: scale(1.06); }
@media (max-width: 620px) { .ti-lightbox-nav { width: 38px; height: 38px; font-size: 1.4rem; } }
@media (max-width: 480px) {
  .ti-account-name { display: none; }
  .ti-account-trigger { padding: 5px; }
  .ti-account-menu { right: -10px; min-width: 220px; }
}

/* Toast */
.ti-toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--deep); color: #fff; padding: 14px 22px;
  border-radius: var(--radius-s); box-shadow: 0 14px 34px rgba(15,37,47,.3); z-index: 200;
  opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .32s var(--ease), transform .32s var(--ease);
  pointer-events: none; font-size: .9rem; font-weight: 600;
}
.ti-toast.show { opacity: 1; transform: translateY(0) scale(1); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .ti-header-actions .ti-toggle-group { display: none; }
  .ti-burger { display: flex; }
  .ti-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--paper-raised); border-bottom: 1px solid var(--line); box-shadow: 0 14px 24px rgba(23,38,43,.08);
    padding: 6px 24px; gap: 2px; max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .3s var(--ease), opacity .25s var(--ease), padding .3s var(--ease);
  }
  .ti-nav.open { max-height: 320px; opacity: 1; padding: 14px 24px; }
  .ti-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .ti-nav a:last-child { border-bottom: none; }
  .ti-grid, .ti-cats, .ti-hoods, .ti-steps { grid-template-columns: repeat(2, 1fr); }
  .ti-search-form { grid-template-columns: 1fr 1fr; }
  .ti-detail-grid, .ti-listings-layout { grid-template-columns: 1fr; }
  .ti-dash { grid-template-columns: 1fr; }
  .ti-dash-side { display: flex; overflow-x: auto; gap: 6px; }
  .ti-sidebar-toggle { display: none; }
  .ti-footer-grid { grid-template-columns: 1fr 1fr; }
  .ti-newsletter-form { width: 100%; }
  .ti-newsletter-form input { flex: 1; min-width: 0; }
}
@media (max-width: 620px) {
  .ti-grid, .ti-cats, .ti-hoods, .ti-steps, .ti-stat-grid, .field-row, .ti-search-form { grid-template-columns: 1fr; }
  .ti-detail-hero { grid-template-columns: 1fr; height: auto; }
  .ti-detail-hero-side { grid-template-rows: 1fr 1fr; height: 280px; }
  .ti-footer-grid { grid-template-columns: 1fr; }
  .ti-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reports (generate + print/export as PDF) ---------- */
.ti-report-controls {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; margin-bottom: 24px;
}
#ti-print-root { display: none; }
.ti-report-controls .field { margin: 0; min-width: 180px; }
.ti-report { max-width: 820px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 36px 40px; box-shadow: var(--shadow-s); }
.ti-report-letterhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--deep); padding-bottom: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.ti-report-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ti-report-brand-logo { height: 28px; width: auto; display: block; }
.ti-report-letterhead h2 { margin: 0 0 4px; font-size: 1.5rem; }
.ti-report-letterhead p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.ti-report-meta { font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }
.ti-report-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; margin-bottom: 30px; }
.ti-report-kpi { text-align: center; padding: 14px 8px; background: var(--paper); border-radius: var(--radius-s); border: 1px solid var(--line); }
.ti-report-kpi b { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--deep); }
.ti-report-kpi span { font-size: .72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
.ti-report h3 { font-size: .92rem; text-transform: uppercase; letter-spacing: .04em; color: var(--clay-dark); margin: 26px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.ti-report-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.ti-report-table th, .ti-report-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.ti-report-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.ti-report-footer { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .74rem; color: var(--ink-soft); text-align: center; }

/* ---------- Property spec sheet ---------- */
.ti-property-sheet-actions { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.ti-sheet-hero { border-radius: var(--radius-m); overflow: hidden; margin-bottom: 24px; aspect-ratio: 16/8; background: var(--paper); }
.ti-sheet-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ti-sheet-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.ti-sheet-title-row h1 { font-size: 1.5rem; margin: 0 0 4px; }
.ti-sheet-location { color: var(--ink-soft); margin: 0; font-size: .92rem; }
.ti-sheet-price { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--clay-dark); white-space: nowrap; }
.ti-sheet-price small { font-size: .7rem; font-weight: 500; color: var(--ink-soft); }
.ti-sheet-desc { line-height: 1.65; color: var(--ink); white-space: pre-line; }
.ti-sheet-amenities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; page-break-inside: avoid; }
.ti-sheet-amenity { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.ti-sheet-amenity span { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.ti-sheet-photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; page-break-inside: avoid; }
.ti-sheet-photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-s); background: var(--paper); }
.ti-sheet-footer-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--line); page-break-inside: avoid;
}
.ti-sheet-contact { font-size: .88rem; line-height: 1.6; }
.ti-sheet-contact strong { display: block; font-family: var(--font-display); font-size: 1rem; margin-bottom: 2px; }
.ti-sheet-qr { text-align: center; font-size: .7rem; color: var(--ink-soft); max-width: 120px; }
.ti-sheet-qr img { border-radius: var(--radius-s); border: 1px solid var(--line); margin-bottom: 4px; }
.ti-report-insight {
  display: flex; gap: 14px; align-items: flex-start; background: var(--gold-soft); border: 1px solid rgba(214,162,76,.35);
  border-radius: var(--radius-m); padding: 16px 18px; margin-bottom: 28px;
}
.ti-report-insight-icon {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--paper); color: var(--clay-dark);
  display: flex; align-items: center; justify-content: center;
}
.ti-report-insight-icon svg { width: 16px; height: 16px; }
.ti-report-insight-label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--clay-dark); margin-bottom: 5px; }
.ti-report-insight p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--ink); }

@media print {
  body > *:not(#ti-print-root) { display: none !important; }
  #ti-print-root { display: block !important; }
  .no-print { display: none !important; }
  #ti-print-root .ti-report {
    max-width: 100%; box-shadow: none; border: none; padding: 0; margin: 0;
  }
  .ti-report-table { page-break-inside: auto; }
  .ti-report-table tr { page-break-inside: avoid; }
  @page { margin: 1.5cm; }
}

/* ---------- Skeleton loaders ---------- */
.ti-skeleton-el { pointer-events: none; }
.ti-shimmer {
  position: relative; overflow: hidden; background: var(--line);
}
.ti-shimmer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: ti-shimmer-sweep 1.5s ease-in-out infinite;
}
@keyframes ti-shimmer-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.ti-skel-line { height: 12px; border-radius: 6px; }
.ti-skel-circle { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.ti-skel-block { width: 100%; border-radius: var(--radius-s); }
.ti-agency-stat-grid .ti-skel-circle, .ti-stat-grid .ti-skel-circle { width: 34px; height: 34px; }

/* ---------- New-listing wizard ---------- */
.ti-wizard-progress { display: flex; align-items: center; margin-bottom: 26px; max-width: 640px; }
.ti-wizard-progress-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.ti-wizard-progress-dot {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--paper-raised); border: 2px solid var(--line); color: var(--ink-soft); font-size: .8rem; font-weight: 700;
  transition: all .25s var(--ease);
}
.ti-wizard-progress-step.active .ti-wizard-progress-dot { background: var(--clay); border-color: var(--clay); color: #fff; }
.ti-wizard-progress-step.done .ti-wizard-progress-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.ti-wizard-progress-label { font-size: .68rem; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.ti-wizard-progress-step.active .ti-wizard-progress-label { color: var(--ink); }
.ti-wizard-progress-line { flex: 1; height: 2px; background: var(--line); margin: 0 6px 18px; min-width: 16px; }
.ti-wizard-progress-line.done { background: var(--ok); }

.ti-wizard-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.ti-wizard-form { max-width: 640px; }
.ti-wizard-step h4 { margin: 0 0 18px; font-size: 1rem; color: var(--deep); }
.ti-wizard-nav { display: flex; gap: 10px; margin-top: 24px; }

.ti-wizard-preview { position: sticky; top: calc(var(--header-h, 68px) + 20px); }
.ti-wizard-preview-label { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 10px; }
.ti-wizard-preview .ti-card { pointer-events: none; }

@media (max-width: 900px) {
  .ti-wizard-layout { grid-template-columns: 1fr; }
  .ti-wizard-preview { position: static; max-width: 340px; }
  .ti-wizard-progress { max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
}

/* ---------- Admin: characteristics catalog ---------- */
.ti-amenity-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ti-amenity-catalog-card {
  display: flex; flex-direction: column; gap: 10px; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-m); padding: 16px; transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.ti-amenity-catalog-card:hover { box-shadow: var(--shadow-s); transform: translateY(-2px); }
.ti-amenity-catalog-head { display: flex; align-items: center; gap: 10px; }
.ti-amenity-catalog-head strong { min-width: 0; overflow-wrap: break-word; }
.ti-amenity-catalog-icon { font-size: 1.4rem; flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--gold-soft); border-radius: 50%; }
.ti-amenity-catalog-types { display: flex; gap: 4px; flex-wrap: wrap; }
.ti-amenity-catalog-actions { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.ti-amenity-catalog-actions .btn { flex: 1; }

.ti-icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; max-height: 200px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); }
.ti-icon-picker-opt {
  width: 38px; height: 38px; border-radius: var(--radius-s); border: 1.5px solid transparent; background: var(--paper-raised);
  font-size: 1.15rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s var(--ease);
}
.ti-icon-picker-opt:hover { border-color: var(--line); transform: scale(1.08); }
.ti-icon-picker-opt.active { border-color: var(--clay); background: var(--gold-soft); }
.ti-amenity-type-checks { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; }
.ti-amenity-type-checks label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

/* ---------- Review tags & sentiment insights ---------- */
.ti-review-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ti-review-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.ti-review-tag-positive { background: rgba(30,107,79,.12); color: var(--ok); }
.ti-review-tag-negative { background: rgba(178,58,58,.1); color: var(--danger); }
.ti-review-insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
@media (max-width: 700px) { .ti-review-insight-grid { grid-template-columns: 1fr; } }
.ti-review-insight-grid h5 { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin: 0 0 10px; }
.ti-review-insight-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ti-review-insight-row:last-child { border-bottom: none; }
.ti-review-insight-row b { font-family: var(--font-display); color: var(--deep); }

/* ---------- Audit log timeline ---------- */
.ti-audit-count { font-size: .82rem; color: var(--ink-soft); margin: 14px 0 10px; }
.ti-audit-timeline { display: flex; flex-direction: column; gap: 22px; }
.ti-audit-day-label {
  font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--clay-dark);
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.ti-audit-day-group { display: flex; flex-direction: column; gap: 2px; }
.ti-audit-entry { display: flex; gap: 12px; padding: 10px 8px; border-radius: var(--radius-s); transition: background .15s var(--ease); }
.ti-audit-entry:hover { background: var(--paper-raised); }
.ti-audit-entry-icon {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--gold-soft); color: var(--clay-dark);
  display: flex; align-items: center; justify-content: center;
}
.ti-audit-entry-icon svg { width: 15px; height: 15px; }
.ti-audit-entry-body { flex: 1; min-width: 0; }
.ti-audit-entry-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .88rem; }
.ti-audit-entry-time { color: var(--ink-soft); font-size: .76rem; margin-left: auto; }
.ti-audit-entry-action { color: var(--ink-soft); font-size: .85rem; margin-top: 2px; }
.ti-audit-entry-target { color: var(--ink); font-weight: 600; }
.ti-audit-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.ti-audit-pagination-pages { display: flex; gap: 4px; }
.ti-audit-page-btn {
  width: 30px; height: 30px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--paper-raised);
  color: var(--ink); font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .15s var(--ease);
}
.ti-audit-page-btn:hover { border-color: var(--clay); }
.ti-audit-page-btn.active { background: var(--clay); border-color: var(--clay); color: #fff; }

/* ---------- Client overview ---------- */
.ti-overview-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px 24px;
}

/* ---------- Agency sub-site (white-label mode) ---------- */
.ti-subsite-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  background: var(--deep); color: rgba(255,255,255,.88); font-size: .82rem; padding: 8px 16px; text-align: center;
}
.ti-subsite-banner a { color: var(--gold); font-weight: 700; text-decoration: none; }
.ti-subsite-banner a:hover { text-decoration: underline; }
.ti-brand-logo-custom { height: 34px; width: auto; max-width: 160px; object-fit: contain; display: block; }
.ti-powered-by-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: rgba(255,255,255,.55);
  text-decoration: none; transition: color .2s var(--ease);
}
.ti-powered-by-badge strong { color: rgba(255,255,255,.85); }
.ti-powered-by-badge:hover { color: rgba(255,255,255,.85); }

.ti-subsite-panel { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px 20px; }
.ti-subsite-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ti-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.ti-switch input { opacity: 0; width: 0; height: 0; }
.ti-switch-track { position: absolute; inset: 0; background: var(--line); border-radius: 999px; cursor: pointer; transition: background .2s var(--ease); }
.ti-switch-track::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s var(--ease); box-shadow: var(--shadow-s); }
.ti-switch input:checked + .ti-switch-track { background: var(--clay); }
.ti-switch input:checked + .ti-switch-track::before { transform: translateX(20px); }
.ti-subsite-details { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .ti-subsite-details { grid-template-columns: 1fr; } }
.ti-subsite-url-row { display: flex; gap: 8px; align-items: center; }
.ti-subsite-url-row input { flex: 1; font-family: monospace; font-size: .82rem; background: var(--paper); }
.ti-subsite-logo-preview { width: 64px; height: 64px; border-radius: var(--radius-s); border: 1px solid var(--line); object-fit: contain; background: var(--paper); padding: 6px; }
.ti-subsite-qr { text-align: center; }
.ti-subsite-qr img { border-radius: var(--radius-s); border: 1px solid var(--line); }

/* ---------- Announcements ---------- */
.ti-announcement-form { max-width: 520px; display: flex; flex-direction: column; gap: 4px; }
.ti-announcement-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 16px 18px; margin-bottom: 12px;
}
.ti-announcement-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ti-announcement-head strong { font-family: var(--font-display); font-size: 1rem; }
.ti-announcement-date { font-size: .76rem; color: var(--ink-soft); white-space: nowrap; }
.ti-announcement-agency { display: block; font-size: .78rem; color: var(--clay-dark); font-weight: 700; margin: 4px 0 8px; }
.ti-announcement-card p { margin: 0; color: var(--ink); line-height: 1.55; font-size: .92rem; }
.ti-announcement-card .btn { margin-top: 10px; }

/* ---------- Reusable rich message editor ---------- */
.ti-rich-editor { border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.ti-rich-editor-toolbar {
  display: flex; align-items: center; gap: 2px; padding: 6px 8px; background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.ti-rich-editor-toolbar button {
  width: auto; min-width: 28px; height: 28px; padding: 0 6px; border-radius: var(--radius-s); border: none; background: transparent;
  color: var(--ink); cursor: pointer; font-size: .85rem; transition: background .15s var(--ease);
}
.ti-rich-editor-toolbar button:hover { background: var(--line); }
.ti-rich-editor-toolbar button svg { width: 15px; height: 15px; }
.ti-rich-editor-sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.ti-rich-editor-toolbar select { border: none; background: transparent; font-size: .82rem; color: var(--ink-soft); margin-left: auto; }
.ti-rich-editor textarea {
  width: 100%; border: none; border-radius: 0; padding: 12px 14px; min-height: 100px; resize: vertical;
  font-family: var(--font-body); font-size: .92rem;
}
.ti-rich-editor textarea:focus { outline: none; box-shadow: none; }
.ti-rich-editor-preview-label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); font-weight: 700;
  padding: 8px 14px 4px; border-top: 1px solid var(--line); background: var(--paper);
}
.ti-rich-editor-preview { padding: 4px 14px 14px; background: var(--paper); font-size: .88rem; line-height: 1.6; color: var(--ink); }
.ti-rich-editor-preview ul { margin: 6px 0; padding-left: 20px; }
.ti-rich-var { background: var(--gold-soft); color: var(--clay-dark); border-radius: 4px; padding: 1px 4px; font-weight: 600; }

/* ---------- Row-actions overflow menu ---------- */
.ti-row-menu-wrap { position: relative; }
.ti-row-menu-trigger {
  width: 34px; height: 34px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--paper-raised);
  color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.ti-row-menu-trigger:hover { background: var(--paper); border-color: var(--clay); }
.ti-row-menu-trigger svg { width: 16px; height: 16px; }
.ti-row-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-m);
  padding: 6px; flex-direction: column; gap: 2px;
}
.ti-row-menu.open { display: flex; }
.ti-row-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-s);
  border: none; background: transparent; color: var(--ink); font-size: .84rem; line-height: 1.3; cursor: pointer; transition: background .15s var(--ease);
}
.ti-row-menu button svg { width: 15px; height: 15px; flex-shrink: 0; }
.ti-row-menu button:hover { background: var(--paper); }
.ti-row-menu-divider { height: 1px; background: var(--line); margin: 4px 2px; }
.ti-row-menu-danger { color: var(--danger) !important; }
.ti-row-menu-danger:hover { background: rgba(178,58,58,.08) !important; }

/* ---------- Agent detail ---------- */
.ti-agent-detail-head { display: flex; align-items: center; gap: 16px; }
.ti-agent-detail-head h3 { margin-bottom: 4px; }
.ti-agent-row-stats { display: flex; gap: 16px; margin-top: 4px; font-size: .78rem; color: var(--ink-soft); }
.ti-agent-row-stats span { display: inline-flex; align-items: center; gap: 4px; }
.ti-agent-row-stats svg { width: 13px; height: 13px; }
