/* ==========================================================================
   ITQAN TRADES — LUXURY SOVEREIGN QUANT DESIGN SYSTEM
   Theme: Light (Systems Light) · Teal & Emerald Quant Palette
   Typography: Fauna One (Display/Sans) · Cinzel (Luxury Headers) · Fauna One (Data/Code)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Fauna+One&display=swap');

:root {
  /* Typography Fonts (Always inherited) */
  --font-sans: 'Fauna One', sans-serif;
  --font-serif: 'Cinzel', serif;
  --font-mono: 'Fauna One', monospace;

  /* Border Radii */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

/* --- Light Theme (Systems Light) --- */
:root {
  /* Canvas & Light Surfaces */
  --bg-canvas: #ffffff;
  --bg-surface: #fcfaf6;
  --bg-surface-elevated: #f4f1ea;
  --bg-subtle: #f0ece2;
  --bg-section-a: #f8f6f0;
  --bg-section-b: #f3efe4;
  --bg-glass: rgba(255, 255, 255, 0.9);

  /* Borders & Grids */
  --border-subtle: #e4e0d6;
  --border-strong: #cfc8b8;
  --border-gold: #b99b5f; /* Golden */
  --border-glow: rgba(185, 155, 95, 0.15);

  /* White Golden Palette — Gold, Warm Neutrals, Functional Semantics */
  --gold-primary: #b99b5f;
  --gold-light: #cbb183;
  --gold-dark: #9a7d43;
  --gold-muted: rgba(185, 155, 95, 0.10);
  --gold-glow: rgba(185, 155, 95, 0.15);

  /* Accent aliases — shared Tabulator theme compatibility */
  --accent-primary: #b99b5f;   /* gold alias */
  --accent-subtle: rgba(185, 155, 95, 0.08);
  --accent-ink: #ffffff;
  --bg-inset: var(--bg-surface-elevated);
  --btn-primary-text: #ffffff;

  --accent-signal: #218838;
  --accent-signal-glow: rgba(33, 136, 56, 0.12);
  --accent-cyan: #b99b5f;
  --accent-cyan-glow: rgba(185, 155, 95, 0.12);
  --accent-danger: #c82333;
  --accent-danger-glow: rgba(200, 35, 51, 0.12);

  /* Typography Colors */
  --text-primary: #1c1914;
  --text-secondary: #757062;
  --text-muted: #8f8875;
  --text-gold: #b99b5f;

  /* Button Specific Colors */
  --btn-primary-text: #ffffff;
  --btn-primary-hover-text: #ffffff;

  /* Elevation & Glows */
  --shadow-sm: 0 2px 6px rgba(28, 25, 20, 0.05);
  --shadow-md: 0 8px 20px rgba(28, 25, 20, 0.08);
  --shadow-lg: 0 16px 32px rgba(28, 25, 20, 0.12);
  --shadow-gold: 0 0 20px rgba(185, 155, 95, 0.12);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 1rem;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(185, 155, 95, 0.04) 0%, transparent 65%),
    linear-gradient(to right, rgba(185, 155, 95, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(185, 155, 95, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Layout Containers */
.container {
  width: 90%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-fluid {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 32px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  overflow-wrap: break-word;
}

.serif-title {
  font-family: var(--font-serif);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.gold-gradient-text {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.cyan-gradient-text {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--accent-cyan) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: all 150ms ease;
}

a:hover {
  color: var(--gold-light);
  text-decoration: none;
}

.mono {
  font-family: var(--font-mono);
}

.muted {
  color: var(--text-muted);
}

/* Luxury Sovereign Masthead Header */
/* Alternating section backgrounds — soft pastel bands over the white canvas */
.section-tint-a {
  background: var(--bg-section-a);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-tint-b {
  background: var(--bg-section-b);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Homepage hero banner — full-bleed image layer with a flat white 50%
   transparent overlay so the headline/CTAs stay legible. The image lives
   on an oversized ::before layer (taller than the section), so the subtle
   scroll parallax (y-drift in base.html) can move it without ever
   exposing a gap of the section's plain background underneath. */
.hero-banner {
  position: relative;
  overflow: hidden;
  background: var(--bg-canvas);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -15%;
  left: 0;
  width: 100%;
  height: 130%;
  background-image: url('../img/home-banner.webp');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  will-change: transform;
  pointer-events: none;
}

.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #ffffff47;
  pointer-events: none;
}

.hero-banner .container {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color 200ms ease;
}

.site-header .container,
.site-header .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  height: 64px;
  width: auto;
  display: block;
}

.brand:hover .brand-logo {
  transform: scale(1.03);
}

.brand-emblem {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, rgba(185, 155, 95, 0.2) 0%, rgba(252, 250, 246, 0.9) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(185, 155, 95, 0.15);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.brand:hover .brand-emblem {
  transform: scale(1.04);
  box-shadow: 0 0 20px rgba(185, 155, 95, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-primary);
  transition: width 150ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text-primary);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  width: 100%;
}



.site-nav a.nav-admin {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: var(--bg-surface);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  border-color: var(--border-gold);
  color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
  border-color: var(--gold-light);
  color: var(--btn-primary-text);
  font-weight: 700;
  box-shadow: 0 4px 16px var(--gold-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%);
  color: var(--btn-primary-hover-text);
  box-shadow: 0 6px 24px var(--gold-glow);
}

.btn-signal {
  background: var(--accent-signal-glow);
  border-color: var(--accent-signal);
  color: var(--accent-signal);
}

.btn-signal:hover {
  background: var(--accent-signal);
  color: var(--bg-surface);
  box-shadow: 0 0 16px var(--accent-signal-glow);
}

.btn-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  border: 1px solid #38bdf8;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.35);
}

.btn-cyan:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%);
  border-color: #7dd3fc;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.5);
}

.btn-danger {
  background: var(--accent-danger-glow);
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}

.btn-danger:hover {
  background: var(--accent-danger);
  color: var(--bg-surface);
  box-shadow: 0 0 16px var(--accent-danger-glow);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.82rem;
}

.btn-mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

/* Final CTA email button: show a short "Email Us" label on mobile, full address on desktop */
.btn-label--mobile {
  display: none;
}

/* Badges & Telemetry Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.badge-gold {
  background: var(--gold-muted);
  border-color: var(--border-subtle);
  color: var(--text-gold);
}

.badge-signal {
  background: var(--accent-signal-glow);
  border-color: var(--accent-signal);
  color: var(--accent-signal);
}

.badge-cyan {
  background: var(--accent-cyan-glow);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.badge-danger {
  background: var(--accent-danger-glow);
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-signal);
  box-shadow: 0 0 8px var(--accent-signal);
  animation: pulseLive 2s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Glassmorphic Sovereign Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 180ms ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-gold) 50%, transparent 100%);
  opacity: 0.4;
}

.card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* ── Why-Us cards (/moneyexpo) ────────────────────────────────────────────
   Two-zone layout: structured Icon | Title header above a full-width
   content area. The modifier class .card--why overrides the .cap-row .card
   shared rule (which forces flex-direction: row) without touching
   capability cards or the home carousel. */

/* Reset the cap-row / owl shared row-flex so the card is a column block.
   Scoped to .card--why wherever it appears: the Money Expo row grids,
   the home capabilities Owl carousel, and standalone grid cards on the
   services / pms pages. */
.cap-row .card.card--why,
.cap-owl .card.card--why,
.card.card--why {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  text-align: left;
}

/* ── Header row: icon zone | vertical divider | title ── */
.why-card__header {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 22px 26px;
  min-height: 72px;
}

/* Icon zone: fixed narrow column, centred icon */
.why-card__icon-zone {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--gold-primary);
}

/* Vertical divider between icon and title */
.why-card__vdivider {
  flex: 0 0 1px;
  align-self: stretch;
  background: var(--border-subtle);
  margin: 0 20px;
}

/* Title: occupies the remaining header width */
.why-card__title {
  flex: 1 1 auto;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--text-primary);
  min-width: 0;
}

/* Horizontal divider between header and body */
.why-card__hdivider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0 26px;
}

/* Body: full card width, generous vertical breathing room */
.why-card__body {
  flex: 1 1 auto;
  padding: 22px 26px;
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.72;
  margin: 0;
  text-align: justify;
}

/* Row: ensure equal heights across the three cards */
.cap-row--3:has(.card--why) {
  align-items: stretch;
}

/* Extend equal-height stretch to any cap-row carrying the new card style
   (covers What We Build multi-row groups and How We Work 5-col row) */
.cap-row:has(.card--why) {
  align-items: stretch;
}

/* Step number zone: slightly wider than the icon zone to fit 2-digit nums */
.why-card__icon-zone--num {
  flex-basis: 52px;
}

/* Row-aware grid (replaces the old Owl carousel on /moneyexpo).
   Each visual ROW is its own grid container, so the column count is
   per-row — a 2-card row becomes a true 2-column grid (cards fill the
   full width), not a 3-column grid with an empty third cell. The macro
   in moneyexpo.html computes the distribution (3→3, 4→3+1, 5→3+2, 6→3+3,
   7→3+2+2, 8→3+3+2, 9→3+3+3; the "two" mode gives 4→2+2; the "five"
   mode emits all 5 in a single row for the process timeline).
   No carousel, slider, dots, or horizontal scroll. */
.cap-row {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.cap-row:last-child {
  margin-bottom: 0;
}

.cap-row--1 {
  grid-template-columns: minmax(0, 1fr);
}

.cap-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cap-row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cap-row--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cap-row--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Card internal layout shared by the grid (Money Expo) and the
   still-active Owl carousel (home capabilities). */
.cap-owl .card,
.cap-row .card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 28px;
  padding: 30px 34px;
  text-align: left;
}

.cap-owl .card .cap-card__icon,
.cap-row .card .cap-card__icon {
  flex: 0 0 auto;
  font-size: 2rem;
  line-height: 1;
  color: var(--gold-primary);
  padding-top: 6px;
}

.cap-owl .card .cap-card__body,
.cap-row .card .cap-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.cap-owl .card .cap-card__tags,
.cap-row .card .cap-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Equal-height cards inside the home capabilities Owl carousel:
   Owl nests each card in a .owl-item and lays them out on a flex
   .owl-stage. Make every item stretch to the tallest and let the card
   fill the item so all visible cards share one height. */
.cap-owl .owl-stage {
  display: flex;
}

.cap-owl .owl-item {
  display: flex;
}

.cap-owl .owl-item .card {
  width: 100%;
  height: 100%;
}

/* Tablet: cap each row to 2 columns. A 3-card row shows 2 + a full-width
   last card (no half-width orphan). A 5-card row uses 3 columns (3+2)
   rather than 2 (2+2+1) to preserve the linear process reading order. */
@media (max-width: 900px) {
  .cap-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cap-row--1 {
    grid-template-columns: minmax(0, 1fr);
  }
  .cap-row--3 > .card:last-child {
    grid-column: 1 / -1;
  }
  /* 5-step timeline: 3 columns (3+2) keeps the process sequence readable */
  .cap-row--5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* Last card of the 3+2 second row does not need special treatment */
  .cap-row--5 > .card:last-child {
    grid-column: auto;
  }
}

/* Mobile: a single clean column. */
@media (max-width: 600px) {
  .cap-row,
  .cap-row--2,
  .cap-row--3,
  .cap-row--4,
  .cap-row--5 {
    grid-template-columns: 1fr;
  }
  .cap-row--3 > .card:last-child {
    grid-column: auto;
  }
  /* Process step cards: reduce side padding at narrow widths so the
     centred number + title have comfortable breathing room. */
  .cap-row--5 .card {
    padding-left: 20px;
    padding-right: 20px;
  }
  /* Final CTA email button: replace the long address with a short "Email Us" label */
  .btn-label--mobile {
    display: inline;
  }
  .btn-label--full {
    display: none;
  }
}

/* Institutional Terminal Container */
.terminal-hud {
  background: #fcfaf6;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(185, 155, 95, 0.08);
  overflow: hidden;
  position: relative;
}

.terminal-header {
  background: #f4f1ea;
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #f43f5e; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.terminal-body {
  padding: 20px;
}

/* Stat Metrics Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 150ms ease;
}

.stat-box:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all 120ms ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-muted);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Tables & Tabulator Integration */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

@media (max-width: 900px) {
  .table-responsive-wrapper .tabulator {
    min-width: 820px;
  }
  .hide-on-desktop {
    display: inline-block !important;
  }
}

@media (min-width: 901px) {
  .hide-on-desktop {
    display: none !important;
  }
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.table th {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.table tr:hover td {
  background: rgba(185, 155, 95, 0.04);
}

/* ==========================================================================
   SHARED TABULATOR THEME (UNIFIED)
   ========================================================================== */
.tabulator {
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tabulator .tabulator-header {
  background-color: var(--bg-surface-elevated) !important;
  border-bottom: 1px solid var(--border-gold) !important;
  color: var(--text-secondary) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.tabulator .tabulator-header .tabulator-col {
  background-color: transparent !important;
  border-right: 1px solid var(--border-subtle) !important;
  padding: 10px 12px !important;
  vertical-align: top !important;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {
  font-weight: 700 !important;
  color: var(--text-secondary) !important;
}

.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {
  background-color: var(--bg-inset) !important;
}

.tabulator .tabulator-header .tabulator-col input,
.tabulator .tabulator-header .tabulator-col select {
  width: 100% !important;
  box-sizing: border-box !important;
  background-color: var(--bg-canvas) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-xs) !important;
  padding: 3px 6px !important;
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
}

/* Two-line vertical filter layout - works across all Tabulator tables */
.tabulator .tabulator-header .tabulator-col {
  height: auto !important;
}
.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {
  height: auto !important;
  overflow: visible !important;
}
.custom-header-filter-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  align-items: stretch !important;
}
.custom-header-filter-container select,
.custom-header-filter-container input {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* Tabulator List Editor Popup styling */
.tabulator-edit-list {
  background-color: var(--bg-canvas) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-xs) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
  box-shadow: var(--shadow-md) !important;
  color: var(--text-primary) !important;
  max-height: 250px !important;
  overflow-y: auto !important;
}

.tabulator-edit-list .tabulator-edit-list-item {
  padding: 4px 8px !important;
  color: var(--text-secondary) !important;
  transition: background-color 100ms ease, color 100ms ease !important;
}

.tabulator-edit-list .tabulator-edit-list-item:hover {
  background-color: var(--bg-surface-elevated) !important;
  color: var(--text-primary) !important;
}

.tabulator-edit-list .tabulator-edit-list-item.tabulator-edit-list-item-selected {
  background-color: var(--accent-primary) !important;
  color: var(--accent-ink) !important;
  font-weight: 700 !important;
}

.tabulator .tabulator-header .tabulator-col input:focus,
.tabulator .tabulator-header .tabulator-col select:focus {
  border-color: var(--accent-primary) !important;
  outline: none !important;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row {
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  cursor: pointer !important;
  transition: background-color 100ms ease !important;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row:hover {
  background-color: var(--accent-subtle) !important;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.tabulator-selected {
  background-color: var(--accent-subtle) !important;
}

.tabulator .tabulator-cell {
  padding: 10px 10px !important;
  border-right: 1px solid transparent !important;
  vertical-align: middle !important;
  display: inline-flex !important;
  align-items: center !important;
}

.tabulator .tabulator-footer {
  background-color: var(--bg-surface-elevated) !important;
  border-top: 1px solid var(--border-subtle) !important;
  color: var(--text-secondary) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.8rem !important;
  padding: 8px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.tabulator .tabulator-footer .tabulator-paginator label {
  color: var(--text-muted) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
}

.tabulator .tabulator-footer .tabulator-page {
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-xs) !important;
  padding: 4px 10px !important;
  font-family: var(--font-mono) !important;
  font-size: 0.78rem !important;
  margin: 0 2px !important;
}

.tabulator .tabulator-footer .tabulator-page.active {
  background-color: var(--accent-primary) !important;
  color: var(--accent-ink) !important;
  border-color: var(--accent-primary) !important;
  font-weight: 700 !important;
}

.tabulator .tabulator-footer .tabulator-page:hover:not(.disabled) {
  background-color: var(--bg-inset) !important;
}
/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 32px 0 24px;
  margin-top: 0;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-gold) 50%, transparent 100%);
}

/* Font Awesome icon alignment within text/buttons */
i.fa-solid,
i.fa-regular,
i.fa-brands {
  vertical-align: -0.085em;
  display: inline-block;
  color: var(--gold-primary);
}

/* In colored buttons, keep icons on the button's own text color for contrast */
.btn i.fa-solid,
.btn i.fa-regular,
.btn i.fa-brands {
  color: inherit;
}

/* Scroll-to-top button with scroll progress ring */
#to-top-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 52px;
  height: 52px;
  border: none;
  background: var(--bg-surface);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease, box-shadow 200ms ease;
  z-index: 999;
}

#to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#to-top-btn:hover {
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-gold), 0 0 22px rgba(185, 155, 95, 0.35);
}

#to-top-btn:active {
  transform: scale(0.95);
}

.to-top-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.to-top-track {
  fill: none;
  stroke: var(--border-subtle);
  stroke-width: 3;
}

.to-top-progress {
  fill: none;
  stroke: var(--gold-primary);
  stroke-width: 3;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 60ms linear;
}

.to-top-arrow {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 36px;
  margin-bottom: 24px;
}

.footer-col {
  /* allow the grid track to shrink below the email's min-content width on mobile */
  min-width: 0;
}

.footer-col h4 {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.footer-col a:hover {
  color: var(--gold-light);
}

/* Footer badge pills wrap when copy is long (config-driven identity.badges) */
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Footer contact links (email) read as links, not plain text */
.footer-col a.mono {
  color: var(--gold-primary);
  border-bottom: 1px dotted var(--gold-primary);
  padding-bottom: 1px;
  transition: color 150ms ease, border-color 150ms ease;
  /* break the long email address instead of overflowing narrow mobile screens */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-col a.mono:hover {
  color: var(--gold-dark);
  border-bottom-color: var(--gold-dark);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Mobile Navigation Toggle Button */
.mobile-nav-toggle {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 1.2rem;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1;
  transition: all 150ms ease;
  min-height: 44px;
  min-width: 44px;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus-visible {
  background: var(--bg-subtle);
  border-color: var(--gold-light);
  outline: none;
}

/* Base Responsive System Across Screen Sizes */
@media (max-width: 1024px) {
  .brand-logo {
    height: 64px;
  }
}

@media (max-width: 900px) {
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-header .container,
  .site-header .container-fluid {
    position: relative;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .site-nav {
    display: none;
  }

  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-gold);
    padding: 20px 24px;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .site-nav a {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.98rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a:hover,
  .site-nav a.is-active {
    border-color: var(--border-gold);
    color: var(--gold-light);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .brand-logo {
    height: 62px;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 16px;
  }

  .brand-logo {
    height: 56px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
    /* let the long email label wrap inside the full-width button instead of forcing overflow */
    min-width: 0;
  }

  .stat-val {
    font-size: 1.85rem;
  }

  #to-top-btn {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
  }
  
  #to-top-btn .to-top-ring {
    width: 44px;
    height: 44px;
  }
}

/* Contact & PMS Page Layout Grids */
.contact-main-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: flex-start;
}

.pms-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 850px) {
  .contact-main-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .pms-form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}