/* ==========================================================================
   Smart Tenant Management System — Core Stylesheet
   Mobile-first, WebView-optimized, dark-blue/white "premium SaaS" theme.
   ========================================================================== */

:root {
  --theme-gradient-end-rgb: 79 70 229;
  --theme-action-gradient: linear-gradient(175deg, #ffffff26, transparent 48%), linear-gradient(120deg, rgb(var(--theme-indigo-rgb)), rgb(var(--theme-gradient-end-rgb)));
  /* Theme-switchable master colors (Master Admin → Theme Management).
     Every other brand color token below — plus .landing-redesign's own
     --gr-* variables in landing-redesign.css and Tailwind's brand.*
     colors in tailwind.config.js — derives from these six RGB triplets,
     so picking a theme recolors the portal chrome, buttons, links and
     the public GoRentora pages all at once, from one small override
     block a theme injects into <head> (see header-public.php/
     header-portal.php). RGB-triplet format (not hex) is required so
     Tailwind's bg-brand-x/10-style opacity modifiers keep working. */
  --theme-navy-rgb: 15 23 42;        /* #0F172A */
  --theme-navy-light-rgb: 30 41 59;  /* #1E293B */
  --theme-navy-dark-rgb: 2 6 23;     /* #020617 */
  --theme-indigo-rgb: 37 99 235;     /* #2563EB */
  --theme-teal-rgb: 6 182 212;       /* #06B6D4 */
  --theme-emerald-rgb: 16 185 129;   /* #10B981 */

  --color-primary: rgb(var(--theme-navy-rgb));
  --color-primary-light: rgb(var(--theme-navy-light-rgb));
  --color-primary-dark: rgb(var(--theme-navy-dark-rgb));
  --color-accent: rgb(var(--theme-indigo-rgb));
  --color-accent-2: rgb(var(--theme-teal-rgb));
  --color-white: #FFFFFF;
  --color-bg: color-mix(in srgb, rgb(var(--theme-indigo-rgb)) 4%, #f8fafc);
  --color-surface: #FFFFFF;
  --color-border: #E6E9F2;
  --color-text: #16213E;
  --color-text-muted: #475569;
  --color-success: #1FAE6E;
  --color-warning: #F5A623;
  --color-danger: #E5484D;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --shadow-card: 0 2px 10px rgba(11, 37, 89, 0.06);
  --shadow-card-hover: 0 10px 30px rgba(11, 37, 89, 0.12);
  --shadow-nav: 0 -2px 16px rgba(11, 37, 89, 0.08);

  --header-height: 60px;
  --bottom-nav-height: 64px;
  --sidebar-width: 260px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  min-height: 100vh;
  min-height: 100dvh;
}

a { text-decoration: none; color: inherit; }
button { touch-action: manipulation; font-family: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 10px; }

/* ---------------------------------------------------------------------- */
/* Buttons — large touch targets (min 44px) per mobile UX rules            */
/* ---------------------------------------------------------------------- */
.btn-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
}
.btn-app:hover { transform: translateY(-1px); }
.btn-app:active { transform: scale(0.97); }
.btn-app-primary { background: var(--color-primary); color: var(--color-white); box-shadow: 0 4px 14px rgba(11,37,89,0.25); }
.btn-app-primary:hover { background: var(--color-primary-light); box-shadow: 0 10px 22px rgba(11,37,89,0.32); }
.btn-app-accent { background: var(--color-accent); color: var(--color-white); box-shadow: 0 4px 14px rgba(62,124,255,0.3); }
.btn-app-outline { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-border); }
.btn-app-block { width: 100%; }
.btn-app[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------------------- */
/* Guest layout (auth screens)                                             */
/* ---------------------------------------------------------------------- */
.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 55%, #050f26 100%);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  animation: cardIn .5s ease both;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
}
.auth-brand-name { font-weight: 700; font-size: 17px; color: var(--color-primary); }
.auth-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: var(--color-text); }
.auth-subtitle { font-size: 14px; color: var(--color-text-muted); margin: 0 0 24px; }

.form-app-group { margin-bottom: 18px; }
.form-app-label { display: block; font-size: 13px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.form-app-control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: #FBFCFE;
  font-size: 15px;
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-app-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(62,124,255,0.15);
  background: #fff;
}
.form-app-error { color: var(--color-danger); font-size: 12.5px; margin-top: 5px; display: none; }
.form-app-group.has-error .form-app-control { border-color: var(--color-danger); }
.form-app-group.has-error .form-app-error { display: block; }
.auth-links { text-align: center; margin-top: 18px; font-size: 14px; color: var(--color-text-muted); }
.auth-links a { color: var(--color-accent); font-weight: 600; }

/* ---------------------------------------------------------------------- */
/* Portal shell: sticky header + sidebar (desktop) + bottom nav (mobile)   */
/* ---------------------------------------------------------------------- */
.portal-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.portal-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-height);
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.12);
}
.portal-header-left { display: flex; align-items: center; gap: 10px; }
.portal-hamburger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,0.12);
  border: none; color: #fff; font-size: 18px;
}
.portal-header-title { font-weight: 700; font-size: 16px; }
.portal-header-right { display: flex; align-items: center; gap: 10px; }
.portal-icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12); color: #fff; border: none; position: relative;
}
.portal-icon-btn .badge-dot {
  position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-danger); border: 2px solid var(--color-primary);
}
.portal-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-accent); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}

.portal-body { flex: 1; display: flex; }

.portal-sidebar {
  display: none;
  width: var(--sidebar-width);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 18px 12px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--color-text-muted); font-weight: 600; font-size: 14.5px;
  margin-bottom: 4px; transition: background var(--transition-fast), color var(--transition-fast);
}
.sidebar-link i { font-size: 18px; width: 20px; text-align: center; }
.sidebar-link:hover { background: var(--color-bg); color: var(--color-primary); }
.sidebar-link.active { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); color: #fff; box-shadow: 0 6px 16px rgba(11,37,89,0.25); }

.portal-main { flex: 1; min-width: 0; padding: 18px 14px calc(var(--bottom-nav-height) + 26px); }

.mobile-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(7,26,61,0.5); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity var(--transition-base);
}
.mobile-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.mobile-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 82%; max-width: 300px;
  background: var(--color-surface); z-index: 61; padding: 18px 14px;
  transform: translateX(-100%); transition: transform var(--transition-base);
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: var(--bottom-nav-height);
  background: var(--color-surface);
  box-shadow: var(--shadow-nav);
  display: flex; align-items: stretch; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--color-text-muted); font-size: 11px; font-weight: 600;
}
.bottom-nav-item i { font-size: 20px; }
.bottom-nav-item.active { color: var(--color-primary); }
.bottom-nav-item.active i { color: var(--color-accent); }

@media (min-width: 992px) {
  .portal-sidebar { display: block; }
  .portal-hamburger { display: none; }
  .bottom-nav { display: none; }
  .portal-main { padding-bottom: 26px; }
}

/* ---------------------------------------------------------------------- */
/* Cards / stats / dashboard widgets                                       */
/* Frontend Architecture Upgrade — Tailwind-inspired "soft card" look      */
/* (rounded-2xl / shadow-sm / slate-100 border) applied here, once, so     */
/* every Staff / Property Admin / Tenant / Master Admin view that already  */
/* uses .app-card / .stat-card picks it up with no per-view markup change. */
/* ---------------------------------------------------------------------- */
.app-card {
  background: var(--color-surface);
  border-radius: 16px;
  border: 1px solid #F1F5F9;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.06);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.app-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { display: flex; flex-direction: column; gap: 8px; }
a.stat-card { color: var(--color-text); }
a.stat-card:hover { border-color: var(--color-accent); }
a.stat-card:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
#property-card { scroll-margin-top: 100px; }
.stat-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 19px; color: #fff;
  box-shadow: 0 4px 10px -2px rgba(0,0,0,0.15);
}
.stat-value { font-size: 22px; font-weight: 800; color: var(--color-text); }
.stat-label { font-size: 12.5px; color: var(--color-text-muted); font-weight: 600; }

/* Modernized data tables — layered on top of Bootstrap's .table so no
   dashboard view's markup needs to change: rounded/uppercase header,
   divide-y row borders in a lighter slate tone, subtle row hover. */
.table > thead > tr > th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--color-text-muted); font-weight: 700; background: transparent;
}
.table > :not(caption) > * > * { border-bottom-color: #F1F5F9; }
.table > tbody > tr:hover { background: rgba(248, 250, 252, 0.8); }

.section-title { font-size: 17px; font-weight: 700; margin: 24px 0 12px; color: var(--color-text); }

.welcome-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff; border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(11,37,89,0.2);
}
/* Same soft blurred-blob accent as the public homepage hero — keeps every
   dashboard's welcome banner visually part of the same design system. */
.welcome-banner::before, .welcome-banner::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(40px); opacity: .35; pointer-events: none;
}
.welcome-banner::before { width: 160px; height: 160px; background: #22C7B5; top: -70px; right: -40px; }
.welcome-banner::after { width: 140px; height: 140px; background: #3E7CFF; bottom: -70px; left: 10%; }
.welcome-banner h2, .welcome-banner p { position: relative; }
.welcome-banner h2 { margin: 0 0 4px; font-size: 19px; }
.welcome-banner p { margin: 0; opacity: 0.85; font-size: 13.5px; }

/* ---------------------------------------------------------------------- */
/* Empty states                                                            */
/* ---------------------------------------------------------------------- */
.empty-state { text-align: center; padding: 40px 16px; color: var(--color-text-muted); }
.empty-state i { font-size: 42px; color: var(--color-border); margin-bottom: 12px; display: block; }
.empty-state h4 { color: var(--color-text); font-size: 15px; margin: 0 0 4px; }
.empty-state p { font-size: 13.5px; margin: 0 0 16px; }

/* ---------------------------------------------------------------------- */
/* Skeleton loaders                                                         */
/* ---------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, #eef1f8 25%, #f6f8fc 37%, #eef1f8 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 10px;
}
@keyframes skeleton-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------------------------------------------------------------- */
/* Animations                                                               */
/* ---------------------------------------------------------------------- */
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.fade-in-up { animation: cardIn var(--transition-base) both; }

/* ---------------------------------------------------------------------- */
/* Onboarding guided tour                                                   */
/* ---------------------------------------------------------------------- */
.tour-overlay { position: fixed; inset: 0; background: rgba(7,26,61,0.55); z-index: 200; opacity: 0; pointer-events: none; transition: opacity var(--transition-base); }
.tour-overlay.open { opacity: 1; pointer-events: auto; }
.tour-highlight {
  position: absolute; border-radius: 14px;
  box-shadow: 0 0 0 4px var(--color-accent), 0 0 0 9999px rgba(7,26,61,0.55);
  transition: all var(--transition-base);
}
.tour-tooltip {
  position: absolute; max-width: 300px; background: #fff; border-radius: var(--radius-md);
  padding: 18px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); animation: cardIn .3s ease both;
}
.tour-tooltip-progress { font-size: 11.5px; font-weight: 700; color: var(--color-accent); margin-bottom: 6px; letter-spacing: .04em; text-transform: uppercase; }
.tour-tooltip h5 { margin: 0 0 6px; font-size: 15.5px; color: var(--color-text); }
.tour-tooltip p { margin: 0 0 16px; font-size: 13.5px; color: var(--color-text-muted); }
.tour-tooltip-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------------------------------------------------------------------- */
/* Notifications (Module 11)                                                */
/* ---------------------------------------------------------------------- */
.notif-row { cursor: pointer; }
.notif-row.notif-unread { background: #F0F5FF; border-color: #C9DCFF; }
.notif-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-bg); color: var(--color-primary); font-size: 16px;
}
.badge-dot-inline { width: 8px; height: 8px; border-radius: 50%; background: var(--color-danger); flex-shrink: 0; margin-top: 4px; }

.notif-dropdown {
  position: absolute; top: 56px; right: 12px; width: 320px; max-width: calc(100vw - 24px);
  background: #fff; border-radius: var(--radius-md); box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  z-index: 210; display: none; overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--color-border);
}
.notif-dropdown-header h6 { margin: 0; font-size: 14px; font-weight: 700; color: var(--color-text); }
.notif-dropdown-header a { font-size: 12px; font-weight: 600; color: var(--color-primary); text-decoration: none; }
.notif-dropdown-list { max-height: 340px; overflow-y: auto; }
.notif-dropdown-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--color-border); text-decoration: none;
}
.notif-dropdown-item:last-child { border-bottom: none; }
.notif-dropdown-item.unread { background: #F0F5FF; }
.notif-dropdown-item .notif-icon { width: 30px; height: 30px; font-size: 14px; }
.notif-dropdown-item-title { font-size: 13px; font-weight: 700; color: var(--color-text); margin-bottom: 2px; }
.notif-dropdown-item-msg { font-size: 12px; color: var(--color-text-muted); line-height: 1.4; }
.notif-dropdown-item-time { font-size: 10.5px; color: var(--color-text-muted); margin-top: 4px; }
.notif-dropdown-empty { padding: 28px 14px; text-align: center; color: var(--color-text-muted); font-size: 13px; }
.notif-dropdown-footer { padding: 10px 14px; text-align: center; border-top: 1px solid var(--color-border); }

/* Priority (client-requested addition, migration 017) — important/urgent
   notifications stand out visually in both the dropdown list and the
   popup toast, normal ones keep the original neutral styling. */
.notif-dropdown-item.notif-priority-important { border-left: 3px solid var(--color-warning); }
.notif-dropdown-item.notif-priority-urgent { border-left: 3px solid var(--color-danger); background: #FFF3F3; }
.notif-dropdown-item.notif-priority-urgent.unread { background: #FFE9E9; }
.notif-dropdown-item.notif-priority-important .notif-icon { background: #FFF6E6; color: var(--color-warning); }
.notif-dropdown-item.notif-priority-urgent .notif-icon { background: #FFE9E9; color: var(--color-danger); }

.notif-popup.notif-priority-important { border-left: 4px solid var(--color-warning); }
.notif-popup.notif-priority-urgent { border-left: 4px solid var(--color-danger); }
.notif-dropdown-footer a { font-size: 12.5px; font-weight: 700; color: var(--color-primary); text-decoration: none; }

/* Mandatory center notification modal (Critical/Important — spec "MAJOR UX
   IMPROVEMENT — NOTIFICATION SYSTEM"). SweetAlert2's own popup is already
   responsive (relative width, max-width, scrollable body); this only adds
   the priority accent + a touch more mobile breathing room. */
.notif-modal { border-top: 5px solid var(--color-warning); border-radius: 16px; max-width: 92vw; }
.notif-modal.notif-priority-urgent { border-top-color: var(--color-danger); }
@media (max-width: 480px) {
  .notif-modal { width: 92vw !important; padding: 1rem !important; }
}

/* ---------------------------------------------------------------------- */
/* Public marketing site (Section 3 audit gap — homepage/search/enquiry)   */
/* Full-width shell, deliberately distinct from the narrow .auth-shell     */
/* "auth-card" used by login/register, and from the fixed-sidebar         */
/* .portal-shell used by the 4 authenticated portals.                     */
/* ---------------------------------------------------------------------- */
.public-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.public-navbar {
  background: var(--color-surface); border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-card);
}
.public-navbar-inner {
  /* Full viewport width with a minimal side gutter — no more capped
     1180px "boxed" strip. Applies to every header-public.php page. */
  width: 100%; margin: 0; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.public-brand { display: flex; align-items: center; gap: 10px; }
.public-brand-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--color-primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.public-brand-logo { height: 38px; max-width: 140px; object-fit: contain; }
.public-brand-name { font-weight: 800; font-size: 17px; color: var(--color-primary); }
.public-nav-toggle {
  display: none; background: none; border: none; font-size: 22px; color: var(--color-primary); cursor: pointer;
}
.public-nav-links { display: flex; align-items: center; gap: 22px; }
.public-nav-links a:not(.btn-app) {
  font-weight: 600; font-size: 14.5px; color: var(--color-text-muted); text-decoration: none;
}
.public-nav-links a:not(.btn-app):hover, .public-nav-links a:not(.btn-app).active { color: var(--color-primary); }
.public-nav-links .btn-app { padding: 8px 18px; }

.public-main { flex: 1; width: 100%; margin: 0; padding: 16px 24px 60px; }

.public-hero {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff; border-radius: var(--radius-lg); padding: 32px 32px 40px; margin-bottom: 32px;
  box-shadow: var(--shadow-card-hover);
}
.public-hero h1 { font-size: 30px; font-weight: 800; margin: 0 0 10px; }
.public-hero p { font-size: 15.5px; opacity: .88; margin: 0 0 22px; max-width: 560px; }
.public-hero-search { background: #fff; border-radius: var(--radius-md); padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }

.public-stats { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.public-stat-value { font-size: 24px; font-weight: 800; }
.public-stat-label { font-size: 12.5px; opacity: .8; }

.public-hero-badge {
  display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28); border-radius: 999px; padding: 6px 14px;
  font-size: 12.5px; font-weight: 600; margin-bottom: 16px;
}

/* Section headings shared by "How It Works" / "Why Choose Us" */
.section-heading { text-align: center; max-width: 520px; margin: 44px auto 24px; }
.section-heading h2 { font-size: 22px; font-weight: 800; color: var(--color-primary); margin: 0 0 6px; }
.section-heading p { font-size: 14px; color: var(--color-text-muted); margin: 0; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 8px; }
.step-card {
  background: var(--color-surface); border-radius: var(--radius-md); padding: 24px 20px;
  box-shadow: var(--shadow-card); text-align: center; position: relative;
}
.step-number {
  position: absolute; top: 14px; right: 16px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-bg); color: var(--color-text-muted); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step-icon { font-size: 30px; color: var(--color-accent); margin-bottom: 12px; display: block; }
.step-card h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 8px; color: var(--color-text); }
.step-card p { font-size: 13px; color: var(--color-text-muted); margin: 0; line-height: 1.55; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 8px; }
.feature-card {
  background: var(--color-surface); border-radius: var(--radius-md); padding: 22px 20px;
  box-shadow: var(--shadow-card); transition: var(--transition-base);
}
.feature-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(62,124,255,0.12);
  color: var(--color-accent); font-size: 20px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.feature-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; color: var(--color-text); }
.feature-card p { font-size: 13px; color: var(--color-text-muted); margin: 0; line-height: 1.55; }

.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.property-card {
  background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-card); transition: var(--transition-base);
}
.property-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.property-card-media { position: relative; display: block; text-decoration: none; }
.property-card-image {
  position: relative; aspect-ratio: 16 / 9; background: #EEF1F8; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.property-card-image img { width: 100%; height: 100%; object-fit: cover; }
.property-card-image > i { font-size: 32px; color: var(--color-primary); }
.property-card-pill {
  position: absolute; top: 8px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  background: rgba(255,255,255,0.95); color: var(--color-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.property-card-pill-type { left: 8px; }
.property-card-pill-rating { right: 8px; background: rgba(11,37,89,0.92); color: #fff; }
.property-card-badge-corner { position: absolute; bottom: 8px; left: 8px; font-size: 10px; }
.property-card-body { padding: 14px 16px; }
.property-card-title { display: block; font-weight: 700; font-size: 15.5px; color: var(--color-text); margin-bottom: 3px; text-decoration: none; }
.property-card-title:hover { color: var(--color-accent); }
.property-card-meta { font-size: 12.5px; color: var(--color-text-muted); margin-bottom: 8px; }
.property-card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.property-chip {
  font-size: 11px; font-weight: 600; color: var(--color-primary); background: #EEF1F8; border-radius: 999px; padding: 3px 9px;
}
.property-card-amenities { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }
.property-amenity { font-size: 11.5px; color: var(--color-text-muted); display: inline-flex; align-items: center; gap: 4px; }
.property-amenity i { color: var(--color-accent); }
.property-card-price { border-top: 1px solid var(--color-border); padding-top: 10px; margin-bottom: 12px; }
.property-card-price-label { font-size: 11.5px; color: var(--color-text-muted); display: block; }
.property-card-price-value { font-size: 18px; font-weight: 800; color: var(--color-text); }
.property-card-price-suffix { font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.property-card-actions { display: flex; gap: 8px; }
.property-card-actions .btn-app-outline { flex: 0 0 auto; }
.property-card-actions .btn-app-primary { flex: 1 1 auto; }

/* Value badge strip (hero) */
.value-badge-strip { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 18px; }
.value-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  color: #fff; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px; padding: 6px 12px;
}
.value-badge i { color: #7FD9CC; }

/* Multi-tier search bar (hero + browse) */
.public-search-bar-card { padding: 0; }
.public-search-budget { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.public-search-budget-label { font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); margin-right: 2px; }
.public-search-bar-hero .public-search-budget-label { color: rgba(255,255,255,0.7); }
.budget-pill {
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--color-border); background: #fff; color: var(--color-text-muted); transition: var(--transition-base);
}
.budget-pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.budget-pill.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.public-search-count { font-size: 12.5px; color: var(--color-text-muted); margin-top: 10px; }
.public-search-bar-hero .public-search-count { color: rgba(255,255,255,0.75); }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.testimonial-card { background: var(--color-surface); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-card); }
.testimonial-rating { color: var(--color-warning); font-size: 14px; margin-bottom: 8px; }
.testimonial-text { font-size: 13.5px; color: var(--color-text); line-height: 1.6; margin-bottom: 12px; }
.testimonial-author-name { display: block; font-weight: 700; font-size: 13.5px; color: var(--color-text); }
.testimonial-author-property { display: block; font-size: 12px; color: var(--color-text-muted); }

/* Property detail gallery */
.property-gallery-hero { aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: #EEF1F8; }
.property-gallery-hero img { width: 100%; height: 100%; object-fit: cover; }
.property-gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 2px; }
.property-gallery-thumb {
  flex-shrink: 0; width: 68px; height: 52px; padding: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: none; cursor: pointer; opacity: .7;
}
.property-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.property-gallery-thumb:hover { opacity: 1; }
.property-gallery-thumb.active { border-color: var(--color-accent); opacity: 1; }

/* Property detail key facts row */
.property-keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.property-keyfact {
  display: flex; align-items: center; gap: 10px; background: var(--color-surface); border-radius: var(--radius-md);
  padding: 12px 14px; box-shadow: var(--shadow-card); text-decoration: none;
}
.property-keyfact i { font-size: 18px; color: var(--color-accent); }
.property-keyfact-label { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.property-keyfact-value { display: block; font-size: 13.5px; font-weight: 700; color: var(--color-text); }
.property-keyfact-link .property-keyfact-value { color: var(--color-accent); }

/* Sticky mobile conversion bar (property detail) */
.property-sticky-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--color-surface); border-top: 1px solid var(--color-border); box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
}
.property-sticky-bar-icon { flex: 0 0 auto; width: 46px; padding-left: 0; padding-right: 0; }
.property-sticky-bar-cta { flex: 1 1 auto; }
@media (max-width: 575px) { .property-sticky-bar { display: flex; } }

.cta-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff; border-radius: var(--radius-lg); padding: 32px; margin-top: 44px;
}
.cta-banner h2 { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.cta-banner p { font-size: 14px; opacity: .85; margin: 0; max-width: 440px; }
.btn-app-light { background: #fff; color: var(--color-primary); box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
.btn-app-light:hover { background: #F4F6FB; }

.public-footer { background: var(--color-primary-dark); color: #fff; margin-top: auto; padding: 32px 24px 0; }
.public-footer-inner {
  width: 100%; margin: 0; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 24px;
}
.public-footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.public-footer-links a { color: rgba(255,255,255,0.75); font-size: 13.5px; text-decoration: none; }
.public-footer-links a:hover { color: #fff; }
.public-footer-legal {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px;
  border-top: 1px solid rgba(255,255,255,0.12); padding: 14px 14px 0; font-size: 12.5px;
}
.public-footer-legal a { color: rgba(255,255,255,0.65); text-decoration: none; }
.public-footer-legal a:hover { color: #fff; }
.public-footer-bottom {
  text-align: center; padding: 14px; font-size: 12.5px; opacity: .65;
}
.auth-footer-legal {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px;
  max-width: 420px; margin: 22px auto 0; font-size: 12px;
}
.auth-footer-legal a { color: var(--color-text-muted); text-decoration: none; }
.auth-footer-legal a:hover { color: var(--color-primary); }

@media (max-width: 767px) {
  .public-nav-toggle { display: block; }
  .public-nav-links {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px;
    box-shadow: var(--shadow-card); display: none;
  }
  .public-nav-links.open { display: flex; }
  .public-nav-links a:not(.btn-app) { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
  .public-nav-links .btn-app { margin-top: 10px; }
  .public-main { padding-top: 10px; }
  .public-hero { padding: 18px 20px 26px; }
  .public-hero h1 { font-size: 24px; }
  .section-heading { margin: 32px auto 18px; }
  .cta-banner { padding: 26px 22px; text-align: center; justify-content: center; }
  .cta-banner p { max-width: none; }
}

/* ---------------------------------------------------------------------- */
/* Public site — animated hero, scroll-reveal, pricing page                */
/* ---------------------------------------------------------------------- */

/* Animated gradient + floating blobs behind the hero banner. Purely
   decorative (aria-hidden), sits behind the hero content via z-index. */
.public-hero { position: relative; overflow: hidden; background-size: 220% 220%; animation: heroGradient 14s ease infinite; }
@keyframes heroGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.public-hero-blob {
  position: absolute; border-radius: 50%; filter: blur(2px); opacity: .18; pointer-events: none;
  background: radial-gradient(circle, #fff 0%, transparent 70%);
  animation: heroFloat 9s ease-in-out infinite;
}
.public-hero-blob.b1 { width: 220px; height: 220px; top: -60px; right: 8%; animation-duration: 11s; }
.public-hero-blob.b2 { width: 140px; height: 140px; bottom: -40px; right: 28%; animation-duration: 8s; animation-delay: -3s; }
.public-hero-blob.b3 { width: 90px; height: 90px; top: 20%; left: 4%; animation-duration: 7s; animation-delay: -1.5s; }
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%      { transform: translateY(-18px) translateX(10px); }
}
.public-hero > * { position: relative; z-index: 1; }
.public-hero-badge { animation: cardIn .6s ease both; }
.public-hero h1 { animation: cardIn .6s ease .08s both; }
.public-hero p { animation: cardIn .6s ease .16s both; }
.public-hero-search { animation: cardIn .6s ease .24s both; }
.public-stats { animation: cardIn .6s ease .32s both; }

/* Scroll-reveal: elements start hidden/offset, footer-public.php's
   IntersectionObserver adds .is-visible when they enter the viewport.
   Falls back to always-visible if JS never runs (progressive enhancement —
   see the no-js safety net at the bottom of this block). */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(0.4,0,0.2,1), transform .7s cubic-bezier(0.4,0,0.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-stagger.is-visible > * { animation: cardIn .55s cubic-bezier(0.4,0,0.2,1) both; }
.reveal-stagger.is-visible > *:nth-child(1) { animation-delay: .02s; }
.reveal-stagger.is-visible > *:nth-child(2) { animation-delay: .09s; }
.reveal-stagger.is-visible > *:nth-child(3) { animation-delay: .16s; }
.reveal-stagger.is-visible > *:nth-child(4) { animation-delay: .23s; }
.reveal-stagger.is-visible > *:nth-child(5) { animation-delay: .30s; }
.reveal-stagger.is-visible > *:nth-child(6) { animation-delay: .37s; }
/* No-JS safety net: if scripting is unavailable, footer-public.php's
   IntersectionObserver never runs to add .is-visible — don't leave
   content permanently invisible in that case. */
@media (scripting: none) {
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; animation: none; }
}

/* Property/feature/step cards already lift on hover — layer in a touch
   more life without changing their existing box-shadow behavior. */
.step-card, .feature-card, .property-card { will-change: transform; }

/* ---------------------------------------------------------------------- */
/* Pricing page                                                            */
/* ---------------------------------------------------------------------- */
.pricing-hero {
  text-align: center; max-width: 640px; margin: 8px auto 40px;
}
.pricing-hero h1 { font-size: 28px; font-weight: 800; color: var(--color-primary); margin: 0 0 10px; }
.pricing-hero p { font-size: 15px; color: var(--color-text-muted); margin: 0; }

.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; align-items: stretch;
}
.pricing-card {
  position: relative; background: var(--color-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); border: 1px solid var(--color-border);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .35s cubic-bezier(0.4,0,0.2,1), box-shadow .35s cubic-bezier(0.4,0,0.2,1);
}
.pricing-card:hover { transform: translateY(-6px) scale(1.015); box-shadow: 0 20px 46px rgba(11,37,89,0.16); }
.pricing-card.is-featured { border: 1px solid var(--color-accent); box-shadow: 0 16px 40px rgba(62,124,255,0.18); }
.pricing-card.is-featured:hover { box-shadow: 0 22px 50px rgba(62,124,255,0.26); }

.pricing-card-ribbon {
  position: absolute; top: 14px; right: -34px; transform: rotate(40deg);
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 40px; box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.pricing-card-head {
  padding: 26px 22px 20px; color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
}
.pricing-card.is-free .pricing-card-head { background: linear-gradient(135deg, #2c9d78, var(--color-accent-2)); }
.pricing-card-name { font-size: 15px; font-weight: 700; opacity: .9; text-transform: uppercase; letter-spacing: .03em; }
.pricing-card-price { display: flex; align-items: baseline; gap: 4px; margin-top: 8px; }
.pricing-card-price .amount { font-size: 34px; font-weight: 800; line-height: 1; }
.pricing-card-price .cycle { font-size: 12.5px; opacity: .8; }
.pricing-card-desc { font-size: 12.5px; opacity: .85; margin-top: 8px; line-height: 1.5; }

.pricing-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.pricing-feature-list { display: flex; flex-direction: column; gap: 11px; margin: 0 0 20px; flex: 1; }
.pricing-feature { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--color-text); }
.pricing-feature i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.pricing-feature.is-on i { color: var(--color-success); }
.pricing-feature.is-off { color: var(--color-text-muted); }
.pricing-feature.is-off i { color: #C7CCDC; }

.pricing-note {
  text-align: center; max-width: 560px; margin: 40px auto 0; font-size: 12.5px; color: var(--color-text-muted);
}

@media (max-width: 767px) {
  .pricing-card-ribbon { right: -38px; top: 12px; }
}

/* ---------------------------------------------------------------------- */
/* Legal / policy pages (Privacy, Terms, Refund, Data Deletion)            */
/* ---------------------------------------------------------------------- */
.legal-hero { text-align: center; max-width: 680px; margin: 8px auto 32px; }
.legal-hero h1 { font-size: 28px; font-weight: 800; color: var(--color-primary); margin: 0 0 8px; }
.legal-hero p { font-size: 14px; color: var(--color-text-muted); margin: 0; }

.legal-content { max-width: 820px; margin: 0 auto 40px; }
.legal-content h2 {
  font-size: 18px; font-weight: 800; color: var(--color-primary); margin: 30px 0 12px;
  padding-top: 6px; scroll-margin-top: 90px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 15px; font-weight: 700; color: var(--color-text); margin: 18px 0 8px; }
.legal-content p { font-size: 14.5px; line-height: 1.7; color: var(--color-text); margin: 0 0 12px; }
.legal-content ul, .legal-content ol { margin: 0 0 14px; padding-left: 22px; }
.legal-content li { font-size: 14.5px; line-height: 1.7; color: var(--color-text); margin-bottom: 6px; }
.legal-content a { color: var(--color-accent); font-weight: 600; }
.legal-content strong { color: var(--color-text); }
.legal-updated { font-size: 12.5px; color: var(--color-text-muted); text-align: center; margin-bottom: 28px; }

.legal-toc {
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center;
  font-size: 13px; margin-bottom: 30px; padding: 14px 18px; background: var(--color-surface-subtle, #F5F7FC);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
}
.legal-toc a { color: var(--color-text-muted); text-decoration: none; font-weight: 600; }
.legal-toc a:hover { color: var(--color-primary); }

.legal-permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 0 0 16px; }
.legal-permission-card {
  border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 14px 16px; background: var(--color-surface);
}
.legal-permission-card .icon {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(62,124,255,0.1); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; font-size: 17px; margin-bottom: 8px;
}
.legal-permission-card h4 { font-size: 13.5px; font-weight: 800; margin: 0 0 4px; color: var(--color-text); }
.legal-permission-card p { font-size: 12.5px; margin: 0; color: var(--color-text-muted); line-height: 1.55; }

.legal-callout {
  border-left: 4px solid var(--color-accent); background: rgba(62,124,255,0.06);
  padding: 12px 16px; border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: 0 0 16px;
}
.legal-callout p:last-child { margin-bottom: 0; }

@media (max-width: 767px) {
  .legal-hero h1 { font-size: 23px; }
}

/* ---------------------------------------------------------------------- */
/* App splash / loading screen — shown on public pages while the page and  */
/* its assets finish loading. Matters most when this site is wrapped in an */
/* Android WebView "app" shell, where a blank white flash on open reads as */
/* broken rather than loading. Self-removes once window 'load' fires (with */
/* a minimum visible time so it never just flickers, and a hard failsafe   */
/* so a slow/broken resource can never trap someone behind it forever).    */
/* ---------------------------------------------------------------------- */
.app-splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary) 55%, var(--color-accent));
  background-size: 200% 200%;
  animation: heroGradient 6s ease infinite;
  color: #fff;
  transition: opacity .5s ease, visibility .5s ease;
}
.app-splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.app-splash-badge { position: relative; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; }
.app-splash-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.18); border-top-color: #fff;
  animation: splashSpin 1s linear infinite;
}
.app-splash-mark {
  width: 58px; height: 58px; border-radius: 18px; background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; letter-spacing: .02em; overflow: hidden;
}
.app-splash-mark img { width: 100%; height: 100%; object-fit: contain; }
@keyframes splashSpin { to { transform: rotate(360deg); } }
.app-splash-name { font-size: 15px; font-weight: 700; letter-spacing: .02em; opacity: .95; }
.app-splash-dots { display: flex; gap: 6px; }
.app-splash-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .5;
  animation: splashDot 1.1s ease-in-out infinite;
}
.app-splash-dots span:nth-child(2) { animation-delay: .15s; }
.app-splash-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes splashDot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

/* ---------------------------------------------------------------------- */
/* Colorful icon variants — a small rotating palette applied to feature/   */
/* step icons in the view (icon-a/b/c/d) so the page reads as vibrant      */
/* rather than a single flat blue tint everywhere.                        */
/* ---------------------------------------------------------------------- */
.feature-icon.icon-a { background: linear-gradient(135deg, #3E7CFF, #6f9bff); color: #fff; }
.feature-icon.icon-b { background: linear-gradient(135deg, #22C7B5, #4fe0cf); color: #fff; }
.feature-icon.icon-c { background: linear-gradient(135deg, #F5A623, #ffc25c); color: #fff; }
.feature-icon.icon-d { background: linear-gradient(135deg, #8B5CF6, #b18cfb); color: #fff; }
.feature-icon { transition: transform .35s cubic-bezier(0.34,1.56,0.64,1); }
.feature-card:hover .feature-icon { transform: scale(1.1) rotate(-6deg); }

.step-icon-wrap {
  width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin: 0 auto 14px; color: #fff;
  box-shadow: 0 10px 22px rgba(11,37,89,0.18);
  transition: transform .35s cubic-bezier(0.34,1.56,0.64,1);
}
.step-icon-wrap.icon-a { background: linear-gradient(135deg, #3E7CFF, #6f9bff); }
.step-icon-wrap.icon-b { background: linear-gradient(135deg, #22C7B5, #4fe0cf); }
.step-icon-wrap.icon-c { background: linear-gradient(135deg, #F5A623, #ffc25c); }
.step-card:hover .step-icon-wrap { transform: scale(1.1) rotate(-6deg); }

/* Hero: subtle floating icons layered with the gradient blobs. */
.public-hero-float { position: absolute; color: rgba(255,255,255,0.16); pointer-events: none; animation: heroFloat 8s ease-in-out infinite; }
.public-hero-float.f1 { top: 12%; right: 12%; font-size: 52px; animation-duration: 9s; }
.public-hero-float.f2 { bottom: 18%; right: 32%; font-size: 32px; animation-duration: 7s; animation-delay: -2s; }
.public-hero-float.f3 { top: 58%; left: 6%; font-size: 28px; animation-duration: 10s; animation-delay: -4s; }
@media (max-width: 575px) { .public-hero-float { display: none; } }

.text-gradient-accent {
  background: linear-gradient(90deg, #fff, #BFD9FF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* CTA banners: a subtle dot-grid texture so the gradient isn't flat. */
.cta-banner { position: relative; overflow: hidden; }
.cta-banner::before {
  content: ''; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: radial-gradient(circle, #fff 1.5px, transparent 1.5px);
  background-size: 18px 18px;
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner .btn-app-light:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,0.2); }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .public-hero, .public-hero-blob, .public-hero-float, .public-hero-badge, .public-hero h1, .public-hero p,
  .public-hero-search, .public-stats, .reveal, .reveal-stagger > *, .pricing-card,
  .app-splash, .app-splash-ring, .app-splash-dots span, .feature-icon, .step-icon-wrap {
    animation: none !important; transition: none !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ---------------------------------------------------------------------- */
/* Utility                                                                  */
/* ---------------------------------------------------------------------- */
.text-muted-app { color: var(--color-text-muted); }
.no-scroll { overflow: hidden; }

/* ---------------------------------------------------------------------- */
/* Per-unit photo/video gallery overlay (STMS.openGallery, app.js)         */
/* ---------------------------------------------------------------------- */
.stms-gallery-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10, 14, 30, .92);
  display: flex; align-items: center; justify-content: center;
}
.stms-gallery-title {
  position: absolute; top: 18px; left: 20px; color: #fff; font-weight: 700; font-size: 15px;
  max-width: calc(100vw - 60px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stms-gallery-close {
  position: absolute; top: 12px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.stms-gallery-prev, .stms-gallery-next {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1;
  align-items: center; justify-content: center; cursor: pointer;
}
.stms-gallery-prev { left: 12px; }
.stms-gallery-next { right: 12px; }
.stms-gallery-counter {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.75); font-size: 13px;
}
@media (max-width: 480px) {
  .stms-gallery-prev, .stms-gallery-next { width: 38px; height: 38px; font-size: 24px; }
}

/* ---------------------------------------------------------------------- */
/* Quick Enquiry modal (public site, .js-quick-enquiry trigger, app.js)    */
/* ---------------------------------------------------------------------- */
.quick-enquiry-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(10, 14, 30, .55); align-items: center; justify-content: center; padding: 16px;
}
.quick-enquiry-overlay.is-open { display: flex; }
.quick-enquiry-panel {
  position: relative; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: var(--color-surface); border-radius: var(--radius-lg); padding: 26px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.quick-enquiry-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--color-bg); color: var(--color-text-muted); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.quick-enquiry-title { font-size: 18px; font-weight: 800; color: var(--color-text); margin: 0 0 4px; }

/* ---------------------------------------------------------------------- */
/* Practical Billing spec v2 — Staff Dashboard filter chips (Section 1)    */
/* Reuses .stat-grid/.stat-card's visual language, adds a clickable state. */
/* ---------------------------------------------------------------------- */
.stat-card-chip {
  cursor: pointer; border: 1.5px solid transparent; border-radius: var(--radius-md);
  transition: border-color var(--transition-base), background var(--transition-base);
}
.stat-card-chip:hover { background: var(--color-bg); }
.stat-card-chip.chip-active { border-color: var(--color-primary); background: var(--color-bg); }

.unit-row-list { display: flex; flex-direction: column; gap: 8px; }
.unit-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 12px; background: var(--color-bg); flex-wrap: wrap;
}
.unit-row-main { font-weight: 700; color: var(--color-text); font-size: 13.5px; }
.unit-row-sub { color: var(--color-text-muted); font-size: 12px; }

/* Quick Action Drawer */
.drawer-section { margin-bottom: 18px; }
.drawer-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); margin-bottom: 6px; }
.drawer-kv { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; border-bottom: 1px dashed var(--color-border); }
.drawer-kv:last-child { border-bottom: none; }

/* Bulk Utility Billing table */
.utility-billing-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 13px; }
.utility-billing-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); padding: 0 8px 4px; }
.utility-billing-table td { background: var(--color-bg); padding: 8px; vertical-align: middle; }
.utility-billing-table tr td:first-child { border-radius: 10px 0 0 10px; }
.utility-billing-table tr td:last-child { border-radius: 0 10px 10px 0; }
.utility-billing-table input, .utility-billing-table select {
  width: 100%; border: 1px solid var(--color-border); border-radius: 8px; padding: 6px 8px; font-size: 13px;
}
.quick-enquiry-subtitle { font-size: 13px; color: var(--color-text-muted); margin: 0 0 18px; }

/* Internal Messaging — chat thread bubbles */
.chat-message-list { display: flex; flex-direction: column; gap: 8px; }
.chat-message { max-width: 78%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; word-wrap: break-word; }
.chat-message-theirs { align-self: flex-start; background: var(--color-bg); border: 1px solid var(--color-border); border-bottom-left-radius: 4px; }
.chat-message-mine { align-self: flex-end; background: var(--color-primary); color: #fff; border-bottom-right-radius: 4px; margin-left: auto; }
.chat-message-mine .chat-message-time { color: rgba(255,255,255,.75); }
.chat-message-time { text-align: right; margin-top: 2px; }
.chat-message-mine a[href] { background: rgba(255,255,255,.2) !important; color: #fff !important; }

.auth-brand-logo, .public-brand-mark-img { object-fit: contain; flex: 0 0 auto; }
.auth-brand-logo { width: 42px; height: 42px; }
.public-brand-mark-img { width: 38px; height: 38px; }
.app-splash-logo { width: 100%; height: 100%; object-fit: contain; }

/* ---- Legal pages: horizontal tabs (policy switcher + section tabs) ----
   Server-rendered so the first tab is open on first paint; legal-tabs.js
   only upgrades it. With JS off, a noscript rule shows every section stacked. */
.legal-policy-tabs {
  display: flex; gap: 8px; max-width: 820px; margin: 0 auto 18px; padding: 4px 2px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; justify-content: center;
}
.legal-policy-tabs::-webkit-scrollbar, .legal-tablist::-webkit-scrollbar { display: none; }
.legal-policy-tab {
  flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700; text-decoration: none;
  color: var(--color-text-muted); background: #fff; border: 1px solid var(--color-border, #E3E7F1);
  transition: background .18s, color .18s, transform .16s, box-shadow .18s; white-space: nowrap;
}
.legal-policy-tab:hover { color: var(--color-primary); }
.legal-policy-tab:active { transform: scale(0.97); }
.legal-policy-tab.is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); box-shadow: 0 6px 16px rgba(15,23,42,.18); }

.legal-doc { max-width: 820px; margin: 0 auto 40px; }
.legal-tablist {
  display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  border-bottom: 1px solid var(--color-border, #E3E7F1); margin-bottom: 22px;
}
.legal-tab {
  flex: 0 0 auto; padding: 12px 14px; font-size: 13.5px; font-weight: 700; color: var(--color-text-muted);
  text-decoration: none; border: 0; background: none; border-bottom: 3px solid transparent; margin-bottom: -1px;
  cursor: pointer; white-space: nowrap; transition: color .18s, border-color .18s;
}
.legal-tab:hover { color: var(--color-primary); }
.legal-tab.is-active { color: var(--color-primary); border-bottom-color: var(--color-accent); }
.legal-tab:focus-visible, .legal-policy-tab:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 6px; }

.legal-doc .legal-panel { display: none; }
.legal-doc:not(.is-tabbed) .legal-panel:first-of-type { display: block; }
.legal-doc.is-tabbed .legal-panel.is-active { display: block; animation: legalPanelIn .22s ease-out; }
@keyframes legalPanelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.legal-panel h2 { font-size: 20px; font-weight: 800; color: var(--color-primary); margin: 0 0 12px; }
.legal-panel h3 { font-size: 15px; font-weight: 700; color: var(--color-text); margin: 16px 0 8px; }
.legal-panel p { font-size: 14.5px; line-height: 1.75; color: var(--color-text); margin: 0 0 12px; }
.legal-panel ul, .legal-panel ol { margin: 0 0 14px; padding-left: 22px; }
.legal-panel li { font-size: 14.5px; line-height: 1.75; color: var(--color-text); margin-bottom: 6px; }
.legal-panel a { color: var(--color-accent); font-weight: 600; }
.legal-panel .legal-callout { margin: 0 0 16px; }
.legal-contact-card {
  display: grid; gap: 10px; padding: 16px 18px; border-radius: 14px; background: #F4F6FB;
  border: 1px solid var(--color-border, #E3E7F1); margin: 0 0 14px;
}
.legal-contact-card div { font-size: 14px; }
.legal-contact-card strong { display: inline-block; min-width: 92px; color: var(--color-text-muted); font-weight: 700; }
.legal-pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--color-border, #E3E7F1); }
.legal-pager button {
  border: 1px solid var(--color-border, #E3E7F1); background: #fff; color: var(--color-primary); font-weight: 700; font-size: 13px;
  padding: 9px 14px; border-radius: 10px; cursor: pointer; transition: transform .16s, background .18s;
}
.legal-pager button:active { transform: scale(0.97); }
.legal-pager button:hover { background: #F4F6FB; }
.legal-pager .next { margin-left: auto; }
@media (max-width: 575px) {
  .legal-tab { padding: 11px 11px; font-size: 13px; }
  .legal-policy-tabs { justify-content: flex-start; }
}
@media print {
  .legal-policy-tabs, .legal-tablist, .legal-pager { display: none !important; }
  .legal-doc .legal-panel { display: block !important; page-break-inside: avoid; margin-bottom: 18px; }
}

/* Shared photo-source controls; original file inputs remain fully functional. */
.upload-photo-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:7px}.upload-photo-button{padding:8px 13px;min-height:40px;border-radius:10px;border:1px solid rgb(var(--theme-indigo-rgb)/.25);background:rgb(var(--theme-indigo-rgb)/.07);color:var(--color-accent);font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}.upload-photo-controls [role=status]{font-size:12px;color:var(--color-text-muted)}
.upload-source-dialog{border:1px solid var(--color-border);border-radius:22px;padding:24px;width:min(360px,calc(100vw - 28px));color:var(--color-text);background:var(--color-surface);box-shadow:0 24px 80px #0004}.upload-source-dialog::backdrop{background:#02061799;backdrop-filter:blur(3px)}.upload-source-dialog h2{font-size:20px;font-weight:750;margin:0 0 18px}.upload-source-dialog button{display:block;width:100%;padding:13px;margin-top:9px;border:1px solid var(--color-border);border-radius:12px;background:var(--color-bg);color:var(--color-text);font:inherit;cursor:pointer}.upload-source-dialog button:first-of-type{background:var(--theme-action-gradient);color:white;border-color:transparent}.upload-source-dialog button:focus-visible{outline:3px solid var(--color-accent-2);outline-offset:2px}

/* Preserve the GR artwork and neutral lettering while matching the active palette. */
.auth-brand-logo, .public-brand-logo, .public-brand-mark-img,
.app-topbar-brand > img, .app-splash-mark > img {
  filter: var(--theme-logo-filter, none);
}

/* Shared glossy surfaces follow every theme preset. */
.btn-app-primary {background:var(--theme-action-gradient);box-shadow:inset 0 1px 0 #ffffff50,0 5px 16px rgb(var(--theme-indigo-rgb)/.22)}
.public-footer,.portal-header,.app-view .app-topbar {
 background:radial-gradient(ellipse at 15% 0%,rgb(var(--theme-indigo-rgb)/.32),transparent 65%),linear-gradient(135deg,rgb(var(--theme-navy-light-rgb)),rgb(var(--theme-navy-dark-rgb)));
 box-shadow:inset 0 1px 0 #ffffff20;
}
.gr-social-links {display:flex;flex-wrap:nowrap;gap:10px;align-items:center;padding:12px 0}
.gr-social-links .gr-social-link {display:inline-flex;flex:0 0 42px;width:42px;height:42px;align-items:center;justify-content:center;padding:0;border-radius:50%;border:1px solid rgb(var(--theme-indigo-rgb)/.2);background:linear-gradient(145deg,#ffffff,#e8edf3);color:var(--social-color);font-size:18px;text-decoration:none;box-shadow:inset 0 1px 0 #fff,0 3px 8px #00000012;transition:transform .18s,box-shadow .18s,background .18s}
.gr-social-links .gr-social-link:hover,.gr-social-links .gr-social-link:focus-visible {color:#fff;background:var(--social-color);box-shadow:0 0 16px color-mix(in srgb,var(--social-color) 45%,transparent);transform:translateY(-2px);outline:2px solid var(--social-color);outline-offset:3px}
.public-footer-links .gr-social-links {flex-basis:100%;padding-top:0}
.gr-drawer-bottom {margin-top:auto;padding-top:20px;border-top:1px solid rgb(var(--theme-indigo-rgb)/.12)}
.gr-drawer-bottom > a {display:block;font-size:12px;padding:8px 0;color:var(--color-text-muted)}
.mobile-drawer {display:flex;flex-direction:column}
.gr-guest-drawer-bottom {display:none}
.gr-menu-close {align-self:flex-end;background:transparent;color:inherit;border:0;font-size:28px;width:44px;height:44px;cursor:pointer}
@media(max-width:767px){.public-nav-links .gr-guest-drawer-bottom{display:block;width:100%}}
@media(prefers-reduced-motion:reduce){.gr-social-links .gr-social-link{transition:none}.gr-social-links .gr-social-link:hover{transform:none}}

@media(max-width:767px){
 .public-nav-links.open{position:fixed;top:var(--header-height);right:0;left:auto;bottom:0;width:min(320px,90vw);overflow-y:auto;flex-direction:column;align-items:stretch;padding:24px;box-shadow:-12px 0 40px #0003;border-radius:20px 0 0 0}
 .public-nav-links .gr-social-links .gr-social-link{padding:0;color:var(--social-color);border:1px solid rgb(var(--theme-indigo-rgb)/.2)}
 .public-nav-links .gr-social-links .gr-social-link:hover{color:white}
}

/* PWA promotion is intentionally hidden until browser eligibility is known. */
.pwa-install-banner[hidden],#pwaIosHelp[hidden]{display:none!important}
.pwa-install-banner{position:fixed;left:12px;right:12px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:90;display:flex;align-items:center;gap:10px;flex-wrap:wrap;max-width:600px;margin:auto;padding:12px;border:1px solid #22d3ee66;border-radius:18px;background:#0f172aee;color:#fff;backdrop-filter:blur(16px);box-shadow:0 12px 35px #0005}
.pwa-install-banner>img{border-radius:11px;flex-shrink:0}.pwa-install-copy{flex:1;min-width:120px}.pwa-install-copy strong{display:block;font-size:13px}.pwa-install-copy span{display:block;font-size:11px;color:#cbd5e1;margin-top:3px}
.pwa-install-action{border:1px solid #ffffff30;border-radius:12px;padding:10px 12px;color:white;background:var(--theme-action-gradient);font-size:12px;font-weight:700;min-height:44px}.pwa-install-dismiss{border:0;background:transparent;color:#e2e8f0;font-size:24px;min-width:36px;min-height:44px}.pwa-install-banner button:focus-visible{outline:2px solid #22d3ee;outline-offset:3px}#pwaIosHelp{flex-basis:100%;font-size:12px;margin:0;color:#e2e8f0}
body:has(.property-sticky-bar) .pwa-install-banner{bottom:calc(90px + env(safe-area-inset-bottom,0px))}
body:has(.pwa-install-banner:not([hidden])){padding-bottom:150px}
@media(min-width:768px){.pwa-install-banner{display:none!important}}

.gr-table-scroll{width:100%;max-width:100%;overflow-x:auto;border:1px solid var(--color-border);border-radius:14px}.gr-properties-table{min-width:680px}.gr-table-scroll th,.gr-table-scroll td{white-space:nowrap}.gr-unit-actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:nowrap}.gr-unit-actions .btn-app{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;padding:0;border-radius:50%}.portal-main{min-width:0}
.gr-notification-toast{position:fixed;z-index:1090;top:calc(20px + env(safe-area-inset-top,0px));right:20px;width:360px;max-width:calc(100vw - 32px);display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:14px;border:1px solid #334155cc;border-radius:18px;background:#0f172af2;color:#fff;box-shadow:0 15px 40px #0005;backdrop-filter:blur(16px)}.gr-notification-toast>i{color:#fbbf24;font-size:22px;filter:drop-shadow(0 0 6px currentColor)}.gr-notification-toast[data-category=message]>i{color:#22d3ee}.gr-notification-toast[data-category=payment]>i{color:#34d399}.gr-toast-copy{flex:1;min-width:0}.gr-toast-copy strong,.gr-toast-copy span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gr-toast-copy strong{font-size:13px}.gr-toast-copy span{font-size:12px;color:#cbd5e1}.gr-notification-toast button{background:#ffffff12;color:white;border:1px solid #ffffff25;border-radius:9px;min-height:36px;padding:5px 9px;font-size:12px}.gr-notification-toast button:focus-visible{outline:2px solid #22d3ee}.gr-toast-count{font-size:11px;color:#cbd5e1;flex:1}.gr-toast-status:not(:empty){flex-basis:100%;font-size:12px;color:#fda4af}@media(max-width:767px){.gr-notification-toast{right:16px;left:16px;width:auto;top:calc(16px + env(safe-area-inset-top,0px))}}

/* Keep the chat composer stable while only the message list refreshes. */
#messageThreadDrawer{height:100dvh;max-height:100dvh}#messageThreadDrawerBody{display:flex;flex-direction:column;min-height:0;overflow:hidden;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}.chat-thread{display:flex;flex-direction:column;flex:1;min-height:0}.chat-message-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}.chat-thread #chatReplyForm{flex-shrink:0;padding-top:10px;background:var(--color-surface)}.chat-composer-input{display:block;width:100%;min-height:68px}.chat-composer-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.chat-message-pending{opacity:.65}.chat-message-text{overflow-wrap:anywhere}.chat-thread textarea{font-size:16px}@media(max-width:420px){.chat-composer-actions .btn-app{font-size:12px;padding-inline:9px}.chat-camera-label{white-space:nowrap}}
@media (max-width: 575.98px) {
  #identity-verification-card .identity-verification-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
  }

  #identity-verification-card .identity-verification-actions .badge {
    align-self: flex-start;
  }

  #identity-verification-card .identity-verification-cta {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }
}
