/* IOVO skin. Loaded only by the duplicated app. Colors stay off unless
   html[data-brand="iovo"] is set, which the Lucent hosts never receive. */

html[data-brand="iovo"] {
  --aqua: #f47920;
  --iovo-orange: #f47920;
  --iovo-orange-deep: #d86512;
  --iovo-graphite: #1a1d21;
  --iovo-graphite-2: #24282e;
  --iovo-ink: #14171b;
  --iovo-warm: #f6f1e8;
  --iovo-warm-2: #efe7da;
  color-scheme: dark;
}

html[data-brand="iovo"] #vaultApp .brand-mark {
  width: 40px;
  font-size: 10px;
  letter-spacing: 0.02em;
}

html[data-brand="iovo"],
html[data-brand="iovo"][data-theme="dark"] {
  --bg: #1a1d21;
  --bg2: #24282e;
  --bg3: #2c3138;
  --card: rgba(36, 40, 46, 0.92);
  --bg-card: rgba(36, 40, 46, 0.92);
  --text: #f6f1e8;
  --text-mid: rgba(246, 241, 232, 0.72);
  --text-dim: rgba(246, 241, 232, 0.5);
  --border: rgba(246, 241, 232, 0.08);
  --border-hi: rgba(244, 121, 32, 0.45);
  --grid: rgba(244, 121, 32, 0.05);
  --input-bg: rgba(246, 241, 232, 0.04);
  --tog: rgba(246, 241, 232, 0.08);
  --shadow: rgba(0, 0, 0, 0.35);
  --glow: rgba(244, 121, 32, 0.16);
  --sidebar-active: rgba(244, 121, 32, 0.12);
}

html[data-brand="iovo"][data-theme="light"] {
  --bg: #f6f1e8;
  --bg2: #efe7da;
  --bg3: #e7dece;
  --card: rgba(255, 252, 247, 0.94);
  --bg-card: rgba(255, 252, 247, 0.94);
  --text: #1a1d21;
  --text-mid: rgba(26, 29, 33, 0.72);
  --text-dim: rgba(26, 29, 33, 0.52);
  --border: rgba(26, 29, 33, 0.08);
  --border-hi: rgba(216, 101, 18, 0.4);
  --grid: rgba(216, 101, 18, 0.05);
  --input-bg: rgba(26, 29, 33, 0.03);
  --aqua: #d86512;
  --glow: rgba(216, 101, 18, 0.12);
  color-scheme: light;
}

html[data-brand="iovo"]:not([data-theme="light"]) body {
  background-color: #1a1d21;
  color: #f6f1e8;
}

html[data-brand="iovo"][data-theme="light"] body {
  background-color: #f6f1e8;
  color: #1a1d21;
}

html[data-brand="iovo"] body {
  padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
}

html[data-brand="iovo"] .brand-wm,
html[data-brand="iovo"] .sidebar-brand-wm,
html[data-brand="iovo"] .launch-command-hd-logo b {
  color: #f47920;
  letter-spacing: 0.18em;
  font-weight: 650;
}

html[data-brand="iovo"] .owner-welcome-mark,
html[data-brand="iovo"] .field-access-denied-mark {
  color: transparent;
  border-color: rgba(244, 121, 32, 0.55);
  background: url("assets/iovo-mark.svg") center / cover no-repeat;
}

html[data-brand="iovo"] .brand-sub {
  color: var(--text-mid, rgba(246, 241, 232, 0.72));
}

html[data-brand="iovo"] .brand svg [stroke="#4dd9c0"],
html[data-brand="iovo"] .brand svg [fill="#4dd9c0"] {
  stroke: #f47920;
  fill: #f47920;
}

html[data-brand="iovo"] .brand svg stop[stop-color="#72ecd4"],
html[data-brand="iovo"] .brand svg stop[stop-color="#1a7aaa"] {
  stop-color: #f47920;
}

html[data-brand="iovo"] .btn-sign,
html[data-brand="iovo"] .btn-primary,
html[data-brand="iovo"] button.primary {
  background: #f47920;
  border-color: #d86512;
  color: #1a1d21;
}

html[data-brand="iovo"] .nav-item.active,
html[data-brand="iovo"] .support-btn,
html[data-brand="iovo"] .sidebar-brand-wm b {
  color: #f47920;
}

html[data-brand="iovo"] .card,
html[data-brand="iovo"] .login-card {
  border-color: rgba(244, 121, 32, 0.28);
}

html[data-brand="iovo"] .iovo-developer-line {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  margin: 0;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
  font: 500 12px/1.3 "DM Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  color: #1a1d21;
  background: #f6f1e8;
  border-top: 2px solid #f47920;
}

/* Fallback until boot.js measures the nav and sets an exact inline bottom. */
html[data-brand="iovo"] .iovo-developer-line.is-above-nav {
  bottom: calc(71px + env(safe-area-inset-bottom, 0px));
  padding-bottom: 6px;
  padding-top: 6px;
  border-top-width: 1px;
}

/* Field Mode lays its fixed shell out above --fm-nav-h. Add the developer
   line so it sits between the content and the nav instead of over the
   tracker tiles. Base values match field-mode.html's own breakpoints. */
html[data-brand="iovo"] {
  --fm-nav-h: calc(66px + var(--iovo-line-reserve, 30px));
}

@media (min-width: 760px) {
  html[data-brand="iovo"] {
    --fm-nav-h: calc(70px + var(--iovo-line-reserve, 30px));
  }
}

@media (min-width: 1401px) {
  html[data-brand="iovo"] {
    --fm-nav-h: var(--iovo-line-reserve, 36px);
  }
}

/* The AQUIS bubble keeps its own offsets from aquis-assistant-ui.js, lifted
   above the developer line. Dashboard phones also show .bottom-tabs; those
   tabs move up by the same reserve so they do not cover the line. */
html[data-brand="iovo"] .aquis-mini-shell {
  bottom: calc(14px + var(--iovo-line-reserve, 36px) + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 768px) {
  html[data-brand="iovo"] .bottom-tabs {
    bottom: var(--iovo-line-reserve, 36px);
  }

  html[data-brand="iovo"] body .aquis-mini-shell {
    bottom: calc(82px + var(--iovo-line-reserve, 36px) + env(safe-area-inset-bottom, 0px));
  }

  html[data-brand="iovo"] .content {
    padding-bottom: calc(100px + var(--iovo-line-reserve, 36px) + env(safe-area-inset-bottom, 0px));
  }
}

html[data-brand="iovo"] .aquis-mini-shell.field-mode {
  bottom: calc(88px + var(--iovo-line-reserve, 30px) + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 640px) {
  html[data-brand="iovo"] .aquis-mini-shell {
    bottom: calc(10px + var(--iovo-line-reserve, 36px) + env(safe-area-inset-bottom, 0px));
  }

  html[data-brand="iovo"] .aquis-mini-shell.field-mode {
    bottom: calc(82px + var(--iovo-line-reserve, 30px) + env(safe-area-inset-bottom, 0px));
  }
}

html[data-brand="iovo"][data-theme="light"] .iovo-developer-line {
  color: #f6f1e8;
  background: #1a1d21;
}

html[data-brand="iovo"] .iovo-front-door {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: "DM Sans", "Segoe UI", sans-serif;
}

html[data-brand="iovo"] .iovo-front-door img {
  width: 72px;
  height: 72px;
}

html[data-brand="iovo"] .iovo-front-door .iovo-front-door-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  background: #f47920;
  color: #1a1d21;
  font-weight: 650;
  font-size: 16px;
  text-decoration: none;
}

html[data-brand="iovo"] .iovo-front-door .iovo-front-door-cta:focus-visible {
  outline: 3px solid #f6f1e8;
  outline-offset: 3px;
}

/* Invitation subtitles and the introduction chrome must clear the developer
   line, and the homeowner exit control must meet the 44px tap size. */
html[data-brand="iovo"] .card-sub,
html[data-brand="iovo"] .recording-consent-head small,
html[data-brand="iovo"] .preview-exit-bar {
  overflow-wrap: anywhere;
}

html[data-brand="iovo"] .preview-exit-bar {
  position: sticky;
  top: 0;
  min-height: 52px;
  flex-wrap: wrap;
  row-gap: 8px;
}

html[data-brand="iovo"] .preview-exit-bar a {
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
}

html[data-brand="iovo"] body.homeowner-preview {
  padding-top: 0;
}

html[data-brand="iovo"] #dots {
  bottom: calc(22px + var(--iovo-line-reserve, 36px));
}

html[data-brand="iovo"] #hint {
  bottom: calc(20px + var(--iovo-line-reserve, 36px));
}

html[data-brand="iovo"] #waitingView.live-view.active {
  overflow: auto;
}

html[data-brand="iovo"] #waitingView .waiting-wrap {
  min-height: auto;
  padding: 24px 16px calc(24px + var(--iovo-line-reserve, 36px));
}

html[data-brand="iovo"] #joinViewerBtn {
  min-height: 44px;
  min-width: 44px;
}

/* ── Sign-in: one unified, symmetrical premium panel over the rain ── */
html[data-brand="iovo"] body:has(#loginUser) {
  padding: 32px 16px;
  background-color: #14171b;
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(244, 121, 32, 0.20), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(244, 121, 32, 0.10), transparent 70%),
    linear-gradient(180deg, #1a1d21 0%, #101215 100%);
  background-attachment: fixed;
}

html[data-brand="iovo"][data-theme="light"] body:has(#loginUser) {
  background-color: #f6f1e8;
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(244, 121, 32, 0.18), transparent 70%),
    linear-gradient(180deg, #f6f1e8 0%, #ece3d3 100%);
}

/* Recolour only: the page's own motion-lite / small-screen / reduced-motion
   rules still decide whether the grid and orbs render at all. */
html[data-brand="iovo"] body:has(#loginUser) .orb {
  background: rgba(244, 121, 32, 0.10);
}

html[data-brand="iovo"] body:has(#loginUser) .page {
  max-width: 520px;
  padding: 56px 52px 40px;
  border-radius: 28px;
  border: 1px solid rgba(244, 121, 32, 0.30);
  background: linear-gradient(180deg, rgba(38, 42, 48, 0.72), rgba(20, 23, 27, 0.78));
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(246, 241, 232, 0.04) inset,
    0 1px 0 rgba(246, 241, 232, 0.10) inset;
  position: relative;
  overflow: hidden;
}

html[data-brand="iovo"][data-theme="light"] body:has(#loginUser) .page {
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.86), rgba(246, 241, 232, 0.86));
  box-shadow: 0 40px 100px rgba(26, 29, 33, 0.16), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

html[data-brand="iovo"] body:has(#loginUser) .page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f47920, transparent);
}

/* Language and theme controls sit centred under the form; Back and the old mark are gone. */
html[data-brand="iovo"] body:has(#loginUser) .back-lk,
html[data-brand="iovo"] body:has(#loginUser) .brand svg {
  display: none;
}

html[data-brand="iovo"] body:has(#loginUser) .page { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
html[data-brand="iovo"] body:has(#loginUser) .top-bar { order: 3; margin: 28px 0 0; justify-content: center; }
html[data-brand="iovo"] body:has(#loginUser) .brand { order: 1; margin: 0 0 36px; gap: 14px; }

/* The full-effects tier (data-lux="full") turns the brand into its own boxed
   tile beside the form; on IOVO it stays part of the one panel. */
html[data-brand="iovo"] body:has(#loginUser) .brand {
  min-height: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}
html[data-brand="iovo"] body:has(#loginUser) .brand::after { display: none; }
html[data-brand="iovo"] body:has(#loginUser) .card { order: 2; }

html[data-brand="iovo"] body:has(#loginUser) .brand-wm {
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.34em;
  margin-right: -0.34em;
  line-height: 1;
  color: #f47920;
  text-shadow: 0 0 40px rgba(244, 121, 32, 0.35);
}

html[data-brand="iovo"] body:has(#loginUser) .brand-sub {
  margin-top: 0;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  line-height: 1.6;
  max-width: 100%;
  color: var(--text-mid, rgba(246, 241, 232, 0.72));
}

html[data-brand="iovo"] body:has(#loginUser) .card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  backdrop-filter: none;
  padding: 0;
  overflow: visible;
}

html[data-brand="iovo"] body:has(#loginUser) .card::before { display: none; }

html[data-brand="iovo"] body:has(#loginUser) .card-title,
html[data-brand="iovo"] body:has(#loginUser) .card-sub { text-align: center; }
html[data-brand="iovo"] body:has(#loginUser) .card-title { font-size: 1.7rem; margin-bottom: 8px; }
html[data-brand="iovo"] body:has(#loginUser) .card-sub { margin-bottom: 32px; }

html[data-brand="iovo"] body:has(#loginUser) input[type="email"],
html[data-brand="iovo"] body:has(#loginUser) input[type="password"],
html[data-brand="iovo"] body:has(#loginUser) input[type="search"] {
  padding: 15px 16px;
  border-radius: 12px;
  background: rgba(246, 241, 232, 0.05);
  border-color: rgba(246, 241, 232, 0.12);
}

html[data-brand="iovo"][data-theme="light"] body:has(#loginUser) input[type="email"],
html[data-brand="iovo"][data-theme="light"] body:has(#loginUser) input[type="password"],
html[data-brand="iovo"][data-theme="light"] body:has(#loginUser) input[type="search"] {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(26, 29, 33, 0.16);
}

html[data-brand="iovo"] body:has(#loginUser) input:focus,
html[data-brand="iovo"][data-theme="light"] body:has(#loginUser) input:focus {
  border-color: rgba(244, 121, 32, 0.7);
  box-shadow: 0 0 0 4px rgba(244, 121, 32, 0.14);
}

html[data-brand="iovo"] body:has(#loginUser) .remember { justify-content: center; }

html[data-brand="iovo"] body:has(#loginUser) .btn-sign {
  padding: 17px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff8c3a, #f47920 55%, #e06a10);
  box-shadow: 0 12px 32px rgba(244, 121, 32, 0.35) !important;
  font-weight: 650;
}

html[data-brand="iovo"] body:has(#loginUser) .card-foot { margin-top: 26px; }

@media (max-width: 460px) {
  html[data-brand="iovo"] body:has(#loginUser) .page { padding: 40px 24px 28px; border-radius: 22px; }
  html[data-brand="iovo"] body:has(#loginUser) .brand-sub { font-size: 0.62rem; letter-spacing: 0.2em; }
}

@media (max-width: 760px) {
  html[data-brand="iovo"] body:has(#loginUser) {
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  }
}
