/* AMOR NOVA — visual overlay. Tokens live in app.css :root. Do not add a JS framework. */
:root {
  --bubble-in: #1C2A52;
  --bubble-out: linear-gradient(160deg, #5B28F0 0%, #7938FF 55%, #9B45FF 100%);
}
html, body {
  background: var(--bg);
  color: var(--ink);
}

body.theme-amor {
  color-scheme: dark;
}

/* —— Light theme (same geometry, inverted surfaces) —— */
body.theme-light {
  color-scheme: light;
  --bg: #EEF1FB;
  --bg-2: #F7F8FF;
  --bg-elevated: #FFFFFF;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #FFFFFF;
  --panel-2: rgba(232, 236, 255, 0.9);
  --elevated: #FFFFFF;
  --ink: #121833;
  --muted: #5B6790;
  --gold-soft: rgba(121, 56, 255, 0.12);
  --gold-line: rgba(121, 56, 255, 0.28);
  --bubble-in: #FFFFFF;
  --bubble-out: linear-gradient(160deg, #5B28F0 0%, #7938FF 55%, #9B45FF 100%);
  --shadow: 0 18px 40px rgba(40, 48, 90, 0.12);
  --elev-1: 0 8px 22px rgba(40, 48, 90, 0.1);
  --elev-2: 0 18px 40px rgba(40, 48, 90, 0.14);
  --glow: 0 0 22px rgba(121, 56, 255, 0.18);
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(121, 56, 255, 0.12), transparent 55%),
    radial-gradient(640px 420px at 8% 108%, rgba(22, 119, 255, 0.1), transparent 52%),
    var(--bg);
  color: var(--ink);
}
body.theme-light .amor-tabs,
body.theme-light .chat-header,
body.theme-light .sidebar,
body.theme-light .settings-main,
body.theme-light .composer {
  background: var(--panel-solid);
}
body.theme-light .msg.in { color: var(--ink); }
body.theme-light .msg.out { color: #F8FAFF; }

html[data-theme="system"] body { color-scheme: dark; }
@media (prefers-color-scheme: light) {
  html[data-theme="system"] body {
    color-scheme: light;
  }
}

/* Accent variants */
html[data-accent="blue"] { --gold: #1677FF; --gold-2: #13D9FF; --gold-3: #7938FF; }
html[data-accent="cyan"] { --gold: #13D9FF; --gold-2: #1677FF; --gold-3: #7938FF; }
html[data-accent="violet"],
html:not([data-accent]) { --gold: #7938FF; --gold-2: #A34BFF; --gold-3: #1677FF; }

/* —— Logo —— */
.amor-logo,
.amor-mark {
  display: inline-grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  position: relative;
}
.amor-logo svg,
.amor-logo img,
.amor-mark svg,
.amor-mark img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 16px rgba(121, 56, 255, .45));
}
.amor-logo.is-lg { width: 8.5rem; height: 8.5rem; }
.amor-logo.is-sm,
.nova-logo .amor-logo { width: 2.35rem; height: 2.35rem; }
.amor-mark-letter {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  background: var(--gold-shine);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nova-logo {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(22,119,255,.2), rgba(121,56,255,.18));
  border: 1px solid var(--gold-line);
  box-shadow: var(--glow);
}

/* —— Cosmic splash —— */
.nova-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.nova-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .55;
}
.orb-a {
  width: 220px; height: 220px; left: -48px; bottom: 10%;
  background: radial-gradient(circle at 35% 30%, #C084FF, #1677FF 58%, transparent 74%);
  opacity: .9;
}
.orb-b {
  width: 150px; height: 150px; right: 4%; top: 14%;
  background: radial-gradient(circle at 40% 35%, #5CE1FF, #7938FF 58%, transparent 74%);
  opacity: .85;
}
.orb-c {
  width: 88px; height: 88px; right: 20%; bottom: 20%;
  background: radial-gradient(circle at 40% 35%, #A34BFF, #13D9FF 70%, transparent 76%);
  opacity: .8;
}
.auth-shell {
  position: relative;
  overflow: hidden;
}
.auth-shell > * { position: relative; z-index: 1; }
.splash-hero {
  width: min(26rem, 100%);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: .35rem;
  padding: 1rem;
}
.splash-hero .brand-name {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: .18em;
  font-size: clamp(2rem, 7vw, 2.6rem);
  margin: .35rem 0 0;
  background: var(--gold-shine);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.splash-hero .brand-tag {
  margin: .15rem 0 0;
  color: var(--muted);
  letter-spacing: .08em;
  font-size: .92rem;
}
.splash-hero .brand-tag-ar {
  margin: 0;
  color: #C9D4F5;
  font-size: .95rem;
}
.splash-cta {
  margin-top: 1.4rem;
  width: min(16rem, 100%);
  min-height: 52px;
  border-radius: 999px;
  background: var(--gold-shine);
  border: 0;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(121, 56, 255, .35);
}
@media (hover: hover) and (pointer: fine) {
  .splash-cta:hover { filter: brightness(1.06); }
}
.splash-fine {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .04em;
}
.auth-card.amor-card {
  background: linear-gradient(180deg, rgba(16,27,64,.92), rgba(11,21,52,.94));
  border: 1px solid var(--gold-line);
  box-shadow: 0 0 0 1px rgba(121,56,255,.12), var(--elev-2), var(--glow);
}
.lang-switch {
  border-color: var(--gold-line);
  background: rgba(6,11,32,.55);
}
.lang-switch a.active {
  background: var(--gold-shine);
  color: #fff;
  box-shadow: 0 0 16px rgba(121,56,255,.35);
}
.brand-name {
  background: var(--gold-shine);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.auth-card .brand-name {
  letter-spacing: .1em;
  font-size: 1.85rem;
  white-space: nowrap;
}
.auth-card label {
  display: grid;
  gap: .35rem;
  text-align: start;
  color: var(--muted);
}
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
  width: 100%;
  max-width: 100%;
  background: #0B1534;
  border: 1px solid var(--gold-line);
  color: var(--ink);
  border-radius: 14px;
  padding: .75rem .9rem;
}
.orb-a, .orb-b, .orb-c { opacity: .8; }
.amor-sig-text { display: none; }
.amor-signature {
  width: 88px;
  height: 88px;
  margin: 0 auto .25rem;
}
.amor-signature .amor-logo,
.auth-card .amor-logo.is-lg {
  width: 5.4rem !important;
  height: 5.4rem !important;
}

.btn.primary {
  background: var(--gold-shine);
  color: #fff;
  border: 0;
  box-shadow: 0 8px 22px rgba(121, 56, 255, .28);
}
.btn.danger,
.call-end,
.call-reject {
  background: var(--danger);
  border-color: transparent;
  color: #fff;
}

/* —— Inbox / stories —— */
.moments-strip {
  display: flex;
  gap: .7rem;
  overflow-x: auto;
  padding: .35rem .9rem .55rem;
  scrollbar-width: none;
}
.moments-strip::-webkit-scrollbar { display: none; }
.moment-chip {
  flex: 0 0 auto;
  width: 4.4rem;
  display: grid;
  justify-items: center;
  gap: .28rem;
  background: none;
  border: 0;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
}
.moment-ring {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 50%;
  padding: 2px;
  background: var(--gold-shine);
  display: grid;
  place-items: center;
}
.moment-chip.is-seen .moment-ring { background: #2A3560; }
.moment-ring img,
.moment-ring span {
  width: 3.05rem;
  height: 3.05rem;
  border-radius: 50%;
  object-fit: cover;
  background: #0B1534;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.moment-chip small {
  font-size: .68rem;
  color: var(--muted);
  max-width: 4.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.moment-add .moment-ring {
  background: linear-gradient(160deg, #182450, #101B40);
  border: 1px dashed var(--gold-line);
}
.inbox-tools {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.amor-inbox-head {
  justify-content: space-between;
  padding-inline: 1rem;
}
.amor-inbox-head .brand-row {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.amor-inbox-head h1 { font-size: 1.45rem; }

.amor-pills {
  display: flex;
  gap: .45rem;
  padding: .35rem 1rem .55rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.amor-pills .pill {
  border: 0;
  border-radius: 999px;
  padding: .38rem .9rem;
  background: #182450;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}
.amor-pills .pill.active {
  background: var(--gold-shine);
  color: #fff;
}
.conv-list li {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: .7rem 1rem;
  border: 0;
  background: transparent;
}
.conv-list .avatar {
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 50%;
  background: var(--gold-shine);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  position: relative;
  flex: 0 0 3.15rem;
}
.conv-list .avatar.online::after {
  content: "";
  position: absolute;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--online);
  border: 2px solid var(--bg);
  inset-inline-end: 0;
  bottom: 0;
}
.conv-list .badge {
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--gold-shine);
  color: #fff;
  font-size: .68rem;
  display: inline-grid;
  place-items: center;
  padding: 0 .35rem;
}
.conv-empty-pending {
  color: var(--muted);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: .88rem;
}

/* —— Conversation bubbles —— */
.messages {
  background:
    radial-gradient(700px 380px at 80% 0%, rgba(121,56,255,.08), transparent 60%),
    var(--bg);
}
.msg.in {
  background: #1C2A52;
  border: 1px solid rgba(163, 75, 255, .28);
  border-radius: 18px 18px 18px 6px;
  color: var(--ink);
  box-shadow: none;
}
.msg.out {
  background: var(--bubble-out);
  border: 0;
  color: #F8FAFF;
  border-radius: 18px 18px 6px 18px;
}
.msg.out .time,
.msg.out .edited-mark { color: rgba(248,250,255,.78); }
.msg .ticks.sent { color: rgba(248,250,255,.7); }
.msg .ticks.delivered { color: #C9D4F5; }
.msg .ticks.seen { color: #13D9FF; }
.msg-reactions {
  display: flex;
  gap: .2rem;
  margin-top: .35rem;
  flex-wrap: wrap;
}
.msg-reaction {
  border: 1px solid var(--gold-line);
  background: rgba(11,21,52,.7);
  color: var(--ink);
  border-radius: 999px;
  padding: .05rem .4rem;
  font-size: .78rem;
}
.react-row {
  display: flex;
  gap: .35rem;
  justify-content: center;
  padding: .35rem .6rem .7rem;
}
.react-row button {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 0;
  background: #182450;
  font-size: 1.15rem;
  cursor: pointer;
}
.composer {
  background: rgba(6, 11, 32, .92);
  border-top: 1px solid rgba(163,75,255,.16);
}
.composer-box {
  background: #101B40;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
}
/* iOS Safari auto-zooms a focused field under 16px. Pin the composer
   independently of html font-base, ui-scale, and `font: inherit`.
   Not media-gated: hover/pointer queries are not the iOS trigger. */
.app-shell .composer #message-input,
.app-shell .composer #message-editor,
.app-shell .composer-box textarea,
.app-shell .composer-box .composer-editor {
  font-size: 16px;
  font-size: max(16px, 1rem);
}
.send-btn,
.mic-btn {
  background: var(--gold-shine);
  color: #fff;
  border-radius: 50%;
}

/* —— Call screens —— */
.call-dialog {
  width: min(26.75rem, 100vw);
  max-width: 100vw;
  height: min(58rem, 100dvh);
  max-height: 100dvh;
  margin: 0 auto;
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 18%, rgba(121,56,255,.28), transparent 46%),
    #060B20;
  padding: 0;
}
.call-dialog.is-video-call,
.call-ui.is-active.is-video {
  background: #060B20;
}
.call-ui {
  height: 100%;
  padding: 1.4rem 1.1rem 1.6rem;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: center;
}
.call-ui.is-voice .call-stage {
  background: transparent;
  min-height: 220px;
}
.call-avatar {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: #101B40;
  color: #fff;
  box-shadow: 0 0 0 6px rgba(121,56,255,.18), 0 0 40px rgba(22,119,255,.35);
  overflow: hidden;
}
.call-peer { font-size: 1.35rem; font-weight: 700; }
.call-timer { color: var(--muted); font-weight: 500; }
.call-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem 0.4rem;
  justify-items: center;
  padding: .4rem .6rem 0;
}
.call-ctrl {
  width: 4.1rem;
  height: 4.1rem;
  min-width: 0;
  border-radius: 50%;
  background: #182450;
  border: 0;
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: .15rem;
  padding: 0;
  font-size: .68rem;
}
.call-ctrl .nova-ico { width: 22px; height: 22px; }
.call-ctrl.is-on,
.call-ctrl[aria-pressed="true"] {
  background: #F8FAFF;
  color: #121833;
}
.call-end,
.call-reject {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: var(--danger);
  grid-column: 2;
}
.call-accept {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: #2ecc71;
}
.call-ctrl-label { font-size: .68rem; color: var(--muted); }
.call-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  width: min(100%, 22rem);
}
.call-tile {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #101B40;
  min-height: 8.5rem;
  border: 1px solid var(--gold-line);
}
.call-tile span {
  position: absolute;
  inset-inline-start: .55rem;
  bottom: .45rem;
  font-size: .78rem;
  font-weight: 650;
}
.call-future {
  margin: .35rem auto 0;
  font-size: .75rem;
  color: var(--muted);
  max-width: 18rem;
}

/* —— Settings hub —— */
.amor-settings .amor-hub {
  display: grid;
  gap: .55rem;
  padding: .4rem .9rem 1.2rem;
}
.amor-hub-row {
  background: #101B40;
  border: 1px solid rgba(163,75,255,.16);
  border-radius: 16px;
  padding: .7rem .85rem;
}
.amor-hub-ico {
  background: var(--gold-shine);
  color: #fff;
}
.amor-profile-card {
  display: flex;
  gap: .85rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(22,119,255,.18), rgba(121,56,255,.22));
  border: 1px solid var(--gold-line);
  border-radius: 18px;
  padding: .95rem 1rem;
  margin: .35rem .9rem .8rem;
  color: inherit;
  text-decoration: none;
}
.amor-profile-card .avatar {
  width: 3.4rem; height: 3.4rem; border-radius: 50%;
  background: var(--gold-shine); color: #fff;
  display: grid; place-items: center; font-weight: 800;
}
.appearance-swatches,
.appearance-themes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
}
.theme-card,
.accent-dot {
  border: 1px solid var(--gold-line);
  background: #101B40;
  border-radius: 14px;
  min-height: 4.4rem;
  color: var(--ink);
  cursor: pointer;
}
.theme-card.is-active,
.accent-dot.is-active {
  box-shadow: 0 0 0 2px #A34BFF;
}
.accent-dot { min-height: 2.6rem; border-radius: 999px; }
.accent-dot[data-accent="violet"] { background: #7938FF; }
.accent-dot[data-accent="blue"] { background: #1677FF; }
.accent-dot[data-accent="cyan"] { background: #13D9FF; }

/* —— Bottom nav —— */
.amor-tabs {
  display: none;
}
@media (max-width: 860px), ((max-width: 1366px) and (hover: none) and (pointer: coarse)) {
  .amor-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(6, 11, 32, .94);
    border-top: 1px solid rgba(163, 75, 255, .18);
    backdrop-filter: blur(16px);
  }
  .amor-tab.is-active { color: #A34BFF; }
}

/* —— Desktop rail —— */
@media (min-width: 861px) {
  .nova-nav {
    background: #0B1534;
    border-inline-end: 1px solid rgba(163,75,255,.16);
  }
  .nova-nav .nav-item {
    color: var(--muted);
    border-radius: 14px;
  }
  .nova-nav .nav-item.active,
  .nova-nav .nav-item:hover {
    color: #fff;
    background: rgba(121,56,255,.16);
  }
  .sidebar {
    background: #0B1534;
    border-inline-end: 1px solid rgba(163,75,255,.14);
  }
  .chat-pane {
    background: var(--bg);
  }
}

/* —— Message actions / media viewer —— */
.msg-actions-sheet {
  background: #101B40;
  border: 1px solid var(--gold-line);
  border-radius: 18px;
  box-shadow: var(--elev-2);
}
.image-viewer-dialog {
  background: #060B20;
}
.image-viewer-sheet { background: transparent; }

/* —— Notifications (in-app) —— */
.toast-host .toast,
.pl-toast {
  background: #101B40;
  border: 1px solid var(--gold-line);
  color: var(--ink);
  border-radius: 14px;
}

.notify-card {
  display: flex;
  gap: .7rem;
  align-items: center;
  background: #101B40;
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  padding: .7rem .85rem;
}

/* —— Contact profile —— */
.contact-sheet .contact-hero-avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  margin: .4rem auto .2rem;
  box-shadow: 0 0 0 4px rgba(121,56,255,.25);
}
.contact-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  padding: .4rem 0 .8rem;
}
.contact-actions .btn {
  border-radius: 14px;
}

/* Font-base tokens live in app.css (--font-base × --ui-scale).
   Absolute html font-size here overrode that calc and set sm to 15px,
   which made inherited fields smaller than iOS Safari's 16px zoom threshold. */

@media (prefers-reduced-motion: reduce) {
  .nova-orbs .orb,
  .amor-sig-shine,
  .splash-cta,
  .splash-cta::after,
  .splash-logo-sheen,
  .splash-hero[data-intro] .amor-logo,
  .splash-hero[data-intro] .brand-name,
  .splash-hero[data-intro] .brand-tag,
  .splash-hero[data-intro] .lang-switch,
  .splash-hero[data-intro] .splash-cta,
  .splash-hero[data-intro] .splash-fine,
  .moment-ring {
    animation: none !important;
    transition: none !important;
  }
  .splash-hero[data-intro] .amor-logo,
  .splash-hero[data-intro] .brand-name,
  .splash-hero[data-intro] .brand-tag,
  .splash-hero[data-intro] .lang-switch,
  .splash-hero[data-intro] .splash-cta,
  .splash-hero[data-intro] .splash-fine {
    opacity: 1;
    transform: none;
  }
}

/* —— Desktop / theme repair (recording 2026-10-12) —— */
html, body {
  background: var(--bg);
  color: var(--ink);
}
body:has(.app-shell) {
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
}
.app-shell {
  background: var(--bg);
  overflow: hidden;
}

.amor-settings,
.calls-shell .settings-main,
.amor-inbox,
.amor-hub,
.settings-scroll,
.module-scroll,
.module-panel.active {
  background: var(--bg-2, var(--bg));
  color: var(--ink);
}
.amor-inbox-head,
.sidebar-head,
.page-head {
  background: var(--bg);
  color: var(--ink);
  border-bottom: 1px solid var(--gold-line);
}
.amor-inbox-head h1,
.sidebar-head h1,
.page-head h1 {
  color: var(--ink);
}
.amor-hub-row {
  background: var(--panel-solid) !important;
  color: var(--ink);
}
.amor-pills .pill,
.amor-inbox .filter-pills .pill,
.calls-filters .pill {
  background: var(--elevated) !important;
  color: var(--ink) !important;
}
.amor-pills .pill.active,
.amor-inbox .filter-pills .pill.active,
.calls-filters .pill.active {
  background: var(--gold-shine) !important;
  color: #fff !important;
}
.amor-tabs {
  background: var(--panel-solid) !important;
  border-top-color: var(--gold-line) !important;
  color: var(--muted);
}
.control-scroll .sheet-btn {
  background: var(--panel-solid) !important;
  color: var(--ink) !important;
  border: 1px solid var(--gold-line) !important;
}
.control-scroll .sheet-btn:hover {
  border-color: var(--gold) !important;
}

/* Login fields: label stacked above input, full width, RTL-safe */
.auth-card,
.auth-card.amor-card {
  overflow: visible;
}
.auth-card .stack {
  width: 100%;
  text-align: start;
}
.auth-card .stack label {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: .4rem;
  margin: 0;
}
.auth-card .stack label > span {
  display: block;
  width: 100%;
  font-size: .82rem;
  line-height: 1.3;
  color: var(--muted);
  text-align: start;
}
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
  width: 100%;
  max-width: 100%;
  text-align: start;
  color: var(--ink);
}

/* Compact toasts — never a full-viewport bar */
.nova-toast-host,
.nova-toast-host[popover] {
  inset-inline: auto !important;
  inset-inline-end: 0.85rem !important;
  width: min(22rem, calc(100vw - 1.5rem)) !important;
  max-width: min(22rem, calc(100vw - 1.5rem)) !important;
}
[dir="rtl"] .nova-toast-host,
[dir="rtl"] .nova-toast-host[popover] {
  inset-inline-end: auto !important;
  inset-inline-start: 0.85rem !important;
}
.nova-toast {
  width: 100%;
}

/* Settings hub: header stays put, pages scroll underneath */
.user-settings-shell .settings-main {
  overflow: hidden;
  min-height: 0;
}
.user-settings-shell .amor-inbox-head {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.user-settings-shell .settings-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-bottom: 1.25rem;
}
.amor-settings-page .prefs-form > .prefs-section-title:first-child,
.amor-settings-page > .stack > .prefs-section-title:first-child,
.amor-settings-page > .prefs-privacy > h2:first-child {
  display: none;
}
.appearance-swatches,
.appearance-themes {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.amor-settings-page .chk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: .75rem;
  min-height: 48px;
  padding: .35rem 0;
  font-size: .95rem;
  color: var(--ink);
  white-space: normal;
}
.amor-settings-page .chk input {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

/* Admin users: toolbar never overlaps the first card */
#panel-users .module-toolbar,
#panel-admins .module-toolbar,
#panel-control .module-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .85rem 0 1rem;
  background: var(--bg);
  position: relative;
  z-index: 2;
}
#panel-users .user-admin-actions,
#panel-admins .user-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
#panel-users .user-admin-actions .btn.block,
#panel-admins .user-admin-actions .btn.block {
  width: auto;
  min-width: 10rem;
  border-radius: 999px;
}
#panel-users .conv-list,
#panel-admins .conv-list,
#control-sessions,
#control-events,
.amor-inbox .conv-list,
.calls-shell .conv-list {
  padding-top: .2rem;
}
#user-list .meta,
#admin-list .meta {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .65rem;
  min-width: 0;
}
#user-list .meta span,
#admin-list .meta span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.admin-shell.is-workspace,
.app-shell.admin-shell.is-workspace .sidebar.module-rail,
.app-shell.admin-shell.is-workspace .module-panel.active {
  background: var(--bg);
  color: var(--ink);
}
.app-shell.admin-shell.is-workspace {
  padding-bottom: calc(3.6rem + env(safe-area-inset-bottom, 0px));
}

.chat-header .ui-scale,
.chat-header .chat-zoom,
.chat-header #btn-search,
.chat-header #btn-email-nudge { display: none !important; }
.chat-pane { position: relative; }
.conn-banner {
  background: rgba(16, 27, 64, .94);
  color: var(--ink);
}

.media-preview-stage:not(:has(img:not([hidden]))):not(:has(video:not([hidden])))::after {
  content: "";
  width: 3rem;
  height: 3rem;
  opacity: .45;
  background: currentColor;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'><path d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/><path d='M14 3v6h6'/></svg>") center / contain no-repeat;
}

/* Desktop: full-width NOVA workspace, left rail, no phone column */
@media (min-width: 861px) {
  .nova-nav {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding: .75rem .45rem;
    width: var(--nav-w);
    background: var(--panel-solid);
    border-inline-end: 1px solid var(--gold-line);
    min-height: 0;
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
  }
  .nova-nav-scroll {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .amor-tabs {
    display: none !important;
  }
  .app-shell.admin-shell,
  .app-shell.admin-chat,
  .app-shell.user-settings-shell,
  .app-shell.calls-shell,
  .app-shell.user-chat,
  .app-shell.updates-shell {
    display: grid !important;
    grid-template-columns: var(--nav-w) minmax(0, 1fr);
    height: 100dvh;
    max-height: 100dvh;
    padding-bottom: 0 !important;
    width: 100%;
    max-width: none;
  }
  .app-shell.admin-chat.has-conversation {
    grid-template-columns: var(--nav-w) minmax(0, 1fr);
  }
  .admin-shell:not(.is-workspace) .sidebar.module-rail,
  .admin-chat:not(.has-conversation) .sidebar#admin-side,
  .calls-shell .settings-main,
  .user-settings-shell .settings-main,
  .updates-shell .settings-main,
  .admin-shell.is-workspace .sidebar.module-rail {
    width: auto !important;
    max-width: none !important;
    margin-inline: 0 !important;
    flex: 1 1 auto;
    min-width: 0;
  }
  .app-shell.admin-shell.is-workspace {
    padding-bottom: 0 !important;
  }
  .app-shell.admin-shell.is-workspace .module-panel.active {
    padding-inline: clamp(1.25rem, 3vw, 2.5rem);
    padding-bottom: 2rem;
  }
}

@media (min-width: 861px) and (max-height: 820px) {
  .nova-nav {
    padding: .5rem .35rem;
    gap: .18rem;
  }
  .nova-nav .nova-logo {
    width: 2.6rem;
    height: 2.6rem;
    margin-bottom: .35rem;
  }
  .nova-nav a.nav-item,
  .nova-nav button.nav-item {
    padding: .42rem .12rem;
    gap: .12rem;
    font-size: .62rem;
  }
}

/* Phones: full-bleed shell, no light gutters around a 27rem column */
@media (max-width: 860px), ((max-width: 1366px) and (hover: none) and (pointer: coarse)) {
  .admin-shell:not(.is-workspace) .sidebar.module-rail,
  .admin-chat:not(.has-conversation) .sidebar#admin-side,
  .calls-shell .settings-main,
  .user-settings-shell .settings-main {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
  }
  .amor-tabs {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    left: 0;
    right: 0;
  }
}

body.theme-light .amor-inbox .conv-list li,
body.theme-light .calls-shell .conv-list li,
body.theme-light .amor-list li {
  border-bottom-color: rgba(18, 24, 51, .08) !important;
}
body.theme-light .amor-inbox-head h1 {
  color: var(--ink);
}
body.theme-light .chat-pane,
body.theme-light .chat-pane.filled {
  background:
    radial-gradient(ellipse at 80% -10%, rgba(121, 56, 255, 0.08), transparent 42%),
    var(--bg);
}
body.theme-light .composer,
body.theme-light .composer-box {
  background: var(--panel-solid);
  color: var(--ink);
}
body.theme-light .composer-box textarea::placeholder {
  color: var(--muted);
}
body.theme-light .msg.in {
  background: var(--bubble-in);
  color: var(--ink);
}

/* ========================================================================
   AMOR 121 NOVA — master-board fidelity (screens 01–13)
   ======================================================================== */

.amor-logo.is-lg {
  width: 9.6rem;
  height: 9.6rem;
}
.amor-logo.is-lg svg {
  filter: drop-shadow(0 0 28px rgba(121, 56, 255, .7)) drop-shadow(0 0 48px rgba(22, 119, 255, .35));
}
.splash-hero {
  width: min(22rem, 100%);
  gap: .2rem;
}
.splash-hero .brand-name {
  letter-spacing: .22em;
  font-size: clamp(2.15rem, 8vw, 2.75rem);
  margin-top: .55rem;
}
.splash-hero .brand-tag {
  margin-top: .45rem;
  letter-spacing: .04em;
  font-size: 1rem;
  color: #C9D4F5;
}
.splash-hero .brand-tag-ar {
  margin-bottom: .85rem;
  font-size: .95rem;
  color: #8EA0C8;
}
.splash-hero .lang-switch {
  margin: .15rem auto 1.15rem;
}
.splash-cta {
  width: min(15.5rem, 100%);
  min-height: 54px;
  font-size: 1.02rem;
  letter-spacing: .01em;
}
.splash-fine {
  letter-spacing: .06em;
  text-transform: none;
  color: #7E8FB3;
}
@keyframes nova-orb-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6px, -8px, 0) scale(1.03); }
}
.orb-a { animation: nova-orb-float 18s ease-in-out infinite; }
.orb-b { animation: nova-orb-float 22s ease-in-out infinite reverse; }
.orb-c { animation: nova-orb-float 26s ease-in-out infinite; }

.amor-inbox-head {
  justify-content: space-between !important;
  padding: .95rem 1rem .4rem !important;
}
.amor-inbox-head .brand-row h1,
.amor-inbox-head h1 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink) !important;
}
.amor-pills,
.amor-inbox .filter-pills,
.calls-filters {
  justify-content: flex-start !important;
  padding: .35rem 1rem .55rem !important;
}
.amor-pills .pill,
.amor-inbox .filter-pills .pill,
.calls-filters .pill {
  background: #182450 !important;
  color: #A9B5D4 !important;
  border: 0 !important;
}
.amor-pills .pill.active,
.amor-inbox .filter-pills .pill.active,
.calls-filters .pill.active {
  background: var(--gold-shine) !important;
  color: #fff !important;
}
.conv-list li,
.amor-list li {
  border-bottom: 1px solid rgba(163, 75, 255, .08) !important;
}
.conv-list .avatar,
.amor-list .avatar {
  background: var(--gold-shine) !important;
  color: #fff !important;
}
.conv-list .badge,
.amor-inbox .badge {
  background: var(--gold-shine) !important;
  color: #fff !important;
}

.amor-hub {
  gap: .55rem !important;
  padding: 0 .9rem 1.4rem !important;
}
.amor-hub-row {
  background: #101B40 !important;
  border: 1px solid rgba(163, 75, 255, .16) !important;
  border-radius: 16px !important;
  border-bottom: 1px solid rgba(163, 75, 255, .16) !important;
  min-height: 68px !important;
  padding: .75rem .9rem !important;
}
.amor-hub-ico {
  background: var(--gold-shine) !important;
  color: #fff !important;
  width: 2.55rem !important;
  height: 2.55rem !important;
  border-radius: 50% !important;
}
.amor-hub-ico.ico-account { background: linear-gradient(135deg, #1677FF, #7938FF) !important; }
.amor-hub-ico.ico-privacy { background: linear-gradient(135deg, #7938FF, #A34BFF) !important; }
.amor-hub-ico.ico-notify { background: linear-gradient(135deg, #13D9FF, #1677FF) !important; }
.amor-hub-ico.ico-appear { background: linear-gradient(135deg, #A34BFF, #1677FF) !important; }
.amor-hub-ico.ico-storage { background: linear-gradient(135deg, #5B28F0, #13D9FF) !important; }
.amor-hub-ico.ico-devices { background: linear-gradient(135deg, #1677FF, #13D9FF) !important; }
.amor-hub-ico.ico-help { background: linear-gradient(135deg, #7938FF, #13D9FF) !important; }
.amor-hub-ico.ico-lang { background: linear-gradient(135deg, #182450, #7938FF) !important; }
.amor-hub-ico.ico-people { background: linear-gradient(135deg, #1677FF, #5B28F0) !important; }
.amor-hub-ico.ico-sessions { background: linear-gradient(135deg, #13D9FF, #7938FF) !important; }
.amor-hub-ico.ico-repair { background: linear-gradient(135deg, #A34BFF, #FF4569) !important; }
.amor-chevron { color: #A9B5D4 !important; }
.amor-profile-card {
  background: linear-gradient(135deg, rgba(22, 119, 255, .22), rgba(121, 56, 255, .28)) !important;
}

.theme-card {
  display: grid;
  justify-items: center;
  gap: .45rem;
  padding: .7rem .45rem .75rem;
  min-height: 6.2rem;
  background: #101B40;
  border: 1px solid rgba(163, 75, 255, .2);
  border-radius: 16px;
  color: var(--ink);
}
.theme-preview {
  width: 100%;
  height: 2.6rem;
  border-radius: 10px;
  display: block;
}
.theme-preview-system {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.theme-preview-system i:first-child { background: #F7F8FF; }
.theme-preview-system i:last-child { background: #0B1534; }
.theme-preview-light { background: #F7F8FF; box-shadow: inset 0 0 0 1px #D7DCF0; }
.theme-preview-dark { background: #0B1534; box-shadow: inset 0 0 0 1px #2A3560; }
.theme-card.is-active {
  box-shadow: 0 0 0 2px #A34BFF;
}
.nova-appearance .appear-row {
  background: #101B40;
  border: 1px solid rgba(163, 75, 255, .16);
  border-radius: 14px;
  padding: .7rem .85rem;
}
.nova-appearance .appear-row select {
  width: 100%;
  margin-top: .35rem;
  background: #0B1534;
  color: var(--ink);
  border: 1px solid rgba(163, 75, 255, .22);
  border-radius: 10px;
  padding: .55rem .7rem;
}

.notify-preview {
  display: grid;
  gap: .65rem;
  margin-bottom: .4rem;
}
.notify-card {
  background: #101B40 !important;
  border: 1px solid rgba(163, 75, 255, .22) !important;
}
.notify-card span {
  display: grid;
  gap: .15rem;
  min-width: 0;
}
.notify-card small {
  color: var(--muted);
  font-size: .78rem;
}
.notify-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(22, 119, 255, .28), rgba(121, 56, 255, .3));
  flex: 0 0 2.5rem;
}
.notify-mark.is-call {
  background: linear-gradient(160deg, #1677FF, #7938FF);
  color: #fff;
}

.moments-main { background: var(--bg); }
.moments-lead {
  margin: 0 1rem .7rem;
  color: var(--muted);
  font-size: .86rem;
}
.moments-board {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding: .15rem 1rem 1.4rem;
  scrollbar-width: none;
}
.moments-board::-webkit-scrollbar { display: none; }
.moment-create-card {
  flex: 0 0 7.4rem;
  height: 11.2rem;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #182450, #0B1534);
  color: #fff;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: .45rem;
  padding: .85rem;
  text-align: start;
  cursor: pointer;
}
.moment-create-plus {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold-shine);
  font-size: 1.3rem;
  font-weight: 700;
}
.moments-rail {
  display: flex;
  gap: .75rem;
  min-width: 0;
}
.moment-story-card {
  position: relative;
  flex: 0 0 7.4rem;
  height: 11.2rem;
  border-radius: 18px;
  overflow: hidden;
  background: #101B40;
}
.moment-story-photo,
.moment-story-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(160deg, #1677FF, #7938FF);
  color: #fff;
}
.moment-story-name,
.moment-story-ago {
  position: absolute;
  inset-inline-start: .55rem;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
  font-size: .78rem;
  font-weight: 700;
}
.moment-story-name { bottom: 1.35rem; }
.moment-story-ago { bottom: .4rem; font-weight: 500; opacity: .86; }
.moment-story-body,
.moment-story-card .status-del {
  display: none;
}

.call-dialog {
  background:
    radial-gradient(circle at 50% 16%, rgba(121, 56, 255, .34), transparent 46%),
    radial-gradient(circle at 80% 90%, rgba(22, 119, 255, .16), transparent 40%),
    #060B20 !important;
}
.call-avatar {
  width: 176px !important;
  height: 176px !important;
  box-shadow:
    0 0 0 7px rgba(121, 56, 255, .22),
    0 0 0 14px rgba(22, 119, 255, .12),
    0 0 48px rgba(121, 56, 255, .4) !important;
}
.call-ctrl {
  background: #182450 !important;
  color: #F8FAFF !important;
}
.call-end,
.call-reject {
  background: #FF4569 !important;
  box-shadow: 0 8px 24px rgba(255, 69, 105, .35);
}

.msg-actions-sheet {
  background: #101B40 !important;
  border-radius: 20px !important;
}
.react-row button {
  background: #182450 !important;
}
.image-viewer-dialog {
  background: rgba(6, 11, 32, .96) !important;
}

.contact-sheet .contact-hero-avatar {
  width: 6rem !important;
  height: 6rem !important;
  box-shadow: 0 0 0 5px rgba(121, 56, 255, .28), 0 0 28px rgba(22, 119, 255, .3);
}
.contact-actions .btn {
  background: #182450;
  border: 0;
  color: var(--ink);
  border-radius: 16px;
  min-height: 3.4rem;
  display: grid;
  justify-items: center;
  gap: .2rem;
  font-size: .78rem;
}
.contact-media {
  margin: .2rem 0 .8rem;
  padding: .85rem 1rem;
  background: #101B40;
  border-radius: 16px;
  border: 1px solid rgba(163, 75, 255, .16);
}
.contact-media h4 {
  margin: 0 0 .35rem;
  font-size: .95rem;
}
.contact-media-empty {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
}
.contact-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .4rem;
}
.contact-media-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  min-height: 5.2rem;
  padding: 0;
  border: 0;
  border-radius: .7rem;
  overflow: hidden;
  background: #0B1534;
  color: var(--ink);
  cursor: pointer;
}
.contact-media-item img {
  width: 100%;
  height: 5.2rem;
  object-fit: cover;
  display: block;
}
.contact-media-kind {
  font-size: .68rem;
  color: var(--muted);
}
.contact-media-name {
  max-width: 90%;
  font-size: .68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-media-item.is-view-once {
  position: relative;
}
.contact-media-vo {
  position: absolute;
  inset-inline-start: .3rem;
  bottom: .3rem;
  font-size: .62rem;
  font-weight: 700;
  line-height: 1;
  padding: .2rem .35rem;
  border-radius: 999px;
  background: rgba(121, 56, 255, .92);
  color: #fff;
}

.amor-tabs {
  background: rgba(6, 11, 32, .96) !important;
  border-top: 1px solid rgba(163, 75, 255, .18) !important;
}
.amor-tab.is-active { color: #A34BFF !important; }

.nova-toast,
.pl-toast,
.toast-host .toast {
  background: #101B40 !important;
  border: 1px solid rgba(163, 75, 255, .28) !important;
  border-radius: 16px !important;
  color: var(--ink) !important;
}

@media (min-width: 861px) {
  .app-shell.admin-chat,
  .app-shell.admin-chat.has-conversation {
    display: grid !important;
    grid-template-columns: var(--nav-w) minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    padding-bottom: 0 !important;
  }
  .admin-chat.has-conversation .sidebar#admin-side {
    display: none !important;
  }
  .admin-chat:not(.has-conversation) .sidebar#admin-side {
    display: flex !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    background: #0B1534 !important;
  }
  .admin-chat.has-conversation .chat-pane {
    display: flex !important;
    flex-direction: column;
    min-width: 0;
  }
  .admin-chat.has-conversation .chat-back-btn { display: inline-flex !important; }
  .nova-nav {
    background: #0B1534 !important;
  }
  .sidebar,
  .chat-pane,
  .settings-main {
    background: #0B1534;
  }
  .chat-pane.filled,
  .messages {
    background:
      radial-gradient(700px 380px at 80% 0%, rgba(121, 56, 255, .08), transparent 60%),
      #060B20;
  }
}

@media (max-width: 860px), ((max-width: 1366px) and (hover: none) and (pointer: coarse)) {
  .amor-inbox .sidebar-head h1,
  .amor-inbox-head h1 {
    color: var(--ink) !important;
  }
  .amor-inbox .search-row input,
  .amor-inbox #side-search {
    background: #101B40 !important;
    color: var(--ink) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb-a, .orb-b, .orb-c { animation: none !important; }
}

/* —— Unified NOVA search (inbox / users / audit / chat) —— */
.search-row,
.module-toolbar .search-row,
.nova-search,
.amor-search {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1rem .4rem !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.search-row::before,
.nova-search::before,
.amor-search::before {
  display: block !important;
  inset-inline-start: 1.85rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background-color: #A9B5D4 !important;
  opacity: 1;
}
.search-row input,
.search-bar input,
.nova-search input,
.amor-search input,
.amor-inbox .search-row input,
.amor-inbox #side-search,
.module-toolbar input[type="search"],
.module-toolbar #conv-search {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 46px;
  border-radius: 999px !important;
  background: #101B40 !important;
  color: #F8FAFF !important;
  border: 1px solid rgba(163, 75, 255, .28) !important;
  padding: .72rem 1.05rem .72rem 2.55rem !important;
  box-shadow: none !important;
  caret-color: #A34BFF;
}
[dir="rtl"] .search-row input,
[dir="rtl"] .nova-search input,
[dir="rtl"] .amor-search input,
[dir="rtl"] .module-toolbar input[type="search"] {
  padding: .72rem 2.55rem .72rem 1.05rem !important;
}
.search-row input::placeholder,
.nova-search input::placeholder,
.module-toolbar input[type="search"]::placeholder {
  color: #8EA0C8 !important;
}
.search-row input:focus,
.nova-search input:focus,
.module-toolbar input[type="search"]:focus {
  outline: none;
  border-color: #A34BFF !important;
  box-shadow: 0 0 0 3px rgba(121, 56, 255, .22) !important;
}
.nova-search .icon-btn,
.module-toolbar .search-row .icon-btn {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  background: #182450;
  color: #F8FAFF;
  border: 0;
  flex: 0 0 2.55rem;
}
#panel-inbox .amor-inbox-head {
  display: flex !important;
  justify-content: space-between !important;
}
#panel-inbox .amor-inbox-head .brand-row {
  display: flex;
  align-items: center;
  gap: .55rem;
}
@media (min-width: 861px) {
  .admin-shell:not(.is-workspace) .sidebar-head {
    display: none !important;
  }
}

/* —— Calls log (match inbox + NOVA sheet) —— */
.calls-shell,
.calls-shell .settings-main,
.nova-calls {
  background: var(--bg) !important;
  color: var(--ink);
}
.nova-calls .amor-inbox-head {
  justify-content: space-between !important;
}
.calls-shell .avatar,
.nova-calls .avatar,
.call-detail-dialog .avatar {
  background: var(--gold-shine) !important;
  color: #fff !important;
}
.amor-call-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(163, 75, 255, .08);
  cursor: pointer;
}
.amor-call-copy .name {
  font-weight: 700;
  color: var(--ink);
  unicode-bidi: isolate;
}
.amor-call-dir {
  color: #A9B5D4 !important;
}
.amor-call-dir.is-missed { color: #FF4569 !important; }
.amor-call-actions {
  display: flex;
  align-items: center;
  gap: .15rem;
  flex: 0 0 auto;
}
.amor-call-actions .icon-btn,
.calls-shell .call-redial {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #182450;
  color: #F8FAFF;
  border: 0;
}
.amor-call-actions .icon-btn.is-danger,
.call-detail-head .icon-btn.is-danger {
  color: #FF4569;
  background: rgba(255, 69, 105, .12);
}
.call-detail-dialog.sheet-dialog,
#call-group-dialog.sheet-dialog {
  width: min(26.75rem, 100vw);
  max-width: 100vw;
  height: min(36rem, 92dvh);
  max-height: 92dvh;
  margin: auto;
  padding: 0;
  border: 1px solid rgba(163, 75, 255, .22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 56, 255, .22), transparent 46%),
    #060B20;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(3, 8, 28, .55);
}
.call-detail-dialog::backdrop {
  background: rgba(6, 11, 32, .72);
  backdrop-filter: blur(10px);
}
.call-detail-head {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  gap: .5rem;
  padding: 1rem 1rem .7rem !important;
  text-align: start !important;
}
.call-detail-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-width: 0;
}
.call-detail-title h3 {
  margin: 0;
  font-size: 1.05rem;
  unicode-bidi: isolate;
}
.call-detail-title .avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
}
.call-detail-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .2rem 1rem 1.2rem !important;
}
.call-detail-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .75rem .8rem;
  background: #101B40;
  border: 1px solid rgba(163, 75, 255, .16);
  border-radius: 16px;
}
@media (max-width: 860px) {
  .call-detail-dialog.sheet-dialog,
  #call-group-dialog.sheet-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
}

.admin-shell:not(.is-workspace) > .sidebar.module-rail > .sidebar-head {
  display: none !important;
}
.amor-hub > .prefs-section-title {
  margin: .85rem .15rem .1rem;
  padding: 0;
}

/* Layout unification: same NOVA shell metrics, no new visual language */
@media (min-width: 861px) {
  :root { --amor-frame: 100%; }
  .app-shell.admin-shell,
  .app-shell.admin-chat,
  .app-shell.admin-chat.has-conversation,
  .app-shell.user-settings-shell,
  .app-shell.calls-shell,
  .app-shell.user-chat,
  .app-shell.updates-shell {
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding-bottom: 0 !important;
  }
  .app-shell.admin-chat,
  .app-shell.admin-chat.has-conversation,
  .app-shell.admin-shell:not(.is-workspace),
  .app-shell.admin-shell.is-workspace,
  .app-shell.user-settings-shell,
  .app-shell.calls-shell,
  .app-shell.user-chat,
  .app-shell.updates-shell {
    display: grid !important;
    grid-template-columns: var(--nav-w) minmax(0, 1fr) !important;
  }
  .admin-chat:not(.has-conversation) .chat-pane,
  .admin-shell:not(.is-workspace) .module-stage-host {
    display: none !important;
  }
  .admin-chat.has-conversation .chat-pane {
    display: flex !important;
    flex-direction: column;
    min-width: 0;
  }
  .admin-chat:not(.has-conversation) .sidebar#admin-side,
  .admin-shell:not(.is-workspace) .sidebar.module-rail {
    display: flex !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
  }
  .admin-chat.has-conversation .sidebar#admin-side {
    display: none !important;
  }
  .calls-shell .settings-main,
  .user-settings-shell .settings-main,
  .updates-shell .settings-main,
  .admin-shell.is-workspace .sidebar.module-rail {
    width: auto !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }
  .app-shell.admin-shell.is-workspace .module-panel.active {
    max-width: none;
    width: 100%;
    margin-inline: 0;
  }
  .amor-inbox-head,
  .admin-shell.is-workspace .sidebar-head {
    min-height: 3.6rem;
    box-sizing: border-box;
  }
}

@media (max-width: 860px), ((max-width: 1366px) and (hover: none) and (pointer: coarse)) {
  .amor-tabs {
    grid-template-columns: repeat(3, 1fr);
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
  }
  .updates-shell .settings-main {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
  }
}

/* —— Unified NOVA search (inbox / users / audit / chat) —— */
.search-row,
.module-toolbar .search-row,
.nova-search,
.amor-search {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1rem .4rem !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.search-row::before,
.nova-search::before,
.amor-search::before {
  display: block !important;
  inset-inline-start: 1.85rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background-color: #A9B5D4 !important;
  opacity: 1;
}
.search-row input,
.search-bar input,
.nova-search input,
.amor-search input,
.amor-inbox .search-row input,
.amor-inbox #side-search,
.module-toolbar input[type="search"],
.module-toolbar #conv-search {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 46px;
  border-radius: 999px !important;
  background: #101B40 !important;
  color: #F8FAFF !important;
  border: 1px solid rgba(163, 75, 255, .28) !important;
  padding: .72rem 1.05rem .72rem 2.55rem !important;
  box-shadow: none !important;
  caret-color: #A34BFF;
}
[dir="rtl"] .search-row input,
[dir="rtl"] .nova-search input,
[dir="rtl"] .amor-search input,
[dir="rtl"] .module-toolbar input[type="search"] {
  padding: .72rem 2.55rem .72rem 1.05rem !important;
}
.search-row input::placeholder,
.nova-search input::placeholder,
.module-toolbar input[type="search"]::placeholder {
  color: #8EA0C8 !important;
}
.search-row input:focus,
.nova-search input:focus,
.module-toolbar input[type="search"]:focus {
  outline: none;
  border-color: #A34BFF !important;
  box-shadow: 0 0 0 3px rgba(121, 56, 255, .22) !important;
}
.nova-search .icon-btn,
.module-toolbar .search-row .icon-btn {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  background: #182450;
  color: #F8FAFF;
  border: 0;
  flex: 0 0 2.55rem;
}
#panel-inbox .amor-inbox-head {
  display: flex !important;
  justify-content: space-between !important;
}
#panel-inbox .amor-inbox-head .brand-row {
  display: flex;
  align-items: center;
  gap: .55rem;
}
@media (min-width: 861px) {
  .admin-shell:not(.is-workspace) .sidebar-head {
    display: none !important;
  }
}

/* Full-screen conversation navigation — list XOR chat, never split */
.app-shell.admin-chat,
.app-shell.admin-chat.has-conversation,
.app-shell.admin-shell:not(.is-workspace),
.app-shell.user-chat,
.app-shell.user-chat.has-conversation {
  grid-template-columns: var(--nav-w) minmax(0, 1fr) !important;
}
.app-shell.admin-chat:not(.has-conversation) .chat-pane,
.app-shell.user-chat:not(.has-conversation) .chat-pane,
.app-shell.list-only .chat-pane {
  display: none !important;
}
.app-shell.admin-chat.has-conversation .sidebar#admin-side,
.app-shell.user-chat.has-conversation .sidebar#admin-side {
  display: none !important;
}
.app-shell.admin-chat:not(.has-conversation) .sidebar#admin-side,
.app-shell.user-chat:not(.has-conversation) .sidebar#admin-side,
.app-shell.list-only .sidebar#admin-side {
  display: flex !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  flex: 1 1 auto;
}
.app-shell.has-conversation .chat-pane {
  display: flex !important;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: none;
}
.app-shell.has-conversation .chat-back-btn {
  display: inline-flex !important;
  flex-shrink: 0;
}
.app-shell.has-conversation .amor-tabs {
  display: none !important;
}
.app-shell.has-conversation {
  padding-bottom: 0 !important;
}
.admin-shell:not(.is-workspace) .module-stage-host {
  display: none !important;
}

@media (min-width: 861px) {
  .app-shell.admin-chat,
  .app-shell.admin-chat.has-conversation,
  .app-shell.admin-shell:not(.is-workspace),
  .app-shell.user-chat,
  .app-shell.user-chat.has-conversation {
    display: grid !important;
    grid-template-columns: var(--nav-w) minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
  }
  .app-shell.admin-chat.has-conversation .sidebar#admin-side,
  .app-shell.user-chat.has-conversation .sidebar#admin-side {
    display: none !important;
  }
  .app-shell.admin-chat:not(.has-conversation) .sidebar#admin-side,
  .app-shell.admin-shell:not(.is-workspace) .sidebar.module-rail,
  .app-shell.user-chat:not(.has-conversation) .sidebar#admin-side {
    display: flex !important;
    width: auto !important;
    max-width: none !important;
  }
  .app-shell.has-conversation .chat-back-btn {
    display: inline-flex !important;
  }
}

/* —— Master pack: compact NOVA surfaces —— */
.nova-compact { gap: .65rem; padding: .85rem 1rem; }
.nova-compact .prefs-section-title,
.nova-compact h2,
.nova-compact h3 { margin: 0 0 .35rem; font-size: 1rem; }
.nova-switch,
.nova-check {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 2.4rem;
  margin: 0;
}
.nova-stat-list,
.nova-row-list { list-style: none; margin: 0; padding: 0; }
.nova-stat-list li,
.nova-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--gold-line);
}
.nova-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.nova-toolbar input[type="search"],
.nova-toolbar input[type="date"],
.nova-filters input { min-height: 2.4rem; max-width: 16rem; }
.chat-zoom {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  margin-inline-start: auto;
  padding: 2px 4px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .2);
}
.chat-zoom-value { min-width: 2.4rem; text-align: center; font-size: .75rem; color: var(--muted); }
.menu-item.menu-zoom {
  display: flex;
  align-items: center;
  gap: .65rem;
  cursor: default;
}
.menu-item.menu-zoom .chat-zoom { flex-shrink: 0; }
.messages,
#messages {
  --chat-zoom: 100;
  font-size: calc(1rem * var(--chat-zoom) / 100);
}
.messages .bubble,
.messages .msg-text,
.messages .msg-caption { font-size: 1em; }
.nova-sys-section {
  border: 1px solid var(--gold-line);
  border-radius: .75rem;
  padding: .75rem 1rem 1rem;
  margin: 0 0 1rem;
}
.nova-sys-section legend { padding: 0 .35rem; font-weight: 600; }
.udlg-section { margin: 0 0 .85rem; }
.udlg-h { margin: 0 0 .4rem; font-size: .92rem; }
.audit-log-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem .75rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--gold-line);
}
.prefs-form .btn.block { width: auto; min-width: 8rem; }
@media (max-width: 860px) {
  .app-shell, .settings-scroll, .module-scroll { overflow-x: hidden; }
  input, select, textarea { font-size: 16px; }
}
html[dir="rtl"] .nova-row,
html[dir="rtl"] .nova-switch { text-align: start; }

.appear-preview {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .75rem .85rem;
  margin: 0 0 .75rem;
  border: 1px solid var(--gold-line);
  border-radius: .85rem;
  background: #080808;
  min-height: 5.5rem;
}
.appear-preview[data-theme="light"] { background: #eef1fb; }
.appear-preview[data-wallpaper="forest"] { background: radial-gradient(ellipse at 30% 20%, rgba(31, 138, 101, .16), transparent 48%), #070707; }
.appear-preview[data-wallpaper="dusk"] { background: radial-gradient(ellipse at 80% 10%, rgba(90, 60, 120, .18), transparent 45%), #070707; }
.appear-preview-bubble {
  max-width: 82%;
  padding: .45rem .7rem;
  border-radius: 1rem;
  font-size: .82rem;
  line-height: 1.35;
}
.appear-preview-bubble.is-peer {
  align-self: flex-start;
  background: var(--bubble-in);
  color: var(--ink);
}
.appear-preview-bubble.is-me {
  align-self: flex-end;
  background: var(--bubble-out);
  color: #fff;
}
.appear-preview[data-font="sm"] { font-size: .9rem; }
.appear-preview[data-font="lg"] { font-size: 1.12rem; }
.sec-more { margin-top: .25rem; font-size: .75rem; }
.sec-more summary { cursor: pointer; color: var(--muted); }
.sec-grid { display: grid; gap: .2rem; margin: .35rem 0 0; }
.sec-field { display: grid; grid-template-columns: minmax(4rem, 8rem) minmax(0, 1fr); gap: .35rem; }
.sec-field dt { color: var(--muted); }
.sec-field dd { margin: 0; overflow-wrap: anywhere; }
.sec-row img, .sec-more img { max-width: 4.5rem; max-height: 4.5rem; object-fit: cover; border-radius: .4rem; }
#admin-list .nova-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; }
.nova-nav { z-index: 6; position: relative; }
.chat-header {
  z-index: 4;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: .5rem;
}
.chat-header .peer-meta { min-width: 0; overflow: hidden; }
.chat-header .chat-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: .15rem;
}
.admin-shell:not(.is-workspace) .module-stage-host { display: none !important; }
@media (max-width: 860px) {
  .nova-nav .nav-item span:not(.nav-ico) { display: none; }
  .chat-header { gap: .45rem; }
}

/* User inbox must occupy the main column; chat pane only when a thread is open */
.app-shell.user-chat:not(.has-conversation) .chat-pane,
.app-shell.user-chat.list-only .chat-pane,
.app-shell.admin-chat:not(.has-conversation) .chat-pane,
.app-shell.admin-chat.list-only .chat-pane {
  display: none !important;
}
.app-shell.user-chat:not(.has-conversation) .sidebar#admin-side,
.app-shell.user-chat.list-only .sidebar#admin-side,
.app-shell.admin-chat:not(.has-conversation) .sidebar#admin-side,
.app-shell.admin-chat.list-only .sidebar#admin-side {
  display: flex !important;
  flex-direction: column;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  flex: 1 1 auto;
}
.conv-list .conv-empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem 1.2rem;
  font-size: .95rem;
}

/* —— Chat conversation polish (RTL-first, WhatsApp-grade) —— */
html[dir="rtl"] body {
  letter-spacing: 0;
}
@media (min-width: 861px) {
  .nova-nav .nav-item span:not(.nova-ico) {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    unicode-bidi: isolate;
    line-height: 1.25;
  }
}
.chat-header .peer-meta h1,
.chat-header .status-line {
  unicode-bidi: isolate;
  letter-spacing: 0;
}
.chat-header .status-line {
  font-size: .75rem;
  line-height: 1.35;
  color: var(--muted);
}
.conn-banner {
  top: calc(env(safe-area-inset-top, 0px) + 4.15rem);
  padding: .4rem 1.05rem;
  background: rgba(18, 16, 8, .94);
  color: #f0d48a;
  border: 1px solid rgba(240, 212, 138, .28);
  font-weight: 600;
  letter-spacing: 0;
  unicode-bidi: isolate;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .32);
}
.messages {
  background:
    radial-gradient(800px 420px at 85% 0%, rgba(121,56,255,.10), transparent 58%),
    radial-gradient(600px 380px at 12% 100%, rgba(22,119,255,.07), transparent 52%),
    var(--bg);
}
.messages::before {
  content: "";
  flex: 1 0 0;
}
.msg {
  letter-spacing: 0;
  unicode-bidi: isolate;
}
.msg .body {
  unicode-bidi: isolate;
}
.msg .time {
  align-items: center;
  gap: .4rem;
  margin-top: .32rem;
  opacity: .92;
}
.msg .time [dir="ltr"] {
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}
.msg.is-media {
  padding: .4rem .45rem .45rem;
}
.msg.is-media .body.media-body { margin: 0; }
.msg.is-media .caption { padding: .4rem .2rem 0; }
.msg.is-media .time { margin-top: .3rem; }
.msg button.image-open {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  max-width: 100%;
}
.msg button.image-open.is-loading {
  min-width: min(12.5rem, 68vw);
  min-height: 9rem;
  border-radius: 14px;
  background:
    linear-gradient(110deg, rgba(16, 27, 64, .55) 28%, rgba(163, 75, 255, .16) 48%, rgba(16, 27, 64, .55) 68%);
  background-size: 200% 100%;
  animation: amor-media-shimmer 1.15s ease-in-out infinite;
}
.msg button.image-open.is-ready {
  min-width: 0;
  min-height: 0;
  background: transparent;
}
.msg button.image-open.is-broken {
  min-width: 8.5rem;
  min-height: 0;
  padding: .55rem .7rem;
  display: grid;
  place-items: center;
  gap: .3rem;
  color: rgba(248, 250, 255, .88);
  background: rgba(11, 21, 52, .35);
  border-radius: 14px;
}
.msg button.image-open img.preview,
.msg img.preview {
  display: block;
  max-width: min(17.5rem, 70vw);
  max-height: 20rem;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 14px;
  object-fit: cover;
  background: transparent;
}
.msg .vo-chip {
  display: inline-flex;
  width: auto;
  max-width: min(22rem, 100%);
}
.msg.is-media video.preview,
.msg.is-media .video-preview {
  display: block;
  width: min(17.5rem, 72vw);
  min-height: 10rem;
  max-height: min(21rem, 46dvh);
  border-radius: 14px;
  background: #0a1024;
}
.msg .media-fallback {
  width: 2rem;
  height: 2rem;
  opacity: .55;
  background: currentColor;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'><rect x='3' y='5' width='18' height='14' rx='2'/><circle cx='8.5' cy='10' r='1.4'/><path d='M21 16l-5.2-5.2a2 2 0 0 0-2.8 0L6 18'/></svg>") center / contain no-repeat;
}
.msg .media-fallback-label {
  font-size: .78rem;
  line-height: 1.3;
  text-align: center;
  padding-inline: .7rem;
  unicode-bidi: isolate;
}
.composer-box textarea,
.composer-box textarea::placeholder {
  letter-spacing: 0;
  unicode-bidi: isolate;
}
@keyframes amor-media-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* —— Exclusive NOVA liquid glass (iOS 26) — site-wide chrome —— */
:root {
  --glass-bg:
    linear-gradient(180deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .05) 34%, rgba(11, 21, 52, .22) 100%),
    rgba(8, 14, 36, .42);
  --glass-dock:
    linear-gradient(180deg, rgba(255, 255, 255, .14) 0%, rgba(16, 27, 64, .2) 42%, rgba(6, 11, 32, .38) 100%);
  --glass-blur: blur(32px) saturate(190%);
  --glass-border: 1px solid rgba(255, 255, 255, .16);
  --glass-shine:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 -1px 0 rgba(121, 56, 255, .14),
    0 10px 28px rgba(3, 8, 28, .28);
  --glass-radius: 22px;
}
.app-shell .chat-header,
.app-shell .sidebar-head,
.app-shell .amor-inbox-head,
.app-shell .page-head,
.app-shell .settings-head,
.app-shell .info-head,
.app-shell .module-toolbar,
.app-shell .composer,
.app-shell .amor-tabs,
.app-shell .sheet-head,
.app-shell .call-detail-head,
.auth-card.amor-card,
dialog.lang-dialog,
dialog.nova-modal .nm-inner,
dialog.sheet-dialog .sheet-form {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border: var(--glass-border) !important;
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  box-shadow: var(--glass-shine) !important;
}
.app-shell .chat-header,
.app-shell .sidebar-head,
.app-shell .amor-inbox-head,
.app-shell .page-head,
.app-shell .settings-head,
.app-shell .info-head {
  z-index: 5;
  width: auto;
  max-width: none;
  align-self: stretch;
  margin: .5rem .65rem 0;
  padding: .48rem .7rem;
  border-radius: var(--glass-radius);
  border-bottom-color: rgba(255, 255, 255, .16) !important;
}
.app-shell .chat-header {
  padding: .42rem .55rem;
  gap: .45rem;
}
.app-shell .chat-header::before,
.app-shell .sidebar-head::before,
.app-shell .amor-inbox-head::before,
.app-shell .page-head::before,
.app-shell .settings-head::before,
.app-shell .composer::before,
.app-shell .amor-tabs::before,
.auth-card.amor-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 90% at 12% -20%, rgba(255, 255, 255, .28), transparent 46%),
    radial-gradient(90% 70% at 92% 120%, rgba(163, 75, 255, .2), transparent 52%);
}
.app-shell .chat-header > *,
.app-shell .sidebar-head > *,
.app-shell .amor-inbox-head > *,
.app-shell .page-head > *,
.app-shell .settings-head > *,
.app-shell .composer > *,
.app-shell .amor-tabs > *,
.auth-card.amor-card > * {
  position: relative;
  z-index: 1;
}
.app-shell .chat-header .icon-btn,
.app-shell .sidebar-head .icon-btn,
.app-shell .amor-inbox-head .icon-btn,
.app-shell .inbox-tools .icon-btn,
.app-shell .settings-head .icon-btn,
.app-shell .sheet-head .icon-btn,
.app-shell .call-detail-head .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.app-shell .chat-header .icon-btn:hover,
.app-shell .sidebar-head .icon-btn:hover,
.app-shell .amor-inbox-head .icon-btn:hover,
.app-shell .inbox-tools .icon-btn:hover,
.app-shell .chat-header .icon-btn:focus-visible,
.app-shell .sidebar-head .icon-btn:focus-visible,
.app-shell .amor-inbox-head .icon-btn:focus-visible {
  background: rgba(121, 56, 255, .22);
  border-color: rgba(163, 75, 255, .4);
}
.app-shell .composer {
  margin: 0 .65rem calc(.5rem + env(safe-area-inset-bottom, 0px));
  padding: .4rem .48rem;
  border-radius: 26px;
  background: var(--glass-dock) !important;
}
.app-shell .composer-box,
.app-shell .search-row input,
.app-shell .nova-search input,
.app-shell .module-toolbar input[type="search"] {
  background: rgba(255, 255, 255, .07) !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.app-shell .conn-banner {
  top: calc(env(safe-area-inset-top, 0px) + 4.55rem);
  background: rgba(18, 16, 8, .62);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}
.app-shell .nova-nav {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08) 0%, rgba(11, 21, 52, .28) 28%, rgba(6, 11, 32, .36) 100%) !important;
  backdrop-filter: blur(28px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(170%) !important;
  border-inline-end: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset -1px 0 0 rgba(121, 56, 255, .12);
}
.app-shell .nova-nav .nav-item.active,
.app-shell .nova-nav .nav-item:hover {
  background: rgba(255, 255, 255, .08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 0 0 1px rgba(163, 75, 255, .22);
}
.app-shell .amor-tabs,
nav.amor-tabs {
  inset-inline: .55rem !important;
  bottom: calc(.45rem + env(safe-area-inset-bottom, 0px)) !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  max-width: calc(var(--amor-frame) - 1.1rem) !important;
  margin-inline: auto !important;
  border-radius: 26px !important;
  border-top: var(--glass-border) !important;
  background: var(--glass-dock) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  box-shadow: var(--glass-shine) !important;
  padding: .35rem .3rem .4rem !important;
}
.app-shell .module-toolbar {
  margin: .35rem .65rem .15rem;
  padding: .75rem .85rem;
  border-radius: 20px;
}
.app-shell .amor-pills .pill,
.app-shell .filter-pills .pill,
.app-shell .calls-filters .pill {
  background: rgba(255, 255, 255, .07) !important;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.app-shell .amor-pills .pill.active,
.app-shell .filter-pills .pill.active,
.app-shell .calls-filters .pill.active {
  background: var(--gold-shine) !important;
  border-color: transparent;
  color: #fff !important;
}
.auth-card.amor-card {
  border-radius: 28px;
}
.app-shell .sheet-head,
.app-shell .call-detail-head {
  margin: 0;
  padding: .85rem 1rem;
  border-radius: 22px 22px 0 0;
}
.app-shell .amor-hub-row,
.app-shell .amor-profile-card {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(16, 27, 64, .38)) !important;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
body.theme-light .app-shell .chat-header,
body.theme-light .app-shell .sidebar-head,
body.theme-light .app-shell .amor-inbox-head,
body.theme-light .app-shell .page-head,
body.theme-light .app-shell .settings-head,
body.theme-light .app-shell .composer,
body.theme-light .app-shell .amor-tabs,
body.theme-light .auth-card.amor-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .78) 0%, rgba(248, 250, 255, .48) 100%) !important;
  border-color: rgba(18, 24, 51, .1) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 10px 24px rgba(18, 24, 51, .08) !important;
}
body.theme-light .app-shell .composer-box {
  background: rgba(255, 255, 255, .55) !important;
  border-color: rgba(18, 24, 51, .1) !important;
}
html.kb-open .app-shell .chat-header {
  margin-top: .35rem;
  padding-top: .3rem;
  padding-bottom: .3rem;
}
html.kb-open .app-shell .composer {
  margin-bottom: .35rem;
  padding-bottom: .35rem;
}
@media (max-width: 860px) {
  .app-shell .chat-header,
  .app-shell .sidebar-head,
  .app-shell .amor-inbox-head,
  .app-shell .composer {
    margin-inline: .5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell .chat-header,
  .app-shell .sidebar-head,
  .app-shell .amor-inbox-head,
  .app-shell .composer,
  .app-shell .amor-tabs,
  .auth-card.amor-card {
    backdrop-filter: blur(22px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(140%) !important;
  }
}

/* —— AMOR splash intro + liquid-glass language / CTA —— */
.auth-shell.nova-splash {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
.splash-hero {
  max-width: 100%;
  box-sizing: border-box;
}
.splash-logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 28%;
}
.splash-logo-sheen {
  position: absolute;
  inset: -12%;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .42) 50%, transparent 62%);
  transform: translate3d(-120%, 0, 0);
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.splash-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .04)),
    var(--gold-shine);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 10px 28px rgba(121, 56, 255, .35);
}
.splash-cta::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(192, 132, 255, .42), transparent 68%);
  opacity: .26;
  z-index: -1;
  pointer-events: none;
}
.splash-hero.is-leaving {
  opacity: 0;
  transform: translate3d(0, -8px, 0);
  pointer-events: none;
  transition: opacity 360ms ease, transform 360ms ease;
}
#login-card.is-entering {
  animation: splash-card-in 360ms ease both;
}
.lang-switch:has(.lang-switch-thumb) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: rgba(11, 21, 52, .88);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lang-switch:has(.lang-switch-thumb) {
    background: rgba(16, 27, 64, .38);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
  }
}
.lang-switch-thumb {
  position: absolute;
  inset-block: 3px;
  inset-inline-start: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(121, 56, 255, .5));
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42);
  pointer-events: none;
  z-index: 0;
  transform: translate3d(0, 0, 0);
  transition: transform 340ms cubic-bezier(.22, .61, .36, 1);
}
html[dir="ltr"] .lang-switch:has(a[hreflang="en"].active) .lang-switch-thumb {
  transform: translate3d(calc(100% + 3px), 0, 0);
}
html[dir="rtl"] .lang-switch:has(a[hreflang="en"].active) .lang-switch-thumb {
  transform: translate3d(calc(-100% - 3px), 0, 0);
}
.lang-switch:has(.lang-switch-thumb) a {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 5.4rem;
  text-align: center;
  background: transparent !important;
  box-shadow: none !important;
  color: #C9D4F5;
}
.lang-switch:has(.lang-switch-thumb) a.active {
  color: #fff;
  font-weight: 700;
}
.auth-shell .splash-cta:active,
.auth-shell .btn:active,
.auth-shell .lang-switch a:active {
  transform: scale(0.98);
}
.lang-switch a:focus-visible,
.splash-cta:focus-visible,
.auth-shell .btn:focus-visible {
  outline: 2px solid rgba(192, 132, 255, .85);
  outline-offset: 3px;
}
html.is-page-hidden .nova-orbs .orb,
html.is-page-hidden .splash-cta::after {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: no-preference) {
  .splash-hero[data-intro]:not(.is-shown) .amor-logo {
    animation: splash-logo-in 600ms ease-out both;
  }
  .splash-hero[data-intro]:not(.is-shown) .brand-name {
    animation: splash-rise 520ms ease-out 600ms both;
  }
  .splash-hero[data-intro]:not(.is-shown) .brand-tag {
    animation: splash-rise 520ms ease-out 720ms both;
  }
  .splash-hero[data-intro]:not(.is-shown) .lang-switch {
    animation: splash-rise 520ms ease-out 840ms both;
  }
  .splash-hero[data-intro]:not(.is-shown) .splash-cta {
    animation: splash-rise 520ms ease-out 960ms both;
  }
  .splash-hero[data-intro]:not(.is-shown) .splash-fine {
    animation: splash-rise 480ms ease-out 1080ms both;
  }
  .splash-hero[data-intro]:not(.is-shown) .splash-logo-sheen {
    animation: splash-sheen 700ms ease-out 600ms both;
  }
  .splash-cta::after {
    animation: splash-cta-breathe 4.8s ease-in-out infinite;
  }
}

@keyframes splash-logo-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes splash-rise {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes splash-sheen {
  from { transform: translate3d(-120%, 0, 0); }
  to { transform: translate3d(120%, 0, 0); }
}
@keyframes splash-card-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes splash-cta-breathe {
  0%, 100% { opacity: .22; }
  50% { opacity: .4; }
}

@media (hover: hover) and (pointer: fine) {
  .lang-switch:has(.lang-switch-thumb) a:hover:not(.active) {
    color: #fff;
  }
}

@media (max-width: 860px) {
  .orb-c { display: none; }
  .orb-a { animation-duration: 20s; }
  .orb-b { animation-duration: 24s; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .splash-hero .amor-logo.is-lg {
    width: 5.2rem;
    height: 5.2rem;
  }
  .splash-cta { margin-top: .55rem; }
  .splash-fine { margin-top: .45rem; }
  .auth-shell { padding-block: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lang-switch-thumb,
  .splash-hero.is-leaving,
  #login-card.is-entering {
    transition: none !important;
    animation: none !important;
  }
  .splash-hero.is-leaving {
    opacity: 0;
    transform: none;
  }
}

/* Admin/user inbox: two columns only — list fills the main area, no empty black pane */
@media (min-width: 861px) {
  .app-shell.admin-shell:not(.is-workspace),
  .app-shell.admin-chat:not(.has-conversation),
  .app-shell.user-chat:not(.has-conversation),
  .app-shell.list-only {
    display: grid !important;
    grid-template-columns: var(--nav-w) minmax(0, 1fr) !important;
  }
  .app-shell.admin-shell:not(.is-workspace) .module-stage-host,
  .app-shell.admin-chat:not(.has-conversation) .chat-pane,
  .app-shell.user-chat:not(.has-conversation) .chat-pane {
    display: none !important;
  }
  .app-shell.admin-shell:not(.is-workspace) .sidebar.module-rail,
  .app-shell.admin-chat:not(.has-conversation) .sidebar#admin-side,
  .app-shell.user-chat:not(.has-conversation) .sidebar#admin-side,
  .app-shell.list-only .sidebar#admin-side {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
  }
  .app-shell.admin-shell:not(.is-workspace) #panel-inbox.active,
  .app-shell.admin-shell:not(.is-workspace) .sidebar.module-rail > .module-panel.active {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}

/* Messages inbox matches Calls: title + tool + pills + rows */
.nova-inbox,
.nova-calls,
.calls-shell .settings-main {
  min-width: 0;
}
.nova-inbox .amor-inbox-head,
.nova-calls .amor-inbox-head {
  justify-content: space-between !important;
  align-items: center;
}
.inbox-tools-slot {
  display: flex;
  align-items: center;
  margin-inline-start: auto;
  flex-shrink: 0;
}
.nova-inbox .inbox-tools,
.nova-calls .inbox-tools {
  display: flex;
  align-items: center;
  gap: .2rem;
  flex-shrink: 0;
}
.nova-inbox .inbox-tools[hidden],
.nova-calls .inbox-tools[hidden],
.inbox-tools-slot .inbox-tools[hidden] {
  display: none !important;
}
.nova-inbox .search-row,
.amor-inbox > .search-row.nova-search {
  margin: .15rem 1rem .35rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.nova-inbox .search-row input,
.amor-inbox > .search-row.nova-search input {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: #182450;
  color: var(--ink);
  padding: .55rem 1rem;
}
.app-shell .nova-inbox .module-toolbar,
.app-shell #panel-inbox .module-toolbar {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  margin: 0;
  padding: 0;
  border-radius: 0;
}
.app-shell .nova-inbox .amor-inbox-head {
  margin-inline: .65rem;
}
.nova-inbox .conv-list li,
.nova-inbox .amor-list li {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(163, 75, 255, .08);
  background: transparent;
}
.nova-inbox .amor-inbox-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.nova-inbox .amor-inbox-copy .name,
.nova-inbox .amor-inbox-copy .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.nova-inbox .nav-toggle {
  display: none;
}
.inbox-select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .2rem 1rem .55rem;
  color: var(--ink);
}
.inbox-select-bar[hidden] { display: none !important; }
.inbox-select-bar .nova-check {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
}
.inbox-selected-count { color: var(--muted); font-size: .85rem; }
.nova-inbox .inbox-pick,
#panel-inbox .inbox-pick {
  display: none;
  flex: 0 0 1.5rem;
  align-items: center;
  justify-content: center;
}
.nova-inbox.is-selecting .inbox-pick,
#panel-inbox.is-selecting .inbox-pick {
  display: flex;
}
.inbox-pick-input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #7938FF;
}
.inbox-select-tools .icon-btn.is-danger {
  color: #FF4569;
}
.nova-inbox.is-selecting .conv-list li.is-checked,
#panel-inbox.is-selecting .conv-list li:has(.inbox-pick-input:checked) {
  background: rgba(121, 56, 255, .12);
}
@media (max-width: 860px), ((max-width: 1366px) and (hover: none) and (pointer: coarse)) {
  .nova-inbox .nav-toggle {
    display: none;
  }
}

/* —— Liquid glass: alerts, confirms, toasts, banners —— */
dialog.nova-modal,
dialog.nova-modal.ios-alert,
dialog.sheet-dialog {
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
  border: 0 !important;
}
dialog.nova-modal .nm-inner,
dialog.sheet-dialog .sheet-form {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px !important;
  border: var(--glass-border) !important;
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  box-shadow: var(--glass-shine), 0 24px 60px rgba(3, 8, 28, .45) !important;
}
dialog.nova-modal .nm-inner::before,
dialog.sheet-dialog .sheet-form::before,
.nova-toast::before,
.notify-card::before,
.conn-banner::before,
.sheet-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 90% at 12% -20%, rgba(255, 255, 255, .28), transparent 46%),
    radial-gradient(90% 70% at 92% 120%, rgba(163, 75, 255, .2), transparent 52%);
}
dialog.nova-modal .nm-inner > *,
dialog.sheet-dialog .sheet-form > *,
.nova-toast > *,
.notify-card > *,
.conn-banner > *,
.sheet-banner > * {
  position: relative;
  z-index: 1;
}
dialog.nova-modal::backdrop,
dialog.sheet-dialog::backdrop {
  background: rgba(6, 11, 32, .48) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
}
.nova-modal .nm-title {
  color: #F8FAFF !important;
  letter-spacing: 0;
}
.nova-modal .nm-msg {
  color: #C9D4F5 !important;
}
.nova-modal .nm-actions {
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, .1) !important;
}
.nova-modal .nm-actions .nm-btn {
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)),
    rgba(24, 36, 80, .42) !important;
  color: #F8FAFF !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.nova-modal .nm-actions .nm-btn.is-default {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .04)),
    var(--gold-shine) !important;
  border-color: rgba(255, 255, 255, .28) !important;
}
.nova-modal .nm-actions .nm-btn.is-destructive {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 69, 105, .28)),
    rgba(198, 40, 40, .42) !important;
  border-color: rgba(255, 150, 160, .35) !important;
  color: #fff !important;
}
.nova-modal .nm-input {
  background: rgba(8, 14, 36, .45) !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.nova-toast,
.pl-toast,
.toast-host .toast,
.notify-card,
.app-shell .conn-banner,
.sheet-banner,
.auth-card .error,
.auth-session-hint,
.msg-actions-sheet {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: var(--glass-border) !important;
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  box-shadow: var(--glass-shine) !important;
  color: #F8FAFF !important;
  border-radius: 18px !important;
}
.nova-toast .nt-title,
.notify-card span {
  color: #F8FAFF !important;
}
.nova-toast .nt-msg,
.notify-card small,
.sheet-banner {
  color: #C9D4F5 !important;
}
.nova-toast.error,
.sheet-banner {
  border-color: rgba(255, 150, 160, .32) !important;
}
.nova-toast .nt-mark {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(121, 56, 255, .45)),
    var(--gold-shine) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.nova-toast.error .nt-mark {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 69, 105, .4)),
    rgba(198, 40, 40, .55) !important;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  dialog.nova-modal .nm-inner,
  dialog.sheet-dialog .sheet-form,
  .nova-toast,
  .pl-toast,
  .toast-host .toast,
  .notify-card,
  .app-shell .conn-banner,
  .sheet-banner {
    background: rgba(11, 21, 52, .94) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.nova-modal .nm-inner,
  dialog.sheet-dialog .sheet-form,
  .nova-toast,
  .notify-card,
  .app-shell .conn-banner {
    backdrop-filter: blur(18px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
  }
}

/* AMOR_UNIFIED_VIEWPORT_V2
   iPhone Safari: visualViewport is the visible rect. Header + composer stay
   in-flow so the thread cannot paint under them. Safe-area lives on the
   chrome, not as extra shell padding (that double-counted insets and left
   the bubbles under the glass). */
html {
  --app-vvh: 100dvh;
  --app-vv-top: 0px;
}
.app-shell #chat-pane[hidden],
.app-shell.list-only #chat-pane {
  display: none !important;
}
@media (max-width: 860px),
       ((max-width: 1366px) and (hover: none) and (pointer: coarse)) {
  body:has(#chat-app) {
    overflow: hidden !important;
    overscroll-behavior: none;
    height: 100%;
    height: 100dvh;
  }
  #chat-app.app-shell {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: var(--app-vv-top, 0px) !important;
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: var(--app-vvh, 100dvh) !important;
    max-height: var(--app-vvh, 100dvh) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    transform: none !important;
    translate: none !important;
    overflow: hidden !important;
  }
  #chat-app.has-conversation #chat-pane:not([hidden]) {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0% !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    transform: none !important;
    padding: 0 !important;
  }
  #chat-app.has-conversation #chat-pane > dialog,
  #chat-app.has-conversation #chat-pane > .swipe-reply-hint {
    position: fixed !important;
  }
  #chat-app.has-conversation .chat-header,
  #chat-app.has-conversation .composer,
  #chat-app.has-conversation .reply-bar,
  #chat-app.has-conversation .search-bar,
  #chat-app.has-conversation .conn-banner,
  #chat-app.has-conversation #typing {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    inset: auto !important;
    flex: 0 0 auto !important;
    transform: none !important;
    margin-top: 0;
  }
  #chat-app.has-conversation .chat-header {
    margin: calc(8px + env(safe-area-inset-top, 0px)) 10px 6px !important;
    padding: .42rem .55rem !important;
    overflow: visible !important;
  }
  html.kb-open #chat-app.has-conversation .chat-header {
    margin-top: 8px !important;
    padding-top: .3rem !important;
    padding-bottom: .3rem !important;
  }
  #chat-app.has-conversation #messages {
    flex: 1 1 0% !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    padding: 6px 12px !important;
    -webkit-overflow-scrolling: touch;
  }
  #chat-app.has-conversation #messages::before {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }
  #chat-app.has-conversation .msg {
    max-width: min(86%, calc(100% - 4px)) !important;
    box-sizing: border-box !important;
  }
  #chat-app.has-conversation .composer {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    direction: ltr;
    margin: auto 8px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    padding: .35rem .4rem !important;
    overflow: visible !important;
    min-width: 0 !important;
    max-width: calc(100% - 16px) !important;
    box-sizing: border-box !important;
    gap: .35rem !important;
  }
  html.kb-open #chat-app.has-conversation .composer {
    margin-bottom: 8px !important;
  }
  #chat-app.has-conversation .composer-tools {
    display: contents !important;
  }
  #chat-app.has-conversation .composer-box {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    order: 2;
    direction: inherit;
  }
  html[dir="rtl"] #chat-app.has-conversation .composer-box {
    direction: rtl;
  }
  #chat-app.has-conversation .cam-btn {
    order: 1;
    flex: 0 0 auto !important;
    width: 40px !important;
    height: 40px !important;
  }
  #chat-app.has-conversation .mic-btn {
    order: 3;
    flex: 0 0 auto !important;
    width: 44px !important;
    height: 44px !important;
  }
  #chat-app.has-conversation #typing:not([hidden]) {
    margin: 0 !important;
    padding: .15rem .75rem !important;
    line-height: 1.3 !important;
    background: transparent !important;
  }
  #chat-app #message-input {
    font-size: 16px !important;
  }
  #chat-app.has-conversation .amor-tabs,
  #chat-app.has-conversation ~ .amor-tabs,
  html.kb-open .amor-tabs,
  html.kb-open nav.amor-tabs,
  html.kb-open .app-shell .amor-tabs {
    display: none !important;
  }
}
/* END_AMOR_UNIFIED_VIEWPORT_V2 */

/* AMOR_MOBILE_UI_V3 — login autofill, admin toolbars, toasts, contact media */
.auth-card input,
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
  color-scheme: dark;
  background: rgba(16, 27, 64, .92) !important;
  color: #F8FAFF !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  caret-color: #F8FAFF;
}
.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus,
.auth-card input:-webkit-autofill:active {
  -webkit-text-fill-color: #F8FAFF !important;
  caret-color: #F8FAFF;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  box-shadow: 0 0 0 1000px #101B40 inset !important;
  transition: background-color 99999s ease-out 0s;
}

.nova-toast-host,
.nova-toast-host[popover] {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px) + 4.75rem) !important;
  bottom: auto !important;
  left: 12px !important;
  right: 12px !important;
  inset-inline: 12px !important;
  width: auto !important;
  max-width: none !important;
  z-index: 2147483646 !important;
  pointer-events: none;
}
.nova-toast {
  position: relative !important;
  width: 100% !important;
}

.nova-check {
  display: flex !important;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}
.nova-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin: 0;
  border: 1.5px solid rgba(163, 75, 255, .55);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
}
.nova-check input[type="checkbox"]:checked {
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(121,56,255,.55)),
    #7938FF;
  border-color: transparent;
}

@media (max-width: 860px),
       ((max-width: 1366px) and (hover: none) and (pointer: coarse)) {
  #panel-audit .module-toolbar,
  #panel-admins .module-toolbar,
  #panel-users .module-toolbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .7rem !important;
    padding: .75rem .85rem .9rem !important;
  }
  #panel-audit .nova-search,
  #panel-admins .nova-search,
  #panel-users .nova-search,
  #panel-audit .nova-search input,
  #panel-admins .nova-search input,
  #panel-users .nova-search input {
    width: 100% !important;
    max-width: none !important;
  }
  #panel-audit .nova-filters {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    width: 100%;
  }
  #panel-audit .nova-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 0;
  }
  #panel-audit .nova-field span {
    font-size: .72rem;
    color: var(--muted);
  }
  #panel-audit .nova-field-full {
    grid-column: 1 / -1;
  }
  #panel-audit .nova-filters input,
  #panel-audit input[type="date"],
  #panel-audit input[type="text"],
  #panel-audit input[type="search"],
  #panel-control input[type="search"] {
    width: 100% !important;
    max-width: none !important;
    min-height: 44px !important;
    color-scheme: dark;
    color: #F8FAFF !important;
    background: rgba(255, 255, 255, .07) !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 14px !important;
    padding: .55rem .75rem !important;
    box-sizing: border-box;
  }
  #panel-admins .user-admin-actions,
  #panel-users .user-admin-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: .5rem !important;
    width: 100%;
  }
  #panel-admins .user-admin-actions .btn,
  #panel-users .user-admin-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
  #panel-admins .nova-check,
  #panel-users .nova-check {
    padding: .15rem 0;
  }
  #panel-control .control-scroll {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding-bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px));
  }
  #panel-control .manage-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  #panel-control .manage-actions .sheet-btn {
    width: 100%;
    min-height: 44px;
  }

}
/* END_AMOR_MOBILE_UI_V3 */

/* AMOR_CONTACT_MEDIA_SCROLL
   The glass sheet uses overflow:hidden, so the grid used to grow and get
   clipped. Give the media list its own viewport with a real max-height. */
#contact-dialog.sheet-dialog {
  max-height: min(var(--app-vvh, 100dvh), 92dvh) !important;
}
#contact-dialog .contact-sheet {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(var(--app-vvh, 100dvh), 90dvh) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
#contact-dialog .sheet-head,
#contact-dialog .sheet-body.contact-body,
#contact-dialog .contact-actions,
#contact-dialog .sheet-actions {
  flex: 0 0 auto !important;
  overflow: visible !important;
}
#contact-dialog .contact-media {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  margin: .2rem .85rem .35rem !important;
  overflow: hidden !important;
}
#contact-dialog .contact-media h4 {
  flex: 0 0 auto;
}
#contact-dialog .contact-media-scroll {
  flex: 1 1 auto;
  min-height: 10rem;
  max-height: min(52dvh, 28rem);
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-bottom: .35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(163, 75, 255, .55) transparent;
}
#contact-dialog .contact-media-scroll::-webkit-scrollbar {
  width: 6px;
}
#contact-dialog .contact-media-scroll::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
#contact-dialog .contact-media-item {
  touch-action: pan-y;
}

/* AMOR_MOBILE_NAV_FIX_START */
@media (max-width: 860px) {
  .app-shell .amor-tabs,
  nav.amor-tabs {
    position: fixed !important;
    inset-inline: .5rem !important;
    left: .5rem !important;
    right: .5rem !important;
    top: auto !important;
    bottom: calc(.45rem + env(safe-area-inset-bottom, 0px)) !important;
    width: calc(100% - 1rem) !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: .25rem !important;
    padding: .5rem !important;
  }
  .app-shell .amor-tabs > *,
  nav.amor-tabs > * {
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .3rem !important;
    padding: .35rem .2rem !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
  }
  #chat-app.has-conversation .amor-tabs,
  #chat-app.has-conversation ~ .amor-tabs,
  html.kb-open .amor-tabs,
  html.kb-open nav.amor-tabs,
  html.kb-open .app-shell .amor-tabs {
    display: none !important;
  }
}
/* AMOR_MOBILE_NAV_FIX_END */

/* AMOR_IPHONE_CALL_PAD — full-screen Phone pad: Audio / Video / Mute / More / End / Keypad */
.call-dialog {
  width: 100vw !important;
  max-width: 100vw !important;
  height: var(--app-vvh, 100dvh) !important;
  max-height: var(--app-vvh, 100dvh) !important;
  margin: 0 !important;
  inset: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background:
    radial-gradient(120% 70% at 50% -8%, #4a2a78 0%, transparent 52%),
    radial-gradient(90% 50% at 80% 110%, rgba(22, 119, 255, .18), transparent 46%),
    #120c22 !important;
  color: #fff !important;
}
.call-dialog::backdrop {
  background: #0b0a14;
}
@media (min-width: 861px) {
  .call-dialog {
    width: min(26.75rem, 100vw) !important;
    max-width: 26.75rem !important;
    height: min(58rem, 100dvh) !important;
    max-height: 100dvh !important;
    margin: auto !important;
    inset: unset !important;
    border-radius: 28px !important;
  }
}
.call-ui {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: calc(.85rem + env(safe-area-inset-top, 0px)) 1.15rem calc(.7rem + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box !important;
  text-align: center;
}
.call-meta {
  flex: 0 0 auto;
  padding: .35rem .4rem .2rem;
}
.call-kind {
  margin: 0 0 .15rem !important;
  color: rgba(255, 255, 255, .72) !important;
  font-size: .82rem !important;
  font-weight: 500 !important;
}
.call-peer {
  margin: 0 !important;
  color: #fff !important;
  font-size: 1.7rem !important;
  font-weight: 700 !important;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.call-status {
  margin: .35rem 0 0 !important;
  color: rgba(255, 255, 255, .62) !important;
  font-size: .95rem !important;
  font-weight: 500 !important;
}
.call-timer {
  margin: .35rem 0 0 !important;
  color: rgba(255, 255, 255, .72) !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
}
.call-stage {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: grid !important;
  place-items: center !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: hidden;
}
.call-ui.is-voice .call-stage {
  min-height: 0 !important;
  background: transparent !important;
}
.call-avatar {
  width: 9.5rem !important;
  height: 9.5rem !important;
  border-radius: 50% !important;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, .12),
    0 18px 40px rgba(0, 0, 0, .35) !important;
}
#ios-speaker-pump {
  display: block !important;
  position: fixed !important;
  width: 2px !important;
  height: 2px !important;
  opacity: 0.01 !important;
  pointer-events: none !important;
  left: -40px !important;
  top: -40px !important;
  z-index: -1 !important;
}
.call-switch-cam {
  position: absolute;
  z-index: 5;
  top: .75rem;
  inset-inline-start: .75rem;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  display: grid;
  place-items: center;
}
.call-switch-cam[hidden] { display: none !important; }
.call-future { display: none !important; }
.call-actions {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 1.15rem !important;
  padding: .55rem .15rem 0 !important;
  background: transparent !important;
  position: relative !important;
}
.call-pad-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  justify-items: center;
  gap: .55rem .2rem;
}
.call-ui.is-incoming .call-pad-tools,
.call-ui.is-incoming .call-pad-endrow {
  display: none !important;
}
.call-ui:not(.is-incoming) .call-pad-incoming {
  display: none !important;
}
.call-dialog,
.call-dialog:focus,
.call-dialog:focus-visible,
.call-ui:focus,
.call-ui:focus-visible,
.call-pad-btn,
.call-pad-btn:focus,
.call-pad-btn:focus-visible,
.call-pad-btn:active,
.call-pad-btn:hover {
  outline: none !important;
  outline-offset: 0 !important;
  -webkit-tap-highlight-color: transparent !important;
}
.call-pad-btn {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .45rem;
  width: 5.6rem;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: #fff;
  box-shadow: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.call-pad-ico {
  position: relative;
  width: 4.15rem;
  height: 4.15rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  backdrop-filter: saturate(160%) blur(22px);
  color: #fff;
}
.call-pad-ico .nova-ico {
  width: 26px;
  height: 26px;
}
.call-pad-btn .call-ctrl-label {
  font-size: .72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .86) !important;
  line-height: 1.2;
}
.call-pad-btn.is-speaker .call-pad-ico,
.call-pad-btn[aria-pressed="true"] .call-pad-ico {
  background: #fff !important;
  color: #1c1c1e !important;
}
.call-pad-btn.is-end .call-pad-ico,
.call-pad-btn.call-end .call-pad-ico,
.call-pad-btn.call-reject .call-pad-ico {
  background: #ff3b30 !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(255, 59, 48, .38);
}
.call-pad-btn.is-end .call-pad-ico .nova-ico,
.call-pad-btn.call-end .call-pad-ico .nova-ico,
.call-pad-btn.call-reject .call-pad-ico .nova-ico {
  transform: rotate(135deg);
}
.call-pad-btn.is-accept .call-pad-ico,
.call-pad-btn.call-accept .call-pad-ico {
  background: #34c759 !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(52, 199, 89, .38);
}
.call-pad-btn.is-accept .call-pad-ico .nova-ico,
.call-pad-btn.call-accept .call-pad-ico .nova-ico {
  transform: none;
}
.call-pad-btn.is-disabled,
.call-pad-btn:disabled {
  opacity: .42;
  pointer-events: none;
}
.call-pad-btn#btn-mute[aria-pressed="true"] .call-pad-ico::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 1.7rem;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(-42deg);
}
.call-ui.is-active.is-video .call-meta {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: calc(.7rem + env(safe-area-inset-top, 0px));
  display: block !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}
.call-ui.is-active.is-video {
  padding: 0 !important;
  position: relative;
}
.call-ui.is-active.is-video .call-stage {
  position: absolute;
  inset: 0;
  border-radius: 0 !important;
}
.call-ui.is-active.is-video .call-actions {
  position: absolute !important;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 1.15rem calc(1.1rem + env(safe-area-inset-bottom, 0px)) !important;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)) !important;
}
.call-end,
.call-reject,
.call-accept {
  width: auto !important;
  height: auto !important;
  grid-column: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* AMOR_NETFLIX_CANVAS
   One continuous midnight surface. Chrome is a fade, not a nested black card.
   Controls (input pill, icon circles, bubbles) stay; the wrapping boxes go. */
html, body,
.app-shell,
#chat-app.app-shell,
#chat-pane,
.chat-pane,
.chat-pane.filled,
.sidebar,
.sidebar#admin-side,
.amor-inbox,
.amor-settings,
.calls-shell,
.calls-shell .settings-main,
.settings-main,
.settings-scroll,
.module-scroll,
.module-panel.active,
.amor-hub {
  background: var(--bg) !important;
}
.messages,
#messages {
  background: transparent !important;
}
#chat-pane,
.chat-pane,
.chat-pane.filled {
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(121, 56, 255, .14), transparent 56%),
    radial-gradient(640px 420px at 8% 108%, rgba(22, 119, 255, .1), transparent 52%),
    var(--bg) !important;
}

.app-shell .chat-header,
.app-shell .sidebar-head,
.app-shell .amor-inbox-head,
.app-shell .page-head,
.app-shell .settings-head,
.app-shell .info-head,
.app-shell .composer,
.app-shell .module-toolbar,
.app-shell .amor-tabs,
nav.amor-tabs {
  isolation: auto !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.app-shell .chat-header::before,
.app-shell .sidebar-head::before,
.app-shell .amor-inbox-head::before,
.app-shell .page-head::before,
.app-shell .settings-head::before,
.app-shell .composer::before,
.app-shell .amor-tabs::before {
  display: none !important;
}

.app-shell .chat-header,
.app-shell .sidebar-head,
.app-shell .amor-inbox-head,
.app-shell .page-head,
.app-shell .settings-head,
.app-shell .info-head {
  width: 100% !important;
  max-width: none !important;
  align-self: stretch !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, rgba(6, 11, 32, .88) 0%, rgba(6, 11, 32, .28) 72%, rgba(6, 11, 32, 0) 100%) !important;
}
.app-shell .chat-header {
  padding: calc(.45rem + env(safe-area-inset-top, 0px)) .75rem .55rem !important;
}
.app-shell .sidebar-head,
.app-shell .amor-inbox-head,
.app-shell .page-head,
.app-shell .settings-head {
  padding: calc(.55rem + env(safe-area-inset-top, 0px)) 1rem .45rem !important;
}

.app-shell .composer {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: linear-gradient(0deg, rgba(6, 11, 32, .94) 0%, rgba(6, 11, 32, .42) 68%, rgba(6, 11, 32, 0) 100%) !important;
  padding: .4rem .7rem calc(.55rem + env(safe-area-inset-bottom, 0px)) !important;
}

#chat-app.has-conversation .chat-header {
  margin: 0 !important;
  padding: calc(.45rem + env(safe-area-inset-top, 0px)) .75rem .5rem !important;
}
#chat-app.has-conversation .composer {
  margin: 0 !important;
  max-width: none !important;
  padding: .4rem .7rem calc(.55rem + env(safe-area-inset-bottom, 0px)) !important;
}
html.kb-open .app-shell .chat-header,
html.kb-open #chat-app.has-conversation .chat-header {
  margin-top: 0 !important;
  padding-top: .3rem !important;
  padding-bottom: .3rem !important;
}
html.kb-open .app-shell .composer,
html.kb-open #chat-app.has-conversation .composer {
  margin-bottom: 0 !important;
  padding-bottom: .4rem !important;
}

.app-shell .composer-box {
  background: rgba(255, 255, 255, .08) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  box-shadow: none !important;
}

.app-shell .module-toolbar {
  margin: 0 !important;
  padding: .55rem 1rem .35rem !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.app-shell .amor-tabs,
nav.amor-tabs {
  inset-inline: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, .06) !important;
  background: linear-gradient(180deg, rgba(6, 11, 32, 0) 0%, rgba(6, 11, 32, .88) 28%, var(--bg) 100%) !important;
  bottom: 0 !important;
  padding: .45rem .35rem calc(.45rem + env(safe-area-inset-bottom, 0px)) !important;
}

.app-shell .search-row input,
.app-shell .nova-search input,
.app-shell .module-toolbar input[type="search"],
.app-shell .amor-inbox #side-search,
.amor-inbox .search-row input {
  background: rgba(255, 255, 255, .08) !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  box-shadow: none !important;
}

.app-shell .amor-hub {
  gap: 0 !important;
  padding: 0 0 5.5rem !important;
}
.app-shell .amor-hub-row,
.app-shell .amor-profile-card {
  margin: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.conv-list li,
.amor-list li,
.nova-inbox .conv-list li,
.nova-inbox .amor-list li {
  background: transparent !important;
}

.app-shell .nova-nav {
  background: var(--bg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-inline-end: 1px solid rgba(255, 255, 255, .06);
  box-shadow: none !important;
}

@media (max-width: 860px) {
  .app-shell .chat-header,
  .app-shell .sidebar-head,
  .app-shell .amor-inbox-head,
  .app-shell .composer {
    margin-inline: 0 !important;
  }
  .app-shell .amor-tabs,
  nav.amor-tabs {
    inset-inline: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
  }
}

body.theme-light html,
body.theme-light,
body.theme-light .app-shell,
body.theme-light #chat-pane,
body.theme-light .chat-pane,
body.theme-light .chat-pane.filled,
body.theme-light .sidebar,
body.theme-light .amor-inbox,
body.theme-light .amor-settings,
body.theme-light .settings-main,
body.theme-light .settings-scroll,
body.theme-light .module-scroll {
  background: var(--bg) !important;
}
body.theme-light .app-shell .chat-header,
body.theme-light .app-shell .sidebar-head,
body.theme-light .app-shell .amor-inbox-head,
body.theme-light .app-shell .page-head,
body.theme-light .app-shell .settings-head,
body.theme-light .app-shell .composer,
body.theme-light .app-shell .amor-tabs,
body.theme-light nav.amor-tabs {
  background: linear-gradient(180deg, rgba(238, 241, 251, .94) 0%, rgba(238, 241, 251, .35) 70%, rgba(238, 241, 251, 0) 100%) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body.theme-light .app-shell .composer,
body.theme-light .app-shell .amor-tabs,
body.theme-light nav.amor-tabs {
  background: linear-gradient(0deg, rgba(238, 241, 251, .96) 0%, rgba(238, 241, 251, .4) 70%, rgba(238, 241, 251, 0) 100%) !important;
}
body.theme-light .app-shell .composer-box,
body.theme-light .app-shell .search-row input {
  background: rgba(255, 255, 255, .72) !important;
  border-color: rgba(18, 24, 51, .08) !important;
}
body.theme-light .app-shell .amor-hub-row {
  background: transparent !important;
  border-bottom-color: rgba(18, 24, 51, .08) !important;
}
/* END_AMOR_NETFLIX_CANVAS */

/* AMOR_LAYOUT_LOCK — pin the shell to visualViewport in pixels (beats CSS),
   keep the mic in a 3-column grid, and raise bubble contrast. */
html.vv-lock #chat-app.app-shell {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}
html.vv-lock #chat-app.has-conversation #chat-pane:not([hidden]) {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
html.vv-lock #chat-app.has-conversation .chat-header,
html.vv-lock #chat-app.has-conversation .composer {
  flex: 0 0 auto !important;
}
html.vv-lock #chat-app.has-conversation #messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

html.vv-lock #chat-app.has-conversation .composer,
html.layout-fit #chat-app.has-conversation .composer,
html.kb-open #chat-app.has-conversation .composer {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) 44px !important;
  align-items: center !important;
  column-gap: .4rem !important;
  direction: ltr !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}
html.vv-lock #chat-app.has-conversation .composer-tools,
html.layout-fit #chat-app.has-conversation .composer-tools,
html.kb-open #chat-app.has-conversation .composer-tools {
  display: contents !important;
}
html.vv-lock #chat-app.has-conversation .cam-btn,
html.layout-fit #chat-app.has-conversation .cam-btn,
html.kb-open #chat-app.has-conversation .cam-btn {
  grid-column: 1;
  width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
}
html.vv-lock #chat-app.has-conversation .composer-box,
html.layout-fit #chat-app.has-conversation .composer-box,
html.kb-open #chat-app.has-conversation .composer-box {
  grid-column: 2;
  min-width: 0 !important;
  max-width: 100% !important;
}
html.vv-lock #chat-app.has-conversation .mic-btn,
html.layout-fit #chat-app.has-conversation .mic-btn,
html.kb-open #chat-app.has-conversation .mic-btn {
  grid-column: 3;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  justify-self: end;
}
html.vv-lock #chat-app.has-conversation .composer-recording {
  grid-column: 1 / -1;
}

html.layout-fit #chat-app.has-conversation .chat-header {
  padding-top: .3rem !important;
  padding-bottom: .3rem !important;
}
#btn-fit-layout[aria-pressed="true"] {
  background: rgba(121, 56, 255, .35) !important;
  border-color: rgba(163, 75, 255, .7) !important;
}

.msg.in {
  background: #3E528C !important;
  color: #F8FAFF !important;
  border: 1px solid rgba(196, 210, 255, .32) !important;
}
.msg.in .body,
.msg.in .msg-text,
.msg.in .caption {
  color: #F8FAFF !important;
}
.msg.in .time,
.msg.in .edited-mark {
  color: #E4EAFB !important;
  opacity: 1 !important;
}
.msg.out {
  color: #FFFFFF !important;
}
.msg.out .time,
.msg.out .edited-mark {
  color: rgba(255, 255, 255, .92) !important;
}
.chat-header .status-line,
.app-shell .chat-header .status-line {
  color: #E4EAFB !important;
}
.chat-header .peer-meta h1,
.app-shell .chat-header .peer-meta h1 {
  color: #FFFFFF !important;
}
.app-shell .composer-box textarea,
.app-shell .composer-box .composer-editor,
.app-shell .composer #message-input,
.app-shell .composer #message-editor {
  color: #F8FAFF !important;
}
.app-shell .composer-box textarea::placeholder,
.app-shell .composer #message-input::placeholder {
  color: #D3DCF5 !important;
  opacity: 1 !important;
}
.app-shell .composer-box .composer-editor.is-empty::before {
  content: attr(data-placeholder);
  color: #D3DCF5 !important;
  pointer-events: none;
}
@media (min-width: 861px) {
  .msg {
    max-width: min(42rem, 58%) !important;
  }
}
body.theme-light .msg.in {
  background: #FFFFFF !important;
  color: #121833 !important;
  border-color: rgba(18, 24, 51, .12) !important;
}
body.theme-light .msg.in .body,
body.theme-light .msg.in .msg-text,
body.theme-light .msg.in .time {
  color: #121833 !important;
}
/* END_AMOR_LAYOUT_LOCK */

/* AMOR_IOS_CONTROLS: iOS green pills for on/off, Netflix overlay for choices */
.ios-group {
  display: grid;
  width: 100%;
  margin: 0 0 .85rem;
  background: rgba(28, 28, 30, .78);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
}
.ios-group > .nova-switch,
.ios-group > .ios-select-row {
  width: 100%;
  margin: 0;
  padding: .92rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: transparent;
}
.ios-group > .nova-switch:last-child,
.ios-group > .ios-select-row:last-child {
  border-bottom: 0;
}
.nova-switch {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 3.05rem;
  margin: 0;
  position: relative;
  cursor: pointer;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 500;
  text-align: start;
}
.nova-switch > span:not(.switch-ui) {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}
.nova-switch > input[type="checkbox"],
.view-once-toggle > input[type="checkbox"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  clip: rect(0, 0, 0, 0);
}
.switch-ui,
.auth-switch {
  flex: 0 0 auto;
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: #39393d;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .28);
  position: relative;
  transition: background .2s ease;
}
.switch-ui::after,
.auth-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  transition: inset-inline-start .2s ease, background .2s ease;
}
.nova-switch input:checked + .switch-ui,
.auth-toggle input:checked + .auth-switch,
.view-once-toggle input:checked + .switch-ui {
  background: #34c759;
  border-color: #34c759;
  box-shadow: none;
}
.nova-switch input:checked + .switch-ui::after,
.auth-toggle input:checked + .auth-switch::after,
.view-once-toggle input:checked + .switch-ui::after {
  inset-inline-start: calc(100% - 2px - 27px);
  background: #fff;
}
.nova-switch input:disabled + .switch-ui,
.auth-toggle input:disabled + .auth-switch {
  opacity: .55;
}
.nova-switch input:focus-visible + .switch-ui,
.auth-toggle input:focus-visible + .auth-switch {
  box-shadow: 0 0 0 3px rgba(52, 199, 89, .28);
}
.ios-select-row {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  min-height: 3.05rem;
  grid-template-columns: unset;
}
.ios-select-row .field-label {
  margin: 0;
  flex: 1 1 auto;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 500;
}
.ios-select-row .amor-select {
  width: auto;
  min-width: 7.5rem;
  flex: 0 1 auto;
}
.ios-select-row .amor-select-trigger {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 2rem;
  padding: .15rem 1.6rem .15rem .35rem;
  color: #aeaeb2;
  font-weight: 500;
}
select.amor-select-native,
.amor-select > select {
  display: none !important;
  appearance: none !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}
.amor-select-trigger {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.amor-select-menu {
  position: fixed !important;
  z-index: 90 !important;
  inset: auto !important;
  margin: 0;
  padding: .45rem 0;
  list-style: none;
  min-width: 13.5rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 26rem);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(32, 14, 20, .94) !important;
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .55);
}
.amor-select-option {
  padding: .78rem 1.2rem;
  border-radius: 0;
  color: #fff !important;
  font-size: 1rem;
  font-weight: 500;
  background: transparent !important;
}
.amor-select-option:hover,
.amor-select-option:focus {
  background: rgba(255, 255, 255, .08) !important;
}
.amor-select-option.is-selected {
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
  font-weight: 700;
}
.prefs-form select,
.nova-appearance .appear-row select {
  color-scheme: dark;
}
.view-once-toggle.nova-switch {
  width: 100%;
  padding: .35rem 0;
}
.composer-box .composer-editor {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 24px;
  max-height: 7.5rem;
  overflow-y: auto;
  outline: none;
  border: 0;
  background: transparent;
  padding: .55rem .4rem;
  line-height: 1.35;
  text-align: start;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
  caret-color: #A34BFF;
}
.composer-box .composer-editor.is-empty::before {
  content: attr(data-placeholder);
  color: rgba(235, 235, 245, .45);
  pointer-events: none;
}
.composer-mirror {
  display: none !important;
}
#chat-app.has-conversation #message-input {
  font-size: 16px !important;
}
#chat-app.has-conversation #message-editor {
  font-size: 16px !important;
  font-size: max(16px, 1rem) !important;
}
body.theme-light .ios-group {
  background: rgba(242, 242, 247, .96);
  border-color: rgba(0, 0, 0, .06);
}
body.theme-light .ios-group > .nova-switch,
body.theme-light .ios-group > .ios-select-row {
  border-bottom-color: rgba(0, 0, 0, .08);
}
body.theme-light .nova-switch,
body.theme-light .ios-select-row .field-label {
  color: #111;
}
body.theme-light .ios-select-row .amor-select-trigger {
  color: #6c6c70;
}
body.theme-light .amor-select-menu {
  background: rgba(40, 18, 24, .94) !important;
}
/* END_AMOR_IOS_CONTROLS */

/* AMOR_SHELL_UNIFY: one header cluster, faster tab switches, no hidden-tool leaks */
.inbox-tools-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-inline-start: auto;
  gap: .15rem;
}
.app-shell .inbox-tools[hidden],
.app-shell .inbox-select-tools[hidden],
.app-shell #inbox-tools-select[hidden],
.app-shell #inbox-tools-normal[hidden] {
  display: none !important;
}
html.is-navigating {
  cursor: progress;
}
html.is-navigating .amor-tab,
html.is-navigating .nova-nav .nav-item {
  opacity: .65;
}
.amor-tab:active,
.nova-nav .nav-item:active {
  opacity: .8;
}
/* END_AMOR_SHELL_UNIFY */
